From: Ray Lee Date: Fri, 20 Sep 2019 01:59:09 +0000 (-0700) Subject: DRYD-727: Add SQL to upgrade users table to 5.3. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=321c92ce25146ae818da74e5187be425d3b8b8d3;p=tmp%2Fjakarta-migration.git DRYD-727: Add SQL to upgrade users table to 5.3. --- diff --git a/services/authentication/pstore/src/main/resources/db/postgresql/authentication.sql b/services/authentication/pstore/src/main/resources/db/postgresql/authentication.sql index af0220fed..dee12cbc2 100644 --- a/services/authentication/pstore/src/main/resources/db/postgresql/authentication.sql +++ b/services/authentication/pstore/src/main/resources/db/postgresql/authentication.sql @@ -1,12 +1,16 @@ CREATE TABLE IF NOT EXISTS users ( username VARCHAR(128) NOT NULL PRIMARY KEY, created_at TIMESTAMP NOT NULL, - lastLogin TIMESTAMP, + lastlogin TIMESTAMP, passwd VARCHAR(128) NOT NULL, salt VARCHAR(128), updated_at TIMESTAMP ); +-- Upgrade older users tables to 5.3 +ALTER TABLE users ADD COLUMN IF NOT EXISTS lastlogin TIMESTAMP; +ALTER TABLE users ADD COLUMN IF NOT EXISTS salt VARCHAR(128); + CREATE TABLE IF NOT EXISTS tokens ( id VARCHAR(128) NOT NULL PRIMARY KEY, account_csid VARCHAR(128) NOT NULL,