-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #714 from larsenle/main
DSS-945 DB: Create new column in identity table for BCSC
- Loading branch information
Showing
13 changed files
with
10,063 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/* Sprint 16 Incremental DB Changes to STR DSS */ | ||
|
||
ALTER TABLE dss_user_identity ADD external_identity_cd varchar(100) ; | ||
|
||
COMMENT ON COLUMN dss_user_identity.external_identity_cd IS 'A non-guid unique identifier assigned by the identity provider'; |
1,306 changes: 1,306 additions & 0 deletions
1,306
database/ddl/STR_DSS_Physical_DB_DDL_Sprint_16.sql
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
1,553 changes: 1,553 additions & 0 deletions
1,553
database/model/STR_DSS_Physical_DB_Design_Sprint_16.dbs
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
1,624 changes: 1,624 additions & 0 deletions
1,624
database/seeding/STR_DSS_Data_Seeding_Geometry_Sprint_16.sql
Large diffs are not rendered by default.
Oops, something went wrong.
405 changes: 405 additions & 0 deletions
405
database/seeding/STR_DSS_Data_Seeding_LGs_Sprint_16.sql
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* Sprint 16 Master Database Migration Script -- must be run from psql using the following command: \i '<folder>/<script>' (must use / rather than \) */ | ||
\conninfo | ||
\encoding UTF8 | ||
\set VERBOSITY terse | ||
\set ECHO none | ||
\set QUIET on | ||
\set AUTOCOMMIT off | ||
START TRANSACTION; | ||
SET search_path TO dss,public; /*schema name dss ignored if it does not exist*/ | ||
SELECT current_schema() as dflt_schema | ||
\gset | ||
select exists( | ||
select 1 from information_schema.tables where table_name like 'dss%') | ||
as db_has_dss_tab | ||
\gset | ||
select exists( | ||
select 1 from information_schema.columns where column_name='external_identity_cd' and table_name='dss_user_identity' and table_schema=:'dflt_schema') | ||
as db_has_s16_col | ||
\gset | ||
select exists( | ||
select 1 from information_schema.columns where column_name='platform_type' and table_name='dss_organization' and table_schema=:'dflt_schema') | ||
as db_has_s15_col | ||
\gset | ||
\if :db_has_s16_col | ||
\echo 'Sprint 16 migration appears complete - Exiting without changes' | ||
\elif :db_has_s15_col | ||
\echo 'Sprint 15 migration appears complete - Beginning upgrade to Sprint 16' | ||
\echo 'Calling STR_DSS_Incremental_DB_DDL_Sprint_16.sql' | ||
\ir '../ddl/STR_DSS_Incremental_DB_DDL_Sprint_16.sql' | ||
\echo 'Adding/replacing views' | ||
\ir '../ddl/STR_DSS_Views_Sprint_16.sql' | ||
\echo 'Calling STR_DSS_Data_Seeding_LGs_Sprint_16.sql' | ||
\ir '../seeding/STR_DSS_Data_Seeding_LGs_Sprint_16.sql' | ||
\elif :db_has_dss_tab | ||
\echo 'Database migration state is unknown - Exiting without changes' | ||
\else | ||
\echo 'Database has no DSS tables - Beginning complete build to Sprint 16' | ||
\echo 'Calling STR_DSS_Physical_DB_DDL_Sprint_16.sql' | ||
\ir '../ddl/STR_DSS_Physical_DB_DDL_Sprint_16.sql' | ||
\echo 'Calling STR_DSS_Data_Seeding_Sprint_15.sql' | ||
\ir '../seeding/STR_DSS_Data_Seeding_Sprint_15.sql' | ||
\echo 'Calling STR_DSS_Data_Seeding_LGs_Sprint_16.sql' | ||
\ir '../seeding/STR_DSS_Data_Seeding_LGs_Sprint_16.sql' | ||
\echo 'Calling STR_DSS_Data_Seeding_Geometry_Sprint_16.sql' | ||
\ir '../seeding/STR_DSS_Data_Seeding_Geometry_Sprint_16.sql' | ||
\echo 'Users, platforms, and their contacts must be added in the application' | ||
\endif | ||
\if :ERROR | ||
/*commit cannot succeed because transaction was aborted due to an error*/ | ||
\echo 'Undoing transaction' | ||
ROLLBACK; | ||
\else | ||
\echo 'Committing transaction' | ||
COMMIT; | ||
\endif | ||
\echo done! |