ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
-- bib/auth
- record_type vandelay.bib_queue_queue_type NOT NULL DEFAULT 'bib',
+ record_type TEXT NOT NULL DEFAULT 'bib',
-- Queue defines the source of the data, it does not necessarily
-- mean that an action is being performed against an entire queue.
CHECK (state IN ('active','error','complete')),
CONSTRAINT vand_tracker_valid_action_type
- CHECK (action_type IN ('upload', 'enqueue', 'import'))
+ CHECK (action_type IN ('upload', 'enqueue', 'import')),
+
+ CONSTRAINT vand_tracker_valid_record_type
+ CHECK (record_type IN ('bib', 'authority'))
);
COMMIT;
--- /dev/null
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+
+ALTER TABLE vandelay.session_tracker
+ ALTER COLUMN record_type TYPE TEXT;
+
+ALTER TABLE vandelay.session_tracker
+ ADD CONSTRAINT vand_tracker_valid_record_type
+ CHECK (record_type IN ('bib', 'authority'));
+
+END;
+$$ LANGUAGE plpgsql;
+
+COMMIT;
\ No newline at end of file