You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
523 B
10 lines
523 B
-- CreateTable
|
|
CREATE TABLE "dept_users" (
|
|
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
"deptId" INTEGER NOT NULL,
|
|
"userId" INTEGER NOT NULL,
|
|
"createdAt" DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
"updatedAt" DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
CONSTRAINT "dept_users_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users" ("id") ON DELETE CASCADE ON UPDATE NO ACTION,
|
|
CONSTRAINT "dept_users_deptId_fkey" FOREIGN KEY ("deptId") REFERENCES "dept" ("deptId") ON DELETE CASCADE ON UPDATE NO ACTION
|
|
);
|