diff --git a/packages/api/scripts/init.sql b/packages/api/scripts/init.sql index 913a0ddff..b33d57841 100644 --- a/packages/api/scripts/init.sql +++ b/packages/api/scripts/init.sql @@ -1055,6 +1055,26 @@ CREATE INDEX FK_connectors_sets ON projects id_connector_set ); +CREATE TABLE projects_pull_frequency +( + id_projects_pull_frequency uuid NOT NULL, + crm bigint NULL, + ats bigint NULL, + hris bigint NULL, + ats bigint NULL, + accounting bigint NULL, + file_storage bigint NULL, + ecommerce bigint NULL, + ticketing bigint NULL, + created_at timestamp with time zone NOT NULL DEFAULT NOW(), + modified_at timestamp with time zone NOT NULL DEFAULT NOW(), + id_project uuid NOT NULL, +CONSTRAINT PK_projects_pull_frequency PRIMARY KEY ( id_projects_pull_frequency ) +CONSTRAINT FK_projects_pull_frequency_project FOREIGN KEY ( id_project ) REFERENCES projects ( id_project ) + +); + + COMMENT ON COLUMN projects.sync_mode IS 'Can be realtime or periodic_pull'; COMMENT ON COLUMN projects.pull_frequency IS 'Frequency in seconds for pulls