TimeTrex/classes/modules/install/sql/postgresql/1004A.sql

382 lines
31 KiB
SQL

alter table "round_interval_policy" rename column "interval" to "round_interval";
drop table holiday;
drop table "round_policy";
drop table "user_tax";
alter table "user" rename to "users";
alter table "user_id_seq" rename to "users_id_seq";
alter table "absence_policy" alter column deleted drop default;
alter table "absence_policy" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "absence_policy" alter column deleted set default 0;
alter table "accrual" alter column deleted drop default;
alter table "accrual" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "accrual" alter column deleted set default 0;
alter table "accrual_balance" alter column deleted drop default;
alter table "accrual_balance" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "accrual_balance" alter column deleted set default 0;
alter table "accrual_policy" alter column deleted drop default;
alter table "accrual_policy" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "accrual_policy" alter column deleted set default 0;
alter table "authorizations" alter column deleted drop default;
alter table "authorizations" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "authorizations" alter column deleted set default 0;
alter table "bank_account" alter column deleted drop default;
alter table "bank_account" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "bank_account" alter column deleted set default 0;
alter table "branch" alter column deleted drop default;
alter table "branch" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "branch" alter column deleted set default 0;
alter table "company" alter column deleted drop default;
alter table "company" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "company" alter column deleted set default 0;
alter table "company_deduction" alter column deleted drop default;
alter table "company_deduction" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "company_deduction" alter column deleted set default 0;
alter table "cron" alter column deleted drop default;
alter table "cron" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "cron" alter column deleted set default 0;
alter table "department" alter column deleted drop default;
alter table "department" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "department" alter column deleted set default 0;
alter table "exception" alter column deleted drop default;
alter table "exception" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "exception" alter column deleted set default 0;
alter table "exception_policy" alter column deleted drop default;
alter table "exception_policy" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "exception_policy" alter column deleted set default 0;
alter table "exception_policy_control" alter column deleted drop default;
alter table "exception_policy_control" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "exception_policy_control" alter column deleted set default 0;
alter table "help" alter column deleted drop default;
alter table "help" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "help" alter column deleted set default 0;
alter table "help_group_control" alter column deleted drop default;
alter table "help_group_control" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "help_group_control" alter column deleted set default 0;
alter table "hierarchy_control" alter column deleted drop default;
alter table "hierarchy_control" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "hierarchy_control" alter column deleted set default 0;
alter table "holiday_policy" alter column deleted drop default;
alter table "holiday_policy" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "holiday_policy" alter column deleted set default 0;
alter table "holidays" alter column deleted drop default;
alter table "holidays" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "holidays" alter column deleted set default 0;
alter table "meal_policy" alter column deleted drop default;
alter table "meal_policy" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "meal_policy" alter column deleted set default 0;
alter table "message" alter column deleted drop default;
alter table "message" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "message" alter column deleted set default 0;
alter table "other_field" alter column deleted drop default;
alter table "other_field" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "other_field" alter column deleted set default 0;
alter table "over_time_policy" alter column deleted drop default;
alter table "over_time_policy" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "over_time_policy" alter column deleted set default 0;
alter table "pay_period" alter column deleted drop default;
alter table "pay_period" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "pay_period" alter column deleted set default 0;
alter table "pay_period_schedule" alter column deleted drop default;
alter table "pay_period_schedule" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "pay_period_schedule" alter column deleted set default 0;
alter table "pay_period_time_sheet_verify" alter column deleted drop default;
alter table "pay_period_time_sheet_verify" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "pay_period_time_sheet_verify" alter column deleted set default 0;
alter table "pay_stub" alter column deleted drop default;
alter table "pay_stub" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "pay_stub" alter column deleted set default 0;
alter table "pay_stub_amendment" alter column deleted drop default;
alter table "pay_stub_amendment" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "pay_stub_amendment" alter column deleted set default 0;
alter table "pay_stub_entry" alter column deleted drop default;
alter table "pay_stub_entry" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "pay_stub_entry" alter column deleted set default 0;
alter table "pay_stub_entry_account" alter column deleted drop default;
alter table "pay_stub_entry_account" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "pay_stub_entry_account" alter column deleted set default 0;
alter table "pay_stub_entry_account_link" alter column deleted drop default;
alter table "pay_stub_entry_account_link" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "pay_stub_entry_account_link" alter column deleted set default 0;
alter table "permission" alter column deleted drop default;
alter table "permission" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "permission" alter column deleted set default 0;
alter table "policy_group" alter column deleted drop default;
alter table "policy_group" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "policy_group" alter column deleted set default 0;
alter table "premium_policy" alter column deleted drop default;
alter table "premium_policy" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "premium_policy" alter column deleted set default 0;
alter table "punch" alter column deleted drop default;
alter table "punch" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "punch" alter column deleted set default 0;
alter table "punch_control" alter column deleted drop default;
alter table "punch_control" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "punch_control" alter column deleted set default 0;
alter table "recurring_holiday" alter column deleted drop default;
alter table "recurring_holiday" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "recurring_holiday" alter column deleted set default 0;
alter table "recurring_ps_amendment" alter column deleted drop default;
alter table "recurring_ps_amendment" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "recurring_ps_amendment" alter column deleted set default 0;
alter table "recurring_schedule_control" alter column deleted drop default;
alter table "recurring_schedule_control" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "recurring_schedule_control" alter column deleted set default 0;
alter table "recurring_schedule_template" alter column deleted drop default;
alter table "recurring_schedule_template" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "recurring_schedule_template" alter column deleted set default 0;
alter table "recurring_schedule_template_control" alter column deleted drop default;
alter table "recurring_schedule_template_control" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "recurring_schedule_template_control" alter column deleted set default 0;
alter table "request" alter column deleted drop default;
alter table "request" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "request" alter column deleted set default 0;
alter table "roe" alter column deleted drop default;
alter table "roe" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "roe" alter column deleted set default 0;
alter table "round_interval_policy" alter column deleted drop default;
alter table "round_interval_policy" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "round_interval_policy" alter column deleted set default 0;
alter table "schedule" alter column deleted drop default;
alter table "schedule" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "schedule" alter column deleted set default 0;
alter table "schedule_policy" alter column deleted drop default;
alter table "schedule_policy" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "schedule_policy" alter column deleted set default 0;
alter table "station" alter column deleted drop default;
alter table "station" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "station" alter column deleted set default 0;
alter table "user_date" alter column deleted drop default;
alter table "user_date" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "user_date" alter column deleted set default 0;
alter table "user_date_total" alter column deleted drop default;
alter table "user_date_total" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "user_date_total" alter column deleted set default 0;
alter table "user_deduction" alter column deleted drop default;
alter table "user_deduction" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "user_deduction" alter column deleted set default 0;
alter table "user_default" alter column deleted drop default;
alter table "user_default" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "user_default" alter column deleted set default 0;
alter table "user_generic_data" alter column deleted drop default;
alter table "user_generic_data" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "user_generic_data" alter column deleted set default 0;
alter table "user_pay_period_total" alter column deleted drop default;
alter table "user_pay_period_total" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "user_pay_period_total" alter column deleted set default 0;
alter table "user_preference" alter column deleted drop default;
alter table "user_preference" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "user_preference" alter column deleted set default 0;
alter table "user_title" alter column deleted drop default;
alter table "user_title" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "user_title" alter column deleted set default 0;
alter table "user_wage" alter column deleted drop default;
alter table "user_wage" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "user_wage" alter column deleted set default 0;
alter table "users" alter column deleted drop default;
alter table "users" alter column deleted type smallint USING CASE WHEN deleted = 't' THEN 1 ELSE 0 END;
alter table "users" alter column deleted set default 0;
alter table "absence_policy" alter column over_time drop default;
alter table "absence_policy" alter column over_time type smallint USING CASE WHEN over_time = 't' THEN 1 ELSE 0 END;
alter table "absence_policy" alter column over_time set default 0;
alter table "authorizations" alter column authorized drop default;
alter table "authorizations" alter column authorized type smallint USING CASE WHEN authorized = 't' THEN 1 ELSE 0 END;
alter table "authorizations" alter column authorized set default 0;
alter table "company_deduction" alter column lock_user_value1 drop default;
alter table "company_deduction" alter column lock_user_value1 type smallint USING CASE WHEN lock_user_value1 = 't' THEN 1 ELSE 0 END;
alter table "company_deduction" alter column lock_user_value1 set default 0;
alter table "company_deduction" alter column lock_user_value2 drop default;
alter table "company_deduction" alter column lock_user_value2 type smallint USING CASE WHEN lock_user_value2 = 't' THEN 1 ELSE 0 END;
alter table "company_deduction" alter column lock_user_value2 set default 0;
alter table "company_deduction" alter column lock_user_value3 drop default;
alter table "company_deduction" alter column lock_user_value3 type smallint USING CASE WHEN lock_user_value3 = 't' THEN 1 ELSE 0 END;
alter table "company_deduction" alter column lock_user_value3 set default 0;
alter table "company_deduction" alter column lock_user_value4 drop default;
alter table "company_deduction" alter column lock_user_value4 type smallint USING CASE WHEN lock_user_value4 = 't' THEN 1 ELSE 0 END;
alter table "company_deduction" alter column lock_user_value4 set default 0;
alter table "company_deduction" alter column lock_user_value5 drop default;
alter table "company_deduction" alter column lock_user_value5 type smallint USING CASE WHEN lock_user_value5 = 't' THEN 1 ELSE 0 END;
alter table "company_deduction" alter column lock_user_value5 set default 0;
alter table "company_deduction" alter column lock_user_value6 drop default;
alter table "company_deduction" alter column lock_user_value6 type smallint USING CASE WHEN lock_user_value6 = 't' THEN 1 ELSE 0 END;
alter table "company_deduction" alter column lock_user_value6 set default 0;
alter table "company_deduction" alter column lock_user_value7 drop default;
alter table "company_deduction" alter column lock_user_value7 type smallint USING CASE WHEN lock_user_value7 = 't' THEN 1 ELSE 0 END;
alter table "company_deduction" alter column lock_user_value7 set default 0;
alter table "company_deduction" alter column lock_user_value8 drop default;
alter table "company_deduction" alter column lock_user_value8 type smallint USING CASE WHEN lock_user_value8 = 't' THEN 1 ELSE 0 END;
alter table "company_deduction" alter column lock_user_value8 set default 0;
alter table "company_deduction" alter column lock_user_value9 drop default;
alter table "company_deduction" alter column lock_user_value9 type smallint USING CASE WHEN lock_user_value9 = 't' THEN 1 ELSE 0 END;
alter table "company_deduction" alter column lock_user_value9 set default 0;
alter table "company_deduction" alter column lock_user_value10 drop default;
alter table "company_deduction" alter column lock_user_value10 type smallint USING CASE WHEN lock_user_value10 = 't' THEN 1 ELSE 0 END;
alter table "company_deduction" alter column lock_user_value10 set default 0;
alter table "exception" alter column enable_demerit drop default;
alter table "exception" alter column enable_demerit type smallint USING CASE WHEN enable_demerit = 't' THEN 1 ELSE 0 END;
alter table "exception" alter column enable_demerit set default 0;
alter table "exception_policy" alter column active drop default;
alter table "exception_policy" alter column active type smallint USING CASE WHEN active = 't' THEN 1 ELSE 0 END;
alter table "exception_policy" alter column active set default 0;
alter table "help" alter column private drop default;
alter table "help" alter column private type smallint USING CASE WHEN private = 't' THEN 1 ELSE 0 END;
alter table "help" alter column private set default 0;
alter table "holiday_policy" alter column include_over_time drop default;
alter table "holiday_policy" alter column include_over_time type smallint USING CASE WHEN include_over_time = 't' THEN 1 ELSE 0 END;
alter table "holiday_policy" alter column include_over_time set default 0;
alter table "holiday_policy" alter column include_paid_absence_time drop default;
alter table "holiday_policy" alter column include_paid_absence_time type smallint USING CASE WHEN include_paid_absence_time = 't' THEN 1 ELSE 0 END;
alter table "holiday_policy" alter column include_paid_absence_time set default 0;
alter table "holiday_policy" alter column force_over_time_policy drop default;
alter table "holiday_policy" alter column force_over_time_policy type smallint USING CASE WHEN force_over_time_policy = 't' THEN 1 ELSE 0 END;
alter table "holiday_policy" alter column force_over_time_policy set default 0;
alter table "holiday_policy" alter column average_time_worked_days drop default;
alter table "holiday_policy" alter column average_time_worked_days type smallint USING CASE WHEN average_time_worked_days = 't' THEN 1 ELSE 0 END;
alter table "holiday_policy" alter column average_time_worked_days set default 0;
alter table "message" alter column require_ack drop default;
alter table "message" alter column require_ack type smallint USING CASE WHEN require_ack = 't' THEN 1 ELSE 0 END;
alter table "message" alter column require_ack set default 0;
alter table "message" alter column ack drop default;
alter table "message" alter column ack type smallint USING CASE WHEN ack = 't' THEN 1 ELSE 0 END;
alter table "message" alter column ack set default 0;
alter table "other_field" alter column required_other_id1 drop default;
alter table "other_field" alter column required_other_id1 type smallint USING CASE WHEN required_other_id1 = 't' THEN 1 ELSE 0 END;
alter table "other_field" alter column required_other_id1 set default 0;
alter table "other_field" alter column required_other_id2 drop default;
alter table "other_field" alter column required_other_id2 type smallint USING CASE WHEN required_other_id2 = 't' THEN 1 ELSE 0 END;
alter table "other_field" alter column required_other_id2 set default 0;
alter table "other_field" alter column required_other_id3 drop default;
alter table "other_field" alter column required_other_id3 type smallint USING CASE WHEN required_other_id3 = 't' THEN 1 ELSE 0 END;
alter table "other_field" alter column required_other_id3 set default 0;
alter table "other_field" alter column required_other_id4 drop default;
alter table "other_field" alter column required_other_id4 type smallint USING CASE WHEN required_other_id4 = 't' THEN 1 ELSE 0 END;
alter table "other_field" alter column required_other_id4 set default 0;
alter table "other_field" alter column required_other_id5 drop default;
alter table "other_field" alter column required_other_id5 type smallint USING CASE WHEN required_other_id5 = 't' THEN 1 ELSE 0 END;
alter table "other_field" alter column required_other_id5 set default 0;
alter table "other_field" alter column required_other_id6 drop default;
alter table "other_field" alter column required_other_id6 type smallint USING CASE WHEN required_other_id6 = 't' THEN 1 ELSE 0 END;
alter table "other_field" alter column required_other_id6 set default 0;
alter table "other_field" alter column required_other_id7 drop default;
alter table "other_field" alter column required_other_id7 type smallint USING CASE WHEN required_other_id7 = 't' THEN 1 ELSE 0 END;
alter table "other_field" alter column required_other_id7 set default 0;
alter table "other_field" alter column required_other_id8 drop default;
alter table "other_field" alter column required_other_id8 type smallint USING CASE WHEN required_other_id8 = 't' THEN 1 ELSE 0 END;
alter table "other_field" alter column required_other_id8 set default 0;
alter table "other_field" alter column required_other_id9 drop default;
alter table "other_field" alter column required_other_id9 type smallint USING CASE WHEN required_other_id9 = 't' THEN 1 ELSE 0 END;
alter table "other_field" alter column required_other_id9 set default 0;
alter table "other_field" alter column required_other_id10 drop default;
alter table "other_field" alter column required_other_id10 type smallint USING CASE WHEN required_other_id10 = 't' THEN 1 ELSE 0 END;
alter table "other_field" alter column required_other_id10 set default 0;
alter table "pay_period" alter column is_primary drop default;
alter table "pay_period" alter column is_primary type smallint USING CASE WHEN is_primary = 't' THEN 1 ELSE 0 END;
alter table "pay_period" alter column is_primary set default 0;
alter table "pay_period" alter column tainted drop default;
alter table "pay_period" alter column tainted type smallint USING CASE WHEN tainted = 't' THEN 1 ELSE 0 END;
alter table "pay_period" alter column tainted set default 0;
alter table "pay_period_schedule" alter column primary_date_ldom drop default;
alter table "pay_period_schedule" alter column primary_date_ldom type smallint USING CASE WHEN primary_date_ldom = 't' THEN 1 ELSE 0 END;
alter table "pay_period_schedule" alter column primary_date_ldom set default 0;
alter table "pay_period_schedule" alter column primary_transaction_date_ldom drop default;
alter table "pay_period_schedule" alter column primary_transaction_date_ldom type smallint USING CASE WHEN primary_transaction_date_ldom = 't' THEN 1 ELSE 0 END;
alter table "pay_period_schedule" alter column primary_transaction_date_ldom set default 0;
alter table "pay_period_schedule" alter column primary_transaction_date_bd drop default;
alter table "pay_period_schedule" alter column primary_transaction_date_bd type smallint USING CASE WHEN primary_transaction_date_bd = 't' THEN 1 ELSE 0 END;
alter table "pay_period_schedule" alter column primary_transaction_date_bd set default 0;
alter table "pay_period_schedule" alter column secondary_date_ldom drop default;
alter table "pay_period_schedule" alter column secondary_date_ldom type smallint USING CASE WHEN secondary_date_ldom = 't' THEN 1 ELSE 0 END;
alter table "pay_period_schedule" alter column secondary_date_ldom set default 0;
alter table "pay_period_schedule" alter column secondary_transaction_date_ldom drop default;
alter table "pay_period_schedule" alter column secondary_transaction_date_ldom type smallint USING CASE WHEN secondary_transaction_date_ldom = 't' THEN 1 ELSE 0 END;
alter table "pay_period_schedule" alter column secondary_transaction_date_ldom set default 0;
alter table "pay_period_schedule" alter column secondary_transaction_date_bd drop default;
alter table "pay_period_schedule" alter column secondary_transaction_date_bd type smallint USING CASE WHEN secondary_transaction_date_bd = 't' THEN 1 ELSE 0 END;
alter table "pay_period_schedule" alter column secondary_transaction_date_bd set default 0;
alter table "pay_period_time_sheet_verify" alter column authorized drop default;
alter table "pay_period_time_sheet_verify" alter column authorized type smallint USING CASE WHEN authorized = 't' THEN 1 ELSE 0 END;
alter table "pay_period_time_sheet_verify" alter column authorized set default 0;
alter table "pay_stub" alter column advance drop default;
alter table "pay_stub" alter column advance type smallint USING CASE WHEN advance = 't' THEN 1 ELSE 0 END;
alter table "pay_stub" alter column advance set default 0;
alter table "pay_stub" alter column tainted drop default;
alter table "pay_stub" alter column tainted type smallint USING CASE WHEN tainted = 't' THEN 1 ELSE 0 END;
alter table "pay_stub" alter column tainted set default 0;
alter table "pay_stub" alter column temp drop default;
alter table "pay_stub" alter column temp type smallint USING CASE WHEN temp = 't' THEN 1 ELSE 0 END;
alter table "pay_stub" alter column temp set default 0;
alter table "pay_stub_amendment" alter column authorized drop default;
alter table "pay_stub_amendment" alter column authorized type smallint USING CASE WHEN authorized = 't' THEN 1 ELSE 0 END;
alter table "pay_stub_amendment" alter column authorized set default 0;
alter table "pay_stub_amendment" alter column ytd_adjustment drop default;
alter table "pay_stub_amendment" alter column ytd_adjustment type smallint USING CASE WHEN ytd_adjustment = 't' THEN 1 ELSE 0 END;
alter table "pay_stub_amendment" alter column ytd_adjustment set default 0;
alter table "premium_policy" alter column sun drop default;
alter table "premium_policy" alter column sun type smallint USING CASE WHEN sun = 't' THEN 1 ELSE 0 END;
alter table "premium_policy" alter column sun set default 0;
alter table "premium_policy" alter column mon drop default;
alter table "premium_policy" alter column mon type smallint USING CASE WHEN mon = 't' THEN 1 ELSE 0 END;
alter table "premium_policy" alter column mon set default 0;
alter table "premium_policy" alter column tue drop default;
alter table "premium_policy" alter column tue type smallint USING CASE WHEN tue = 't' THEN 1 ELSE 0 END;
alter table "premium_policy" alter column tue set default 0;
alter table "premium_policy" alter column wed drop default;
alter table "premium_policy" alter column wed type smallint USING CASE WHEN wed = 't' THEN 1 ELSE 0 END;
alter table "premium_policy" alter column wed set default 0;
alter table "premium_policy" alter column thu drop default;
alter table "premium_policy" alter column thu type smallint USING CASE WHEN thu = 't' THEN 1 ELSE 0 END;
alter table "premium_policy" alter column thu set default 0;
alter table "premium_policy" alter column fri drop default;
alter table "premium_policy" alter column fri type smallint USING CASE WHEN fri = 't' THEN 1 ELSE 0 END;
alter table "premium_policy" alter column fri set default 0;
alter table "premium_policy" alter column sat drop default;
alter table "premium_policy" alter column sat type smallint USING CASE WHEN sat = 't' THEN 1 ELSE 0 END;
alter table "premium_policy" alter column sat set default 0;
alter table "punch" alter column transfer drop default;
alter table "punch" alter column transfer type smallint USING CASE WHEN transfer = 't' THEN 1 ELSE 0 END;
alter table "punch" alter column transfer set default 0;
alter table "punch_control" alter column overlap drop default;
alter table "punch_control" alter column overlap type smallint USING CASE WHEN overlap = 't' THEN 1 ELSE 0 END;
alter table "punch_control" alter column overlap set default 0;
alter table "recurring_holiday" alter column easter drop default;
alter table "recurring_holiday" alter column easter type smallint USING CASE WHEN easter = 't' THEN 1 ELSE 0 END;
alter table "recurring_holiday" alter column easter set default 0;
alter table "recurring_schedule_control" alter column auto_fill drop default;
alter table "recurring_schedule_control" alter column auto_fill type smallint USING CASE WHEN auto_fill = 't' THEN 1 ELSE 0 END;
alter table "recurring_schedule_control" alter column auto_fill set default 0;
alter table "recurring_schedule_template" alter column sun drop default;
alter table "recurring_schedule_template" alter column sun type smallint USING CASE WHEN sun = 't' THEN 1 ELSE 0 END;
alter table "recurring_schedule_template" alter column sun set default 0;
alter table "recurring_schedule_template" alter column mon drop default;
alter table "recurring_schedule_template" alter column mon type smallint USING CASE WHEN mon = 't' THEN 1 ELSE 0 END;
alter table "recurring_schedule_template" alter column mon set default 0;
alter table "recurring_schedule_template" alter column tue drop default;
alter table "recurring_schedule_template" alter column tue type smallint USING CASE WHEN tue = 't' THEN 1 ELSE 0 END;
alter table "recurring_schedule_template" alter column tue set default 0;
alter table "recurring_schedule_template" alter column wed drop default;
alter table "recurring_schedule_template" alter column wed type smallint USING CASE WHEN wed = 't' THEN 1 ELSE 0 END;
alter table "recurring_schedule_template" alter column wed set default 0;
alter table "recurring_schedule_template" alter column thu drop default;
alter table "recurring_schedule_template" alter column thu type smallint USING CASE WHEN thu = 't' THEN 1 ELSE 0 END;
alter table "recurring_schedule_template" alter column thu set default 0;
alter table "recurring_schedule_template" alter column fri drop default;
alter table "recurring_schedule_template" alter column fri type smallint USING CASE WHEN fri = 't' THEN 1 ELSE 0 END;
alter table "recurring_schedule_template" alter column fri set default 0;
alter table "recurring_schedule_template" alter column sat drop default;
alter table "recurring_schedule_template" alter column sat type smallint USING CASE WHEN sat = 't' THEN 1 ELSE 0 END;
alter table "recurring_schedule_template" alter column sat set default 0;
alter table "request" alter column authorized drop default;
alter table "request" alter column authorized type smallint USING CASE WHEN authorized = 't' THEN 1 ELSE 0 END;
alter table "request" alter column authorized set default 0;
alter table "round_interval_policy" alter column strict drop default;
alter table "round_interval_policy" alter column strict type smallint USING CASE WHEN strict = 't' THEN 1 ELSE 0 END;
alter table "round_interval_policy" alter column strict set default 0;
alter table "user_date_total" alter column override drop default;
alter table "user_date_total" alter column override type smallint USING CASE WHEN override = 't' THEN 1 ELSE 0 END;
alter table "user_date_total" alter column override set default 0;
alter table "user_generic_data" alter column is_default drop default;
alter table "user_generic_data" alter column is_default type smallint USING CASE WHEN is_default = 't' THEN 1 ELSE 0 END;
alter table "user_generic_data" alter column is_default set default 0;