Database file, MySQL

This commit is contained in:
Sok Ponlork
2026-01-29 14:34:03 +07:00
parent 644b624d2d
commit 9e1d2ff656

879
niph_dsps29012026.sql Executable file
View File

@@ -0,0 +1,879 @@
-- phpMyAdmin SQL Dump
-- version 5.2.3
-- https://www.phpmyadmin.net/
--
-- Host: db
-- Generation Time: Jan 29, 2026 at 07:19 AM
-- Server version: 8.0.44
-- PHP Version: 8.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `niph_dsps`
--
-- --------------------------------------------------------
--
-- Table structure for table `dsps_tbl_announcement`
--
CREATE TABLE `dsps_tbl_announcement` (
`pkdspsann_id` int NOT NULL,
`dspsann_reg_datetime` datetime DEFAULT CURRENT_TIMESTAMP,
`dspsann_mod_datetime` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`dspsann_reg_by` int DEFAULT NULL COMMENT 'FK to ist_tbl_users',
`dspsann_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`dspsann_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`dspsann_photopath` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'Optional image path for announcement',
`dspsann_status` enum('Published','Draft','Archived') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'Draft'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `dsps_tbl_announcement`
--
INSERT INTO `dsps_tbl_announcement` (`pkdspsann_id`, `dspsann_reg_datetime`, `dspsann_mod_datetime`, `dspsann_reg_by`, `dspsann_title`, `dspsann_description`, `dspsann_photopath`, `dspsann_status`) VALUES
(1, '2025-07-19 16:31:56', '2025-11-27 02:00:14', 1, 'New Data Release: Addressing Health Workforce Gaps to Meet Universal Health Coverage in Cambodia (2024)', '<p>The School of Public Health, National Institute of Public Health (NIPH) announces the availability of the dataset from the 2024 mixed-methods study “Addressing Health Workforce Gaps to Meet Universal Health Coverage (UHC) in Cambodia.” This nationally significant study provides integrated evidence on health workforce capacity, service coverage, and population health needs to inform Cambodias progress toward achieving at least 80% of the Service Coverage Index (SCI) by 2035. The dataset includes population-based survey data collected from 4,600 households (≈19,780 individuals) across five provinces—Phnom Penh, Siem Reap, Kampot, Takeo, and Ratanakiri—representing Cambodias four ecological regions. Data were gathered using multi-stage probability sampling (PPS) and tablet-based structured questionnaires. The household and individual modules capture indicators across the following domains: Reproductive, maternal, newborn, and child health (RMNCH) Non-communicable diseases (NCDs), including hypertension, diabetes, mental health, and risk factors (tobacco, alcohol, diet) Infectious diseases and basic WASH indicators Health service coverage and access, including health-seeking behaviors and essential medicine availability Social determinants of health, such as trust in the health system, health protection coverage (HEF, NSSF), household expenditure, and healthy environment factors The data provide a foundation for sub-national SCI estimation, UHC simulation modeling, and health-workforce planning using tools such as Workload Indicators of Staffing Needs (WISN) and geospatial workforce mapping. Researchers and policymakers can use this dataset to explore: Coverage and equity gaps across health domains; Associations between health workforce density, service readiness, and population health outcomes; Evidence-based projections for staffing and service delivery under Cambodias UHC Roadmap 20242035. Sampling frame: 4,600 households across 200 villages (40 per province) Survey period: AugustSeptember 2024 Data collection mode: Digital tablet-based interviews Primary investigators: School of Public Health, National Institute of Public Health (NIPH), Cambodia Data format: Household-level and individual-level anonymized datasets, codebook, and metadata documentation Access: Available upon approved request through the Data Access Request portal.</p>', 'announcement_69134047cbce0.png', 'Published'),
(6, '2025-11-12 16:08:35', '2025-11-27 01:59:12', 1, 'New Data Release: Cambodia Diabetes & Hypertension Survey (2024)', '<p>The <strong>School of Public Health, National Institute of Public Health (NIPH)</strong>, proudly announces the public release of a major new resource: the <strong>2024 Population-Based Survey on Diabetes and Hypertension in Cambodia</strong> dataset.&nbsp;</p><h3>Key Highlights &amp; Impact</h3><p>This national-level initiative directly contributes to evidence-based monitoring of <strong>Universal Health Coverage (UHC)</strong>and the <strong>Service Coverage Index (SCI)</strong> in Cambodia.</p><ul><li><strong>Data Coverage:</strong> Household-level data collected from approximately <strong>4,600 households</strong> (representing nearly 20,000 individuals) across five key provinces: Phnom Penh, Siem Reap, Kampot, Takeo, and Ratanakiri.</li><li><strong>Methodology:</strong> Utilised a rigorous multi-stage, probability-proportional-to-size (PPS) sampling design with digital, tablet-based collection (AugSept 2024).</li></ul><h3>Data Focus Areas</h3><p>The comprehensive <strong>anonymised</strong> dataset enables crucial analyses on <strong>health equity, service access, and financial protection</strong>. Detailed variables cover:</p><ul><li><strong>Socio-Economic Status:</strong> Income, assets, education, and housing conditions.</li><li><strong>Health Access:</strong> Facility <strong>utilisation</strong>, travel time, and reasons for <strong>non-utilisation</strong>.</li><li><strong>Chronic Diseases:</strong> Recent morbidity and status of <strong>Diabetes, Hypertension</strong>, and associated risk factors.</li><li><strong>Financial Protection:</strong> Out-of-pocket spending, insurance coverage, and coping strategies.</li></ul><h3>Research Opportunity</h3><p>Researchers can now generate <strong>disaggregated indicators</strong> (by province, wealth quintile, gender) and model key determinants of NCD care-seeking and <strong>catastrophic health spending</strong>, supporting Cambodias UHC 2035 milestones.</p><h3>Access the Dataset</h3><ul><li><strong>Implementing Agency:</strong> School of Public Health, NIPH, Cambodia</li><li><strong>Access:</strong> The anonymised dataset (with codebook and variable dictionary) is available <strong>upon approved </strong>request via the <strong>Data Access Request Portal</strong>.</li></ul>', 'announcement_6914b1463821d.png', 'Published'),
(7, '2025-11-12 16:15:27', '2025-11-27 01:58:36', 1, 'Share Your Data Improve People Wellbeing', '<p><strong>Have you completed a health survey, study, or field project in Cambodia?</strong></p><p>The <strong>NIPH Data Repository</strong> is actively seeking high-quality datasets from researchers, universities, and partner organizations working in the Kingdom.</p><p>&nbsp;</p><h3>Why Contribute Your Data?</h3><p>&nbsp;</p><p>By sharing your dataset, you directly accelerate progress toward Universal Health Coverage (UHC) and public health equity.</p><ul><li><strong>Expand National Access:</strong> Broaden the availability of essential research data.</li><li><strong>Enable Cross-Study Analysis:</strong> Facilitate complex analyses on population health and the health system.</li><li><strong>Drive Policy:</strong> Directly support evidence-based policymaking in Cambodia.</li></ul><p>&nbsp;</p><h3>We Welcome Diverse Datasets</h3><p>&nbsp;</p><p>We accept a range of topics critical to public health:</p><ul><li>Public Health Surveys &amp; Surveillance</li><li>Hospital and Laboratory Data (Must be de-identified)</li><li>Health Workforce, Financing, and Service Availability Assessments</li><li>Community and Household Studies</li></ul><p>&nbsp;</p><h3>Benefits for Contributors</h3><p>&nbsp;</p><p>Your investment in public health is recognized and protected:</p><ul><li><strong>Security &amp; Citation:</strong> Your dataset is securely archived and assigned a <strong>unique DOI</strong>, making it permanently citable.</li><li><strong>Visibility:</strong> Gain recognition through NIPHs public data catalogue and future data-impact reports.</li></ul><h3>&nbsp;</h3><h3><strong>Ready to Contribute?</strong></h3><p><strong>Submit your dataset today</strong> via the <strong>“Upload Data”</strong> section.</p><p><i>Need assistance with documentation or ethical clearance?</i> Contact us at <strong>repository@niph.gov.kh</strong>.</p>', 'announcement_6914b29f6aeac.png', 'Published');
-- --------------------------------------------------------
--
-- Table structure for table `dsps_tbl_anonymous`
--
CREATE TABLE `dsps_tbl_anonymous` (
`pkdspsano_id` int NOT NULL,
`dspsano_reg_datetime` datetime DEFAULT CURRENT_TIMESTAMP,
`fkdspsds_id` int NOT NULL COMMENT 'FK to dsps_tbl_datasource',
`dspsano_client_ip` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'IPv4 or IPv6 address',
`dspsano_datetime` datetime DEFAULT CURRENT_TIMESTAMP,
`dspsano_action` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'e.g., View Introduction, Clicked Link'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- --------------------------------------------------------
--
-- Table structure for table `dsps_tbl_datasource`
--
CREATE TABLE `dsps_tbl_datasource` (
`pkdspsds_id` int NOT NULL,
`dspsds_reg_datetime` datetime DEFAULT CURRENT_TIMESTAMP,
`dspsds_mod_datetime` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`dspsds_reg_by` int DEFAULT NULL COMMENT 'FK to ist_tbl_users (who registered this data source)',
`fkdspstds_id` int NOT NULL COMMENT 'FK to dsps_tbl_typedatasource',
`fkdspscate_id` int NOT NULL COMMENT 'FK to dsps_tbl_dspscategory',
`fkisp_id_of` int NOT NULL COMMENT 'FK to ist_tbl_people (Data Owner of this source)',
`dspsds_filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'File path/name for CSV/JSON/PDF,DTA or API endpoint URL',
`dspsds_title_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`dspsds_title_kh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
`dspsds_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
`dspsds_public_date` date DEFAULT NULL COMMENT 'Date when data source was made public',
`dspsds_status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'Pending Review',
`dspsds_filename1` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
`dspsds_filename2` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
`dspsds_filename3` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `dsps_tbl_datasource`
--
INSERT INTO `dsps_tbl_datasource` (`pkdspsds_id`, `dspsds_reg_datetime`, `dspsds_mod_datetime`, `dspsds_reg_by`, `fkdspstds_id`, `fkdspscate_id`, `fkisp_id_of`, `dspsds_filename`, `dspsds_title_en`, `dspsds_title_kh`, `dspsds_description`, `dspsds_public_date`, `dspsds_status`, `dspsds_filename1`, `dspsds_filename2`, `dspsds_filename3`) VALUES
(14, '2025-11-11 13:05:03', '2025-12-17 09:57:47', 208, 6, 4, 106, 'datasource_69369f61b1b4d_household-wide-3.dta', 'Population-Based Survey Dataset on Health Workforce and Service Coverage in Cambodia, 2024', '', 'This dataset was collected as part of the study “Addressing Health Workforce Gaps to Meet Universal Health Coverage in Cambodia”, conducted by the School of Public Health, National Institute of Public Health (NIPH), in 2024.\r\nIt contains household-level and individual-level data from five provinces—Phnom Penh, Siem Reap, Kampot, Takeo, and Ratanakiri—covering indicators related to the Service Coverage Index (SCI), non-communicable diseases, maternal and child health, social determinants, and health-seeking behaviors. The dataset supports national health workforce and UHC analyses.\r\nSampling involved 4,600 households (approx. 19,780 individuals), selected through multi-stage random sampling with probability proportional to size (PPS). Data were collected using structured questionnaires administered via tablets.', NULL, 'Active', 'datasource_69427e9be4fe3_questionnaire.pdf', 'datasource_6913347f4448d.pdf', ''),
(15, '2025-11-12 15:45:48', '2025-12-08 08:51:06', 208, 6, 5, 106, 'datasource_6936917a7503c_household.dta', 'Household Socio-Economic and Health Access Dataset Population-Based Survey on Diabetes and Hypertension in Cambodia, 2024', '', 'This dataset contains household-level information collected during the 2024 population-based survey on the scaling up of diabetes and hypertension in Cambodia, implemented by the School of Public Health, National Institute of Public Health (NIPH).\r\n\r\nIt includes data on household composition, socio-economic characteristics, asset ownership, housing conditions, water and sanitation, and access to health services, along with information on recent morbidity, healthcare utilization, health expenditures, and coping strategies.\r\n\r\nThe dataset enables analysis of health equity, service coverage, and financial protection indicators, supporting national monitoring of Universal Health Coverage (UHC) and Service Coverage Index (SCI) components.\r\n\r\nSampling followed a multi-stage probability proportional to size (PPS) approach across five provinces (Phnom Penh, Siem Reap, Kampot, Takeo, and Ratanakiri), covering approximately 4,600 households.\r\n\r\nEach record represents one household, with variables corresponding to household characteristics, members demographic summaries, and aggregated health-seeking behaviors.', NULL, 'Active', 'datasource_6914abacc0d2d.pdf', 'datasource_6914abacc1819.pdf', 'datasource_6914abacc20c2.pdf'),
(16, '2025-11-12 15:50:44', '2025-12-08 08:21:22', 208, 6, 6, 106, 'datasource_69368a828843c_individual.dta', 'Individual Health, Lifestyle, and Care-Seeking Dataset Population-Based Survey on Diabetes and Hypertension in Cambodia, 2024', '', 'This dataset comprises individual-level records collected from adults aged 40 years and above as part of the 2024 population-based survey on diabetes and hypertension in Cambodia, conducted by the School of Public Health, National Institute of Public Health (NIPH).\r\n\r\nIt includes detailed information on demographics, education, occupation, self-reported health status, diagnosed chronic conditions, healthcare utilization, treatment satisfaction, and social support.\r\nAdditional variables cover lifestyle and behavioral risk factors (tobacco, alcohol, diet, and physical activity) and clinical measurements (blood pressure, anthropometry, fasting blood glucose, HbA1c, and creatinine for selected participants).\r\n\r\nThe dataset supports analyses of non-communicable disease prevalence, healthcare access patterns, and quality of care, providing essential evidence for evaluating Cambodias progress toward Universal Health Coverage (UHC) and NCD service readiness.\r\n\r\nSampling was drawn from 4,600 households across five provinces using a multi-stage PPS design, representing approximately 19,780 individuals.', NULL, 'Active', 'datasource_6914acd4457ed.pdf', 'datasource_6914acd4469c3.pdf', 'datasource_6914acd447794.pdf'),
(17, '2025-12-09 14:40:52', '2025-12-09 14:40:52', 219, 6, 1, 117, 'datasource_693834f41d365_individual-health-lifestyle-and-care-seeking-datas.dta', 'Test Add dataset', '', 'test add dataset', NULL, 'Active', '', '', '');
-- --------------------------------------------------------
--
-- Table structure for table `dsps_tbl_datasource_permission`
--
CREATE TABLE `dsps_tbl_datasource_permission` (
`pkdspsdsp_id` int NOT NULL,
`dspsdsp_reg_datetime` datetime DEFAULT CURRENT_TIMESTAMP,
`dspsdsp_mod_datetime` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`dspsdsp_reg_by` int DEFAULT NULL COMMENT 'FK to ist_tbl_users (who granted permission, usually Data Owner)',
`fkdspsds_id` int NOT NULL COMMENT 'FK to dsps_tbl_datasource',
`fkisp_id_of` int NOT NULL COMMENT 'FK to ist_tbl_people (User who is granted permission)',
`dspsdsp_datetime` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'When permission was granted/requested',
`dspsdsp_permission` enum('Read','Download','Analyze') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`dspsdsp_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
`dspsdsp_proof_path` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
`dspsdsp_status` enum('Approved','Pending','Rejected','Revoked') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'Pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `dsps_tbl_datasource_permission`
--
INSERT INTO `dsps_tbl_datasource_permission` (`pkdspsdsp_id`, `dspsdsp_reg_datetime`, `dspsdsp_mod_datetime`, `dspsdsp_reg_by`, `fkdspsds_id`, `fkisp_id_of`, `dspsdsp_datetime`, `dspsdsp_permission`, `dspsdsp_notes`, `dspsdsp_proof_path`, `dspsdsp_status`) VALUES
(1, '2025-12-08 09:51:18', '2025-12-08 09:51:50', 1, 16, 2, '2025-12-08 09:51:18', 'Download', '', NULL, 'Approved'),
(2, '2025-12-08 10:55:48', '2025-12-08 10:55:48', NULL, 16, 111, '2025-12-08 10:55:48', 'Download', 'Request test', NULL, 'Pending'),
(4, '2025-12-09 01:00:00', '2025-12-09 01:00:41', 1, 16, 113, '2025-12-09 01:00:00', 'Download', '', NULL, 'Approved'),
(5, '2025-12-09 01:19:13', '2025-12-09 01:19:13', NULL, 15, 113, '2025-12-09 01:19:13', 'Download', 'Test8-Test8-Test8', NULL, 'Pending'),
(6, '2025-12-09 01:27:53', '2025-12-09 01:27:53', NULL, 14, 113, '2025-12-09 01:27:53', 'Download', 'Test8-test8-test8', NULL, 'Pending'),
(7, '2025-12-09 01:35:31', '2025-12-09 01:35:31', NULL, 16, 3, '2025-12-09 01:35:31', 'Download', 'test2', NULL, 'Pending'),
(8, '2025-12-09 01:40:21', '2025-12-09 01:40:21', NULL, 15, 3, '2025-12-09 01:40:21', 'Download', 'test2', NULL, 'Pending'),
(9, '2025-12-09 01:46:47', '2025-12-09 01:46:47', NULL, 14, 3, '2025-12-09 01:46:47', 'Download', 'test2', 'permission_proofs/3_9dae3103f90ba5db.pdf', 'Pending'),
(10, '2025-12-09 01:53:22', '2025-12-09 01:54:34', 1, 16, 114, '2025-12-09 01:53:22', 'Read', '', 'permission_proofs/114_ebba3b0b3f0eda6f.pdf', 'Approved'),
(11, '2025-12-09 01:53:44', '2025-12-09 01:55:06', 1, 15, 114, '2025-12-09 01:53:44', 'Download', '', 'permission_proofs/114_a3aca9fce7e79ad0.pdf', 'Approved'),
(12, '2025-12-09 01:59:54', '2025-12-09 02:00:12', 1, 16, 115, '2025-12-09 01:59:54', 'Download', '', 'permission_proofs/115_40a1f6d150fefbdc.pdf', 'Approved'),
(13, '2025-12-09 14:05:13', '2025-12-09 18:07:06', 208, 16, 116, '2025-12-09 14:05:13', 'Download', '', 'permission_proofs/116_9309c1f48740b5ea.pdf', 'Approved'),
(14, '2025-12-09 14:36:00', '2025-12-09 14:36:31', 1, 16, 117, '2025-12-09 14:36:00', 'Download', '', 'permission_proofs/117_bdf6dffc75b365dd.pdf', 'Approved'),
(15, '2025-12-24 13:49:35', '2025-12-25 10:25:09', 208, 14, 122, '2025-12-24 13:49:35', 'Download', '', 'permission_proofs/122_e4a1393aaa5bf8d3.pdf', 'Approved');
-- --------------------------------------------------------
--
-- Table structure for table `dsps_tbl_datasource_used`
--
CREATE TABLE `dsps_tbl_datasource_used` (
`pkdspsdspused_id` int NOT NULL,
`dspsdspused_reg_datetime` datetime DEFAULT CURRENT_TIMESTAMP,
`dspsdspused_mod_datetime` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`dspsdspused_reg_by` int DEFAULT NULL COMMENT 'FK to ist_tbl_users (who performed the action)',
`fkdspsdsused_id` int NOT NULL COMMENT 'FK to dsps_tbl_datasource (the data source that was used)',
`fkisp_id_of` int NOT NULL COMMENT 'FK to ist_tbl_people (the user who used it)',
`dspsdspused_datetime` datetime DEFAULT CURRENT_TIMESTAMP,
`dspsdspused_action` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'e.g., Downloaded, Accessed API, Ran Analysis'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `dsps_tbl_datasource_used`
--
INSERT INTO `dsps_tbl_datasource_used` (`pkdspsdspused_id`, `dspsdspused_reg_datetime`, `dspsdspused_mod_datetime`, `dspsdspused_reg_by`, `fkdspsdsused_id`, `fkisp_id_of`, `dspsdspused_datetime`, `dspsdspused_action`) VALUES
(1, '2025-12-08 10:36:23', '2025-12-08 10:36:23', NULL, 16, 2, '2025-12-08 10:36:23', 'Downloaded'),
(2, '2025-12-08 10:39:54', '2025-12-08 10:39:54', NULL, 16, 2, '2025-12-08 10:39:54', 'Downloaded'),
(3, '2025-12-09 01:01:18', '2025-12-09 01:01:18', NULL, 16, 113, '2025-12-09 01:01:18', 'Downloaded'),
(4, '2025-12-09 01:55:16', '2025-12-09 01:55:16', NULL, 15, 114, '2025-12-09 01:55:16', 'Downloaded'),
(5, '2025-12-09 02:00:22', '2025-12-09 02:00:22', NULL, 16, 115, '2025-12-09 02:00:22', 'Downloaded'),
(6, '2025-12-09 14:36:44', '2025-12-09 14:36:44', NULL, 16, 117, '2025-12-09 14:36:44', 'Downloaded'),
(7, '2025-12-09 18:15:21', '2025-12-09 18:15:21', NULL, 16, 116, '2025-12-09 18:15:21', 'Downloaded');
-- --------------------------------------------------------
--
-- Table structure for table `dsps_tbl_dspsabout`
--
CREATE TABLE `dsps_tbl_dspsabout` (
`pkdspsabout_id` int NOT NULL,
`dspsabout_reg_datetime` datetime DEFAULT CURRENT_TIMESTAMP,
`dspsabout_mod_datetime` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`dspsabout_reg_by` int DEFAULT NULL COMMENT 'FK to ist_tbl_users',
`fkisp_id_of` int NOT NULL COMMENT 'FK to ist_tbl_people (who created/modified this about entry)',
`dspsabout_title_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`dspsabout_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `dsps_tbl_dspsabout`
--
INSERT INTO `dsps_tbl_dspsabout` (`pkdspsabout_id`, `dspsabout_reg_datetime`, `dspsabout_mod_datetime`, `dspsabout_reg_by`, `fkisp_id_of`, `dspsabout_title_en`, `dspsabout_description`) VALUES
(1, '2025-07-19 16:35:41', '2025-07-19 16:35:41', 1, 1, 'Our Vision', 'To be a leading institution in public health, fostering a healthier and more resilient community through evidence-based practices and collaborative data sharing.'),
(2, '2025-07-19 16:35:41', '2025-07-19 16:35:41', 1, 1, 'Our Mission', 'To protect and promote the health of the population through scientific research, education, and effective public health interventions, facilitated by accessible and secure data.'),
(3, '2025-07-19 16:35:41', '2025-07-19 16:35:41', 1, 1, 'Our Goals', '1. Enhance data accessibility for public health research. 2. Promote data-driven decision-making. 3. Strengthen collaboration among health stakeholders. 4. Ensure data security and privacy.'),
(4, '2025-07-19 16:35:41', '2025-07-19 16:35:41', 1, 1, 'About NIPH', 'The National Institute of Public Health (NIPH) is a governmental institution under the Ministry of Health, Cambodia. Established to conduct research, provide training, and offer public health services, NIPH plays a crucial role in improving the health status of the Cambodian population. This data sharing platform is an initiative to further our mission by enabling secure and efficient data exchange.');
-- --------------------------------------------------------
--
-- Table structure for table `dsps_tbl_dspscategory`
--
CREATE TABLE `dsps_tbl_dspscategory` (
`pkdspscate_id` int NOT NULL,
`dspscate_reg_datetime` datetime DEFAULT CURRENT_TIMESTAMP,
`dspscate_mod_datetime` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`dspscate_reg_by` int DEFAULT NULL COMMENT 'FK to ist_tbl_users',
`dspscate_title_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`dspscate_details` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `dsps_tbl_dspscategory`
--
INSERT INTO `dsps_tbl_dspscategory` (`pkdspscate_id`, `dspscate_reg_datetime`, `dspscate_mod_datetime`, `dspscate_reg_by`, `dspscate_title_en`, `dspscate_details`) VALUES
(1, '2025-07-12 16:54:58', '2025-11-26 08:51:00', 1, 'Public Health Surveillance', 'Data related to public health, diseases, and demographics.'),
(2, '2025-07-12 16:54:58', '2025-07-19 14:50:38', NULL, 'Education Statistics', 'Statistical data on schools, students, and educational outcomes.'),
(3, '2025-07-12 16:54:58', '2025-11-26 08:59:21', 1, 'Review data', 'Indicator-based data from program reviews (e.g., HIV cascade, PMTCT review, primary healthcare review)'),
(4, '2025-11-11 12:59:09', '2025-11-26 08:54:25', 1, 'Population-Based Survey', 'Data collected using survey methods to draw statistically representative conclusions about a larger, defined population'),
(5, '2025-11-12 15:48:17', '2025-11-26 08:55:48', 1, 'Health services or health facility-based data', 'Data collected as part of routine data collection under the Health Managment Information System (HMIS)'),
(6, '2025-11-12 15:49:03', '2025-11-12 15:49:03', 1, 'Health and behavior survey data', '');
-- --------------------------------------------------------
--
-- Table structure for table `dsps_tbl_dspsfaq`
--
CREATE TABLE `dsps_tbl_dspsfaq` (
`pkdspsfaq_id` int NOT NULL,
`dspsfaq_reg_datetime` datetime DEFAULT CURRENT_TIMESTAMP,
`dspsfaq_mod_datetime` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`dspsfaq_reg_by` int DEFAULT NULL COMMENT 'FK to ist_tbl_users',
`fkisp_id_of` int NOT NULL COMMENT 'FK to ist_tbl_people (who created/modified this FAQ)',
`dspsfaq_title_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Question',
`dspsfaq_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Answer'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `dsps_tbl_dspsfaq`
--
INSERT INTO `dsps_tbl_dspsfaq` (`pkdspsfaq_id`, `dspsfaq_reg_datetime`, `dspsfaq_mod_datetime`, `dspsfaq_reg_by`, `fkisp_id_of`, `dspsfaq_title_en`, `dspsfaq_description`) VALUES
(1, '2025-07-19 16:38:29', '2025-07-26 22:23:24', 1, 1, 'What is the NIPH Data Sharing Platform?', 'The NIPH Data Sharing Platform (DSP) is a secure online portal designed to facilitate the sharing and access of public health data among authorized researchers, policymakers, and the public. It aims to promote data-driven decision-making and collaborative research.'),
(2, '2025-07-19 16:38:29', '2025-07-19 16:38:29', 1, 1, 'How can I request access to data?', 'Data Users can browse available data sources and submit a formal request for access through the platform. The request will be reviewed by the respective Data Owner, who will approve or deny access based on the data\'s sensitivity and the user\'s justification.'),
(3, '2025-07-19 16:38:29', '2025-07-19 16:38:29', 1, 1, 'What types of data are available?', 'The platform hosts various types of public health data, including but not limited to epidemiological surveillance data, survey results, laboratory data, and research findings. Data formats may include CSV, JSON, PDF, and potentially API access.'),
(4, '2025-07-19 16:38:29', '2025-07-19 16:38:29', 1, 1, 'Is my data secure on this platform?', 'Yes, data security and privacy are paramount. The platform employs robust security measures, including secure authentication, role-based access control, and data encryption. All sensitive data is handled in compliance with national data protection regulations.'),
(5, '2025-07-19 16:38:29', '2025-07-19 16:38:29', 1, 1, 'How can I contribute my data?', 'If you are a Data Owner (e.g., a researcher or institution with relevant public health data), you can register on the platform and use the \"Manage My Data Sources\" section to upload and describe your datasets. All contributions are subject to review by DAC Staff.');
-- --------------------------------------------------------
--
-- Table structure for table `dsps_tbl_dspsslide`
--
CREATE TABLE `dsps_tbl_dspsslide` (
`pkdspsslide_id` int NOT NULL,
`dspsslide_reg_datetime` datetime DEFAULT CURRENT_TIMESTAMP,
`dspsslide_mod_datetime` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`dspsslide_reg_by` int DEFAULT NULL COMMENT 'FK to ist_tbl_users',
`fkisp_id_of` int NOT NULL COMMENT 'FK to ist_tbl_people (who created/modified this slide)',
`dspsslide_title_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`dspsslide_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
`dspsslide_photoname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'File path/name of the slide image'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `dsps_tbl_dspsslide`
--
INSERT INTO `dsps_tbl_dspsslide` (`pkdspsslide_id`, `dspsslide_reg_datetime`, `dspsslide_mod_datetime`, `dspsslide_reg_by`, `fkisp_id_of`, `dspsslide_title_en`, `dspsslide_description`, `dspsslide_photoname`) VALUES
(1, '2025-07-20 10:24:56', '2025-10-31 04:21:08', 1, 1, 'Welcome to NIPH Data Sharing Platform', 'Your central hub for public health data and collaborative research.', 'slide_6904393484fbf.jpg'),
(2, '2025-07-20 10:24:56', '2025-10-31 04:21:21', 1, 1, 'Explore Diverse Datasets', 'Access a wide range of epidemiological, clinical, and environmental health data.', 'slide_69043941bc921.jpg'),
(3, '2025-07-20 10:24:56', '2025-10-31 04:21:30', 1, 1, 'Empowering Data-Driven Decisions', 'Facilitating informed policy-making and public health interventions.', 'slide_6904394af324f.jpg');
-- --------------------------------------------------------
--
-- Table structure for table `dsps_tbl_feedback`
--
CREATE TABLE `dsps_tbl_feedback` (
`pkdspsfb_id` int NOT NULL,
`dspsfb_reg_datetime` datetime DEFAULT CURRENT_TIMESTAMP,
`dspsfb_res_datetime` datetime DEFAULT NULL COMMENT 'Response datetime',
`dspsfb_res_by` int DEFAULT NULL COMMENT 'FK to ist_tbl_users (who responded)',
`dspsfb_client_ip` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'IP of the feedback submitter',
`dspsfb_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`dspsfb_email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
`dspsfb_body_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`dspsfb_respond_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT 'Response from DAC staff/admin',
`dspsfb_status` enum('New','In Progress','Resolved','Archived') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'New'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- --------------------------------------------------------
--
-- Table structure for table `dsps_tbl_social`
--
CREATE TABLE `dsps_tbl_social` (
`pkdspssocial_id` int NOT NULL,
`dspssocial_reg_datetime` datetime DEFAULT CURRENT_TIMESTAMP,
`dspssocial_mod_datetime` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`dspssocial_reg_by` int DEFAULT NULL COMMENT 'FK to ist_tbl_users',
`dspssocial_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'e.g., Facebook, YouTube, Telegram',
`dspssocial_link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- --------------------------------------------------------
--
-- Table structure for table `dsps_tbl_typedatasource`
--
CREATE TABLE `dsps_tbl_typedatasource` (
`pkdspstds_id` int NOT NULL,
`dspstds_reg_datetime` datetime DEFAULT CURRENT_TIMESTAMP,
`dspstds_mod_datetime` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`dspstds_reg_by` int DEFAULT NULL COMMENT 'FK to ist_tbl_users',
`dspstds_name_en` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`dspstds_name_kh` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `dsps_tbl_typedatasource`
--
INSERT INTO `dsps_tbl_typedatasource` (`pkdspstds_id`, `dspstds_reg_datetime`, `dspstds_mod_datetime`, `dspstds_reg_by`, `dspstds_name_en`, `dspstds_name_kh`) VALUES
(1, '2025-07-12 16:54:58', '2025-07-12 16:54:58', NULL, 'CSV', 'ស៊ីអេសវី'),
(2, '2025-07-12 16:54:58', '2025-07-12 16:54:58', NULL, 'JSON', 'ជេសអិន'),
(3, '2025-07-12 16:54:58', '2025-07-12 16:54:58', NULL, 'API', 'អេភីអាយ'),
(4, '2025-07-12 16:54:58', '2025-07-12 16:54:58', NULL, 'PDF', 'ភីឌីអេហ្វ'),
(6, '2025-11-11 12:54:39', '2025-11-11 12:54:39', 1, 'DTA', 'ឌីធីអេ');
-- --------------------------------------------------------
--
-- Table structure for table `dsp_oauth_access_tokens`
--
CREATE TABLE `dsp_oauth_access_tokens` (
`token_hash` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`client_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`person_id` int NOT NULL,
`scope` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
`expires_at` datetime NOT NULL,
`refresh_token_hash` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
`refresh_expires_at` datetime DEFAULT NULL,
`is_revoked` tinyint(1) NOT NULL DEFAULT '0',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`last_used_at` datetime DEFAULT NULL,
`revoked_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- --------------------------------------------------------
--
-- Table structure for table `dsp_oauth_auth_codes`
--
CREATE TABLE `dsp_oauth_auth_codes` (
`code_hash` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`client_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`person_id` int NOT NULL,
`scope` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
`redirect_uri` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`expires_at` datetime NOT NULL,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `dsp_oauth_auth_codes`
--
INSERT INTO `dsp_oauth_auth_codes` (`code_hash`, `client_id`, `person_id`, `scope`, `redirect_uri`, `expires_at`, `created_at`) VALUES
('2296f20d93cd1b00faa60632e9be83f39ceea6664f73cdc3baeed010e2fcdd91', 'hub-client', 105, 'profile', 'http://dsp.niph.org.kh:4011/hub/oauth_callback', '2025-11-08 06:34:17', '2025-11-08 06:24:17'),
('2a2467284c10a1538fda911c9e9a3ebc7f11d1283e45df16e3bbdf3442fb1afc', 'hub-client', 1, 'profile', 'http://dsp.niph.org.kh:4011/hub/oauth_callback', '2025-11-10 02:20:45', '2025-11-10 02:10:45'),
('335554ef508bc94892fde80e4bb7b63e547fdcbb38cfd51b3c81d2474e81b3d6', 'hub-client', 105, 'profile', 'http://dsp.niph.org.kh:4011/hub/oauth_callback', '2025-11-08 06:27:08', '2025-11-08 06:17:08'),
('3b674e8efd14bedbf612dc09103720bb6fdb9b645c7d034eb40268c5160cd808', 'hub-client', 1, 'profile', 'http://dsp.niph.org.kh:4011/hub/oauth_callback', '2025-11-10 03:25:45', '2025-11-10 03:15:45'),
('406e69a2e5351a0b9535efeb524284b23da130b1cc6b81af8535f6da06f34317', 'hub-client', 105, 'profile', 'http://dsp.niph.org.kh:4011/hub/oauth_callback', '2025-11-08 06:16:24', '2025-11-08 06:06:24'),
('4fe79f414fd4a6c012ce3a5ceb74fc405160d00d00745948cfb0a995712366c7', 'hub-client', 1, 'profile', 'https://hub.niph.org.kh/hub/oauth_callback', '2025-11-25 07:42:18', '2025-11-25 07:32:18'),
('648021ed5e48e8cf1d8d8f7aa2475a788fb5201744530a04aef8113feb7d9bcb', 'hub-client', 1, 'profile', 'https://hub.niph.org.kh/hub/oauth_callback', '2025-11-25 07:43:09', '2025-11-25 07:33:09'),
('6879696c4bd0d993d6b68aea9adfd4714a367d33716ececdc363734d55556d8c', 'hub-client', 1, 'profile', 'http://dsp.niph.org.kh:4011/hub/oauth_callback', '2025-11-10 03:32:59', '2025-11-10 03:22:59'),
('7589fa61b921abc7b15c18aa1468c8a7edeec4f87260f9949c4dc41cbd22c679', 'hub-client', 1, 'profile', 'http://dsp.niph.org.kh:4011/hub/oauth_callback', '2025-11-08 06:27:31', '2025-11-08 06:17:31'),
('7adac0c63b2c66d43a7fe71919c9f831ed9ec5492aaf4054b3231b958fbe0d0c', 'hub-client', 105, 'profile', 'http://dsp.niph.org.kh:4011/hub/oauth_callback', '2025-11-08 04:29:11', '2025-11-08 04:19:11'),
('942b5a605c5df25406f9f0b1eddf3e6c40ece23f900907129ae373debc3b57c6', 'hub-client', 1, 'profile', 'http://dsp.niph.org.kh:4011/hub/oauth_callback', '2025-11-10 02:22:31', '2025-11-10 02:12:31'),
('af05f58273543fe5788e55b14391ca7417536ec83a953578f3cb6bd2411c8968', 'hub-client', 1, 'profile', 'https://hub.niph.org.kh/hub/oauth_callback', '2025-11-25 07:42:04', '2025-11-25 07:32:04'),
('c20ad404110efad15fc8726583bfc8b1a393bc68de679ca334aa87f299309306', 'hub-client', 1, 'profile', 'http://dsp.niph.org.kh:4011/hub/oauth_callback', '2025-11-08 06:24:22', '2025-11-08 06:14:22'),
('c2b07d2bc4473a354854360ae9449517ea08936d62d6e012ac078cdf837c43e0', 'hub-client', 1, 'profile', 'http://dsp.niph.org.kh:4011/hub/oauth_callback', '2025-11-08 04:05:24', '2025-11-08 03:55:24'),
('c5645e1fe25e2531b4bdfa33069b2f86e08cf07bbaab2e22871c0032a53c98d6', 'hub-client', 1, 'profile', 'http://dsp.niph.org.kh:4011/hub/oauth_callback', '2025-11-08 03:16:15', '2025-11-08 03:06:15'),
('c66611f01f5ab63e66b0c5c7f4f408101ee77d74ba2c1dff88481978e8595b1e', 'hub-client', 105, 'profile', 'http://dsp.niph.org.kh:4011/hub/oauth_callback', '2025-11-08 04:26:04', '2025-11-08 04:16:04'),
('ceea37d4999800de5b2a107b8c8b883f6cac20d34314a5331b03fe8ba7c8a308', 'hub-client', 1, 'profile', 'http://dsp.niph.org.kh:4011/hub/oauth_callback', '2025-11-08 04:18:23', '2025-11-08 04:08:23'),
('d57bb7ae20491d7d5a3c82f02c398e542bc8cf7f85aafc30aa2c7bd43090cba0', 'hub-client', 1, 'profile', 'http://dsp.niph.org.kh:4011/hub/oauth_callback', '2025-11-07 04:13:05', '2025-11-07 04:03:05'),
('e314ff500a816116637b1a56f22af8640247f267dcd20e194bfe0990c89a8238', 'hub-client', 1, 'profile', 'https://hub.niph.org.kh/hub/oauth_callback', '2025-11-25 07:42:08', '2025-11-25 07:32:08');
-- --------------------------------------------------------
--
-- Table structure for table `dsp_oauth_clients`
--
CREATE TABLE `dsp_oauth_clients` (
`client_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`client_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`client_secret_hash` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
`redirect_uris` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`allowed_scopes` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
`is_confidential` tinyint(1) NOT NULL DEFAULT '1',
`is_revoked` tinyint(1) NOT NULL DEFAULT '0',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `dsp_oauth_clients`
--
INSERT INTO `dsp_oauth_clients` (`client_id`, `client_name`, `client_secret_hash`, `redirect_uris`, `allowed_scopes`, `is_confidential`, `is_revoked`, `created_at`, `updated_at`) VALUES
('hub-client', 'DSP JupyterHub', '$2y$10$h5mhe5KgjqKIz6c5E2zRv.Sa4Mq8yN0V5qoHHrxCwjgsq7h/8asTC', 'https://hub.niph.org.kh/hub/oauth_callback', 'profile', 1, 0, '2025-11-07 03:48:16', '2025-12-03 07:53:37');
-- --------------------------------------------------------
--
-- Table structure for table `ist_tbl_people`
--
CREATE TABLE `ist_tbl_people` (
`pkisp_id` int NOT NULL,
`isp_reg_datetime` datetime DEFAULT CURRENT_TIMESTAMP,
`isp_mod_datetime` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`isp_regby_id` int DEFAULT NULL COMMENT 'FK to ist_tbl_users if registered by another user, or NULL if self-registered',
`isp_idcard` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
`isp_firstname_en` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`isp_lastname_en` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`isp_sex` enum('Male','Female','Other') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`isp_dob` date NOT NULL,
`isp_pob` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'Place of Birth',
`isp_nationality` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'Cambodian',
`isp_marital_status` enum('Single','Married','Divorced','Widowed') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'Single',
`isp_phone_number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
`isp_email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
`isp_telegram` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
`isp_note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `ist_tbl_people`
--
INSERT INTO `ist_tbl_people` (`pkisp_id`, `isp_reg_datetime`, `isp_mod_datetime`, `isp_regby_id`, `isp_idcard`, `isp_firstname_en`, `isp_lastname_en`, `isp_sex`, `isp_dob`, `isp_pob`, `isp_nationality`, `isp_marital_status`, `isp_phone_number`, `isp_email`, `isp_telegram`, `isp_note`) VALUES
(1, '2025-07-12 16:16:55', '2025-12-16 12:47:27', 1, '123456789', 'Admin', 'User', 'Male', '1990-01-01', NULL, 'Cambodian', 'Single', '0123456789', 'dsp@niph.org.kh', NULL, NULL),
(2, '2025-07-12 16:16:55', '2025-07-12 16:16:55', NULL, '987654321', 'Data', 'Owner', 'Female', '1985-05-10', NULL, 'Cambodian', 'Single', '0987654321', 'owner@example.com', NULL, NULL),
(3, '2025-07-12 16:16:55', '2025-07-12 16:16:55', NULL, '112233445', 'Data', 'User', 'Male', '1992-11-20', NULL, 'Cambodian', 'Single', '0112233445', 'user@example.com', NULL, NULL),
(101, '2025-07-20 12:43:02', '2025-07-20 12:43:02', NULL, '1234567890', 'Mock', 'Owner', 'Male', '1980-01-01', NULL, 'Cambodian', 'Single', '111222333', 'mock.owner@example.com', NULL, NULL),
(102, '2025-08-30 08:34:25', '2025-08-30 08:34:25', NULL, '11', '11', '111', 'Male', '2025-08-30', NULL, 'Cambodian', 'Single', '', '', NULL, NULL),
(103, '2025-08-30 08:37:51', '2025-08-30 08:37:51', NULL, 'N001', 'Pisey', 'Um', 'Female', '2025-08-22', NULL, 'Cambodian', 'Single', '012', 'pisey@gmail.com', NULL, NULL),
(104, '2025-08-30 09:07:13', '2025-08-30 09:07:13', NULL, 'N002', 'sp', 'ch', 'Male', '2025-08-30', NULL, 'Cambodian', 'Single', '092', 'sp@gmail.com', NULL, NULL),
(105, '2025-08-30 10:46:55', '2025-08-30 10:46:55', NULL, 'p001', 'pp', 'ppp', 'Male', '2025-08-30', NULL, 'Cambodian', 'Single', '123', 'pp@gmail.com', NULL, NULL),
(106, '2025-11-11 12:20:06', '2025-11-11 12:20:06', NULL, '999999', 'Sorithisey', 'Mony', 'Male', '1995-06-24', NULL, 'Cambodian', 'Single', '0967550956', 'sorithisey@gmail.com', NULL, NULL),
(107, '2025-11-26 08:43:50', '2025-11-26 08:43:50', NULL, '888888', 'Ponlork', 'Sok', 'Male', '1981-03-13', NULL, 'Cambodian', 'Single', '092 224 255', 'sok.ponlork@gmail.com', NULL, NULL),
(108, '2025-12-03 05:21:14', '2025-12-03 05:21:14', NULL, '000168', 'kim', 'heang', 'Male', '2025-12-23', NULL, 'Cambodian', 'Single', '077816322', 'kimheang@niph.org.kh', NULL, NULL),
(109, '2025-12-04 01:48:00', '2025-12-04 01:48:00', NULL, '180889917', 'Sopheavy', 'Ma', 'Female', '1999-08-20', NULL, 'Cambodian', 'Single', '085729985', 'sopheavy.ma@yahoo.com', NULL, NULL),
(110, '2025-12-07 06:20:31', '2025-12-07 06:20:31', NULL, '0000', 'Vannarath', 'Te', 'Male', '1987-08-09', NULL, 'Cambodian', 'Single', '16524518', 'vannarath_te@yahoo.com', NULL, NULL),
(111, '2025-12-08 06:49:57', '2025-12-08 06:49:57', NULL, '12345688888', 'Rithiseytest', 'Monytest', 'Male', '1995-06-24', NULL, 'Cambodian', 'Single', '096755095656', 'purplemangopm@gmail.com', NULL, NULL),
(112, '2025-12-08 08:26:05', '2025-12-08 08:26:05', NULL, '0555765467', 'Diya', 'Em', 'Male', '2000-04-16', NULL, 'Cambodian', 'Single', '089830244', 'emdiya@niph.org.kh', NULL, NULL),
(113, '2025-12-09 00:59:03', '2025-12-09 00:59:03', NULL, NULL, 'Test8', 'Test8888', 'Male', '1999-12-09', NULL, 'Cambodian', 'Single', '093284402', 'sokponlork@gmail.com', NULL, NULL),
(114, '2025-12-09 01:50:10', '2025-12-09 01:50:10', NULL, NULL, 'User', '5', 'Male', '2000-01-01', NULL, 'Cambodian', 'Single', '0897865233', 'user5@gmail.com', NULL, NULL),
(115, '2025-12-09 01:59:12', '2025-12-09 01:59:12', NULL, NULL, 'User', '6th', 'Female', '1998-02-01', NULL, 'Cambodian', 'Single', '0965735244', 'user6@gmail.com', NULL, NULL),
(116, '2025-12-09 13:33:37', '2025-12-09 13:33:37', NULL, NULL, 'Sorithisey', 'Mony', 'Male', '1995-12-12', NULL, 'Cambodian', 'Single', '0967555889', 'niph.mrsia@gmail.com', NULL, NULL),
(117, '2025-12-09 14:33:36', '2025-12-09 14:33:36', NULL, NULL, 'Diya', 'Test', 'Male', '1998-04-16', NULL, 'Cambodian', 'Single', '0967867544', 'diya.test@niph.org.kh', NULL, NULL),
(118, '2025-12-10 03:27:37', '2025-12-10 03:27:37', NULL, NULL, 'Sam', 'Sreyleak', 'Female', '1998-12-11', NULL, 'Cambodian', 'Single', '0966211883', 'samsreyleak12@gmail.com', NULL, NULL),
(119, '2025-12-10 03:29:28', '2025-12-10 03:29:28', NULL, NULL, 'KOSAL', 'THAY', 'Male', '1985-01-18', NULL, 'Cambodian', 'Single', '+855 12 505 434', 'kosalthay@gmail.com', NULL, NULL),
(120, '2025-12-11 06:17:15', '2025-12-11 06:17:15', NULL, NULL, 'VISALSOKWATEY', 'SIN', 'Female', '1993-01-04', NULL, 'Cambodian', 'Single', '0963868988', 'wateysin02@gmail.com', NULL, NULL),
(121, '2025-12-22 12:55:44', '2025-12-22 12:55:44', NULL, NULL, 'Yuthathikar', 'SOK', 'Male', '1998-04-02', NULL, 'Cambodian', 'Single', '015682466', 'syuthathikar@gmail.com', NULL, NULL),
(122, '2025-12-24 08:25:32', '2025-12-24 08:25:32', NULL, NULL, 'Kong', 'Malika', 'Female', '1989-09-09', NULL, 'Cambodian', 'Single', '+85516238893', 'malika.kong99@gmail.com', NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `ist_tbl_users`
--
CREATE TABLE `ist_tbl_users` (
`pkisu_id` int NOT NULL,
`isu_reg_datetime` datetime DEFAULT CURRENT_TIMESTAMP,
`isu_mod_datetime` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`isu_regby_id` int DEFAULT NULL COMMENT 'FK to pkisu_id if registered by another user, or NULL if self-registered',
`fkisp_id_of` int NOT NULL COMMENT 'FK to ist_tbl_people',
`isu_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Username',
`isu_password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Hashed password',
`isu_status` enum('DAC Staff','Data Contributor','Data Owner','Data User','Inactive') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'Data User',
`isu_can_run_r` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 if user may run R/Jupyter integrations'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `ist_tbl_users`
--
INSERT INTO `ist_tbl_users` (`pkisu_id`, `isu_reg_datetime`, `isu_mod_datetime`, `isu_regby_id`, `fkisp_id_of`, `isu_name`, `isu_password`, `isu_status`, `isu_can_run_r`) VALUES
(1, '2025-07-12 16:16:55', '2025-12-16 12:49:16', 1, 1, 'admin', '$2y$10$Br3LxaQ8Vuf1hH9Jh8t4jOwgfigW9T7tlQkNNqe3NdcegrZ.C7Coq', 'DAC Staff', 1),
(2, '2025-07-12 16:16:55', '2025-11-26 08:10:57', 1, 2, 'test1', '$2y$10$HTo15tHxQJEs9sRJDkL/0ueOPxHTyezcwg6Elpy9js8msyuutGuZi', 'Data Contributor', 1),
(3, '2025-07-12 16:16:55', '2025-11-26 07:31:52', 1, 3, 'test2', '$2y$10$HTo15tHxQJEs9sRJDkL/0ueOPxHTyezcwg6Elpy9js8msyuutGuZi', 'Data User', 0),
(203, '2025-07-12 16:16:55', '2025-11-26 07:31:48', 1, 101, 'test3', '$2y$10$HTo15tHxQJEs9sRJDkL/0ueOPxHTyezcwg6Elpy9js8msyuutGuZi', 'Inactive', 0),
(204, '2025-08-30 08:34:25', '2025-11-26 07:31:42', 1, 102, 'test4', '$2y$10$HTo15tHxQJEs9sRJDkL/0ueOPxHTyezcwg6Elpy9js8msyuutGuZi', 'Inactive', 0),
(205, '2025-08-30 08:37:51', '2025-11-26 07:31:37', 1, 103, 'test5', '$2y$10$HTo15tHxQJEs9sRJDkL/0ueOPxHTyezcwg6Elpy9js8msyuutGuZi', 'Data Owner', 1),
(206, '2025-08-30 09:07:14', '2025-11-26 07:31:30', 1, 104, 'test6', '$2y$10$HTo15tHxQJEs9sRJDkL/0ueOPxHTyezcwg6Elpy9js8msyuutGuZi', 'Inactive', 1),
(207, '2025-08-30 10:46:56', '2025-11-26 07:31:00', 1, 105, 'test7', '$2y$10$HTo15tHxQJEs9sRJDkL/0ueOPxHTyezcwg6Elpy9js8msyuutGuZi', 'Inactive', 1),
(208, '2025-11-11 12:20:06', '2025-12-09 14:16:20', 1, 106, 'sorithisey@gmail.com', '$2y$10$3cRmvpmPEpNchgepLKpjEOuMQTmN6waPYbTPG18E0edIhhnfmm17a', 'Data Owner', 1),
(209, '2025-11-26 08:43:50', '2025-11-26 08:43:50', NULL, 107, 'ponlork', '$2y$10$RFGJa5X26Z8VjHobsbH6TudLfGLjrZXKMpyAEmCE/4Jgt5.TGNsKe', 'Data User', 0),
(210, '2025-12-03 05:21:14', '2025-12-03 05:26:49', 1, 108, 'kimheang', '$2y$10$brsNm0fRdozYZn9RVsz3t.StaPYViRfyW0KcOUxxj/gnmj9M5Nr0G', 'Data User', 1),
(211, '2025-12-04 01:48:00', '2025-12-07 08:15:47', 1, 109, 'Sopheavy Ma', '$2y$10$om/c1ttMMmKbSKIPcCzn4.pJpyL58TyC6LnGIv.eEYLClH1kt9TLK', 'Data User', 1),
(212, '2025-12-07 06:20:31', '2025-12-07 08:15:39', 1, 110, 'tevannarath', '$2y$10$5dnBA0X48GZuLorxqZN/oOkzcNeneyeEGpSxcg3LYeLt.0N4Ahp4i', 'Data User', 1),
(213, '2025-12-08 06:49:57', '2025-12-09 14:16:02', 1, 111, 'rithiseytest', '$2y$10$7HjXEKus2a9r9mt7NBfm4Oury4dr/.l/KmRykQR0PKXeJpbyBRike', 'Data User', 1),
(214, '2025-12-08 08:26:05', '2025-12-08 08:43:38', 1, 112, 'emdiya', '$2y$10$ynOqH1ibh1k1lo8Jz7S/qOCpQlFw/37ygma2VlI612EMKSGpSulBi', 'Data User', 1),
(215, '2025-12-09 00:59:04', '2025-12-09 00:59:04', NULL, 113, 'test8', '$2y$10$5OAkLF0VGh58RJqS707SSeCb12gCQJFGamCaGD5A6vFfGUOTmZMU6', 'Data User', 0),
(216, '2025-12-09 01:50:10', '2025-12-09 01:50:10', NULL, 114, 'user5', '$2y$10$ntJSY6CpiU1C2p3Ma9xWkev6ATCI1vqPuHe0LK9JtLuLpoRjvOfKK', 'Data User', 0),
(217, '2025-12-09 01:59:12', '2025-12-09 01:59:12', NULL, 115, 'user6', '$2y$10$UssicNXljnzheg8qmJYzIeuGkZsIHgdiJDKQFJWomY0lc1CUxWUDW', 'Data User', 0),
(218, '2025-12-09 13:33:37', '2025-12-09 14:16:46', 1, 116, 'seyhealthdata', '$2y$10$53WLs557PbLerdfQqmpREOPD7IOLl3DgUuz.MDi87v6WikEQmxGFG', 'Data User', 1),
(219, '2025-12-09 14:33:36', '2025-12-09 14:38:52', 1, 117, 'diya.test', '$2y$10$VzBvWrmeSPQvitGnfsVb1uGP6KfzL6PO/jYaZQu1qjUB7S0N.K3m6', 'Data Owner', 1),
(220, '2025-12-10 03:27:37', '2025-12-10 03:27:37', NULL, 118, 'Sreyleak', '$2y$10$mb5qvoLZt097ddo5D/NB.e5GT5i71X/3FZKCtznWZiJW6089C1ZLa', 'Data User', 0),
(221, '2025-12-10 03:29:28', '2025-12-10 03:29:28', NULL, 119, 'KOSALTHAY', '$2y$10$Wa2O.19eKGrzRf4BSEM6/.UTPHGUsUf.7rN/qgC5RIC18w66Usc.e', 'Data User', 0),
(222, '2025-12-11 06:17:15', '2025-12-11 06:17:15', NULL, 120, 'Watey', '$2y$10$1salSBBSXLJ.EKWfD2oQ2OB6uiPF9XFUyuvl/4wUcyp/mgJ0vOy66', 'Data User', 0),
(223, '2025-12-22 12:55:44', '2025-12-22 12:55:44', NULL, 121, 'SOK_Yuthathikar', '$2y$10$KtPdfMKS6LNcB6.LKcSXyucznt43ZAnTsQ4mPz3wgtzhw6sDlGp5y', 'Data User', 0),
(224, '2025-12-24 08:25:33', '2025-12-24 08:25:33', NULL, 122, 'malikakong', '$2y$10$Sve7m/fmgKC2YEk40DT.sOojmfqeL1RBmSaCogXSrCbrWwSBY40v2', 'Data User', 0);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `dsps_tbl_announcement`
--
ALTER TABLE `dsps_tbl_announcement`
ADD PRIMARY KEY (`pkdspsann_id`),
ADD KEY `dspsann_reg_by` (`dspsann_reg_by`),
ADD KEY `idx_dspsann_status` (`dspsann_status`);
--
-- Indexes for table `dsps_tbl_anonymous`
--
ALTER TABLE `dsps_tbl_anonymous`
ADD PRIMARY KEY (`pkdspsano_id`),
ADD KEY `fkdspsds_id` (`fkdspsds_id`);
--
-- Indexes for table `dsps_tbl_datasource`
--
ALTER TABLE `dsps_tbl_datasource`
ADD PRIMARY KEY (`pkdspsds_id`),
ADD KEY `dspsds_reg_by` (`dspsds_reg_by`),
ADD KEY `fkdspstds_id` (`fkdspstds_id`),
ADD KEY `fkdspscate_id` (`fkdspscate_id`),
ADD KEY `fkisp_id_of` (`fkisp_id_of`),
ADD KEY `idx_dspsds_status` (`dspsds_status`);
--
-- Indexes for table `dsps_tbl_datasource_permission`
--
ALTER TABLE `dsps_tbl_datasource_permission`
ADD PRIMARY KEY (`pkdspsdsp_id`),
ADD UNIQUE KEY `fkdspsds_id` (`fkdspsds_id`,`fkisp_id_of`),
ADD KEY `dspsdsp_reg_by` (`dspsdsp_reg_by`),
ADD KEY `fkisp_id_of` (`fkisp_id_of`),
ADD KEY `idx_dspsdsp_status` (`dspsdsp_status`);
--
-- Indexes for table `dsps_tbl_datasource_used`
--
ALTER TABLE `dsps_tbl_datasource_used`
ADD PRIMARY KEY (`pkdspsdspused_id`),
ADD KEY `dspsdspused_reg_by` (`dspsdspused_reg_by`),
ADD KEY `fkdspsdsused_id` (`fkdspsdsused_id`),
ADD KEY `fkisp_id_of` (`fkisp_id_of`);
--
-- Indexes for table `dsps_tbl_dspsabout`
--
ALTER TABLE `dsps_tbl_dspsabout`
ADD PRIMARY KEY (`pkdspsabout_id`),
ADD KEY `fkisp_id_of` (`fkisp_id_of`),
ADD KEY `dspsabout_reg_by` (`dspsabout_reg_by`),
ADD KEY `idx_dspsabout_title` (`dspsabout_title_en`);
--
-- Indexes for table `dsps_tbl_dspscategory`
--
ALTER TABLE `dsps_tbl_dspscategory`
ADD PRIMARY KEY (`pkdspscate_id`),
ADD UNIQUE KEY `dspscate_title_en` (`dspscate_title_en`),
ADD KEY `dspscate_reg_by` (`dspscate_reg_by`);
--
-- Indexes for table `dsps_tbl_dspsfaq`
--
ALTER TABLE `dsps_tbl_dspsfaq`
ADD PRIMARY KEY (`pkdspsfaq_id`),
ADD KEY `fkisp_id_of` (`fkisp_id_of`),
ADD KEY `dspsfaq_reg_by` (`dspsfaq_reg_by`);
--
-- Indexes for table `dsps_tbl_dspsslide`
--
ALTER TABLE `dsps_tbl_dspsslide`
ADD PRIMARY KEY (`pkdspsslide_id`),
ADD KEY `fkisp_id_of` (`fkisp_id_of`),
ADD KEY `dspsslide_reg_by` (`dspsslide_reg_by`);
--
-- Indexes for table `dsps_tbl_feedback`
--
ALTER TABLE `dsps_tbl_feedback`
ADD PRIMARY KEY (`pkdspsfb_id`),
ADD KEY `dspsfb_res_by` (`dspsfb_res_by`),
ADD KEY `idx_dspsfb_status` (`dspsfb_status`);
--
-- Indexes for table `dsps_tbl_social`
--
ALTER TABLE `dsps_tbl_social`
ADD PRIMARY KEY (`pkdspssocial_id`),
ADD UNIQUE KEY `dspssocial_name` (`dspssocial_name`),
ADD KEY `dspssocial_reg_by` (`dspssocial_reg_by`);
--
-- Indexes for table `dsps_tbl_typedatasource`
--
ALTER TABLE `dsps_tbl_typedatasource`
ADD PRIMARY KEY (`pkdspstds_id`),
ADD UNIQUE KEY `dspstds_name_en` (`dspstds_name_en`),
ADD UNIQUE KEY `dspstds_name_kh` (`dspstds_name_kh`),
ADD KEY `dspstds_reg_by` (`dspstds_reg_by`);
--
-- Indexes for table `dsp_oauth_access_tokens`
--
ALTER TABLE `dsp_oauth_access_tokens`
ADD PRIMARY KEY (`token_hash`),
ADD KEY `idx_oauth_access_client` (`client_id`),
ADD KEY `idx_oauth_access_person` (`person_id`),
ADD KEY `idx_oauth_access_refresh` (`refresh_token_hash`),
ADD KEY `idx_oauth_access_expires` (`expires_at`);
--
-- Indexes for table `dsp_oauth_auth_codes`
--
ALTER TABLE `dsp_oauth_auth_codes`
ADD PRIMARY KEY (`code_hash`),
ADD KEY `idx_oauth_auth_client` (`client_id`),
ADD KEY `idx_oauth_auth_expires` (`expires_at`),
ADD KEY `dsp_oauth_auth_codes_ibfk_2` (`person_id`);
--
-- Indexes for table `dsp_oauth_clients`
--
ALTER TABLE `dsp_oauth_clients`
ADD PRIMARY KEY (`client_id`);
--
-- Indexes for table `ist_tbl_people`
--
ALTER TABLE `ist_tbl_people`
ADD PRIMARY KEY (`pkisp_id`),
ADD UNIQUE KEY `isp_idcard` (`isp_idcard`),
ADD UNIQUE KEY `isp_phone_number` (`isp_phone_number`),
ADD UNIQUE KEY `isp_email` (`isp_email`),
ADD KEY `idx_isp_idcard` (`isp_idcard`),
ADD KEY `idx_isp_name` (`isp_firstname_en`,`isp_lastname_en`);
--
-- Indexes for table `ist_tbl_users`
--
ALTER TABLE `ist_tbl_users`
ADD PRIMARY KEY (`pkisu_id`),
ADD UNIQUE KEY `fkisp_id_of` (`fkisp_id_of`),
ADD UNIQUE KEY `isu_name` (`isu_name`),
ADD KEY `isu_regby_id` (`isu_regby_id`),
ADD KEY `idx_isu_name` (`isu_name`),
ADD KEY `idx_isu_status` (`isu_status`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `dsps_tbl_announcement`
--
ALTER TABLE `dsps_tbl_announcement`
MODIFY `pkdspsann_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `dsps_tbl_anonymous`
--
ALTER TABLE `dsps_tbl_anonymous`
MODIFY `pkdspsano_id` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `dsps_tbl_datasource`
--
ALTER TABLE `dsps_tbl_datasource`
MODIFY `pkdspsds_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;
--
-- AUTO_INCREMENT for table `dsps_tbl_datasource_permission`
--
ALTER TABLE `dsps_tbl_datasource_permission`
MODIFY `pkdspsdsp_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
--
-- AUTO_INCREMENT for table `dsps_tbl_datasource_used`
--
ALTER TABLE `dsps_tbl_datasource_used`
MODIFY `pkdspsdspused_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `dsps_tbl_dspsabout`
--
ALTER TABLE `dsps_tbl_dspsabout`
MODIFY `pkdspsabout_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `dsps_tbl_dspscategory`
--
ALTER TABLE `dsps_tbl_dspscategory`
MODIFY `pkdspscate_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `dsps_tbl_dspsfaq`
--
ALTER TABLE `dsps_tbl_dspsfaq`
MODIFY `pkdspsfaq_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `dsps_tbl_dspsslide`
--
ALTER TABLE `dsps_tbl_dspsslide`
MODIFY `pkdspsslide_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `dsps_tbl_feedback`
--
ALTER TABLE `dsps_tbl_feedback`
MODIFY `pkdspsfb_id` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `dsps_tbl_social`
--
ALTER TABLE `dsps_tbl_social`
MODIFY `pkdspssocial_id` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `dsps_tbl_typedatasource`
--
ALTER TABLE `dsps_tbl_typedatasource`
MODIFY `pkdspstds_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `ist_tbl_people`
--
ALTER TABLE `ist_tbl_people`
MODIFY `pkisp_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=123;
--
-- AUTO_INCREMENT for table `ist_tbl_users`
--
ALTER TABLE `ist_tbl_users`
MODIFY `pkisu_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=225;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `dsps_tbl_announcement`
--
ALTER TABLE `dsps_tbl_announcement`
ADD CONSTRAINT `dsps_tbl_announcement_ibfk_1` FOREIGN KEY (`dspsann_reg_by`) REFERENCES `ist_tbl_users` (`pkisu_id`) ON DELETE SET NULL ON UPDATE CASCADE;
--
-- Constraints for table `dsps_tbl_anonymous`
--
ALTER TABLE `dsps_tbl_anonymous`
ADD CONSTRAINT `dsps_tbl_anonymous_ibfk_1` FOREIGN KEY (`fkdspsds_id`) REFERENCES `dsps_tbl_datasource` (`pkdspsds_id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `dsps_tbl_datasource`
--
ALTER TABLE `dsps_tbl_datasource`
ADD CONSTRAINT `dsps_tbl_datasource_ibfk_1` FOREIGN KEY (`dspsds_reg_by`) REFERENCES `ist_tbl_users` (`pkisu_id`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `dsps_tbl_datasource_ibfk_2` FOREIGN KEY (`fkdspstds_id`) REFERENCES `dsps_tbl_typedatasource` (`pkdspstds_id`) ON UPDATE CASCADE,
ADD CONSTRAINT `dsps_tbl_datasource_ibfk_3` FOREIGN KEY (`fkdspscate_id`) REFERENCES `dsps_tbl_dspscategory` (`pkdspscate_id`) ON UPDATE CASCADE,
ADD CONSTRAINT `dsps_tbl_datasource_ibfk_4` FOREIGN KEY (`fkisp_id_of`) REFERENCES `ist_tbl_people` (`pkisp_id`) ON UPDATE CASCADE;
--
-- Constraints for table `dsps_tbl_datasource_permission`
--
ALTER TABLE `dsps_tbl_datasource_permission`
ADD CONSTRAINT `dsps_tbl_datasource_permission_ibfk_1` FOREIGN KEY (`dspsdsp_reg_by`) REFERENCES `ist_tbl_users` (`pkisu_id`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `dsps_tbl_datasource_permission_ibfk_2` FOREIGN KEY (`fkdspsds_id`) REFERENCES `dsps_tbl_datasource` (`pkdspsds_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `dsps_tbl_datasource_permission_ibfk_3` FOREIGN KEY (`fkisp_id_of`) REFERENCES `ist_tbl_people` (`pkisp_id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `dsps_tbl_datasource_used`
--
ALTER TABLE `dsps_tbl_datasource_used`
ADD CONSTRAINT `dsps_tbl_datasource_used_ibfk_1` FOREIGN KEY (`dspsdspused_reg_by`) REFERENCES `ist_tbl_users` (`pkisu_id`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `dsps_tbl_datasource_used_ibfk_2` FOREIGN KEY (`fkdspsdsused_id`) REFERENCES `dsps_tbl_datasource` (`pkdspsds_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `dsps_tbl_datasource_used_ibfk_3` FOREIGN KEY (`fkisp_id_of`) REFERENCES `ist_tbl_people` (`pkisp_id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `dsps_tbl_dspsabout`
--
ALTER TABLE `dsps_tbl_dspsabout`
ADD CONSTRAINT `dsps_tbl_dspsabout_ibfk_1` FOREIGN KEY (`fkisp_id_of`) REFERENCES `ist_tbl_people` (`pkisp_id`) ON UPDATE CASCADE,
ADD CONSTRAINT `dsps_tbl_dspsabout_ibfk_2` FOREIGN KEY (`dspsabout_reg_by`) REFERENCES `ist_tbl_users` (`pkisu_id`) ON DELETE SET NULL ON UPDATE CASCADE;
--
-- Constraints for table `dsps_tbl_dspscategory`
--
ALTER TABLE `dsps_tbl_dspscategory`
ADD CONSTRAINT `dsps_tbl_dspscategory_ibfk_1` FOREIGN KEY (`dspscate_reg_by`) REFERENCES `ist_tbl_users` (`pkisu_id`) ON DELETE SET NULL ON UPDATE CASCADE;
--
-- Constraints for table `dsps_tbl_dspsfaq`
--
ALTER TABLE `dsps_tbl_dspsfaq`
ADD CONSTRAINT `dsps_tbl_dspsfaq_ibfk_1` FOREIGN KEY (`fkisp_id_of`) REFERENCES `ist_tbl_people` (`pkisp_id`) ON UPDATE CASCADE,
ADD CONSTRAINT `dsps_tbl_dspsfaq_ibfk_2` FOREIGN KEY (`dspsfaq_reg_by`) REFERENCES `ist_tbl_users` (`pkisu_id`) ON DELETE SET NULL ON UPDATE CASCADE;
--
-- Constraints for table `dsps_tbl_dspsslide`
--
ALTER TABLE `dsps_tbl_dspsslide`
ADD CONSTRAINT `dsps_tbl_dspsslide_ibfk_1` FOREIGN KEY (`fkisp_id_of`) REFERENCES `ist_tbl_people` (`pkisp_id`) ON UPDATE CASCADE,
ADD CONSTRAINT `dsps_tbl_dspsslide_ibfk_2` FOREIGN KEY (`dspsslide_reg_by`) REFERENCES `ist_tbl_users` (`pkisu_id`) ON DELETE SET NULL ON UPDATE CASCADE;
--
-- Constraints for table `dsps_tbl_feedback`
--
ALTER TABLE `dsps_tbl_feedback`
ADD CONSTRAINT `dsps_tbl_feedback_ibfk_1` FOREIGN KEY (`dspsfb_res_by`) REFERENCES `ist_tbl_users` (`pkisu_id`) ON DELETE SET NULL ON UPDATE CASCADE;
--
-- Constraints for table `dsps_tbl_social`
--
ALTER TABLE `dsps_tbl_social`
ADD CONSTRAINT `dsps_tbl_social_ibfk_1` FOREIGN KEY (`dspssocial_reg_by`) REFERENCES `ist_tbl_users` (`pkisu_id`) ON DELETE SET NULL ON UPDATE CASCADE;
--
-- Constraints for table `dsps_tbl_typedatasource`
--
ALTER TABLE `dsps_tbl_typedatasource`
ADD CONSTRAINT `dsps_tbl_typedatasource_ibfk_1` FOREIGN KEY (`dspstds_reg_by`) REFERENCES `ist_tbl_users` (`pkisu_id`) ON DELETE SET NULL ON UPDATE CASCADE;
--
-- Constraints for table `dsp_oauth_access_tokens`
--
ALTER TABLE `dsp_oauth_access_tokens`
ADD CONSTRAINT `dsp_oauth_access_tokens_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES `dsp_oauth_clients` (`client_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `dsp_oauth_access_tokens_ibfk_2` FOREIGN KEY (`person_id`) REFERENCES `ist_tbl_people` (`pkisp_id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `dsp_oauth_auth_codes`
--
ALTER TABLE `dsp_oauth_auth_codes`
ADD CONSTRAINT `dsp_oauth_auth_codes_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES `dsp_oauth_clients` (`client_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `dsp_oauth_auth_codes_ibfk_2` FOREIGN KEY (`person_id`) REFERENCES `ist_tbl_people` (`pkisp_id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `ist_tbl_users`
--
ALTER TABLE `ist_tbl_users`
ADD CONSTRAINT `ist_tbl_users_ibfk_1` FOREIGN KEY (`fkisp_id_of`) REFERENCES `ist_tbl_people` (`pkisp_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `ist_tbl_users_ibfk_2` FOREIGN KEY (`isu_regby_id`) REFERENCES `ist_tbl_users` (`pkisu_id`) ON DELETE SET NULL ON UPDATE CASCADE;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;