Virajsinh

registration.sql

Apr 11th, 2023 (edited)
1,860
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 28.55 KB | Source Code | 0 0
  1. -- FILE_NAME : registration.sql
  2.  
  3. -- phpMyAdmin SQL Dump
  4. -- version 5.2.0
  5. -- https://www.phpmyadmin.net/
  6. --
  7. -- Host: localhost
  8. -- Generation Time: Apr 11, 2023 at 07:12 AM
  9. -- Server version: 10.4.21-MariaDB
  10. -- PHP Version: 7.4.29
  11.  
  12. START TRANSACTION;
  13.  
  14. -- --------------------------------------------------------
  15.  
  16. --
  17. -- Table structure for table `registration`
  18. --
  19.  
  20. CREATE TABLE `registration` (
  21.     `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
  22.     `first_name` varchar(50) NOT NULL COMMENT "Person Name",
  23.     `middle_name` varchar(50) NOT NULL COMMENT "Father/Husband Name",
  24.     `last_name` varchar(50) NOT NULL COMMENT "Surname",
  25.     `last_name_id` int(11) NOT NULL DEFAULT "0" COMMENT "Surname ID",
  26.     `father_id` int(11) NOT NULL DEFAULT "0" COMMENT "Father ID",
  27.     `mother_id` int(11) NOT NULL DEFAULT "0" COMMENT "Mother ID",
  28.     `family_id` int(11) NULL DEFAULT NULL COMMENT "Families Table ID",
  29.     `maiden_family_id` int(11) NULL DEFAULT NULL COMMENT "Families Table ID",
  30.     `is_registered` TINYINT(1) NOT NULL DEFAULT '0' COMMENT 'if person registered form filled then 1 otherwise 0',
  31.     `gender` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '0 - not set\r\n1 - male\r\n2 - female\r\n3 - other',
  32.     `marital_status` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '0 - not set\r\1 - single\r\n2 - married\r\n3 - divorced\r\n4 - widowed',
  33.     `email` varchar(255) NULL UNIQUE COMMENT "Email Address",
  34.     `email_verified` TINYINT(1) DEFAULT "0" NOT NULL COMMENT "0 - not verified\r\n1 - verified",
  35.     `email_verified_at` DATETIME DEFAULT NULL COMMENT "Email Address Verified DateTime",
  36.     `primary_mobile` varchar(10) UNIQUE DEFAULT NULL COMMENT "Primary Mobile Number",
  37.     `primary_mobile_verified_at` DATETIME DEFAULT NULL COMMENT "Primary Mobile Verified DateTime",
  38.     `secondary_mobile`varchar(10) DEFAULT NULL COMMENT "Secondary Mobile Number",
  39.     `avatar` varchar(50) DEFAULT NULL,
  40.     `aadhaar_hash` char(64) DEFAULT NULL,
  41.     `aadhaar_enc` varbinary(256) DEFAULT NULL,
  42.     `aadhaar_verified` tinyint(1) NOT NULL DEFAULT 0,
  43.     `aadhaar_verified_at` datetime DEFAULT NULL,
  44.     `aadhaar_verified_by` int(11) NOT NULL DEFAULT 0 COMMENT 'Person ID',
  45.     `birth_date` date DEFAULT NULL,
  46.     `death_date` date DEFAULT NULL,
  47.     `is_death` TINYINT(1) NOT NULL DEFAULT "0",
  48.     `blood_group_id` TINYINT(1) NULL DEFAULT NULL COMMENT "Blood Group Type ID",
  49.     `education_id` int(11) NULL DEFAULT NULL COMMENT "Education ID",
  50.     `course_id` INT(11) NULL DEFAULT NULL COMMENT 'Course ID',
  51.     `occupation_type_id` int(11) NULL DEFAULT NULL COMMENT "Occupation Type ID",
  52.     `occupation_id` int(11) NULL DEFAULT NULL COMMENT "Occupation ID",
  53.     `state_id` int(11) NULL DEFAULT NULL COMMENT "State ID",
  54.     `dist_id` int(11) NULL DEFAULT NULL COMMENT "District ID",
  55.     `sub_dist_id` int(11) NULL DEFAULT NULL COMMENT "Sub District ID",
  56.     `city_id` int(11) NULL DEFAULT NULL COMMENT "City/Village ID",
  57.     `pin_code` varchar(6) NULL DEFAULT NULL COMMENT "City/Village Pin Code",
  58.     `status` TINYINT(1) DEFAULT "0" NOT NULL COMMENT '0 - inactive - User registered but not activated\r\n1 - active - User is active and can use the system\r\n2 - blocked - User is manually blocked by admin\r\n3 - suspended - Temporarily disabled, maybe for violations\r\n4 - pending - Waiting for admin approval or email verification\r\n5 - deleted - Soft-deleted or marked for removal\r\n6 - banned - Permanently banned due to serious violation',
  59.     `status_at` DATETIME DEFAULT NULL COMMENT "Status Update DateTime",
  60.     `verified` TINYINT(1) DEFAULT "0" NOT NULL COMMENT "0 - not verified\r\n1 - verified",
  61.     `verified_at` DATETIME DEFAULT NULL COMMENT "Verified DateTime",
  62.     `verified_by` int(11) NOT NULL DEFAULT "0" COMMENT "Verified Person ID",
  63.     `created_by` int(11) NOT NULL DEFAULT "0" COMMENT "Create Person ID",
  64.     `updated_by` int(11) NOT NULL DEFAULT "0" COMMENT "Update Person ID",
  65.     `created_at` DATETIME DEFAULT NULL,
  66.     `updated_at` DATETIME DEFAULT NULL,
  67.  
  68.     FOREIGN KEY (`family_id`) REFERENCES `families` (`id`),
  69.     FOREIGN KEY (`maiden_family_id`) REFERENCES `families` (`id`),
  70.     FOREIGN KEY (`blood_group_id`) REFERENCES `blood_group` (`id`),
  71.     FOREIGN KEY (`education_id`) REFERENCES `education` (`id`),
  72.     FOREIGN KEY (`course_id`) REFERENCES `courses` (`id`),
  73.     FOREIGN KEY (`occupation_type_id`) REFERENCES `occupation_types` (`id`),
  74.     FOREIGN KEY (`occupation_id`) REFERENCES `occupation` (`id`),
  75.     FOREIGN KEY (`state_id`) REFERENCES `state` (`id`),
  76.     FOREIGN KEY (`dist_id`) REFERENCES `dist` (`id`),
  77.     FOREIGN KEY (`sub_dist_id`) REFERENCES `sub_dist` (`id`),
  78.     FOREIGN KEY (`city_id`) REFERENCES `village` (`id`)
  79. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  80.  
  81. -- Indexes
  82.  
  83. ALTER TABLE `registration` ADD INDEX (`family_id`);
  84. ALTER TABLE `registration` ADD INDEX (`maiden_family_id`);
  85. ALTER TABLE `registration` ADD INDEX (`father_id`);
  86. ALTER TABLE `registration` ADD INDEX (`mother_id`);
  87. ALTER TABLE `registration` ADD INDEX (`last_name`);
  88. ALTER TABLE `registration` ADD INDEX (`status`);
  89. ALTER TABLE `registration` ADD INDEX (`verified`);
  90.  
  91. --
  92. -- Table structure for table `languages`
  93. --
  94.  
  95. CREATE TABLE `languages` (
  96.     `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
  97.     `title` varchar(30) NOT NULL,
  98.     `language` varchar(10) NOT NULL,
  99.     `code` varchar(2) NOT NULL COMMENT 'ISO 639-1 codes',
  100.     `status` TINYINT(1) DEFAULT 0 NOT NULL,
  101.     `is_default` tinyint(1) NOT NULL DEFAULT '0',
  102.     `created_by` int(11) NOT NULL DEFAULT 0,
  103.     `updated_by` int(11) NOT NULL DEFAULT 0,
  104.     `created_at` DATETIME DEFAULT NULL,
  105.     `updated_at` DATETIME DEFAULT NULL
  106. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  107.  
  108. --
  109. -- Dumping data for table `languages`
  110. --
  111.  
  112. INSERT INTO `languages` (`id`, `title`, `language`, `code`, `status`, `is_default`, `created_by`, `updated_by`, `created_at`, `updated_at`) VALUES
  113. (1, 'English','english', 'en', 1, 0, 0, 0, NULL, NULL),
  114. (2, 'हिंदी','hindi', 'hi', 1, 0, 0, 0, NULL, NULL),
  115. (3, 'ગુજરાતી','gujarati', 'gu', 1, 0, 0, 0, NULL, NULL);
  116.  
  117. --
  118. -- Table structure for table `registration_translation`
  119. --
  120.  
  121. CREATE TABLE `registration_translation` (
  122.     `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
  123.     `registration_id` int(11) NOT NULL,
  124.     `language_code_id` int(11) NOT NULL,
  125.     `first_name` varchar(100) NOT NULL,
  126.     `middle_name` varchar(100) NOT NULL,
  127.     `last_name` varchar(100) NOT NULL,
  128.     `last_name_id` int(11) NOT NULL DEFAULT NULL COMMENT "Surname ID",
  129.     `created_by` INT DEFAULT '0' NOT NULL COMMENT "Create Person ID",
  130.     `updated_by` INT DEFAULT '0' NOT NULL COMMENT "Update Person ID",
  131.     `created_at` DATETIME DEFAULT NULL,
  132.     `updated_at` DATETIME DEFAULT NULL,
  133.  
  134.     UNIQUE KEY `registration_language_unique` (`registration_id`, `language_code_id`),
  135.     CONSTRAINT `fk_registration_translation_registration` FOREIGN KEY (`registration_id`) REFERENCES `registration` (`id`) ON DELETE CASCADE,
  136.     FOREIGN KEY (`language_code_id`) REFERENCES `languages` (`id`),
  137.     FOREIGN KEY (`last_name_id`) REFERENCES `surname` (`id`)
  138. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  139.  
  140. --
  141. -- Table structure for table `family_relationships`
  142. --
  143.  
  144. CREATE TABLE relation_types (
  145.     `id` INT AUTO_INCREMENT PRIMARY KEY,
  146.     `name` VARCHAR(50) NOT NULL UNIQUE,
  147.     `reverse_relation` VARCHAR(50) NOT NULL
  148. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  149.  
  150. -- Insert common relation types
  151. INSERT INTO relation_types (id, name, reverse_relation) VALUES
  152. (1, 'father', 'child'),
  153. (2, 'mother', 'child'),
  154. (3, 'child', 'parent'),
  155. (4, 'wife', 'husband'),
  156. (5, 'husband', 'wife'),
  157. (6, 'brother', 'sibling'),
  158. (7, 'sister', 'sibling');
  159.  
  160. -- 3. Create family_relationships
  161. CREATE TABLE family_relationships (
  162.     id INT AUTO_INCREMENT PRIMARY KEY,
  163.     person_id INT NOT NULL,
  164.     related_person_id INT NOT NULL,
  165.     relation_type_id INT NOT NULL,
  166.     created_at DATETIME DEFAULT NULL,
  167.     FOREIGN KEY (person_id) REFERENCES registration(id),
  168.     FOREIGN KEY (related_person_id) REFERENCES registration(id),
  169.     FOREIGN KEY (relation_type_id) REFERENCES relation_types(id),
  170.     UNIQUE (person_id, related_person_id, relation_type_id)
  171. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  172.  
  173. --
  174. -- Table structure for table `maiden_name`
  175. --
  176.  
  177. CREATE TABLE `maiden_name` (
  178.     `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
  179.     `registration_id` INT NOT NULL,
  180.     `first_name` VARCHAR(100),
  181.     `middle_name` VARCHAR(100),
  182.     `last_name` VARCHAR(100),
  183.     `last_name_id` int(11) NOT NULL COMMENT "Surname ID",
  184.     `created_by` INT DEFAULT '0' NOT NULL COMMENT "Create Person ID",
  185.     `updated_by` INT DEFAULT '0' NOT NULL COMMENT "Update Person ID",
  186.     `created_at` DATETIME DEFAULT NULL,
  187.     `updated_at` DATETIME DEFAULT NULL,
  188.     FOREIGN KEY (`registration_id`) REFERENCES `registration` (`id`) ON DELETE CASCADE
  189. )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  190.  
  191. --
  192. -- Table structure for table `maiden_name_translation`
  193. --
  194.  
  195. CREATE TABLE `maiden_name_translation` (
  196.     `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
  197.     `registration_id` INT NOT NULL,
  198.     `language_code_id` INT NOT NULL,
  199.     `first_name` VARCHAR(100),
  200.     `middle_name` VARCHAR(100),
  201.     `last_name` VARCHAR(100),
  202.     `last_name_id` int(11) NOT NULL COMMENT "Surname ID",
  203.     `created_by` INT DEFAULT '0' NOT NULL COMMENT "Create Person ID",
  204.     `updated_by` INT DEFAULT '0' NOT NULL COMMENT "Update Person ID",
  205.     `created_at` DATETIME DEFAULT NULL,
  206.     `updated_at` DATETIME DEFAULT NULL,
  207.     UNIQUE KEY `registration_language_unique` (`registration_id`, `language_code_id`),
  208.     FOREIGN KEY (`registration_id`) REFERENCES `registration` (`id`) ON DELETE CASCADE,
  209.     FOREIGN KEY (`language_code_id`) REFERENCES `languages` (`id`)
  210. )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  211.  
  212. --
  213. -- Table structure for table `blood_group`
  214. --
  215.  
  216. CREATE TABLE `blood_group` (
  217.     `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
  218.     `blood_group` varchar(12) NOT NULL,
  219.     `status` TINYINT(1) DEFAULT 0 NOT NULL,
  220.     `created_by` INT DEFAULT '0' NOT NULL COMMENT "Create Person ID",
  221.     `updated_by` INT DEFAULT '0' NOT NULL COMMENT "Update Person ID",
  222.     `created_at` DATETIME NULL DEFAULT NULL,
  223.     `updated_at` DATETIME NULL DEFAULT NULL
  224. )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  225.  
  226. --
  227. -- Dumping data for table `blood_group`
  228. --
  229.  
  230. INSERT INTO `blood_group` (`blood_group`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`) VALUES
  231. ('A Positive', 1, 0, 0, NOW(), null),
  232. ('A Negative', 1, 0, 0, NOW(), null),
  233. ('B Positive', 1, 0, 0, NOW(), null),
  234. ('B Negative', 1, 0, 0, NOW(), null),
  235. ('AB Positive', 1, 0, 0, NOW(), null),
  236. ('AB Negative', 1, 0, 0, NOW(), null),
  237. ('O Positive', 1, 0, 0, NOW(), null),
  238. ('O Negative', 1, 0, 0, NOW(), null);
  239.  
  240. --
  241. -- Table structure for table `education`
  242. --
  243.  
  244. CREATE TABLE `education` (
  245.     `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
  246.     `education_type` varchar(100) NOT NULL,
  247.     `status` TINYINT(1) DEFAULT 0 NOT NULL,
  248.     `created_by` INT DEFAULT '0' NOT NULL COMMENT "Create Person ID",
  249.     `updated_by` INT DEFAULT '0' NOT NULL COMMENT "Update Person ID",
  250.     `created_at` DATETIME NULL DEFAULT NULL,
  251.     `updated_at` DATETIME NULL DEFAULT NULL
  252. )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  253.  
  254. --
  255. -- Dumping data for table `education`
  256. --
  257.  
  258. INSERT INTO `education` (`education_type`, `status`) VALUES
  259. ('Below 7th Standard', 1),
  260. ('7th Standard', 1),
  261. ('8th Standard', 1),
  262. ('9th Standard', 1),
  263. ('10th Standard (SSC)', 1),
  264. ('11th Standard', 1),
  265. ('12th Standard (HSC)', 1),
  266. ('Bachelor\'s Degree - Graduate', 1),
  267. ('Master\'s Degree - Post Graduate', 1),
  268. ('PhD or Equivalent - Doctorate', 1);
  269.  
  270. CREATE TABLE `surname` (
  271.     `id` BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  272.     `surname` VARCHAR(100) NOT NULL UNIQUE,
  273.     `status` TINYINT(1) DEFAULT 0 NOT NULL,
  274.     `created_by` INT NOT NULL DEFAULT 0 COMMENT 'Create Person ID',
  275.     `updated_by` INT NOT NULL DEFAULT 0 COMMENT 'Update Person ID',
  276.     `created_at` DATETIME NULL DEFAULT NULL,
  277.     `updated_at` DATETIME NULL DEFAULT NULL
  278. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  279.  
  280. INSERT INTO `surname` (`surname`, `status`) VALUES ('Nakum', 1);
  281. INSERT INTO `surname` (`surname`, `status`) VALUES ('Rathod', 1);
  282. INSERT INTO `surname` (`surname`, `status`) VALUES ('Parmar', 1);
  283. INSERT INTO `surname` (`surname`, `status`) VALUES ('Herma', 1);
  284. INSERT INTO `surname` (`surname`, `status`) VALUES ('Makvana', 1);
  285. INSERT INTO `surname` (`surname`, `status`) VALUES ('Dodiya', 1);
  286. INSERT INTO `surname` (`surname`, `status`) VALUES ('Sakariya', 1);
  287. INSERT INTO `surname` (`surname`, `status`) VALUES ('Vadher', 1);
  288. INSERT INTO `surname` (`surname`, `status`) VALUES ('Sindhav', 1);
  289. INSERT INTO `surname` (`surname`, `status`) VALUES ('Chauhan', 1);
  290. INSERT INTO `surname` (`surname`, `status`) VALUES ('Solanki', 1);
  291. INSERT INTO `surname` (`surname`, `status`) VALUES ('Zala', 1);
  292. INSERT INTO `surname` (`surname`, `status`) VALUES ('Padhariya', 1);
  293. INSERT INTO `surname` (`surname`, `status`) VALUES ('Padhiyar', 1);
  294. INSERT INTO `surname` (`surname`, `status`) VALUES ('Barad', 1);
  295. INSERT INTO `surname` (`surname`, `status`) VALUES ('Vala', 1);
  296. INSERT INTO `surname` (`surname`, `status`) VALUES ('Kher', 1);
  297. INSERT INTO `surname` (`surname`, `status`) VALUES ('Asvar', 1);
  298. INSERT INTO `surname` (`surname`, `status`) VALUES ('Zankat', 1);
  299. INSERT INTO `surname` (`surname`, `status`) VALUES ('Mori', 1);
  300. INSERT INTO `surname` (`surname`, `status`) VALUES ('Jadav', 1);
  301. INSERT INTO `surname` (`surname`, `status`) VALUES ('Dabhi', 1);
  302. INSERT INTO `surname` (`surname`, `status`) VALUES ('Vanar', 1);
  303. INSERT INTO `surname` (`surname`, `status`) VALUES ('Gohil', 1);
  304. INSERT INTO `surname` (`surname`, `status`) VALUES ('Tank', 1);
  305. INSERT INTO `surname` (`surname`, `status`) VALUES ('Bhadaliya', 1);
  306. INSERT INTO `surname` (`surname`, `status`) VALUES ('Yadav', 1);
  307. INSERT INTO `surname` (`surname`, `status`) VALUES ('Chavda', 1);
  308.  
  309. CREATE TABLE `surname_translation` (
  310.     `id` BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  311.     `translation` VARCHAR(100) NOT NULL,
  312.     `surname_id` BIGINT UNSIGNED NOT NULL,
  313.     `language_code_id` INT NOT NULL,
  314.     `created_by` INT NOT NULL DEFAULT 0 COMMENT 'Create Person ID',
  315.     `updated_by` INT NOT NULL DEFAULT 0 COMMENT 'Update Person ID',
  316.     `created_at` DATETIME NULL DEFAULT NULL,
  317.     `updated_at` DATETIME NULL DEFAULT NULL,
  318.     FOREIGN KEY (`language_code_id`) REFERENCES `languages`(`id`),
  319.     FOREIGN KEY (`surname_id`) REFERENCES `surname`(`id`),
  320.     UNIQUE KEY `unique_surname_language` (`surname_id`, `language_code_id`)
  321. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  322.  
  323. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('नकुम', 1, 2);
  324. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('નકુમ', 1, 3);
  325.  
  326. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('राठोड', 2, 2);
  327. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('રાઠોડ', 2, 3);
  328.  
  329. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('परमार', 3, 2);
  330. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('પરમાર', 3, 3);
  331.  
  332. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('हेरमा', 4, 2);
  333. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('હેરમા', 4, 3);
  334.  
  335. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('मकवाणा', 5, 2);
  336. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('મકવાણા', 5, 3);
  337.  
  338. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('डोडिया', 6, 2);
  339. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('ડોડિયા', 6, 3);
  340.  
  341. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('साकरिया', 7, 2);
  342. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('સાકરિયા', 7, 3);
  343.  
  344. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('वाढेर', 8, 2);
  345. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('વાઢેર', 8, 3);
  346.  
  347. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('सिंधव', 9, 2);
  348. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('સિંધવ', 9, 3);
  349.  
  350. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('चौहाण', 10, 2);
  351. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('ચૌહાણ', 10, 3);
  352.  
  353. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('सोलंकी', 11, 2);
  354. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('સોલંકી', 11, 3);
  355.  
  356. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('झाला', 12, 2);
  357. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('ઝાલા', 12, 3);
  358.  
  359. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('पढारिया', 13, 2);
  360. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('પઢારિયા', 13, 3);
  361.  
  362. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('पढियार', 14, 2);
  363. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('પઢિયાર', 14, 3);
  364.  
  365. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('बारड', 15, 2);
  366. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('બારડ', 15, 3);
  367.  
  368. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('वाळा', 16, 2);
  369. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('વાળા', 16, 3);
  370.  
  371. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('खेर', 17, 2);
  372. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('ખેર', 17, 3);
  373.  
  374. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('असवार', 18, 2);
  375. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('અસવાર', 18, 3);
  376.  
  377. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('जणकाट', 19, 2);
  378. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('જણકાટ', 19, 3);
  379.  
  380. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('मोरी', 20, 2);
  381. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('મોરી', 20, 3);
  382.  
  383. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('जादव', 21, 2);
  384. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('જાદવ', 21, 3);
  385.  
  386. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('डाभी', 22, 2);
  387. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('ડાભી', 22, 3);
  388.  
  389. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('वनार', 23, 2);
  390. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('વનાર', 23, 3);
  391.  
  392. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('गोहिल', 24, 2);
  393. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('ગોહિલ', 24, 3);
  394.  
  395. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('टांक', 25, 2);
  396. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('ટાંક', 25, 3);
  397.  
  398. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('भाडलिया', 26, 2);
  399. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('ભાડલિયા', 26, 3);
  400.  
  401. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('यादव', 27, 2);
  402. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('યાદવ', 27, 3);
  403.  
  404. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('चावडा', 28, 2);
  405. INSERT INTO `surname_translation` (`translation`,`surname_id`,`language_code_id`) VALUES ('ચાવડા', 28, 3);
  406.  
  407. -- Create occupation_types table
  408. CREATE TABLE occupation_types (
  409.     `id` INT AUTO_INCREMENT PRIMARY KEY,
  410.     `name` VARCHAR(100) NOT NULL,
  411.     `status` TINYINT(1) DEFAULT 0 NOT NULL,
  412.     `created_by` INT NOT NULL DEFAULT 0 COMMENT 'Create Person ID',
  413.     `updated_by` INT NOT NULL DEFAULT 0 COMMENT 'Update Person ID',
  414.     `created_at` DATETIME NULL DEFAULT NULL,
  415.     `updated_at` DATETIME NULL DEFAULT NULL
  416. )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  417.  
  418. -- Insert data into occupation_types
  419. INSERT INTO occupation_types (`name`, `status`) VALUES
  420. ('Healthcare & Medical', 1),
  421. ('Education & Training', 1),
  422. ('Information Technology (IT)', 1),
  423. ('Engineering & Architecture', 1),
  424. ('Finance & Accounting', 1),
  425. ('Legal & Law Enforcement', 1),
  426. ('Business & Management', 1),
  427. ('Arts, Design & Media', 1),
  428. ('Skilled Trades & Technical', 1),
  429. ('Sales & Customer Service', 1),
  430. ('Hospitality & Tourism', 1),
  431. ('Transportation & Logistics', 1),
  432. ('Agriculture, Food & Natural Resources', 1),
  433. ('Science & Research', 1),
  434. ('Public Administration & Government', 1),
  435. ('Other', 1);
  436.  
  437. INSERT INTO occupation_types (`name`, `status`) VALUES
  438. ('Sports & Recreation', 1),
  439. ('Social & Community Services', 1),
  440. ('Beauty & Wellness', 1),
  441. ('Real Estate & Property', 1),
  442. ('Religion & Spirituality', 1),
  443. ('Entertainment & Performing Arts', 1),
  444. ('Military & Defense', 1),
  445. ('Childcare & Early Education', 1),
  446. ('Environment & Sustainability', 1),
  447. ('Construction & Manual Labor', 1);
  448.  
  449. -- Create occupations table
  450. CREATE TABLE occupation (
  451.     `id` INT AUTO_INCREMENT PRIMARY KEY,
  452.     `occupation_type_id` INT NOT NULL,
  453.     `name` VARCHAR(100) NOT NULL,
  454.     `status` TINYINT(1) DEFAULT 0 NOT NULL,
  455.     `created_by` INT NOT NULL DEFAULT 0 COMMENT 'Create Person ID',
  456.     `updated_by` INT NOT NULL DEFAULT 0 COMMENT 'Update Person ID',
  457.     `created_at` DATETIME NULL DEFAULT NULL,
  458.     `updated_at` DATETIME NULL DEFAULT NULL,
  459.     FOREIGN KEY (occupation_type_id) REFERENCES occupation_types(id) ON DELETE CASCADE
  460. )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  461.  
  462. -- Insert initial data into occupations
  463. INSERT INTO occupation (`occupation_type_id`, `name`, `status`) VALUES
  464. -- 1. Healthcare & Medical
  465. (1, 'Doctor', 1),
  466. (1, 'Nurse', 1),
  467. (1, 'Surgeon', 1),
  468. (1, 'Pharmacist', 1),
  469. (1, 'Dentist', 1),
  470. (1, 'Medical Laboratory Technician', 1),
  471. (1, 'Physical Therapist', 1),
  472.  
  473. -- 2. Education & Training
  474. (2, 'Teacher', 1),
  475. (2, 'University Professor', 1),
  476. (2, 'School Counselor', 1),
  477. (2, 'Special Education Teacher', 1),
  478. (2, 'Corporate Trainer', 1),
  479. (2, 'Instructional Designer', 1),
  480. (2, 'Librarian', 1),
  481.  
  482. -- 3. Information Technology (IT)
  483. (3, 'Software Developer', 1),
  484. (3, 'Systems Analyst', 1),
  485. (3, 'Network Administrator', 1),
  486. (3, 'Data Scientist', 1),
  487. (3, 'Cybersecurity Specialist', 1),
  488. (3, 'IT Support Technician', 1),
  489.  
  490. -- 4. Engineering & Architecture
  491. (4, 'Civil Engineer', 1),
  492. (4, 'Mechanical Engineer', 1),
  493. (4, 'Electrical Engineer', 1),
  494. (4, 'Architect', 1),
  495. (4, 'Structural Engineer', 1),
  496. (4, 'CAD Technician', 1),
  497.  
  498. -- 5. Finance & Accounting
  499. (5, 'Accountant', 1),
  500. (5, 'Financial Analyst', 1),
  501. (5, 'Auditor', 1),
  502. (5, 'Tax Consultant', 1),
  503. (5, 'Investment Banker', 1),
  504. (5, 'Bookkeeper', 1),
  505.  
  506. -- 6. Legal & Law Enforcement
  507. (6, 'Lawyer', 1),
  508. (6, 'Judge', 1),
  509. (6, 'Police Officer', 1),
  510. (6, 'Paralegal', 1),
  511. (6, 'Correctional Officer', 1),
  512. (6, 'Legal Assistant', 1),
  513.  
  514. -- 7. Business & Management
  515. (7, 'Business Analyst', 1),
  516. (7, 'Marketing Manager', 1),
  517. (7, 'Project Manager', 1),
  518. (7, 'Human Resources Specialist', 1),
  519. (7, 'Chief Executive Officer - CEO', 1),
  520. (7, 'Operations Manager', 1),
  521. (7, 'Entrepreneur - Business Owner', 1),
  522. (7, 'Consultant', 1),
  523.  
  524. -- 8. Arts, Design & Media
  525. (8, 'Graphic Designer', 1),
  526. (8, 'Photographer', 1),
  527. (8, 'Animator', 1),
  528. (8, 'Art Director', 1),
  529. (8, 'Journalist', 1),
  530. (8, 'Copywriter', 1),
  531. (8, 'Musician', 1),
  532. (8, 'Writer', 1),
  533.  
  534. -- 9. Skilled Trades & Technical
  535. (9, 'Electrician', 1),
  536. (9, 'Plumber', 1),
  537. (9, 'Carpenter', 1),
  538. (9, 'Welder', 1),
  539. (9, 'Auto Mechanic', 1),
  540. (9, 'HVAC Technician', 1),
  541.  
  542. -- 10. Sales & Customer Service
  543. (10, 'Sales Representative', 1),
  544. (10, 'Retail Associate', 1),
  545. (10, 'Call Center Agent', 1),
  546. (10, 'Customer Success Manager', 1),
  547. (10, 'Account Executive', 1),
  548.  
  549. -- 11. Hospitality & Tourism
  550. (11, 'Hotel Manager', 1),
  551. (11, 'Chef', 1),
  552. (11, 'Travel Agent', 1),
  553. (11, 'Tour Guide', 1),
  554. (11, 'Waiter/Waitress', 1),
  555. (11, 'Event Coordinator', 1),
  556.  
  557. -- 12. Transportation & Logistics
  558. (12, 'Truck Driver', 1),
  559. (12, 'Delivery Person', 1),
  560. (12, 'Warehouse Manager', 1),
  561. (12, 'Supply Chain Analyst', 1),
  562. (12, 'Pilot', 1),
  563. (12, 'Train Operator', 1),
  564.  
  565. -- 13. Agriculture, Food & Natural Resources
  566. (13, 'Farmer', 1),
  567. (13, 'Agricultural Technician', 1),
  568. (13, 'Food Scientist', 1),
  569. (13, 'Horticulturist', 1),
  570. (13, 'Fishery Worker', 1),
  571.  
  572. -- 14. Science & Research
  573. (14, 'Biologist', 1),
  574. (14, 'Chemist', 1),
  575. (14, 'Environmental Scientist', 1),
  576. (14, 'Physicist', 1),
  577. (14, 'Research Assistant', 1),
  578.  
  579. -- 15. Public Administration & Government
  580. (15, 'Policy Analyst', 1),
  581. (15, 'Urban Planner', 1),
  582. (15, 'Government Officer', 1),
  583. (15, 'Diplomat', 1),
  584. (15, 'Customs Officer', 1),
  585.  
  586. -- 16. Other
  587. (16, 'Other', 1),
  588. (16, 'Homemaker', 1),
  589. (16, 'Student', 1),
  590. (16, 'Unemployed', 1),
  591. (16, 'Retired', 1),
  592.  
  593. -- 17. Sports & Recreation
  594. (17, 'Athlete', 1),
  595. (17, 'Coach', 1),
  596. (17, 'Fitness Trainer', 1),
  597. (17, 'Sports Official / Referee', 1),
  598.  
  599. -- 18. Social & Community Services
  600. (18, 'Social Worker', 1),
  601. (18, 'Community Outreach Coordinator', 1),
  602. (18, 'Nonprofit Manager', 1),
  603. (18, 'Substance Abuse Counselor', 1),
  604.  
  605. -- 19. Beauty & Wellness
  606. (19, 'Hairdresser / Hairstylist', 1),
  607. (19, 'Barber', 1),
  608. (19, 'Massage Therapist', 1),
  609. (19, 'Esthetician', 1),
  610.  
  611. -- 20. Real Estate & Property
  612. (20, 'Real Estate Agent', 1),
  613. (20, 'Property Manager', 1),
  614. (20, 'Appraiser', 1),
  615.  
  616. -- 21. Religion & Spirituality
  617. (21, 'Clergy / Pastor', 1),
  618. (21, 'Religious Educator', 1),
  619. (21, 'Imam', 1),
  620. (21, 'Rabbi', 1),
  621.  
  622. -- 22. Entertainment & Performing Arts
  623. (22, 'Actor / Actress', 1),
  624. (22, 'Comedian', 1),
  625. (22, 'TV Host / Presenter', 1),
  626. (22, 'Stage Performer', 1),
  627.  
  628. -- 23. Military & Defense
  629. (23, 'Soldier / Military Personnel', 1),
  630. (23, 'Defense Analyst', 1),
  631. (23, 'Intelligence Officer', 1),
  632.  
  633. -- 24. Childcare & Early Education
  634. (24, 'Daycare Worker', 1),
  635. (24, 'Preschool Teacher', 1),
  636. (24, 'Nanny', 1),
  637.  
  638. -- 25. Environment & Sustainability
  639. (25, 'Environmental Consultant', 1),
  640. (25, 'Renewable Energy Technician', 1),
  641. (25, 'Climate Scientist', 1),
  642. (25, 'Recycling Coordinator', 1),
  643.  
  644. -- 26. Construction & Manual Labor
  645. (26, 'Construction Worker', 1),
  646. (26, 'Janitor / Cleaner', 1),
  647. (26, 'Mover', 1);
  648.  
  649. --
  650. -- Table structure for table `families`
  651. --
  652.  
  653. CREATE TABLE `families` (
  654.     `id` INT AUTO_INCREMENT PRIMARY KEY,
  655.     `surname_id` INT NOT NULL,
  656.     `family_code` VARCHAR(20) NOT NULL UNIQUE COMMENT 'Unique family code, e.g., NAK-9SFASF',
  657.     `created_by` INT NOT NULL DEFAULT 0 COMMENT 'Create Person ID',
  658.     `updated_by` INT NOT NULL DEFAULT 0 COMMENT 'Update Person ID',
  659.     `created_at` DATETIME NULL DEFAULT NULL,
  660.     `updated_at` DATETIME NULL DEFAULT NULL,
  661.     `deleted_at` DATETIME NULL DEFAULT NULL
  662. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  663. -- --------------------------------------------------------
  664.  
  665. COMMIT;
Advertisement
Add Comment
Please, Sign In to add comment