1240 lines
299 KiB
SQL
1240 lines
299 KiB
SQL
ALTER TABLE absence_policy ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE absence_policy ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE absence_policy ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE absence_policy ALTER COLUMN accrual_policy_id SET DATA TYPE UUID USING ( CASE WHEN (accrual_policy_id IS NOT NULL) THEN CASE WHEN (accrual_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (accrual_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(accrual_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE absence_policy ALTER COLUMN premium_policy_id SET DATA TYPE UUID USING ( CASE WHEN (premium_policy_id IS NOT NULL) THEN CASE WHEN (premium_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (premium_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(premium_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE absence_policy ALTER COLUMN pay_stub_entry_account_id SET DATA TYPE UUID USING ( CASE WHEN (pay_stub_entry_account_id IS NOT NULL) THEN CASE WHEN (pay_stub_entry_account_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_stub_entry_account_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_stub_entry_account_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE absence_policy ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE absence_policy ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE absence_policy ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE absence_policy ALTER COLUMN wage_group_id DROP DEFAULT;
|
|
ALTER TABLE absence_policy ALTER COLUMN wage_group_id SET DATA TYPE UUID USING ( CASE WHEN (wage_group_id IS NOT NULL) THEN CASE WHEN (wage_group_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (wage_group_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(wage_group_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE absence_policy ALTER COLUMN wage_group_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE absence_policy ALTER COLUMN pay_code_id DROP DEFAULT;
|
|
ALTER TABLE absence_policy ALTER COLUMN pay_code_id SET DATA TYPE UUID USING ( CASE WHEN (pay_code_id IS NOT NULL) THEN CASE WHEN (pay_code_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_code_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_code_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE absence_policy ALTER COLUMN pay_code_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE absence_policy ALTER COLUMN pay_formula_policy_id DROP DEFAULT;
|
|
ALTER TABLE absence_policy ALTER COLUMN pay_formula_policy_id SET DATA TYPE UUID USING ( CASE WHEN (pay_formula_policy_id IS NOT NULL) THEN CASE WHEN (pay_formula_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_formula_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_formula_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE absence_policy ALTER COLUMN pay_formula_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE accrual ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN accrual_policy_account_id SET DATA TYPE UUID USING ( CASE WHEN (accrual_policy_account_id IS NOT NULL) THEN CASE WHEN (accrual_policy_account_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (accrual_policy_account_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(accrual_policy_account_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_date_total_id SET DATA TYPE UUID USING ( CASE WHEN (user_date_total_id IS NOT NULL) THEN CASE WHEN (user_date_total_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_date_total_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_date_total_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN accrual_policy_id DROP DEFAULT,
|
|
ALTER COLUMN accrual_policy_id SET DATA TYPE UUID USING ( CASE WHEN (accrual_policy_id IS NOT NULL) THEN CASE WHEN (accrual_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (accrual_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(accrual_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN accrual_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE accrual_balance ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE accrual_balance ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_balance ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_balance ALTER COLUMN accrual_policy_account_id SET DATA TYPE UUID USING ( CASE WHEN (accrual_policy_account_id IS NOT NULL) THEN CASE WHEN (accrual_policy_account_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (accrual_policy_account_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(accrual_policy_account_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE accrual_policy ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy ALTER COLUMN contributing_shift_policy_id DROP DEFAULT;
|
|
ALTER TABLE accrual_policy ALTER COLUMN contributing_shift_policy_id SET DATA TYPE UUID USING ( CASE WHEN (contributing_shift_policy_id IS NOT NULL) THEN CASE WHEN (contributing_shift_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (contributing_shift_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(contributing_shift_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy ALTER COLUMN contributing_shift_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE accrual_policy ALTER COLUMN length_of_service_contributing_pay_code_policy_id DROP DEFAULT;
|
|
ALTER TABLE accrual_policy ALTER COLUMN length_of_service_contributing_pay_code_policy_id SET DATA TYPE UUID USING ( CASE WHEN (length_of_service_contributing_pay_code_policy_id IS NOT NULL) THEN CASE WHEN (length_of_service_contributing_pay_code_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (length_of_service_contributing_pay_code_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(length_of_service_contributing_pay_code_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy ALTER COLUMN length_of_service_contributing_pay_code_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE accrual_policy ALTER COLUMN accrual_policy_account_id SET DATA TYPE UUID USING ( CASE WHEN (accrual_policy_account_id IS NOT NULL) THEN CASE WHEN (accrual_policy_account_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (accrual_policy_account_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(accrual_policy_account_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy_account ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE accrual_policy_account ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy_account ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy_account ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy_account ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy_account ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy_milestone ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE accrual_policy_milestone ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy_milestone ALTER COLUMN accrual_policy_id SET DATA TYPE UUID USING ( CASE WHEN (accrual_policy_id IS NOT NULL) THEN CASE WHEN (accrual_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (accrual_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(accrual_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy_milestone ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy_milestone ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE accrual_policy_milestone ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE authentication ALTER COLUMN object_id SET DATA TYPE UUID USING ( CASE WHEN (object_id IS NOT NULL) THEN CASE WHEN (object_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (object_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(object_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE authorizations ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE authorizations ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE authorizations ALTER COLUMN object_id SET DATA TYPE UUID USING ( CASE WHEN (object_id IS NOT NULL) THEN CASE WHEN (object_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (object_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(object_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE authorizations ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE authorizations ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE authorizations ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE bank_account ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE bank_account ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE bank_account ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE bank_account ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE bank_account ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE bank_account ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE bank_account ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE branch ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE branch ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE branch ALTER COLUMN company_id DROP DEFAULT;
|
|
ALTER TABLE branch ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE branch ALTER COLUMN company_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE branch ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE branch ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE branch ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE break_policy ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE break_policy ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE break_policy ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE break_policy ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE break_policy ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE break_policy ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE break_policy ALTER COLUMN pay_code_id DROP DEFAULT;
|
|
ALTER TABLE break_policy ALTER COLUMN pay_code_id SET DATA TYPE UUID USING ( CASE WHEN (pay_code_id IS NOT NULL) THEN CASE WHEN (pay_code_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_code_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_code_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE break_policy ALTER COLUMN pay_code_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE break_policy ALTER COLUMN pay_formula_policy_id DROP DEFAULT;
|
|
ALTER TABLE break_policy ALTER COLUMN pay_formula_policy_id SET DATA TYPE UUID USING ( CASE WHEN (pay_formula_policy_id IS NOT NULL) THEN CASE WHEN (pay_formula_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_formula_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_formula_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE break_policy ALTER COLUMN pay_formula_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE break_policy ALTER COLUMN branch_id DROP DEFAULT;
|
|
ALTER TABLE break_policy ALTER COLUMN branch_id SET DATA TYPE UUID USING ( CASE WHEN (branch_id IS NOT NULL) THEN CASE WHEN (branch_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (branch_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(branch_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE break_policy ALTER COLUMN branch_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE break_policy ALTER COLUMN department_id DROP DEFAULT;
|
|
ALTER TABLE break_policy ALTER COLUMN department_id SET DATA TYPE UUID USING ( CASE WHEN (department_id IS NOT NULL) THEN CASE WHEN (department_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (department_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(department_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE break_policy ALTER COLUMN department_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE break_policy ALTER COLUMN job_id DROP DEFAULT;
|
|
ALTER TABLE break_policy ALTER COLUMN job_id SET DATA TYPE UUID USING ( CASE WHEN (job_id IS NOT NULL) THEN CASE WHEN (job_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (job_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(job_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE break_policy ALTER COLUMN job_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE break_policy ALTER COLUMN job_item_id DROP DEFAULT;
|
|
ALTER TABLE break_policy ALTER COLUMN job_item_id SET DATA TYPE UUID USING ( CASE WHEN (job_item_id IS NOT NULL) THEN CASE WHEN (job_item_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (job_item_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(job_item_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE break_policy ALTER COLUMN job_item_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE company ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN parent_id DROP DEFAULT,
|
|
ALTER COLUMN parent_id SET DATA TYPE UUID USING ( CASE WHEN (parent_id IS NOT NULL) THEN CASE WHEN (parent_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (parent_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(parent_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN parent_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE company_deduction ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_stub_entry_account_id SET DATA TYPE UUID USING ( CASE WHEN (pay_stub_entry_account_id IS NOT NULL) THEN CASE WHEN (pay_stub_entry_account_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_stub_entry_account_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_stub_entry_account_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN length_of_service_contributing_pay_code_policy_id DROP DEFAULT,
|
|
ALTER COLUMN length_of_service_contributing_pay_code_policy_id SET DATA TYPE UUID USING ( CASE WHEN (length_of_service_contributing_pay_code_policy_id IS NOT NULL) THEN CASE WHEN (length_of_service_contributing_pay_code_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (length_of_service_contributing_pay_code_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(length_of_service_contributing_pay_code_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN length_of_service_contributing_pay_code_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN payroll_remittance_agency_id DROP DEFAULT,
|
|
ALTER COLUMN payroll_remittance_agency_id SET DATA TYPE UUID USING ( CASE WHEN (payroll_remittance_agency_id IS NOT NULL) THEN CASE WHEN (payroll_remittance_agency_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (payroll_remittance_agency_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(payroll_remittance_agency_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN payroll_remittance_agency_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN legal_entity_id DROP DEFAULT,
|
|
ALTER COLUMN legal_entity_id SET DATA TYPE UUID USING ( CASE WHEN (legal_entity_id IS NOT NULL) THEN CASE WHEN (legal_entity_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (legal_entity_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(legal_entity_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN legal_entity_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE company_deduction_pay_stub_entry_account ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE company_deduction_pay_stub_entry_account ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE company_deduction_pay_stub_entry_account ALTER COLUMN company_deduction_id SET DATA TYPE UUID USING ( CASE WHEN (company_deduction_id IS NOT NULL) THEN CASE WHEN (company_deduction_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_deduction_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_deduction_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE company_deduction_pay_stub_entry_account ALTER COLUMN pay_stub_entry_account_id SET DATA TYPE UUID USING ( CASE WHEN (pay_stub_entry_account_id IS NOT NULL) THEN CASE WHEN (pay_stub_entry_account_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_stub_entry_account_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_stub_entry_account_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE company_generic_map ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN object_id SET DATA TYPE UUID USING ( CASE WHEN (object_id IS NOT NULL) THEN CASE WHEN (object_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (object_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(object_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN map_id SET DATA TYPE UUID USING ( CASE WHEN (map_id IS NOT NULL) THEN CASE WHEN (map_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (map_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(map_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE company_generic_tag ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE company_generic_tag_map ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN object_id SET DATA TYPE UUID USING ( CASE WHEN (object_id IS NOT NULL) THEN CASE WHEN (object_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (object_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(object_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN tag_id SET DATA TYPE UUID USING ( CASE WHEN (tag_id IS NOT NULL) THEN CASE WHEN (tag_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (tag_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(tag_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE company_setting ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE company_setting ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE company_setting ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE company_setting ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE company_setting ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE company_setting ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE company_user_count ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE company_user_count ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE company_user_count ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE contributing_pay_code_policy ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE contributing_pay_code_policy ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE contributing_pay_code_policy ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE contributing_pay_code_policy ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE contributing_pay_code_policy ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE contributing_pay_code_policy ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE contributing_shift_policy ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE contributing_shift_policy ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE contributing_shift_policy ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE contributing_shift_policy ALTER COLUMN contributing_pay_code_policy_id SET DATA TYPE UUID USING ( CASE WHEN (contributing_pay_code_policy_id IS NOT NULL) THEN CASE WHEN (contributing_pay_code_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (contributing_pay_code_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(contributing_pay_code_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE contributing_shift_policy ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE contributing_shift_policy ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE contributing_shift_policy ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE cron ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE cron ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE cron ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE cron ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE cron ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE currency ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE currency ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE currency ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE currency ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE currency ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE currency ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE currency_rate ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN currency_id SET DATA TYPE UUID USING ( CASE WHEN (currency_id IS NOT NULL) THEN CASE WHEN (currency_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (currency_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(currency_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE department ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE department ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE department ALTER COLUMN company_id DROP DEFAULT;
|
|
ALTER TABLE department ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE department ALTER COLUMN company_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE department ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE department ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE department ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE department_branch ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE department_branch ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE department_branch ALTER COLUMN branch_id DROP DEFAULT;
|
|
ALTER TABLE department_branch ALTER COLUMN branch_id SET DATA TYPE UUID USING ( CASE WHEN (branch_id IS NOT NULL) THEN CASE WHEN (branch_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (branch_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(branch_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE department_branch ALTER COLUMN branch_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE department_branch ALTER COLUMN department_id DROP DEFAULT;
|
|
ALTER TABLE department_branch ALTER COLUMN department_id SET DATA TYPE UUID USING ( CASE WHEN (department_id IS NOT NULL) THEN CASE WHEN (department_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (department_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(department_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE department_branch ALTER COLUMN department_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE department_branch_user ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE department_branch_user ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE department_branch_user ALTER COLUMN department_branch_id SET DATA TYPE UUID USING ( CASE WHEN (department_branch_id IS NOT NULL) THEN CASE WHEN (department_branch_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (department_branch_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(department_branch_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE department_branch_user ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE ethnic_group ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE ethnic_group ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE ethnic_group ALTER COLUMN company_id DROP DEFAULT;
|
|
ALTER TABLE ethnic_group ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE ethnic_group ALTER COLUMN company_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE ethnic_group ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE ethnic_group ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE ethnic_group ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE exception ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_period_id SET DATA TYPE UUID USING ( CASE WHEN (pay_period_id IS NOT NULL) THEN CASE WHEN (pay_period_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_period_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_period_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN exception_policy_id SET DATA TYPE UUID USING ( CASE WHEN (exception_policy_id IS NOT NULL) THEN CASE WHEN (exception_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (exception_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(exception_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN punch_id DROP DEFAULT,
|
|
ALTER COLUMN punch_id SET DATA TYPE UUID USING ( CASE WHEN (punch_id IS NOT NULL) THEN CASE WHEN (punch_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (punch_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(punch_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN punch_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN punch_control_id DROP DEFAULT,
|
|
ALTER COLUMN punch_control_id SET DATA TYPE UUID USING ( CASE WHEN (punch_control_id IS NOT NULL) THEN CASE WHEN (punch_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (punch_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(punch_control_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN punch_control_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN acknowledged_reason_id DROP DEFAULT,
|
|
ALTER COLUMN acknowledged_reason_id SET DATA TYPE UUID USING ( CASE WHEN (acknowledged_reason_id IS NOT NULL) THEN CASE WHEN (acknowledged_reason_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (acknowledged_reason_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(acknowledged_reason_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN acknowledged_reason_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE exception_policy ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN exception_policy_control_id SET DATA TYPE UUID USING ( CASE WHEN (exception_policy_control_id IS NOT NULL) THEN CASE WHEN (exception_policy_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (exception_policy_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(exception_policy_control_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE exception_policy_control ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE exception_policy_control ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE exception_policy_control ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE exception_policy_control ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE exception_policy_control ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE exception_policy_control ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE help ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE help ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE help ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE help ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE help ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE help_group ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE help_group ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE help_group ALTER COLUMN help_group_control_id DROP DEFAULT;
|
|
ALTER TABLE help_group ALTER COLUMN help_group_control_id SET DATA TYPE UUID USING ( CASE WHEN (help_group_control_id IS NOT NULL) THEN CASE WHEN (help_group_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (help_group_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(help_group_control_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE help_group ALTER COLUMN help_group_control_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE help_group ALTER COLUMN help_id DROP DEFAULT;
|
|
ALTER TABLE help_group ALTER COLUMN help_id SET DATA TYPE UUID USING ( CASE WHEN (help_id IS NOT NULL) THEN CASE WHEN (help_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (help_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(help_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE help_group ALTER COLUMN help_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE help_group_control ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE help_group_control ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE help_group_control ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE help_group_control ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE help_group_control ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE hierarchy_control ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE hierarchy_control ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE hierarchy_control ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE hierarchy_control ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE hierarchy_control ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE hierarchy_control ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE hierarchy_level ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE hierarchy_level ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE hierarchy_level ALTER COLUMN hierarchy_control_id SET DATA TYPE UUID USING ( CASE WHEN (hierarchy_control_id IS NOT NULL) THEN CASE WHEN (hierarchy_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (hierarchy_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(hierarchy_control_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE hierarchy_level ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE hierarchy_level ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE hierarchy_level ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE hierarchy_level ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE hierarchy_object_type ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE hierarchy_object_type ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE hierarchy_object_type ALTER COLUMN hierarchy_control_id SET DATA TYPE UUID USING ( CASE WHEN (hierarchy_control_id IS NOT NULL) THEN CASE WHEN (hierarchy_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (hierarchy_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(hierarchy_control_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE hierarchy_share ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE hierarchy_share ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE hierarchy_share ALTER COLUMN hierarchy_control_id DROP DEFAULT;
|
|
ALTER TABLE hierarchy_share ALTER COLUMN hierarchy_control_id SET DATA TYPE UUID USING ( CASE WHEN (hierarchy_control_id IS NOT NULL) THEN CASE WHEN (hierarchy_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (hierarchy_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(hierarchy_control_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE hierarchy_share ALTER COLUMN hierarchy_control_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE hierarchy_share ALTER COLUMN user_id DROP DEFAULT;
|
|
ALTER TABLE hierarchy_share ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE hierarchy_share ALTER COLUMN user_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE hierarchy_user ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN hierarchy_control_id SET DATA TYPE UUID USING ( CASE WHEN (hierarchy_control_id IS NOT NULL) THEN CASE WHEN (hierarchy_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (hierarchy_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(hierarchy_control_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE holiday_policy ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE holiday_policy ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE holiday_policy ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE holiday_policy ALTER COLUMN absence_policy_id SET DATA TYPE UUID USING ( CASE WHEN (absence_policy_id IS NOT NULL) THEN CASE WHEN (absence_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (absence_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(absence_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE holiday_policy ALTER COLUMN round_interval_policy_id SET DATA TYPE UUID USING ( CASE WHEN (round_interval_policy_id IS NOT NULL) THEN CASE WHEN (round_interval_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (round_interval_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(round_interval_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE holiday_policy ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE holiday_policy ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE holiday_policy ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE holiday_policy ALTER COLUMN contributing_shift_policy_id DROP DEFAULT;
|
|
ALTER TABLE holiday_policy ALTER COLUMN contributing_shift_policy_id SET DATA TYPE UUID USING ( CASE WHEN (contributing_shift_policy_id IS NOT NULL) THEN CASE WHEN (contributing_shift_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (contributing_shift_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(contributing_shift_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE holiday_policy ALTER COLUMN contributing_shift_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE holiday_policy ALTER COLUMN eligible_contributing_shift_policy_id DROP DEFAULT;
|
|
ALTER TABLE holiday_policy ALTER COLUMN eligible_contributing_shift_policy_id SET DATA TYPE UUID USING ( CASE WHEN (eligible_contributing_shift_policy_id IS NOT NULL) THEN CASE WHEN (eligible_contributing_shift_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (eligible_contributing_shift_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(eligible_contributing_shift_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE holiday_policy ALTER COLUMN eligible_contributing_shift_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE holiday_policy_recurring_holiday ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE holiday_policy_recurring_holiday ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE holiday_policy_recurring_holiday ALTER COLUMN holiday_policy_id DROP DEFAULT;
|
|
ALTER TABLE holiday_policy_recurring_holiday ALTER COLUMN holiday_policy_id SET DATA TYPE UUID USING ( CASE WHEN (holiday_policy_id IS NOT NULL) THEN CASE WHEN (holiday_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (holiday_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(holiday_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE holiday_policy_recurring_holiday ALTER COLUMN holiday_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE holiday_policy_recurring_holiday ALTER COLUMN recurring_holiday_id DROP DEFAULT;
|
|
ALTER TABLE holiday_policy_recurring_holiday ALTER COLUMN recurring_holiday_id SET DATA TYPE UUID USING ( CASE WHEN (recurring_holiday_id IS NOT NULL) THEN CASE WHEN (recurring_holiday_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (recurring_holiday_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(recurring_holiday_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE holiday_policy_recurring_holiday ALTER COLUMN recurring_holiday_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE holidays ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN holiday_policy_id SET DATA TYPE UUID USING ( CASE WHEN (holiday_policy_id IS NOT NULL) THEN CASE WHEN (holiday_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (holiday_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(holiday_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE kpi ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE kpi ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE kpi ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE kpi ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE kpi ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE kpi ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE kpi_group ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE kpi_group ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE kpi_group ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE kpi_group ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE kpi_group ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE kpi_group ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE kpi_group ALTER COLUMN parent_id DROP DEFAULT;
|
|
ALTER TABLE kpi_group ALTER COLUMN parent_id SET DATA TYPE UUID USING ( CASE WHEN (parent_id IS NOT NULL) THEN CASE WHEN (parent_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (parent_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(parent_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE kpi_group ALTER COLUMN parent_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE legal_entity ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE legal_entity ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE legal_entity ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE legal_entity ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE legal_entity ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE legal_entity ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE meal_policy ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_code_id DROP DEFAULT,
|
|
ALTER COLUMN pay_code_id SET DATA TYPE UUID USING ( CASE WHEN (pay_code_id IS NOT NULL) THEN CASE WHEN (pay_code_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_code_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_code_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_code_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN pay_formula_policy_id DROP DEFAULT,
|
|
ALTER COLUMN pay_formula_policy_id SET DATA TYPE UUID USING ( CASE WHEN (pay_formula_policy_id IS NOT NULL) THEN CASE WHEN (pay_formula_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_formula_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_formula_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_formula_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN branch_id DROP DEFAULT,
|
|
ALTER COLUMN branch_id SET DATA TYPE UUID USING ( CASE WHEN (branch_id IS NOT NULL) THEN CASE WHEN (branch_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (branch_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(branch_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN branch_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN department_id DROP DEFAULT,
|
|
ALTER COLUMN department_id SET DATA TYPE UUID USING ( CASE WHEN (department_id IS NOT NULL) THEN CASE WHEN (department_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (department_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(department_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN department_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN job_id DROP DEFAULT,
|
|
ALTER COLUMN job_id SET DATA TYPE UUID USING ( CASE WHEN (job_id IS NOT NULL) THEN CASE WHEN (job_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (job_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(job_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN job_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN job_item_id DROP DEFAULT,
|
|
ALTER COLUMN job_item_id SET DATA TYPE UUID USING ( CASE WHEN (job_item_id IS NOT NULL) THEN CASE WHEN (job_item_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (job_item_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(job_item_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN job_item_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE message ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE message ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE message ALTER COLUMN parent_id SET DATA TYPE UUID USING ( CASE WHEN (parent_id IS NOT NULL) THEN CASE WHEN (parent_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (parent_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(parent_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE message ALTER COLUMN object_id SET DATA TYPE UUID USING ( CASE WHEN (object_id IS NOT NULL) THEN CASE WHEN (object_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (object_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(object_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE message ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE message ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE message ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE message_control ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN object_id SET DATA TYPE UUID USING ( CASE WHEN (object_id IS NOT NULL) THEN CASE WHEN (object_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (object_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(object_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE message_recipient ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN message_sender_id SET DATA TYPE UUID USING ( CASE WHEN (message_sender_id IS NOT NULL) THEN CASE WHEN (message_sender_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (message_sender_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(message_sender_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE message_sender ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN parent_id SET DATA TYPE UUID USING ( CASE WHEN (parent_id IS NOT NULL) THEN CASE WHEN (parent_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (parent_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(parent_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN message_control_id SET DATA TYPE UUID USING ( CASE WHEN (message_control_id IS NOT NULL) THEN CASE WHEN (message_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (message_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(message_control_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE other_field ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE other_field ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE other_field ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE other_field ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE other_field ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE other_field ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE over_time_policy ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN accrual_policy_id SET DATA TYPE UUID USING ( CASE WHEN (accrual_policy_id IS NOT NULL) THEN CASE WHEN (accrual_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (accrual_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(accrual_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_stub_entry_account_id SET DATA TYPE UUID USING ( CASE WHEN (pay_stub_entry_account_id IS NOT NULL) THEN CASE WHEN (pay_stub_entry_account_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_stub_entry_account_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_stub_entry_account_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN wage_group_id DROP DEFAULT,
|
|
ALTER COLUMN wage_group_id SET DATA TYPE UUID USING ( CASE WHEN (wage_group_id IS NOT NULL) THEN CASE WHEN (wage_group_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (wage_group_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(wage_group_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN wage_group_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN pay_code_id DROP DEFAULT,
|
|
ALTER COLUMN pay_code_id SET DATA TYPE UUID USING ( CASE WHEN (pay_code_id IS NOT NULL) THEN CASE WHEN (pay_code_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_code_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_code_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_code_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN pay_formula_policy_id DROP DEFAULT,
|
|
ALTER COLUMN pay_formula_policy_id SET DATA TYPE UUID USING ( CASE WHEN (pay_formula_policy_id IS NOT NULL) THEN CASE WHEN (pay_formula_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_formula_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_formula_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_formula_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN contributing_shift_policy_id DROP DEFAULT,
|
|
ALTER COLUMN contributing_shift_policy_id SET DATA TYPE UUID USING ( CASE WHEN (contributing_shift_policy_id IS NOT NULL) THEN CASE WHEN (contributing_shift_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (contributing_shift_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(contributing_shift_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN contributing_shift_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN trigger_time_adjust_contributing_shift_policy_id DROP DEFAULT,
|
|
ALTER COLUMN trigger_time_adjust_contributing_shift_policy_id SET DATA TYPE UUID USING ( CASE WHEN (trigger_time_adjust_contributing_shift_policy_id IS NOT NULL) THEN CASE WHEN (trigger_time_adjust_contributing_shift_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (trigger_time_adjust_contributing_shift_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(trigger_time_adjust_contributing_shift_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN trigger_time_adjust_contributing_shift_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE pay_code ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_formula_policy_id DROP DEFAULT,
|
|
ALTER COLUMN pay_formula_policy_id SET DATA TYPE UUID USING ( CASE WHEN (pay_formula_policy_id IS NOT NULL) THEN CASE WHEN (pay_formula_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_formula_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_formula_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_formula_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN pay_stub_entry_account_id SET DATA TYPE UUID USING ( CASE WHEN (pay_stub_entry_account_id IS NOT NULL) THEN CASE WHEN (pay_stub_entry_account_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_stub_entry_account_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_stub_entry_account_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_formula_policy ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN wage_source_contributing_shift_policy_id DROP DEFAULT,
|
|
ALTER COLUMN wage_source_contributing_shift_policy_id SET DATA TYPE UUID USING ( CASE WHEN (wage_source_contributing_shift_policy_id IS NOT NULL) THEN CASE WHEN (wage_source_contributing_shift_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (wage_source_contributing_shift_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(wage_source_contributing_shift_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN wage_source_contributing_shift_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN time_source_contributing_shift_policy_id DROP DEFAULT,
|
|
ALTER COLUMN time_source_contributing_shift_policy_id SET DATA TYPE UUID USING ( CASE WHEN (time_source_contributing_shift_policy_id IS NOT NULL) THEN CASE WHEN (time_source_contributing_shift_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (time_source_contributing_shift_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(time_source_contributing_shift_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN time_source_contributing_shift_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN wage_group_id SET DATA TYPE UUID USING ( CASE WHEN (wage_group_id IS NOT NULL) THEN CASE WHEN (wage_group_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (wage_group_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(wage_group_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN accrual_policy_account_id SET DATA TYPE UUID USING ( CASE WHEN (accrual_policy_account_id IS NOT NULL) THEN CASE WHEN (accrual_policy_account_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (accrual_policy_account_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(accrual_policy_account_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_period ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_period_schedule_id SET DATA TYPE UUID USING ( CASE WHEN (pay_period_schedule_id IS NOT NULL) THEN CASE WHEN (pay_period_schedule_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_period_schedule_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_period_schedule_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN tainted_by SET DATA TYPE UUID USING ( CASE WHEN (tainted_by IS NOT NULL) THEN CASE WHEN (tainted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (tainted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(tainted_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_period_schedule ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_period_schedule_user ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_period_schedule_id DROP DEFAULT,
|
|
ALTER COLUMN pay_period_schedule_id SET DATA TYPE UUID USING ( CASE WHEN (pay_period_schedule_id IS NOT NULL) THEN CASE WHEN (pay_period_schedule_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_period_schedule_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_period_schedule_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_period_schedule_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN user_id DROP DEFAULT,
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE pay_period_time_sheet_verify ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_period_id SET DATA TYPE UUID USING ( CASE WHEN (pay_period_id IS NOT NULL) THEN CASE WHEN (pay_period_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_period_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_period_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_stub ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_period_id DROP DEFAULT,
|
|
ALTER COLUMN pay_period_id SET DATA TYPE UUID USING ( CASE WHEN (pay_period_id IS NOT NULL) THEN CASE WHEN (pay_period_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_period_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_period_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_period_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN user_id DROP DEFAULT,
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN status_by SET DATA TYPE UUID USING ( CASE WHEN (status_by IS NOT NULL) THEN CASE WHEN (status_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (status_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(status_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN currency_id SET DATA TYPE UUID USING ( CASE WHEN (currency_id IS NOT NULL) THEN CASE WHEN (currency_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (currency_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(currency_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_stub_amendment ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_stub_entry_name_id SET DATA TYPE UUID USING ( CASE WHEN (pay_stub_entry_name_id IS NOT NULL) THEN CASE WHEN (pay_stub_entry_name_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_stub_entry_name_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_stub_entry_name_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN recurring_ps_amendment_id SET DATA TYPE UUID USING ( CASE WHEN (recurring_ps_amendment_id IS NOT NULL) THEN CASE WHEN (recurring_ps_amendment_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (recurring_ps_amendment_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(recurring_ps_amendment_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN percent_amount_entry_name_id SET DATA TYPE UUID USING ( CASE WHEN (percent_amount_entry_name_id IS NOT NULL) THEN CASE WHEN (percent_amount_entry_name_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (percent_amount_entry_name_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(percent_amount_entry_name_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_stub_entry ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_stub_id SET DATA TYPE UUID USING ( CASE WHEN (pay_stub_id IS NOT NULL) THEN CASE WHEN (pay_stub_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_stub_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_stub_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_stub_entry_name_id SET DATA TYPE UUID USING ( CASE WHEN (pay_stub_entry_name_id IS NOT NULL) THEN CASE WHEN (pay_stub_entry_name_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_stub_entry_name_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_stub_entry_name_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_stub_amendment_id SET DATA TYPE UUID USING ( CASE WHEN (pay_stub_amendment_id IS NOT NULL) THEN CASE WHEN (pay_stub_amendment_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_stub_amendment_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_stub_amendment_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_expense_id DROP DEFAULT,
|
|
ALTER COLUMN user_expense_id SET DATA TYPE UUID USING ( CASE WHEN (user_expense_id IS NOT NULL) THEN CASE WHEN (user_expense_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_expense_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_expense_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_expense_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE pay_stub_entry_account ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN accrual_pay_stub_entry_account_id SET DATA TYPE UUID USING ( CASE WHEN (accrual_pay_stub_entry_account_id IS NOT NULL) THEN CASE WHEN (accrual_pay_stub_entry_account_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (accrual_pay_stub_entry_account_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(accrual_pay_stub_entry_account_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_stub_entry_account_link ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE pay_stub_entry_account_link ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_stub_entry_account_link ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_stub_entry_account_link ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_stub_entry_account_link ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_stub_entry_account_link ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_stub_transaction ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN parent_id DROP DEFAULT,
|
|
ALTER COLUMN parent_id SET DATA TYPE UUID USING ( CASE WHEN (parent_id IS NOT NULL) THEN CASE WHEN (parent_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (parent_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(parent_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN parent_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN pay_stub_id SET DATA TYPE UUID USING ( CASE WHEN (pay_stub_id IS NOT NULL) THEN CASE WHEN (pay_stub_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_stub_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_stub_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN remittance_source_account_id SET DATA TYPE UUID USING ( CASE WHEN (remittance_source_account_id IS NOT NULL) THEN CASE WHEN (remittance_source_account_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (remittance_source_account_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(remittance_source_account_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN remittance_destination_account_id SET DATA TYPE UUID USING ( CASE WHEN (remittance_destination_account_id IS NOT NULL) THEN CASE WHEN (remittance_destination_account_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (remittance_destination_account_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(remittance_destination_account_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN currency_id SET DATA TYPE UUID USING ( CASE WHEN (currency_id IS NOT NULL) THEN CASE WHEN (currency_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (currency_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(currency_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE payroll_remittance_agency ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE payroll_remittance_agency ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE payroll_remittance_agency ALTER COLUMN legal_entity_id SET DATA TYPE UUID USING ( CASE WHEN (legal_entity_id IS NOT NULL) THEN CASE WHEN (legal_entity_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (legal_entity_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(legal_entity_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE payroll_remittance_agency ALTER COLUMN contact_user_id SET DATA TYPE UUID USING ( CASE WHEN (contact_user_id IS NOT NULL) THEN CASE WHEN (contact_user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (contact_user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(contact_user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE payroll_remittance_agency ALTER COLUMN remittance_source_account_id SET DATA TYPE UUID USING ( CASE WHEN (remittance_source_account_id IS NOT NULL) THEN CASE WHEN (remittance_source_account_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (remittance_source_account_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(remittance_source_account_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE payroll_remittance_agency ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE payroll_remittance_agency ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE payroll_remittance_agency ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE payroll_remittance_agency_event ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE payroll_remittance_agency_event ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE payroll_remittance_agency_event ALTER COLUMN payroll_remittance_agency_id SET DATA TYPE UUID USING ( CASE WHEN (payroll_remittance_agency_id IS NOT NULL) THEN CASE WHEN (payroll_remittance_agency_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (payroll_remittance_agency_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(payroll_remittance_agency_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE payroll_remittance_agency_event ALTER COLUMN reminder_user_id SET DATA TYPE UUID USING ( CASE WHEN (reminder_user_id IS NOT NULL) THEN CASE WHEN (reminder_user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (reminder_user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(reminder_user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE payroll_remittance_agency_event ALTER COLUMN user_report_data_id SET DATA TYPE UUID USING ( CASE WHEN (user_report_data_id IS NOT NULL) THEN CASE WHEN (user_report_data_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_report_data_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_report_data_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE payroll_remittance_agency_event ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE payroll_remittance_agency_event ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE payroll_remittance_agency_event ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE permission ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN permission_control_id SET DATA TYPE UUID USING ( CASE WHEN (permission_control_id IS NOT NULL) THEN CASE WHEN (permission_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (permission_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(permission_control_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE permission_control ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE permission_user ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN permission_control_id SET DATA TYPE UUID USING ( CASE WHEN (permission_control_id IS NOT NULL) THEN CASE WHEN (permission_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (permission_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(permission_control_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE policy_group ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN exception_policy_control_id SET DATA TYPE UUID USING ( CASE WHEN (exception_policy_control_id IS NOT NULL) THEN CASE WHEN (exception_policy_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (exception_policy_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(exception_policy_control_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN accrual_policy_id SET DATA TYPE UUID USING ( CASE WHEN (accrual_policy_id IS NOT NULL) THEN CASE WHEN (accrual_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (accrual_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(accrual_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE policy_group_user ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN policy_group_id DROP DEFAULT,
|
|
ALTER COLUMN policy_group_id SET DATA TYPE UUID USING ( CASE WHEN (policy_group_id IS NOT NULL) THEN CASE WHEN (policy_group_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (policy_group_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(policy_group_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN policy_group_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN user_id DROP DEFAULT,
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE premium_policy ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE premium_policy ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE premium_policy ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE premium_policy ALTER COLUMN accrual_policy_id SET DATA TYPE UUID USING ( CASE WHEN (accrual_policy_id IS NOT NULL) THEN CASE WHEN (accrual_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (accrual_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(accrual_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE premium_policy ALTER COLUMN pay_stub_entry_account_id SET DATA TYPE UUID USING ( CASE WHEN (pay_stub_entry_account_id IS NOT NULL) THEN CASE WHEN (pay_stub_entry_account_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_stub_entry_account_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_stub_entry_account_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE premium_policy ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE premium_policy ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE premium_policy ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE premium_policy ALTER COLUMN wage_group_id DROP DEFAULT;
|
|
ALTER TABLE premium_policy ALTER COLUMN wage_group_id SET DATA TYPE UUID USING ( CASE WHEN (wage_group_id IS NOT NULL) THEN CASE WHEN (wage_group_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (wage_group_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(wage_group_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE premium_policy ALTER COLUMN wage_group_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE premium_policy ALTER COLUMN pay_code_id DROP DEFAULT;
|
|
ALTER TABLE premium_policy ALTER COLUMN pay_code_id SET DATA TYPE UUID USING ( CASE WHEN (pay_code_id IS NOT NULL) THEN CASE WHEN (pay_code_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_code_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_code_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE premium_policy ALTER COLUMN pay_code_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE premium_policy ALTER COLUMN pay_formula_policy_id DROP DEFAULT;
|
|
ALTER TABLE premium_policy ALTER COLUMN pay_formula_policy_id SET DATA TYPE UUID USING ( CASE WHEN (pay_formula_policy_id IS NOT NULL) THEN CASE WHEN (pay_formula_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_formula_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_formula_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE premium_policy ALTER COLUMN pay_formula_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE premium_policy ALTER COLUMN contributing_shift_policy_id DROP DEFAULT;
|
|
ALTER TABLE premium_policy ALTER COLUMN contributing_shift_policy_id SET DATA TYPE UUID USING ( CASE WHEN (contributing_shift_policy_id IS NOT NULL) THEN CASE WHEN (contributing_shift_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (contributing_shift_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(contributing_shift_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE premium_policy ALTER COLUMN contributing_shift_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE premium_policy_branch ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE premium_policy_branch ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE premium_policy_branch ALTER COLUMN premium_policy_id SET DATA TYPE UUID USING ( CASE WHEN (premium_policy_id IS NOT NULL) THEN CASE WHEN (premium_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (premium_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(premium_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE premium_policy_branch ALTER COLUMN branch_id SET DATA TYPE UUID USING ( CASE WHEN (branch_id IS NOT NULL) THEN CASE WHEN (branch_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (branch_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(branch_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE premium_policy_department ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE premium_policy_department ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE premium_policy_department ALTER COLUMN premium_policy_id SET DATA TYPE UUID USING ( CASE WHEN (premium_policy_id IS NOT NULL) THEN CASE WHEN (premium_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (premium_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(premium_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE premium_policy_department ALTER COLUMN department_id SET DATA TYPE UUID USING ( CASE WHEN (department_id IS NOT NULL) THEN CASE WHEN (department_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (department_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(department_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE punch ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN punch_control_id SET DATA TYPE UUID USING ( CASE WHEN (punch_control_id IS NOT NULL) THEN CASE WHEN (punch_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (punch_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(punch_control_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN station_id SET DATA TYPE UUID USING ( CASE WHEN (station_id IS NOT NULL) THEN CASE WHEN (station_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (station_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(station_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE punch_control ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_period_id SET DATA TYPE UUID USING ( CASE WHEN (pay_period_id IS NOT NULL) THEN CASE WHEN (pay_period_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_period_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_period_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN branch_id DROP DEFAULT,
|
|
ALTER COLUMN branch_id SET DATA TYPE UUID USING ( CASE WHEN (branch_id IS NOT NULL) THEN CASE WHEN (branch_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (branch_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(branch_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN branch_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN department_id DROP DEFAULT,
|
|
ALTER COLUMN department_id SET DATA TYPE UUID USING ( CASE WHEN (department_id IS NOT NULL) THEN CASE WHEN (department_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (department_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(department_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN department_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN job_id DROP DEFAULT,
|
|
ALTER COLUMN job_id SET DATA TYPE UUID USING ( CASE WHEN (job_id IS NOT NULL) THEN CASE WHEN (job_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (job_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(job_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN job_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN job_item_id DROP DEFAULT,
|
|
ALTER COLUMN job_item_id SET DATA TYPE UUID USING ( CASE WHEN (job_item_id IS NOT NULL) THEN CASE WHEN (job_item_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (job_item_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(job_item_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN job_item_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE qualification ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN group_id DROP DEFAULT,
|
|
ALTER COLUMN group_id SET DATA TYPE UUID USING ( CASE WHEN (group_id IS NOT NULL) THEN CASE WHEN (group_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (group_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(group_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN group_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE qualification_group ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE qualification_group ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE qualification_group ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE qualification_group ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE qualification_group ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE qualification_group ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE qualification_group ALTER COLUMN parent_id DROP DEFAULT;
|
|
ALTER TABLE qualification_group ALTER COLUMN parent_id SET DATA TYPE UUID USING ( CASE WHEN (parent_id IS NOT NULL) THEN CASE WHEN (parent_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (parent_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(parent_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE qualification_group ALTER COLUMN parent_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE recurring_holiday ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE recurring_holiday ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_holiday ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_holiday ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_holiday ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_holiday ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_ps_amendment ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE recurring_ps_amendment ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_ps_amendment ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_ps_amendment ALTER COLUMN pay_stub_entry_name_id SET DATA TYPE UUID USING ( CASE WHEN (pay_stub_entry_name_id IS NOT NULL) THEN CASE WHEN (pay_stub_entry_name_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_stub_entry_name_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_stub_entry_name_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_ps_amendment ALTER COLUMN percent_amount_entry_name_id SET DATA TYPE UUID USING ( CASE WHEN (percent_amount_entry_name_id IS NOT NULL) THEN CASE WHEN (percent_amount_entry_name_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (percent_amount_entry_name_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(percent_amount_entry_name_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_ps_amendment ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_ps_amendment ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_ps_amendment ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_ps_amendment_user ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE recurring_ps_amendment_user ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_ps_amendment_user ALTER COLUMN recurring_ps_amendment_id SET DATA TYPE UUID USING ( CASE WHEN (recurring_ps_amendment_id IS NOT NULL) THEN CASE WHEN (recurring_ps_amendment_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (recurring_ps_amendment_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(recurring_ps_amendment_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_ps_amendment_user ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_schedule ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN recurring_schedule_control_id SET DATA TYPE UUID USING ( CASE WHEN (recurring_schedule_control_id IS NOT NULL) THEN CASE WHEN (recurring_schedule_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (recurring_schedule_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(recurring_schedule_control_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN schedule_policy_id DROP DEFAULT,
|
|
ALTER COLUMN schedule_policy_id SET DATA TYPE UUID USING ( CASE WHEN (schedule_policy_id IS NOT NULL) THEN CASE WHEN (schedule_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (schedule_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(schedule_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN schedule_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN absence_policy_id DROP DEFAULT,
|
|
ALTER COLUMN absence_policy_id SET DATA TYPE UUID USING ( CASE WHEN (absence_policy_id IS NOT NULL) THEN CASE WHEN (absence_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (absence_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(absence_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN absence_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN branch_id DROP DEFAULT,
|
|
ALTER COLUMN branch_id SET DATA TYPE UUID USING ( CASE WHEN (branch_id IS NOT NULL) THEN CASE WHEN (branch_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (branch_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(branch_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN branch_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN department_id DROP DEFAULT,
|
|
ALTER COLUMN department_id SET DATA TYPE UUID USING ( CASE WHEN (department_id IS NOT NULL) THEN CASE WHEN (department_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (department_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(department_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN department_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN job_id DROP DEFAULT,
|
|
ALTER COLUMN job_id SET DATA TYPE UUID USING ( CASE WHEN (job_id IS NOT NULL) THEN CASE WHEN (job_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (job_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(job_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN job_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN job_item_id DROP DEFAULT,
|
|
ALTER COLUMN job_item_id SET DATA TYPE UUID USING ( CASE WHEN (job_item_id IS NOT NULL) THEN CASE WHEN (job_item_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (job_item_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(job_item_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN job_item_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN recurring_schedule_template_control_id DROP DEFAULT,
|
|
ALTER COLUMN recurring_schedule_template_control_id SET DATA TYPE UUID USING ( CASE WHEN (recurring_schedule_template_control_id IS NOT NULL) THEN CASE WHEN (recurring_schedule_template_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (recurring_schedule_template_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(recurring_schedule_template_control_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN recurring_schedule_template_control_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_schedule_control ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN recurring_schedule_template_control_id SET DATA TYPE UUID USING ( CASE WHEN (recurring_schedule_template_control_id IS NOT NULL) THEN CASE WHEN (recurring_schedule_template_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (recurring_schedule_template_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(recurring_schedule_template_control_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_schedule_template ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN recurring_schedule_template_control_id SET DATA TYPE UUID USING ( CASE WHEN (recurring_schedule_template_control_id IS NOT NULL) THEN CASE WHEN (recurring_schedule_template_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (recurring_schedule_template_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(recurring_schedule_template_control_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN schedule_policy_id SET DATA TYPE UUID USING ( CASE WHEN (schedule_policy_id IS NOT NULL) THEN CASE WHEN (schedule_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (schedule_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(schedule_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN branch_id SET DATA TYPE UUID USING ( CASE WHEN (branch_id IS NOT NULL) THEN CASE WHEN (branch_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (branch_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(branch_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN department_id SET DATA TYPE UUID USING ( CASE WHEN (department_id IS NOT NULL) THEN CASE WHEN (department_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (department_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(department_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN job_id SET DATA TYPE UUID USING ( CASE WHEN (job_id IS NOT NULL) THEN CASE WHEN (job_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (job_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(job_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN job_item_id SET DATA TYPE UUID USING ( CASE WHEN (job_item_id IS NOT NULL) THEN CASE WHEN (job_item_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (job_item_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(job_item_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN absence_policy_id DROP DEFAULT,
|
|
ALTER COLUMN absence_policy_id SET DATA TYPE UUID USING ( CASE WHEN (absence_policy_id IS NOT NULL) THEN CASE WHEN (absence_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (absence_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(absence_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN absence_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE recurring_schedule_template_control ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE recurring_schedule_user ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN recurring_schedule_control_id DROP DEFAULT,
|
|
ALTER COLUMN recurring_schedule_control_id SET DATA TYPE UUID USING ( CASE WHEN (recurring_schedule_control_id IS NOT NULL) THEN CASE WHEN (recurring_schedule_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (recurring_schedule_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(recurring_schedule_control_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN recurring_schedule_control_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN user_id DROP DEFAULT,
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE regular_time_policy ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN contributing_shift_policy_id SET DATA TYPE UUID USING ( CASE WHEN (contributing_shift_policy_id IS NOT NULL) THEN CASE WHEN (contributing_shift_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (contributing_shift_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(contributing_shift_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_formula_policy_id DROP DEFAULT,
|
|
ALTER COLUMN pay_formula_policy_id SET DATA TYPE UUID USING ( CASE WHEN (pay_formula_policy_id IS NOT NULL) THEN CASE WHEN (pay_formula_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_formula_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_formula_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_formula_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN pay_code_id SET DATA TYPE UUID USING ( CASE WHEN (pay_code_id IS NOT NULL) THEN CASE WHEN (pay_code_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_code_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_code_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE remittance_destination_account ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE remittance_destination_account ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE remittance_destination_account ALTER COLUMN remittance_source_account_id SET DATA TYPE UUID USING ( CASE WHEN (remittance_source_account_id IS NOT NULL) THEN CASE WHEN (remittance_source_account_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (remittance_source_account_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(remittance_source_account_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE remittance_destination_account ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE remittance_destination_account ALTER COLUMN currency_id SET DATA TYPE UUID USING ( CASE WHEN (currency_id IS NOT NULL) THEN CASE WHEN (currency_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (currency_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(currency_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE remittance_destination_account ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE remittance_destination_account ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE remittance_destination_account ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE remittance_source_account ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE remittance_source_account ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE remittance_source_account ALTER COLUMN legal_entity_id SET DATA TYPE UUID USING ( CASE WHEN (legal_entity_id IS NOT NULL) THEN CASE WHEN (legal_entity_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (legal_entity_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(legal_entity_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE remittance_source_account ALTER COLUMN currency_id SET DATA TYPE UUID USING ( CASE WHEN (currency_id IS NOT NULL) THEN CASE WHEN (currency_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (currency_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(currency_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE remittance_source_account ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE remittance_source_account ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE remittance_source_account ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE request ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_period_id SET DATA TYPE UUID USING ( CASE WHEN (pay_period_id IS NOT NULL) THEN CASE WHEN (pay_period_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_period_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_period_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE roe ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE roe ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE roe ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE roe ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE roe ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE roe ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE round_interval_policy ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE round_interval_policy ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE round_interval_policy ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE round_interval_policy ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE round_interval_policy ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE round_interval_policy ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE schedule ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_period_id SET DATA TYPE UUID USING ( CASE WHEN (pay_period_id IS NOT NULL) THEN CASE WHEN (pay_period_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_period_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_period_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN schedule_policy_id DROP DEFAULT,
|
|
ALTER COLUMN schedule_policy_id SET DATA TYPE UUID USING ( CASE WHEN (schedule_policy_id IS NOT NULL) THEN CASE WHEN (schedule_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (schedule_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(schedule_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN schedule_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN absence_policy_id DROP DEFAULT,
|
|
ALTER COLUMN absence_policy_id SET DATA TYPE UUID USING ( CASE WHEN (absence_policy_id IS NOT NULL) THEN CASE WHEN (absence_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (absence_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(absence_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN absence_policy_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN branch_id DROP DEFAULT,
|
|
ALTER COLUMN branch_id SET DATA TYPE UUID USING ( CASE WHEN (branch_id IS NOT NULL) THEN CASE WHEN (branch_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (branch_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(branch_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN branch_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN department_id DROP DEFAULT,
|
|
ALTER COLUMN department_id SET DATA TYPE UUID USING ( CASE WHEN (department_id IS NOT NULL) THEN CASE WHEN (department_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (department_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(department_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN department_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN job_id DROP DEFAULT,
|
|
ALTER COLUMN job_id SET DATA TYPE UUID USING ( CASE WHEN (job_id IS NOT NULL) THEN CASE WHEN (job_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (job_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(job_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN job_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN job_item_id DROP DEFAULT,
|
|
ALTER COLUMN job_item_id SET DATA TYPE UUID USING ( CASE WHEN (job_item_id IS NOT NULL) THEN CASE WHEN (job_item_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (job_item_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(job_item_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN job_item_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN replaced_id DROP DEFAULT,
|
|
ALTER COLUMN replaced_id SET DATA TYPE UUID USING ( CASE WHEN (replaced_id IS NOT NULL) THEN CASE WHEN (replaced_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (replaced_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(replaced_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN replaced_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN recurring_schedule_template_control_id DROP DEFAULT,
|
|
ALTER COLUMN recurring_schedule_template_control_id SET DATA TYPE UUID USING ( CASE WHEN (recurring_schedule_template_control_id IS NOT NULL) THEN CASE WHEN (recurring_schedule_template_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (recurring_schedule_template_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(recurring_schedule_template_control_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN recurring_schedule_template_control_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE schedule_policy ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN meal_policy_id SET DATA TYPE UUID USING ( CASE WHEN (meal_policy_id IS NOT NULL) THEN CASE WHEN (meal_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (meal_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(meal_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN over_time_policy_id SET DATA TYPE UUID USING ( CASE WHEN (over_time_policy_id IS NOT NULL) THEN CASE WHEN (over_time_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (over_time_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(over_time_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN partial_shift_absence_policy_id SET DATA TYPE UUID USING ( CASE WHEN (partial_shift_absence_policy_id IS NOT NULL) THEN CASE WHEN (partial_shift_absence_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (partial_shift_absence_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(partial_shift_absence_policy_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN full_shift_absence_policy_id SET DATA TYPE UUID USING ( CASE WHEN (full_shift_absence_policy_id IS NOT NULL) THEN CASE WHEN (full_shift_absence_policy_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (full_shift_absence_policy_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(full_shift_absence_policy_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN branch_id SET DATA TYPE UUID USING ( CASE WHEN (branch_id IS NOT NULL) THEN CASE WHEN (branch_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (branch_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(branch_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN department_id SET DATA TYPE UUID USING ( CASE WHEN (department_id IS NOT NULL) THEN CASE WHEN (department_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (department_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(department_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN job_id DROP DEFAULT,
|
|
ALTER COLUMN job_id SET DATA TYPE UUID USING ( CASE WHEN (job_id IS NOT NULL) THEN CASE WHEN (job_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (job_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(job_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN job_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN job_item_id DROP DEFAULT,
|
|
ALTER COLUMN job_item_id SET DATA TYPE UUID USING ( CASE WHEN (job_item_id IS NOT NULL) THEN CASE WHEN (job_item_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (job_item_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(job_item_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN job_item_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE station_branch ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE station_branch ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station_branch ALTER COLUMN station_id SET DATA TYPE UUID USING ( CASE WHEN (station_id IS NOT NULL) THEN CASE WHEN (station_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (station_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(station_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station_branch ALTER COLUMN branch_id SET DATA TYPE UUID USING ( CASE WHEN (branch_id IS NOT NULL) THEN CASE WHEN (branch_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (branch_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(branch_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station_department ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE station_department ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station_department ALTER COLUMN station_id SET DATA TYPE UUID USING ( CASE WHEN (station_id IS NOT NULL) THEN CASE WHEN (station_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (station_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(station_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station_department ALTER COLUMN department_id SET DATA TYPE UUID USING ( CASE WHEN (department_id IS NOT NULL) THEN CASE WHEN (department_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (department_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(department_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station_exclude_user ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE station_exclude_user ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station_exclude_user ALTER COLUMN station_id SET DATA TYPE UUID USING ( CASE WHEN (station_id IS NOT NULL) THEN CASE WHEN (station_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (station_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(station_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station_exclude_user ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station_include_user ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE station_include_user ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station_include_user ALTER COLUMN station_id SET DATA TYPE UUID USING ( CASE WHEN (station_id IS NOT NULL) THEN CASE WHEN (station_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (station_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(station_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station_include_user ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station_user ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE station_user ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station_user ALTER COLUMN station_id DROP DEFAULT;
|
|
ALTER TABLE station_user ALTER COLUMN station_id SET DATA TYPE UUID USING ( CASE WHEN (station_id IS NOT NULL) THEN CASE WHEN (station_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (station_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(station_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station_user ALTER COLUMN station_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE station_user ALTER COLUMN user_id DROP DEFAULT;
|
|
ALTER TABLE station_user ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station_user ALTER COLUMN user_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE station_user_group ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE station_user_group ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station_user_group ALTER COLUMN station_id SET DATA TYPE UUID USING ( CASE WHEN (station_id IS NOT NULL) THEN CASE WHEN (station_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (station_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(station_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE station_user_group ALTER COLUMN group_id SET DATA TYPE UUID USING ( CASE WHEN (group_id IS NOT NULL) THEN CASE WHEN (group_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (group_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(group_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE system_log ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN object_id SET DATA TYPE UUID USING ( CASE WHEN (object_id IS NOT NULL) THEN CASE WHEN (object_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (object_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(object_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE system_log_detail ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN system_log_id SET DATA TYPE UUID USING ( CASE WHEN (system_log_id IS NOT NULL) THEN CASE WHEN (system_log_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (system_log_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(system_log_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE system_setting ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE system_setting ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_contact ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE user_contact ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_contact ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_contact ALTER COLUMN ethnic_group_id SET DATA TYPE UUID USING ( CASE WHEN (ethnic_group_id IS NOT NULL) THEN CASE WHEN (ethnic_group_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (ethnic_group_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(ethnic_group_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_contact ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_contact ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_contact ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
TRUNCATE user_date;
|
|
ALTER TABLE user_date ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE user_date ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_date ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_date ALTER COLUMN pay_period_id SET DATA TYPE UUID USING ( CASE WHEN (pay_period_id IS NOT NULL) THEN CASE WHEN (pay_period_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_period_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_period_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_date ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_date ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_date ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_date_total ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_period_id SET DATA TYPE UUID USING ( CASE WHEN (pay_period_id IS NOT NULL) THEN CASE WHEN (pay_period_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_period_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_period_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN src_object_id DROP DEFAULT,
|
|
ALTER COLUMN src_object_id SET DATA TYPE UUID USING ( CASE WHEN (src_object_id IS NOT NULL) THEN CASE WHEN (src_object_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (src_object_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(src_object_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN src_object_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN pay_code_id DROP DEFAULT,
|
|
ALTER COLUMN pay_code_id SET DATA TYPE UUID USING ( CASE WHEN (pay_code_id IS NOT NULL) THEN CASE WHEN (pay_code_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_code_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_code_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN pay_code_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN punch_control_id DROP DEFAULT,
|
|
ALTER COLUMN punch_control_id SET DATA TYPE UUID USING ( CASE WHEN (punch_control_id IS NOT NULL) THEN CASE WHEN (punch_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (punch_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(punch_control_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN punch_control_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN branch_id DROP DEFAULT,
|
|
ALTER COLUMN branch_id SET DATA TYPE UUID USING ( CASE WHEN (branch_id IS NOT NULL) THEN CASE WHEN (branch_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (branch_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(branch_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN branch_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN department_id DROP DEFAULT,
|
|
ALTER COLUMN department_id SET DATA TYPE UUID USING ( CASE WHEN (department_id IS NOT NULL) THEN CASE WHEN (department_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (department_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(department_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN department_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN job_id DROP DEFAULT,
|
|
ALTER COLUMN job_id SET DATA TYPE UUID USING ( CASE WHEN (job_id IS NOT NULL) THEN CASE WHEN (job_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (job_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(job_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN job_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN job_item_id DROP DEFAULT,
|
|
ALTER COLUMN job_item_id SET DATA TYPE UUID USING ( CASE WHEN (job_item_id IS NOT NULL) THEN CASE WHEN (job_item_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (job_item_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(job_item_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN job_item_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN currency_id DROP DEFAULT,
|
|
ALTER COLUMN currency_id SET DATA TYPE UUID USING ( CASE WHEN (currency_id IS NOT NULL) THEN CASE WHEN (currency_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (currency_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(currency_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN currency_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_deduction ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_deduction_id SET DATA TYPE UUID USING ( CASE WHEN (company_deduction_id IS NOT NULL) THEN CASE WHEN (company_deduction_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_deduction_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_deduction_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_default ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE user_default ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_default ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_default ALTER COLUMN pay_period_schedule_id SET DATA TYPE UUID USING ( CASE WHEN (pay_period_schedule_id IS NOT NULL) THEN CASE WHEN (pay_period_schedule_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (pay_period_schedule_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(pay_period_schedule_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_default ALTER COLUMN policy_group_id SET DATA TYPE UUID USING ( CASE WHEN (policy_group_id IS NOT NULL) THEN CASE WHEN (policy_group_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (policy_group_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(policy_group_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_default ALTER COLUMN title_id SET DATA TYPE UUID USING ( CASE WHEN (title_id IS NOT NULL) THEN CASE WHEN (title_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (title_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(title_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_default ALTER COLUMN default_branch_id SET DATA TYPE UUID USING ( CASE WHEN (default_branch_id IS NOT NULL) THEN CASE WHEN (default_branch_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (default_branch_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(default_branch_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_default ALTER COLUMN default_department_id SET DATA TYPE UUID USING ( CASE WHEN (default_department_id IS NOT NULL) THEN CASE WHEN (default_department_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (default_department_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(default_department_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_default ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_default ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_default ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_default ALTER COLUMN currency_id SET DATA TYPE UUID USING ( CASE WHEN (currency_id IS NOT NULL) THEN CASE WHEN (currency_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (currency_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(currency_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_default ALTER COLUMN permission_control_id SET DATA TYPE UUID USING ( CASE WHEN (permission_control_id IS NOT NULL) THEN CASE WHEN (permission_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (permission_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(permission_control_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_default ALTER COLUMN legal_entity_id DROP DEFAULT;
|
|
ALTER TABLE user_default ALTER COLUMN legal_entity_id SET DATA TYPE UUID USING ( CASE WHEN (legal_entity_id IS NOT NULL) THEN CASE WHEN (legal_entity_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (legal_entity_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(legal_entity_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_default ALTER COLUMN legal_entity_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE user_default_company_deduction ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE user_default_company_deduction ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_default_company_deduction ALTER COLUMN user_default_id SET DATA TYPE UUID USING ( CASE WHEN (user_default_id IS NOT NULL) THEN CASE WHEN (user_default_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_default_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_default_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_default_company_deduction ALTER COLUMN company_deduction_id SET DATA TYPE UUID USING ( CASE WHEN (company_deduction_id IS NOT NULL) THEN CASE WHEN (company_deduction_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_deduction_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_deduction_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_education ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE user_education ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_education ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_education ALTER COLUMN qualification_id SET DATA TYPE UUID USING ( CASE WHEN (qualification_id IS NOT NULL) THEN CASE WHEN (qualification_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (qualification_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(qualification_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_education ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_education ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_education ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_generic_data ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_generic_status ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN batch_id SET DATA TYPE UUID USING ( CASE WHEN (batch_id IS NOT NULL) THEN CASE WHEN (batch_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (batch_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(batch_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_group ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN parent_id DROP DEFAULT,
|
|
ALTER COLUMN parent_id SET DATA TYPE UUID USING ( CASE WHEN (parent_id IS NOT NULL) THEN CASE WHEN (parent_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (parent_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(parent_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN parent_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE user_identification ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_language ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE user_language ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_language ALTER COLUMN user_id DROP DEFAULT;
|
|
ALTER TABLE user_language ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_language ALTER COLUMN user_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE user_language ALTER COLUMN qualification_id SET DATA TYPE UUID USING ( CASE WHEN (qualification_id IS NOT NULL) THEN CASE WHEN (qualification_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (qualification_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(qualification_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_language ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_language ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_language ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_license ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE user_license ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_license ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_license ALTER COLUMN qualification_id SET DATA TYPE UUID USING ( CASE WHEN (qualification_id IS NOT NULL) THEN CASE WHEN (qualification_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (qualification_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(qualification_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_license ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_license ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_license ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_membership ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE user_membership ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_membership ALTER COLUMN user_id DROP DEFAULT;
|
|
ALTER TABLE user_membership ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_membership ALTER COLUMN user_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE user_membership ALTER COLUMN qualification_id SET DATA TYPE UUID USING ( CASE WHEN (qualification_id IS NOT NULL) THEN CASE WHEN (qualification_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (qualification_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(qualification_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_membership ALTER COLUMN currency_id SET DATA TYPE UUID USING ( CASE WHEN (currency_id IS NOT NULL) THEN CASE WHEN (currency_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (currency_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(currency_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_membership ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_membership ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_membership ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_preference ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_report_data ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_review ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE user_review ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_review ALTER COLUMN user_review_control_id SET DATA TYPE UUID USING ( CASE WHEN (user_review_control_id IS NOT NULL) THEN CASE WHEN (user_review_control_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_review_control_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_review_control_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_review ALTER COLUMN kpi_id SET DATA TYPE UUID USING ( CASE WHEN (kpi_id IS NOT NULL) THEN CASE WHEN (kpi_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (kpi_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(kpi_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_review ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_review ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_review ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_review_control ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE user_review_control ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_review_control ALTER COLUMN user_id DROP DEFAULT;
|
|
ALTER TABLE user_review_control ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_review_control ALTER COLUMN user_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE user_review_control ALTER COLUMN reviewer_user_id DROP DEFAULT;
|
|
ALTER TABLE user_review_control ALTER COLUMN reviewer_user_id SET DATA TYPE UUID USING ( CASE WHEN (reviewer_user_id IS NOT NULL) THEN CASE WHEN (reviewer_user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (reviewer_user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(reviewer_user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_review_control ALTER COLUMN reviewer_user_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE user_review_control ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_review_control ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_review_control ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_setting ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE user_setting ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_setting ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_setting ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_setting ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_setting ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_skill ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE user_skill ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_skill ALTER COLUMN user_id DROP DEFAULT;
|
|
ALTER TABLE user_skill ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_skill ALTER COLUMN user_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE user_skill ALTER COLUMN qualification_id SET DATA TYPE UUID USING ( CASE WHEN (qualification_id IS NOT NULL) THEN CASE WHEN (qualification_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (qualification_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(qualification_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_skill ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_skill ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_skill ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_title ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE user_title ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_title ALTER COLUMN company_id DROP DEFAULT;
|
|
ALTER TABLE user_title ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_title ALTER COLUMN company_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE user_title ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_title ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_title ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE user_wage ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN user_id SET DATA TYPE UUID USING ( CASE WHEN (user_id IS NOT NULL) THEN CASE WHEN (user_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (user_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(user_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN wage_group_id DROP DEFAULT,
|
|
ALTER COLUMN wage_group_id SET DATA TYPE UUID USING ( CASE WHEN (wage_group_id IS NOT NULL) THEN CASE WHEN (wage_group_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (wage_group_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(wage_group_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN wage_group_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE users ALTER COLUMN id DROP DEFAULT,
|
|
ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN title_id SET DATA TYPE UUID USING ( CASE WHEN (title_id IS NOT NULL) THEN CASE WHEN (title_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (title_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(title_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN default_branch_id SET DATA TYPE UUID USING ( CASE WHEN (default_branch_id IS NOT NULL) THEN CASE WHEN (default_branch_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (default_branch_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(default_branch_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN default_department_id SET DATA TYPE UUID USING ( CASE WHEN (default_department_id IS NOT NULL) THEN CASE WHEN (default_department_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (default_department_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(default_department_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN group_id DROP DEFAULT,
|
|
ALTER COLUMN group_id SET DATA TYPE UUID USING ( CASE WHEN (group_id IS NOT NULL) THEN CASE WHEN (group_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (group_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(group_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN group_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN currency_id SET DATA TYPE UUID USING ( CASE WHEN (currency_id IS NOT NULL) THEN CASE WHEN (currency_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (currency_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(currency_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN ethnic_group_id DROP DEFAULT,
|
|
ALTER COLUMN ethnic_group_id SET DATA TYPE UUID USING ( CASE WHEN (ethnic_group_id IS NOT NULL) THEN CASE WHEN (ethnic_group_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (ethnic_group_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(ethnic_group_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN ethnic_group_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN default_job_id DROP DEFAULT,
|
|
ALTER COLUMN default_job_id SET DATA TYPE UUID USING ( CASE WHEN (default_job_id IS NOT NULL) THEN CASE WHEN (default_job_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (default_job_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(default_job_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN default_job_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN default_job_item_id DROP DEFAULT,
|
|
ALTER COLUMN default_job_item_id SET DATA TYPE UUID USING ( CASE WHEN (default_job_item_id IS NOT NULL) THEN CASE WHEN (default_job_item_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (default_job_item_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(default_job_item_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN default_job_item_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000'),
|
|
ALTER COLUMN legal_entity_id DROP DEFAULT,
|
|
ALTER COLUMN legal_entity_id SET DATA TYPE UUID USING ( CASE WHEN (legal_entity_id IS NOT NULL) THEN CASE WHEN (legal_entity_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (legal_entity_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(legal_entity_id), 12, '0'))) END END ELSE NULL END ),
|
|
ALTER COLUMN legal_entity_id SET DEFAULT uuid('00000000-0000-0000-0000-000000000000');
|
|
ALTER TABLE wage_group ALTER COLUMN id DROP DEFAULT;
|
|
ALTER TABLE wage_group ALTER COLUMN id SET DATA TYPE UUID USING ( CASE WHEN (id IS NOT NULL) THEN CASE WHEN (id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE wage_group ALTER COLUMN company_id SET DATA TYPE UUID USING ( CASE WHEN (company_id IS NOT NULL) THEN CASE WHEN (company_id = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (company_id = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(company_id), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE wage_group ALTER COLUMN created_by SET DATA TYPE UUID USING ( CASE WHEN (created_by IS NOT NULL) THEN CASE WHEN (created_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (created_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(created_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE wage_group ALTER COLUMN updated_by SET DATA TYPE UUID USING ( CASE WHEN (updated_by IS NOT NULL) THEN CASE WHEN (updated_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (updated_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(updated_by), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE wage_group ALTER COLUMN deleted_by SET DATA TYPE UUID USING ( CASE WHEN (deleted_by IS NOT NULL) THEN CASE WHEN (deleted_by = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (deleted_by = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(deleted_by), 12, '0'))) END END ELSE NULL END );
|
|
|
|
ALTER TABLE pay_stub_entry_account_link ALTER COLUMN total_gross SET DATA TYPE UUID USING ( CASE WHEN (total_gross IS NOT NULL) THEN CASE WHEN (total_gross = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (total_gross = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(total_gross), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_stub_entry_account_link ALTER COLUMN total_employee_deduction SET DATA TYPE UUID USING ( CASE WHEN (total_employee_deduction IS NOT NULL) THEN CASE WHEN (total_employee_deduction = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (total_employee_deduction = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(total_employee_deduction), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_stub_entry_account_link ALTER COLUMN total_employer_deduction SET DATA TYPE UUID USING ( CASE WHEN (total_employer_deduction IS NOT NULL) THEN CASE WHEN (total_employer_deduction = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (total_employer_deduction = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(total_employer_deduction), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_stub_entry_account_link ALTER COLUMN total_net_pay SET DATA TYPE UUID USING ( CASE WHEN (total_net_pay IS NOT NULL) THEN CASE WHEN (total_net_pay = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (total_net_pay = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(total_net_pay), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_stub_entry_account_link ALTER COLUMN regular_time SET DATA TYPE UUID USING ( CASE WHEN (regular_time IS NOT NULL) THEN CASE WHEN (regular_time = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (regular_time = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(regular_time), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_stub_entry_account_link ALTER COLUMN employee_cpp SET DATA TYPE UUID USING ( CASE WHEN (employee_cpp IS NOT NULL) THEN CASE WHEN (employee_cpp = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (employee_cpp = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(employee_cpp), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE pay_stub_entry_account_link ALTER COLUMN employee_ei SET DATA TYPE UUID USING ( CASE WHEN (employee_ei IS NOT NULL) THEN CASE WHEN (employee_ei = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (employee_ei = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(employee_ei), 12, '0'))) END END ELSE NULL END );
|
|
|
|
ALTER TABLE company ALTER COLUMN admin_contact SET DATA TYPE UUID USING ( CASE WHEN (admin_contact IS NOT NULL) THEN CASE WHEN (admin_contact = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (admin_contact = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(admin_contact), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE company ALTER COLUMN billing_contact SET DATA TYPE UUID USING ( CASE WHEN (billing_contact IS NOT NULL) THEN CASE WHEN (billing_contact = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (billing_contact = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(billing_contact), 12, '0'))) END END ELSE NULL END );
|
|
ALTER TABLE company ALTER COLUMN support_contact SET DATA TYPE UUID USING ( CASE WHEN (support_contact IS NOT NULL) THEN CASE WHEN (support_contact = 0) THEN uuid('00000000-0000-0000-0000-000000000000') ELSE CASE WHEN (support_contact = -1) THEN uuid('ffffffff-ffff-ffff-ffff-ffffffffffff') ELSE uuid(concat('#UUID_PREFIX#-',lpad(text(support_contact), 12, '0'))) END END ELSE NULL END );
|
|
|
|
DROP SEQUENCE IF EXISTS accrual_id_seq;
|
|
DROP SEQUENCE IF EXISTS accrual_balance_id_seq;
|
|
DROP SEQUENCE IF EXISTS company_generic_map_id_seq;
|
|
DROP SEQUENCE IF EXISTS company_generic_tag_id_seq;
|
|
DROP SEQUENCE IF EXISTS company_generic_tag_map_id_seq;
|
|
DROP SEQUENCE IF EXISTS branch_id_seq;
|
|
DROP SEQUENCE IF EXISTS company_deduction_pay_stub_entry_account_id_seq;
|
|
DROP SEQUENCE IF EXISTS company_user_count_id_seq;
|
|
DROP SEQUENCE IF EXISTS company_deduction_id_seq;
|
|
DROP SEQUENCE IF EXISTS wage_group_id_seq;
|
|
DROP SEQUENCE IF EXISTS company_id_seq;
|
|
DROP SEQUENCE IF EXISTS company_setting_id_seq;
|
|
DROP SEQUENCE IF EXISTS station_user_id_seq;
|
|
DROP SEQUENCE IF EXISTS system_setting_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_date_total_id_seq;
|
|
DROP SEQUENCE IF EXISTS currency_id_seq;
|
|
DROP SEQUENCE IF EXISTS currency_rate_id_seq;
|
|
DROP SEQUENCE IF EXISTS system_log_detail_id_seq;
|
|
DROP SEQUENCE IF EXISTS station_exclude_user_id_seq;
|
|
DROP SEQUENCE IF EXISTS station_department_id_seq;
|
|
DROP SEQUENCE IF EXISTS station_include_user_id_seq;
|
|
DROP SEQUENCE IF EXISTS exception_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_date_id_seq;
|
|
DROP SEQUENCE IF EXISTS permission_id_seq;
|
|
DROP SEQUENCE IF EXISTS station_id_seq;
|
|
DROP SEQUENCE IF EXISTS station_user_group_id_seq;
|
|
DROP SEQUENCE IF EXISTS permission_control_id_seq;
|
|
DROP SEQUENCE IF EXISTS permission_user_id_seq;
|
|
DROP SEQUENCE IF EXISTS other_field_id_seq;
|
|
DROP SEQUENCE IF EXISTS station_branch_id_seq;
|
|
DROP SEQUENCE IF EXISTS authorizations_id_seq;
|
|
DROP SEQUENCE IF EXISTS system_log_id_seq;
|
|
DROP SEQUENCE IF EXISTS cron_id_seq;
|
|
DROP SEQUENCE IF EXISTS department_id_seq;
|
|
DROP SEQUENCE IF EXISTS department_branch_id_seq;
|
|
DROP SEQUENCE IF EXISTS department_branch_user_id_seq;
|
|
DROP SEQUENCE IF EXISTS help_group_id_seq;
|
|
DROP SEQUENCE IF EXISTS help_group_control_id_seq;
|
|
DROP SEQUENCE IF EXISTS help_id_seq;
|
|
DROP SEQUENCE IF EXISTS hierarchy_control_id_seq;
|
|
DROP SEQUENCE IF EXISTS hierarchy_user_id_seq;
|
|
DROP SEQUENCE IF EXISTS hierarchy_level_id_seq;
|
|
DROP SEQUENCE IF EXISTS hierarchy_share_id_seq;
|
|
DROP SEQUENCE IF EXISTS hierarchy_object_type_id_seq;
|
|
DROP SEQUENCE IF EXISTS recurring_holiday_id_seq;
|
|
DROP SEQUENCE IF EXISTS holidays_id_seq;
|
|
DROP SEQUENCE IF EXISTS message_id_seq;
|
|
DROP SEQUENCE IF EXISTS message_recipient_id_seq;
|
|
DROP SEQUENCE IF EXISTS message_sender_id_seq;
|
|
DROP SEQUENCE IF EXISTS message_control_id_seq;
|
|
DROP SEQUENCE IF EXISTS roe_id_seq;
|
|
DROP SEQUENCE IF EXISTS pay_period_time_sheet_verify_id_seq;
|
|
DROP SEQUENCE IF EXISTS pay_period_id_seq;
|
|
DROP SEQUENCE IF EXISTS pay_period_schedule_id_seq;
|
|
DROP SEQUENCE IF EXISTS pay_period_schedule_user_id_seq;
|
|
DROP SEQUENCE IF EXISTS pay_stub_entry_id_seq;
|
|
DROP SEQUENCE IF EXISTS pay_stub_id_seq;
|
|
DROP SEQUENCE IF EXISTS pay_stub_entry_account_link_id_seq;
|
|
DROP SEQUENCE IF EXISTS pay_stub_entry_account_id_seq;
|
|
DROP SEQUENCE IF EXISTS recurring_ps_amendment_id_seq;
|
|
DROP SEQUENCE IF EXISTS recurring_ps_amendment_user_id_seq;
|
|
DROP SEQUENCE IF EXISTS pay_stub_amendment_id_seq;
|
|
DROP SEQUENCE IF EXISTS pay_stub_transaction_id_seq;
|
|
DROP SEQUENCE IF EXISTS payroll_remittance_agency_event_id_seq;
|
|
DROP SEQUENCE IF EXISTS exception_policy_id_seq;
|
|
DROP SEQUENCE IF EXISTS premium_policy_department_id_seq;
|
|
DROP SEQUENCE IF EXISTS round_interval_policy_id_seq;
|
|
DROP SEQUENCE IF EXISTS holiday_policy_recurring_holiday_id_seq;
|
|
DROP SEQUENCE IF EXISTS meal_policy_id_seq;
|
|
DROP SEQUENCE IF EXISTS premium_policy_id_seq;
|
|
DROP SEQUENCE IF EXISTS pay_code_id_seq;
|
|
DROP SEQUENCE IF EXISTS pay_formula_policy_id_seq;
|
|
DROP SEQUENCE IF EXISTS contributing_pay_code_policy_id_seq;
|
|
DROP SEQUENCE IF EXISTS contributing_shift_policy_id_seq;
|
|
DROP SEQUENCE IF EXISTS regular_time_policy_id_seq;
|
|
DROP SEQUENCE IF EXISTS over_time_policy_id_seq;
|
|
DROP SEQUENCE IF EXISTS schedule_policy_id_seq;
|
|
DROP SEQUENCE IF EXISTS break_policy_id_seq;
|
|
DROP SEQUENCE IF EXISTS holiday_policy_id_seq;
|
|
DROP SEQUENCE IF EXISTS exception_policy_control_id_seq;
|
|
DROP SEQUENCE IF EXISTS premium_policy_branch_id_seq;
|
|
DROP SEQUENCE IF EXISTS policy_group_id_seq;
|
|
DROP SEQUENCE IF EXISTS accrual_policy_id_seq;
|
|
DROP SEQUENCE IF EXISTS accrual_policy_account_id_seq;
|
|
DROP SEQUENCE IF EXISTS accrual_policy_milestone_id_seq;
|
|
DROP SEQUENCE IF EXISTS policy_group_user_id_seq;
|
|
DROP SEQUENCE IF EXISTS absence_policy_id_seq;
|
|
DROP SEQUENCE IF EXISTS punch_control_id_seq;
|
|
DROP SEQUENCE IF EXISTS punch_id_seq;
|
|
DROP SEQUENCE IF EXISTS request_id_seq;
|
|
DROP SEQUENCE IF EXISTS recurring_schedule_control_id_seq;
|
|
DROP SEQUENCE IF EXISTS schedule_id_seq;
|
|
DROP SEQUENCE IF EXISTS recurring_schedule_user_id_seq;
|
|
DROP SEQUENCE IF EXISTS recurring_schedule_template_control_id_seq;
|
|
DROP SEQUENCE IF EXISTS recurring_schedule_template_id_seq;
|
|
DROP SEQUENCE IF EXISTS recurring_schedule_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_identification_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_generic_data_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_preference_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_title_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_default_company_deduction_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_wage_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_default_id_seq;
|
|
DROP SEQUENCE IF EXISTS users_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_generic_status_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_deduction_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_report_data_id_seq;
|
|
DROP SEQUENCE IF EXISTS bank_account_id_seq;
|
|
DROP SEQUENCE IF EXISTS qualification_id_seq;
|
|
DROP SEQUENCE IF EXISTS qualification_group_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_skill_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_education_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_license_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_language_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_membership_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_group_id_seq;
|
|
DROP SEQUENCE IF EXISTS kpi_id_seq;
|
|
DROP SEQUENCE IF EXISTS kpi_group_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_review_control_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_review_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_contact_id_seq;
|
|
DROP SEQUENCE IF EXISTS user_setting_id_seq;
|
|
DROP SEQUENCE IF EXISTS ethnic_group_id_seq;
|
|
DROP SEQUENCE IF EXISTS legal_entity_id_seq;
|
|
DROP SEQUENCE IF EXISTS payroll_remittance_agency_id_seq;
|
|
DROP SEQUENCE IF EXISTS remittance_source_account_id_seq;
|
|
DROP SEQUENCE IF EXISTS remittance_destination_account_id_seq;
|