22 lines
656 B
SQL
22 lines
656 B
SQL
/*
|
|
Warnings:
|
|
|
|
- Added the required column `owner` to the `Token` 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_Token" (
|
|
"id" TEXT NOT NULL PRIMARY KEY,
|
|
"owner" TEXT NOT NULL,
|
|
"token" TEXT NOT NULL,
|
|
"refreshToken" TEXT NOT NULL
|
|
);
|
|
INSERT INTO "new_Token" ("id", "refreshToken", "token") SELECT "id", "refreshToken", "token" FROM "Token";
|
|
DROP TABLE "Token";
|
|
ALTER TABLE "new_Token" RENAME TO "Token";
|
|
CREATE UNIQUE INDEX "Token_id_key" ON "Token"("id");
|
|
PRAGMA foreign_keys=ON;
|
|
PRAGMA defer_foreign_keys=OFF;
|