Skip to content

Instantly share code, notes, and snippets.

@stoewer
Created March 4, 2016 13:13
Show Gist options
  • Save stoewer/368fad64b2e299d38d9e to your computer and use it in GitHub Desktop.
Save stoewer/368fad64b2e299d38d9e to your computer and use it in GitHub Desktop.
Fills GCA database with good defaults after migration to the BC16 schema
UPDATE conference SET isactive = FALSE WHERE isactive IS NULL ;
UPDATE conference SET haspresentationprefs = TRUE WHERE haspresentationprefs IS NULL ;
UPDATE conference SET ctime = deadline WHERE ctime IS NULL ;
UPDATE conference SET mtime = deadline WHERE mtime IS NULL ;
UPDATE conference SET conferencegroup = 'BC' WHERE conferencegroup IS NULL ;
UPDATE abstract SET ctime = c.deadline FROM abstract a JOIN conference c ON a.conference_uuid = c.uuid WHERE a.ctime IS NULL ;
UPDATE abstract SET mtime = c.deadline FROM abstract a JOIN conference c ON a.conference_uuid = c.uuid WHERE a.mtime IS NULL ;
UPDATE account SET ctime = (SELECT deadline FROM conference WHERE short = 'BC15') WHERE ctime IS NULL ;
UPDATE account SET mtime = (SELECT deadline FROM conference WHERE short = 'BC15') WHERE mtime IS NULL ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment