Compare commits

...

2 Commits

Author SHA1 Message Date
298ebc5fb9 fix: change PushSubscription endpoint to VARCHAR for MySQL compatibility
MySQL cannot create unique constraints on TEXT fields without length.
Changed endpoint from @db.Text to @db.VarChar(512) to fix Prisma generation error.
2025-12-07 01:50:28 +00:00
374bfb3a62 .env 2025-12-07 01:48:02 +00:00
3 changed files with 21 additions and 3 deletions

18
.env Normal file
View File

@@ -0,0 +1,18 @@
DATABASE_URL="mysql://lists_app:ListsApp@2025!@192.168.4.20:3306/ultimate_lists"
# NextAuth Configuration
AUTH_URL=http://localhost:3500
NEXTAUTH_URL=http://localhost:3500
NEXTAUTH_SECRET=your-secret-key-here-please-change-in-production
AUTH_SECRET=your-secret-key-here-please-change-in-production
AUTH_TRUST_HOST=true
# Database connection check (for docker-compose health check)
DB_HOST=192.168.4.20
DB_PORT=3306
DB_USER=lists_app
DB_PASSWORD=ListsApp@2025!
VAPID_PUBLIC_KEY=BI05JNvKs4CSiG8c4q6Lt_FjMmuVy-0LWiiuvYbjnu10TpysQdVpY2LpY0gotdhlXJJLn6ub_cf4EX69gZDs83o
VAPID_PRIVATE_KEY=EUsjxWebCbrVphsDDFuoRqUE5-eX8nhpuLvYKVVeGnQ
VAPID_SUBJECT=mailto:psbailey31@gmail.com

2
.gitignore vendored
View File

@@ -23,7 +23,7 @@ yarn-debug.log*
yarn-error.log*
# Local env files
.env
# .env
.env*.local
# Vercel

View File

@@ -26,14 +26,14 @@ model User {
model PushSubscription {
id String @id @default(cuid())
userId String
endpoint String @db.Text
endpoint String @db.VarChar(512)
p256dh String @db.Text
auth String @db.Text
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@unique([userId, endpoint(255)])
@@unique([userId, endpoint])
@@index([userId])
}