From 6f9deed908f2a0f2b6f48100805ff3f0c6ac8e7f Mon Sep 17 00:00:00 2001 From: sy Date: Wed, 9 Aug 2023 18:19:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-=E7=A6=8F?= =?UTF-8?q?=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E4=BF=AE=E6=94=B9=E7=A4=BE?= =?UTF-8?q?=E4=BF=9D=E3=80=81=E5=85=AC=E7=A7=AF=E9=87=91=E3=80=81=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E7=A6=8F=E5=88=A9=E8=A1=A8=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/sqlupgrade/DM/sql202308090203.sql | 48 +++++++++++++++++++ resource/sqlupgrade/GS/sql202308090203.sql | 48 +++++++++++++++++++ resource/sqlupgrade/JC/sql202308090203.sql | 48 +++++++++++++++++++ resource/sqlupgrade/Mysql/sql202308090203.sql | 8 ++++ .../sqlupgrade/Oracle/sql202308090203.sql | 36 ++++++++++++++ resource/sqlupgrade/PG/sql202308090203.sql | 8 ++++ .../sqlupgrade/SQLServer/sql202308090203.sql | 13 +++++ resource/sqlupgrade/ST/sql202308090203.sql | 48 +++++++++++++++++++ 8 files changed, 257 insertions(+) create mode 100644 resource/sqlupgrade/DM/sql202308090203.sql create mode 100644 resource/sqlupgrade/GS/sql202308090203.sql create mode 100644 resource/sqlupgrade/JC/sql202308090203.sql create mode 100644 resource/sqlupgrade/Mysql/sql202308090203.sql create mode 100644 resource/sqlupgrade/Oracle/sql202308090203.sql create mode 100644 resource/sqlupgrade/PG/sql202308090203.sql create mode 100644 resource/sqlupgrade/SQLServer/sql202308090203.sql create mode 100644 resource/sqlupgrade/ST/sql202308090203.sql diff --git a/resource/sqlupgrade/DM/sql202308090203.sql b/resource/sqlupgrade/DM/sql202308090203.sql new file mode 100644 index 000000000..ee8394990 --- /dev/null +++ b/resource/sqlupgrade/DM/sql202308090203.sql @@ -0,0 +1,48 @@ +ALTER Table hrsa_social_archives Add employee_id2 NUMBER(38,0); +/ + +update hrsa_social_archives a SET a.employee_id2=a.employee_id; +/ + +alter table hrsa_social_archives drop column employee_id; +/ + +alter table hrsa_social_archives rename column employee_id2 to employee_id; +/ + +alter table hrsa_social_archives MODIFY (employee_id not null); +/ + +ALTER Table hrsa_fund_archives Add employee_id2 NUMBER(38,0); +/ + +update hrsa_fund_archives a SET a.employee_id2=a.employee_id; +/ + +alter table hrsa_fund_archives drop column employee_id; +/ + +alter table hrsa_fund_archives rename column employee_id2 to employee_id; +/ + +alter table hrsa_fund_archives MODIFY (employee_id not null); +/ + +ALTER Table hrsa_other_archives Add employee_id2 NUMBER(38,0); +/ + +update hrsa_other_archives a SET a.employee_id2=a.employee_id; +/ + +alter table hrsa_other_archives drop column employee_id; +/ + +alter table hrsa_other_archives rename column employee_id2 to employee_id; +/ + +alter table hrsa_other_archives MODIFY (employee_id not null); +/ + +ALTER TABLE hrsa_insurance_base_info ADD employee_type number; +/ + diff --git a/resource/sqlupgrade/GS/sql202308090203.sql b/resource/sqlupgrade/GS/sql202308090203.sql new file mode 100644 index 000000000..ee8394990 --- /dev/null +++ b/resource/sqlupgrade/GS/sql202308090203.sql @@ -0,0 +1,48 @@ +ALTER Table hrsa_social_archives Add employee_id2 NUMBER(38,0); +/ + +update hrsa_social_archives a SET a.employee_id2=a.employee_id; +/ + +alter table hrsa_social_archives drop column employee_id; +/ + +alter table hrsa_social_archives rename column employee_id2 to employee_id; +/ + +alter table hrsa_social_archives MODIFY (employee_id not null); +/ + +ALTER Table hrsa_fund_archives Add employee_id2 NUMBER(38,0); +/ + +update hrsa_fund_archives a SET a.employee_id2=a.employee_id; +/ + +alter table hrsa_fund_archives drop column employee_id; +/ + +alter table hrsa_fund_archives rename column employee_id2 to employee_id; +/ + +alter table hrsa_fund_archives MODIFY (employee_id not null); +/ + +ALTER Table hrsa_other_archives Add employee_id2 NUMBER(38,0); +/ + +update hrsa_other_archives a SET a.employee_id2=a.employee_id; +/ + +alter table hrsa_other_archives drop column employee_id; +/ + +alter table hrsa_other_archives rename column employee_id2 to employee_id; +/ + +alter table hrsa_other_archives MODIFY (employee_id not null); +/ + +ALTER TABLE hrsa_insurance_base_info ADD employee_type number; +/ + diff --git a/resource/sqlupgrade/JC/sql202308090203.sql b/resource/sqlupgrade/JC/sql202308090203.sql new file mode 100644 index 000000000..ee8394990 --- /dev/null +++ b/resource/sqlupgrade/JC/sql202308090203.sql @@ -0,0 +1,48 @@ +ALTER Table hrsa_social_archives Add employee_id2 NUMBER(38,0); +/ + +update hrsa_social_archives a SET a.employee_id2=a.employee_id; +/ + +alter table hrsa_social_archives drop column employee_id; +/ + +alter table hrsa_social_archives rename column employee_id2 to employee_id; +/ + +alter table hrsa_social_archives MODIFY (employee_id not null); +/ + +ALTER Table hrsa_fund_archives Add employee_id2 NUMBER(38,0); +/ + +update hrsa_fund_archives a SET a.employee_id2=a.employee_id; +/ + +alter table hrsa_fund_archives drop column employee_id; +/ + +alter table hrsa_fund_archives rename column employee_id2 to employee_id; +/ + +alter table hrsa_fund_archives MODIFY (employee_id not null); +/ + +ALTER Table hrsa_other_archives Add employee_id2 NUMBER(38,0); +/ + +update hrsa_other_archives a SET a.employee_id2=a.employee_id; +/ + +alter table hrsa_other_archives drop column employee_id; +/ + +alter table hrsa_other_archives rename column employee_id2 to employee_id; +/ + +alter table hrsa_other_archives MODIFY (employee_id not null); +/ + +ALTER TABLE hrsa_insurance_base_info ADD employee_type number; +/ + diff --git a/resource/sqlupgrade/Mysql/sql202308090203.sql b/resource/sqlupgrade/Mysql/sql202308090203.sql new file mode 100644 index 000000000..34eed003a --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202308090203.sql @@ -0,0 +1,8 @@ +ALTER TABLE hrsa_social_archives +MODIFY COLUMN employee_id bigint; +ALTER TABLE hrsa_fund_archives +MODIFY COLUMN employee_id bigint; +ALTER TABLE hrsa_other_archives +MODIFY COLUMN employee_id bigint; + +ALTER TABLE hrsa_insurance_base_info ADD employee_type int NULL; \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202308090203.sql b/resource/sqlupgrade/Oracle/sql202308090203.sql new file mode 100644 index 000000000..f901fc9a3 --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202308090203.sql @@ -0,0 +1,36 @@ +ALTER Table hrsa_social_archives Add employee_id2 NUMBER(38,0) +/ +update hrsa_social_archives a SET a.employee_id2=a.employee_id +/ +alter table hrsa_social_archives drop column employee_id +/ +alter table hrsa_social_archives rename column employee_id2 to employee_id +/ +alter table hrsa_social_archives MODIFY (employee_id not null) +/ + +ALTER Table hrsa_fund_archives Add employee_id2 NUMBER(38,0) +/ +update hrsa_fund_archives a SET a.employee_id2=a.employee_id +/ +alter table hrsa_fund_archives drop column employee_id +/ +alter table hrsa_fund_archives rename column employee_id2 to employee_id +/ +alter table hrsa_fund_archives MODIFY (employee_id not null) +/ + +ALTER Table hrsa_other_archives Add employee_id2 NUMBER(38,0) +/ +update hrsa_other_archives a SET a.employee_id2=a.employee_id +/ +alter table hrsa_other_archives drop column employee_id +/ +alter table hrsa_other_archives rename column employee_id2 to employee_id +/ +alter table hrsa_other_archives MODIFY (employee_id not null) +/ + + +ALTER TABLE hrsa_insurance_base_info ADD employee_type number +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202308090203.sql b/resource/sqlupgrade/PG/sql202308090203.sql new file mode 100644 index 000000000..d14a9e4c9 --- /dev/null +++ b/resource/sqlupgrade/PG/sql202308090203.sql @@ -0,0 +1,8 @@ +ALTER TABLE hrsa_social_archives +ALTER employee_id TYPE bigint; +ALTER TABLE hrsa_fund_archives +ALTER employee_id TYPE bigint; +ALTER TABLE hrsa_other_archives +ALTER employee_id TYPE bigint; + +ALTER TABLE hrsa_insurance_base_info ADD employee_type int NULL; \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202308090203.sql b/resource/sqlupgrade/SQLServer/sql202308090203.sql new file mode 100644 index 000000000..8c03dcf48 --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202308090203.sql @@ -0,0 +1,13 @@ +ALTER TABLE hrsa_social_archives +ALTER COLUMN employee_id bigint +GO +ALTER TABLE hrsa_fund_archives +ALTER COLUMN employee_id bigint +GO +ALTER TABLE hrsa_other_archives +ALTER COLUMN employee_id bigint +GO + + +ALTER TABLE hrsa_insurance_base_info ADD employee_type int NULL +GO \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202308090203.sql b/resource/sqlupgrade/ST/sql202308090203.sql new file mode 100644 index 000000000..ee8394990 --- /dev/null +++ b/resource/sqlupgrade/ST/sql202308090203.sql @@ -0,0 +1,48 @@ +ALTER Table hrsa_social_archives Add employee_id2 NUMBER(38,0); +/ + +update hrsa_social_archives a SET a.employee_id2=a.employee_id; +/ + +alter table hrsa_social_archives drop column employee_id; +/ + +alter table hrsa_social_archives rename column employee_id2 to employee_id; +/ + +alter table hrsa_social_archives MODIFY (employee_id not null); +/ + +ALTER Table hrsa_fund_archives Add employee_id2 NUMBER(38,0); +/ + +update hrsa_fund_archives a SET a.employee_id2=a.employee_id; +/ + +alter table hrsa_fund_archives drop column employee_id; +/ + +alter table hrsa_fund_archives rename column employee_id2 to employee_id; +/ + +alter table hrsa_fund_archives MODIFY (employee_id not null); +/ + +ALTER Table hrsa_other_archives Add employee_id2 NUMBER(38,0); +/ + +update hrsa_other_archives a SET a.employee_id2=a.employee_id; +/ + +alter table hrsa_other_archives drop column employee_id; +/ + +alter table hrsa_other_archives rename column employee_id2 to employee_id; +/ + +alter table hrsa_other_archives MODIFY (employee_id not null); +/ + +ALTER TABLE hrsa_insurance_base_info ADD employee_type number; +/ +