@@ -14,39 +14,33 @@ select 1 from information_schema.tables where table_name like 'dss%')
14
14
as db_has_dss_tab
15
15
\gset
16
16
select exists(
17
- select 1 from information_schema .columns where column_name = ' external_identity_cd ' and table_name = ' dss_user_identity ' and table_schema = :' dflt_schema' )
18
- as db_has_s16_col
17
+ select 1 from information_schema .routines where routine_definition like ' %regexp_replace(regexp_replace(UPPER(% ' and routine_name = ' dss_process_biz_lic_table_update ' and routine_schema = :' dflt_schema' )
18
+ as db_has_s18_chg
19
19
\gset
20
20
select exists(
21
21
select 1 from information_schema .columns where column_name= ' business_licence_format_txt' and table_name= ' dss_organization' and table_schema= :' dflt_schema' )
22
22
as db_has_s17_col
23
23
\gset
24
- \if :db_has_s17_col
25
- \echo ' Sprint 17 migration appears complete - Exiting without changes'
26
- \elif :db_has_s16_col
27
- \echo ' Sprint 16 migration appears complete - Beginning upgrade to Sprint 17'
28
- \echo ' Calling STR_DSS_Incremental_DB_DDL_Sprint_17_pre_DML.sql'
29
- \ir ' ../ddl/STR_DSS_Incremental_DB_DDL_Sprint_17_pre_DML.sql'
30
- \echo ' Adding/replacing views'
31
- \ir ' ../ddl/STR_DSS_Views_Sprint_17.sql'
32
- \echo ' Calling STR_DSS_Data_Seeding_Sprint_17.sql'
33
- \ir ' ../seeding/STR_DSS_Data_Seeding_Sprint_17.sql'
34
- \echo ' Calling STR_DSS_Data_Seeding_LGs_Sprint_17.sql'
35
- \ir ' ../seeding/STR_DSS_Data_Seeding_LGs_Sprint_17.sql'
36
- \echo ' Calling STR_DSS_Data_Seeding_Geometry_Sprint_17.sql'
37
- \ir ' ../seeding/STR_DSS_Data_Seeding_Geometry_Sprint_17.sql'
38
- \echo ' Calling STR_DSS_Incremental_DB_DDL_Sprint_17_post_DML.sql'
39
- \ir ' ../ddl/STR_DSS_Incremental_DB_DDL_Sprint_17_post_DML.sql'
24
+ \if :db_has_s18_chg
25
+ \echo ' Sprint 18 migration appears complete - Exiting without changes'
26
+ \elif :db_has_s17_col
27
+ \echo ' Sprint 17 migration appears complete - Beginning upgrade to Sprint 18'
28
+ \echo ' Calling STR_DSS_Incremental_DB_DDL_Sprint_18.sql'
29
+ \ir ' ../ddl/STR_DSS_Incremental_DB_DDL_Sprint_18.sql'
30
+ \echo ' Calling STR_DSS_Routines_Sprint_18.sql'
31
+ \ir ' ../ddl/STR_DSS_Routines_Sprint_18.sql'
32
+ \echo ' Calling STR_DSS_Data_Seeding_Sprint_18.sql'
33
+ \ir ' ../seeding/STR_DSS_Data_Seeding_Sprint_18.sql'
34
+ \echo ' Calling Correct_Rental_Listings_Sprint_18.sql'
35
+ \ir ' ../utility/Correct_Rental_Listings_Sprint_18.sql'
40
36
\elif :db_has_dss_tab
41
37
\echo ' Database migration state is unknown - Try an earlier release - Exiting without changes'
42
38
\else
43
- \echo ' Database has no DSS tables - Beginning complete build to Sprint 17'
44
- \echo ' Calling STR_DSS_Physical_DB_DDL_Sprint_17.sql'
45
- \ir ' ../ddl/STR_DSS_Physical_DB_DDL_Sprint_17.sql'
46
- \echo ' Adding/replacing views'
47
- \ir ' ../ddl/STR_DSS_Views_Sprint_17.sql'
48
- \echo ' Calling STR_DSS_Data_Seeding_Sprint_17.sql'
49
- \ir ' ../seeding/STR_DSS_Data_Seeding_Sprint_17.sql'
39
+ \echo ' Database has no DSS tables - Beginning complete build to Sprint 18'
40
+ \echo ' Calling STR_DSS_Physical_DB_DDL_Sprint_18.sql'
41
+ \ir ' ../ddl/STR_DSS_Physical_DB_DDL_Sprint_18.sql'
42
+ \echo ' Calling STR_DSS_Data_Seeding_Sprint_18.sql'
43
+ \ir ' ../seeding/STR_DSS_Data_Seeding_Sprint_18.sql'
50
44
\echo ' Calling STR_DSS_Data_Seeding_LGs_Sprint_17.sql'
51
45
\ir ' ../seeding/STR_DSS_Data_Seeding_LGs_Sprint_17.sql'
52
46
\echo ' Calling STR_DSS_Data_Seeding_Geometry_Sprint_17.sql'
0 commit comments