This folder contains database migration scripts for schema updates.
Migrations need to be run manually on your PostgreSQL database. You can run them using:
psql -h <host> -U <user> -d <database> -f migrations/001_add_event_images.sqlOr using a PostgreSQL client of your choice.
- Adds
image_datacolumn toeventstable (stores base64 encoded image) - Adds
image_mime_typecolumn toeventstable (stores MIME type like image/png) - Adds
logo_datacolumn toeventstable (stores base64 encoded logo) - Adds
logo_mime_typecolumn toeventstable (stores MIME type) - Removes old
image_urlandlogo_urlcolumns if they exist - All fields are optional (nullable)
Important: Images are now stored in the database as base64 data rather than external URLs
- The API's
_init.jsautomatically creates tables with the latest schema for new deployments - These migration files are for existing databases that were created with earlier schemas
- Always backup your database before running migrations
- Migrations use
IF NOT EXISTSwhere possible to be safe to run multiple times