SQL update required after merging pull request #3931 (authenticateduser table update)

21 views
Skip to first unread message

Brian Silverstein

unread,
Jun 27, 2017, 2:04:44 PM6/27/17
to Dataverse Dev
Today we merged https://github.com/IQSS/dataverse/pull/3931 which includes a SQL update* that is required for all developers to run to keep their dev environments working after pulling the latest from develop. *(The script for this update can also be found here
https://github.com/IQSS/dataverse/blob/5aaeb2e1e2866cb0ce77f70717dcfc9790fc362f/scripts/database/upgrades/upgrade_v4.7_to_v4.7.1.sql )


ALTER TABLE authenticateduser ADD COLUMN createdtime TIMESTAMP NOT NULL DEFAULT '01-01-2000 00:00:00';
ALTER TABLE authenticateduser ADD COLUMN lastlogintime TIMESTAMP DEFAULT NULL;
ALTER TABLE authenticateduser ADD COLUMN lastapiusetime TIMESTAMP DEFAULT NULL;
ALTER TABLE authenticateduser DROP COLUMN modificationtime;


These queries can be executed manually or by running the four lines above via PostgreSQL. The default for "createdtime" doesn't have to be that exact timestamp, but makes it easier to identify authenticateduser rows that existed prior to the update (irrelevant if you plan to drop your db!) If you don't run these queries before executing a new build, you'll probably run into an error along the lines of:

org.postgresql.util.PSQLException: ERROR: column "createdtime" does not exist

Feel free to reach out via email or at chat.dataverse.org if any issues arise! Have a great day.

Best,

Brian Silverstein
Reply all
Reply to author
Forward
0 new messages