chore: adds failsafe auto migrations back (#13569)

This commit is contained in:
Omar López
2024-02-06 22:59:01 -03:00
committed by GitHub
parent 5684ce2d28
commit e884348807
3 changed files with 10 additions and 5 deletions
+3
View File
@@ -23,6 +23,9 @@ CALCOM_LICENSE_KEY=
# - DATABASE ************************************************************************************************
DATABASE_URL="postgresql://postgres:@localhost:5450/calendso"
# Needed to run migrations while using a connection pooler like PgBouncer
# Use the same one as DATABASE_URL if you're not using a connection pooler
DATABASE_DIRECT_URL=
UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=
INSIGHTS_DATABASE_URL=
+1
View File
@@ -4,6 +4,7 @@
"private": true,
"scripts": {
"clean": "rm -rf .turbo && rm -rf node_modules",
"build": "yarn prisma migrate deploy || true",
"db-deploy": "yarn prisma migrate deploy",
"db-migrate": "yarn prisma migrate dev",
"db-nuke": "docker compose down --volumes --remove-orphans || docker-compose down --volumes --remove-orphans",
+6 -5
View File
@@ -2,8 +2,9 @@
// learn more about it in the docs: https://pris.ly/d/prisma-schema
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DATABASE_DIRECT_URL")
}
generator client {
@@ -294,9 +295,9 @@ model Profile {
organization Team @relation(fields: [organizationId], references: [id], onDelete: Cascade)
username String
eventTypes EventType[]
movedFromUser User? @relation("moved_to_profile")
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
movedFromUser User? @relation("moved_to_profile")
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([userId, organizationId])
@@index([uid])