Initial commit MKD fixes
This commit is contained in:
8
backend/migrations/add_pr_events_location_place.sql
Executable file
8
backend/migrations/add_pr_events_location_place.sql
Executable file
@@ -0,0 +1,8 @@
|
||||
-- Место проведения для мероприятий "для жителей": участок или дома отдельно
|
||||
ALTER TABLE pr_events ADD COLUMN IF NOT EXISTS location_place_type VARCHAR(20) CHECK (location_place_type IN ('district', 'buildings'));
|
||||
ALTER TABLE pr_events ADD COLUMN IF NOT EXISTS location_district_id VARCHAR(50) REFERENCES districts(id) ON DELETE SET NULL;
|
||||
ALTER TABLE pr_events ADD COLUMN IF NOT EXISTS location_building_ids JSONB DEFAULT '[]';
|
||||
|
||||
COMMENT ON COLUMN pr_events.location_place_type IS 'Для жителей: district = участок, buildings = дома отдельно';
|
||||
COMMENT ON COLUMN pr_events.location_district_id IS 'ID участка, если location_place_type = district';
|
||||
COMMENT ON COLUMN pr_events.location_building_ids IS 'Массив ID домов, если location_place_type = buildings';
|
||||
Reference in New Issue
Block a user