Skip to content

Commit 91bfb57

Browse files
committed
add migration files
1 parent 590befa commit 91bfb57

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"start:dev": "nest start --watch",
1414
"start:debug": "nest start --debug --watch",
1515
"start:prod": "node dist/main",
16-
"migration:dev": "npx prisma migrate dev",
1716
"migration:prod": "npx prisma migrate deploy",
1817
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
1918
"test": "jest",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- DropColumn
2+
ALTER TABLE "UserAction" DROP COLUMN "actionID";
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- AlterTable
2+
ALTER TABLE "UserAction" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
3+
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;

prisma/schema.prisma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ model UserAction {
3333
user User @relation(fields: [userId], references: [id])
3434
poll Poll @relation(fields: [pollId], references: [pollId], onDelete: Cascade)
3535
createdAt DateTime @default(now())
36-
updatedAt DateTime @updatedAt
36+
updatedAt DateTime @default(now()) @updatedAt
3737
}
3838

3939
model Poll {

0 commit comments

Comments
 (0)