store requests
This commit is contained in:
parent
d2cc06244e
commit
3d9aa4f459
3 changed files with 40 additions and 0 deletions
8
prisma/migrations/20231105090854_request/migration.sql
Normal file
8
prisma/migrations/20231105090854_request/migration.sql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
-- CreateTable
|
||||
CREATE TABLE "Request" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"keyName" TEXT NOT NULL,
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"requestId" TEXT NOT NULL,
|
||||
"remotePubkey" TEXT NOT NULL
|
||||
);
|
||||
22
prisma/migrations/20231105091736_method/migration.sql
Normal file
22
prisma/migrations/20231105091736_method/migration.sql
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- Added the required column `method` to the `Request` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- RedefineTables
|
||||
PRAGMA foreign_keys=OFF;
|
||||
CREATE TABLE "new_Request" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"keyName" TEXT NOT NULL,
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"requestId" TEXT NOT NULL,
|
||||
"remotePubkey" TEXT NOT NULL,
|
||||
"method" TEXT NOT NULL,
|
||||
"params" TEXT
|
||||
);
|
||||
INSERT INTO "new_Request" ("createdAt", "id", "keyName", "remotePubkey", "requestId") SELECT "createdAt", "id", "keyName", "remotePubkey", "requestId" FROM "Request";
|
||||
DROP TABLE "Request";
|
||||
ALTER TABLE "new_Request" RENAME TO "Request";
|
||||
PRAGMA foreign_key_check;
|
||||
PRAGMA foreign_keys=ON;
|
||||
Loading…
Add table
Add a link
Reference in a new issue