File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ DROP TABLE IF EXISTS {SOURCE_NOK_SCHEMA}.hesae_patient CASCADE;
2
2
3
3
4
4
-- PATIENT - Move unacceptable patient from source_hesapc.patient to source_hesapc_nok.patient
5
- CREATE TABLE {SOURCE_NOK_SCHEMA}.hesae_patient (LIKE {SOURCE_SCHEMA}.hesae_patient);
5
+ CREATE TABLE {SOURCE_NOK_SCHEMA}.hesae_patient (LIKE {SOURCE_SCHEMA}.hesae_patient) TABLESPACE pg_default ;
6
6
7
7
WITH cte1 as (
8
8
SELECT patid FROM {SOURCE_SCHEMA}.hesae_patient
@@ -15,7 +15,7 @@ SELECT t1.*
15
15
FROM {SOURCE_SCHEMA}.hesae_patient as t1
16
16
INNER JOIN cte1 on cte1 .patid = t1 .patid ;
17
17
18
- alter table {SOURCE_NOK_SCHEMA}.hesae_patient add constraint pk_patient_nok primary key (patid);
18
+ alter table {SOURCE_NOK_SCHEMA}.hesae_patient add constraint pk_patient_nok primary key (patid) USING INDEX TABLESPACE pg_default ;
19
19
20
20
DELETE FROM {SOURCE_SCHEMA}.hesae_patient as t1
21
21
USING {SOURCE_NOK_SCHEMA}.hesae_patient as t2
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ DROP TABLE IF EXISTS {SOURCE_NOK_SCHEMA}.hes_primary_diag_hosp CASCADE;
11
11
DROP TABLE IF EXISTS {SOURCE_NOK_SCHEMA}.hes_procedures_epi CASCADE;
12
12
13
13
-- PATIENT - Move unacceptable patient from source_hesapc.patient to source_hesapc_nok.patient
14
- CREATE TABLE {SOURCE_NOK_SCHEMA}.hes_patient (LIKE {SOURCE_SCHEMA}.hes_patient);
14
+ CREATE TABLE {SOURCE_NOK_SCHEMA}.hes_patient (LIKE {SOURCE_SCHEMA}.hes_patient) TABLESPACE pg_default ;
15
15
16
16
WITH cte1 as (
17
17
SELECT patid FROM {SOURCE_SCHEMA}.hes_patient
@@ -24,7 +24,7 @@ SELECT t1.*
24
24
FROM {SOURCE_SCHEMA}.hes_patient as t1
25
25
INNER JOIN cte1 on cte1 .patid = t1 .patid ;
26
26
27
- alter table {SOURCE_NOK_SCHEMA}.hes_patient add constraint pk_patient_nok primary key (patid);
27
+ alter table {SOURCE_NOK_SCHEMA}.hes_patient add constraint pk_patient_nok primary key (patid) USING INDEX TABLESPACE pg_default ;
28
28
29
29
DELETE FROM {SOURCE_SCHEMA}.hes_patient as t1
30
30
USING {SOURCE_NOK_SCHEMA}.hes_patient as t2
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ DROP TABLE IF EXISTS {SOURCE_NOK_SCHEMA}.hesop_appointment CASCADE;
3
3
4
4
5
5
-- PATIENT - Move unacceptable patient from source_hesapc.patient to source_hesapc_nok.patient
6
- CREATE TABLE {SOURCE_NOK_SCHEMA}.hesop_patient (LIKE {SOURCE_SCHEMA}.hesop_patient);
6
+ CREATE TABLE {SOURCE_NOK_SCHEMA}.hesop_patient (LIKE {SOURCE_SCHEMA}.hesop_patient) TABLESPACE pg_default ;
7
7
8
8
WITH cte1 as (
9
9
SELECT patid FROM {SOURCE_SCHEMA}.hesop_patient
@@ -16,7 +16,7 @@ SELECT t1.*
16
16
FROM {SOURCE_SCHEMA}.hesop_patient as t1
17
17
INNER JOIN cte1 on cte1 .patid = t1 .patid ;
18
18
19
- alter table {SOURCE_NOK_SCHEMA}.hesop_patient add constraint pk_patient_nok primary key (patid);
19
+ alter table {SOURCE_NOK_SCHEMA}.hesop_patient add constraint pk_patient_nok primary key (patid) USING INDEX TABLESPACE pg_default ;
20
20
21
21
DELETE FROM {SOURCE_SCHEMA}.hesop_patient as t1
22
22
USING {SOURCE_NOK_SCHEMA}.hesop_patient as t2
You can’t perform that action at this time.
0 commit comments