From 610dd164386b5eae6886667edd4482b5ce192d50 Mon Sep 17 00:00:00 2001 From: muken Date: Sun, 28 Jun 2026 14:37:14 +0000 Subject: [PATCH] Add README with migration script usage instructions --- README_MIGRATION.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 README_MIGRATION.md diff --git a/README_MIGRATION.md b/README_MIGRATION.md new file mode 100644 index 0000000..0ce6d2d --- /dev/null +++ b/README_MIGRATION.md @@ -0,0 +1,43 @@ +# Database Migration Script + +This script addresses the issue where `init-db.sh` skipped adding new columns to existing tables. + +## Usage + +1. Make sure you have access to the PostgreSQL database +2. Run the migration script: + ```bash + ./migration-fix-columns.sh + ``` + +## What it does + +The script adds missing columns to existing tables in the database. It uses `ALTER TABLE ... ADD COLUMN IF NOT EXISTS` statements to ensure that: +1. If a column already exists, it won't cause an error +2. If a column doesn't exist, it will be added + +## Affected Tables + +- rooms +- places +- menu_items +- users +- reservations +- social_events +- reviews +- social_event_reservations +- calendar_events +- room_comments +- offers +- coupons +- benefits +- slides +- config + +## Columns Added + +- photos (TEXT[]) +- featured_photo (VARCHAR(500)) +- first_name (VARCHAR(255)) +- last_name (VARCHAR(255)) +- comments_disabled (BOOLEAN DEFAULT false) \ No newline at end of file