github.com/pf-qiu/concourse/v6@v6.7.3-0.20201207032516-1f455d73275f/atc/db/migration/migrations/1565800062_create_checks.up.sql (about) 1 BEGIN; 2 3 CREATE TABLE checks ( 4 id bigserial PRIMARY KEY, 5 resource_config_scope_id integer REFERENCES resource_config_scopes(id) ON DELETE CASCADE, 6 schema text NOT NULL, 7 status text NOT NULL, 8 manually_triggered boolean DEFAULT false, 9 plan text, 10 nonce text, 11 check_error text, 12 metadata jsonb, 13 create_time timestamp WITH TIME ZONE DEFAULT now() NOT NULL, 14 start_time timestamp WITH TIME ZONE, 15 end_time timestamp WITH TIME ZONE 16 ); 17 18 CREATE UNIQUE INDEX resource_config_scope_id_key ON checks (resource_config_scope_id) WHERE status = 'started' AND manually_triggered = false; 19 20 COMMIT;