create_account work
This commit is contained in:
parent
80a8651305
commit
0a5682d1e4
22 changed files with 265 additions and 154 deletions
|
|
@ -0,0 +1,2 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "Request" ADD COLUMN "result" TEXT;
|
||||
33
prisma/migrations/20231218135715_key/migration.sql
Normal file
33
prisma/migrations/20231218135715_key/migration.sql
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `result` on the `Request` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- CreateTable
|
||||
CREATE TABLE "Key" (
|
||||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"keyName" TEXT NOT NULL,
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"deletedAt" DATETIME,
|
||||
"pubkey" TEXT NOT NULL
|
||||
);
|
||||
|
||||
-- RedefineTables
|
||||
PRAGMA foreign_keys=OFF;
|
||||
CREATE TABLE "new_Request" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"keyName" TEXT,
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"requestId" TEXT NOT NULL,
|
||||
"remotePubkey" TEXT NOT NULL,
|
||||
"method" TEXT NOT NULL,
|
||||
"params" TEXT,
|
||||
"allowed" BOOLEAN
|
||||
);
|
||||
INSERT INTO "new_Request" ("allowed", "createdAt", "id", "keyName", "method", "params", "remotePubkey", "requestId") SELECT "allowed", "createdAt", "id", "keyName", "method", "params", "remotePubkey", "requestId" FROM "Request";
|
||||
DROP TABLE "Request";
|
||||
ALTER TABLE "new_Request" RENAME TO "Request";
|
||||
PRAGMA foreign_key_check;
|
||||
PRAGMA foreign_keys=ON;
|
||||
8
prisma/migrations/20231218140114_/migration.sql
Normal file
8
prisma/migrations/20231218140114_/migration.sql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- A unique constraint covering the columns `[keyName]` on the table `Key` will be added. If there are existing duplicate values, this will fail.
|
||||
|
||||
*/
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Key_keyName_key" ON "Key"("keyName");
|
||||
Loading…
Add table
Add a link
Reference in a new issue