chore: adds failsafe auto migrations back (#13569)
This commit is contained in:
@@ -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=
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user