CREATE TABLE "Conversations" ( "Id" int, "Subject" varchar(255), "CreatedOn" datetime, "IsSeen" bool, "Sender_Id" int CONSTRAINT Users_Id REFERENCES Users(Id), "Receiver_Id" int CONSTRAINT Users_Id REFERENCES Users(Id) ); CREATE TABLE "Messages" ( "Id" int PRIMARY KEY, "Body" varchar(255), "UserAgent" varchar(255), "IsRead" bool, "SentOn" datetime, "Conversation_Id" int CONSTRAINT Conversations_Id REFERENCES Conversations(Id), "Sender_Id" int CONSTRAINT Users_Id REFERENCES Users(Id), "Parent_Id" int CONSTRAINT Messages_Id REFERENCES Messages(Id) ); CREATE TABLE "Users" ( "Id" int PRIMARY KEY, "UserName" varchar(255), "DisplayName" varchar(255), "HashPassword" varchar(255), "Email" varchar(255), "..." varchar(255) ); CREATE TABLE "Attachments" ( "Id" int PRIMARY KEY, "FileName" varchar(255), "ContentType" varchar(255), "Extension" varchar(255), "Size" int, "AttachedOn" datetime, "Conversation_Id" int CONSTRAINT Conversations_Id REFERENCES Conversations(Id), "Attacher_Id" int CONSTRAINT Users_Id REFERENCES Users(Id) );