Alter schedules and tasks tables. UNIQUE constraint not needed for PK, but NOT NULL is needed
@@ -855,16 +855,16 @@ ALTER TABLE foglamp.scheduled_processes OWNER to foglamp;
-- List of schedules
CREATE TABLE foglamp.schedules (
- id uuid UNIQUE, -- Unique uuid, PK
+ id uuid NOT NULL, -- PK
process_name character varying(20) NOT NULL, -- FK process name
schedule_name character varying(20) NOT NULL, -- schedule name
schedule_type smallint NOT NULL, -- 1 = timed, 2 = interval, 3 = manual,
-- 4 = startup
- schedule_interval interval, -- Schedule interval
- schedule_time time, -- Schedule time
- schedule_day smallint, -- ISO day - 1 = Monday, 7 = Sunday
- exclusive boolean not null default false, -- true means multiple tasks for the schedule
- -- can not run overlapping
+ schedule_interval interval, -- Repeat interval
+ schedule_time time, -- Start time
+ schedule_day smallint, -- ISO day 1 = Monday, 7 = Sunday
+ exclusive boolean not null default false, -- true: multiple tasks for the schedule
+ -- can not run at the same time
CONSTRAINT schedules_pkey PRIMARY KEY (id)
USING INDEX TABLESPACE foglamp,
CONSTRAINT schedules_fk1 FOREIGN KEY (process_name)
@@ -878,7 +878,7 @@ ALTER TABLE foglamp.schedules OWNER to foglamp;
-- List of tasks
CREATE TABLE foglamp.tasks (
- id uuid UNIQUE, -- Unique uuid, PK
+ id uuid NOT NULL, -- PK
process_name character varying(20) NOT NULL, -- Name of the task
state smallint NOT NULL, -- State of the task: 1-Running, 2-Complete, 3-Cancelled
-- or is this only for tasks that started?
