11 lines
335 B
SQL
11 lines
335 B
SQL
CREATE TABLE IF NOT EXISTS "SongComment" (
|
|
"id" serial PRIMARY KEY,
|
|
"createdAt" timestamp DEFAULT now() NOT NULL,
|
|
"updatedAt" timestamp DEFAULT now() NOT NULL,
|
|
"songId" integer NOT NULL,
|
|
"userId" integer NOT NULL,
|
|
"content" text NOT NULL
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS "SongComment_songId_idx" ON "SongComment" ("songId");
|