-- Users Table

ALTER TABLE `users` ADD `is_driver` TINYINT(1) NOT NULL DEFAULT '0';
ALTER TABLE `users` ADD `is_logistics` TINYINT(1) NOT NULL DEFAULT '0' AFTER `is_driver`;
ALTER TABLE `users` ADD `is_container_owner` TINYINT(1) NOT NULL DEFAULT '0' AFTER `is_driver`;

-- Material Requestions Approves
ALTER TABLE `material_requestion_approves` ADD `tms_requestion_item_id` INT(10) NULL DEFAULT '0' AFTER `requestion_item_id`;
--
-- Table structure for table `vehicle_documents`
--

CREATE TABLE `vehicle_documents` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `vehicle_id` int(11) NOT NULL,
  `document_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `id_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `issue_date` varchar(50) DEFAULT NULL,
  `expiry_date` varchar(50) DEFAULT NULL,
  `renewal_date` varchar(50) DEFAULT 'NA',
  `attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `remarks` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `rolledback` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `vehicle_installations`
--

CREATE TABLE `vehicle_installations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `vehicle_id` int(11) NOT NULL,
  `date` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `position` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `trailer_configuration` text COLLATE utf8mb4_unicode_ci,
  `rolled_back` tinyint(1) DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
