feat(cover): add cover letter db migration
This commit is contained in:
@@ -18,3 +18,16 @@ CREATE TABLE IF NOT EXISTS "templates" (
|
|||||||
REFERENCES users (id)
|
REFERENCES users (id)
|
||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS "cover_letters" (
|
||||||
|
"id" SERIAL PRIMARY KEY,
|
||||||
|
"user_id" INTEGER NOT NULL,
|
||||||
|
"name" VARCHAR(50) NOT NULL UNIQUE,
|
||||||
|
"letter" TEXT NOT NULL,
|
||||||
|
"created_at" TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
|
||||||
|
CONSTRAINT fk_user
|
||||||
|
FOREIGN KEY (user_id)
|
||||||
|
REFERENCES users (id)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user