/**
 * Dump of the SQL on March 6th, 2023
 */
CREATE TABLE `brshractions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `hire_request_id` int(11) NOT NULL,
  `transaction_id` int(11) DEFAULT NULL,
  `transaction_date` date DEFAULT NULL,
  `ready_ucpc` date DEFAULT NULL,
  `ucpc_processed` date DEFAULT NULL,
  `date_updated` datetime DEFAULT CURRENT_TIMESTAMP,
  `is_deny` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;

CREATE TABLE `brsonboardingactions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `hire_request_id` int(11) DEFAULT NULL,
  `onboarding_request_sent` date DEFAULT NULL,
  `onboarding_request_second_attempt` date DEFAULT NULL,
  `date_appropriate_instruct_sent` date DEFAULT NULL,
  `date_union_notified` date DEFAULT NULL,
  `onboarding_schedule` date DEFAULT NULL,
  `onboarded` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;

CREATE TABLE `bsa_classes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `session_id` int(11) DEFAULT NULL,
  `dept_id` int(11) DEFAULT NULL,
  `class_number` varchar(5) DEFAULT NULL,
  `catalog_number` varchar(10) DEFAULT NULL,
  `section` varchar(5) DEFAULT NULL,
  `units` varchar(4) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 ;

CREATE TABLE `citizenships` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `citizenship` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ;

CREATE TABLE `comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `hire_request_id` int(11) NOT NULL,
  `requester_comments` text,
  `comment_submitted` datetime DEFAULT CURRENT_TIMESTAMP,
  `comment_uid` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3877 DEFAULT CHARSET=utf8 ;

CREATE TABLE `current_status` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1 ;

CREATE TABLE `degree_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 ;

CREATE TABLE `departments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `abbr` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `org_node` varchar(255) DEFAULT NULL,
  `self_supporting` varchar(255) DEFAULT NULL,
  `isActive` varchar(1) DEFAULT '1',
  `hire_region_id` int(11) DEFAULT NULL,
  `ord_code` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=152 DEFAULT CHARSET=utf8 ;

CREATE TABLE `dept_authorizer_titles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ;

CREATE TABLE `ds_custom_field_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ;

CREATE TABLE `ds_last_checked` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_last_checked` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11835 DEFAULT CHARSET=utf8 ;

CREATE TABLE `ds_request_envelopes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `hire_request_id` int(11) DEFAULT NULL,
  `ds_template_id` varchar(255) DEFAULT NULL,
  `envelope_id` varchar(255) DEFAULT NULL,
  `date_sent` datetime DEFAULT NULL,
  `date_signed` datetime DEFAULT NULL,
  `date_declined` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4768 DEFAULT CHARSET=utf8 ;

CREATE TABLE `ds_template_custom_fields` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ds_template_id` int(11) DEFAULT NULL,
  `ds_custom_field_type_id` int(11) DEFAULT NULL,
  `ds_custom_field_label` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=718 DEFAULT CHARSET=utf8 ;

CREATE TABLE `ds_templates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `template_id` varchar(255) DEFAULT NULL,
  `template_name` varchar(255) DEFAULT NULL,
  `year` varchar(4) DEFAULT NULL,
  `fte_calc_type` varchar(1) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8 ;

CREATE TABLE `earn_code` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ;

CREATE TABLE `hire_earnings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pay_date_id` int(11) DEFAULT NULL,
  `hire_request_id` int(11) DEFAULT NULL,
  `check_date` date DEFAULT NULL,
  `pay_date_submitted` date DEFAULT NULL,
  `pay_transaction_id` varchar(255) DEFAULT NULL,
  `batch_id` varchar(255) DEFAULT NULL,
  `pay_template_processed` date DEFAULT NULL,
  `coa` varchar(256) DEFAULT NULL,
  `off_cycle_pay` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2915 DEFAULT CHARSET=utf8 ;

CREATE TABLE `hire_instructors` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `hire_request_id` int(11) NOT NULL,
  `professional_title_id` int(11) DEFAULT NULL,
  `degree_id` int(11) DEFAULT NULL,
  `current_status_id` bigint(20) DEFAULT NULL,
  `is_previous_id` bigint(20) DEFAULT NULL,
  `employee_id` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sid` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_ucrp` tinyint(1) DEFAULT NULL,
  `end_date_of_current_appointment` date DEFAULT NULL,
  `pending_fall_appointment` int(11) DEFAULT NULL,
  `citizenship_visa_status_id` int(11) DEFAULT NULL,
  `visa_expires_at` date DEFAULT NULL,
  `instructor_id` int(11) DEFAULT NULL,
  `other_status_reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `record_number` varchar(3) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `need_visa` int(11) DEFAULT NULL,
  `summer_payroll_title` int(11) DEFAULT NULL,
  `drive_link` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `search_requirement` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `exempt_criteria` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `search_approval` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `earn_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `will_supervise_hourly` tinyint(11) DEFAULT NULL,
  `work_location_id` int(11) DEFAULT NULL,
  `is_ucsf_or_lbnl` tinyint(1) DEFAULT NULL,
  `work_address` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `work_floor` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `work_room_number` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5676 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ;

