This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| 066: convert barber_profiles.availability and clientele_size to TEXT[] | |
| so barbers can pick multiple values. Drops the single-value CHECK | |
| constraints and migrates existing rows by wrapping the current value | |
| in an array. Also adds "walk_in_ready" as a new clientele tag. | |
| Notes: | |
| - existing availability values: full_time, part_time, weekdays_only, | |
| weekends_only, flexible | |
| - existing clientele_size values: building, established, large_following |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| 065: extend barber_profiles.availability CHECK constraint to include | |
| weekdays_only. The original constraint from migration 059 only allowed | |
| full_time / part_time / weekends_only / flexible. | |
| */ | |
| BEGIN; | |
| ALTER TABLE barber_profiles | |
| DROP CONSTRAINT IF EXISTS barber_profiles_availability_check; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| 062: scope votes + comments to a specific portfolio image | |
| Previously they were keyed by barber_profile_id, which meant a single | |
| vote/comment applied to every post from that barber. Add a | |
| portfolio_image_id FK, backfill best-effort to the barber's first image, | |
| then enforce per-image uniqueness on votes. | |
| */ | |
| BEGIN; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| 064: extend notifications.type CHECK constraint to cover the | |
| network/inquire flows. Earlier migrations capped the allowed | |
| values, so inserting "invite_to_apply" (and the related | |
| network types) currently fails with notifications_type_check. | |
| */ | |
| BEGIN; | |
| ALTER TABLE notifications DROP CONSTRAINT IF EXISTS notifications_type_check; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| 063: replace facebook_url with x_url on barber_profiles | |
| Adds a nullable x_url column. We keep facebook_url in place for now | |
| (no destructive drop) so any existing rows survive — the app stops | |
| reading/writing it. | |
| */ | |
| BEGIN; | |
| ALTER TABLE barber_profiles |