mirror of
https://github.com/renee-png/acmcc.git
synced 2026-06-21 09:50:01 +00:00
69f643a51e
Add a "Sync to Public Page" button that creates/updates one rental_calendar amenity per lot (name, size · rate · availability in the description, rate in booking_config, shown on the public page). Idempotent via amenities.source_rv_lot_id; removes synced amenities for deleted lots. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
5 lines
317 B
SQL
5 lines
317 B
SQL
-- Link a synced public amenity back to its RV/Boat lot so re-syncing updates
|
|
-- (rather than duplicates) the per-lot rental_calendar amenity.
|
|
alter table public.amenities add column if not exists source_rv_lot_id uuid;
|
|
create index if not exists idx_amenities_source_rv_lot_id on public.amenities(source_rv_lot_id);
|