mirror of
https://github.com/MichaByte/OnBoard-Live.git
synced 2026-01-29 13:32:12 -05:00
slack modal work
This commit is contained in:
parent
b062611fec
commit
492a644f56
6 changed files with 94 additions and 4 deletions
|
|
@ -0,0 +1,14 @@
|
|||
-- CreateTable
|
||||
CREATE TABLE "Session" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"user_id" TEXT NOT NULL,
|
||||
"timestamp" TEXT NOT NULL,
|
||||
"filename" TEXT NOT NULL,
|
||||
"duration" INTEGER NOT NULL,
|
||||
"reviewed" BOOLEAN NOT NULL DEFAULT false,
|
||||
"approved" BOOLEAN NOT NULL DEFAULT false,
|
||||
CONSTRAINT "Session_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Session_user_id_key" ON "Session"("user_id");
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `user_id` on the `Session` table. All the data in the column will be lost.
|
||||
- Added the required column `pr_id` to the `Session` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- RedefineTables
|
||||
PRAGMA defer_foreign_keys=ON;
|
||||
PRAGMA foreign_keys=OFF;
|
||||
CREATE TABLE "new_Session" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"pr_id" INTEGER NOT NULL,
|
||||
"timestamp" TEXT NOT NULL,
|
||||
"filename" TEXT NOT NULL,
|
||||
"duration" INTEGER NOT NULL,
|
||||
"reviewed" BOOLEAN NOT NULL DEFAULT false,
|
||||
"approved" BOOLEAN NOT NULL DEFAULT false,
|
||||
CONSTRAINT "Session_pr_id_fkey" FOREIGN KEY ("pr_id") REFERENCES "PullRequest" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_Session" ("approved", "duration", "filename", "id", "reviewed", "timestamp") SELECT "approved", "duration", "filename", "id", "reviewed", "timestamp" FROM "Session";
|
||||
DROP TABLE "Session";
|
||||
ALTER TABLE "new_Session" RENAME TO "Session";
|
||||
CREATE UNIQUE INDEX "Session_pr_id_key" ON "Session"("pr_id");
|
||||
PRAGMA foreign_keys=ON;
|
||||
PRAGMA defer_foreign_keys=OFF;
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
-- DropIndex
|
||||
DROP INDEX "Session_pr_id_key";
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- A unique constraint covering the columns `[filename]` on the table `Session` will be added. If there are existing duplicate values, this will fail.
|
||||
|
||||
*/
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Session_filename_key" ON "Session"("filename");
|
||||
Loading…
Add table
Add a link
Reference in a new issue