-- Database Update Script
-- Generated execution time: 2026-01-24 19:01:15

-- New Table: audit_logs
CREATE TABLE `audit_logs` (

  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `action` varchar(255) NOT NULL,
  `model` varchar(255) DEFAULT NULL,
  `model_id` bigint(20) unsigned DEFAULT NULL,
  `details` text DEFAULT NULL,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `ip_address` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- New Table: default_hr_audit
CREATE TABLE `default_hr_audit` (

  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `emp_id` int(11) DEFAULT NULL,
  `type` varchar(50) NOT NULL,
  `reference_id` varchar(50) DEFAULT NULL,
  `snapshot` text DEFAULT NULL,
  `reg_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- New Table: default_temp_warnings
CREATE TABLE `default_temp_warnings` (

  `ser` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(150) DEFAULT NULL,
  `mem_no` varchar(50) DEFAULT NULL,
  `area` varchar(50) DEFAULT NULL,
  `project` varchar(150) DEFAULT NULL,
  `total` varchar(50) DEFAULT NULL,
  `time_from` varchar(10) NOT NULL DEFAULT '0',
  `time_to` varchar(10) NOT NULL DEFAULT '0',
  `prj_id` int(11) NOT NULL DEFAULT 0,
  `bldg` varchar(11) DEFAULT NULL,
  `flat_num` varchar(100) DEFAULT NULL,
  `amount` int(11) NOT NULL DEFAULT 0,
  `grand_amount` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`ser`),
  KEY `default_temp_warnings_prj_id_index` (`prj_id`),
  KEY `default_temp_warnings_mem_no_index` (`mem_no`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- New Table: password_reset_tokens
CREATE TABLE `password_reset_tokens` (

  `email` varchar(255) NOT NULL,
  `token` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`email`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- New Table: personal_access_tokens
CREATE TABLE `personal_access_tokens` (

  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tokenable_type` varchar(255) NOT NULL,
  `tokenable_id` bigint(20) unsigned NOT NULL,
  `name` varchar(255) NOT NULL,
  `token` varchar(64) NOT NULL,
  `abilities` text DEFAULT NULL,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `expires_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- New Table: sheet1
CREATE TABLE `sheet1` (

  `arabic_name` varchar(43) DEFAULT NULL,
  `nat_id` varchar(10) DEFAULT NULL,
  `address` varchar(115) DEFAULT NULL,
  `mobile` varchar(11) DEFAULT NULL,
  `file_no` int(11) DEFAULT NULL,
  `old_member_no` int(11) DEFAULT NULL,
  `member_no` int(11) DEFAULT NULL,
  `member_start_date` varchar(10) DEFAULT NULL,
  `flag` varchar(1) DEFAULT NULL

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Update Table: default_admins
ALTER TABLE `default_admins`
ADD COLUMN `image` varchar(255) DEFAULT NULL;

