Action Items: §
- Social Art Platform
- Deployment of new features
Update Vercel Postgres DB Schema
Update Vercel environment variables
Update aws CORS policy to accept Vercel route
change onLoadingComplete to OnLoad in the UploadedImageCanvas prod
Notes §
- database migration removed all existing data :|
- lesson learned. next time:
- take regular db snapshots and backups
- or manually pg_dump before migration:
pg_dump "postgresql://<username>:<password>@example.us-east-1.postgres.vercel-storage.com:5432/verceldb" -F c -b -v -f <backup_file_name>.dump
Prisma CLI Version : 5.21.1
❯ npx prisma migrate dev --name upload_images_feature
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "verceldb", schema "public" at "ep-lively-cherry-a4aye181.us-east-1.aws.neon.tech"
- Drift detected: Your database schema is not in sync with your migration history.
The following is a summary of the differences between the expected database schema given your migrations files, and the actual schema of the database.
It should be understood as the set of changes to get from the expected schema to the actual schema.
[+] Added tables
- Artwork
- Favourite
- User
[*] Changed the `Artwork` table
[+] Added unique index on columns (s3Key)
[+] Added foreign key on columns (authorId)
[*] Changed the `Favourite` table
[+] Added unique index on columns (artworkId, userId)
[+] Added foreign key on columns (artworkId)
[+] Added foreign key on columns (userId)
[*] Changed the `User` table
[+] Added index on columns (clerk_id)
[+] Added unique index on columns (clerk_id)
[+] Added unique index on columns (email)
[+] Added index on columns (username)
[+] Added unique index on columns (username)
- The following migration(s) are applied to the database but missing from the local migrations directory: 20241022235223_init, 20241023002402_change_config_to_state, 20241024015249_clerk_id_as_relation, 20241024060514_name_optional, 20241030001907_allow_uploads
✔ We need to reset the "public" schema at "ep-lively-cherry-a4aye181.us-east-1.aws.neon.tech"
Do you want to continue? All data will be lost. … yes
Applying migration `20241030140710_upload_images_feature`
The following migration(s) have been created and applied from new schema changes:
migrations/
└─ 20241030140710_upload_images_feature/
└─ migration.sql
Your database is now in sync with your schema.
✔ Generated Prisma Client (v5.21.1) to ./node_modules/@prisma/client in 57ms
EOD Status Report §