Skip to content

Commit f545600

Browse files
committed
add migration
1 parent ec0f050 commit f545600

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
-- AlterTable
2+
ALTER TABLE "NewWallet" ADD COLUMN "stakeCredentialHash" TEXT;
3+
4+
-- CreateTable
5+
CREATE TABLE "Proxy" (
6+
"id" TEXT NOT NULL,
7+
"walletId" TEXT,
8+
"proxyAddress" TEXT NOT NULL,
9+
"authTokenId" TEXT NOT NULL,
10+
"paramUtxo" TEXT NOT NULL,
11+
"description" TEXT,
12+
"isActive" BOOLEAN NOT NULL DEFAULT true,
13+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
14+
"updatedAt" TIMESTAMP(3) NOT NULL,
15+
"userId" TEXT,
16+
17+
CONSTRAINT "Proxy_pkey" PRIMARY KEY ("id")
18+
);
19+
20+
-- CreateTable
21+
CREATE TABLE "Migration" (
22+
"id" TEXT NOT NULL,
23+
"originalWalletId" TEXT NOT NULL,
24+
"newWalletId" TEXT,
25+
"ownerAddress" TEXT NOT NULL,
26+
"currentStep" INTEGER NOT NULL DEFAULT 0,
27+
"status" TEXT NOT NULL DEFAULT 'pending',
28+
"migrationData" JSONB,
29+
"errorMessage" TEXT,
30+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
31+
"updatedAt" TIMESTAMP(3) NOT NULL,
32+
"completedAt" TIMESTAMP(3),
33+
34+
CONSTRAINT "Migration_pkey" PRIMARY KEY ("id")
35+
);
36+
37+
-- CreateIndex
38+
CREATE INDEX "Migration_ownerAddress_idx" ON "Migration"("ownerAddress");
39+
40+
-- CreateIndex
41+
CREATE INDEX "Migration_originalWalletId_idx" ON "Migration"("originalWalletId");
42+
43+
-- CreateIndex
44+
CREATE INDEX "Migration_status_idx" ON "Migration"("status");
45+
46+
-- CreateIndex
47+
CREATE INDEX "Migration_createdAt_idx" ON "Migration"("createdAt");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Please do not edit this file manually
22
# It should be added in your version-control system (e.g., Git)
3-
provider = "postgresql"
3+
provider = "postgresql"

0 commit comments

Comments
 (0)