feat: adjust sql/services.sql

This commit is contained in:
dancingCycle 2023-11-22 15:41:56 +01:00
parent da2e41abb2
commit f46208fff9
1 changed files with 5 additions and 2 deletions

View File

@ -8,7 +8,10 @@ DROP TABLE IF EXISTS :schema.services;
CREATE TABLE IF NOT EXISTS :schema.services
(
feed_index int NOT NULL REFERENCES feed_info (feed_index) ON DELETE CASCADE,
service_id text NOT NULL,
dates text,
CONSTRAINT services_service_id_fkey FOREIGN KEY (feed_index, service_id) REFERENCES :schema.calendar(feed_index, service_id)
dates text NOT NULL,
CONSTRAINT services_service_id_fkey FOREIGN KEY (feed_index, service_id) REFERENCES :schema.calendar(feed_index, service_id),
CONSTRAINT services_pkey PRIMARY KEY (feed_index, service_id)
);