feat: Russian market channels — Яндекс, Островок, Суточно, Авито, Bronevik, 101hotels + role-based sidebar

This commit is contained in:
2026-03-26 00:56:53 +03:00
parent 18358b64b3
commit 566c6a5e41
3 changed files with 60 additions and 18 deletions

View File

@@ -0,0 +1,31 @@
-- Replace old channel constraint with Russian market channels
ALTER TABLE channels DROP CONSTRAINT IF EXISTS channels_name_check;
ALTER TABLE channels ADD CONSTRAINT channels_name_check
CHECK (name IN (
'booking_com',
'yandex_travel',
'ostrovok',
'sutochno',
'avito',
'bronevik',
'hotels101',
'onetwotrip'
));
-- Remove old non-RU channels from all hotels
DELETE FROM channels WHERE name IN ('airbnb', 'expedia', 'vrbo');
-- Add new Russian channels for all existing hotels (skip if already exists)
INSERT INTO channels (hotel_id, name)
SELECT h.id, c.name
FROM hotels h
CROSS JOIN (VALUES
('yandex_travel'),
('ostrovok'),
('sutochno'),
('avito'),
('bronevik'),
('hotels101'),
('onetwotrip')
) AS c(name)
ON CONFLICT (hotel_id, name) DO NOTHING;