From 46a697d487d5d0cf8769688fd6ea884faae1bf20 Mon Sep 17 00:00:00 2001 From: Arno Alexander <arno2alexander@gmail.com> Date: Wed, 9 May 2018 10:12:11 +0700 Subject: [PATCH] add dump db --- ppl.sql | 981 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 981 insertions(+) create mode 100644 ppl.sql diff --git a/ppl.sql b/ppl.sql new file mode 100644 index 0000000..103d2d4 --- /dev/null +++ b/ppl.sql @@ -0,0 +1,981 @@ +-- phpMyAdmin SQL Dump +-- version 4.8.0 +-- https://www.phpmyadmin.net/ +-- +-- Host: 127.0.0.1 +-- Generation Time: May 09, 2018 at 05:11 AM +-- Server version: 10.1.31-MariaDB +-- PHP Version: 7.2.4 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +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: `ppl` +-- + +-- -------------------------------------------------------- + +-- +-- Table structure for table `auth_group` +-- + +CREATE TABLE `auth_group` ( + `id` int(11) NOT NULL, + `name` varchar(80) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `auth_group_permissions` +-- + +CREATE TABLE `auth_group_permissions` ( + `id` int(11) NOT NULL, + `group_id` int(11) NOT NULL, + `permission_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `auth_permission` +-- + +CREATE TABLE `auth_permission` ( + `id` int(11) NOT NULL, + `name` varchar(255) NOT NULL, + `content_type_id` int(11) NOT NULL, + `codename` varchar(100) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `auth_permission` +-- + +INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES +(1, 'Can add complaint', 1, 'add_complaint'), +(2, 'Can change complaint', 1, 'change_complaint'), +(3, 'Can delete complaint', 1, 'delete_complaint'), +(4, 'Can add complaint images', 2, 'add_complaintimages'), +(5, 'Can change complaint images', 2, 'change_complaintimages'), +(6, 'Can delete complaint images', 2, 'delete_complaintimages'), +(7, 'Can add division', 3, 'add_division'), +(8, 'Can change division', 3, 'change_division'), +(9, 'Can delete division', 3, 'delete_division'), +(10, 'Can add location', 4, 'add_location'), +(11, 'Can change location', 4, 'change_location'), +(12, 'Can delete location', 4, 'delete_location'), +(13, 'Can add log', 5, 'add_log'), +(14, 'Can change log', 5, 'change_log'), +(15, 'Can delete log', 5, 'delete_log'), +(16, 'Can add member', 6, 'add_member'), +(17, 'Can change member', 6, 'change_member'), +(18, 'Can delete member', 6, 'delete_member'), +(19, 'Can add origin', 7, 'add_origin'), +(20, 'Can change origin', 7, 'change_origin'), +(21, 'Can delete origin', 7, 'delete_origin'), +(22, 'Can add role', 8, 'add_role'), +(23, 'Can change role', 8, 'change_role'), +(24, 'Can delete role', 8, 'delete_role'), +(25, 'Can add worker', 9, 'add_worker'), +(26, 'Can change worker', 9, 'change_worker'), +(27, 'Can delete worker', 9, 'delete_worker'), +(28, 'Can add log entry', 10, 'add_logentry'), +(29, 'Can change log entry', 10, 'change_logentry'), +(30, 'Can delete log entry', 10, 'delete_logentry'), +(31, 'Can add permission', 11, 'add_permission'), +(32, 'Can change permission', 11, 'change_permission'), +(33, 'Can delete permission', 11, 'delete_permission'), +(34, 'Can add group', 12, 'add_group'), +(35, 'Can change group', 12, 'change_group'), +(36, 'Can delete group', 12, 'delete_group'), +(37, 'Can add user', 13, 'add_user'), +(38, 'Can change user', 13, 'change_user'), +(39, 'Can delete user', 13, 'delete_user'), +(40, 'Can add content type', 14, 'add_contenttype'), +(41, 'Can change content type', 14, 'change_contenttype'), +(42, 'Can delete content type', 14, 'delete_contenttype'), +(43, 'Can add session', 15, 'add_session'), +(44, 'Can change session', 15, 'change_session'), +(45, 'Can delete session', 15, 'delete_session'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `auth_user` +-- + +CREATE TABLE `auth_user` ( + `id` int(11) NOT NULL, + `password` varchar(128) NOT NULL, + `last_login` datetime(6) DEFAULT NULL, + `is_superuser` tinyint(1) NOT NULL, + `username` varchar(150) NOT NULL, + `first_name` varchar(30) NOT NULL, + `last_name` varchar(150) NOT NULL, + `email` varchar(254) NOT NULL, + `is_staff` tinyint(1) NOT NULL, + `is_active` tinyint(1) NOT NULL, + `date_joined` datetime(6) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `auth_user` +-- + +INSERT INTO `auth_user` (`id`, `password`, `last_login`, `is_superuser`, `username`, `first_name`, `last_name`, `email`, `is_staff`, `is_active`, `date_joined`) VALUES +(1, 'pbkdf2_sha256$100000$h2kPSg2NxDJ8$vE5YlJin6TzZlcL9bxvEXdvXlBjB+eyg9VpHYxSVc4o=', '2018-04-25 19:09:17.854955', 1, 'sarpras', 'Sumiatun', 'Munawarotun', 'sarpras@sarpras.com', 1, 1, '2017-04-08 04:02:48.000000'), +(2, 'pbkdf2_sha256$100000$pIhwpWPnnkFO$Kb+sQ4rMDrucFTWHT0qOKYT3mo0WDiO/mTN3TT3XyU8=', '2018-04-25 19:10:06.722189', 0, 'Kebersihan', 'Anggota', 'Kebersihan', 'kebersihan@bersih.com', 0, 1, '2018-04-25 19:09:58.670619'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `auth_user_groups` +-- + +CREATE TABLE `auth_user_groups` ( + `id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `group_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `auth_user_user_permissions` +-- + +CREATE TABLE `auth_user_user_permissions` ( + `id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `permission_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `complaintmanager_complaint` +-- + +CREATE TABLE `complaintmanager_complaint` ( + `id` int(11) NOT NULL, + `title` varchar(200) NOT NULL, + `description` longtext NOT NULL, + `status` varchar(5) NOT NULL, + `priority` int(10) UNSIGNED NOT NULL, + `reported` datetime(6) NOT NULL, + `is_public` tinyint(1) NOT NULL, + `leader_id` int(11) DEFAULT NULL, + `location_id` int(11) NOT NULL, + `member_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `complaintmanager_complaint` +-- + +INSERT INTO `complaintmanager_complaint` (`id`, `title`, `description`, `status`, `priority`, `reported`, `is_public`, `leader_id`, `location_id`, `member_id`) VALUES +(1, 'Aset Tidak Terpakai', 'Tolong hapus', 'S', 1, '2018-04-25 16:38:21.015497', 0, 7, 1, 1), +(2, 'Ada Keluhan', 'Tolong ditangani', 'S', 1, '2018-04-25 18:48:49.463072', 0, 9, 2, 1), +(3, 'Tempat Sampah Penuh', 'Tolong ditangani', 'S', 1, '2018-04-25 19:08:57.211618', 0, 4, 3, 1), +(4, 'Gedung Rusak', 'gedung rusak', 'S', 1, '2018-04-25 19:10:48.433283', 0, 2, 4, 2), +(5, 'Aset Tidak Terpakai', 'ya', 'S', 1, '2018-04-25 19:11:28.409345', 0, 7, 5, 2); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `complaintmanager_complaintimages` +-- + +CREATE TABLE `complaintmanager_complaintimages` ( + `id` int(11) NOT NULL, + `src` varchar(100) NOT NULL, + `complaint_id` int(11) NOT NULL, + `log_id` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `complaintmanager_complaint_assigned_divisions` +-- + +CREATE TABLE `complaintmanager_complaint_assigned_divisions` ( + `id` int(11) NOT NULL, + `complaint_id` int(11) NOT NULL, + `division_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `complaintmanager_complaint_assigned_divisions` +-- + +INSERT INTO `complaintmanager_complaint_assigned_divisions` (`id`, `complaint_id`, `division_id`) VALUES +(1, 1, 6), +(2, 1, 7), +(3, 2, 1), +(4, 2, 9), +(5, 3, 3), +(6, 3, 4), +(7, 4, 2), +(8, 5, 6), +(9, 5, 7); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `complaintmanager_division` +-- + +CREATE TABLE `complaintmanager_division` ( + `id` int(11) NOT NULL, + `code` varchar(10) NOT NULL, + `name` varchar(50) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `complaintmanager_division` +-- + +INSERT INTO `complaintmanager_division` (`id`, `code`, `name`) VALUES +(1, 'PU', 'Perawatan Utilitas'), +(2, 'PG', 'Perawatan Gedung'), +(3, 'OG', 'Operasional dan Kebersihan Gedung'), +(4, 'KS', 'Kebersihan dan Pengelolaan Sampah'), +(5, 'IA', 'Inventarisasi Aset'), +(6, 'PDA', 'Pendayagunaan Aset'), +(7, 'PHA', 'Penghapusan Aset'), +(8, 'PD', 'Penerimaan dan Distribusi'), +(9, 'S', 'Sekretariat'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `complaintmanager_location` +-- + +CREATE TABLE `complaintmanager_location` ( + `id` int(11) NOT NULL, + `name` varchar(50) NOT NULL, + `lat` double NOT NULL, + `lon` double NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `complaintmanager_location` +-- + +INSERT INTO `complaintmanager_location` (`id`, `name`, `lat`, `lon`) VALUES +(1, 'ITB', -6.890533, 107.609864), +(2, 'Kampus Ganesha', -6.890533, 107.609864), +(3, 'Labtek V', -6.890533, 107.609864), +(4, 'Aula Barat', -6.89238633016258, 107.609874728836), +(5, 'GKU Barat', -6.89039453251307, 107.608909133591); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `complaintmanager_log` +-- + +CREATE TABLE `complaintmanager_log` ( + `id` int(11) NOT NULL, + `date` date NOT NULL, + `description` longtext NOT NULL, + `kind` varchar(10) NOT NULL, + `complaint_id` int(11) NOT NULL, + `creator_id` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `complaintmanager_log` +-- + +INSERT INTO `complaintmanager_log` (`id`, `date`, `description`, `kind`, `complaint_id`, `creator_id`) VALUES +(1, '2018-04-25', 'Keluhan berhasil dibuat.', 'C', 1, 1), +(2, '2018-04-26', 'Keluhan berhasil dibuat.', 'C', 2, 1), +(3, '2018-04-26', 'Keluhan berhasil dibuat.', 'C', 3, 1), +(4, '2018-04-26', 'Keluhan berhasil dibuat.', 'C', 4, 2), +(5, '2018-04-26', 'Keluhan berhasil dibuat.', 'C', 5, 2); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `complaintmanager_member` +-- + +CREATE TABLE `complaintmanager_member` ( + `id` int(11) NOT NULL, + `phone` varchar(20) NOT NULL, + `role_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `complaintmanager_member` +-- + +INSERT INTO `complaintmanager_member` (`id`, `phone`, `role_id`, `user_id`) VALUES +(1, '123', 15, 1), +(2, '080989999', 4, 2); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `complaintmanager_member_additional_division` +-- + +CREATE TABLE `complaintmanager_member_additional_division` ( + `id` int(11) NOT NULL, + `member_id` int(11) NOT NULL, + `division_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `complaintmanager_origin` +-- + +CREATE TABLE `complaintmanager_origin` ( + `id` int(11) NOT NULL, + `code` varchar(10) NOT NULL, + `name` varchar(50) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `complaintmanager_origin` +-- + +INSERT INTO `complaintmanager_origin` (`id`, `code`, `name`) VALUES +(1, 'Pimpinan', 'Pimpinan'), +(2, 'Unit', 'Unit ITB'), +(3, 'Intern', 'Intern Direktorat Sarana dan Prasarana'), +(4, 'Civitas', 'Civitas Akademik'), +(5, 'Eksternal', 'Eksternal ITB (Masyarakat, Tamu, Umum)'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `complaintmanager_role` +-- + +CREATE TABLE `complaintmanager_role` ( + `id` int(11) NOT NULL, + `code` varchar(10) NOT NULL, + `name` varchar(50) NOT NULL, + `origin_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `complaintmanager_role` +-- + +INSERT INTO `complaintmanager_role` (`id`, `code`, `name`, `origin_id`) VALUES +(1, 'PU', 'Perawatan Utilitas', 3), +(2, 'PG', 'Perawatan Gedung', 3), +(3, 'OG', 'Operasional dan Kebersihan Gedung', 3), +(4, 'KS', 'Kebersihan dan Pengelolaan Sampah', 3), +(5, 'IA', 'Inventarisasi Aset', 3), +(6, 'PDA', 'Pendayagunaan Aset', 3), +(7, 'PHA', 'Penghapusan Aset', 3), +(8, 'PD', 'Penerimaan dan Distribusi', 3), +(9, 'S', 'Sekretariat', 3), +(10, 'D', 'Direktur', 3), +(11, 'WD', 'Wakil DIrekur', 3), +(12, 'KAI', 'Kepala Subdit Pendayagunaan Aset dan Inventarisasi', 3), +(13, 'KO', 'Kepala Subdit Operasional dan Kebersihan', 3), +(14, 'KPA', 'Kepala Subdit Perawatan Aset', 3), +(15, 'SA', 'Superadmin', 3); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `complaintmanager_role_divisions` +-- + +CREATE TABLE `complaintmanager_role_divisions` ( + `id` int(11) NOT NULL, + `role_id` int(11) NOT NULL, + `division_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `complaintmanager_role_divisions` +-- + +INSERT INTO `complaintmanager_role_divisions` (`id`, `role_id`, `division_id`) VALUES +(1, 1, 1), +(2, 2, 2), +(3, 3, 3), +(4, 4, 4), +(5, 5, 5), +(6, 6, 6), +(7, 7, 7), +(8, 8, 8), +(9, 9, 9), +(10, 10, 1), +(11, 10, 2), +(12, 10, 3), +(13, 10, 4), +(14, 10, 5), +(15, 10, 6), +(16, 10, 7), +(17, 10, 8), +(18, 10, 9), +(19, 11, 1), +(20, 11, 2), +(21, 11, 3), +(22, 11, 4), +(23, 11, 5), +(24, 11, 6), +(25, 11, 7), +(26, 11, 8), +(27, 11, 9), +(29, 12, 5), +(30, 12, 6), +(31, 12, 7), +(28, 12, 8), +(32, 13, 3), +(33, 13, 4), +(34, 14, 1), +(35, 14, 2), +(36, 15, 1), +(37, 15, 2), +(38, 15, 3), +(39, 15, 4), +(40, 15, 5), +(41, 15, 6), +(42, 15, 7), +(43, 15, 8), +(44, 15, 9); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `complaintmanager_worker` +-- + +CREATE TABLE `complaintmanager_worker` ( + `id` int(11) NOT NULL, + `name` varchar(50) NOT NULL, + `complaint_id` int(11) NOT NULL, + `division_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `django_admin_log` +-- + +CREATE TABLE `django_admin_log` ( + `id` int(11) NOT NULL, + `action_time` datetime(6) NOT NULL, + `object_id` longtext, + `object_repr` varchar(200) NOT NULL, + `action_flag` smallint(5) UNSIGNED NOT NULL, + `change_message` longtext NOT NULL, + `content_type_id` int(11) DEFAULT NULL, + `user_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `django_content_type` +-- + +CREATE TABLE `django_content_type` ( + `id` int(11) NOT NULL, + `app_label` varchar(100) NOT NULL, + `model` varchar(100) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `django_content_type` +-- + +INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES +(10, 'admin', 'logentry'), +(12, 'auth', 'group'), +(11, 'auth', 'permission'), +(13, 'auth', 'user'), +(1, 'complaintManager', 'complaint'), +(2, 'complaintManager', 'complaintimages'), +(3, 'complaintManager', 'division'), +(4, 'complaintManager', 'location'), +(5, 'complaintManager', 'log'), +(6, 'complaintManager', 'member'), +(7, 'complaintManager', 'origin'), +(8, 'complaintManager', 'role'), +(9, 'complaintManager', 'worker'), +(14, 'contenttypes', 'contenttype'), +(15, 'sessions', 'session'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `django_migrations` +-- + +CREATE TABLE `django_migrations` ( + `id` int(11) NOT NULL, + `app` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `applied` datetime(6) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `django_migrations` +-- + +INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES +(1, 'contenttypes', '0001_initial', '2018-04-25 16:34:06.401810'), +(2, 'auth', '0001_initial', '2018-04-25 16:34:13.765105'), +(3, 'admin', '0001_initial', '2018-04-25 16:34:15.932022'), +(4, 'admin', '0002_logentry_remove_auto_add', '2018-04-25 16:34:15.985574'), +(5, 'contenttypes', '0002_remove_content_type_name', '2018-04-25 16:34:17.621682'), +(6, 'auth', '0002_alter_permission_name_max_length', '2018-04-25 16:34:18.353717'), +(7, 'auth', '0003_alter_user_email_max_length', '2018-04-25 16:34:19.111166'), +(8, 'auth', '0004_alter_user_username_opts', '2018-04-25 16:34:19.250266'), +(9, 'auth', '0005_alter_user_last_login_null', '2018-04-25 16:34:19.854174'), +(10, 'auth', '0006_require_contenttypes_0002', '2018-04-25 16:34:19.887656'), +(11, 'auth', '0007_alter_validators_add_error_messages', '2018-04-25 16:34:19.930243'), +(12, 'auth', '0008_alter_user_username_max_length', '2018-04-25 16:34:22.210012'), +(13, 'auth', '0009_alter_user_last_name_max_length', '2018-04-25 16:34:23.511408'), +(14, 'complaintManager', '0001_initial', '2018-04-25 16:34:53.711716'), +(15, 'sessions', '0001_initial', '2018-04-25 16:34:54.590570'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `django_session` +-- + +CREATE TABLE `django_session` ( + `session_key` varchar(40) NOT NULL, + `session_data` longtext NOT NULL, + `expire_date` datetime(6) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `django_session` +-- + +INSERT INTO `django_session` (`session_key`, `session_data`, `expire_date`) VALUES +('1mbate9vmktth9qp6fauezgkqdhc0ux1', 'YTYwMWFkMTM3ZTU3Yzc4ZTNiN2Y3YWI2ZGVlMGE2Zjk3MWJmZTllNDp7Il9hdXRoX3VzZXJfaWQiOiIyIiwiX2F1dGhfdXNlcl9iYWNrZW5kIjoiZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5kcy5Nb2RlbEJhY2tlbmQiLCJfYXV0aF91c2VyX2hhc2giOiJjMWVlMzYwM2MwODk2MzhjYzYxNzIzNDlkZmRkYmZkMjY5ZGQzNGZhIn0=', '2018-05-09 19:10:06.756189'), +('uctecsoouo4yylols5hk44o87xemhl42', 'MWE1OWEwN2JhMTVhNmU5Y2U3ZGZmOWVmZDk5NTVkZDgwNTM0ZGI4Nzp7Il9hdXRoX3VzZXJfaWQiOiIxIiwiX2F1dGhfdXNlcl9iYWNrZW5kIjoiZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5kcy5Nb2RlbEJhY2tlbmQiLCJfYXV0aF91c2VyX2hhc2giOiJkZWUyMWUzZTk5ODY0ZDUzZWJkOWFjN2I2YmI4ZDcwOWVlNTBhNWJiIn0=', '2018-05-09 17:24:23.341204'); + +-- +-- Indexes for dumped tables +-- + +-- +-- Indexes for table `auth_group` +-- +ALTER TABLE `auth_group` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `name` (`name`); + +-- +-- Indexes for table `auth_group_permissions` +-- +ALTER TABLE `auth_group_permissions` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `auth_group_permissions_group_id_permission_id_0cd325b0_uniq` (`group_id`,`permission_id`), + ADD KEY `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` (`permission_id`); + +-- +-- Indexes for table `auth_permission` +-- +ALTER TABLE `auth_permission` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `auth_permission_content_type_id_codename_01ab375a_uniq` (`content_type_id`,`codename`); + +-- +-- Indexes for table `auth_user` +-- +ALTER TABLE `auth_user` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `username` (`username`); + +-- +-- Indexes for table `auth_user_groups` +-- +ALTER TABLE `auth_user_groups` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `auth_user_groups_user_id_group_id_94350c0c_uniq` (`user_id`,`group_id`), + ADD KEY `auth_user_groups_group_id_97559544_fk_auth_group_id` (`group_id`); + +-- +-- Indexes for table `auth_user_user_permissions` +-- +ALTER TABLE `auth_user_user_permissions` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `auth_user_user_permissions_user_id_permission_id_14a6b632_uniq` (`user_id`,`permission_id`), + ADD KEY `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` (`permission_id`); + +-- +-- Indexes for table `complaintmanager_complaint` +-- +ALTER TABLE `complaintmanager_complaint` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `location_id` (`location_id`), + ADD KEY `complaintManager_com_leader_id_728e6ef3_fk_complaint` (`leader_id`), + ADD KEY `complaintManager_com_member_id_5c7a0f31_fk_complaint` (`member_id`); + +-- +-- Indexes for table `complaintmanager_complaintimages` +-- +ALTER TABLE `complaintmanager_complaintimages` + ADD PRIMARY KEY (`id`), + ADD KEY `complaintManager_com_complaint_id_c60ad266_fk_complaint` (`complaint_id`), + ADD KEY `complaintManager_com_log_id_8b2f065d_fk_complaint` (`log_id`); + +-- +-- Indexes for table `complaintmanager_complaint_assigned_divisions` +-- +ALTER TABLE `complaintmanager_complaint_assigned_divisions` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `complaintManager_complai_complaint_id_division_id_8e6a60c1_uniq` (`complaint_id`,`division_id`), + ADD KEY `complaintManager_com_division_id_a9889444_fk_complaint` (`division_id`); + +-- +-- Indexes for table `complaintmanager_division` +-- +ALTER TABLE `complaintmanager_division` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `complaintmanager_location` +-- +ALTER TABLE `complaintmanager_location` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `complaintmanager_log` +-- +ALTER TABLE `complaintmanager_log` + ADD PRIMARY KEY (`id`), + ADD KEY `complaintManager_log_complaint_id_d9054580_fk_complaint` (`complaint_id`), + ADD KEY `complaintManager_log_creator_id_a0fb4f0e_fk_auth_user_id` (`creator_id`); + +-- +-- Indexes for table `complaintmanager_member` +-- +ALTER TABLE `complaintmanager_member` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `user_id` (`user_id`), + ADD KEY `complaintManager_mem_role_id_17850815_fk_complaint` (`role_id`); + +-- +-- Indexes for table `complaintmanager_member_additional_division` +-- +ALTER TABLE `complaintmanager_member_additional_division` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `complaintManager_member__member_id_division_id_2522fcfb_uniq` (`member_id`,`division_id`), + ADD KEY `complaintManager_mem_division_id_64830523_fk_complaint` (`division_id`); + +-- +-- Indexes for table `complaintmanager_origin` +-- +ALTER TABLE `complaintmanager_origin` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `complaintmanager_role` +-- +ALTER TABLE `complaintmanager_role` + ADD PRIMARY KEY (`id`), + ADD KEY `complaintManager_rol_origin_id_3a86ba60_fk_complaint` (`origin_id`); + +-- +-- Indexes for table `complaintmanager_role_divisions` +-- +ALTER TABLE `complaintmanager_role_divisions` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `complaintManager_role_di_role_id_division_id_cba7763c_uniq` (`role_id`,`division_id`), + ADD KEY `complaintManager_rol_division_id_d4b2a23f_fk_complaint` (`division_id`); + +-- +-- Indexes for table `complaintmanager_worker` +-- +ALTER TABLE `complaintmanager_worker` + ADD PRIMARY KEY (`id`), + ADD KEY `complaintManager_wor_complaint_id_0297bc5a_fk_complaint` (`complaint_id`), + ADD KEY `complaintManager_wor_division_id_2efb5c20_fk_complaint` (`division_id`); + +-- +-- Indexes for table `django_admin_log` +-- +ALTER TABLE `django_admin_log` + ADD PRIMARY KEY (`id`), + ADD KEY `django_admin_log_content_type_id_c4bce8eb_fk_django_co` (`content_type_id`), + ADD KEY `django_admin_log_user_id_c564eba6_fk` (`user_id`); + +-- +-- Indexes for table `django_content_type` +-- +ALTER TABLE `django_content_type` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `django_content_type_app_label_model_76bd3d3b_uniq` (`app_label`,`model`); + +-- +-- Indexes for table `django_migrations` +-- +ALTER TABLE `django_migrations` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `django_session` +-- +ALTER TABLE `django_session` + ADD PRIMARY KEY (`session_key`), + ADD KEY `django_session_expire_date_a5c62663` (`expire_date`); + +-- +-- AUTO_INCREMENT for dumped tables +-- + +-- +-- AUTO_INCREMENT for table `auth_group` +-- +ALTER TABLE `auth_group` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT for table `auth_group_permissions` +-- +ALTER TABLE `auth_group_permissions` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT for table `auth_permission` +-- +ALTER TABLE `auth_permission` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=46; + +-- +-- AUTO_INCREMENT for table `auth_user` +-- +ALTER TABLE `auth_user` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; + +-- +-- AUTO_INCREMENT for table `auth_user_groups` +-- +ALTER TABLE `auth_user_groups` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT for table `auth_user_user_permissions` +-- +ALTER TABLE `auth_user_user_permissions` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT for table `complaintmanager_complaint` +-- +ALTER TABLE `complaintmanager_complaint` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; + +-- +-- AUTO_INCREMENT for table `complaintmanager_complaintimages` +-- +ALTER TABLE `complaintmanager_complaintimages` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT for table `complaintmanager_complaint_assigned_divisions` +-- +ALTER TABLE `complaintmanager_complaint_assigned_divisions` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; + +-- +-- AUTO_INCREMENT for table `complaintmanager_division` +-- +ALTER TABLE `complaintmanager_division` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; + +-- +-- AUTO_INCREMENT for table `complaintmanager_location` +-- +ALTER TABLE `complaintmanager_location` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; + +-- +-- AUTO_INCREMENT for table `complaintmanager_log` +-- +ALTER TABLE `complaintmanager_log` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; + +-- +-- AUTO_INCREMENT for table `complaintmanager_member` +-- +ALTER TABLE `complaintmanager_member` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; + +-- +-- AUTO_INCREMENT for table `complaintmanager_member_additional_division` +-- +ALTER TABLE `complaintmanager_member_additional_division` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT for table `complaintmanager_origin` +-- +ALTER TABLE `complaintmanager_origin` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; + +-- +-- AUTO_INCREMENT for table `complaintmanager_role` +-- +ALTER TABLE `complaintmanager_role` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; + +-- +-- AUTO_INCREMENT for table `complaintmanager_role_divisions` +-- +ALTER TABLE `complaintmanager_role_divisions` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45; + +-- +-- AUTO_INCREMENT for table `complaintmanager_worker` +-- +ALTER TABLE `complaintmanager_worker` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT for table `django_admin_log` +-- +ALTER TABLE `django_admin_log` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT for table `django_content_type` +-- +ALTER TABLE `django_content_type` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; + +-- +-- AUTO_INCREMENT for table `django_migrations` +-- +ALTER TABLE `django_migrations` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; + +-- +-- Constraints for dumped tables +-- + +-- +-- Constraints for table `auth_group_permissions` +-- +ALTER TABLE `auth_group_permissions` + ADD CONSTRAINT `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`), + ADD CONSTRAINT `auth_group_permissions_group_id_b120cbf9_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`); + +-- +-- Constraints for table `auth_permission` +-- +ALTER TABLE `auth_permission` + ADD CONSTRAINT `auth_permission_content_type_id_2f476e4b_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`); + +-- +-- Constraints for table `auth_user_groups` +-- +ALTER TABLE `auth_user_groups` + ADD CONSTRAINT `auth_user_groups_group_id_97559544_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`), + ADD CONSTRAINT `auth_user_groups_user_id_6a12ed8b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`); + +-- +-- Constraints for table `auth_user_user_permissions` +-- +ALTER TABLE `auth_user_user_permissions` + ADD CONSTRAINT `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`), + ADD CONSTRAINT `auth_user_user_permissions_user_id_a95ead1b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`); + +-- +-- Constraints for table `complaintmanager_complaint` +-- +ALTER TABLE `complaintmanager_complaint` + ADD CONSTRAINT `complaintManager_com_leader_id_728e6ef3_fk_complaint` FOREIGN KEY (`leader_id`) REFERENCES `complaintmanager_division` (`id`), + ADD CONSTRAINT `complaintManager_com_location_id_d125c5a4_fk_complaint` FOREIGN KEY (`location_id`) REFERENCES `complaintmanager_location` (`id`), + ADD CONSTRAINT `complaintManager_com_member_id_5c7a0f31_fk_complaint` FOREIGN KEY (`member_id`) REFERENCES `complaintmanager_member` (`id`); + +-- +-- Constraints for table `complaintmanager_complaintimages` +-- +ALTER TABLE `complaintmanager_complaintimages` + ADD CONSTRAINT `complaintManager_com_complaint_id_c60ad266_fk_complaint` FOREIGN KEY (`complaint_id`) REFERENCES `complaintmanager_complaint` (`id`), + ADD CONSTRAINT `complaintManager_com_log_id_8b2f065d_fk_complaint` FOREIGN KEY (`log_id`) REFERENCES `complaintmanager_log` (`id`); + +-- +-- Constraints for table `complaintmanager_complaint_assigned_divisions` +-- +ALTER TABLE `complaintmanager_complaint_assigned_divisions` + ADD CONSTRAINT `complaintManager_com_complaint_id_31e8b8bb_fk_complaint` FOREIGN KEY (`complaint_id`) REFERENCES `complaintmanager_complaint` (`id`), + ADD CONSTRAINT `complaintManager_com_division_id_a9889444_fk_complaint` FOREIGN KEY (`division_id`) REFERENCES `complaintmanager_division` (`id`); + +-- +-- Constraints for table `complaintmanager_log` +-- +ALTER TABLE `complaintmanager_log` + ADD CONSTRAINT `complaintManager_log_complaint_id_d9054580_fk_complaint` FOREIGN KEY (`complaint_id`) REFERENCES `complaintmanager_complaint` (`id`), + ADD CONSTRAINT `complaintManager_log_creator_id_a0fb4f0e_fk_auth_user_id` FOREIGN KEY (`creator_id`) REFERENCES `auth_user` (`id`); + +-- +-- Constraints for table `complaintmanager_member` +-- +ALTER TABLE `complaintmanager_member` + ADD CONSTRAINT `complaintManager_mem_role_id_17850815_fk_complaint` FOREIGN KEY (`role_id`) REFERENCES `complaintmanager_role` (`id`), + ADD CONSTRAINT `complaintManager_member_user_id_fa3d3a9a_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`); + +-- +-- Constraints for table `complaintmanager_member_additional_division` +-- +ALTER TABLE `complaintmanager_member_additional_division` + ADD CONSTRAINT `complaintManager_mem_division_id_64830523_fk_complaint` FOREIGN KEY (`division_id`) REFERENCES `complaintmanager_division` (`id`), + ADD CONSTRAINT `complaintManager_mem_member_id_acbc2b88_fk_complaint` FOREIGN KEY (`member_id`) REFERENCES `complaintmanager_member` (`id`); + +-- +-- Constraints for table `complaintmanager_role` +-- +ALTER TABLE `complaintmanager_role` + ADD CONSTRAINT `complaintManager_rol_origin_id_3a86ba60_fk_complaint` FOREIGN KEY (`origin_id`) REFERENCES `complaintmanager_origin` (`id`); + +-- +-- Constraints for table `complaintmanager_role_divisions` +-- +ALTER TABLE `complaintmanager_role_divisions` + ADD CONSTRAINT `complaintManager_rol_division_id_d4b2a23f_fk_complaint` FOREIGN KEY (`division_id`) REFERENCES `complaintmanager_division` (`id`), + ADD CONSTRAINT `complaintManager_rol_role_id_3ca34561_fk_complaint` FOREIGN KEY (`role_id`) REFERENCES `complaintmanager_role` (`id`); + +-- +-- Constraints for table `complaintmanager_worker` +-- +ALTER TABLE `complaintmanager_worker` + ADD CONSTRAINT `complaintManager_wor_complaint_id_0297bc5a_fk_complaint` FOREIGN KEY (`complaint_id`) REFERENCES `complaintmanager_complaint` (`id`), + ADD CONSTRAINT `complaintManager_wor_division_id_2efb5c20_fk_complaint` FOREIGN KEY (`division_id`) REFERENCES `complaintmanager_division` (`id`); + +-- +-- Constraints for table `django_admin_log` +-- +ALTER TABLE `django_admin_log` + ADD CONSTRAINT `django_admin_log_content_type_id_c4bce8eb_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`), + ADD CONSTRAINT `django_admin_log_user_id_c564eba6_fk` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`); +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 */; -- GitLab