CREATE TABLE "post" ( "id" int PRIMARY KEY, "title" varchar(255), "body" varchar(255), "createDate" datetime, "editDate" datetime, "author" int FOREIGN KEY("author") REFERENCES "user" ("id"), "liked" int ); CREATE TABLE "user" ( "id" int, "username" varchar(255), "password" varchar(255), "email" varchar(255), "name" varchar(255), "role" varchar(255) ); CREATE TABLE "comment" ( "id" int, "title" varchar(255), "body" varchar(255), "date" datetime, "author" int FOREIGN KEY("author") REFERENCES "user" ("id"), "post" int FOREIGN KEY("post") REFERENCES "post" ("id"), "replyTo" int FOREIGN KEY("replyTo") REFERENCES "comment" ("id"), "liked" int ); CREATE TABLE "tag" ( "id" int, "name" varchar(255) ); CREATE TABLE "post-tag" ( "postId" int FOREIGN KEY("postId") REFERENCES "post" ("id"), "tagId" int FOREIGN KEY("tagId") REFERENCES "tag" ("id") );