Skip to content

Commit fdb444e

Browse files
committed
ci: backend: fix migration
1 parent 0470d76 commit fdb444e

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

backend/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ENV GITHUB_CLIENT_ID=github-client-id
2222
ENV GITHUB_CLIENT_SECRET=github-client-secret
2323

2424
RUN bun tsoa
25-
RUN bunx prisma generate
2625

2726
EXPOSE 8000
28-
CMD ["sh", "-c", "bunx prisma migrate deploy && bun run src/server.ts"]
27+
28+
CMD ["sh", "-c", "bun migrate && bun run src/server.ts"]

backend/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"lint": "prettier --check .",
88
"tsoa": "tsoa routes && tsoa spec",
99
"prestart": "bun run tsoa",
10-
"start": "bun run src/server.ts"
10+
"start": "bun run src/server.ts",
11+
"migrate": "bunx prisma generate && bunx prisma migrate deploy && bunx prisma db push"
1112
},
1213
"devDependencies": {
1314
"@types/bun": "latest",

backend/src/prisma/schema.prisma

+9-1
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,12 @@ model Account {
5656
updatedAt DateTime
5757
5858
@@map("account")
59-
}
59+
}
60+
61+
model Verification {
62+
id String @id @default(cuid())
63+
token String @unique
64+
expires DateTime
65+
createdAt DateTime @default(now())
66+
updatedAt DateTime @updatedAt
67+
}

0 commit comments

Comments
 (0)