CREATE TABLE `hire_letters` (
  `id` int(255) NOT NULL AUTO_INCREMENT,
  `hire_request_id` int(11) NOT NULL,
  `date_generated` date DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;

CREATE TABLE `hire_payrolls` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `payroll_processed` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;

CREATE TABLE `hire_region` (
  `id` int(111) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `region_email` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 ;

CREATE TABLE `hire_region_org_node` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `hire_region_id` int(11) NOT NULL,
  `org_node` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=89 DEFAULT CHARSET=utf8 ;

CREATE TABLE `hire_request_courses` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `course` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `supervisor_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `supervisor_employee_id` int(11) DEFAULT NULL,
  `milestone` varchar(11) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nine_month_annual` decimal(11,4) DEFAULT NULL,
  `visiting_annual` decimal(11,4) DEFAULT NULL,
  `gsi_annual` decimal(11,4) DEFAULT NULL,
  `hourly_rate` decimal(7,4) DEFAULT NULL,
  `fte` decimal(5,4) DEFAULT NULL,
  `bya` decimal(11,4) DEFAULT NULL,
  `total_compensation` decimal(11,4) DEFAULT NULL,
  `hire_request_id` bigint(20) NOT NULL,
  `is_travel_study_program` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_hours` decimal(8,4) DEFAULT NULL,
  `override_appointment_start_date` date DEFAULT NULL,
  `override_appointment_end_date` date DEFAULT NULL,
  `study_abroad_admin_stipend` decimal(11,4) DEFAULT NULL,
  `study_abroad_predeparture_stipend` decimal(11,4) DEFAULT NULL,
  `appointment_dates` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `appointment_start_date` date DEFAULT NULL,
  `appointment_end_date` date DEFAULT NULL,
  `payroll_period_id` int(11) DEFAULT NULL,
  `session_id` int(11) DEFAULT NULL,
  `course_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_wbl` int(11) DEFAULT NULL,
  `subject` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `catalog_number` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `course_component` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `section_number` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5713 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ;

CREATE TABLE `hire_requests` (
  `id` bigint(11) unsigned NOT NULL AUTO_INCREMENT,
  `submitter_user_id` bigint(20) DEFAULT NULL,
  `submitted_at` date DEFAULT NULL,
  `cancelled_at` date DEFAULT NULL,
  `date_sent_back` date DEFAULT NULL,
  `ucpath_ready_at` date DEFAULT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `hire_request_type_id` int(11) DEFAULT NULL,
  `step` int(11) DEFAULT NULL,
  `is_completed` tinyint(11) DEFAULT '0',
  `revision_requested_at` date DEFAULT NULL,
  `agreement_generated` date DEFAULT NULL,
  `agreement_sent` date DEFAULT NULL,
  `agreement_returned` date DEFAULT NULL,
  `onboard` date DEFAULT NULL,
  `onboard_second` date DEFAULT NULL,
  `onboard_schedule` date DEFAULT NULL,
  `onboard_complete` date DEFAULT NULL,
  `remote_boarding` int(11) DEFAULT NULL,
  `onboard_after_appointment` int(11) DEFAULT NULL,
  `ucpath_ready` date DEFAULT NULL,
  `hire_template_submitted` date DEFAULT NULL,
  `transactionID` date DEFAULT NULL,
  `ucpcr_eady` date DEFAULT NULL,
  `pay_template_submitted` date DEFAULT NULL,
  `batch` date DEFAULT NULL,
  `onboard_needed` int(11) DEFAULT NULL,
  `position_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `summer_sessions_review_notes` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `flsa_conflict` int(11) DEFAULT NULL,
  `dual_flsa` int(11) DEFAULT NULL,
  `instruction_sent` date DEFAULT NULL,
  `union_notified` date DEFAULT NULL,
  `hire_completed` date DEFAULT NULL,
  `date_smartsheets` datetime DEFAULT NULL,
  `is_online` tinyint(1) DEFAULT '0',
  `payroll_processed` date DEFAULT NULL,
  `requester_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `requester_email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_multiple` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `profile_id` varchar(225) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ds_packet_received` varchar(225) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pay_schedule_conflict` int(11) DEFAULT NULL,
  `smartsheets_row_id` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `existing_ewsum_record_number` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_on_hold` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6549 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ;

CREATE TABLE `hire_requests_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ;

CREATE TABLE `hire_smartsheet_fields` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  `fd_key` varchar(50) DEFAULT NULL,
  `active` enum('0','1') DEFAULT NULL,
  `smartsheet_column_id` varchar(50) DEFAULT NULL,
  `sent_to_smartsheet` enum('0','1') DEFAULT NULL,
  `get_from_smartsheet` enum('0','1') DEFAULT NULL,
  `update_smartsheet` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8 ;

CREATE TABLE `hire_templates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `hire_request_id` int(11) DEFAULT NULL,
  `transaction_id` varchar(255) DEFAULT NULL,
  `template_submitted_date` date DEFAULT NULL,
  `ready_ucpc` date DEFAULT NULL,
  `ucpc_processed` date DEFAULT NULL,
  `rejected` tinyint(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3976 DEFAULT CHARSET=utf8 ;

CREATE TABLE `instructors` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `instructor_first_name` varchar(255) DEFAULT NULL,
  `instructor_middle_name` varchar(255) DEFAULT NULL,
  `instructor_last_name` varchar(255) DEFAULT NULL,
  `instructor_email` varchar(255) DEFAULT NULL,
  `confirm_instructor_email` varchar(255) DEFAULT NULL,
  `proposed_hire` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7249 DEFAULT CHARSET=utf8 ;

CREATE TABLE `jobcodes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` int(11) NOT NULL,
  `isActive` int(11) NOT NULL DEFAULT '1',
  `name` varchar(255) NOT NULL,
  `hire_request_type_id` int(11) DEFAULT NULL,
  `ucpath_account_id` int(11) DEFAULT NULL,
  `uc_path_earn_code_id` int(11) DEFAULT NULL,
  `ds_template_id` int(11) DEFAULT NULL,
  `ds_online_template_id` int(11) DEFAULT NULL,
  `faculty_only` int(11) DEFAULT '0',
  `ds_dual_flsa_template_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8 ;

CREATE TABLE `migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ;

CREATE TABLE `pay_dates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pay_date` date NOT NULL,
  `payroll_period_id` int(11) DEFAULT NULL,
  `pay_period_end_date` date DEFAULT NULL,
  `earnings_begin_date` date DEFAULT NULL,
  `earnings_end_date` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=latin1 ;

CREATE TABLE `payroll_period_pay_dates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `payroll_period_id` int(11) DEFAULT NULL,
  `date_paid` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 ;

CREATE TABLE `payroll_periods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `label` varchar(255) DEFAULT NULL,
  `begin_date` date NOT NULL,
  `end_date` date NOT NULL,
  `session_id` int(11) DEFAULT NULL,
  `year` int(4) DEFAULT NULL,
  `max_hours` int(11) DEFAULT NULL,
  `chart_field` varchar(255) DEFAULT NULL,
  `term_code` varchar(11) DEFAULT NULL,
  `payroll_period_pay_date_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8 ;

CREATE TABLE `position_numbers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `jobcode_id` int(11) NOT NULL,
  `department_id` int(11) NOT NULL,
  `position_number` varchar(15) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=575 DEFAULT CHARSET=utf8 ;

CREATE TABLE `professional_titles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 ;

CREATE TABLE `role_user_departments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `department_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12345 DEFAULT CHARSET=utf8 ;

CREATE TABLE `roles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 ;

CREATE TABLE `sessions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `year` varchar(4) DEFAULT NULL,
  `term_code` varchar(4) DEFAULT NULL,
  `session` varchar(3) DEFAULT NULL,
  `sis_session_code` varchar(4) DEFAULT NULL,
  `start_date` datetime DEFAULT NULL,
  `end_date` datetime DEFAULT NULL,
  `max_hours` double DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8 ;

CREATE TABLE `smartsheet_api_response` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `request_id` int(11) DEFAULT NULL,
  `row_id` varchar(30) DEFAULT NULL,
  `sheet_id` varchar(30) DEFAULT NULL,
  `row_num` varchar(10) DEFAULT NULL,
  `result_code` varchar(10) DEFAULT NULL,
  `error_code` varchar(10) DEFAULT NULL,
  `message` text,
  `result` blob,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1772872 DEFAULT CHARSET=latin1 ;

CREATE TABLE `terms_sessions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `year` int(11) NOT NULL,
  `term_code` int(11) NOT NULL,
  `session` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  `session_code` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ;

CREATE TABLE `uc_campuses` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `uc_campus` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ;

CREATE TABLE `ucpath_account` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ;

CREATE TABLE `user_regions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `region_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=522 DEFAULT CHARSET=latin1 ;

CREATE TABLE `users` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `first_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `last_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `uid` bigint(20) DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `_token` text COLLATE utf8mb4_unicode_ci,
  `region_id` int(11) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1185 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ;

CREATE TABLE `users_departments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `hire_request_id` int(11) NOT NULL,
  `department_id` int(11) NOT NULL,
  `region` varchar(255) DEFAULT NULL,
  `secondary_contact_name` varchar(255) DEFAULT NULL,
  `secondary_contact_email` varchar(255) DEFAULT NULL,
  `title_id` int(11) DEFAULT NULL,
  `dept_authorize_name` varchar(255) DEFAULT NULL,
  `backup_email` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4838 DEFAULT CHARSET=utf8 ;

CREATE TABLE `users_roles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `role_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1661 DEFAULT CHARSET=utf8 ;

CREATE TABLE `work_location` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 ;

