text
stringlengths 1
1.05M
|
|---|
DELIMITER /
INSERT INTO KRIM_PERM_ID_BS_S VALUES(NULL)
/
INSERT INTO KRIM_PERM_T (PERM_ID, OBJ_ID, VER_NBR, PERM_TMPL_ID, NMSPC_CD, NM, DESC_TXT)
VALUES((SELECT (MAX(ID)) FROM KRIM_PERM_ID_BS_S), UUID(), 1, (SELECT PERM_TMPL_ID FROM KRIM_PERM_TMPL_T WHERE NM = 'Default' AND NMSPC_CD='KUALI'), 'KC-SUBAWARD', 'CREATE SUBAWARD', 'Create a new Subaward permission')
/
INSERT INTO KRIM_PERM_ID_BS_S VALUES(NULL)
/
INSERT INTO KRIM_PERM_T (PERM_ID, OBJ_ID, VER_NBR, PERM_TMPL_ID, NMSPC_CD, NM, DESC_TXT)
VALUES((SELECT (MAX(ID)) FROM KRIM_PERM_ID_BS_S), UUID(), 1, (SELECT PERM_TMPL_ID FROM KRIM_PERM_TMPL_T WHERE NM = 'Default' AND NMSPC_CD='KUALI'), 'KC-SUBAWARD', 'MODIFY SUBAWARD', 'Edit an existing Subaward permission')
/
INSERT INTO KRIM_PERM_ID_BS_S VALUES(NULL)
/
INSERT INTO KRIM_PERM_T (PERM_ID, OBJ_ID, VER_NBR, PERM_TMPL_ID, NMSPC_CD, NM, DESC_TXT)
VALUES((SELECT (MAX(ID)) FROM KRIM_PERM_ID_BS_S), UUID(), 1, (SELECT PERM_TMPL_ID FROM KRIM_PERM_TMPL_T WHERE NM = 'Default' AND NMSPC_CD='KUALI'), 'KC-SUBAWARD', 'VIEW SUBAWARD', 'View all information on a Subaward permission')
/
INSERT INTO KRIM_ROLE_PERM_ID_BS_S VALUES(NULL)
/
INSERT INTO KRIM_ROLE_T (ROLE_ID, OBJ_ID, VER_NBR, ROLE_NM, NMSPC_CD, DESC_TXT, KIM_TYP_ID, ACTV_IND, LAST_UPDT_DT)
VALUES ((SELECT (MAX(ID)) FROM KRIM_ROLE_PERM_ID_BS_S), UUID(), 1, 'View Subaward', 'KC-SUBAWARD', 'View Subawards role', (SELECT KIM_TYP_ID FROM KRIM_TYP_T WHERE NM = 'Default'), 'Y', NOW())
/
INSERT INTO KRIM_ROLE_PERM_ID_BS_S VALUES(NULL)
/
INSERT INTO KRIM_ROLE_T (ROLE_ID, OBJ_ID, VER_NBR, ROLE_NM, NMSPC_CD, DESC_TXT, KIM_TYP_ID, ACTV_IND, LAST_UPDT_DT)
VALUES ((SELECT (MAX(ID)) FROM KRIM_ROLE_PERM_ID_BS_S), UUID(), 1, 'Modify Subaward', 'KC-SUBAWARD', 'The Subaward Create/Modify role', (SELECT KIM_TYP_ID FROM KRIM_TYP_T WHERE NM = 'Default'), 'Y', NOW())
/
INSERT INTO KRIM_ROLE_PERM_ID_BS_S VALUES(NULL)
/
INSERT INTO KRIM_ROLE_PERM_T (ROLE_PERM_ID, OBJ_ID, VER_NBR, ROLE_ID, PERM_ID, ACTV_IND)
VALUES ((SELECT (MAX(ID)) FROM KRIM_ROLE_PERM_ID_BS_S), UUID(), 1, (SELECT ROLE_ID FROM KRIM_ROLE_T WHERE ROLE_NM = 'View Subaward' AND NMSPC_CD='KC-SUBAWARD'), (SELECT PERM_ID FROM KRIM_PERM_T WHERE NM = 'VIEW SUBAWARD' AND NMSPC_CD='KC-SUBAWARD'), 'Y')
/
INSERT INTO KRIM_ROLE_PERM_ID_BS_S VALUES(NULL)
/
INSERT INTO KRIM_ROLE_PERM_T (ROLE_PERM_ID, OBJ_ID, VER_NBR, ROLE_ID, PERM_ID, ACTV_IND)
VALUES ((SELECT (MAX(ID)) FROM KRIM_ROLE_PERM_ID_BS_S), UUID(), 1, (SELECT ROLE_ID FROM KRIM_ROLE_T WHERE ROLE_NM = 'Modify Subaward' AND NMSPC_CD='KC-SUBAWARD'), (SELECT PERM_ID FROM KRIM_PERM_T WHERE NM = 'CREATE SUBAWARD' AND NMSPC_CD='KC-SUBAWARD'), 'Y')
/
INSERT INTO KRIM_ROLE_PERM_ID_BS_S VALUES(NULL)
/
INSERT INTO KRIM_ROLE_PERM_T (ROLE_PERM_ID, OBJ_ID, VER_NBR, ROLE_ID, PERM_ID, ACTV_IND)
VALUES ((SELECT (MAX(ID)) FROM KRIM_ROLE_PERM_ID_BS_S), UUID(), 1, (SELECT ROLE_ID FROM KRIM_ROLE_T WHERE ROLE_NM = 'Modify Subaward' AND NMSPC_CD='KC-SUBAWARD'), (SELECT PERM_ID FROM KRIM_PERM_T WHERE NM = 'MODIFY SUBAWARD' AND NMSPC_CD='KC-SUBAWARD'), 'Y')
/
INSERT INTO KRIM_ROLE_PERM_ID_BS_S VALUES(NULL)
/
INSERT INTO KRIM_ROLE_PERM_T (ROLE_PERM_ID, OBJ_ID, VER_NBR, ROLE_ID, PERM_ID, ACTV_IND)
VALUES ((SELECT (MAX(ID)) FROM KRIM_ROLE_PERM_ID_BS_S), UUID(), 1, (SELECT ROLE_ID FROM KRIM_ROLE_T WHERE ROLE_NM = 'Modify Subaward' AND NMSPC_CD='KC-SUBAWARD'), (SELECT PERM_ID FROM KRIM_PERM_T WHERE NM = 'VIEW SUBAWARD' AND NMSPC_CD='KC-SUBAWARD'), 'Y')
/
COMMIT
/
DELIMITER ;
|
-- ----------------------------
-- Table structure for `fs_user`
-- ----------------------------
DROP TABLE IF EXISTS `fs_user`;
CREATE TABLE `fs_user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'User Id',
`name` varchar(255) NOT NULL COMMENT 'Nickname',
`password` varchar(32) NOT NULL COMMENT 'md5(md5(password + static_salt) + salt)',
`salt` varchar(20) DEFAULT NULL,
`avatar` varchar(128) DEFAULT NULL COMMENT '头像',
`register_date` datetime DEFAULT NULL,
`last_login_date` datetime DEFAULT NULL,
`login_count` int(11) DEFAULT '0' COMMENT '登录次数',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18912341258 DEFAULT CHARSET=utf8
|
-- =============================================
-- Author: Gunther Karolyi
-- Create date: 21/05/2021
-- Description: Delete User Payroll System Test
-- =============================================
DECLARE @insertState AS INT
DECLARE @deleteState AS INT
-- Inserting New User
EXEC @insertState = Payroll.dbo.User_InsertUser
@username = 'karolyi97',
@password = 'admin'
-- Delete User From Table
EXEC @deleteState = Payroll.dbo.User_DeleteUser
@username = "karolyi15"
-- Check User Table Data
SELECT
SystemUser.username AS Username,
SystemUser.password AS Password,
SystemUser.visible AS Active
FROM Payroll.dbo.SystemUser;
|
SELECT
* EXCEPT (seqnum) REPLACE (foo as bar, baz foobar)
FROM my_tbl;
-- Catch potential bugs in unions
select * except (foo) from some_table
union all
select * from another_table;
-- Except is allowed after other fields
select
1 + 2 as calculated,
* except (irrelevant)
from my_tbl;
-- This might be redundant with the example above.
-- Demonstrates using multiple except clauses.
select
foo.* except (some_column),
bar.* except (other_column)
from my_tbl;
|
CREATE TABLE IF NOT EXISTS raw_daily_data (
id SERIAL,
ts TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
rec_dt DATE NOT NULL,
rec_territory TEXT NOT NULL,
rec_value NUMERIC,
CONSTRAINT unique_entry UNIQUE(rec_dt, rec_territory, rec_value)
)
|
ALTER TABLE `pc_core_area`
ADD CONSTRAINT `pc_core_area_ibfk_1` FOREIGN KEY (`Layout`) REFERENCES `pc_core_layout` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_area_ibfk_2` FOREIGN KEY (`Previous`) REFERENCES `pc_core_area` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE;
ALTER TABLE `pc_core_backend_container_rights`
ADD CONSTRAINT `pc_core_backend_container_rights_ibfk_1` FOREIGN KEY (`ContentRights`) REFERENCES `pc_core_backend_content_rights` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_backend_layout_rights`
ADD CONSTRAINT `pc_core_backend_layout_rights_ibfk_1` FOREIGN KEY (`ContentRights`) REFERENCES `pc_core_backend_content_rights` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_backend_page_rights`
ADD CONSTRAINT `pc_core_backend_page_rights_ibfk_1` FOREIGN KEY (`ContentRights`) REFERENCES `pc_core_backend_content_rights` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_backend_site_rights`
ADD CONSTRAINT `pc_core_backend_site_rights_ibfk_1` FOREIGN KEY (`PageRights`) REFERENCES `pc_core_backend_page_rights` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_container`
ADD CONSTRAINT `pc_core_container_ibfk_1` FOREIGN KEY (`User`) REFERENCES `pc_core_user` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_container_ibfk_2` FOREIGN KEY (`UserRights`) REFERENCES `pc_core_backend_container_rights` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_container_ibfk_3` FOREIGN KEY (`UserGroup`) REFERENCES `pc_core_usergroup` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_container_ibfk_4` FOREIGN KEY (`UserGroupRights`) REFERENCES `pc_core_backend_container_rights` (`ID`) ON DELETE SET NULL;
ALTER TABLE `pc_core_container_content`
ADD CONSTRAINT `pc_core_container_content_ibfk_1` FOREIGN KEY (`Container`) REFERENCES `pc_core_container` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_container_content_ibfk_2` FOREIGN KEY (`Content`) REFERENCES `pc_core_content` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_container_content_ibfk_3` FOREIGN KEY (`Parent`) REFERENCES `pc_core_container_content` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_container_content_ibfk_4` FOREIGN KEY (`Previous`) REFERENCES `pc_core_container_content` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE;
ALTER TABLE `pc_core_content`
ADD CONSTRAINT `pc_core_content_ibfk_1` FOREIGN KEY (`LayoutContent`) REFERENCES `pc_core_layout_content` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_content_ibfk_2` FOREIGN KEY (`PageContent`) REFERENCES `pc_core_page_content` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_content_ibfk_3` FOREIGN KEY (`ContainerContent`) REFERENCES `pc_core_container_content` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_content_ibfk_4` FOREIGN KEY (`User`) REFERENCES `pc_core_user` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_content_ibfk_5` FOREIGN KEY (`UserRights`) REFERENCES `pc_core_backend_content_rights` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_content_ibfk_6` FOREIGN KEY (`UserGroup`) REFERENCES `pc_core_usergroup` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_content_ibfk_7` FOREIGN KEY (`UserGroupRights`) REFERENCES `pc_core_backend_content_rights` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE;
ALTER TABLE `pc_core_language`
ADD CONSTRAINT `pc_core_language_ibfk_1` FOREIGN KEY (`Parent`) REFERENCES `pc_core_language` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE;
ALTER TABLE `pc_core_layout`
ADD CONSTRAINT `pc_core_layout_ibfk_1` FOREIGN KEY (`User`) REFERENCES `pc_core_user` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_layout_ibfk_2` FOREIGN KEY (`UserRights`) REFERENCES `pc_core_backend_layout_rights` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_layout_ibfk_3` FOREIGN KEY (`UserGroup`) REFERENCES `pc_core_usergroup` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_layout_ibfk_4` FOREIGN KEY (`UserGroupRights`) REFERENCES `pc_core_backend_layout_rights` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE;
ALTER TABLE `pc_core_layout_content`
ADD CONSTRAINT `pc_core_layout_content_ibfk_1` FOREIGN KEY (`Area`) REFERENCES `pc_core_area` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_layout_content_ibfk_2` FOREIGN KEY (`Previous`) REFERENCES `pc_core_layout_content` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_layout_content_ibfk_3` FOREIGN KEY (`Content`) REFERENCES `pc_core_content` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_layout_content_ibfk_4` FOREIGN KEY (`Parent`) REFERENCES `pc_core_layout_content` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_module_lock`
ADD CONSTRAINT `pc_core_module_lock_ibfk_1` FOREIGN KEY (`UserGroup`) REFERENCES `pc_core_usergroup` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_page`
ADD CONSTRAINT `pc_core_page_ibfk_1` FOREIGN KEY (`Site`) REFERENCES `pc_core_site` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_page_ibfk_2` FOREIGN KEY (`Parent`) REFERENCES `pc_core_page` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_page_ibfk_3` FOREIGN KEY (`Previous`) REFERENCES `pc_core_page` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_page_ibfk_4` FOREIGN KEY (`Layout`) REFERENCES `pc_core_layout` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_page_ibfk_5` FOREIGN KEY (`User`) REFERENCES `pc_core_user` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_page_ibfk_6` FOREIGN KEY (`UserRights`) REFERENCES `pc_core_backend_page_rights` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_page_ibfk_7` FOREIGN KEY (`UserGroup`) REFERENCES `pc_core_usergroup` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_page_ibfk_8` FOREIGN KEY (`UserGroupRights`) REFERENCES `pc_core_backend_page_rights` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE;
ALTER TABLE `pc_core_page_content`
ADD CONSTRAINT `pc_core_page_content_ibfk_1` FOREIGN KEY (`Page`) REFERENCES `pc_core_page` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_page_content_ibfk_2` FOREIGN KEY (`Area`) REFERENCES `pc_core_area` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_page_content_ibfk_3` FOREIGN KEY (`Previous`) REFERENCES `pc_core_page_content` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_page_content_ibfk_4` FOREIGN KEY (`Parent`) REFERENCES `pc_core_page_content` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_page_content_ibfk_5` FOREIGN KEY (`Content`) REFERENCES `pc_core_content` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_site`
ADD CONSTRAINT `pc_core_site_ibfk_1` FOREIGN KEY (`User`) REFERENCES `pc_core_user` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_site_ibfk_2` FOREIGN KEY (`UserRights`) REFERENCES `pc_core_backend_site_rights` (`ID`) ON DELETE SET NULL ON UPDATE SET NULL,
ADD CONSTRAINT `pc_core_site_ibfk_3` FOREIGN KEY (`UserGroup`) REFERENCES `pc_core_usergroup` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_site_ibfk_4` FOREIGN KEY (`UserGroupRights`) REFERENCES `pc_core_backend_site_rights` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE;
ALTER TABLE `pc_core_user`
ADD CONSTRAINT `pc_core_user_ibfk_1` FOREIGN KEY (`Language`) REFERENCES `pc_core_language` (`ID`) ON UPDATE CASCADE;
ALTER TABLE `pc_core_usergroup_site`
ADD CONSTRAINT `pc_core_usergroup_site_ibfk_1` FOREIGN KEY (`UserGroup`) REFERENCES `pc_core_usergroup` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_usergroup_site_ibfk_2` FOREIGN KEY (`Site`) REFERENCES `pc_core_site` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_user_usergroup`
ADD CONSTRAINT `pc_core_user_usergroup_ibfk_1` FOREIGN KEY (`User`) REFERENCES `pc_core_user` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_user_usergroup_ibfk_2` FOREIGN KEY (`UserGroup`) REFERENCES `pc_core_usergroup` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_page_url`
ADD CONSTRAINT `pc_core_page_url_ibfk_1` FOREIGN KEY (`Page`) REFERENCES `pc_core_page` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_page_url_parameter`
ADD CONSTRAINT `pc_core_page_url_parameter_ibfk_2` FOREIGN KEY (`Previous`) REFERENCES `pc_core_page_url_parameter` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_page_url_parameter_ibfk_1` FOREIGN KEY (`PageUrl`) REFERENCES `pc_core_page_url` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_content_membergroup`
ADD CONSTRAINT `pc_core_content_membergroup_ibfk_2` FOREIGN KEY (`MemberGroup`) REFERENCES `pc_core_membergroup` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_content_membergroup_ibfk_1` FOREIGN KEY (`Content`) REFERENCES `pc_core_content` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_member_membergroup`
ADD CONSTRAINT `pc_core_member_membergroup_ibfk_1` FOREIGN KEY (`Member`) REFERENCES `pc_core_member` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_member_membergroup_ibfk_2` FOREIGN KEY (`MemberGroup`) REFERENCES `pc_core_membergroup` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_page_membergroup`
ADD CONSTRAINT `pc_core_page_membergroup_ibfk_2` FOREIGN KEY (`MemberGroup`) REFERENCES `pc_core_membergroup` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_page_membergroup_ibfk_1` FOREIGN KEY (`Page`) REFERENCES `pc_core_page` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_site` ADD FOREIGN KEY (`Language`) REFERENCES `pc_core_language`(`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_content_wording` ADD FOREIGN KEY (`Content`) REFERENCES `pc_core_content`(`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_log_item`
ADD CONSTRAINT `pc_core_log_item_ibfk_1` FOREIGN KEY (`User`) REFERENCES `pc_core_user` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE;
ALTER TABLE `pc_core_log_user`
ADD CONSTRAINT `pc_core_log_user_ibfk_2` FOREIGN KEY (`LogItem`) REFERENCES `pc_core_log_item` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_log_user_ibfk_1` FOREIGN KEY (`User`) REFERENCES `pc_core_user` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_log_page`
ADD CONSTRAINT `pc_core_log_page_ibfk_2` FOREIGN KEY (`LogItem`) REFERENCES `pc_core_log_item` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_log_page_ibfk_1` FOREIGN KEY (`Page`) REFERENCES `pc_core_page` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_log_site`
ADD CONSTRAINT `pc_core_log_site_ibfk_2` FOREIGN KEY (`LogItem`) REFERENCES `pc_core_log_item` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_log_site_ibfk_1` FOREIGN KEY (`Site`) REFERENCES `pc_core_site` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_log_layout`
ADD CONSTRAINT `pc_core_log_layout_ibfk_2` FOREIGN KEY (`LogItem`) REFERENCES `pc_core_log_item` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_log_layout_ibfk_1` FOREIGN KEY (`Layout`) REFERENCES `pc_core_layout` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_log_area`
ADD CONSTRAINT `pc_core_log_area_ibfk_2` FOREIGN KEY (`LogItem`) REFERENCES `pc_core_log_item` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_log_area_ibfk_1` FOREIGN KEY (`Area`) REFERENCES `pc_core_area` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_log_content`
ADD CONSTRAINT `pc_core_log_content_ibfk_2` FOREIGN KEY (`LogItem`) REFERENCES `pc_core_log_item` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_log_content_ibfk_1` FOREIGN KEY (`Content`) REFERENCES `pc_core_content` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_log_member`
ADD CONSTRAINT `pc_core_log_member_ibfk_2` FOREIGN KEY (`LogItem`) REFERENCES `pc_core_log_item` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_log_member_ibfk_1` FOREIGN KEY (`Member`) REFERENCES `pc_core_member` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_log_membergroup`
ADD CONSTRAINT `pc_core_log_membergroup_ibfk_2` FOREIGN KEY (`LogItem`) REFERENCES `pc_core_log_item` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_log_membergroup_ibfk_1` FOREIGN KEY (`MemberGroup`) REFERENCES `pc_core_membergroup` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_log_template`
ADD CONSTRAINT `pc_core_log_template_ibfk_1` FOREIGN KEY (`LogItem`) REFERENCES `pc_core_log_item` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_log_usergroup`
ADD CONSTRAINT `pc_core_log_usergroup_ibfk_2` FOREIGN KEY (`LogItem`) REFERENCES `pc_core_log_item` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_log_usergroup_ibfk_1` FOREIGN KEY (`UserGroup`) REFERENCES `pc_core_usergroup` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_log_container`
ADD CONSTRAINT `pc_core_log_container_ibfk_2` FOREIGN KEY (`LogItem`) REFERENCES `pc_core_log_item` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `pc_core_log_container_ibfk_1` FOREIGN KEY (`Container`) REFERENCES `pc_core_container` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `pc_core_page`
ADD CONSTRAINT `pc_core_page_ibfk_9` FOREIGN KEY (`RedirectTarget`) REFERENCES `pc_core_page_url` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE;
-- New in 1.2.3 --
ALTER TABLE `pc_core_member_change_request`
ADD CONSTRAINT `pc_core_member_change_request_ibfk_1` FOREIGN KEY (`Member`) REFERENCES `pc_core_member` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
|
-- phpMyAdmin SQL Dump
-- version 3.5.8.1deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 09, 2013 at 07:08 PM
-- Server version: 5.5.34-0ubuntu0.13.04.1
-- PHP Version: 5.4.9-4ubuntu2.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
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 utf8 */;
--
-- Database: `mteixeira`
--
-- --------------------------------------------------------
--
-- Table structure for table `company`
--
CREATE TABLE IF NOT EXISTS `company` (
`id_company` int(255) NOT NULL,
`name` varchar(255) NOT NULL,
`site_url` varchar(255) NOT NULL,
`acronym` varchar(100) NOT NULL,
PRIMARY KEY (`id_company`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='company for sabe all companys';
--
-- Dumping data for table `company`
--
INSERT INTO `company` (`id_company`, `name`, `site_url`, `acronym`) VALUES
(1, 'Rocket internet GmbH ', 'http://www.rocket-internet.de/', 'RI'),
(2, 'Glintt', 'http://www.glintt.com/ ', 'GL');
-- --------------------------------------------------------
--
-- Table structure for table `projects`
--
CREATE TABLE IF NOT EXISTS `projects` (
`end_date` varchar(255) NOT NULL,
`id_project` int(255) NOT NULL,
`image` varchar(255) DEFAULT NULL,
`name` varchar(255) NOT NULL,
`site` varchar(255) DEFAULT NULL,
`start_date` varchar(255) NOT NULL,
`type` varchar(255) NOT NULL,
`video` varchar(255) DEFAULT NULL,
`technologies` varchar(255) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
`jobsTitle` varchar(255) DEFAULT NULL,
`company_id_company` int(255) NOT NULL,
PRIMARY KEY (`id_project`),
UNIQUE KEY `unique_id_project` (`id_project`),
KEY `index_id_project` (`id_project`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='projects table for save my all projectse';
--
-- Dumping data for table `projects`
--
INSERT INTO `projects` (`end_date`, `id_project`, `image`, `name`, `site`, `start_date`, `type`, `video`, `technologies`, `description`, `jobsTitle`, `company_id_company`) VALUES
('31-12-2013', 1, 'emeza_de.png', 'Emeza - Emeza Premium Shop - All Ventures', 'http://www.emeza.de/, http://www.emeza.ch/, http://www.emeza.com/', '10-05-2012', 'profissional', '', 'Zend Framework 2, Mysql, Svn, Continuous Delivery, Continuous integration, PHP, SOAP, Jquery, Css 3, Htlm 5,PhpUnit, Cucumber, capybara, Ruby', 'emeza.text.description', 'PHP Developer (Frontend / Backend)', 1),
('31-12-2013', 2, 'kiomi_de.png', 'KIOMI Online Shop', 'http://de.kiomi.com/', '10-05-2012', 'profissional', '', 'Zend Framework 2, Mysql, Svn, Continuous Delivery, Continuous integration, PHP, SOAP, Jquery, Css 3, Htlm 5,PhpUnit, Cucumber, capybara, Ruby', 'kiomi.text.description', 'PHP Developer (Frontend / Backend)', 1),
('10-05-2012', 3, 'fabfurnish.png', 'FabFurnish.com', 'http://www.fabfurnish.com/', '1-05-2012', 'profissional', '', 'Zend Framework 1, Yii Framework, Mysql, Svn, PHP,Jquery, Css 3, Htlm 5, Solr', 'fab.index.text', 'PHP Developer (Frontend / Backend)', 1),
('1-05-2012', 4, 'office.png', 'OfficeYes/OfficeFab: Online Shopping For Office Supplies, Online Stationery ', 'http://www.officeyes.com/,http://www.techinasia.com/officefab-shuts-officeyes/', '12-03-2012', 'profissional', '', 'Zend Framework 1, Yii Framework, Mysql, Svn, PHP,Jquery, Css 3, Htlm 5, Solr', 'office.text.description', 'PHP Developer (Frontend / Backend)', 1),
('20-02-2012', 5, 'bes.jpg', 'Bes -ESI - Espirito Santo Informatica / Glintt - Glintt.com', 'http://www.esi.pt/, http://www.glintt.com/', '10-10-2011', 'profissional', '', 'Java, XML, DTD, XSD, COBOL, TIBCO, AS400, Microsoft Source Save, Spring, Hibernate, JPA, Struts., CXF, Java Platform, Enterprise Edition,Junit', 'bes.text.description', 'Java Developer, software engineer, quality assurance automation engineer', 2),
('10-03-2012', 6, 'app1.png', 'SRXTransportes(2012)', 'https://play.google.com/store/apps/details?id=rodonorte.gui', '01-03-2012', 'freelancer', '', 'Java, Android SDK, XML, SqlLite, Rest', 'free.srx.text', 'Java Developer,\nAndroid Developer,\nDatabase Engineer', 0),
('27-02-2012', 7, 'app3.png', 'MyCosmetics(2012)', 'https://play.google.com/store/apps/details?id=mycosmetics.gui', '01-02-2012', 'freelancer', '', 'Java, Android SDK, XML, SqlLite, Rest', 'free.cos.text', 'Java Developer,\r\nAndroid Developer,\r\nDatabase Engineer', 0),
('10-12-2010', 8, 'app2.png', 'Gestor de Rotas de Venda(2011)', 'https://play.google.com/store/apps/details?id=com.tpcmu.gui', '10-10-2010', 'freelancer', '', 'Java, Android SDK, XML, SqlLite, Rest', 'free.vendas.text', 'Java Developer,\r\nAndroid Developer,\r\nDatabase Engineer', 0),
('10-01-2011', 9, 'app4.png', 'Jogo do Galo em Android(2011)', 'https://play.google.com/store/apps/details?id=com.estgf.mac', '12-12-2010', 'freelancer', '', 'Java, Android SDK, XML, SqlLite, Rest', 'free.tictac.text', 'Java Developer,\r\nAndroid Developer,\r\nDatabase Engineer', 0),
('10-01-2011', 10, 'app6.png', 'Widget Name(2011)', 'https://play.google.com/store/apps/developer?id=andre+marcelo', '12-12-2010', 'freelancer', '', 'Java, Android SDK, XML', 'widget.tictac.text', 'Java Developer,\r\nAndroid Developer,\r\nDatabase Engineer', 0),
('10-03-2012', 11, 'web1.png', 'SaniLixa', 'http://www.sanilixa.com/index.php/quemsomos', '12-01-2012', 'freelancer', '', 'PHP 5, CSS 3, HTML 5,JQUERY', 'sani.text', 'PHP Developer', 0),
('10-03-2012', 12, 'web2.png', 'Tay e Diana Aves Exoticas', 'http://tayediana.byethost7.com/', '12-01-2012', 'freelancer', '', 'PHP 5, CSS 3, HTML 5,JQUERY', 'tay.text', 'PHP Developer', 0),
('10-12-2011', 13, 'web3.png', 'Quinta da Bouca - Fruta Bio', 'http://andreamarcelo-ei.byethost7.com/quintadabouca/,http://quintadabouca.com/', '12-02-2011', 'freelancer', '', ' PHP5 , PHP - Yii Framework, CSS 3, JS , JQUERY, MSQL', 'quintadabouca.text', 'PHP Developer', 0),
('10-12-2010', 14, 'web4.png', 'andremarcelo.net', 'http://andreamarcelo.net', '22-03-2005', 'freelancer', '', ' PHP5 , PHP - Yii Framework, CSS 3, JS , JQUERY, MSQL', 'andremarcelo.text', 'PHP Developer', 0),
('31-12-2009', 15, 'web5.png', ' RIWD - Informatica', 'http://riwd.net', '01-12-2009', 'freelancer', '', ' PHP5 , PHP - Yii Framework, CSS 3, JS , JQUERY, MSQL', 'riwd.text', 'PHP Developer', 0),
('30-12-2009', 16, 'web6.gif', 'Correio de Celorico', 'http://correiodecelorico.com', '01-12-2009', 'freelancer', '', 'CMS JOOMLA 1.5 Template, PHP', 'cc.text', 'PHP Developer', 0),
('01-05-2009', 17, 'web7.png', 'Liga de Futsal AFCB(2007 ,2008, 2009)', 'http://futsaldecelorico.com', '10-12-2006', 'freelancer', '', 'PHP5, Mysql', 'futsal.text', 'PHP Developer', 0),
('01-05-2009', 18, 'web8.png', ' Ferjota engenharia', 'http://ferjota.com', '10-12-2008', 'freelancer', '', 'PHP5, Mysql', 'fer.text', 'PHP Developer', 0),
('01-05-2007', 19, 'web9.png', 'JFdoCorgo', 'http://jferguesia.com', '10-01-2007', 'freelancer', '', 'PHP5, Mysql', 'corgo.text', 'PHP Developer', 0),
('01-05-2008', 20, 'web10.png', 'RodaBike', 'http://rodabike.com', '10-01-2007', 'freelancer', '', 'PHP5, Mysql', 'radabike.text', 'PHP Developer', 0),
('01-05-2008', 21, 'web11.png', 'CelConta', 'http://celconta.com', '10-01-2007', 'freelancer', '', 'PHP5, Mysql', 'celconta.text', 'PHP Developer', 0),
('01-05-2007', 22, 'web12.png', 'Gentil Seguros.', 'http://gentilseguros.com', '10-01-2007', 'freelancer', '', 'PHP5, Mysql', 'gentil.text', 'PHP Developer', 0),
('01-03-2007', 23, 'web13.png', 'MT Logo', 'http://sanilixa.com', '10-02-2007', 'freelancer', '', 'PHP5, Mysql', 'sa.text', 'PHP Developer', 0),
('01-03-2007', 24, 'web14.png', 'Silva Andrade Studios.', 'http://silvaandradestudios.com', '10-02-2007', 'freelancer', '', 'PHP5, Mysql', 'silva.text', 'PHP Developer', 0),
('01-03-2007', 25, 'web15.png', 'Jornal Noticias de Basto.', 'http://noticiasdebasto.com', '10-02-2005', 'freelancer', '', 'PHP5, Mysql', 'nb.text', 'PHP Developer', 0),
('01-08-2008', 26, 'web16.png', 'Motor Basto Stand', 'http://motorbasto.com', '20-02-2008', 'freelancer', '', 'PHP5, Mysql', 'mb.text', 'PHP Developer', 0),
('01-09-2011', 27, '1.png', 'Tap Decision', 'http://www.youtube.com/watch?v=FOiYsjfTXxQ', '04-04-2011', 'academic', '', 'Java, Webservices, SIP, XML, Android SDK', 'tap.text', 'System Administrator, Java developer, Android Developer', 0),
('01-03-2011', 28, '2.png', 'Computer Network Simulation', NULL, '20-02-2011', 'academic', '', 'network protocols', 'redes.text', 'Network Developer', 0),
('01-08-2008', 29, '3.png', 'Project Manager', NULL, '20-02-2008', 'academic', '', 'PM Book, Microsoft Project ', 'pm.text', 'PHP Developer', 0),
('11-05-2011', 30, '4.png', 'SQT', NULL, '21-02-2011', 'academic', '', 'PHP5, Mysql', 'sqt.text', 'PHP Developer', 0),
('15-06-2011', 31, '5.png', 'PEI', NULL, '20-03-2011', 'academic', '', 'Java, JSP', 'pei.text', 'Java Developer', 0),
('01-12-2010', 32, '6.png', 'Information System', NULL, '21-05-2011', 'academic', '', 'PHP5, Mysql', 'si.text', 'PHP Developer', 0),
('01-03-2010', 33, '7.png', 'Data Base Systems', NULL, '20-02-2010', 'academic', '', 'SQL Server and SQL', 'sql.text', 'DBA', 0),
('01-03-2010', 34, '8.png', 'CMU', NULL, '20-03-2010', 'academic', '', 'PHP5, Mysql', 'cmu2.text', 'Mobile Developer', 0),
('01-03-2010', 35, '9.png', 'CMU', NULL, '20-03-2010', 'academic', '', 'Windows Mobile and C#', 'cmu1.text', 'Mobile Developer', 0),
('20-03-2009', 36, '10.png', 'Quality assurance', NULL, '20-01-2009', 'academic', '', 'Java SE, Junit', 'ju.text', 'Tester', 0),
('20-04-2009', 37, '11.png', 'JTwitter(2010)', NULL, '20-03-2009', 'academic', '', 'Java SE', 'jtt.text', 'Java Developer', 0),
('20-02-2009', 38, '12.png', 'Chinese postman problem', NULL, '20-01-2009', 'academic', '', 'Java SE', 'jase.text', 'Java Developer', 0),
('01-08-2008', 39, '13.png', 'pacMan C and Open GL', NULL, '20-02-2008', 'academic', '', 'C++, Open GL', 'c.text', 'C++ Developer', 0),
('01-08-2008', 40, '14.png', 'ISM', NULL, '20-02-2008', 'academic', '', 'PHP5, Mysql', 'ewqqw.text', 'PHP Developer', 0),
('01-02-2008', 41, '15.png', 'Web Developing', NULL, '20-01-2008', 'academic', '', 'PHP5, Mysql', 'asass.text', 'PHP Developer', 0),
('01-05-2008', 42, '16.png', ' Maquina de Café em Assembly', NULL, '20-02-2008', 'academic', '', 'Assembly', 'ass.text', 'Assembly Developer', 0),
('01-12-2009', 43, '17.png', 'Robos que Recolhem Lixo(2009) Simbad Simulator', NULL, '20-11-2009', 'academic', '', 'Java SE', 'eb.text', 'Java Developer', 0),
('01-08-2008', 44, '18.png', ' BackWard and Foward RPN Calculator(2009)', NULL, '20-02-2008', 'academic', '', 'Java SE', 'bfb.text', 'Java Developer', 0),
('01-08-2008', 45, '19.png', 'Network Simulator Maps and Subway', NULL, '20-02-2008', 'academic', '', 'Java SE', 'ns.text', 'Java Developer', 0),
('01-08-2008', 46, '20.png', 'Speller', NULL, '20-02-2008', 'academic', '', 'Java SE', 'sp.text', 'Java Developer', 0),
('01-08-2008', 47, '21.png', 'Evaluation grid refers to an examination', NULL, '20-02-2008', 'academic', '', 'Java SE', 'ev.text', 'Java Developer', 0),
('01-08-2008', 48, '22.png', 'Java Web Browser', NULL, '20-02-2008', 'academic', '', 'Java SE', 'jb.text', 'Java Developer', 0),
('01-08-2008', 49, '23.png', 'Shopping Carts and supermarkets', NULL, '20-02-2008', 'academic', '', 'C', 's.text', 'C Developer', 0),
('01-08-2008', 50, '24.png', 'Personal Site of ISCI. place Projects', NULL, '20-02-2008', 'academic', '', 'Google Sites', 'gs.text', 'PHP Developer', 0),
('01-08-2008', 51, '25.png', 'Solitaire Game in C', NULL, '20-02-2008', 'academic', '', 'C', 'sl.text', 'C Developer', 0);
-- --------------------------------------------------------
--
-- Table structure for table `reviews`
--
CREATE TABLE IF NOT EXISTS `reviews` (
`name` varchar(100) NOT NULL,
`message` varchar(300) NOT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=14 ;
--
-- Dumping data for table `reviews`
--
INSERT INTO `reviews` (`name`, `message`, `id`) VALUES
('Jose Manuel', 'Grande Profissional :)', 11),
('Pedro Pinto Bes.', 'Excelente pessoa este Andre. grande abraço!', 12),
('João Pinto', 'André, antes de mais parabens pelo site. Espero que esteja tudo bem contigo. Quando te poderei ver por Lisboa novamente?', 13);
/*!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 */;
|
SELECT
mqtt_sessions.id as id,
mqtt_sessions.remote_endpoint_id as remote_endpoint_id,
mqtt_sessions.type as type,
mqtt_sessions.client_id as client_id,
mqtt_sessions.data as data
FROM mqtt_sessions, remote_endpoints, apis
WHERE mqtt_sessions.remote_endpoint_id = remote_endpoints.id
AND remote_endpoints.api_id = ?
AND remote_endpoints.api_id = apis.id
AND apis.account_id = ?
ORDER BY mqtt_sessions.id ASC;
|
use StackOverflow
go
create or alter procedure rpt.usp_Top_100_Users_that_rarely_upvote
@MinReputation int, @MinUpvotes int
as
begin
-- https://data.stackexchange.com/stackoverflow/query/6856/high-standards-top-100-users-that-rarely-upvote
-- High Standards - Top 100 Users that rarely upvote.
-- Top 100 Users that rarely upvote in comparison to the estimated amount of upvotes they received (doesn't account for e.g. bounties but should give a sufficient estimation). Useful settings (MinRep, MinUpvotes): (1000, 100), (10000, 0).
select top 100
id as [User Link],
round((100.0 * (Reputation/10)) / (Upvotes+1), 2) as [Ratio %],
Reputation as Rep,
UpVotes as [+ Votes],
DownVotes [- Votes]
from Users
where Reputation > @MinReputation
and Upvotes > @MinUpvotes
order by [Ratio %] desc
end
go
exec rpt.usp_Top_100_Users_that_rarely_upvote @MinReputation = 1000, @MinUpvotes = 100
go
exec rpt.usp_Top_100_Users_that_rarely_upvote @MinReputation = 10000, @MinUpvotes = 0
go
|
create table ldap_oc_mappings
(
id integer not null primary key,
name varchar(64) not null,
keytbl varchar(64) not null,
keycol varchar(64) not null,
create_proc varchar(255),
delete_proc varchar(255),
expect_return tinyint not null
);
create table ldap_attr_mappings
(
id integer not null primary key,
oc_map_id integer not null,
name varchar(255) not null,
sel_expr varchar(255) not null,
sel_expr_u varchar(255),
from_tbls varchar(255) not null,
join_where varchar(255),
add_proc varchar(255),
delete_proc varchar(255),
param_order tinyint not null,
expect_return tinyint not null,
foreign key (oc_map_id) references ldap_oc_mappings(id)
);
create table ldap_entries
(
id integer not null primary key,
dn varchar(255) not null,
dn_ru varchar(255),
oc_map_id integer not null,
parent int NOT NULL ,
keyval int NOT NULL,
foreign key (oc_map_id) references ldap_oc_mappings(id)
);
create index ldap_entriesx1 on ldap_entries(dn_ru);
create unique index unq1_ldap_entries on ldap_entries
(
oc_map_id,
keyval
);
create unique index unq2_ldap_entries on ldap_entries
(
dn
);
create table ldap_referrals
(
entry_id integer not null,
url varchar(4096) not null,
foreign key (entry_id) references ldap_entries(id)
);
create table ldap_entry_objclasses
(
entry_id integer not null,
oc_name varchar(64),
foreign key (entry_id) references ldap_entries(id)
);
|
insert into SPRING_DATA_CUSTOMER(ID, FORENAME, SURNAME, DOB) values (NULL, 'John', 'Doe', '1972-05-23');
insert into SPRING_DATA_CUSTOMER(ID, FORENAME, SURNAME, DOB) values (NULL, 'Jack', 'Pott', '1979-03-19');
insert into SPRING_DATA_CUSTOMER(ID, FORENAME, SURNAME, DOB) values (NULL, 'Carl', 'Marx', '1964-09-29');
insert into SPRING_DATA_CUSTOMER(ID, FORENAME, SURNAME, DOB) values (NULL, 'Carl', 'Jung', '1944-11-04');
|
create view Metadata.vUserTableTypeColumn as
select
o.CatalogId,
o.CatalogName,
s.SchemaId,
s.SchemaName,
o.ObjectId as TableId,
tt.name as TableName,
c.name as ColumnName,
d.PropertyValue as ColumnDescription,
c.column_id - 1 as Position,
c.user_type_id as DataTypeId,
t.DataTypeName,
c.is_computed as IsComputed,
c.is_identity as IsIdentity,
c.is_nullable as IsNullable,
tt.is_user_defined as IsUserDefined,
c.max_length as MaxLength,
c.precision as Precision,
c.scale as Scale
from
sys.table_types tt
inner join sys.columns c on c.object_id = tt.type_table_object_id
inner join Metadata.vObject o on o.ObjectId = tt.type_table_object_id
inner join Metadata.vSchema s on s.SchemaId = tt.schema_id
inner join Metadata.vDataType t on t.DataTypeId = c.user_type_id
--left join Metadata.vDescription d on d.MajorId = tt.user_type_id and d.MinorId = c.column_id
cross apply Metadata.fColumnDescription(tt.user_type_id, c.column_id) d
|
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 13 Nov 2018 pada 05.51
-- Versi Server: 10.1.10-MariaDB
-- PHP Version: 7.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `ci_web_builder`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `table_status`
--
CREATE TABLE `table_status` (
`ID` int(11) NOT NULL,
`keterangan_status` varchar(100) NOT NULL,
`index_color` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `table_status`
--
INSERT INTO `table_status` (`ID`, `keterangan_status`, `index_color`) VALUES
(1, 'Trial', 'info'),
(2, 'Aktif', 'success'),
(3, 'Suspened', 'danger');
-- --------------------------------------------------------
--
-- Struktur dari tabel `table_users`
--
CREATE TABLE `table_users` (
`ID` int(11) NOT NULL,
`nama` varchar(200) NOT NULL,
`username` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(255) NOT NULL,
`no_telp` varchar(20) NOT NULL,
`nama_web` varchar(200) NOT NULL,
`id_status` int(11) NOT NULL,
`gambar` varchar(255) NOT NULL,
`tanggal_daftar` datetime NOT NULL,
`expired` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `table_users`
--
INSERT INTO `table_users` (`ID`, `nama`, `username`, `email`, `password`, `no_telp`, `nama_web`, `id_status`, `gambar`, `tanggal_daftar`, `expired`) VALUES
(1, 'Ardhi Ramadhan', 'ardhir10', 'ramadhn10@gmail.com', '2b88c029dfc5805ad6ca4201c663ea71', '082113666778', '', 1, '', '2018-11-08 19:38:02', '2018-11-08 19:38:02'),
(6, 'faiz', 'faizseeguns@gmail.com', 'faizseeguns@gmail.com', '9d4d4ab0dfdb72a54b895d78b90b09c7', '', '', 3, '', '2018-11-12 10:40:36', '0000-00-00 00:00:00'),
(10, 'Ardhi Ramadhan', 'rmdhan95@gmail.com', 'rmdhan95@gmail.com', 'e04f28cc33cb20274dd3ff44e600a923', '', '', 2, '', '2018-11-12 12:04:57', '0000-00-00 00:00:00');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `table_status`
--
ALTER TABLE `table_status`
ADD PRIMARY KEY (`ID`);
--
-- Indexes for table `table_users`
--
ALTER TABLE `table_users`
ADD PRIMARY KEY (`ID`),
ADD UNIQUE KEY `username` (`username`),
ADD UNIQUE KEY `email` (`email`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `table_status`
--
ALTER TABLE `table_status`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `table_users`
--
ALTER TABLE `table_users`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
/*!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 */;
|
/*
Post-Deployment Script Template
--------------------------------------------------------------------------------------
This file contains SQL statements that will be appended to the build script.
Use SQLCMD syntax to include a file in the post-deployment script.
Example: :r .\myfile.sql
Use SQLCMD syntax to reference a variable in the post-deployment script.
Example: :setvar TableName MyTable
SELECT * FROM [$(TableName)]
--------------------------------------------------------------------------------------
*/
USE [master];
GO
ALTER AUTHORIZATION ON DATABASE::[$(DatabaseName)] TO [sa]
GO
ALTER DATABASE [$(DatabaseName)] SET TRUSTWORTHY ON
GO
ALTER DATABASE [$(DatabaseName)] SET RECURSIVE_TRIGGERS ON
GO
ALTER DATABASE [$(DatabaseName)] SET AUTO_UPDATE_STATISTICS OFF
GO
ALTER DATABASE [$(DatabaseName)] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
USE [$(DatabaseName)]
GO
ALTER DATABASE [$(DatabaseName)] SET COMPATIBILITY_LEVEL = 130
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
BEGIN
EXEC [$(DatabaseName)].[dbo].[sp_fulltext_database] @action = 'enable'
END
GO
SET DATEFORMAT ymd;
GO
/*
INSERT [dbo].[CFLicense] ([Id], [Title], [Description], [Text], [LastChangeDateTime]) VALUES (N'9ea30160-c7c1-445a-9344-d9d780ede411', N'MIT License', N'MIT License', N'Copyright <YEAR> <COPYRIGHT HOLDER> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.', CAST(N'2021-10-23T06:48:00.000' AS DateTime))
GO
INSERT [dbo].[CFItemType] ([Id], [Title], [Description], [HierarchyCode], [TypeCode], [LastChangeDateTime]) VALUES (N'38b8475b-f40e-57f9-b101-00cbe260cbf4', N'Grade/Course', N'Grade/Course', N'Grade/Course', N'Grade/Course', CAST(N'2018-03-26T11:53:03.000' AS DateTime))
INSERT [dbo].[CFItemType] ([Id], [Title], [Description], [HierarchyCode], [TypeCode], [LastChangeDateTime]) VALUES (N'd39b2c1e-907e-528a-b411-2cfdeb8c3c30', N'Introduction', N'Introduction', N'Introduction', N'Introduction', CAST(N'2017-09-27T02:53:54.000' AS DateTime))
INSERT [dbo].[CFItemType] ([Id], [Title], [Description], [HierarchyCode], [TypeCode], [LastChangeDateTime]) VALUES (N'43714e16-27f2-5a97-849d-40bd238dee56', N'Student Expectation', N'Student Expectation', N'Student Expectation', N'Student Expectation', CAST(N'2017-09-27T02:53:54.000' AS DateTime))
INSERT [dbo].[CFItemType] ([Id], [Title], [Description], [HierarchyCode], [TypeCode], [LastChangeDateTime]) VALUES (N'1ef3b052-baae-545d-92ca-703596be5e89', N'Domain', N'Domain', N'Domain', N'Domain', CAST(N'2017-12-14T06:25:11.000' AS DateTime))
INSERT [dbo].[CFItemType] ([Id], [Title], [Description], [HierarchyCode], [TypeCode], [LastChangeDateTime]) VALUES (N'9d0f55b2-42e4-54c3-abb8-7f1f811ca95a', N'', N'', N'', N'', CAST(N'2017-10-13T09:46:25.000' AS DateTime))
INSERT [dbo].[CFItemType] ([Id], [Title], [Description], [HierarchyCode], [TypeCode], [LastChangeDateTime]) VALUES (N'2544508c-27d8-517d-8600-aa022c54167a', N'Examples of Child Behaviors', N'Examples of Child Behaviors', N'Examples of Child Behaviors', N'Examples of Child Behaviors', CAST(N'2018-04-02T03:41:27.000' AS DateTime))
INSERT [dbo].[CFItemType] ([Id], [Title], [Description], [HierarchyCode], [TypeCode], [LastChangeDateTime]) VALUES (N'3b3bce77-0dbf-59e4-9d40-b06d31809299', N'Knowledge and Skills', N'Knowledge and Skills', N'Knowledge and Skills', N'Knowledge and Skills', CAST(N'2017-09-27T02:53:54.000' AS DateTime))
INSERT [dbo].[CFItemType] ([Id], [Title], [Description], [HierarchyCode], [TypeCode], [LastChangeDateTime]) VALUES (N'f4ea1eb1-198b-599b-956a-b9ea37f0a29c', N'Strand', N'Strand', N'Strand', N'Strand', CAST(N'2017-09-27T02:53:54.000' AS DateTime))
INSERT [dbo].[CFItemType] ([Id], [Title], [Description], [HierarchyCode], [TypeCode], [LastChangeDateTime]) VALUES (N'b15452ab-27f6-5b2f-a87d-cec9d2977903', N'General Requirements', N'General Requirements', N'General Requirements', N'General Requirements', CAST(N'2018-03-26T11:53:03.000' AS DateTime))
INSERT [dbo].[CFItemType] ([Id], [Title], [Description], [HierarchyCode], [TypeCode], [LastChangeDateTime]) VALUES (N'099248a3-14ed-5540-8171-d164b38be51c', N'Subchapter', N'Subchapter', N'Subchapter', N'Subchapter', CAST(N'2017-09-27T02:53:54.000' AS DateTime))
INSERT [dbo].[CFItemType] ([Id], [Title], [Description], [HierarchyCode], [TypeCode], [LastChangeDateTime]) VALUES (N'48b7c6ff-18e0-5937-9c7e-e0c0ffe6a576', N'Skills', N'Skills', N'Skills', N'Skills', CAST(N'2018-04-02T03:41:27.000' AS DateTime))
INSERT [dbo].[CFItemType] ([Id], [Title], [Description], [HierarchyCode], [TypeCode], [LastChangeDateTime]) VALUES (N'a76cabdb-dfba-5956-aceb-e9cb878e8af3', N'End of Prekindergarten Year Outcomes', N'End of Prekindergarten Year Outcomes', N'End of Prekindergarten Year Outcomes', N'End of Prekindergarten Year Outcomes', CAST(N'2018-04-02T03:41:27.000' AS DateTime))
INSERT [dbo].[CFItemType] ([Id], [Title], [Description], [HierarchyCode], [TypeCode], [LastChangeDateTime]) VALUES (N'703dbfc5-3a0a-5d2a-ab74-e9ceb4b66f8b', N'Implementation', N'Implementation', N'Implementation', N'Implementation', CAST(N'2018-03-26T11:53:03.000' AS DateTime))
GO
INSERT [dbo].[CFSubject] ([Id], [Title], [HierarchyCode], [Description], [LastChangeDateTime]) VALUES (N'2e740aec-481d-589f-8e2c-04a1830d0910', N'Fine Arts', N'Fine Arts', N'Fine Arts', CAST(N'2017-09-27T03:23:58.000' AS DateTime))
INSERT [dbo].[CFSubject] ([Id], [Title], [HierarchyCode], [Description], [LastChangeDateTime]) VALUES (N'bfe9fd53-58f0-5cdb-8dff-086281a7fd4c', N'Science', N'Science', N'Science', CAST(N'2017-09-27T03:22:42.000' AS DateTime))
INSERT [dbo].[CFSubject] ([Id], [Title], [HierarchyCode], [Description], [LastChangeDateTime]) VALUES (N'82723d53-f434-5922-982f-0d5b5f674e3a', N'Career Development', N'Career Development', N'Career Development', CAST(N'2017-09-27T03:25:12.000' AS DateTime))
INSERT [dbo].[CFSubject] ([Id], [Title], [HierarchyCode], [Description], [LastChangeDateTime]) VALUES (N'c2fcebee-e9af-590c-92de-101617269943', N'Economics with Emphasis on the Free Enterprise System and Its Benefits', N'Economics with Emphasis on the Free Enterprise System and Its Benefits', N'Economics with Emphasis on the Free Enterprise System and Its Benefits', CAST(N'2017-09-27T03:24:24.000' AS DateTime))
INSERT [dbo].[CFSubject] ([Id], [Title], [HierarchyCode], [Description], [LastChangeDateTime]) VALUES (N'34b471c7-c888-5d31-b814-3e46442035c5', N'Technology Applications', N'Technology Applications', N'Technology Applications', CAST(N'2017-09-27T03:24:43.000' AS DateTime))
INSERT [dbo].[CFSubject] ([Id], [Title], [HierarchyCode], [Description], [LastChangeDateTime]) VALUES (N'c1bdae11-ffad-510a-a5d6-5760286537dc', N'Elective Courses on the Bible', N'Elective Courses on the Bible', N'Elective Courses on the Bible', CAST(N'2019-08-22T07:08:32.000' AS DateTime))
INSERT [dbo].[CFSubject] ([Id], [Title], [HierarchyCode], [Description], [LastChangeDateTime]) VALUES (N'6662af52-08ab-5453-b063-6c17e2bed2a7', N'Mathematics', N'', N'Mathematics', CAST(N'2017-12-14T06:10:04.000' AS DateTime))
INSERT [dbo].[CFSubject] ([Id], [Title], [HierarchyCode], [Description], [LastChangeDateTime]) VALUES (N'7c7afb05-e175-5dda-be1c-6fd74f036d2e', N'Health Education', N'Health Education', N'Health Education', CAST(N'2017-09-27T03:23:25.000' AS DateTime))
INSERT [dbo].[CFSubject] ([Id], [Title], [HierarchyCode], [Description], [LastChangeDateTime]) VALUES (N'83556529-a4f5-5092-a85e-76afd819dab9', N'Languages Other Than English', N'Languages Other Than English', N'Languages Other Than English', CAST(N'2017-09-27T03:23:12.000' AS DateTime))
INSERT [dbo].[CFSubject] ([Id], [Title], [HierarchyCode], [Description], [LastChangeDateTime]) VALUES (N'2918d5eb-d81e-5513-b872-a317bb85603e', N'Spanish Language Arts and English as a Second Language', N'Spanish Language Arts and English as a Second Language', N'Spanish Language Arts and English as a Second Language', CAST(N'2017-09-27T03:25:35.000' AS DateTime))
INSERT [dbo].[CFSubject] ([Id], [Title], [HierarchyCode], [Description], [LastChangeDateTime]) VALUES (N'91c5269a-26f6-5d21-adaf-e0b820023516', N'Prekindergarten', N'Prekindergarten', N'Prekindergarten', CAST(N'2018-01-29T03:31:46.000' AS DateTime))
INSERT [dbo].[CFSubject] ([Id], [Title], [HierarchyCode], [Description], [LastChangeDateTime]) VALUES (N'79982571-d513-5eef-be18-ed850bd97b56', N'Social Studies', N'Social Studies', N'Social Studies', CAST(N'2017-09-27T03:22:53.000' AS DateTime))
INSERT [dbo].[CFSubject] ([Id], [Title], [HierarchyCode], [Description], [LastChangeDateTime]) VALUES (N'4bd04905-366f-5fbd-9426-f15dd18ccaa8', N'Mathematics', N'Mathematics', N'Mathematics', CAST(N'2017-09-27T03:22:31.000' AS DateTime))
INSERT [dbo].[CFSubject] ([Id], [Title], [HierarchyCode], [Description], [LastChangeDateTime]) VALUES (N'45a7d92c-6514-52fe-b548-f868ac0ecc0c', N'Chapter 113 Social Studies', N'Chapter 113 Social Studies', N'Chapter 113 Social Studies', CAST(N'2020-03-18T10:43:56.000' AS DateTime))
INSERT [dbo].[CFSubject] ([Id], [Title], [HierarchyCode], [Description], [LastChangeDateTime]) VALUES (N'6b7c0375-e3e5-5626-9969-fa05c09e3993', N'English Language Arts and Reading', N'English Language Arts and Reading', N'English Language Arts and Reading', CAST(N'2017-09-27T03:22:14.000' AS DateTime))
INSERT [dbo].[CFSubject] ([Id], [Title], [HierarchyCode], [Description], [LastChangeDateTime]) VALUES (N'9d67cf61-1b78-5ab2-b9f1-fde0be26aa95', N'Physical Education', N'Physical Education', N'Physical Education', CAST(N'2017-09-27T03:23:41.000' AS DateTime))
GO
EXEC [InsertCFDocument] N'11a9d541-3f03-552d-a03c-064e92f7325c', N'c2fcebee-e9af-590c-92de-101617269943', NULL, N'Texas Education Agency', N'http://ritter.tea.state.tx.us/rules/tac/chapter118', N'Chapter 118. Economics with Emphasis on the Free Enterprise System and Its Benefits', N'Texas Education Agency', N'Chapter 118. Economics with Emphasis on the Free Enterprise System and Its Benefits', N'1.1.2', N'deprecated', N'en', CAST(N'2010-08-22' AS Date), CAST(N'2019-08-19' AS Date), CAST(N'2019-08-20T06:05:25.000' AS DateTime), N'Version notes: Updated to v1.1.2 on 8/27/18 to include adopted/effective date details in "Notes" section for all Grade/Course items.')
GO
*/
|
drop index ACT_IDX_EXEC_BUSKEY;
drop index ACT_IDX_TASK_CREATE;
drop index ACT_IDX_TASK_ASSIGNEE;
drop index ACT_IDX_IDENT_LNK_USER;
drop index ACT_IDX_IDENT_LNK_GROUP;
drop index ACT_IDX_VARIABLE_TASK_ID;
drop index ACT_IDX_INC_CONFIGURATION;
drop index ACT_IDX_JOB_PROCINST;
drop index ACT_UNIQ_AUTH_USER;
drop index ACT_UNIQ_AUTH_GROUP;
drop index ACT_UNIQ_VARIABLE;
alter table ACT_GE_BYTEARRAY
drop foreign key ACT_FK_BYTEARR_DEPL;
alter table ACT_RU_EXECUTION
drop foreign key ACT_FK_EXE_PROCINST;
alter table ACT_RU_EXECUTION
drop foreign key ACT_FK_EXE_PARENT;
alter table ACT_RU_EXECUTION
drop foreign key ACT_FK_EXE_SUPER;
alter table ACT_RU_EXECUTION
drop foreign key ACT_FK_EXE_PROCDEF;
alter table ACT_RU_IDENTITYLINK
drop foreign key ACT_FK_TSKASS_TASK;
alter table ACT_RU_IDENTITYLINK
drop foreign key ACT_FK_ATHRZ_PROCEDEF;
alter table ACT_RU_TASK
drop foreign key ACT_FK_TASK_EXE;
alter table ACT_RU_TASK
drop foreign key ACT_FK_TASK_PROCINST;
alter table ACT_RU_TASK
drop foreign key ACT_FK_TASK_PROCDEF;
alter table ACT_RU_VARIABLE
drop foreign key ACT_FK_VAR_EXE;
alter table ACT_RU_VARIABLE
drop foreign key ACT_FK_VAR_PROCINST;
alter table ACT_RU_VARIABLE
drop foreign key ACT_FK_VAR_BYTEARRAY;
alter table ACT_RU_JOB
drop foreign key ACT_FK_JOB_EXCEPTION;
alter table ACT_RU_EVENT_SUBSCR
drop foreign key ACT_FK_EVENT_EXEC;
alter table ACT_RU_INCIDENT
drop foreign key ACT_FK_INC_EXE;
alter table ACT_RU_INCIDENT
drop foreign key ACT_FK_INC_PROCINST;
alter table ACT_RU_INCIDENT
drop foreign key ACT_FK_INC_PROCDEF;
alter table ACT_RU_INCIDENT
drop foreign key ACT_FK_INC_CAUSE;
alter table ACT_RU_INCIDENT
drop foreign key ACT_FK_INC_RCAUSE;
drop index ACT_IDX_EVENT_SUBSCR_CONFIG_;
drop index ACT_IDX_ATHRZ_PROCEDEF;
-- indexes for concurrency problems - https://app.camunda.com/jira/browse/CAM-1646 --
drop index ACT_IDX_EXECUTION_PROC;
drop index ACT_IDX_EXECUTION_PARENT;
drop index ACT_IDX_EXECUTION_SUPER;
drop index ACT_IDX_EXECUTION_PROCINST;
drop index ACT_IDX_EVENT_SUBSCR_EXEC;
drop index ACT_IDX_BA_DEPLOYMENT;
drop index ACT_IDX_IDENT_LNK_TASK;
drop index ACT_IDX_INCIDENT_EXEC;
drop index ACT_IDX_INCIDENT_PROCINST;
drop index ACT_IDX_INCIDENT_PROC_DEF_ID;
drop index ACT_IDX_INCIDENT_CAUSE;
drop index ACT_IDX_INCIDENT_ROOT_CAUSE;
drop index ACT_IDX_JOB_EXCEPTION_STACK;
drop index ACT_IDX_VARIABLE_BA;
drop index ACT_IDX_VARIABLE_EXEC;
drop index ACT_IDX_VARIABLE_PROCINST;
drop index ACT_IDX_TASK_EXEC;
drop index ACT_IDX_TASK_PROCINST;
drop index ACT_IDX_TASK_PROC_DEF_ID;
drop index ACT_IDX_METER_LOG;
drop index ACT_IDX_AUTH_RESOURCE_ID;
drop index ACT_IDX_BYTEARRAY_NAME;
drop index ACT_IDX_DEPLOYMENT_NAME;
drop index ACT_IDX_JOBDEF_PROC_DEF_ID;
drop index ACT_IDX_JOB_HANDLER_TYPE;
drop index ACT_IDX_EVENT_SUBSCR_EVT_NAME;
drop index ACT_IDX_PROCDEF_DEPLOYMENT_ID;
drop table ACT_GE_PROPERTY;
drop table ACT_GE_BYTEARRAY;
drop table ACT_RE_DEPLOYMENT;
drop table ACT_RE_PROCDEF;
drop table ACT_RU_VARIABLE;
drop table ACT_RU_IDENTITYLINK;
drop table ACT_RU_TASK;
drop table ACT_RU_EXECUTION;
drop table ACT_RU_JOB;
drop table ACT_RU_JOBDEF;
drop table ACT_RU_EVENT_SUBSCR;
drop table ACT_RU_INCIDENT;
drop table ACT_RU_AUTHORIZATION;
drop table ACT_RU_FILTER;
drop table ACT_RU_METER_LOG;
|
BEGIN;
ALTER TABLE IF EXISTS ONLY user_external_accounts DROP CONSTRAINT IF EXISTS user_external_accounts_user_id_fkey;
ALTER TABLE IF EXISTS ONLY user_emails DROP CONSTRAINT IF EXISTS user_emails_user_id_fkey;
ALTER TABLE IF EXISTS ONLY survey_responses DROP CONSTRAINT IF EXISTS survey_responses_user_id_fkey;
ALTER TABLE IF EXISTS ONLY settings DROP CONSTRAINT IF EXISTS settings_user_id_fkey;
ALTER TABLE IF EXISTS ONLY settings DROP CONSTRAINT IF EXISTS settings_references_orgs;
ALTER TABLE IF EXISTS ONLY settings DROP CONSTRAINT IF EXISTS settings_author_user_id_fkey;
ALTER TABLE IF EXISTS ONLY saved_searches DROP CONSTRAINT IF EXISTS saved_searches_user_id_fkey;
ALTER TABLE IF EXISTS ONLY saved_searches DROP CONSTRAINT IF EXISTS saved_searches_org_id_fkey;
ALTER TABLE IF EXISTS ONLY registry_extensions DROP CONSTRAINT IF EXISTS registry_extensions_publisher_user_id_fkey;
ALTER TABLE IF EXISTS ONLY registry_extensions DROP CONSTRAINT IF EXISTS registry_extensions_publisher_org_id_fkey;
ALTER TABLE IF EXISTS ONLY registry_extension_releases DROP CONSTRAINT IF EXISTS registry_extension_releases_registry_extension_id_fkey;
ALTER TABLE IF EXISTS ONLY registry_extension_releases DROP CONSTRAINT IF EXISTS registry_extension_releases_creator_user_id_fkey;
ALTER TABLE IF EXISTS ONLY product_subscriptions DROP CONSTRAINT IF EXISTS product_subscriptions_user_id_fkey;
ALTER TABLE IF EXISTS ONLY product_licenses DROP CONSTRAINT IF EXISTS product_licenses_product_subscription_id_fkey;
ALTER TABLE IF EXISTS ONLY org_members DROP CONSTRAINT IF EXISTS org_members_user_id_fkey;
ALTER TABLE IF EXISTS ONLY org_members DROP CONSTRAINT IF EXISTS org_members_references_orgs;
ALTER TABLE IF EXISTS ONLY org_invitations DROP CONSTRAINT IF EXISTS org_invitations_sender_user_id_fkey;
ALTER TABLE IF EXISTS ONLY org_invitations DROP CONSTRAINT IF EXISTS org_invitations_recipient_user_id_fkey;
ALTER TABLE IF EXISTS ONLY org_invitations DROP CONSTRAINT IF EXISTS org_invitations_org_id_fkey;
ALTER TABLE IF EXISTS ONLY names DROP CONSTRAINT IF EXISTS names_user_id_fkey;
ALTER TABLE IF EXISTS ONLY names DROP CONSTRAINT IF EXISTS names_org_id_fkey;
ALTER TABLE IF EXISTS ONLY discussion_threads_target_repo DROP CONSTRAINT IF EXISTS discussion_threads_target_repo_thread_id_fkey;
ALTER TABLE IF EXISTS ONLY discussion_threads_target_repo DROP CONSTRAINT IF EXISTS discussion_threads_target_repo_repo_id_fkey;
ALTER TABLE IF EXISTS ONLY discussion_threads DROP CONSTRAINT IF EXISTS discussion_threads_target_repo_id_fk;
ALTER TABLE IF EXISTS ONLY discussion_threads DROP CONSTRAINT IF EXISTS discussion_threads_author_user_id_fkey;
ALTER TABLE IF EXISTS ONLY discussion_mail_reply_tokens DROP CONSTRAINT IF EXISTS discussion_mail_reply_tokens_user_id_fkey;
ALTER TABLE IF EXISTS ONLY discussion_mail_reply_tokens DROP CONSTRAINT IF EXISTS discussion_mail_reply_tokens_thread_id_fkey;
ALTER TABLE IF EXISTS ONLY discussion_comments DROP CONSTRAINT IF EXISTS discussion_comments_thread_id_fkey;
ALTER TABLE IF EXISTS ONLY discussion_comments DROP CONSTRAINT IF EXISTS discussion_comments_author_user_id_fkey;
ALTER TABLE IF EXISTS ONLY default_repos DROP CONSTRAINT IF EXISTS default_repos_repo_id_fkey;
ALTER TABLE IF EXISTS ONLY access_tokens DROP CONSTRAINT IF EXISTS access_tokens_subject_user_id_fkey;
ALTER TABLE IF EXISTS ONLY access_tokens DROP CONSTRAINT IF EXISTS access_tokens_creator_user_id_fkey;
DROP INDEX IF EXISTS users_username;
DROP INDEX IF EXISTS users_billing_customer_id;
DROP INDEX IF EXISTS user_external_accounts_account;
DROP INDEX IF EXISTS saved_queries_query_unique;
DROP INDEX IF EXISTS repo_uri_idx;
DROP INDEX IF EXISTS repo_sources_gin_idx;
DROP INDEX IF EXISTS repo_name_trgm;
DROP INDEX IF EXISTS repo_metadata_gin_idx;
DROP INDEX IF EXISTS repo_external_service_unique_idx;
DROP INDEX IF EXISTS registry_extensions_uuid;
DROP INDEX IF EXISTS registry_extensions_publisher_name;
DROP INDEX IF EXISTS registry_extension_releases_version;
DROP INDEX IF EXISTS registry_extension_releases_registry_extension_id;
DROP INDEX IF EXISTS orgs_name;
DROP INDEX IF EXISTS org_invitations_singleflight;
DROP INDEX IF EXISTS org_invitations_recipient_user_id;
DROP INDEX IF EXISTS org_invitations_org_id;
DROP INDEX IF EXISTS discussion_threads_target_repo_repo_id_path_idx;
DROP INDEX IF EXISTS discussion_threads_id_idx;
DROP INDEX IF EXISTS discussion_threads_author_user_id_idx;
DROP INDEX IF EXISTS discussion_mail_reply_tokens_user_id_thread_id_idx;
DROP INDEX IF EXISTS discussion_mail_reply_tokens_token_idx;
DROP INDEX IF EXISTS discussion_comments_thread_id_idx;
DROP INDEX IF EXISTS discussion_comments_reports_array_length_idx;
DROP INDEX IF EXISTS discussion_comments_author_user_id_idx;
DROP INDEX IF EXISTS critical_and_site_config_unique;
DROP INDEX IF EXISTS access_tokens_lookup;
ALTER TABLE IF EXISTS ONLY users DROP CONSTRAINT IF EXISTS users_pkey;
ALTER TABLE IF EXISTS ONLY user_permissions DROP CONSTRAINT IF EXISTS user_permissions_perm_object_unique;
ALTER TABLE IF EXISTS ONLY user_external_accounts DROP CONSTRAINT IF EXISTS user_external_accounts_pkey;
ALTER TABLE IF EXISTS ONLY user_emails DROP CONSTRAINT IF EXISTS user_emails_unique_verified_email;
ALTER TABLE IF EXISTS ONLY user_emails DROP CONSTRAINT IF EXISTS user_emails_no_duplicates_per_user;
ALTER TABLE IF EXISTS ONLY survey_responses DROP CONSTRAINT IF EXISTS survey_responses_pkey;
ALTER TABLE IF EXISTS ONLY settings DROP CONSTRAINT IF EXISTS settings_pkey;
ALTER TABLE IF EXISTS ONLY schema_migrations DROP CONSTRAINT IF EXISTS schema_migrations_pkey;
ALTER TABLE IF EXISTS ONLY saved_searches DROP CONSTRAINT IF EXISTS saved_searches_pkey;
ALTER TABLE IF EXISTS ONLY repo DROP CONSTRAINT IF EXISTS repo_pkey;
ALTER TABLE IF EXISTS ONLY repo DROP CONSTRAINT IF EXISTS repo_name_unique;
ALTER TABLE IF EXISTS ONLY registry_extensions DROP CONSTRAINT IF EXISTS registry_extensions_pkey;
ALTER TABLE IF EXISTS ONLY registry_extension_releases DROP CONSTRAINT IF EXISTS registry_extension_releases_pkey;
ALTER TABLE IF EXISTS ONLY recent_searches DROP CONSTRAINT IF EXISTS recent_searches_pkey;
ALTER TABLE IF EXISTS ONLY product_subscriptions DROP CONSTRAINT IF EXISTS product_subscriptions_pkey;
ALTER TABLE IF EXISTS ONLY product_licenses DROP CONSTRAINT IF EXISTS product_licenses_pkey;
ALTER TABLE IF EXISTS ONLY phabricator_repos DROP CONSTRAINT IF EXISTS phabricator_repos_repo_name_key;
ALTER TABLE IF EXISTS ONLY phabricator_repos DROP CONSTRAINT IF EXISTS phabricator_repos_pkey;
ALTER TABLE IF EXISTS ONLY orgs DROP CONSTRAINT IF EXISTS orgs_pkey;
ALTER TABLE IF EXISTS ONLY org_members DROP CONSTRAINT IF EXISTS org_members_pkey;
ALTER TABLE IF EXISTS ONLY org_members DROP CONSTRAINT IF EXISTS org_members_org_id_user_id_key;
ALTER TABLE IF EXISTS ONLY org_invitations DROP CONSTRAINT IF EXISTS org_invitations_pkey;
ALTER TABLE IF EXISTS ONLY names DROP CONSTRAINT IF EXISTS names_pkey;
ALTER TABLE IF EXISTS ONLY global_state DROP CONSTRAINT IF EXISTS global_state_pkey;
ALTER TABLE IF EXISTS ONLY external_services DROP CONSTRAINT IF EXISTS external_services_pkey;
ALTER TABLE IF EXISTS ONLY discussion_threads_target_repo DROP CONSTRAINT IF EXISTS discussion_threads_target_repo_pkey;
ALTER TABLE IF EXISTS ONLY discussion_threads DROP CONSTRAINT IF EXISTS discussion_threads_pkey;
ALTER TABLE IF EXISTS ONLY discussion_mail_reply_tokens DROP CONSTRAINT IF EXISTS discussion_mail_reply_tokens_pkey;
ALTER TABLE IF EXISTS ONLY discussion_comments DROP CONSTRAINT IF EXISTS discussion_comments_pkey;
ALTER TABLE IF EXISTS ONLY critical_and_site_config DROP CONSTRAINT IF EXISTS critical_and_site_config_pkey;
ALTER TABLE IF EXISTS ONLY access_tokens DROP CONSTRAINT IF EXISTS access_tokens_value_sha256_key;
ALTER TABLE IF EXISTS ONLY access_tokens DROP CONSTRAINT IF EXISTS access_tokens_pkey;
ALTER TABLE IF EXISTS users ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS user_external_accounts ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS survey_responses ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS settings ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS saved_searches ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS repo ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS registry_extensions ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS registry_extension_releases ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS recent_searches ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS phabricator_repos ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS orgs ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS org_members ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS org_invitations ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS external_services ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS discussion_threads_target_repo ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS discussion_threads ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS discussion_comments ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS critical_and_site_config ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS access_tokens ALTER COLUMN id DROP DEFAULT;
DROP SEQUENCE IF EXISTS users_id_seq;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS user_permissions;
DROP SEQUENCE IF EXISTS user_external_accounts_id_seq;
DROP TABLE IF EXISTS user_external_accounts;
DROP TABLE IF EXISTS user_emails;
DROP SEQUENCE IF EXISTS survey_responses_id_seq;
DROP TABLE IF EXISTS survey_responses;
DROP VIEW IF EXISTS site_config;
DROP SEQUENCE IF EXISTS settings_id_seq;
DROP TABLE IF EXISTS settings_bkup_1514702776;
DROP TABLE IF EXISTS settings;
DROP TABLE IF EXISTS schema_migrations;
DROP SEQUENCE IF EXISTS saved_searches_id_seq;
DROP TABLE IF EXISTS saved_searches;
DROP TABLE IF EXISTS saved_queries;
DROP SEQUENCE IF EXISTS repo_id_seq;
DROP TABLE IF EXISTS repo;
DROP SEQUENCE IF EXISTS registry_extensions_id_seq;
DROP TABLE IF EXISTS registry_extensions;
DROP SEQUENCE IF EXISTS registry_extension_releases_id_seq;
DROP TABLE IF EXISTS registry_extension_releases;
DROP SEQUENCE IF EXISTS recent_searches_id_seq;
DROP TABLE IF EXISTS recent_searches;
DROP TABLE IF EXISTS query_runner_state;
DROP TABLE IF EXISTS product_subscriptions;
DROP TABLE IF EXISTS product_licenses;
DROP SEQUENCE IF EXISTS phabricator_repos_id_seq;
DROP TABLE IF EXISTS phabricator_repos;
DROP SEQUENCE IF EXISTS orgs_id_seq;
DROP TABLE IF EXISTS orgs;
DROP SEQUENCE IF EXISTS org_members_id_seq;
DROP TABLE IF EXISTS org_members_bkup_1514536731;
DROP TABLE IF EXISTS org_members;
DROP SEQUENCE IF EXISTS org_invitations_id_seq;
DROP TABLE IF EXISTS org_invitations;
DROP TABLE IF EXISTS names;
DROP TABLE IF EXISTS global_state;
DROP SEQUENCE IF EXISTS external_services_id_seq;
DROP TABLE IF EXISTS external_services;
DROP SEQUENCE IF EXISTS discussion_threads_target_repo_id_seq;
DROP TABLE IF EXISTS discussion_threads_target_repo;
DROP SEQUENCE IF EXISTS discussion_threads_id_seq;
DROP TABLE IF EXISTS discussion_threads;
DROP TABLE IF EXISTS discussion_mail_reply_tokens;
DROP SEQUENCE IF EXISTS discussion_comments_id_seq;
DROP TABLE IF EXISTS discussion_comments;
DROP TABLE IF EXISTS default_repos;
DROP SEQUENCE IF EXISTS critical_and_site_config_id_seq;
DROP TABLE IF EXISTS critical_and_site_config;
DROP SEQUENCE IF EXISTS access_tokens_id_seq;
DROP TABLE IF EXISTS access_tokens;
DROP TYPE IF EXISTS critical_or_site;
CREATE EXTENSION IF NOT EXISTS citext;
CREATE EXTENSION IF NOT EXISTS hstore;
CREATE EXTENSION IF NOT EXISTS pg_trgm;
CREATE TYPE critical_or_site AS ENUM (
'critical',
'site'
);
CREATE TABLE access_tokens (
id bigint NOT NULL,
subject_user_id integer NOT NULL,
value_sha256 bytea NOT NULL,
note text NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL,
last_used_at timestamp with time zone,
deleted_at timestamp with time zone,
creator_user_id integer NOT NULL,
scopes text[] NOT NULL
);
CREATE SEQUENCE access_tokens_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE access_tokens_id_seq OWNED BY access_tokens.id;
CREATE TABLE critical_and_site_config (
id integer NOT NULL,
type critical_or_site NOT NULL,
contents text NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL,
updated_at timestamp with time zone DEFAULT now() NOT NULL
);
CREATE SEQUENCE critical_and_site_config_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE critical_and_site_config_id_seq OWNED BY critical_and_site_config.id;
CREATE TABLE default_repos (
repo_id integer
);
CREATE TABLE discussion_comments (
id bigint NOT NULL,
thread_id bigint NOT NULL,
author_user_id integer NOT NULL,
contents text NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL,
updated_at timestamp with time zone DEFAULT now() NOT NULL,
deleted_at timestamp with time zone,
reports text[] DEFAULT '{}'::text[] NOT NULL
);
CREATE SEQUENCE discussion_comments_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE discussion_comments_id_seq OWNED BY discussion_comments.id;
CREATE TABLE discussion_mail_reply_tokens (
token text NOT NULL,
user_id integer NOT NULL,
thread_id bigint NOT NULL,
deleted_at timestamp with time zone
);
CREATE TABLE discussion_threads (
id bigint NOT NULL,
author_user_id integer NOT NULL,
title text,
target_repo_id bigint,
created_at timestamp with time zone DEFAULT now() NOT NULL,
archived_at timestamp with time zone,
updated_at timestamp with time zone DEFAULT now() NOT NULL,
deleted_at timestamp with time zone
);
CREATE SEQUENCE discussion_threads_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE discussion_threads_id_seq OWNED BY discussion_threads.id;
CREATE TABLE discussion_threads_target_repo (
id bigint NOT NULL,
thread_id bigint NOT NULL,
repo_id integer NOT NULL,
path text,
branch text,
revision text,
start_line integer,
end_line integer,
start_character integer,
end_character integer,
lines_before text,
lines text,
lines_after text
);
CREATE SEQUENCE discussion_threads_target_repo_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE discussion_threads_target_repo_id_seq OWNED BY discussion_threads_target_repo.id;
CREATE TABLE external_services (
id bigint NOT NULL,
kind text NOT NULL,
display_name text NOT NULL,
config text NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL,
updated_at timestamp with time zone DEFAULT now() NOT NULL,
deleted_at timestamp with time zone,
CONSTRAINT check_non_empty_config CHECK ((btrim(config) <> ''::text))
);
CREATE SEQUENCE external_services_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE external_services_id_seq OWNED BY external_services.id;
CREATE TABLE global_state (
site_id uuid NOT NULL,
initialized boolean DEFAULT false NOT NULL,
mgmt_password_plaintext text DEFAULT ''::text NOT NULL,
mgmt_password_bcrypt text DEFAULT ''::text NOT NULL
);
CREATE TABLE names (
name citext NOT NULL,
user_id integer,
org_id integer,
CONSTRAINT names_check CHECK (((user_id IS NOT NULL) OR (org_id IS NOT NULL)))
);
CREATE TABLE org_invitations (
id bigint NOT NULL,
org_id integer NOT NULL,
sender_user_id integer NOT NULL,
recipient_user_id integer NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL,
notified_at timestamp with time zone,
responded_at timestamp with time zone,
response_type boolean,
revoked_at timestamp with time zone,
deleted_at timestamp with time zone,
CONSTRAINT check_atomic_response CHECK (((responded_at IS NULL) = (response_type IS NULL))),
CONSTRAINT check_single_use CHECK ((((responded_at IS NULL) AND (response_type IS NULL)) OR (revoked_at IS NULL)))
);
CREATE SEQUENCE org_invitations_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE org_invitations_id_seq OWNED BY org_invitations.id;
CREATE TABLE org_members (
id integer NOT NULL,
org_id integer NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL,
updated_at timestamp with time zone DEFAULT now() NOT NULL,
user_id integer NOT NULL
);
CREATE TABLE org_members_bkup_1514536731 (
id integer,
org_id integer,
user_id_old text,
created_at timestamp with time zone,
updated_at timestamp with time zone,
user_id integer
);
CREATE SEQUENCE org_members_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE org_members_id_seq OWNED BY org_members.id;
CREATE TABLE orgs (
id integer NOT NULL,
name citext NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL,
updated_at timestamp with time zone DEFAULT now() NOT NULL,
display_name text,
slack_webhook_url text,
deleted_at timestamp with time zone,
CONSTRAINT orgs_display_name_max_length CHECK ((char_length(display_name) <= 255)),
CONSTRAINT orgs_name_max_length CHECK ((char_length((name)::text) <= 255)),
CONSTRAINT orgs_name_valid_chars CHECK ((name OPERATOR(~) '^[a-zA-Z0-9](?:[a-zA-Z0-9]|[-.](?=[a-zA-Z0-9]))*$'::citext))
);
CREATE SEQUENCE orgs_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE orgs_id_seq OWNED BY orgs.id;
CREATE TABLE phabricator_repos (
id integer NOT NULL,
callsign citext NOT NULL,
repo_name citext NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL,
updated_at timestamp with time zone DEFAULT now() NOT NULL,
deleted_at timestamp with time zone,
url text DEFAULT ''::text NOT NULL
);
CREATE SEQUENCE phabricator_repos_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE phabricator_repos_id_seq OWNED BY phabricator_repos.id;
CREATE TABLE product_licenses (
id uuid NOT NULL,
product_subscription_id uuid NOT NULL,
license_key text NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL
);
CREATE TABLE product_subscriptions (
id uuid NOT NULL,
user_id integer NOT NULL,
billing_subscription_id text,
created_at timestamp with time zone DEFAULT now() NOT NULL,
updated_at timestamp with time zone DEFAULT now() NOT NULL,
archived_at timestamp with time zone
);
CREATE TABLE query_runner_state (
query text,
last_executed timestamp with time zone,
latest_result timestamp with time zone,
exec_duration_ns bigint
);
CREATE TABLE recent_searches (
id integer NOT NULL,
query text NOT NULL,
created_at timestamp without time zone DEFAULT now() NOT NULL
);
CREATE SEQUENCE recent_searches_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE recent_searches_id_seq OWNED BY recent_searches.id;
CREATE TABLE registry_extension_releases (
id bigint NOT NULL,
registry_extension_id integer NOT NULL,
creator_user_id integer NOT NULL,
release_version citext,
release_tag citext NOT NULL,
manifest jsonb NOT NULL,
bundle text,
created_at timestamp with time zone DEFAULT now() NOT NULL,
deleted_at timestamp with time zone,
source_map text
);
CREATE SEQUENCE registry_extension_releases_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE registry_extension_releases_id_seq OWNED BY registry_extension_releases.id;
CREATE TABLE registry_extensions (
id integer NOT NULL,
uuid uuid NOT NULL,
publisher_user_id integer,
publisher_org_id integer,
name citext NOT NULL,
manifest text,
created_at timestamp with time zone DEFAULT now() NOT NULL,
updated_at timestamp with time zone DEFAULT now() NOT NULL,
deleted_at timestamp with time zone,
CONSTRAINT registry_extensions_name_length CHECK (((char_length((name)::text) > 0) AND (char_length((name)::text) <= 128))),
CONSTRAINT registry_extensions_name_valid_chars CHECK ((name OPERATOR(~) '^[a-zA-Z0-9](?:[a-zA-Z0-9]|[_.-](?=[a-zA-Z0-9]))*$'::citext)),
CONSTRAINT registry_extensions_single_publisher CHECK (((publisher_user_id IS NULL) <> (publisher_org_id IS NULL)))
);
CREATE SEQUENCE registry_extensions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE registry_extensions_id_seq OWNED BY registry_extensions.id;
CREATE TABLE repo (
id integer NOT NULL,
name citext NOT NULL,
description text,
language text,
fork boolean,
created_at timestamp with time zone DEFAULT now() NOT NULL,
updated_at timestamp with time zone,
external_id text,
external_service_type text,
external_service_id text,
enabled boolean DEFAULT true NOT NULL,
archived boolean DEFAULT false NOT NULL,
uri citext,
deleted_at timestamp with time zone,
sources jsonb DEFAULT '{}'::jsonb NOT NULL,
metadata jsonb DEFAULT '{}'::jsonb NOT NULL,
CONSTRAINT check_name_nonempty CHECK ((name OPERATOR(<>) ''::citext)),
CONSTRAINT deleted_at_unused CHECK ((deleted_at IS NULL)),
CONSTRAINT repo_metadata_check CHECK ((jsonb_typeof(metadata) = 'object'::text)),
CONSTRAINT repo_sources_check CHECK ((jsonb_typeof(sources) = 'object'::text))
);
CREATE SEQUENCE repo_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE repo_id_seq OWNED BY repo.id;
CREATE TABLE saved_queries (
query text NOT NULL,
last_executed timestamp with time zone NOT NULL,
latest_result timestamp with time zone NOT NULL,
exec_duration_ns bigint NOT NULL
);
CREATE TABLE saved_searches (
id integer NOT NULL,
description text NOT NULL,
query text NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL,
updated_at timestamp with time zone DEFAULT now() NOT NULL,
notify_owner boolean NOT NULL,
notify_slack boolean NOT NULL,
user_id integer,
org_id integer,
slack_webhook_url text,
CONSTRAINT user_or_org_id_not_null CHECK ((((user_id IS NOT NULL) AND (org_id IS NULL)) OR ((org_id IS NOT NULL) AND (user_id IS NULL))))
);
CREATE SEQUENCE saved_searches_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE saved_searches_id_seq OWNED BY saved_searches.id;
CREATE TABLE schema_migrations (
version bigint NOT NULL,
dirty boolean NOT NULL
);
CREATE TABLE settings (
id integer NOT NULL,
org_id integer,
contents text,
created_at timestamp with time zone DEFAULT now() NOT NULL,
user_id integer,
author_user_id integer
);
CREATE TABLE settings_bkup_1514702776 (
id integer,
org_id integer,
author_user_id_old text,
contents text,
created_at timestamp with time zone,
user_id integer,
author_user_id integer
);
CREATE SEQUENCE settings_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE settings_id_seq OWNED BY settings.id;
CREATE VIEW site_config AS
SELECT global_state.site_id,
global_state.initialized
FROM global_state;
CREATE TABLE survey_responses (
id bigint NOT NULL,
user_id integer,
email text,
score integer NOT NULL,
reason text,
better text,
created_at timestamp with time zone DEFAULT now() NOT NULL
);
CREATE SEQUENCE survey_responses_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE survey_responses_id_seq OWNED BY survey_responses.id;
CREATE TABLE user_emails (
user_id integer NOT NULL,
email citext NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL,
verification_code text,
verified_at timestamp with time zone
);
CREATE TABLE user_external_accounts (
id integer NOT NULL,
user_id integer NOT NULL,
service_type text NOT NULL,
service_id text NOT NULL,
account_id text NOT NULL,
auth_data jsonb,
account_data jsonb,
created_at timestamp with time zone DEFAULT now() NOT NULL,
updated_at timestamp with time zone DEFAULT now() NOT NULL,
deleted_at timestamp with time zone,
client_id text NOT NULL
);
CREATE SEQUENCE user_external_accounts_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE user_external_accounts_id_seq OWNED BY user_external_accounts.id;
CREATE TABLE user_permissions (
user_id integer NOT NULL,
permission text NOT NULL,
object_type text NOT NULL,
object_ids bytea NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE TABLE users (
id integer NOT NULL,
username citext NOT NULL,
display_name text,
avatar_url text,
created_at timestamp with time zone DEFAULT now() NOT NULL,
updated_at timestamp with time zone DEFAULT now() NOT NULL,
deleted_at timestamp with time zone,
invite_quota integer DEFAULT 15 NOT NULL,
passwd text,
passwd_reset_code text,
passwd_reset_time timestamp with time zone,
site_admin boolean DEFAULT false NOT NULL,
page_views integer DEFAULT 0 NOT NULL,
search_queries integer DEFAULT 0 NOT NULL,
tags text[] DEFAULT '{}'::text[],
billing_customer_id text,
CONSTRAINT users_display_name_max_length CHECK ((char_length(display_name) <= 255)),
CONSTRAINT users_username_max_length CHECK ((char_length((username)::text) <= 255)),
CONSTRAINT users_username_valid_chars CHECK ((username OPERATOR(~) '^[a-zA-Z0-9](?:[a-zA-Z0-9]|[-.](?=[a-zA-Z0-9]))*$'::citext))
);
CREATE SEQUENCE users_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE users_id_seq OWNED BY users.id;
ALTER TABLE ONLY access_tokens ALTER COLUMN id SET DEFAULT nextval('access_tokens_id_seq'::regclass);
ALTER TABLE ONLY critical_and_site_config ALTER COLUMN id SET DEFAULT nextval('critical_and_site_config_id_seq'::regclass);
ALTER TABLE ONLY discussion_comments ALTER COLUMN id SET DEFAULT nextval('discussion_comments_id_seq'::regclass);
ALTER TABLE ONLY discussion_threads ALTER COLUMN id SET DEFAULT nextval('discussion_threads_id_seq'::regclass);
ALTER TABLE ONLY discussion_threads_target_repo ALTER COLUMN id SET DEFAULT nextval('discussion_threads_target_repo_id_seq'::regclass);
ALTER TABLE ONLY external_services ALTER COLUMN id SET DEFAULT nextval('external_services_id_seq'::regclass);
ALTER TABLE ONLY org_invitations ALTER COLUMN id SET DEFAULT nextval('org_invitations_id_seq'::regclass);
ALTER TABLE ONLY org_members ALTER COLUMN id SET DEFAULT nextval('org_members_id_seq'::regclass);
ALTER TABLE ONLY orgs ALTER COLUMN id SET DEFAULT nextval('orgs_id_seq'::regclass);
ALTER TABLE ONLY phabricator_repos ALTER COLUMN id SET DEFAULT nextval('phabricator_repos_id_seq'::regclass);
ALTER TABLE ONLY recent_searches ALTER COLUMN id SET DEFAULT nextval('recent_searches_id_seq'::regclass);
ALTER TABLE ONLY registry_extension_releases ALTER COLUMN id SET DEFAULT nextval('registry_extension_releases_id_seq'::regclass);
ALTER TABLE ONLY registry_extensions ALTER COLUMN id SET DEFAULT nextval('registry_extensions_id_seq'::regclass);
ALTER TABLE ONLY repo ALTER COLUMN id SET DEFAULT nextval('repo_id_seq'::regclass);
ALTER TABLE ONLY saved_searches ALTER COLUMN id SET DEFAULT nextval('saved_searches_id_seq'::regclass);
ALTER TABLE ONLY settings ALTER COLUMN id SET DEFAULT nextval('settings_id_seq'::regclass);
ALTER TABLE ONLY survey_responses ALTER COLUMN id SET DEFAULT nextval('survey_responses_id_seq'::regclass);
ALTER TABLE ONLY user_external_accounts ALTER COLUMN id SET DEFAULT nextval('user_external_accounts_id_seq'::regclass);
ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
ALTER TABLE ONLY access_tokens
ADD CONSTRAINT access_tokens_pkey PRIMARY KEY (id);
ALTER TABLE ONLY access_tokens
ADD CONSTRAINT access_tokens_value_sha256_key UNIQUE (value_sha256);
ALTER TABLE ONLY critical_and_site_config
ADD CONSTRAINT critical_and_site_config_pkey PRIMARY KEY (id);
ALTER TABLE ONLY discussion_comments
ADD CONSTRAINT discussion_comments_pkey PRIMARY KEY (id);
ALTER TABLE ONLY discussion_mail_reply_tokens
ADD CONSTRAINT discussion_mail_reply_tokens_pkey PRIMARY KEY (token);
ALTER TABLE ONLY discussion_threads
ADD CONSTRAINT discussion_threads_pkey PRIMARY KEY (id);
ALTER TABLE ONLY discussion_threads_target_repo
ADD CONSTRAINT discussion_threads_target_repo_pkey PRIMARY KEY (id);
ALTER TABLE ONLY external_services
ADD CONSTRAINT external_services_pkey PRIMARY KEY (id);
ALTER TABLE ONLY global_state
ADD CONSTRAINT global_state_pkey PRIMARY KEY (site_id);
ALTER TABLE ONLY names
ADD CONSTRAINT names_pkey PRIMARY KEY (name);
ALTER TABLE ONLY org_invitations
ADD CONSTRAINT org_invitations_pkey PRIMARY KEY (id);
ALTER TABLE ONLY org_members
ADD CONSTRAINT org_members_org_id_user_id_key UNIQUE (org_id, user_id);
ALTER TABLE ONLY org_members
ADD CONSTRAINT org_members_pkey PRIMARY KEY (id);
ALTER TABLE ONLY orgs
ADD CONSTRAINT orgs_pkey PRIMARY KEY (id);
ALTER TABLE ONLY phabricator_repos
ADD CONSTRAINT phabricator_repos_pkey PRIMARY KEY (id);
ALTER TABLE ONLY phabricator_repos
ADD CONSTRAINT phabricator_repos_repo_name_key UNIQUE (repo_name);
ALTER TABLE ONLY product_licenses
ADD CONSTRAINT product_licenses_pkey PRIMARY KEY (id);
ALTER TABLE ONLY product_subscriptions
ADD CONSTRAINT product_subscriptions_pkey PRIMARY KEY (id);
ALTER TABLE ONLY recent_searches
ADD CONSTRAINT recent_searches_pkey PRIMARY KEY (id);
ALTER TABLE ONLY registry_extension_releases
ADD CONSTRAINT registry_extension_releases_pkey PRIMARY KEY (id);
ALTER TABLE ONLY registry_extensions
ADD CONSTRAINT registry_extensions_pkey PRIMARY KEY (id);
ALTER TABLE ONLY repo
ADD CONSTRAINT repo_name_unique UNIQUE (name) DEFERRABLE;
ALTER TABLE ONLY repo
ADD CONSTRAINT repo_pkey PRIMARY KEY (id);
ALTER TABLE ONLY saved_searches
ADD CONSTRAINT saved_searches_pkey PRIMARY KEY (id);
ALTER TABLE ONLY schema_migrations
ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
ALTER TABLE ONLY settings
ADD CONSTRAINT settings_pkey PRIMARY KEY (id);
ALTER TABLE ONLY survey_responses
ADD CONSTRAINT survey_responses_pkey PRIMARY KEY (id);
ALTER TABLE ONLY user_emails
ADD CONSTRAINT user_emails_no_duplicates_per_user UNIQUE (user_id, email);
ALTER TABLE ONLY user_emails
ADD CONSTRAINT user_emails_unique_verified_email EXCLUDE USING btree (email WITH OPERATOR(=)) WHERE ((verified_at IS NOT NULL));
ALTER TABLE ONLY user_external_accounts
ADD CONSTRAINT user_external_accounts_pkey PRIMARY KEY (id);
ALTER TABLE ONLY user_permissions
ADD CONSTRAINT user_permissions_perm_object_unique UNIQUE (user_id, permission, object_type);
ALTER TABLE ONLY users
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
CREATE INDEX access_tokens_lookup ON access_tokens USING hash (value_sha256) WHERE (deleted_at IS NULL);
CREATE UNIQUE INDEX critical_and_site_config_unique ON critical_and_site_config USING btree (id, type);
CREATE INDEX discussion_comments_author_user_id_idx ON discussion_comments USING btree (author_user_id);
CREATE INDEX discussion_comments_reports_array_length_idx ON discussion_comments USING btree (array_length(reports, 1));
CREATE INDEX discussion_comments_thread_id_idx ON discussion_comments USING btree (thread_id);
CREATE INDEX discussion_mail_reply_tokens_token_idx ON discussion_mail_reply_tokens USING btree (token);
CREATE INDEX discussion_mail_reply_tokens_user_id_thread_id_idx ON discussion_mail_reply_tokens USING btree (user_id, thread_id);
CREATE INDEX discussion_threads_author_user_id_idx ON discussion_threads USING btree (author_user_id);
CREATE INDEX discussion_threads_id_idx ON discussion_threads USING btree (id);
CREATE INDEX discussion_threads_target_repo_repo_id_path_idx ON discussion_threads_target_repo USING btree (repo_id, path);
CREATE INDEX org_invitations_org_id ON org_invitations USING btree (org_id) WHERE (deleted_at IS NULL);
CREATE INDEX org_invitations_recipient_user_id ON org_invitations USING btree (recipient_user_id) WHERE (deleted_at IS NULL);
CREATE UNIQUE INDEX org_invitations_singleflight ON org_invitations USING btree (org_id, recipient_user_id) WHERE ((responded_at IS NULL) AND (revoked_at IS NULL) AND (deleted_at IS NULL));
CREATE UNIQUE INDEX orgs_name ON orgs USING btree (name) WHERE (deleted_at IS NULL);
CREATE INDEX registry_extension_releases_registry_extension_id ON registry_extension_releases USING btree (registry_extension_id, release_tag, created_at DESC) WHERE (deleted_at IS NULL);
CREATE UNIQUE INDEX registry_extension_releases_version ON registry_extension_releases USING btree (registry_extension_id, release_version) WHERE (release_version IS NOT NULL);
CREATE UNIQUE INDEX registry_extensions_publisher_name ON registry_extensions USING btree ((COALESCE(publisher_user_id, 0)), (COALESCE(publisher_org_id, 0)), name) WHERE (deleted_at IS NULL);
CREATE UNIQUE INDEX registry_extensions_uuid ON registry_extensions USING btree (uuid);
CREATE UNIQUE INDEX repo_external_service_unique_idx ON repo USING btree (external_service_type, external_service_id, external_id) WHERE ((external_service_type IS NOT NULL) AND (external_service_id IS NOT NULL) AND (external_id IS NOT NULL));
CREATE INDEX repo_metadata_gin_idx ON repo USING gin (metadata);
CREATE INDEX repo_name_trgm ON repo USING gin (lower((name)::text) gin_trgm_ops);
CREATE INDEX repo_sources_gin_idx ON repo USING gin (sources);
CREATE INDEX repo_uri_idx ON repo USING btree (uri);
CREATE UNIQUE INDEX saved_queries_query_unique ON saved_queries USING btree (query);
CREATE UNIQUE INDEX user_external_accounts_account ON user_external_accounts USING btree (service_type, service_id, client_id, account_id) WHERE (deleted_at IS NULL);
CREATE UNIQUE INDEX users_billing_customer_id ON users USING btree (billing_customer_id) WHERE (deleted_at IS NULL);
CREATE UNIQUE INDEX users_username ON users USING btree (username) WHERE (deleted_at IS NULL);
ALTER TABLE ONLY access_tokens
ADD CONSTRAINT access_tokens_creator_user_id_fkey FOREIGN KEY (creator_user_id) REFERENCES users(id);
ALTER TABLE ONLY access_tokens
ADD CONSTRAINT access_tokens_subject_user_id_fkey FOREIGN KEY (subject_user_id) REFERENCES users(id);
ALTER TABLE ONLY default_repos
ADD CONSTRAINT default_repos_repo_id_fkey FOREIGN KEY (repo_id) REFERENCES repo(id);
ALTER TABLE ONLY discussion_comments
ADD CONSTRAINT discussion_comments_author_user_id_fkey FOREIGN KEY (author_user_id) REFERENCES users(id) ON DELETE RESTRICT;
ALTER TABLE ONLY discussion_comments
ADD CONSTRAINT discussion_comments_thread_id_fkey FOREIGN KEY (thread_id) REFERENCES discussion_threads(id) ON DELETE CASCADE;
ALTER TABLE ONLY discussion_mail_reply_tokens
ADD CONSTRAINT discussion_mail_reply_tokens_thread_id_fkey FOREIGN KEY (thread_id) REFERENCES discussion_threads(id) ON DELETE CASCADE;
ALTER TABLE ONLY discussion_mail_reply_tokens
ADD CONSTRAINT discussion_mail_reply_tokens_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE RESTRICT;
ALTER TABLE ONLY discussion_threads
ADD CONSTRAINT discussion_threads_author_user_id_fkey FOREIGN KEY (author_user_id) REFERENCES users(id) ON DELETE RESTRICT;
ALTER TABLE ONLY discussion_threads
ADD CONSTRAINT discussion_threads_target_repo_id_fk FOREIGN KEY (target_repo_id) REFERENCES discussion_threads_target_repo(id) ON DELETE CASCADE;
ALTER TABLE ONLY discussion_threads_target_repo
ADD CONSTRAINT discussion_threads_target_repo_repo_id_fkey FOREIGN KEY (repo_id) REFERENCES repo(id) ON DELETE CASCADE;
ALTER TABLE ONLY discussion_threads_target_repo
ADD CONSTRAINT discussion_threads_target_repo_thread_id_fkey FOREIGN KEY (thread_id) REFERENCES discussion_threads(id) ON DELETE CASCADE;
ALTER TABLE ONLY names
ADD CONSTRAINT names_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(id) ON UPDATE CASCADE ON DELETE CASCADE;
ALTER TABLE ONLY names
ADD CONSTRAINT names_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id) ON UPDATE CASCADE ON DELETE CASCADE;
ALTER TABLE ONLY org_invitations
ADD CONSTRAINT org_invitations_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(id);
ALTER TABLE ONLY org_invitations
ADD CONSTRAINT org_invitations_recipient_user_id_fkey FOREIGN KEY (recipient_user_id) REFERENCES users(id);
ALTER TABLE ONLY org_invitations
ADD CONSTRAINT org_invitations_sender_user_id_fkey FOREIGN KEY (sender_user_id) REFERENCES users(id);
ALTER TABLE ONLY org_members
ADD CONSTRAINT org_members_references_orgs FOREIGN KEY (org_id) REFERENCES orgs(id) ON DELETE RESTRICT;
ALTER TABLE ONLY org_members
ADD CONSTRAINT org_members_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE RESTRICT;
ALTER TABLE ONLY product_licenses
ADD CONSTRAINT product_licenses_product_subscription_id_fkey FOREIGN KEY (product_subscription_id) REFERENCES product_subscriptions(id);
ALTER TABLE ONLY product_subscriptions
ADD CONSTRAINT product_subscriptions_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
ALTER TABLE ONLY registry_extension_releases
ADD CONSTRAINT registry_extension_releases_creator_user_id_fkey FOREIGN KEY (creator_user_id) REFERENCES users(id);
ALTER TABLE ONLY registry_extension_releases
ADD CONSTRAINT registry_extension_releases_registry_extension_id_fkey FOREIGN KEY (registry_extension_id) REFERENCES registry_extensions(id) ON UPDATE CASCADE ON DELETE CASCADE;
ALTER TABLE ONLY registry_extensions
ADD CONSTRAINT registry_extensions_publisher_org_id_fkey FOREIGN KEY (publisher_org_id) REFERENCES orgs(id);
ALTER TABLE ONLY registry_extensions
ADD CONSTRAINT registry_extensions_publisher_user_id_fkey FOREIGN KEY (publisher_user_id) REFERENCES users(id);
ALTER TABLE ONLY saved_searches
ADD CONSTRAINT saved_searches_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(id);
ALTER TABLE ONLY saved_searches
ADD CONSTRAINT saved_searches_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
ALTER TABLE ONLY settings
ADD CONSTRAINT settings_author_user_id_fkey FOREIGN KEY (author_user_id) REFERENCES users(id) ON DELETE RESTRICT;
ALTER TABLE ONLY settings
ADD CONSTRAINT settings_references_orgs FOREIGN KEY (org_id) REFERENCES orgs(id) ON DELETE RESTRICT;
ALTER TABLE ONLY settings
ADD CONSTRAINT settings_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE RESTRICT;
ALTER TABLE ONLY survey_responses
ADD CONSTRAINT survey_responses_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
ALTER TABLE ONLY user_emails
ADD CONSTRAINT user_emails_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
ALTER TABLE ONLY user_external_accounts
ADD CONSTRAINT user_external_accounts_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
COMMIT;
|
DROP INDEX IF EXISTS clearing_event_transaction_info_uniq;
CREATE UNIQUE INDEX IF NOT EXISTS clearing_event_transaction_info_uniq
ON midgard.clearing_event_transaction_info(clearing_id, invoice_id, payment_id, refund_id, transaction_type, trx_version);
|
-- MANIPULAÇÃO DE STRINGS
-- 1
SELECT UCASE('trybe');
-- 2
SELECT REPLACE('Você já ouviu falar do DuckDuckGo?', 'DuckDuckGo', 'Google');
-- 3
SELECT LENGTH('Uma frase qualquer');
-- 4
SELECT SUBSTRING('A linguagem JavaScript está entre as mais usadas', 13, 10);
-- 5
SELECT LCASE('RUA NORTE 1500, SÃO PAULO, BRASIL');
-- CONDICIONAIS
-- 1
SELECT film_id, title,
IF(title = 'ACE GOLDFINGER', 'Já assisti a esse filme', 'Não conheço o filme') AS 'conheço o filme?'
FROM sakila.film;
-- nome da coluna ficou entre aspas porque tem mais de 1 palavra
-- 2
SELECT title, rating, CASE
WHEN rating = 'G' THEN 'Livre para todos'
WHEN rating = 'PG' THEN 'Não recomendado para menores de 10 anos'
WHEN rating = 'PG-13' THEN 'Não recomendado para menores de 13 anos'
WHEN rating = 'R' THEN 'Não recomendado para menores de 17 anos'
ELSE 'Proibido para menores de idade' END AS 'público-alvo' FROM sakila.film;
-- FUNÇÕES MATEMÁTICAS
-- DIV E MOD
-- 1
SELECT IF(15 MOD 2, 'Ímpar', 'Par') AS 'Par ou Ímpar';
-- 2
SELECT 220 DIV 12;
-- 3
SELECT 220 MOD 12;
-- é a mesma coisa de fazer 220 - (18 * 12);
-- OUTROS
-- 1
SELECT FLOOR(15 + (RAND() * 5));
-- 2
SELECT ROUND(15.75, 5);
-- 3
SELECT FLOOR(39.494);
-- 4
SELECT CEIL(85.234);
-- TRABALHANDO COM DATAS
-- 1
SELECT DATEDIFF('2030-01-20', CURRENT_DATE());
-- 2
SELECT TIMEDIFF('10:25:45', '11:00:00');
-- FUNÇÕES DE AGREGAÇÃO
-- 1
SELECT * FROM sakila.film;
SELECT AVG(length) AS 'Média de Duração',
MIN(length) AS 'Duração Mínima', MAX(length) AS 'Duração Máxima',
SUM(length) AS 'Tempo de Exibição Total', COUNT(length) AS 'Filmes Registrados'
FROM sakila.film;
-- GROUP BY
-- 1
SELECT * FROM sakila.customer;
SELECT active, COUNT(*) FROM sakila.customer GROUP BY active;
-- 2
SELECT store_id, active, COUNT(*) FROM sakila.customer GROUP BY store_id, active;
-- 3
SELECT AVG(length), rating FROM sakila.film GROUP BY rating ORDER BY AVG(length) DESC;
-- 4
SELECT * FROM sakila.address;
SELECT district, COUNT(district) FROM sakila.address GROUP BY district ORDER BY COUNT(district) DESC;
-- HAVING
-- 1
SELECT rating, AVG(length) AS média FROM sakila.film
GROUP BY rating HAVING média > 115.0 AND média <= 121.50 ORDER BY média DESC;
-- 2
SELECT rating, SUM(replacement_cost) AS soma FROM sakila.film
GROUP BY rating HAVING soma > 3950.50 ORDER BY soma;
|
-- file:plpgsql.sql ln:1794 expect:false
begin
x := '1234'
|
select count(id) as answer from (select id,(value-LAG(value,3) OVER (order by id)) as difference from stdin) where difference>0;
|
INSERT INTO `shuyang_module` (`module`, `name`, `url`, `iscore`, `version`, `description`, `setting`, `listorder`, `disabled`, `installdate`, `updatedate`) VALUES ('tag', '标签向导', 'tag/', 0, '1.0', '标签向导', '', 0, 0, '2010-9-05', '2010-9-05');
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 24, 2020 at 06:42 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.6
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: `todolist`
--
-- --------------------------------------------------------
--
-- Table structure for table `kegiatan`
--
CREATE TABLE `kegiatan` (
`id` int(11) NOT NULL,
`nama` varchar(128) NOT NULL,
`waktu` int(11) NOT NULL,
`status` int(11) NOT NULL,
`deskripsi` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `kegiatan`
--
INSERT INTO `kegiatan` (`id`, `nama`, `waktu`, `status`, `deskripsi`) VALUES
(16, 'olahraga', 1605542383, 0, 'olahraga bareng kakak'),
(17, 'Mancing mania', 1605542446, 1, 'macing ikan paus');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `kegiatan`
--
ALTER TABLE `kegiatan`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `kegiatan`
--
ALTER TABLE `kegiatan`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;
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 */;
|
"day" "ammount"
2013-01-24 323
2013-01-25 233
2013-01-26 433
2013-01-27 555
2013-01-28 123
2013-01-29 0
2013-01-30 221
2016-05-25 222
|
/*
Columnstore Indexes Scripts Library for SQL Server 2016:
Row Groups - Shows detailed information on the Columnstore Row Groups inside current Database
Version: 1.6.0, January 2018
Copyright 2015-2018 Niko Neugebauer, OH22 IS (http://www.nikoport.com/columnstore/), (http://www.oh22.is/)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/*
Known Issues & Limitations:
Changes in 1.0.3
+ Added parameter for showing aggregated information on the whole table, instead of partitioned view as before
* Changed the name of the @tableNamePattern to @tableName to follow the same standard across all CISL functions
Changes in 1.1.0
+ Added new parameter for filtering on the object id - @objectId
* Changed constant creation and dropping of the stored procedure to 1st time execution creation and simple alteration after that
* The description header is copied into making part of the function code that will be stored on the server. This way the CISL version can be easily determined.
Changes in 1.2.0
- Removed Tombstones from the calculations of Deleted Rows, Active Rows and Total Rows
- Fixed bug with including aggregating tables without taking care of the database name, thus potentially including results from the equally named table from a different database
+ Included support for the temporary tables with Columnstore Indexes (global & local)
Changes in 1.3.0
+ Added support for the Deleted Buffer (Nonclustered Columnstore)
+ Added support for the InMemory Columnstore Index
+ Added support for the Index Location (Disk-Based, InMemory)
+ Added new parameter for filtering the indexes, based on their location (Disk-Based or In-Memory) - @indexLocation
- Fixed bug with partition information not being shown correctly
+ Added new parameter for filtering a specific partition
Changes in 1.4.0
- Fixed an extremely rare bug with the sys.dm_db_index_usage_stats DMV, where it contains queries for the local databases object made from other databases only
- Added support for the Indexed Views with Nonclustered Columnstore Indexes
- Added new parameter for filtering the Columnstore Object Type with possible values 'Table' & 'Indexed View'
Changes in 1.4.1
+ Added support for the SP1 which allows support of Columnstore Indexes on any edition
Changes in 1.4.2
- Fixed bug on lookup for the Object Name for the empty Columnstore tables
Changes in 1.5.0
+ Added new parameter for the searching precise name of the object (@preciseSearch)
+ Expanded search of the schema to include the pattern search with @preciseSearch = 0
Changes in 1.6.0
+ Added new parameter for specifying the name of the database, where the Columnstore Indexes should be located (@dbName)
* Greatly improved performance against the databases with thousands of Row Groups
*/
declare @SQLServerVersion nvarchar(128) = cast(SERVERPROPERTY('ProductVersion') as NVARCHAR(128)),
@SQLServerEdition nvarchar(128) = cast(SERVERPROPERTY('Edition') as NVARCHAR(128)),
@SQLServerBuild smallint = NULL;
declare @errorMessage nvarchar(512);
-- Ensure that we are running SQL Server 2016
if substring(@SQLServerVersion,1,CHARINDEX('.',@SQLServerVersion)-1) <> N'13'
begin
set @errorMessage = (N'You are not running a SQL Server 2016. Your SQL Server version is ' + @SQLServerVersion);
Throw 51000, @errorMessage, 1;
end
IF EXISTS (SELECT 1 WHERE SERVERPROPERTY('EngineEdition') <> 3 AND cast(SERVERPROPERTY('ProductLevel') as nvarchar(128)) NOT LIKE 'SP%')
begin
set @errorMessage = (N'Your SQL Server 2016 Edition is not an Enterprise or a Developer Edition or your are not running Service Pack 1 or later for SQL Server 2016. Your are running a ' + @SQLServerEdition);
Throw 51000, @errorMessage, 1;
end
--------------------------------------------------------------------------------------------------------------------
if NOT EXISTS (select * from sys.objects where type = 'p' and name = 'cstore_GetRowGroups' and schema_id = SCHEMA_ID('dbo') )
exec ('create procedure dbo.cstore_GetRowGroups as select 1');
GO
/*
Columnstore Indexes Scripts Library for SQL Server 2016:
Row Groups - Shows detailed information on the Columnstore Row Groups inside current Database
Version: 1.6.0, January 2018
*/
alter procedure dbo.cstore_GetRowGroups(
-- Params --
@dbName SYSNAME = NULL, -- Identifies the Database to run the stored procedure against. If this parameter is left to be NULL, then the current database is used
@indexType char(2) = NULL, -- Allows to filter Columnstore Indexes by their type, with possible values (CC for 'Clustered', NC for 'Nonclustered' or NULL for both)
@indexLocation varchar(15) = NULL, -- ALlows to filter Columnstore Indexes based on their location: Disk-Based & In-Memory
@objectType varchar(20) = NULL, -- Allows to filter the object type with 2 possible supported values: 'Table' & 'Indexed View'
@compressionType varchar(15) = NULL, -- Allows to filter by the compression type with following values 'ARCHIVE', 'COLUMNSTORE' or NULL for both
@minTotalRows bigint = 000000, -- Minimum number of rows for a table to be included
@minSizeInGB Decimal(16,3) = 0.00, -- Minimum size in GB for a table to be included
@preciseSearch bit = 0, -- Defines if the schema and data search with the parameters @schemaName & @tableName will be precise or pattern-like
@tableName nvarchar(256) = NULL, -- Allows to show data filtered down to the specified table name pattern
@schemaName nvarchar(256) = NULL, -- Allows to show data filtered down to the specified schema
@objectId int = NULL, -- Allows to idenitfy a table thorugh the ObjectId
@showPartitionDetails bit = 0, -- Allows to show details of each of the available partitions
@partitionId int = NULL -- Allows to filter data on a specific partion. Works only if @showPartitionDetails is set = 1
-- end of --
) as
begin
SET ANSI_WARNINGS OFF;
SET NOCOUNT ON;
IF @dbName IS NULL
SET @dbName = DB_NAME(DB_ID());
DECLARE @dbId INT = DB_ID(@dbName);
DECLARE @sql NVARCHAR(MAX);
IF NOT EXISTS (SELECT 1 FROM sys.databases WHERE name = @dbName)
BEGIN
DECLARE @errorMessage NVARCHAR(500) = 'The Database ''' + @dbName + ''' does not exist on this SQL Server Instance!';
THROW 51000, @errorMessage, 1;
END
SET @sql = N'
with partitionedInfo as (
select quotename(object_schema_name(ind.object_id, @dbId)) + ''.'' + quotename(object_name(ind.object_id, @dbId)) as [TableName],
case ind.type when 5 then ''Clustered'' when 6 then ''Nonclustered'' end as [Type],
case obj.type_desc when ''USER_TABLE'' then ''Table'' when ''VIEW'' then ''Indexed View'' else obj.type_desc end as [ObjectType],
case ind.data_space_id when 0 then ''In-Memory'' else ''Disk-Based'' end as [Location],
part.partition_number as Partition,
case count( distinct part.data_compression_desc) when 1 then max(part.data_compression_desc) else ''Multiple'' end as [Compression Type],
sum(case state when 0 then 1 else 0 end) as [Bulk Load RG],
sum(case state when 1 then 1 else 0 end) as [Open DS],
sum(case state when 2 then 1 else 0 end) as [Closed DS],
sum(case state when 4 then 1 else 0 end) as [Tombstones],
sum(case state when 3 then 1 else 0 end) as [Compressed],
count(rg.object_id) as [Total],
cast( (sum(isnull(case state when 4 then 0 else deleted_rows end,0)) + isnull(sum(intpart.rows),0)
)/1000000. as Decimal(16,6)) as [Deleted Rows (M)],
cast( (sum(isnull(case state when 4 then 0 else (total_rows-isnull(deleted_rows,0)) end,0)) - isnull(sum(intpart.rows),0)
)/1000000. as Decimal(16,6)) as [Active Rows (M)],
cast( sum(isnull(case state when 4 then 0 else total_rows end,0))/1000000. as Decimal(16,6)) as [Total Rows (M)],
cast( (sum(isnull(size_in_bytes,0) / 1024. / 1024 / 1024) +
(select isnull(sum(xtpMem.allocated_bytes) / 1024. / 1024 / 1024,0)
from ' + QUOTENAME(@dbName) + '.sys.dm_db_xtp_memory_consumers xtpMem
where ind.object_id = xtpMem.object_id and xtpMem.memory_consumer_type = 5 /* HKCS_COMPRESSED */)
) as Decimal(8,2)) as [Size in GB],
isnull(sum(stat.user_scans)/count(*),0) as [Scans],
isnull(sum(stat.user_updates)/count(*),0) as [Updates],
max(stat.last_user_scan) as [LastScan]
from ' + QUOTENAME(@dbName) + N'.sys.indexes ind
inner join ' + QUOTENAME(@dbName) + N'.sys.objects obj
on ind.object_id = obj.object_id
left join ' + QUOTENAME(@dbName) + N'.sys.column_store_row_groups rg
on ind.object_id = rg.object_id and ind.index_id = rg.index_id
left join ' + QUOTENAME(@dbName) + N'.sys.partitions part with(READUNCOMMITTED)
on ind.object_id = part.object_id and isnull(rg.partition_number,1) = part.partition_number
AND ind.index_id = part.index_id
left join ' + QUOTENAME(@dbName) + N'.sys.dm_db_index_usage_stats stat with(READUNCOMMITTED)
on rg.object_id = stat.object_id and ind.index_id = stat.index_id
and isnull(stat.database_id,db_id()) = db_id()
LEFT HASH JOIN ' + QUOTENAME(@dbName) + N'.sys.internal_partitions intpart
ON ind.object_id = intpart.object_id and rg.partition_number = intpart.partition_number
and intpart.internal_object_type = 4
where ind.type >= 5 and ind.type <= 6 -- Clustered & Nonclustered Columnstore
and part.data_compression BETWEEN 3 AND 4
and ind.data_space_id = isnull( case @indexLocation when ''In-Memory'' then 0 when ''Disk-Based'' then 1 else ind.data_space_id end, ind.data_space_id )
and case @indexType when ''CC'' then 5 when ''NC'' then 6 else ind.type end = ind.type
and case @compressionType when ''Columnstore'' then 3 when ''Archive'' then 4 else part.data_compression end = part.data_compression
and (@preciseSearch = 0 AND (@tableName is null or object_name (ind.object_id, @dbId) like ''%'' + @tableName + ''%'')
OR @preciseSearch = 1 AND (@tableName is null or object_name (ind.object_id, @dbId) = @tableName) )
and (@preciseSearch = 0 AND (@schemaName is null or object_schema_name(ind.object_id, @dbId) like N''%'' + @schemaName + ''%'')
OR @preciseSearch = 1 AND (@schemaName is null or object_schema_name(ind.object_id, @dbId) = @schemaName))
AND (ISNULL(@objectId,ind.object_id) = ind.object_id)
and obj.type_desc = ISNULL(case @objectType when ''Table'' then ''USER_TABLE'' when ''Indexed View'' then ''VIEW'' end,obj.type_desc)
group by ind.object_id, ind.type, obj.type_desc, rg.partition_number, ind.data_space_id,
part.partition_number
having cast( (sum(isnull(size_in_bytes,0) / 1024. / 1024 / 1024) +
(select isnull(sum(xtpMem.allocated_bytes) / 1024. / 1024 / 1024,0)
from sys.dm_db_xtp_memory_consumers xtpMem
where ind.object_id = xtpMem.object_id and xtpMem.memory_consumer_type = 5 /* HKCS_COMPRESSED */)
)
as Decimal(8,2)) >= @minSizeInGB
and sum(isnull(total_rows,0)) >= @minTotalRows
union all
select quotename(object_schema_name(ind.object_id, db_id(''tempdb''))) + ''.'' + quotename(object_name(ind.object_id, db_id(''tempdb''))) as [TableName],
case ind.type when 5 then ''Clustered'' when 6 then ''Nonclustered'' end as [Type],
case obj.type_desc when ''USER_TABLE'' then ''Table'' when ''VIEW'' then ''Indexed View'' else obj.type_desc end as ObjectType,
case ind.data_space_id when 0 then ''In-Memory'' else ''Disk-Based'' end as [Location],
part.partition_number as Partition,
case count( distinct part.data_compression_desc) when 1 then max(part.data_compression_desc) else ''Multiple'' end as [Compression Type],
sum(case state when 0 then 1 else 0 end) as [Bulk Load RG],
sum(case state when 1 then 1 else 0 end) as [Open DS],
sum(case state when 2 then 1 else 0 end) as [Closed DS],
sum(case state when 4 then 1 else 0 end) as [Tombstones],
sum(case state when 3 then 1 else 0 end) as [Compressed],
count(rg.object_id) as [Total],
cast( (sum(isnull(case state when 4 then 0 else deleted_rows end,0)) + isnull(sum(intpart.rows),0)
)/1000000. as Decimal(16,6)) as [Deleted Rows (M)],
cast( (sum(isnull(case state when 4 then 0 else (total_rows-isnull(deleted_rows,0)) end,0)) - isnull(sum(intpart.rows),0)
)/1000000. as Decimal(16,6)) as [Active Rows (M)],
cast( sum(isnull(rg.total_rows,0))/1000000. as Decimal(16,6)) as [Total Rows (M)],
cast( (sum(isnull(size_in_bytes,0) / 1024. / 1024 / 1024) +
(select isnull(sum(xtpMem.allocated_bytes) / 1024. / 1024 / 1024,0)
from sys.dm_db_xtp_memory_consumers xtpMem
where ind.object_id = xtpMem.object_id and xtpMem.memory_consumer_type = 5 /* HKCS_COMPRESSED */)
) as Decimal(8,2)) as [Size in GB],
isnull(sum(stat.user_scans)/count(*),0) as [Scans],
isnull(sum(stat.user_updates)/count(*),0) as [Updates],
max(stat.last_user_scan) as [LastScan]
from tempdb.sys.indexes ind
inner join sys.objects obj
on ind.object_id = obj.object_id
left join tempdb.sys.column_store_row_groups rg
on ind.object_id = rg.object_id and ind.index_id = rg.index_id
left join tempdb.sys.partitions part with(READUNCOMMITTED)
on ind.object_id = part.object_id and isnull(rg.partition_number,1) = part.partition_number
left join tempdb.sys.dm_db_index_usage_stats stat with(READUNCOMMITTED)
on rg.object_id = stat.object_id and ind.index_id = stat.index_id
LEFT HASH JOIN tempdb.sys.internal_partitions intpart
ON ind.object_id = intpart.object_id and rg.partition_number = intpart.partition_number
and intpart.internal_object_type = 4
where ind.type >= 5 and ind.type <= 6 -- Clustered & Nonclustered Columnstore
and part.data_compression BETWEEN 3 AND 4
and case @indexType when ''CC'' then 5 when ''NC'' then 6 else ind.type end = ind.type
and ind.data_space_id = isnull( case @indexLocation when ''In-Memory'' then 0 when ''Disk-Based'' then 1 else ind.data_space_id end, ind.data_space_id )
and case @compressionType when ''Columnstore'' then 3 when ''Archive'' then 4 else part.data_compression end = part.data_compression
and (@preciseSearch = 0 AND (@tableName is null or object_name (ind.object_id,db_id(''tempdb'')) like ''%'' + @tableName + ''%'')
OR @preciseSearch = 1 AND (@tableName is null or object_name (ind.object_id,db_id(''tempdb'')) = @tableName) )
and (@preciseSearch = 0 AND (@schemaName is null or object_schema_name( ind.object_id,db_id(''tempdb'') ) like ''%'' + @schemaName + ''%'')
OR @preciseSearch = 1 AND (@schemaName is null or object_schema_name( ind.object_id,db_id(''tempdb'') ) = @schemaName))
AND (ISNULL(@objectId,ind.object_id) = ind.object_id)
and obj.type_desc = ISNULL(case @objectType when ''Table'' then ''USER_TABLE'' when ''Indexed View'' then ''VIEW'' end,obj.type_desc)
group by ind.object_id, ind.type, obj.type_desc, rg.partition_number,
ind.data_space_id,
part.partition_number
having cast( (sum(isnull(size_in_bytes,0) / 1024. / 1024 / 1024) +
(select isnull(sum(xtpMem.allocated_bytes) / 1024. / 1024 / 1024,0)
from tempdb.sys.dm_db_xtp_memory_consumers xtpMem
where ind.object_id = xtpMem.object_id and xtpMem.memory_consumer_type = 5 /* HKCS_COMPRESSED */)
)
as Decimal(8,2)) >= @minSizeInGB
and sum(isnull(total_rows,0)) >= @minTotalRows
)
select [TableName],
[Type],
[ObjectType],
[Location], (case @showPartitionDetails when 1 then Partition else 1 end) as [Partition],
max([Compression Type]) as [Compression Type],
sum([Bulk Load RG]) as [Bulk Load RG],
sum([Open DS]) as [Open DS],
sum([Closed DS]) as [Closed DS],
sum(Tombstones) as Tombstones,
sum(Compressed) as Compressed,
sum(Total) as Total,
sum([Deleted Rows (M)]) as [Deleted Rows (M)], sum([Active Rows (M)]) as [Active Rows (M)], sum([Total Rows (M)]) as [Total Rows (M)],
sum([Size in GB]) as [Size in GB], sum(ISNULL(Scans,0)) as Scans, sum(ISNULL(Updates,0)) as Updates, NULL as LastScan
from partitionedInfo
where Partition = isnull(@partitionId, Partition) -- Partition Filtering
group by TableName, Type, ObjectType, Location, (case @showPartitionDetails when 1 then Partition else 1 end)
order by TableName, (case @showPartitionDetails when 1 then Partition else 1 end)
';
SET ANSI_WARNINGS ON;
DECLARE @paramDefinition NVARCHAR(1000) = '@indexType char(2),
@indexLocation varchar(15),
@objectType varchar(20),
@compressionType varchar(15),
@minTotalRows bigint,
@minSizeInGB Decimal(16,3),
@preciseSearch bit,
@tableName nvarchar(256),
@schemaName nvarchar(256),
@objectId int,
@showPartitionDetails bit,
@partitionId int,
@dbId int';
EXEC sp_executesql @sql, @paramDefinition, @indexType = @indexType, @indexLocation = @indexLocation,
@objectType = @objectType, @compressionType = @compressionType,
@minTotalRows = @minTotalRows, @minSizeInGB = @minSizeInGB,
@preciseSearch = @preciseSearch, @tableName = @tableName,
@schemaName = @schemaName, @objectId = @objectId,
@showPartitionDetails = @showPartitionDetails, @partitionId = @partitionId,
@dbId = @dbId;
end
GO
|
-- Copyright (C) 2011 LedgerSMB Core Team. Licensed under the GNU General
-- Public License v 2 or at your option any later version.
-- Docstrings already added to this file.
-- README: This module is unlike most others in that it requires most functions
-- to run as superuser. For this reason it is CRITICAL that the following
-- practices are adhered to:
-- 1: When using EXECUTE, all user-supplied information MUST be passed through
-- quote_literal.
-- 2: This file MUST be frequently audited to ensure the above rule is followed
--
-- -CT
BEGIN;
-- work in progress, not documenting yet.
CREATE OR REPLACE FUNCTION admin__add_user_to_role(in_username TEXT, in_role TEXT) returns INT AS $$
declare
stmt TEXT;
a_role name;
a_user name;
t_userid int;
BEGIN
-- Issue the grant
select rolname into a_role from pg_roles where rolname = in_role;
IF NOT FOUND THEN
RAISE EXCEPTION 'Cannot grant permissions of a non-existant role.';
END IF;
select rolname into a_user from pg_roles where rolname = in_username;
IF NOT FOUND THEN
RAISE EXCEPTION 'Cannot grant permissions to a non-existant database user.';
END IF;
stmt := 'GRANT '|| quote_ident(in_role) ||' to '|| quote_ident(in_username);
EXECUTE stmt;
select id into t_userid from users where username = in_username;
if not FOUND then
RAISE EXCEPTION 'Cannot grant permissions to a non-existant application user.';
end if;
return 1;
END;
$$ language 'plpgsql' security definer;
REVOKE EXECUTE ON FUNCTION admin__add_user_to_role(TEXT, TEXT) FROM PUBLIC;
-- work in progress. Not documenting yet.
CREATE OR REPLACE FUNCTION admin__remove_user_from_role(in_username TEXT, in_role TEXT) returns INT AS $$
declare
stmt TEXT;
a_role name;
a_user name;
BEGIN
-- Issue the grant
select rolname into a_role from pg_roles where rolname = in_role;
IF NOT FOUND THEN
RAISE EXCEPTION 'Cannot revoke permissions of a non-existant role.';
END IF;
select rolname into a_user from pg_roles where rolname = in_username;
IF NOT FOUND THEN
RAISE EXCEPTION 'Cannot revoke permissions from a non-existant user.';
END IF;
stmt := 'REVOKE '|| quote_ident(in_role) ||' FROM '|| quote_ident(in_username);
EXECUTE stmt;
return 1;
END;
$$ language 'plpgsql' SECURITY DEFINER;
REVOKE EXECUTE ON FUNCTION admin__remove_user_from_role(TEXT, TEXT) FROM PUBLIC;
-- work in progress. Not documenting yet.
CREATE OR REPLACE FUNCTION admin__add_function_to_group(in_func TEXT, in_role TEXT) returns INT AS $$
declare
stmt TEXT;
a_role name;
a_user name;
BEGIN
-- Issue the grant
select rolname into a_role from pg_roles where rolname = in_role;
IF NOT FOUND THEN
RAISE EXCEPTION 'Cannot grant permissions of a non-existant role.';
END IF;
select rolname into a_user from pg_roles where rolname = in_username;
IF NOT FOUND THEN
RAISE EXCEPTION 'Cannot grant permissions to a non-existant user.';
END IF;
stmt := 'GRANT EXECUTE ON FUNCTION '|| quote_ident(in_func) ||' to '|| quote_ident(in_role);
EXECUTE stmt;
return 1;
END;
$$ language 'plpgsql' SECURITY DEFINER;
REVOKE EXECUTE ON FUNCTION admin__add_function_to_group(TEXT, TEXT) FROM PUBLIC;
-- work in progress, not documenting yet.
CREATE OR REPLACE FUNCTION admin__remove_function_from_group(in_func TEXT, in_role TEXT) returns INT AS $$
declare
stmt TEXT;
a_role name;
a_user name;
BEGIN
-- Issue the grant
select rolname into a_role from pg_roles where rolname = in_role;
IF NOT FOUND THEN
RAISE EXCEPTION 'Cannot revoke permissions of non-existant role $.';
END IF;
select rolname into a_user from pg_roles where rolname = in_username;
IF NOT FOUND THEN
RAISE EXCEPTION 'Cannot revoke permissions from a non-existant function.';
END IF;
stmt := 'REVOKE EXECUTE ON FUNCTION '|| quote_ident(in_func) ||' FROM '|| quote_ident(in_role);
EXECUTE stmt;
return 1;
END;
$$ language 'plpgsql' SECURITY DEFINER;
REVOKE EXECUTE ON FUNCTION admin__remove_function_from_group(text, text)
FROM public;
DROP FUNCTION IF EXISTS admin__get_user(in_entity_id INT);
CREATE OR REPLACE FUNCTION admin__get_user(in_id INT) returns users as $$
select * from users where id = in_id;
$$ language sql;
COMMENT ON FUNCTION admin__get_user(in_user_id INT) IS
$$ Returns a set of (only one) user specified by the id.$$;
DROP FUNCTION IF EXISTS admin__get_user_by_entity(in_entity_id INT);
CREATE OR REPLACE FUNCTION admin__get_user_by_entity(in_entity_id INT) returns users as $$
select * from users where entity_id = in_entity_id;
$$ language sql;
COMMENT ON FUNCTION admin__get_user_by_entity(in_entity_id INT) IS
$$ Returns a set of (only one) user specified by the entity_id.$$;
DROP FUNCTION IF EXISTS admin__get_roles_for_user(in_entity_id INT);
CREATE OR REPLACE FUNCTION admin__get_roles_for_user(in_user_id INT) returns setof text as $$
declare
u_role record;
a_user users;
begin
select * into a_user from admin__get_user(in_user_id);
FOR u_role IN
select r.rolname
from
pg_roles r,
(select
m.roleid
from
pg_auth_members m, pg_roles b
where
m.member = b.oid
and
b.rolname = a_user.username
) as ar
where
r.oid = ar.roleid
and r.rolname like (lsmb__role_prefix() || '%')
LOOP
RETURN NEXT u_role.rolname::text;
END LOOP;
RETURN;
end;
$$ language 'plpgsql' SECURITY DEFINER;
REVOKE EXECUTE ON FUNCTION admin__get_roles_for_user(in_entity_id INT) from PUBLIC;
COMMENT ON FUNCTION admin__get_roles_for_user(in_user_id INT) IS
$$ Returns a set of roles that a user is a part of.$$;
CREATE OR REPLACE FUNCTION admin__get_roles_for_user_by_entity(in_entity_id INT) returns setof text as $$
declare
u_role record;
a_user users;
begin
select * into a_user from admin__get_user_by_entity(in_entity_id);
FOR u_role IN
select r.rolname
from
pg_roles r,
(select
m.roleid
from
pg_auth_members m, pg_roles b
where
m.member = b.oid
and
b.rolname = a_user.username
) as ar
where
r.oid = ar.roleid
and r.rolname like (lsmb__role_prefix() || '%')
LOOP
RETURN NEXT u_role.rolname::text;
END LOOP;
RETURN;
end;
$$ language 'plpgsql' SECURITY DEFINER;
REVOKE EXECUTE ON FUNCTION admin__get_roles_for_user_by_entity(in_entity_id INT) from PUBLIC;
COMMENT ON FUNCTION admin__get_roles_for_user_by_entity(in_entity_id INT) IS
$$ Returns a set of roles that a user is a part of.$$;
CREATE OR REPLACE FUNCTION user__check_my_expiration()
returns interval as
$$
DECLARE
outval interval;
BEGIN
SELECT CASE WHEN isfinite(rolvaliduntil) is not true THEN '1 year'::interval
ELSE rolvaliduntil - now() END AS expiration INTO outval
FROM pg_roles WHERE rolname = SESSION_USER;
RETURN outval;
end;
$$ language plpgsql security definer;
COMMENT ON FUNCTION user__check_my_expiration() IS
$$ Returns the time when password of the current logged in user is set to
expire.$$;
CREATE OR REPLACE FUNCTION user__expires_soon()
RETURNS BOOL AS
$$
SELECT user__check_my_expiration() < '1 week';
$$ language sql;
COMMENT ON FUNCTION user__expires_soon() IS
$$ Returns true if the password of the current logged in user is set to expire
within on week.$$;
CREATE OR REPLACE FUNCTION user__change_password(in_new_password text)
returns int SET datestyle = 'ISO, YMD' as -- datestyle needed due to legacy code
$$
DECLARE
t_expires timestamp;
t_password_duration text;
BEGIN
SELECT value INTO t_password_duration FROM defaults
WHERE setting_key = 'password_duration';
IF t_password_duration IS NULL or t_password_duration='' THEN
t_expires := 'infinity';
ELSE
t_expires := now()
+ (t_password_duration::numeric::text || ' days')::interval;
END IF;
UPDATE users SET notify_password = DEFAULT where username = SESSION_USER;
EXECUTE 'ALTER USER ' || quote_ident(SESSION_USER) ||
' with ENCRYPTED password ' || quote_literal(in_new_password) ||
' VALID UNTIL '|| quote_literal(t_expires);
return 1;
END;
$$ language plpgsql security definer;
COMMENT ON FUNCTION user__change_password(in_new_password text) IS
$$ Alloes a user to change his or her own password. The password is set to
expire setting_get('password_duration') days after the password change.$$;
DROP FUNCTION IF EXISTS admin__save_user(int, int, text, text, bool);
CREATE OR REPLACE FUNCTION admin__save_user(
in_id int,
in_entity_id INT,
in_username text,
in_password TEXT,
in_pls_import BOOL
) returns int
SET datestyle = 'ISO, YMD' -- needed due to legacy code regarding datestyles
AS $$
DECLARE
a_user users;
v_user_id int;
p_id int;
l_id int;
stmt text;
t_is_role bool;
t_is_user bool;
BEGIN
-- WARNING TO PROGRAMMERS: This function runs as the definer and runs
-- utility statements via EXECUTE.
-- PLEASE BE VERY CAREFUL ABOUT SQL-INJECTION INSIDE THIS FUNCTION.
PERFORM rolname FROM pg_roles WHERE rolname = in_username;
t_is_role := found;
t_is_user := admin__is_user(in_username);
IF t_is_role is true and t_is_user is false and in_pls_import is NOT TRUE THEN
RAISE EXCEPTION 'Duplicate user';
END IF;
if t_is_role and in_password is not null then
execute 'ALTER USER ' || quote_ident( in_username ) ||
' WITH ENCRYPTED PASSWORD ' || quote_literal (in_password)
|| $e$ valid until $e$ ||
quote_literal(now() + '1 day'::interval);
elsif in_pls_import is false AND t_is_user is false
AND in_password IS NULL THEN
RAISE EXCEPTION 'No password';
elsif t_is_role is false and in_pls_import IS NOT TRUE THEN
-- create an actual user
execute 'CREATE USER ' || quote_ident( in_username ) ||
' WITH ENCRYPTED PASSWORD ' || quote_literal (in_password)
|| $e$ valid until $e$ || quote_literal(now() + '1 day'::interval);
END IF;
select * into a_user from users lu where lu.id = in_id;
IF FOUND THEN
PERFORM admin__add_user_to_role(
a_user.username,
lsmb__role_prefix() || 'base_user');
return a_user.id;
ELSE
-- Insert cycle
--- The entity is expected to already BE created. See admin.pm.
PERFORM * FROM USERS where username = in_username;
IF NOT FOUND THEN
v_user_id := nextval('users_id_seq');
insert into users (id, username, entity_id) VALUES (
v_user_id,
in_username,
in_entity_id
);
insert into user_preference (id) values (v_user_id);
END IF;
IF NOT exists(SELECT * FROM entity_employee WHERE entity_id = in_entity_id) THEN
INSERT into entity_employee (entity_id) values (in_entity_id);
END IF;
-- Finally, issue the create user statement
PERFORM admin__add_user_to_role(
in_username,
lsmb__role_prefix() || 'base_user');
return v_user_id ;
END IF;
END;
$$ language 'plpgsql' SECURITY DEFINER;
COMMENT ON FUNCTION admin__save_user(
in_id int,
in_entity_id INT,
in_username text,
in_password TEXT,
in_import BOOL
) IS
$$ Creates a user and relevant records in LedgerSMB and PostgreSQL.$$;
REVOKE EXECUTE ON FUNCTION admin__save_user(
in_id int,
in_entity_id INT,
in_username text,
in_password TEXT,
in_import bool
) FROM public;
DROP VIEW if exists role_view CASCADE;
create view role_view as
select * from pg_auth_members m join pg_roles a ON (m.roleid = a.oid);
-- work in progress, not for public docs yet
create or replace function admin__is_group(in_group_name text) returns bool as $$
-- This needs some work. CT
DECLARE
existant_role pg_roles;
stmt text;
BEGIN
select * into existant_role from pg_roles
where rolname = in_group_name AND rolcanlogin is false;
if not found then
return 'f'::bool;
else
return 't'::bool;
end if;
END;
$$ language 'plpgsql';
-- work in progress, not for public docs yet
CREATE OR REPLACE FUNCTION admin__create_group(in_group_name TEXT) RETURNS int as $$
DECLARE
stmt text;
group_name text;
BEGIN
group_name := lsmb__role(in_group_name);
stmt := 'create role '|| quote_ident(group_name);
execute stmt;
INSERT INTO lsmb_group (role_name)
values (group_name);
return 1;
END;
$$ language 'plpgsql' SECURITY DEFINER;
REVOKE EXECUTE ON FUNCTION admin__create_group(TEXT) FROM PUBLIC;
CREATE OR REPLACE FUNCTION admin__add_group_to_role
(in_group_name text, in_role_name text)
RETURNS BOOL AS
$$
DECLARE
t_group_name text;
t_role_name text;
BEGIN
t_group_name := lsmb__role(in_group_name);
t_role_name := lsmb__role(in_role_name);
PERFORM * FROM lsmb_group_grants
WHERE group_name = t_group_name AND
granted_role = t_role_name;
IF NOT FOUND THEN
INSERT INTO lsmb_group_grants(group_name, granted_role)
VALUES (t_group_name, t_role_name);
END IF;
EXECUTE 'GRANT ' || quote_ident(t_role_name) || ' TO ' ||
quote_literal(t_group_name);
RETURN TRUE;
END;
$$ LANGUAGE PLPGSQL SECURITY DEFINER;
revoke execute on function admin__add_group_to_role
(in_group_name text, in_role_name text) FROM public;
COMMENT ON function admin__add_group_to_role
(in_group_name text, in_role_name text) IS
$$ This function inserts the arguments into lsmb_group_grants for future
reference and issues the db-level grant. It then returns true if there are no
exceptions.$$;
CREATE OR REPLACE FUNCTION admin__remove_group_from_role
(in_group_name text, in_role_name text) RETURNS BOOL AS $$
BEGIN
EXECUTE 'REVOKE ' || quote_ident(in_role_name) || ' FROM ' ||
quote_literal('lsmb_' || t_dbname || '__' || in_group_name);
DELETE FROM lsmb_group_grants
WHERE group_name = in_group_name AND granted_role = in_role_name;
RETURN FOUND;
END;
$$ LANGUAGE PLPGSQL SECURITY DEFINER;
revoke execute on function admin__remove_group_from_role
(in_group_name text, in_role_name text) FROM public;
COMMENT ON FUNCTION admin__remove_group_from_role
(in_group_name text, in_role_name text) IS $$
Returns true if the grant record was found and deleted, false otherwise.
Issues db-level revoke in all cases.$$;
CREATE OR REPLACE FUNCTION admin__list_group_grants(in_group_name text)
RETURNS SETOF lsmb_group_grants AS $$
SELECT * FROM lsmb_group_grants WHERE group_name = $1
ORDER BY granted_role;
$$ LANGUAGE SQL;
-- not sure if this is exposed to the front end yet. --CT
CREATE OR REPLACE FUNCTION admin__delete_user
(in_username TEXT, in_drop_role bool) returns INT as $$
DECLARE
stmt text;
a_user users;
BEGIN
select * into a_user from users where username = in_username;
IF NOT FOUND THEN
raise exception 'User not found.';
ELSIF FOUND THEN
IF in_drop_role IS TRUE then
stmt := ' drop user ' || quote_ident(a_user.username);
execute stmt;
END IF;
-- also gets user_connection
delete from user_preference where id = (
select id from users where entity_id = a_user.entity_id);
delete from users where entity_id = a_user.entity_id;
return 1;
END IF;
END;
$$ language 'plpgsql' SECURITY DEFINER;
REVOKE EXECUTE ON FUNCTION admin__delete_user(in_username TEXT,
in_drop_role bool) from public;
comment on function admin__delete_user(text, bool) is $$
Drops the provided user, as well as deletes the user configuration data.
It leaves the entity and person references.
If in_drop_role is set, it drops the role too.
$$;
-- Work in progress, not for ducmenting yet.
CREATE OR REPLACE FUNCTION admin__delete_group (in_group_name TEXT) returns bool as $$
DECLARE
stmt text;
a_role role_view;
group_name text;
BEGIN
select * into a_role from role_view where rolname = in_group_name;
if not found then
return 'f'::bool;
else
group_name := lsmb__role(in_group_name);
stmt := 'drop role lsmb_' || quote_ident(group_name);
execute stmt;
return 't'::bool;
end if;
END;
$$ language 'plpgsql' SECURITY DEFINER;
REVOKE EXECUTE on function admin__delete_group(text) from public;
comment on function admin__delete_group(text) IS $$
Deletes the input group from the database. Not designed to be used to
remove a login-capable user.
$$;
create or replace function admin__is_user (in_user text) returns bool as $$
BEGIN
PERFORM * from users where username = in_user;
RETURN found;
END;
$$ language plpgsql;
COMMENT ON function admin__is_user (in_user text) IS
$$ Returns true if user is set up in LedgerSMB. False otherwise.$$;
create or replace view user_listable as
select
u.id,
u.username,
e.created
from entity e
join users u on u.entity_id = e.id;
create or replace function user__get_all_users () returns setof user_listable as $$
select * from user_listable;
$$ language sql;
create or replace function admin__get_roles () returns setof pg_roles as $$
SELECT *
FROM
pg_roles
WHERE
rolname ~ ('^' || lsmb__role_prefix())
AND NOT rolcanlogin
ORDER BY rolname ASC
$$ language sql;
create or replace function user__save_preferences(
in_dateformat text,
in_numberformat text,
in_language text,
in_stylesheet text,
in_printer text
) returns bool as
$$
BEGIN
UPDATE user_preference
SET dateformat = in_dateformat,
numberformat = in_numberformat,
language = in_language,
stylesheet = in_stylesheet,
printer = in_printer
WHERE id = (select id from users where username = SESSION_USER);
RETURN FOUND;
END;
$$ language plpgsql;
COMMENT ON function user__save_preferences(
in_dateformat text,
in_numberformat text,
in_language text,
in_stylesheet text,
in_printer text
) IS
$$ Saves user preferences. Returns true if successful, false if no preferences
were found to update.$$;
DROP FUNCTION IF EXISTS user__get_preferences (in_user_id int);
create or replace function user__get_preferences (in_user_id int) returns user_preference as $$
declare
v_row user_preference;
BEGIN
select * into v_row from user_preference where id = in_user_id;
IF NOT FOUND THEN
RAISE EXCEPTION 'Could not find user preferences for id %', in_user_id;
ELSE
return v_row;
END IF;
END;
$$ language plpgsql;
COMMENT ON function user__get_preferences (in_user_id int) IS
$$ Returns the preferences row for the user.$$;
DROP TYPE if exists user_result CASCADE;
CREATE TYPE user_result AS (
id int,
username text,
first_name text,
last_name text,
ssn text,
dob date
);
CREATE OR REPLACE FUNCTION admin__search_users(in_username text, in_first_name text, in_last_name text, in_ssn text, in_dob date) RETURNS SETOF user_result AS
$$
SELECT u.id, u.username, p.first_name, p.last_name, e.ssn, e.dob
FROM users u
JOIN person p ON (u.entity_id = p.entity_id)
JOIN entity_employee e ON (e.entity_id = p.entity_id)
WHERE u.username LIKE '%' || coalesce(in_username,'') || '%' AND
(p.first_name = in_first_name or in_first_name is null)
AND (p.last_name = in_last_name or in_last_name is null)
AND (in_ssn is NULL or in_ssn = e.ssn)
AND (e.dob = in_dob::date or in_dob is NULL)
$$ LANGUAGE SQL;
COMMENT ON FUNCTION admin__search_users(in_username text, in_first_name text, in_last_name text, in_ssn text, in_dob date) IS
$$ Returns a list of users matching search criteria. Nulls match all values.
only username is not an exact match.$$;
DROP TYPE if exists session_result CASCADE;
CREATE TYPE session_result AS (
id int,
username text,
last_used timestamp,
locks_active bigint
);
CREATE OR REPLACE FUNCTION admin__list_sessions() RETURNS SETOF session_result
AS $$
SELECT s.session_id, u.username, s.last_used, count(t.id)
FROM "session" s
JOIN users u ON (s.users_id = u.id)
LEFT JOIN transactions t ON (t.locked_by = s.session_id)
GROUP BY s.session_id, u.username, s.last_used
ORDER BY u.username;
$$ LANGUAGE SQL;
COMMENT ON FUNCTION admin__list_sessions() IS
$$ Lists all active sessions.$$;
CREATE OR REPLACE FUNCTION admin__drop_session(in_session_id int) RETURNS bool AS
$$
BEGIN
DELETE FROM "session" WHERE session_id = in_session_id;
RETURN FOUND;
END;
$$ language plpgsql;
COMMENT ON FUNCTION admin__drop_session(in_session_id int) IS
$$ Drops the session identified, releasing all locks held.$$;
update defaults set value = 'yes' where setting_key = 'module_load_ok';
COMMIT;
|
-- @testpoint:openGauss保留关键字Asc同时作为表名和列名带引号,并进行dml操作,Asc列的值最终显示为1000
drop table if exists "Asc";
create table "Asc"(
c_id int, c_int int, c_integer integer, c_bool int, c_boolean int, c_bigint integer,
c_real real, c_double real,
c_decimal decimal(38), c_number number(38), c_numeric numeric(38),
c_char char(50) default null, c_varchar varchar(20), c_varchar2 varchar2(4000),
c_date date, c_datetime date, c_timestamp timestamp,
"Asc" varchar(100) default 'Asc'
)
PARTITION BY RANGE (c_integer)
(
partition P_20180121 values less than (0),
partition P_20190122 values less than (50000),
partition P_20200123 values less than (100000),
partition P_max values less than (maxvalue)
);
--插入数据
insert into "Asc"(c_id,"Asc") values(1,'hello');
insert into "Asc"(c_id,"Asc") values(2,'china');
--更新表数据
update "Asc" set "Asc"=1000 where "Asc"='hello';
--清理表数据
delete from "Asc" where "Asc"='china';
--查看表数据
select "Asc" from "Asc" where "Asc"!='hello' order by "Asc";
--清理环境
drop table "Asc";
|
CREATE TABLE COUNTRY
(
COUNTRYCODE VARCHAR2(5 BYTE) NOT NULL,
COUNTRYNAME VARCHAR2(30 BYTE) NOT NULL
)
TABLESPACE USERS
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
);
CREATE UNIQUE INDEX COUNTRY_PK ON COUNTRY
(COUNTRYCODE)
TABLESPACE USERS
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
);
ALTER TABLE COUNTRY ADD (
CONSTRAINT COUNTRY_PK
PRIMARY KEY
(COUNTRYCODE)
USING INDEX
TABLESPACE USERS
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
));
CREATE TABLE CUSTOMERS
(
CUSTOMERID VARCHAR2(5 BYTE) NOT NULL,
COMPANYNAME VARCHAR2(40 BYTE) NOT NULL,
CONTACTNAME VARCHAR2(30 BYTE),
CONTACTTITLE VARCHAR2(30 BYTE),
ADDRESS VARCHAR2(60 BYTE),
CITY VARCHAR2(20 BYTE),
REGION VARCHAR2(15 BYTE),
POSTALCODE VARCHAR2(10 BYTE),
COUNTRY VARCHAR2(15 BYTE),
PHONE VARCHAR2(24 BYTE),
FAX VARCHAR2(24 BYTE)
)
TABLESPACE USERS
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
);
CREATE UNIQUE INDEX PK_CUSTOMERID ON CUSTOMERS
(CUSTOMERID)
TABLESPACE USERS
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
);
ALTER TABLE CUSTOMERS ADD (
CONSTRAINT PK_CUSTOMERID
PRIMARY KEY
(CUSTOMERID)
USING INDEX
TABLESPACE USERS
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
));
CREATE TABLE DEBITS
(
DEBITID INTEGER,
ACCOUNTID CHAR(20 BYTE) NOT NULL,
AMOUNT INTEGER NOT NULL
)
TABLESPACE USERS
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
);
CREATE UNIQUE INDEX DEBITS_PK ON DEBITS
(DEBITID)
TABLESPACE USERS
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
);
ALTER TABLE DEBITS ADD (
CONSTRAINT DEBITS_PK
PRIMARY KEY
(DEBITID)
USING INDEX
TABLESPACE USERS
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
));
CREATE TABLE EMPLOYEES
(
EMPLOYEEID INTEGER NOT NULL,
LASTNAME VARCHAR2(20 BYTE) NOT NULL,
FIRSTNAME VARCHAR2(10 BYTE) NOT NULL,
TITLE VARCHAR2(30 BYTE),
TITLEOFCOURTESY VARCHAR2(25 BYTE),
BIRTHDATE DATE,
HIREDATE DATE,
ADDRESS VARCHAR2(60 BYTE),
CITY VARCHAR2(15 BYTE),
REGION VARCHAR2(15 BYTE),
POSTALCODE VARCHAR2(10 BYTE),
COUNTRY VARCHAR2(15 BYTE),
HOMEPHONE VARCHAR2(24 BYTE),
EXTENSION VARCHAR2(4 BYTE),
REPORTSTO INTEGER,
AGE INTEGER
)
TABLESPACE USERS
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
);
CREATE UNIQUE INDEX PK_EMPLOYEEID ON EMPLOYEES
(EMPLOYEEID)
TABLESPACE USERS
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
);
ALTER TABLE EMPLOYEES ADD (
CONSTRAINT PK_EMPLOYEEID
PRIMARY KEY
(EMPLOYEEID)
USING INDEX
TABLESPACE USERS
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
));
ALTER TABLE EMPLOYEES ADD (
CONSTRAINT FK_EMPLOYEES_EMPLOYEEID
FOREIGN KEY (REPORTSTO)
REFERENCES EMPLOYEES (EMPLOYEEID));
CREATE TABLE PRODUCTS
(
PRODUCTID INTEGER,
PRODUCTNAME VARCHAR2(50 BYTE),
CATEGORYID INTEGER,
UNITPRICE INTEGER NOT NULL,
LASTUPDATE DATE
)
TABLESPACE USERS
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
);
CREATE UNIQUE INDEX PRODUCTS_KEY ON PRODUCTS
(PRODUCTID)
TABLESPACE USERS
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
);
ALTER TABLE PRODUCTS ADD (
CONSTRAINT PRODUCTS_KEY
PRIMARY KEY
(PRODUCTID)
USING INDEX
TABLESPACE USERS
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
));
CREATE TABLE SIMPLEDATATYPE
(
COL1 VARCHAR2(20 BYTE),
COL2 CHAR(20 BYTE),
COL3 NUMBER,
COL4 INTEGER,
COL5 DATE,
COL6 LONG,
COL7 RAW(10),
COL8 NVARCHAR2(10),
COL9 NCHAR(10),
COL10 FLOAT(126),
COL11 INTEGER,
COL12 INTEGER,
COL13 INTEGER,
COL14 FLOAT(63),
COL15 INTEGER,
COL16 VARCHAR2(1 BYTE)
)
TABLESPACE USERS
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
);
CREATE TABLE ORDERS
(
ORDERID INTEGER NOT NULL,
CUSTOMERID VARCHAR2 (5 BYTE) NULL,
EMPLOYEEID INTEGER NULL,
ORDERDATE DATE NULL,
REQUIREDDATE DATE NULL,
SHIPPEDDATE DATE NULL,
SHIPVIA INTEGER NULL,
FREIGHT NUMBER DEFAULT 0 NULL ,
SHIPNAME NVARCHAR2 (80) NULL,
SHIPADDRESS NVARCHAR2 (120) NULL,
SHIPCITY NVARCHAR2 (30) NULL,
SHIPREGION NVARCHAR2 (30) NULL,
SHIPPOSTALCODE NVARCHAR2 (20) NULL,
SHIPCOUNTRY NVARCHAR2 (30) NULL,
CONSTRAINT FK_Orders_Customers FOREIGN KEY (CUSTOMERID) REFERENCES CUSTOMERS (CUSTOMERID),
CONSTRAINT FK_Orders_Employees FOREIGN KEY (EMPLOYEEID) REFERENCES EMPLOYEES (EMPLOYEEID)
)
TABLESPACE USERS
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
);
CREATE UNIQUE INDEX PK_ORDERID ON ORDERS
(ORDERID)
TABLESPACE USERS
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
);
ALTER TABLE ORDERS ADD (
CONSTRAINT PK_ORDERID
PRIMARY KEY
(ORDERID)
USING INDEX
TABLESPACE USERS
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
));
|
-- file:jsonb.sql ln:277 expect:true
SELECT jsonb_exists_any('{"a":null, "b":"qq"}', '{}'::text[])
|
call p_insertStudents("William", "Dice",
"779 Lebanon Rd.", "Frisco", "TX", "75034",
"william.dice", "williamdice");
|
SELECT "IGlocations2_2"."State (copy)" AS "State (copy)" FROM "IGlocations2_2" GROUP BY 1 ORDER BY "State (copy)" ASC;
|
-- Python for Everybody Database Handout
-- https://www.py4e.com/lectures3/Pythonlearn-15-Database-Handout.txt
-- Download and Install: http://sqlitebrowser.org/
-- Single Table SQL
CREATE TABLE "Users" ("name" TEXT, "email" TEXT)
INSERT INTO Users (name, email) VALUES ('Chuck', 'csev@umich.edu')
INSERT INTO Users (name, email) VALUES ('Colleen', 'cvl@umich.edu')
INSERT INTO Users (name, email) VALUES ('Ted', 'ted@umich.edu')
INSERT INTO Users (name, email) VALUES ('Sally', 'a1@umich.edu')
INSERT INTO Users (name, email) VALUES ('Ted', 'ted@umich.edu')
INSERT INTO Users (name, email) VALUES ('Kristen', 'kf@umich.edu')
DELETE FROM Users WHERE email='ted@umich.edu'
UPDATE Users SET name="Charles" WHERE email='csev@umich.edu'
SELECT * FROM Users
SELECT * FROM Users WHERE email='csev@umich.edu'
SELECT * FROM Users ORDER BY email
SELECT * FROM Users ORDER BY name DESC
-- Multi-Table SQL:
CREATE TABLE "Artist" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE,
"name" TEXT)
CREATE TABLE "Album" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE,
artist_id INTEGER,
"title" TEXT)
CREATE TABLE "Genre" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE,
"name" TEXT)
CREATE TABLE "Track" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE,
album_id INTEGER, genre_id INTEGER, len INTEGER, rating INTEGER,
"title" TEXT, "count" INTEGER)
INSERT INTO Artist (name) VALUES ('Led Zepplin')
INSERT INTO Artist (name) VALUES ('AC/DC')
INSERT INTO Genre (name) VALUES ('Rock') ;
INSERT INTO Genre (name) VALUES ('Metal');
INSERT INTO Album (title, artist_id) VALUES ('Who Made Who', 2);
INSERT INTO Album (title, artist_id) VALUES ('IV', 1);
INSERT INTO Track (title, rating, len, count, album_id, genre_id)
VALUES ('Black Dog', 5, 297, 0, 2, 1) ;
INSERT INTO Track (title, rating, len, count, album_id, genre_id)
VALUES ('Stairway', 5, 482, 0, 2, 1) ;
INSERT INTO Track (title, rating, len, count, album_id, genre_id)
VALUES ('About to Rock', 5, 313, 0, 1, 2) ;
INSERT INTO Track (title, rating, len, count, album_id, genre_id)
VALUES ('Who Made Who', 5, 207, 0, 1, 2) ;
SELECT Album.title, Artist.name FROM Album JOIN Artist
ON Album.artist_id = Artist.id
SELECT Album.title, Album.artist_id, Artist.id, Artist.name
FROM Album JOIN Artist ON Album.artist_id = Artist.id
SELECT Track.title, Track.genre_id, Genre.id, Genre.name
FROM Track JOIN Genre
SELECT Track.title, Genre.name FROM Track JOIN Genre
ON Track.genre_id = Genre.id
SELECT Track.title, Artist.name, Album.title, Genre.name
FROM Track JOIN Genre JOIN Album JOIN Artist
ON Track.genre_id = Genre.id AND Track.album_id = Album.id
AND Album.artist_id = Artist.id
-- Many-Many Relationship
CREATE TABLE User (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
name TEXT UNIQUE,
email TEXT
) ;
CREATE TABLE Course (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
title TEXT UNIQUE
) ;
CREATE TABLE Member (
user_id INTEGER,
course_id INTEGER,
role INTEGER,
PRIMARY KEY (user_id, course_id)
) ;
INSERT INTO User (name, email) VALUES ('Jane', 'jane@tsugi.org');
INSERT INTO User (name, email) VALUES ('Ed', 'ed@tsugi.org');
INSERT INTO User (name, email) VALUES ('Sue', 'sue@tsugi.org');
INSERT INTO Course (title) VALUES ('Python');
INSERT INTO Course (title) VALUES ('SQL');
INSERT INTO Course (title) VALUES ('PHP');
INSERT INTO Member (user_id, course_id, role) VALUES (1, 1, 1);
INSERT INTO Member (user_id, course_id, role) VALUES (2, 1, 0);
INSERT INTO Member (user_id, course_id, role) VALUES (3, 1, 0);
INSERT INTO Member (user_id, course_id, role) VALUES (1, 2, 0);
INSERT INTO Member (user_id, course_id, role) VALUES (2, 2, 1);
INSERT INTO Member (user_id, course_id, role) VALUES (2, 3, 1);
INSERT INTO Member (user_id, course_id, role) VALUES (3, 3, 0);
SELECT User.name, Member.role, Course.title
FROM User JOIN Member JOIN Course
ON Member.user_id = User.id AND Member.course_id = Course.id
ORDER BY Course.title, Member.role DESC, User.name
|
-- Code is reviewed and is in working condition
/*
Activity A - 1
Scenario:
Let’s say that we have two customers Mike and John and two database users each for our two customers. (Created in previous exercise).
You have to implement Row Level Security so each customer should only be able to view and edit their records.
The user CustomerAdmin is allowed to view and edit all customer records.
*/
-- Create Customer table and populate with dummy data
CREATE TABLE Customers
(
CustomerID int identity,
Name sysname,
CreditCardNumber varchar(100),
Phone varchar(100),
Email varchar(100)
)
Go
INSERT INTO Customers VALUES
('Mike',0987654312345678,9876543210,'mike@outlook.com'),
('Mike',0987654356784567,9876549870,'mike1@outlook.com'),
('Mike',0984567431234567,9876567210,'mike2@outlook.com'),
('John@dataplatformlabs.com',0987654312345678,9876246210,'john@outlook.com'),
('John@dataplatformlabs.com',0987654123784567,9876656870,'john2@outlook.com'),
('John@dataplatformlabs.com',09856787431234567,9876467210,'john3@outlook.com'),
('CustomerAdmin',0987654312235578,9873456210,'john@outlook.com'),
('CustomerAdmin',0984564123784567,9872436870,'mike2@outlook.com'),
('CustomerAdmin',0945677874312367,9872427210,'chris3@outlook.com')
-- Create a contained database user without login
CREATE USER CustomerAdmin WITHOUT LOGIN
-- Grant read access to Customers table to Mike, John and CustomerAdmin
GRANT SELECT ON dbo.Customers TO Mike
GO
GRANT SELECT ON dbo.Customers TO [john@aadityarama26gmail.onmicrosoft.com]
GO
GRANT SELECT ON dbo.Customers TO CustomerAdmin
-- Create security predicate to filter out the rows based on the logged in user
CREATE SCHEMA Security;
GO
CREATE FUNCTION Security.fn_securitypredicate(@Customer AS sysname)
RETURNS TABLE
WITH SCHEMABINDING
AS
RETURN SELECT 1 AS predicateresult
WHERE @Customer = USER_NAME() OR USER_NAME() = 'CustomerAdmin';
GO
-- Create and apply the security profile
CREATE SECURITY POLICY CustomerFilter
ADD FILTER PREDICATE Security.fn_securitypredicate(Name)
ON dbo.Customers,
ADD BLOCK PREDICATE Security.fn_securitypredicate(Name)
ON dbo.Customers AFTER INSERT
WITH (STATE = ON);
-- What Mike sees!!!
EXECUTE AS USER='Mike'
GO
SELECT USER_NAME()
GO
SELECT * FROM dbo.Customers
-- What Mike can update!!!
EXECUTE AS USER='Mike'
GO
SELECT USER_NAME()
GO
-- CustomerID 11 belongs to John
UPDATE dbo.Customers SET Email='MikeBlue@outlook.com' WHERE
CustomerID=11
GO
-- Switch User context to John
EXECUTE AS USER='john@aadityarama26gmail.onmicrosoft.com'
GO
SELECT USER_NAME()
GO
-- Verify if email is updated or not
SELECT * FROM dbo.Customers WHERE CustomerID=11
-- What Mike can insert!!!
EXECUTE AS USER='Mike'
GO
SELECT USER_NAME()
GO
INSERT INTO dbo.Customers
VALUES('john@aadityarama26gmail.onmicrosoft.com',9876543445345678,65412396852,'Mike@dataplatformlabs.com')
-- What CustomerAdmin sees!!!
REVERT;
GO
EXECUTE AS USER='CustomerAdmin'
GO
SELECT USER_NAME()
GO
SELECT * FROM dbo.Customers
-- Switch off the security policy
ALTER SECURITY POLICY CustomerFilter
WITH (STATE = OFF);
|
-- schema.test
--
-- execsql {
-- DROP TRIGGER abc_trig;
-- }
DROP TRIGGER abc_trig;
|
create table
test_normalization.`nested_stream_with_co__lting_into_long_names__dbt_tmp`
as (
-- Final base SQL model
select
id,
`date`,
`partition`,
_airbyte_emitted_at,
_airbyte_nested_strea__nto_long_names_hashid
from test_normalization.`nested_stream_with_co_1g_into_long_names_scd`
-- nested_stream_with_co__lting_into_long_names from test_normalization._airbyte_raw_nested_s__lting_into_long_names
where _airbyte_active_row = True
)
|
begin transaction;
--
-- Dumping data for table competitions
--
INSERT INTO competitions (compID, compName_en, compName_fr, compWeight, compResultsLink) VALUES
(1, 'Scavenger Hunt / Puzzle Heros', 'Chasse au trésor / Casse-tête du Héro', 10, NULL),
(2, 'Long running', 'Longue haleine', 8, NULL),
(3, 'Extreme Programming', 'Programmation Extrême', 6, NULL),
(4, 'Artificial Intelligence', 'Intelligence Artificielle', 7, NULL),
(5, 'Algorithmie', 'Algorithmic', 5, NULL),
(6, 'Relay Programming', 'Programmation à relais', 5, NULL),
(7, 'Operating System', 'Système d’exploitation', 5, NULL),
(8, 'Compilation', 'Compilation', 7, NULL),
(9, 'Software Engineering', 'Ingénierie logicielle', 6, NULL),
(10, 'Theoretical Computer Science ', 'Informatique Théorique', 5, NULL),
(11, 'Web Developpement', 'Programmation Web', 5, NULL),
(12, 'Sport & Video Game', 'Sport & Jeux Vidéo', 7, NULL),
(13, 'Reverse Ingeneering', 'Rétroingenerie', 5, NULL),
(14, 'Debugging', 'Débogage', 6, NULL),
(15, 'Mobile development', 'Developpement Mobile', 5, NULL),
(16, 'Parallel programming', 'Parallélisme', 5, NULL),
(17, 'Participation', 'Participation', 3, NULL);
-- --------------------------------------------------------
--
-- Dumping data for table delegations
--
INSERT INTO delegations (delegID, delegUniversity, delegAddress1, delegAddress2, delegAddress3, delegCity, delegProv, delegCountry, delegPostal, delegUsername, delegPassword, regIsCancelled, regDate, regCancelDate, hotelDetails, extraHotelRooms, extraHotelNights, delegAlias, delegLanguage, didFlashOut, flashOutFile, adminNotes, excludeFromOverallResults, delegSite) VALUES
(1, 'École de Technologie Supérieure1', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'StuxnETS', 'en', 0, NULL, NULL, 0, NULL),
(2, 'École de Technologie Supérieure2', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'BotnETS', 'en', 0, NULL, NULL, 0, NULL),
(3, 'Brock1', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'Clone University', 'en', 0, NULL, NULL, 0, NULL),
(4, 'Brock2', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'Clone High', 'en', 0, NULL, NULL, 0, NULL),
(5, 'Concordia1', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'Arcologists', 'en', 0, NULL, NULL, 0, NULL),
(6, 'Concordia2', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'Darth Raiders', 'en', 0, NULL, NULL, 0, NULL),
(7, 'Laurentian1', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'New Sudbury Republic', 'en', 0, NULL, NULL, 0, NULL),
(8, 'Laurentian2', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'Vault lul', 'en', 0, NULL, NULL, 0, NULL),
(9, 'Laval1', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'Code troopers ulaval legion 1', 'en', 0, NULL, NULL, 0, NULL),
(10, 'Laval2', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'Code troopers ulaval legion 2', 'en', 0, NULL, NULL, 0, NULL),
(11, 'Manitoba1', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'District HEX', 'en', 0, NULL, NULL, 0, NULL),
(12, 'Manitoba2', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'HEX-men', 'en', 0, NULL, NULL, 0, NULL),
(13, 'MCGill', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'while (e_coyote) {}', 'en', 0, NULL, NULL, 0, NULL),
(14, 'Ottawa', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'Yoga Rebels', 'en', 0, NULL, NULL, 0, NULL),
(15, 'Poly1', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'PolyBlue', 'en', 0, NULL, NULL, 0, NULL),
(16, 'Poly2', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'PolyRed', 'en', 0, NULL, NULL, 0, NULL),
(17, 'Queens', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'Additional Pylons', 'en', 0, NULL, NULL, 0, NULL),
(18, 'Rochester1', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'White Hats', 'en', 0, NULL, NULL, 0, NULL),
(19, 'Rochester2', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'Black Hats', 'en', 0, NULL, NULL, 0, NULL),
(20, 'Sherbrooke1', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'JDIs', 'en', 0, NULL, NULL, 0, NULL),
(21, 'Sherbrooke2', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'Dark JDIs', 'en', 0, NULL, NULL, 0, NULL),
(22, 'UDEM', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'Garbage Collectors', 'en', 0, NULL, NULL, 0, NULL),
(23, 'UQAC', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'The John C#', 'en', 0, NULL, NULL, 0, NULL),
(24, 'UQAM1', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'LispMachine', 'en', 0, NULL, NULL, 0, NULL),
(25, 'UQAM2', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'ApocaLISP', 'en', 0, NULL, NULL, 0, NULL),
(26, 'UQO', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'REI', 'en', 0, NULL, NULL, 0, NULL),
(27, 'Windsor1', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'Tsintax Error', 'en', 0, NULL, NULL, 0, NULL),
(28, 'Windsor2', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'Dub City', 'en', 0, NULL, NULL, 0, NULL),
(29, 'York1', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'FluffyHackers', 'en', 0, NULL, NULL, 0, NULL),
(30, 'York2', '', NULL, NULL, '', NULL, 'Canada', NULL, '', '', 0, 'unknown', NULL, NULL, 0, 0, 'Fluffy hackers 2', 'en', 0, NULL, NULL, 0, NULL);
-- --------------------------------------------------------
--
-- Dumping data for table compscores
--
INSERT INTO compscores (compID, delegID, teamScore) VALUES
(10, 1, 18.478260869565),
(10, 2, 4.3478260869565),
(10, 3, 20.652173913043),
(10, 4, 14.130434782609),
(10, 5, 31.521739130435),
(10, 6, 16.304347826087),
(10, 7, 50),
(10, 8, 32.608695652174),
(10, 9, 70.652173913043),
(10, 10, 21.739130434783),
(10, 11, 50),
(10, 12, 19.565217391304),
(10, 13, 22.826086956522),
(10, 14, 6.5217391304348),
(10, 15, 78.260869565217),
(10, 16, 59.782608695652),
(10, 17, 47.826086956522),
(10, 18, 75),
(10, 19, 100),
(10, 20, 23.913043478261),
(10, 21, 50),
(10, 22, 71.739130434783),
(10, 23, 32.608695652174),
(10, 24, 28.260869565217),
(10, 25, 8.695652173913),
(10, 26, 8.695652173913),
(10, 27, 16.304347826087),
(10, 28, 45.652173913043),
(10, 29, 10.869565217391),
(10, 30, 8.695652173913),
(3, 1, 74.761491760624),
(3, 2, 74.154379878578),
(3, 3, 70.771899392888),
(3, 4, 28.100607111882),
(3, 5, 100),
(3, 6, 47.441457068517),
(3, 7, 55.160450997398),
(3, 8, 34.518647007806),
(3, 9, 33.651344319167),
(3, 10, 29.748482220295),
(3, 11, 34.345186470078),
(3, 12, 82.914137033825),
(3, 13, 0),
(3, 14, 48.308759757155),
(3, 15, 37.901127493495),
(3, 16, 73.287077189939),
(3, 17, 51.864700780572),
(3, 18, 56.201214223764),
(3, 19, 99.566348655681),
(3, 20, 34.60537727667),
(3, 21, 25.845620121422),
(3, 22, 71.205550737207),
(3, 23, 39.288811795317),
(3, 24, 20.988725065048),
(3, 25, 27.753686036427),
(3, 26, 8.1526452732003),
(3, 27, 33.130962705984),
(3, 28, 82.046834345186),
(3, 29, 24.631396357329),
(3, 30, 33.47788378144),
(14, 1, 85.747303543914),
(14, 2, 6.4714946070878),
(14, 3, 4.1602465331279),
(14, 4, 0),
(14, 5, 34.514637904468),
(14, 6, 0),
(14, 7, 0),
(14, 8, 0),
(14, 9, 3.6979969183359),
(14, 10, 0),
(14, 11, 15.716486902928),
(14, 12, 0),
(14, 13, 55.161787365177),
(14, 14, 12.326656394453),
(14, 15, 7.3959938366718),
(14, 16, 16.949152542373),
(14, 17, 0.30816640986133),
(14, 18, 22.650231124807),
(14, 19, 12.018489984592),
(14, 20, 12.326656394453),
(14, 21, 100),
(14, 22, 24.345146379045),
(14, 23, 9.7072419106317),
(14, 24, 4.9306625577812),
(14, 25, 32.6656394453),
(14, 26, 3.0816640986133),
(14, 27, 0.15408320493066),
(14, 28, 0.46224961479199),
(14, 29, 0),
(14, 30, 0),
(16, 1, 100),
(16, 2, 10),
(16, 3, 20),
(16, 4, 30),
(16, 5, 40),
(16, 6, 20),
(16, 7, 20),
(16, 8, 20),
(16, 9, 50),
(16, 10, 20),
(16, 11, 50),
(16, 12, 0),
(16, 13, 20),
(16, 14, 20),
(16, 15, 30),
(16, 16, 40),
(16, 17, 30),
(16, 18, 10),
(16, 19, 70),
(16, 20, 80),
(16, 21, 30),
(16, 22, 10),
(16, 23, 90),
(16, 24, 40),
(16, 25, 30),
(16, 26, 10),
(16, 27, 20),
(16, 28, 70),
(16, 29, 10),
(16, 30, 20),
(9, 3, 44),
(9, 2, 100),
(9, 1, 56),
(9, 4, 0),
(9, 5, 68),
(9, 6, 40),
(9, 7, 40),
(9, 8, 36),
(9, 9, 98),
(9, 10, 76),
(9, 11, 52),
(9, 12, 40),
(9, 13, 0),
(9, 14, 32),
(9, 15, 36),
(9, 16, 80),
(9, 17, 24),
(9, 18, 64),
(9, 19, 36),
(9, 20, 44),
(9, 21, 72),
(9, 22, 36),
(9, 23, 88),
(9, 24, 96),
(9, 25, 32),
(9, 26, 28),
(9, 27, 0),
(9, 28, 0),
(9, 29, 12),
(9, 30, 16),
(12, 1, 90.4),
(12, 2, 54.666666666667),
(12, 3, 23.733333333333),
(12, 4, 67.733333333333),
(12, 5, 59.466666666667),
(12, 6, 35.466666666667),
(12, 7, 37.866666666667),
(12, 8, 33.866666666667),
(12, 9, 70.933333333333),
(12, 10, 66.666666666667),
(12, 11, 54.933333333333),
(12, 12, 54.666666666667),
(12, 13, 0),
(12, 14, 68.8),
(12, 15, 100),
(12, 16, 91.2),
(12, 17, 56.533333333333),
(12, 18, 57.066666666667),
(12, 19, 54.933333333333),
(12, 20, 38.133333333333),
(12, 21, 65.066666666667),
(12, 22, 65.066666666667),
(12, 23, 77.866666666667),
(12, 24, 24.8),
(12, 25, 62.133333333333),
(12, 26, 67.466666666667),
(12, 27, 25.333333333333),
(12, 28, 70.133333333333),
(12, 29, 0),
(12, 30, 0),
(6, 1, 94.444444444444),
(6, 2, 9.2592592592593),
(6, 3, 33.333333333333),
(6, 4, 13.888888888889),
(6, 5, 100),
(6, 6, 23.148148148148),
(6, 7, 35.185185185185),
(6, 8, 16.666666666667),
(6, 9, 41.666666666667),
(6, 10, 46.296296296296),
(6, 11, 13.888888888889),
(6, 12, 6.4814814814815),
(6, 13, 0),
(6, 14, 87.037037037037),
(6, 15, 19.444444444444),
(6, 16, 58.333333333333),
(6, 17, 13.888888888889),
(6, 18, 55.555555555556),
(6, 19, 21.296296296296),
(6, 20, 90.740740740741),
(6, 21, 71.296296296296),
(6, 22, 23.148148148148),
(6, 23, 68.518518518519),
(6, 24, 18.518518518519),
(6, 25, 0),
(6, 26, 0),
(6, 27, 0.92592592592593),
(6, 28, 0),
(6, 29, 0),
(6, 30, 0),
(1, 1, 100),
(1, 2, 98.206218442732),
(1, 3, 0),
(1, 4, 0.41190539463194),
(1, 5, 82.261493489237),
(1, 6, 78.673930374701),
(1, 7, 43.462662769067),
(1, 8, 44.658517140579),
(1, 9, 78.740366728674),
(1, 10, 71.61838958278),
(1, 11, 40.805208610151),
(1, 12, 37.483390911507),
(1, 13, 0),
(1, 14, 42.798299229338),
(1, 15, 62.596332713261),
(1, 16, 62.729205421206),
(1, 17, 51.435025245815),
(1, 18, 96.213127823545),
(1, 19, 97.143236779166),
(1, 20, 62.596332713261),
(1, 21, 58.743024182833),
(1, 22, 40.53946319426),
(1, 23, 64.456550624502),
(1, 24, 67.645495615201),
(1, 25, 66.848259367526),
(1, 26, 45.854371512091),
(1, 27, 16.88812117991),
(1, 28, 47.050225883604),
(1, 29, 20.143502524581),
(1, 30, 12.357161838958),
(4, 1, 50),
(4, 2, 60),
(4, 3, 5),
(4, 4, 50),
(4, 5, 10),
(4, 6, 55),
(4, 7, 50),
(4, 8, 5),
(4, 9, 50),
(4, 10, 80),
(4, 11, 15),
(4, 12, 15),
(4, 13, 5),
(4, 14, 60),
(4, 15, 60),
(4, 16, 50),
(4, 17, 60),
(4, 18, 5),
(4, 19, 70),
(4, 20, 30),
(4, 21, 100),
(4, 22, 50),
(4, 23, 50),
(4, 24, 15),
(4, 25, 15),
(4, 26, 0),
(4, 27, 10),
(4, 28, 5),
(4, 29, 65),
(4, 30, 0),
(15, 7, 29.1),
(15, 6, 39.3),
(15, 5, 63.5),
(15, 4, 5),
(15, 3, 10),
(15, 2, 59),
(15, 1, 95),
(15, 8, 13.5),
(15, 9, 39.3),
(15, 10, 0),
(15, 11, 29.5),
(15, 12, 12),
(15, 13, 0),
(15, 14, 28.6),
(15, 15, 30.8),
(15, 16, 26.9),
(15, 17, 28),
(15, 18, 10.7),
(15, 19, 100),
(15, 20, 41.5),
(15, 21, 17),
(15, 22, 48.5),
(15, 23, 62.5),
(15, 24, 52),
(15, 25, 0),
(15, 26, 27.5),
(15, 27, 0),
(15, 28, 0),
(15, 29, 0),
(15, 30, 48.5),
(13, 1, 100),
(13, 2, 28.260869565217),
(13, 3, 8.695652173913),
(13, 4, 0),
(13, 5, 30.434782608696),
(13, 6, 3.9130434782609),
(13, 7, 17.391304347826),
(13, 8, 8.695652173913),
(13, 9, 15.217391304348),
(13, 10, 8.695652173913),
(13, 11, 13.04347826087),
(13, 12, 0),
(13, 13, 0),
(13, 14, 4.3478260869565),
(13, 15, 13.04347826087),
(13, 16, 19.565217391304),
(13, 17, 10.826086956522),
(13, 18, 43.478260869565),
(13, 19, 99.565217391304),
(13, 20, 26.086956521739),
(13, 21, 18.695652173913),
(13, 22, 15.217391304348),
(13, 23, 17.391304347826),
(13, 24, 17.391304347826),
(13, 25, 4.3478260869565),
(13, 26, 0),
(13, 27, 0),
(13, 28, 0),
(13, 29, 0),
(13, 30, 8.695652173913),
(7, 1, 100),
(7, 2, 10),
(7, 3, 12),
(7, 4, 3),
(7, 5, 25),
(7, 6, 2),
(7, 7, 3),
(7, 8, 1),
(7, 9, 2),
(7, 10, 6),
(7, 11, 10),
(7, 12, 3),
(7, 13, 0),
(7, 14, 35),
(7, 15, 0),
(7, 16, 14),
(7, 17, 8),
(7, 18, 37),
(7, 19, 45),
(7, 20, 23),
(7, 21, 33),
(7, 22, 0),
(7, 23, 2),
(7, 24, 20),
(7, 25, 18),
(7, 26, 3),
(7, 27, 0),
(7, 28, 0),
(7, 29, 2),
(7, 30, 0),
(17, 30, 26.923076923077),
(17, 29, 26.923076923077),
(17, 28, 15.384615384615),
(17, 27, 15.384615384615),
(17, 26, 26.923076923077),
(17, 25, 76.923076923077),
(17, 24, 76.923076923077),
(17, 23, 76.923076923077),
(17, 22, 65.384615384615),
(17, 21, 92.307692307692),
(17, 20, 92.307692307692),
(17, 19, 46.153846153846),
(17, 18, 46.153846153846),
(17, 17, 57.692307692308),
(17, 16, 69.230769230769),
(17, 15, 69.230769230769),
(17, 14, 46.153846153846),
(17, 13, 30.769230769231),
(17, 12, 57.692307692308),
(17, 11, 57.692307692308),
(17, 10, 57.692307692308),
(17, 9, 57.692307692308),
(17, 8, 76.923076923077),
(17, 7, 76.923076923077),
(17, 6, 100),
(17, 5, 100),
(17, 4, 84.615384615385),
(17, 3, 84.615384615385),
(17, 2, 88.461538461538),
(17, 1, 88.461538461538),
(8, 1, 100),
(8, 2, 60.526315789474),
(8, 3, 2.6315789473684),
(8, 4, 0),
(8, 5, 26.315789473684),
(8, 6, 14.473684210526),
(8, 7, 23.684210526316),
(8, 8, 17.105263157895),
(8, 9, 21.052631578947),
(8, 10, 26.315789473684),
(8, 11, 15.789473684211),
(8, 12, 0),
(8, 13, 18.421052631579),
(8, 14, 28.947368421053),
(8, 15, 10.526315789474),
(8, 16, 61.842105263158),
(8, 17, 7.8947368421053),
(8, 18, 7.8947368421053),
(8, 19, 26.315789473684),
(8, 20, 38.157894736842),
(8, 21, 21.052631578947),
(8, 22, 10.526315789474),
(8, 23, 2.6315789473684),
(8, 24, 85.526315789474),
(8, 25, 32.894736842105),
(8, 26, 0),
(8, 27, 0),
(8, 28, 18.421052631579),
(8, 29, 0),
(8, 30, 0),
(5, 30, 3.2679738562092),
(5, 29, 7.843137254902),
(5, 28, 0),
(5, 27, 0),
(5, 26, 8.4967320261438),
(5, 25, 3.2679738562092),
(5, 24, 29.411764705882),
(5, 23, 0),
(5, 22, 0),
(5, 21, 29.411764705882),
(5, 20, 12.091503267974),
(5, 19, 100),
(5, 18, 85.62091503268),
(5, 17, 9.3137254901961),
(5, 16, 0),
(5, 15, 20.588235294118),
(5, 14, 24.509803921569),
(5, 13, 27.287581699346),
(5, 12, 13.071895424837),
(5, 11, 13.071895424837),
(5, 10, 0),
(5, 9, 40.686274509804),
(5, 8, 0),
(5, 7, 17.483660130719),
(5, 6, 24.509803921569),
(5, 5, 31.372549019608),
(5, 4, 0),
(5, 3, 21.732026143791),
(5, 2, 25.16339869281),
(5, 1, 31.535947712418),
(2, 1, 100),
(2, 2, 31.914893617021),
(2, 16, 80.851063829787),
(2, 18, 0),
(2, 19, 87.234042553191),
(11, 1, 98.684210526316),
(11, 2, 53.947368421053),
(11, 3, 1.3157894736842),
(11, 4, 5.2631578947368),
(11, 5, 80.263157894737),
(11, 6, 5.2631578947368),
(11, 7, 5.2631578947368),
(11, 8, 5.2631578947368),
(11, 9, 5.2631578947368),
(11, 10, 0),
(11, 11, 5.2631578947368),
(11, 12, 5.2631578947368),
(11, 13, 15.789473684211),
(11, 14, 5.2631578947368),
(11, 15, 5.2631578947368),
(11, 16, 34.210526315789),
(11, 17, 0),
(11, 18, 9.2105263157895),
(11, 19, 100),
(11, 20, 5.2631578947368),
(11, 21, 34.210526315789),
(11, 22, 94.736842105263),
(11, 23, 46.052631578947),
(11, 24, 21.052631578947),
(11, 25, 13.157894736842),
(11, 26, 18.421052631579),
(11, 27, 0),
(11, 28, 92.105263157895),
(11, 29, 5.2631578947368),
(11, 30, 18.421052631579);
-- -----------------------------------------------------------------------------
commit;
|
WITH actor_categories AS
(
SELECT
a.actor_id,
CASE
WHEN COUNT(film_id) < 30 THEN 'less productive'
WHEN COUNT(film_id) >= 30 THEN 'productive'
END actor_category
--COUNT(film_id) as film_cnt
FROM actor a
LEFT JOIN film_actor fa
ON a.actor_id = fa.actor_id
GROUP BY a.actor_id
)
SELECT
actor_category,
COUNT(actor_id) as count
FROM actor_categories
GROUP BY actor_category
|
create user 'fitness'@'%' identified by '4757';
grant all privileges on *.* to 'fitness'@'%' with grant option;
create database fitness_ntf character set utf8 collate utf8_general_ci;
|
'''List all the NOCs (National Olympic Committees), in alphabetical order by abbreviation.
These entities, by the way, are mostly equivalent to countries.
But in some cases, you might find that a portion of a country participated in a particular games
(e.g. one guy from Newfoundland in 1904) or some other oddball situation.
'''
SELECT countries.noc
FROM countries
ORDER BY countries.noc;
'''List the names of all the athletes from Kenya.
If your database design allows it, sort the athletes by last name.
'''
SELECT DISTINCT athletes.name, countries.noc
FROM athletes, athletes_countries_age_competitions, countries
WHERE countries.noc = 'KEN'
AND athletes.id = athletes_countries_age_competitions.athletes_id
AND athletes_countries_age_competitions.noc_id = countries.id;
'''List all the medals won by Greg Louganis, sorted by year.
Include whatever fields in this output that you think appropriate.
'''
SELECT events.event, competitions.year
FROM events, athletes, competitions
WHERE events.gold = athletes.id
AND athletes.name = 'Gregory Efthimios "Greg" Louganis'
AND competitions.id = events.competitions_id
ORDER BY competitions.year;
'''List all the NOCs and the number of gold medals they have won,
in decreasing order of the number of gold medals.
'''
SELECT COUNT(DISTINCT events.id), countries.noc
FROM events, countries, athletes_countries_age_competitions
WHERE events.gold = athletes_countries_age_competitions.athletes_id
AND events.competitions_id = athletes_countries_age_competitions.competitions_id
AND athletes_countries_age_competitions.noc_id = countries.id
GROUP BY countries.noc
ORDER BY COUNT(DISTINCT events.id) DESC;
|
CREATE TABLE INTREQPR (
ID VARCHAR(45),
REQNUMBER VARCHAR(45),
REQTYPE VARCHAR(255), -- TIPO DE SOLICITUD
REQSTATUS VARCHAR(255), -- STATUS
PROCESS VARCHAR(90), -- PROCESO IMPACTADO
NOTE VARCHAR(1000), -- DESCRIPCION
CAUSEANALY VARCHAR(1000), -- ANALISIS DE CAUSA
PEOINVOLVE VARCHAR(1000), --PERSONAS INVOLUCRADAS
CREATED_BY VARCHAR(45),
CREATENAME VARCHAR(100),
CREATED_AT TIMESTAMP,
UPDATED_BY VARCHAR(45),
UPDATENAME VARCHAR(100),
UPDATED_AT TIMESTAMP
)
|
---- ALTER TABLE ... CHANGE COLUMN , type change
-- constraints : constraints : UNIQUE KEY on multiple columns
-- ordering : no order defined
-- name : same or different
-- type : changed
--------------------- UNIQUE keys
------- type the same, name changed - only one unique on 2 columns
create table t1 (d1 double , i1 integer);
create unique index idx on t1 (i1, d1);
insert into t1 values (1.112,2),(1.123,4);
-- should fail
insert into t1 values (1.112,2);
select * from t1 order by 1,2;
show columns in t1;
-- should be OK
alter table t1 change i1 s1 varchar(11);
-- should fail
insert into t1 values (1.112,'2');
-- should be OK
insert into t1 values (1.115,'2');
insert into t1 values (1.112,'3');
select * from t1 order by 1,2;
show columns in t1;
drop table t1;
------- type the same, name changed ; 2 unique indexes
create table t1 (d1 double , i1 integer unique);
create unique index idx on t1 (i1, d1);
insert into t1 values (1.112,2),(1.123,4);
-- should fail
insert into t1 values (1.112,2);
select * from t1 order by 1,2;
show columns in t1;
-- should be OK
alter table t1 change i1 s1 varchar(11);
-- should fail
insert into t1 values (1.112,'2');
insert into t1 values (1.115,'2');
-- should be OK
insert into t1 values (1.112,'3');
select * from t1 order by 1,2;
show columns in t1;
drop table t1;
------- type unchanged , name same - mixed unique key
create table t1 (s char(5) , i1 integer);
create unique index idx on t1 (s, i1);
insert into t1 values ('112',2),('123',4);
-- should fail
insert into t1 values ('112',2);
select * from t1 order by 1,2;
show columns in t1;
-- should be OK
alter table t1 change s s char(11);
-- should fail
insert into t1 values ('112',2);
-- should be OK
insert into t1 values ('112',3);
insert into t1 values ('12345678901',3);
select * from t1 order by 1,2;
show columns in t1;
drop table t1;
------- type unchanged , name same - unique single column
create table t1 (s char(5) unique , i1 integer);
insert into t1 values ('112',2),('123',4);
-- should fail
insert into t1 values ('112',2);
select * from t1 order by 1,2;
show columns in t1;
-- should be OK
alter table t1 change s s char(11) unique;
-- should fail
insert into t1 values ('112',2);
-- should be OK
insert into t1 values ('114',3);
insert into t1 values ('12345678901',3);
select * from t1 order by 1,2;
show columns in t1;
drop table t1;
|
CREATE TABLE list (id VARCHAR(10) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "list" ("id", "value") VALUES ('AI', 'Anikuila');
INSERT INTO "list" ("id", "value") VALUES ('AG', 'Anitikua mo Palaputa');
INSERT INTO "list" ("id", "value") VALUES ('EZ', 'Eurozone');
INSERT INTO "list" ("id", "value") VALUES ('FR', 'Falanisē');
INSERT INTO "list" ("id", "value") VALUES ('PH', 'Filipaini');
INSERT INTO "list" ("id", "value") VALUES ('FI', 'Finilani');
INSERT INTO "list" ("id", "value") VALUES ('FJ', 'Fisi');
INSERT INTO "list" ("id", "value") VALUES ('HT', 'Haiti');
INSERT INTO "list" ("id", "value") VALUES ('WS', 'Haʻamoa');
INSERT INTO "list" ("id", "value") VALUES ('AS', 'Haʻamoa ʻAmelika');
INSERT INTO "list" ("id", "value") VALUES ('NL', 'Hōlani');
INSERT INTO "list" ("id", "value") VALUES ('HN', 'Honitulasi');
INSERT INTO "list" ("id", "value") VALUES ('HK', 'Hongi Kongi SAR Siaina');
INSERT INTO "list" ("id", "value") VALUES ('HU', 'Hungakalia');
INSERT INTO "list" ("id", "value") VALUES ('YE', 'Iemeni');
INSERT INTO "list" ("id", "value") VALUES ('BQ', 'Kalipiane fakahōlani');
INSERT INTO "list" ("id", "value") VALUES ('GR', 'Kalisi');
INSERT INTO "list" ("id", "value") VALUES ('CM', 'Kameluni');
INSERT INTO "list" ("id", "value") VALUES ('GM', 'Kamipia');
INSERT INTO "list" ("id", "value") VALUES ('KH', 'Kamipōtia');
INSERT INTO "list" ("id", "value") VALUES ('GH', 'Kana');
INSERT INTO "list" ("id", "value") VALUES ('CA', 'Kānata');
INSERT INTO "list" ("id", "value") VALUES ('GA', 'Kaponi');
INSERT INTO "list" ("id", "value") VALUES ('KZ', 'Kasakitani');
INSERT INTO "list" ("id", "value") VALUES ('QA', 'Katā');
INSERT INTO "list" ("id", "value") VALUES ('GD', 'Kelenatā');
INSERT INTO "list" ("id", "value") VALUES ('KE', 'Keniā');
INSERT INTO "list" ("id", "value") VALUES ('KG', 'Kīkisitani');
INSERT INTO "list" ("id", "value") VALUES ('KI', 'Kilipasi');
INSERT INTO "list" ("id", "value") VALUES ('GN', 'Kini');
INSERT INTO "list" ("id", "value") VALUES ('GW', 'Kini-Pisau');
INSERT INTO "list" ("id", "value") VALUES ('CU', 'Kiupa');
INSERT INTO "list" ("id", "value") VALUES ('KP', 'Kōlea tokelau');
INSERT INTO "list" ("id", "value") VALUES ('KR', 'Kōlea tonga');
INSERT INTO "list" ("id", "value") VALUES ('VA', 'Kolo Vatikani');
INSERT INTO "list" ("id", "value") VALUES ('CO', 'Kolomipia');
INSERT INTO "list" ("id", "value") VALUES ('KM', 'Komolosi');
INSERT INTO "list" ("id", "value") VALUES ('CD', 'Kongo - Kinisasa');
INSERT INTO "list" ("id", "value") VALUES ('CG', 'Kongo - Palasavila');
INSERT INTO "list" ("id", "value") VALUES ('CR', 'Kosita Lika');
INSERT INTO "list" ("id", "value") VALUES ('XK', 'Kōsovo');
INSERT INTO "list" ("id", "value") VALUES ('GU', 'Kuamu');
INSERT INTO "list" ("id", "value") VALUES ('GP', 'Kuatalupe');
INSERT INTO "list" ("id", "value") VALUES ('GT', 'Kuatamala');
INSERT INTO "list" ("id", "value") VALUES ('KW', 'Kueiti');
INSERT INTO "list" ("id", "value") VALUES ('GG', 'Kuenisī');
INSERT INTO "list" ("id", "value") VALUES ('GY', 'Kuiana');
INSERT INTO "list" ("id", "value") VALUES ('GF', 'Kuiana fakafalanisē');
INSERT INTO "list" ("id", "value") VALUES ('CW', 'Kulasao');
INSERT INTO "list" ("id", "value") VALUES ('GL', 'Kulinilani');
INSERT INTO "list" ("id", "value") VALUES ('HR', 'Kuloisia');
INSERT INTO "list" ("id", "value") VALUES ('LR', 'Laipelia');
INSERT INTO "list" ("id", "value") VALUES ('LU', 'Lakisimipeki');
INSERT INTO "list" ("id", "value") VALUES ('LV', 'Lativia');
INSERT INTO "list" ("id", "value") VALUES ('LA', 'Lau');
INSERT INTO "list" ("id", "value") VALUES ('LB', 'Lepanoni');
INSERT INTO "list" ("id", "value") VALUES ('LS', 'Lesoto');
INSERT INTO "list" ("id", "value") VALUES ('RE', 'Lēunioni');
INSERT INTO "list" ("id", "value") VALUES ('LI', 'Likitenisiteini');
INSERT INTO "list" ("id", "value") VALUES ('DO', 'Lipapilika Tominika');
INSERT INTO "list" ("id", "value") VALUES ('CF', 'Lipapilika ʻAfilika Lotoloto');
INSERT INTO "list" ("id", "value") VALUES ('LY', 'Līpia');
INSERT INTO "list" ("id", "value") VALUES ('LT', 'Lituania');
INSERT INTO "list" ("id", "value") VALUES ('RO', 'Lomēnia');
INSERT INTO "list" ("id", "value") VALUES ('RW', 'Luanitā');
INSERT INTO "list" ("id", "value") VALUES ('RU', 'Lūsia');
INSERT INTO "list" ("id", "value") VALUES ('YT', 'Maiote');
INSERT INTO "list" ("id", "value") VALUES ('MO', 'Makau SAR Siaina');
INSERT INTO "list" ("id", "value") VALUES ('MV', 'Malativisi');
INSERT INTO "list" ("id", "value") VALUES ('MW', 'Malaui');
INSERT INTO "list" ("id", "value") VALUES ('MY', 'Malēsia');
INSERT INTO "list" ("id", "value") VALUES ('ML', 'Māli');
INSERT INTO "list" ("id", "value") VALUES ('MT', 'Malita');
INSERT INTO "list" ("id", "value") VALUES ('MK', 'Masetōnia');
INSERT INTO "list" ("id", "value") VALUES ('CI', 'Matafonua ʻAivolī');
INSERT INTO "list" ("id", "value") VALUES ('MG', 'Matakasika');
INSERT INTO "list" ("id", "value") VALUES ('MQ', 'Māteniki');
INSERT INTO "list" ("id", "value") VALUES ('MR', 'Maulitenia');
INSERT INTO "list" ("id", "value") VALUES ('MU', 'Maulitiusi');
INSERT INTO "list" ("id", "value") VALUES ('MX', 'Mekisikou');
INSERT INTO "list" ("id", "value") VALUES ('FM', 'Mikolonīsia');
INSERT INTO "list" ("id", "value") VALUES ('MA', 'Moloko');
INSERT INTO "list" ("id", "value") VALUES ('MD', 'Molotova');
INSERT INTO "list" ("id", "value") VALUES ('MC', 'Monako');
INSERT INTO "list" ("id", "value") VALUES ('ME', 'Monitenikalo');
INSERT INTO "list" ("id", "value") VALUES ('MN', 'Mongokōlia');
INSERT INTO "list" ("id", "value") VALUES ('MZ', 'Mosēmipiki');
INSERT INTO "list" ("id", "value") VALUES ('CX', 'Motu Kilisimasi');
INSERT INTO "list" ("id", "value") VALUES ('IM', 'Motu Mani');
INSERT INTO "list" ("id", "value") VALUES ('NF', 'Motu Nōfoliki');
INSERT INTO "list" ("id", "value") VALUES ('AC', 'Motu ʻAsenisini');
INSERT INTO "list" ("id", "value") VALUES ('MS', 'Moʻungaselati');
INSERT INTO "list" ("id", "value") VALUES ('CV', 'Muiʻi Vēte');
INSERT INTO "list" ("id", "value") VALUES ('NG', 'Naisilia');
INSERT INTO "list" ("id", "value") VALUES ('NA', 'Namipia');
INSERT INTO "list" ("id", "value") VALUES ('NR', 'Naulu');
INSERT INTO "list" ("id", "value") VALUES ('NP', 'Nepali');
INSERT INTO "list" ("id", "value") VALUES ('NI', 'Nikalakua');
INSERT INTO "list" ("id", "value") VALUES ('NE', 'Nisia');
INSERT INTO "list" ("id", "value") VALUES ('NC', 'Niu Kaletōnia');
INSERT INTO "list" ("id", "value") VALUES ('NU', 'Niuē');
INSERT INTO "list" ("id", "value") VALUES ('NO', 'Noauē');
INSERT INTO "list" ("id", "value") VALUES ('NZ', 'Nuʻusila');
INSERT INTO "list" ("id", "value") VALUES ('BS', 'Pahama');
INSERT INTO "list" ("id", "value") VALUES ('PK', 'Pākisitani');
INSERT INTO "list" ("id", "value") VALUES ('PY', 'Palakuai');
INSERT INTO "list" ("id", "value") VALUES ('BR', 'Palāsili');
INSERT INTO "list" ("id", "value") VALUES ('PW', 'Palau');
INSERT INTO "list" ("id", "value") VALUES ('BH', 'Paleini');
INSERT INTO "list" ("id", "value") VALUES ('PA', 'Panamā');
INSERT INTO "list" ("id", "value") VALUES ('BB', 'Pāpeitosi');
INSERT INTO "list" ("id", "value") VALUES ('PG', 'Papuaniukini');
INSERT INTO "list" ("id", "value") VALUES ('BF', 'Pekano Faso');
INSERT INTO "list" ("id", "value") VALUES ('BY', 'Pelalusi');
INSERT INTO "list" ("id", "value") VALUES ('BE', 'Pelesiume');
INSERT INTO "list" ("id", "value") VALUES ('BZ', 'Pelise');
INSERT INTO "list" ("id", "value") VALUES ('PE', 'Pelū');
INSERT INTO "list" ("id", "value") VALUES ('MM', 'Pema');
INSERT INTO "list" ("id", "value") VALUES ('BM', 'Pēmuta');
INSERT INTO "list" ("id", "value") VALUES ('BJ', 'Penini');
INSERT INTO "list" ("id", "value") VALUES ('BD', 'Pengilātesi');
INSERT INTO "list" ("id", "value") VALUES ('GB', 'Pilitānia');
INSERT INTO "list" ("id", "value") VALUES ('PL', 'Polani');
INSERT INTO "list" ("id", "value") VALUES ('PF', 'Polinisia fakafalanisē');
INSERT INTO "list" ("id", "value") VALUES ('BO', 'Polīvia');
INSERT INTO "list" ("id", "value") VALUES ('BA', 'Posinia mo Hesikōvina');
INSERT INTO "list" ("id", "value") VALUES ('BW', 'Potisiuana');
INSERT INTO "list" ("id", "value") VALUES ('IO', 'Potu fonua moana ʻInitia fakapilitānia');
INSERT INTO "list" ("id", "value") VALUES ('TF', 'Potu fonua tonga fakafalanisē');
INSERT INTO "list" ("id", "value") VALUES ('PS', 'Potu Palesitaine');
INSERT INTO "list" ("id", "value") VALUES ('PT', 'Potukali');
INSERT INTO "list" ("id", "value") VALUES ('PR', 'Puēto Liko');
INSERT INTO "list" ("id", "value") VALUES ('US', 'Puleʻanga fakatahataha ʻAmelika');
INSERT INTO "list" ("id", "value") VALUES ('BG', 'Pulukalia');
INSERT INTO "list" ("id", "value") VALUES ('BN', 'Pulunei');
INSERT INTO "list" ("id", "value") VALUES ('BI', 'Puluniti');
INSERT INTO "list" ("id", "value") VALUES ('BT', 'Pūtani');
INSERT INTO "list" ("id", "value") VALUES ('SH', 'Sā Helena');
INSERT INTO "list" ("id", "value") VALUES ('KN', 'Sā Kitisi mo Nevisi');
INSERT INTO "list" ("id", "value") VALUES ('LC', 'Sā Lūsia');
INSERT INTO "list" ("id", "value") VALUES ('SM', 'Sā Malino');
INSERT INTO "list" ("id", "value") VALUES ('MF', 'Sā Mātini (fakafalanisē)');
INSERT INTO "list" ("id", "value") VALUES ('SX', 'Sā Mātini (fakahōlani)');
INSERT INTO "list" ("id", "value") VALUES ('BL', 'Sā Patēlemi');
INSERT INTO "list" ("id", "value") VALUES ('PM', 'Sā Piea mo Mikeloni');
INSERT INTO "list" ("id", "value") VALUES ('VC', 'Sā Viniseni mo Kulenatini');
INSERT INTO "list" ("id", "value") VALUES ('EH', 'Sahala fakahihifo');
INSERT INTO "list" ("id", "value") VALUES ('CY', 'Saipalesi');
INSERT INTO "list" ("id", "value") VALUES ('JM', 'Samaika');
INSERT INTO "list" ("id", "value") VALUES ('ST', 'Sao Tomē mo Pilinisipe');
INSERT INTO "list" ("id", "value") VALUES ('TD', 'Sāti');
INSERT INTO "list" ("id", "value") VALUES ('SA', 'Saute ʻAlepea');
INSERT INTO "list" ("id", "value") VALUES ('CZ', 'Sēkia');
INSERT INTO "list" ("id", "value") VALUES ('JE', 'Selusī');
INSERT INTO "list" ("id", "value") VALUES ('ZM', 'Semipia');
INSERT INTO "list" ("id", "value") VALUES ('SN', 'Senekalo');
INSERT INTO "list" ("id", "value") VALUES ('GE', 'Seōsia');
INSERT INTO "list" ("id", "value") VALUES ('RS', 'Sēpia');
INSERT INTO "list" ("id", "value") VALUES ('CN', 'Siaina');
INSERT INTO "list" ("id", "value") VALUES ('DE', 'Siamane');
INSERT INTO "list" ("id", "value") VALUES ('JP', 'Siapani');
INSERT INTO "list" ("id", "value") VALUES ('SL', 'Siela Leone');
INSERT INTO "list" ("id", "value") VALUES ('LK', 'Sīlangikā');
INSERT INTO "list" ("id", "value") VALUES ('CL', 'Sili');
INSERT INTO "list" ("id", "value") VALUES ('SY', 'Sīlia');
INSERT INTO "list" ("id", "value") VALUES ('SK', 'Silōvakia');
INSERT INTO "list" ("id", "value") VALUES ('SI', 'Silōvenia');
INSERT INTO "list" ("id", "value") VALUES ('ZW', 'Simipapuei');
INSERT INTO "list" ("id", "value") VALUES ('SG', 'Singapoa');
INSERT INTO "list" ("id", "value") VALUES ('GI', 'Sipalālitā');
INSERT INTO "list" ("id", "value") VALUES ('ES', 'Sipeini');
INSERT INTO "list" ("id", "value") VALUES ('DJ', 'Siputi');
INSERT INTO "list" ("id", "value") VALUES ('EA', 'Siuta mo Melila');
INSERT INTO "list" ("id", "value") VALUES ('SJ', 'Sivolopāti mo Sani Maieni');
INSERT INTO "list" ("id", "value") VALUES ('JO', 'Soatane');
INSERT INTO "list" ("id", "value") VALUES ('SO', 'Sōmalia');
INSERT INTO "list" ("id", "value") VALUES ('SZ', 'Suasilani');
INSERT INTO "list" ("id", "value") VALUES ('SE', 'Suēteni');
INSERT INTO "list" ("id", "value") VALUES ('CH', 'Suisilani');
INSERT INTO "list" ("id", "value") VALUES ('SR', 'Suliname');
INSERT INTO "list" ("id", "value") VALUES ('SS', 'Sūtani fakatonga');
INSERT INTO "list" ("id", "value") VALUES ('SD', 'Sūteni');
INSERT INTO "list" ("id", "value") VALUES ('TH', 'Tailani');
INSERT INTO "list" ("id", "value") VALUES ('TW', 'Taiuani');
INSERT INTO "list" ("id", "value") VALUES ('TJ', 'Tasikitani');
INSERT INTO "list" ("id", "value") VALUES ('DK', 'Tenimaʻake');
INSERT INTO "list" ("id", "value") VALUES ('TZ', 'Tenisānia');
INSERT INTO "list" ("id", "value") VALUES ('DG', 'Tieko Kāsia');
INSERT INTO "list" ("id", "value") VALUES ('TT', 'Tilinitati mo Topako');
INSERT INTO "list" ("id", "value") VALUES ('TL', 'Timoa hahake');
INSERT INTO "list" ("id", "value") VALUES ('TR', 'Toake');
INSERT INTO "list" ("id", "value") VALUES ('TK', 'Tokelau');
INSERT INTO "list" ("id", "value") VALUES ('TG', 'Toko');
INSERT INTO "list" ("id", "value") VALUES ('DM', 'Tominika');
INSERT INTO "list" ("id", "value") VALUES ('TO', 'Tonga');
INSERT INTO "list" ("id", "value") VALUES ('TM', 'Tūkimenisitani');
INSERT INTO "list" ("id", "value") VALUES ('TA', 'Tulisitani ta Kunuha');
INSERT INTO "list" ("id", "value") VALUES ('TN', 'Tunīsia');
INSERT INTO "list" ("id", "value") VALUES ('TV', 'Tūvalu');
INSERT INTO "list" ("id", "value") VALUES ('UN', 'United Nations');
INSERT INTO "list" ("id", "value") VALUES ('VU', 'Vanuatu');
INSERT INTO "list" ("id", "value") VALUES ('VE', 'Venesuela');
INSERT INTO "list" ("id", "value") VALUES ('VN', 'Vietinami');
INSERT INTO "list" ("id", "value") VALUES ('IE', 'ʻAealani');
INSERT INTO "list" ("id", "value") VALUES ('AF', 'ʻAfikānisitani');
INSERT INTO "list" ("id", "value") VALUES ('ZA', 'ʻAfilika tonga');
INSERT INTO "list" ("id", "value") VALUES ('IS', 'ʻAisilani');
INSERT INTO "list" ("id", "value") VALUES ('DZ', 'ʻAisilia');
INSERT INTO "list" ("id", "value") VALUES ('AE', 'ʻAlepea Fakatahataha');
INSERT INTO "list" ("id", "value") VALUES ('AL', 'ʻAlipania');
INSERT INTO "list" ("id", "value") VALUES ('AW', 'ʻAlupa');
INSERT INTO "list" ("id", "value") VALUES ('AM', 'ʻĀmenia');
INSERT INTO "list" ("id", "value") VALUES ('AQ', 'ʻAnitātika');
INSERT INTO "list" ("id", "value") VALUES ('AD', 'ʻAnitola');
INSERT INTO "list" ("id", "value") VALUES ('AO', 'ʻAngikola');
INSERT INTO "list" ("id", "value") VALUES ('AU', 'ʻAositelēlia');
INSERT INTO "list" ("id", "value") VALUES ('AT', 'ʻAositulia');
INSERT INTO "list" ("id", "value") VALUES ('AZ', 'ʻAsapaisani');
INSERT INTO "list" ("id", "value") VALUES ('AR', 'ʻAsenitina');
INSERT INTO "list" ("id", "value") VALUES ('GQ', 'ʻEkueta Kini');
INSERT INTO "list" ("id", "value") VALUES ('EC', 'ʻEkuetoa');
INSERT INTO "list" ("id", "value") VALUES ('SV', 'ʻEle Salavatoa');
INSERT INTO "list" ("id", "value") VALUES ('ER', 'ʻElitulia');
INSERT INTO "list" ("id", "value") VALUES ('EE', 'ʻEsitōnia');
INSERT INTO "list" ("id", "value") VALUES ('IQ', 'ʻIlaaki');
INSERT INTO "list" ("id", "value") VALUES ('IR', 'ʻIlaani');
INSERT INTO "list" ("id", "value") VALUES ('IN', 'ʻInitia');
INSERT INTO "list" ("id", "value") VALUES ('ID', 'ʻInitonēsia');
INSERT INTO "list" ("id", "value") VALUES ('IL', 'ʻIsileli');
INSERT INTO "list" ("id", "value") VALUES ('EG', 'ʻIsipite');
INSERT INTO "list" ("id", "value") VALUES ('IT', 'ʻĪtali');
INSERT INTO "list" ("id", "value") VALUES ('ET', 'ʻĪtiōpia');
INSERT INTO "list" ("id", "value") VALUES ('UG', 'ʻIukanitā');
INSERT INTO "list" ("id", "value") VALUES ('OM', 'ʻOmani');
INSERT INTO "list" ("id", "value") VALUES ('FO', 'ʻOtumotu Faloe');
INSERT INTO "list" ("id", "value") VALUES ('FK', 'ʻOtumotu Fokulani');
INSERT INTO "list" ("id", "value") VALUES ('IC', 'ʻOtumotu Kaneli');
INSERT INTO "list" ("id", "value") VALUES ('KY', 'ʻOtumotu Keimeni');
INSERT INTO "list" ("id", "value") VALUES ('CC', 'ʻOtumotu Koko');
INSERT INTO "list" ("id", "value") VALUES ('CK', 'ʻOtumotu Kuki');
INSERT INTO "list" ("id", "value") VALUES ('MP', 'ʻOtumotu Maliana tokelau');
INSERT INTO "list" ("id", "value") VALUES ('MH', 'ʻOtumotu Māsolo');
INSERT INTO "list" ("id", "value") VALUES ('PN', 'ʻOtumotu Pitikeni');
INSERT INTO "list" ("id", "value") VALUES ('SC', 'ʻOtumotu Seiseli');
INSERT INTO "list" ("id", "value") VALUES ('GS', 'ʻOtumotu Seōsia-tonga mo Saniuisi-tonga');
INSERT INTO "list" ("id", "value") VALUES ('UM', 'ʻOtumotu siʻi ʻo ʻAmelika');
INSERT INTO "list" ("id", "value") VALUES ('SB', 'ʻOtumotu Solomone');
INSERT INTO "list" ("id", "value") VALUES ('TC', 'ʻOtumotu Tuki mo Kaikosi');
INSERT INTO "list" ("id", "value") VALUES ('VG', 'ʻOtumotu Vilikini fakapilitānia');
INSERT INTO "list" ("id", "value") VALUES ('VI', 'ʻOtumotu Vilikini fakaʻamelika');
INSERT INTO "list" ("id", "value") VALUES ('AX', 'ʻOtumotu ʻAlani');
INSERT INTO "list" ("id", "value") VALUES ('UA', 'ʻŪkalaʻine');
INSERT INTO "list" ("id", "value") VALUES ('UY', 'ʻUlukuai');
INSERT INTO "list" ("id", "value") VALUES ('UZ', 'ʻUsipekitani');
INSERT INTO "list" ("id", "value") VALUES ('WF', 'ʻUvea mo Futuna');
|
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 24 Jul 2018 pada 11.49
-- Versi Server: 10.1.30-MariaDB
-- PHP Version: 7.2.1
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: `buku_problem`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `bk_problem`
--
CREATE TABLE `bk_problem` (
`id` int(11) NOT NULL,
`tgl_problem` date NOT NULL,
`problem` varchar(500) NOT NULL,
`tgl_solusi` date NOT NULL,
`solusi` varchar(500) NOT NULL,
`status` varchar(20) NOT NULL,
`user` varchar(21) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data untuk tabel `bk_problem`
--
INSERT INTO `bk_problem` (`id`, `tgl_problem`, `problem`, `tgl_solusi`, `solusi`, `status`, `user`) VALUES
(16, '2018-07-17', 'Printer Keuangan Rusak', '2018-07-18', 'sadgasdgadsfg', 'Done', 'Irvan'),
(17, '2018-07-17', 'Problem Printer HRD ', '2018-07-20', 'Ganti Printer', 'Done', 'Irvan'),
(18, '2018-07-17', 'Laptop Legal Mati', '2018-07-18', 'Ganti Laptop', 'Done', 'Irvan');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `bk_problem`
--
ALTER TABLE `bk_problem`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `bk_problem`
--
ALTER TABLE `bk_problem`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
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 */;
|
-- SQLite
select * from user
select * from tweet
|
CREATE TABLE IF NOT EXISTS IDN_BASE_TABLE (
PRODUCT_NAME VARCHAR (20),
PRIMARY KEY (PRODUCT_NAME)
);
INSERT INTO IDN_BASE_TABLE values ('WSO2 Identity Server');
CREATE TABLE IF NOT EXISTS IDN_OAUTH_CONSUMER_APPS (
ID INTEGER NOT NULL AUTO_INCREMENT,
CONSUMER_KEY VARCHAR (255),
CONSUMER_SECRET VARCHAR (512),
USERNAME VARCHAR (255),
TENANT_ID INTEGER DEFAULT 0,
USER_DOMAIN VARCHAR(50),
APP_NAME VARCHAR (255),
OAUTH_VERSION VARCHAR (128),
CALLBACK_URL VARCHAR (1024),
GRANT_TYPES VARCHAR (1024),
PKCE_MANDATORY CHAR(1) DEFAULT '0',
PKCE_SUPPORT_PLAIN CHAR(1) DEFAULT '0',
APP_STATE VARCHAR (25) DEFAULT 'ACTIVE',
USER_ACCESS_TOKEN_EXPIRE_TIME BIGINT DEFAULT 3600000,
APP_ACCESS_TOKEN_EXPIRE_TIME BIGINT DEFAULT 3600000,
REFRESH_TOKEN_EXPIRE_TIME BIGINT DEFAULT 84600000,
CONSTRAINT CONSUMER_KEY_CONSTRAINT UNIQUE (CONSUMER_KEY),
PRIMARY KEY (ID)
);
CREATE TABLE IF NOT EXISTS IDN_OAUTH2_SCOPE_VALIDATORS (
APP_ID INTEGER NOT NULL,
SCOPE_VALIDATOR VARCHAR (128) NOT NULL,
PRIMARY KEY (APP_ID,SCOPE_VALIDATOR),
FOREIGN KEY (APP_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE
);
CREATE TABLE IF NOT EXISTS IDN_OPENID_USER_RPS (
USER_NAME VARCHAR(255) NOT NULL,
TENANT_ID INTEGER DEFAULT 0,
RP_URL VARCHAR(255) NOT NULL,
TRUSTED_ALWAYS VARCHAR(128) DEFAULT 'FALSE',
LAST_VISIT DATE NOT NULL,
VISIT_COUNT INTEGER DEFAULT 0,
DEFAULT_PROFILE_NAME VARCHAR(255) DEFAULT 'DEFAULT',
PRIMARY KEY (USER_NAME, TENANT_ID, RP_URL)
);
CREATE TABLE IF NOT EXISTS IDN_OIDC_PROPERTY (
ID INTEGER NOT NULL AUTO_INCREMENT,
TENANT_ID INTEGER,
CONSUMER_KEY VARCHAR(255) ,
PROPERTY_KEY VARCHAR(255) NOT NULL,
PROPERTY_VALUE VARCHAR(2047) ,
PRIMARY KEY (ID),
FOREIGN KEY (CONSUMER_KEY) REFERENCES IDN_OAUTH_CONSUMER_APPS(CONSUMER_KEY) ON DELETE CASCADE
);
|
Start Transaction;
Alter table registrolocalizacao add column a_processar int default 0;
UPDATE registrolocalizacao TAB1
INNER JOIN (
select hashgeo,hashdata from registrolocalizacao
group by hashgeo,hashdata having count(*) >1 and sum(situacao_id=3)>0
) TAB2 ON TAB1.hashgeo = TAB2.hashgeo
And TAB1.hashdata = TAB2.hashdata
SET TAB1.situacao_id = 2, tab1.a_processar = 1
WHERE TAB1.situacao_id = 1;
Update Pessoa p
Inner Join registrolocalizacao rl on p.id = rl.pessoa_id
Set p.situacao_id = 2
where rl.a_processar=1;
Insert INTO HistoricoSituacao (Data, hashdata, pessoa_id, situacao_id)
Select Data, hashdata, pessoa_id, situacao_id
From registrolocalizacao rl
Where rl.a_processar=1;
CALL pessoas_a_processar();
Alter table registrolocalizacao drop column a_processar;
Commit;
Call propagacao();
Call teste();
select * from registrolocalizacao;
|
insert into `designer_form_field_attribute_type`(`id`,`name`,`type`) values
(1,'Integer','integer'),
(2,'String','string');
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Tempo de geração: 27-Out-2020 às 20:17
-- Versão do servidor: 10.4.14-MariaDB
-- versão do PHP: 7.3.22
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 */;
--
-- Banco de dados: `soseduca_soseduc`
--
-- --------------------------------------------------------
--
-- Estrutura da tabela `admin`
--
CREATE TABLE `admin` (
`id_func` int(2) NOT NULL,
`nome_func` varchar(45) NOT NULL,
`login_func` varchar(100) NOT NULL,
`senha_func` varchar(8) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Extraindo dados da tabela `admin`
--
INSERT INTO `admin` (`id_func`, `nome_func`, `login_func`, `senha_func`) VALUES
(1, 'Egydio', 'soseduca@gmail.com', '123mudar');
-- --------------------------------------------------------
--
-- Estrutura da tabela `categorias`
--
CREATE TABLE `categorias` (
`id_cat` int(2) NOT NULL,
`nome_cat` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Extraindo dados da tabela `categorias`
--
INSERT INTO `categorias` (`id_cat`, `nome_cat`) VALUES
(1, 'Português'),
(2, 'Matemática'),
(3, 'Inglês'),
(4, 'Lógica de Programação'),
(5, 'Laboratório de Hardware'),
(6, 'Arquitetura e Organização de Computadores');
-- --------------------------------------------------------
--
-- Estrutura da tabela `cliente`
--
CREATE TABLE `cliente` (
`id_cliente` int(11) NOT NULL,
`nome` varchar(100) NOT NULL,
`cpf` varchar(100) NOT NULL,
`senha` varchar(100) NOT NULL,
`cep` varchar(9) NOT NULL,
`rua` varchar(100) NOT NULL,
`bairro` varchar(100) NOT NULL,
`cidade` varchar(100) NOT NULL,
`estado` varchar(100) NOT NULL,
`num_casa` int(100) NOT NULL,
`telefone` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Extraindo dados da tabela `cliente`
--
INSERT INTO `cliente` (`id_cliente`, `nome`, `cpf`, `senha`, `cep`, `rua`, `bairro`, `cidade`, `estado`, `num_casa`, `telefone`, `email`) VALUES
(1, 'Gabriel Eugenio', '645.543.566-88', '123', '', 'Vinte Sete de Juhlo', 'Planalto Airton Senna', 'Fortaleza', 'CE', 6534, '(85)97542-3255', 'Gabriel123@gmail.com'),
(8, 'Marcelo Adno', '121.232.564-54', '147', '12231-140', 'Rua Noruega', 'Jardim Aeroporto', 'São José dos Campos', 'SP', 612, '(11)98661-0019', 'marcelo@gmail.com');
-- --------------------------------------------------------
--
-- Estrutura da tabela `itens_venda`
--
CREATE TABLE `itens_venda` (
`id_itensvenda` int(11) NOT NULL,
`id_venda` int(11) NOT NULL,
`id_produto` int(11) NOT NULL,
`qtd_item` int(11) NOT NULL,
`valor_unitario` decimal(8,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Extraindo dados da tabela `itens_venda`
--
INSERT INTO `itens_venda` (`id_itensvenda`, `id_venda`, `id_produto`, `qtd_item`, `valor_unitario`) VALUES
(34, 55, 40, 1, '20.00'),
(35, 55, 28, 1, '32.00'),
(36, 56, 28, 1, '32.00'),
(37, 56, 30, 1, '25.00'),
(38, 56, 31, 1, '19.00'),
(39, 57, 29, 1, '59.00'),
(40, 57, 37, 1, '19.00'),
(41, 58, 32, 1, '69.00'),
(42, 59, 34, 1, '15.00'),
(43, 59, 32, 1, '69.00'),
(44, 60, 28, 1, '32.00'),
(45, 61, 29, 1, '59.00');
-- --------------------------------------------------------
--
-- Estrutura da tabela `produtos`
--
CREATE TABLE `produtos` (
`id_produto` int(11) NOT NULL,
`nome_prod` varchar(75) NOT NULL,
`preco` decimal(10,2) UNSIGNED NOT NULL,
`estoque` int(50) NOT NULL,
`imagem` varchar(200) NOT NULL,
`descricao` varchar(100) DEFAULT NULL,
`id_categoria` int(3) NOT NULL,
`arquivo` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Extraindo dados da tabela `produtos`
--
INSERT INTO `produtos` (`id_produto`, `nome_prod`, `preco`, `estoque`, `imagem`, `descricao`, `id_categoria`, `arquivo`) VALUES
(28, 'Concordância', '32.00', 989, 'Português.png', 'Resumo de Concordância.', 1, 'Concordância.pdf'),
(29, 'Interpretação de Texto', '59.00', 991, 'Português.png', 'Resumo Interpretação de Texto.', 1, 'Interpretação de Texto.pdf'),
(30, 'Pontuação', '25.00', 997, 'Português.png', 'Resumo Pontuação.', 1, 'Pontuação.pdf'),
(31, 'Matemática', '19.00', 998, 'Matematica.jpeg', 'Resumo Matemática.', 2, 'Matemática - 1 - Com Capa.pdf'),
(32, 'Logica Argumentativa', '69.00', 996, 'Matematica.jpeg', 'Introdução à logica argumentativa.', 2, 'Matemática - 2 - Com Capa.pdf'),
(33, 'Funções matemáticas', '24.00', 1000, 'Matematica.jpeg', 'Funções e construção de gráficos.', 2, 'Matemática - 3 - Com Capa.pdf'),
(34, 'Memória RAM', '15.00', 998, 'Lab_Hard.jpeg', 'Resumo Memória Ram.', 5, 'Memória RAM.pdf'),
(35, 'Descarga Eletrostática', '32.00', 998, 'Lab_Hard.jpeg', 'Resumo dos perigos da descarga eletrostática.', 5, 'Perigos da Descarga Eletrostática.pdf'),
(36, 'Verbo To Be', '25.00', 999, 'ingles.jpeg', 'Resumo do Verbo To Be.', 3, 'PDF 1 - Verbo To Be.pdf'),
(37, 'Tempos Verbais', '19.00', 999, 'ingles.jpeg', 'Resumo de tempos verbais.', 3, 'PDF 2 - Tempos Verbais.pdf'),
(38, 'Dias da Semana', '15.00', 999, 'ingles.jpeg', 'Resumo Dias da Semana.', 3, 'PDF 3 - Dias da Semana.pdf'),
(39, 'Arquitetura x Organização', '25.00', 1000, 'AOC.jpeg', 'Introdução Arquitetura x Organização.', 6, 'AOC 1 - COM CAPA.pdf'),
(40, 'Dispositivos de Armazenamento', '20.00', 998, 'AOC.jpeg', 'Resumo Dispositivos de Armazenamento.', 6, 'AOC 2 - Com capa.pdf'),
(41, 'Lógica de programação e Algoritmos', '12.00', 1000, 'Algoritimo.jpeg', 'Resumo Lógica de programação e Algoritmos.', 4, 'Lógica de Programação-Modelo01.pdf'),
(42, 'Logica de Programação', '15.00', 1000, 'logicaProgramacao.jpeg', 'Resumo Logica de Programação.', 4, 'Lógica de Programação-Modelo02.pdf');
-- --------------------------------------------------------
--
-- Estrutura da tabela `vendas`
--
CREATE TABLE `vendas` (
`id_venda` int(11) NOT NULL,
`id_cliente` int(11) NOT NULL,
`data_venda` date NOT NULL,
`total` decimal(8,2) NOT NULL,
`forma_pagamento` varchar(20) DEFAULT NULL,
`qtd_itens` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Extraindo dados da tabela `vendas`
--
INSERT INTO `vendas` (`id_venda`, `id_cliente`, `data_venda`, `total`, `forma_pagamento`, `qtd_itens`) VALUES
(55, 8, '2020-10-26', '52.00', 'cartao', 2),
(56, 8, '2020-10-27', '19.00', 'cartao', 1),
(57, 8, '2020-10-27', '19.00', 'cartao', 1),
(58, 8, '2020-10-27', '69.00', 'cartao', 1),
(59, 1, '2020-10-27', '69.00', 'boleto', 1),
(60, 1, '2020-10-27', '32.00', 'boleto', 1),
(61, 1, '2020-10-27', '59.00', 'boleto', 1),
(62, 0, '2020-10-27', '0.00', '', 0);
--
-- Índices para tabelas despejadas
--
--
-- Índices para tabela `admin`
--
ALTER TABLE `admin`
ADD PRIMARY KEY (`id_func`);
--
-- Índices para tabela `categorias`
--
ALTER TABLE `categorias`
ADD PRIMARY KEY (`id_cat`);
--
-- Índices para tabela `cliente`
--
ALTER TABLE `cliente`
ADD PRIMARY KEY (`id_cliente`);
--
-- Índices para tabela `itens_venda`
--
ALTER TABLE `itens_venda`
ADD PRIMARY KEY (`id_itensvenda`);
--
-- Índices para tabela `produtos`
--
ALTER TABLE `produtos`
ADD PRIMARY KEY (`id_produto`),
ADD KEY `id_categoria` (`id_categoria`);
--
-- Índices para tabela `vendas`
--
ALTER TABLE `vendas`
ADD PRIMARY KEY (`id_venda`),
ADD KEY `id_clientes` (`id_cliente`);
--
-- AUTO_INCREMENT de tabelas despejadas
--
--
-- AUTO_INCREMENT de tabela `admin`
--
ALTER TABLE `admin`
MODIFY `id_func` int(2) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT de tabela `categorias`
--
ALTER TABLE `categorias`
MODIFY `id_cat` int(2) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT de tabela `cliente`
--
ALTER TABLE `cliente`
MODIFY `id_cliente` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT de tabela `itens_venda`
--
ALTER TABLE `itens_venda`
MODIFY `id_itensvenda` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=46;
--
-- AUTO_INCREMENT de tabela `produtos`
--
ALTER TABLE `produtos`
MODIFY `id_produto` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=47;
--
-- AUTO_INCREMENT de tabela `vendas`
--
ALTER TABLE `vendas`
MODIFY `id_venda` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=63;
--
-- Restrições para despejos de tabelas
--
--
-- Limitadores para a tabela `produtos`
--
ALTER TABLE `produtos`
ADD CONSTRAINT `id_categoria` FOREIGN KEY (`id_categoria`) REFERENCES `categorias` (`id_cat`);
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 */;
|
/*
SQLyog Community v13.1.5 (64 bit)
MySQL - 10.2.33-MariaDB-log : Database - vitrineatma
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`vitrineatma` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `vitrineatma`;
/*Table structure for table `acessos` */
DROP TABLE IF EXISTS `acessos`;
CREATE TABLE `acessos` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`material_id` bigint(20) NOT NULL,
`user_id` bigint(20) unsigned NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_downloads_materiais1_idx` (`material_id`),
KEY `fk_downloads_users1_idx` (`user_id`),
CONSTRAINT `fk_downloads_materiais1` FOREIGN KEY (`material_id`) REFERENCES `materiais` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_downloads_users1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
/*Data for the table `acessos` */
/*Table structure for table `aulas` */
DROP TABLE IF EXISTS `aulas`;
CREATE TABLE `aulas` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`modulo_id` bigint(20) NOT NULL,
`titulo` varchar(255) NOT NULL,
`descricao` text DEFAULT NULL,
`carga_horaria` double DEFAULT NULL,
`link` varchar(500) NOT NULL,
`ordem` tinyint(4) NOT NULL DEFAULT 0,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT NULL,
`is_active` tinyint(4) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`),
KEY `fk_aulas_modulos1_idx` (`modulo_id`),
CONSTRAINT `fk_aulas_modulos1` FOREIGN KEY (`modulo_id`) REFERENCES `modulos` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8;
/*Data for the table `aulas` */
insert into `aulas`(`id`,`modulo_id`,`titulo`,`descricao`,`carga_horaria`,`link`,`ordem`,`created_at`,`updated_at`,`is_active`) values (17,8,'Cuidados com o corpo durante a gestação','<p>Aqui entram os tópicos a serem tratados na aula em questão</p>',37,'YTrKiSZNzRM',1,'2021-01-05 15:37:31','2021-01-18 10:35:38',1);
insert into `aulas`(`id`,`modulo_id`,`titulo`,`descricao`,`carga_horaria`,`link`,`ordem`,`created_at`,`updated_at`,`is_active`) values (18,8,'Parto - Plano de parto','<p>Aqui entra a descrição da aula 2</p>',24,'YTrKiSZNzRM',2,'2021-01-06 23:46:25','2021-01-18 10:36:38',1);
insert into `aulas`(`id`,`modulo_id`,`titulo`,`descricao`,`carga_horaria`,`link`,`ordem`,`created_at`,`updated_at`,`is_active`) values (19,8,'A importância de formação de uma rede de apoio e como eles podem te ajudar','<p>Aqui entra a descrição da aula 3</p>',28,'YTrKiSZNzRM',3,'2021-01-06 23:48:04','2021-01-18 10:37:49',1);
insert into `aulas`(`id`,`modulo_id`,`titulo`,`descricao`,`carga_horaria`,`link`,`ordem`,`created_at`,`updated_at`,`is_active`) values (20,8,'O pai - Companheiro','<p>Aqui entra a descrição da aula 4</p>',40,'YTrKiSZNzRM',4,'2021-01-06 23:49:28','2021-01-18 10:41:01',1);
insert into `aulas`(`id`,`modulo_id`,`titulo`,`descricao`,`carga_horaria`,`link`,`ordem`,`created_at`,`updated_at`,`is_active`) values (21,9,'Os desafios da fase do puerpério - Exterogestação','<p>teste</p>',30,'YTrKiSZNzRM',5,'2021-01-06 23:50:59','2021-01-18 10:43:59',1);
insert into `aulas`(`id`,`modulo_id`,`titulo`,`descricao`,`carga_horaria`,`link`,`ordem`,`created_at`,`updated_at`,`is_active`) values (22,9,'Babyblues','<p>Aqui entra a descrição da aula 6</p>',28,'YTrKiSZNzRM',6,'2021-01-06 23:52:12','2021-01-18 10:45:12',1);
insert into `aulas`(`id`,`modulo_id`,`titulo`,`descricao`,`carga_horaria`,`link`,`ordem`,`created_at`,`updated_at`,`is_active`) values (23,9,'A primeira hora de vida','<p>Aqui entra a descrição da aula 1</p>',20,'YTrKiSZNzRM',7,'2021-01-06 23:57:01','2021-01-18 10:45:48',1);
insert into `aulas`(`id`,`modulo_id`,`titulo`,`descricao`,`carga_horaria`,`link`,`ordem`,`created_at`,`updated_at`,`is_active`) values (24,9,'Amamentação','<p>Aqui entra a descrição da aula 2</p>',45,'YTrKiSZNzRM',8,'2021-01-06 23:57:49','2021-01-18 10:46:24',1);
insert into `aulas`(`id`,`modulo_id`,`titulo`,`descricao`,`carga_horaria`,`link`,`ordem`,`created_at`,`updated_at`,`is_active`) values (25,9,'Cuidados com o bebê','<p>Aqui entra a descrição da aula 3</p>',20,'<iframe class=\"embed-responsive-item\" src=\"https://www.youtube.com/embed/YTrKiSZNzRM?controls=1\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>',9,'2021-01-06 23:58:35','2021-01-18 10:46:49',1);
insert into `aulas`(`id`,`modulo_id`,`titulo`,`descricao`,`carga_horaria`,`link`,`ordem`,`created_at`,`updated_at`,`is_active`) values (26,10,'Primeiros 1000 dias','<p>Aqui entra a descrição da aula 4</p>',30,'YTrKiSZNzRM',10,'2021-01-06 23:59:26','2021-01-18 10:48:52',1);
insert into `aulas`(`id`,`modulo_id`,`titulo`,`descricao`,`carga_horaria`,`link`,`ordem`,`created_at`,`updated_at`,`is_active`) values (27,10,'A construção do vínculo seguro','<p>Aqui entra a descrição da aula 5</p>',38,'jvX9eozwbtU',11,'2021-01-07 00:00:24','2021-01-18 10:49:30',1);
insert into `aulas`(`id`,`modulo_id`,`titulo`,`descricao`,`carga_horaria`,`link`,`ordem`,`created_at`,`updated_at`,`is_active`) values (28,10,'Mantendo a amamentação após o retorno','<p>Aqui entra a descrição da aula 1</p>',25,'YTrKiSZNzRM',12,'2021-01-07 00:01:20','2021-01-18 10:50:14',1);
insert into `aulas`(`id`,`modulo_id`,`titulo`,`descricao`,`carga_horaria`,`link`,`ordem`,`created_at`,`updated_at`,`is_active`) values (29,10,'Lidando com a culpa e organizando o retorno ao trabalho',NULL,50,'YTrKiSZNzRM',13,'2021-01-07 00:02:38','2021-01-18 10:51:53',1);
insert into `aulas`(`id`,`modulo_id`,`titulo`,`descricao`,`carga_horaria`,`link`,`ordem`,`created_at`,`updated_at`,`is_active`) values (35,12,'Bônus 1: Nome da aula','<p>Nome do aula bonus 1</p>',2,'jvX9eozwbtU',14,'2021-01-18 21:38:18','2021-01-18 21:38:18',1);
insert into `aulas`(`id`,`modulo_id`,`titulo`,`descricao`,`carga_horaria`,`link`,`ordem`,`created_at`,`updated_at`,`is_active`) values (36,12,'Bônus 2: Nome da aula','<p>Nome aula 2 bônus</p>',45,'jvX9eozwbtU',15,'2021-01-18 21:39:15','2021-01-18 21:39:15',1);
/*Table structure for table `certificados` */
DROP TABLE IF EXISTS `certificados`;
CREATE TABLE `certificados` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) unsigned NOT NULL,
`curso_id` bigint(20) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_certificados_users1_idx` (`user_id`),
KEY `fk_certificados_cursos1_idx` (`curso_id`),
CONSTRAINT `fk_certificados_cursos1` FOREIGN KEY (`curso_id`) REFERENCES `cursos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_certificados_users1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
/*Data for the table `certificados` */
insert into `certificados`(`id`,`user_id`,`curso_id`,`created_at`,`updated_at`) values (2,96,3,'2021-01-05 16:26:15','2021-01-05 16:26:15');
insert into `certificados`(`id`,`user_id`,`curso_id`,`created_at`,`updated_at`) values (3,96,3,'2021-01-05 16:26:16','2021-01-05 16:26:16');
insert into `certificados`(`id`,`user_id`,`curso_id`,`created_at`,`updated_at`) values (4,96,3,'2021-01-05 16:26:30','2021-01-05 16:26:30');
insert into `certificados`(`id`,`user_id`,`curso_id`,`created_at`,`updated_at`) values (6,115,3,'2021-01-08 11:43:22','2021-01-08 11:43:22');
insert into `certificados`(`id`,`user_id`,`curso_id`,`created_at`,`updated_at`) values (7,119,3,'2021-01-08 15:22:41','2021-01-08 15:22:41');
/*Table structure for table `cursos` */
DROP TABLE IF EXISTS `cursos`;
CREATE TABLE `cursos` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`nome` varchar(45) NOT NULL,
`descricao` text DEFAULT NULL,
`certificado` text DEFAULT NULL,
`banner` varchar(255) DEFAULT NULL,
`base_certificado` varchar(255) DEFAULT NULL,
`is_active` tinyint(4) NOT NULL DEFAULT 1,
`mensagem_conclusao` text DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*Data for the table `cursos` */
insert into `cursos`(`id`,`nome`,`descricao`,`certificado`,`banner`,`base_certificado`,`is_active`,`mensagem_conclusao`) values (3,'Programa Corporativo Gestantes e Futuros Pais',NULL,NULL,'cursos/banner-curso.png','base-certificado.png',1,'<strong>Você acabou de finalizar o programa corporativo para gestantes e futuros pais.</strong>\r\n<br>\r\nObrigado por ter participado! \r\n<br>\r\nEsperamos ter contribuído para que sua experiência com a chegada do filho(a) tenha sido mais leve, segura e respeitosa.\r\n');
/*Table structure for table `email` */
DROP TABLE IF EXISTS `email`;
CREATE TABLE `email` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) unsigned NOT NULL,
`nome_remetente` varchar(255) DEFAULT NULL,
`email_remetente` varchar(255) NOT NULL,
`nome_destinatario` varchar(255) DEFAULT NULL,
`email_destinatario` varchar(255) NOT NULL,
`corpo` text NOT NULL,
`enviado` tinyint(4) NOT NULL DEFAULT 0,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_email_users1_idx` (`user_id`),
CONSTRAINT `fk_email_users1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `email` */
/*Table structure for table `empresas` */
DROP TABLE IF EXISTS `empresas`;
CREATE TABLE `empresas` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`nome` varchar(255) NOT NULL,
`descricao` text DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT NULL,
`is_active` tinyint(4) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
/*Data for the table `empresas` */
insert into `empresas`(`id`,`nome`,`descricao`,`created_at`,`updated_at`,`is_active`) values (4,'Atma Interativa','<p>Campo destinado a observações sobre a contratação</p>','2021-01-05 15:22:14','2021-01-05 15:22:54',1);
insert into `empresas`(`id`,`nome`,`descricao`,`created_at`,`updated_at`,`is_active`) values (5,'FIAT','<p>Destalhes da contratação</p>','2021-01-06 22:43:49','2021-01-07 18:05:22',1);
insert into `empresas`(`id`,`nome`,`descricao`,`created_at`,`updated_at`,`is_active`) values (6,'Santander','<p>Descrição</p>','2021-01-07 18:17:24','2021-01-07 18:17:24',1);
insert into `empresas`(`id`,`nome`,`descricao`,`created_at`,`updated_at`,`is_active`) values (7,'Aldeia Consultoria','<p>Observações sobre o processo comercial e contatos da empresa</p>','2021-01-07 21:55:41','2021-01-07 21:55:51',1);
insert into `empresas`(`id`,`nome`,`descricao`,`created_at`,`updated_at`,`is_active`) values (8,'Lojas Americanas','<p>Data da contratação: 1y1t1tyq</p>\r\n<p>Nome do contato: hgagavbxjdjucbdjdbd</p>','2021-01-08 14:43:00','2021-01-08 14:43:00',1);
/*Table structure for table `failed_jobs` */
DROP TABLE IF EXISTS `failed_jobs`;
CREATE TABLE `failed_jobs` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
`queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`failed_at` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`),
UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*Data for the table `failed_jobs` */
/*Table structure for table `feedbacks` */
DROP TABLE IF EXISTS `feedbacks`;
CREATE TABLE `feedbacks` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) unsigned NOT NULL,
`curso_id` bigint(20) NOT NULL,
`pergunta_id` bigint(20) NOT NULL,
`resposta_id` bigint(20) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_curso_pergunta` (`curso_id`,`pergunta_id`,`user_id`),
KEY `fk_users_has_respostas_respostas1_idx` (`resposta_id`),
KEY `fk_users_has_respostas_users1_idx` (`user_id`),
KEY `fk_feedbacks_cursos1_idx` (`curso_id`),
KEY `fk_feedbacks_perguntas1_idx` (`pergunta_id`),
CONSTRAINT `fk_feedbacks_cursos1` FOREIGN KEY (`curso_id`) REFERENCES `cursos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_feedbacks_perguntas1` FOREIGN KEY (`pergunta_id`) REFERENCES `perguntas` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_users_has_respostas_respostas1` FOREIGN KEY (`resposta_id`) REFERENCES `respostas` (`id`) ON UPDATE CASCADE,
CONSTRAINT `fk_users_has_respostas_users1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*Data for the table `feedbacks` */
/*Table structure for table `materiais` */
DROP TABLE IF EXISTS `materiais`;
CREATE TABLE `materiais` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`aula_id` bigint(20) DEFAULT NULL,
`modulo_id` bigint(20) DEFAULT NULL,
`titulo` varchar(255) NOT NULL,
`descricao` text DEFAULT NULL,
`arquivo` varchar(255) DEFAULT NULL,
`link` varchar(500) DEFAULT NULL,
`ordem` int(11) NOT NULL DEFAULT 0,
`is_active` tinyint(4) NOT NULL DEFAULT 1,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_table1_aulas1_idx` (`aula_id`),
KEY `fk_materiais_modulos1_idx` (`modulo_id`),
CONSTRAINT `fk_materiais_modulos1` FOREIGN KEY (`modulo_id`) REFERENCES `modulos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_table1_aulas1` FOREIGN KEY (`aula_id`) REFERENCES `aulas` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
/*Data for the table `materiais` */
/*Table structure for table `matriculas` */
DROP TABLE IF EXISTS `matriculas`;
CREATE TABLE `matriculas` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) unsigned NOT NULL,
`curso_id` bigint(20) NOT NULL,
`empresa_id` bigint(20) NOT NULL,
`plano_id` bigint(20) NOT NULL,
`is_active` tinyint(4) NOT NULL DEFAULT 1,
`tempo_acesso` int(11) DEFAULT NULL,
`data_limite` timestamp NULL DEFAULT NULL,
`data_conclusao` timestamp NULL DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_matricula` (`user_id`,`curso_id`,`empresa_id`),
KEY `fk_matriculas_users1_idx` (`user_id`),
KEY `fk_matriculas_cursos1_idx` (`curso_id`),
KEY `fk_matriculas_empresas1_idx` (`empresa_id`),
KEY `fk_matriculas_planos1_idx` (`plano_id`),
KEY `ix_data_limite` (`data_limite`),
CONSTRAINT `fk_matriculas_cursos1` FOREIGN KEY (`curso_id`) REFERENCES `cursos` (`id`) ON UPDATE CASCADE,
CONSTRAINT `fk_matriculas_empresas1` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`) ON UPDATE CASCADE,
CONSTRAINT `fk_matriculas_planos1` FOREIGN KEY (`plano_id`) REFERENCES `planos` (`id`) ON UPDATE CASCADE,
CONSTRAINT `fk_matriculas_users1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=utf8;
/*Data for the table `matriculas` */
insert into `matriculas`(`id`,`user_id`,`curso_id`,`empresa_id`,`plano_id`,`is_active`,`tempo_acesso`,`data_limite`,`data_conclusao`,`created_at`,`updated_at`) values (68,96,3,4,7,1,270,'2021-10-02 15:51:35','2021-01-05 16:25:44','2021-01-05 15:51:35','2021-01-05 16:25:44');
insert into `matriculas`(`id`,`user_id`,`curso_id`,`empresa_id`,`plano_id`,`is_active`,`tempo_acesso`,`data_limite`,`data_conclusao`,`created_at`,`updated_at`) values (81,115,3,6,9,1,270,'2021-10-05 11:37:22','2021-01-08 11:43:06','2021-01-08 11:37:22','2021-01-08 11:43:06');
insert into `matriculas`(`id`,`user_id`,`curso_id`,`empresa_id`,`plano_id`,`is_active`,`tempo_acesso`,`data_limite`,`data_conclusao`,`created_at`,`updated_at`) values (83,117,3,7,10,1,270,'2021-10-05 14:32:28',NULL,'2021-01-08 14:32:28','2021-01-08 14:32:28');
insert into `matriculas`(`id`,`user_id`,`curso_id`,`empresa_id`,`plano_id`,`is_active`,`tempo_acesso`,`data_limite`,`data_conclusao`,`created_at`,`updated_at`) values (84,118,3,8,10,1,270,'2021-10-05 14:53:22',NULL,'2021-01-08 14:53:22','2021-01-08 14:53:22');
insert into `matriculas`(`id`,`user_id`,`curso_id`,`empresa_id`,`plano_id`,`is_active`,`tempo_acesso`,`data_limite`,`data_conclusao`,`created_at`,`updated_at`) values (85,115,3,8,10,1,270,'2021-10-05 14:57:25',NULL,'2021-01-08 14:57:25','2021-01-08 14:57:25');
insert into `matriculas`(`id`,`user_id`,`curso_id`,`empresa_id`,`plano_id`,`is_active`,`tempo_acesso`,`data_limite`,`data_conclusao`,`created_at`,`updated_at`) values (86,119,3,8,10,1,270,'2021-10-05 15:01:35','2021-01-08 15:21:56','2021-01-08 15:01:35','2021-01-08 15:21:56');
insert into `matriculas`(`id`,`user_id`,`curso_id`,`empresa_id`,`plano_id`,`is_active`,`tempo_acesso`,`data_limite`,`data_conclusao`,`created_at`,`updated_at`) values (87,120,3,8,10,1,270,'2021-10-05 15:08:35',NULL,'2021-01-08 15:08:35','2021-01-08 15:08:35');
insert into `matriculas`(`id`,`user_id`,`curso_id`,`empresa_id`,`plano_id`,`is_active`,`tempo_acesso`,`data_limite`,`data_conclusao`,`created_at`,`updated_at`) values (88,121,3,8,10,1,270,'2021-10-05 15:08:41',NULL,'2021-01-08 15:08:41','2021-01-08 15:08:41');
insert into `matriculas`(`id`,`user_id`,`curso_id`,`empresa_id`,`plano_id`,`is_active`,`tempo_acesso`,`data_limite`,`data_conclusao`,`created_at`,`updated_at`) values (89,1,3,8,10,1,270,'2021-10-15 21:05:29',NULL,'2021-01-18 21:05:29','2021-01-18 21:05:29');
/*Table structure for table `migrations` */
DROP TABLE IF EXISTS `migrations`;
CREATE TABLE `migrations` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*Data for the table `migrations` */
insert into `migrations`(`id`,`migration`,`batch`) values (1,'2014_10_12_000000_create_users_table',1);
insert into `migrations`(`id`,`migration`,`batch`) values (2,'2014_10_12_100000_create_password_resets_table',1);
insert into `migrations`(`id`,`migration`,`batch`) values (3,'2019_08_19_000000_create_failed_jobs_table',1);
insert into `migrations`(`id`,`migration`,`batch`) values (4,'2020_12_17_230803_create_permission_tables',1);
/*Table structure for table `model_has_permissions` */
DROP TABLE IF EXISTS `model_has_permissions`;
CREATE TABLE `model_has_permissions` (
`permission_id` bigint(20) unsigned NOT NULL,
`model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`model_id` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`),
CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*Data for the table `model_has_permissions` */
/*Table structure for table `model_has_roles` */
DROP TABLE IF EXISTS `model_has_roles`;
CREATE TABLE `model_has_roles` (
`role_id` bigint(20) unsigned NOT NULL,
`model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`model_id` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`role_id`,`model_id`,`model_type`),
KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`),
CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*Data for the table `model_has_roles` */
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (1,'App\\Models\\User',1);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (1,'App\\Models\\User',84);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (1,'App\\Models\\User',90);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (1,'App\\Models\\User',91);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (1,'App\\Models\\User',92);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (1,'App\\Models\\User',93);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (1,'App\\Models\\User',94);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (1,'App\\Models\\User',96);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (1,'App\\Models\\User',117);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',1);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',6);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',11);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',12);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',14);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',15);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',16);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',17);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',18);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',20);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',32);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',33);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',35);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',36);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',37);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',38);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',39);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',40);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',41);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',42);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',43);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',44);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',45);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',46);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',47);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',48);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',49);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',50);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',51);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',52);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',53);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',54);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',55);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',56);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',57);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',58);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',59);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',60);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',61);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',62);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',63);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',64);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',80);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',81);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',96);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',102);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',103);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',109);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',115);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',117);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',118);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',119);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',120);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (2,'App\\Models\\User',121);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (3,'App\\Models\\User',83);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (3,'App\\Models\\User',84);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (3,'App\\Models\\User',89);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (3,'App\\Models\\User',95);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (3,'App\\Models\\User',109);
insert into `model_has_roles`(`role_id`,`model_type`,`model_id`) values (3,'App\\Models\\User',118);
/*Table structure for table `modulos` */
DROP TABLE IF EXISTS `modulos`;
CREATE TABLE `modulos` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`curso_id` bigint(20) NOT NULL,
`nome` varchar(255) NOT NULL,
`descricao` text DEFAULT NULL,
`ordem` int(11) NOT NULL DEFAULT 0,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT NULL,
`modulo_padrao` tinyint(4) DEFAULT 1,
PRIMARY KEY (`id`),
KEY `fk_modulos_cursos1_idx` (`curso_id`),
CONSTRAINT `fk_modulos_cursos1` FOREIGN KEY (`curso_id`) REFERENCES `cursos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
/*Data for the table `modulos` */
insert into `modulos`(`id`,`curso_id`,`nome`,`descricao`,`ordem`,`created_at`,`updated_at`,`modulo_padrao`) values (8,3,'Estamos grávidos','<p>A gestação é um momento único, repleto de expectativas, medos e dúvidas. Você e sua família terão acesso à informações sobre as alterações do corpo gestante, os cuidados e atividades físicas, o parto, como se preparar e definir sua rede de apoio. Com este módulo, queremos apoiar e estar ao seu lado para que você vivencie todas as transformações de maneira segura e saudável.</p>',1,'2021-01-05 15:29:04','2021-01-18 21:14:57',1);
insert into `modulos`(`id`,`curso_id`,`nome`,`descricao`,`ordem`,`created_at`,`updated_at`,`modulo_padrao`) values (9,3,'Nasceu, e agora?','<p>O nascimento é um encontro muito esperado, especial e acompanha muitas transformações emocionais e hormonais. Você e sua família terão acesso à informações sobre a primeira hora de vida, os desafios do puerpério, a amamentação e os primeiros cuidados com o bebê. Com este módulo, queremos que você se sinta segura e acolhida para seguir e vivenciar esta nova dinâmica familiar, encontrando a sua própria maneira de maternar e paternar.</p>',2,'2021-01-06 23:19:36','2021-01-18 21:16:51',1);
insert into `modulos`(`id`,`curso_id`,`nome`,`descricao`,`ordem`,`created_at`,`updated_at`,`modulo_padrao`) values (10,3,'Parentalidade e a volta ao trabalho','<p>A parentalidade é uma construção intensa e real. Você e sua família terão acesso à informações sobre os primeiros 1000 dias, a criação com apego, a volta ao trabalho e como conciliar carreira e a chegada dos filhos. Com este módulo, queremos desconstruir viesses e culpas, apoiando e direcionando você para uma parentalidade possível, respeitosa e amorosa.</p>',3,'2021-01-06 23:21:22','2021-01-18 21:18:20',1);
insert into `modulos`(`id`,`curso_id`,`nome`,`descricao`,`ordem`,`created_at`,`updated_at`,`modulo_padrao`) values (12,3,'Bônus','<p>Aproveitem os bônus </p>',4,'2021-01-18 21:36:20','2021-01-18 21:36:20',1);
/*Table structure for table `parametros` */
DROP TABLE IF EXISTS `parametros`;
CREATE TABLE `parametros` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`nome` varchar(255) NOT NULL,
`descricao` varchar(255) NOT NULL,
`is_active` tinyint(4) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `parametros` */
/*Table structure for table `password_resets` */
DROP TABLE IF EXISTS `password_resets`;
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
KEY `password_resets_email_index` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*Data for the table `password_resets` */
/*Table structure for table `perguntas` */
DROP TABLE IF EXISTS `perguntas`;
CREATE TABLE `perguntas` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`questionario_id` bigint(20) NOT NULL,
`pergunta` varchar(500) NOT NULL,
`ordem` int(11) NOT NULL DEFAULT 0,
`is_active` tinyint(4) NOT NULL DEFAULT 1,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_perguntas_questionarios1_idx` (`questionario_id`),
CONSTRAINT `fk_perguntas_questionarios1` FOREIGN KEY (`questionario_id`) REFERENCES `questionarios` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
/*Data for the table `perguntas` */
insert into `perguntas`(`id`,`questionario_id`,`pergunta`,`ordem`,`is_active`,`created_at`,`updated_at`) values (8,5,'1- Qual o seu gênero?',1,1,'2021-01-18 11:22:42','2021-01-18 11:30:31');
insert into `perguntas`(`id`,`questionario_id`,`pergunta`,`ordem`,`is_active`,`created_at`,`updated_at`) values (9,5,'2- Quantos filhos você tem (já nascidos)?',2,1,'2021-01-18 11:26:17','2021-01-18 11:26:17');
insert into `perguntas`(`id`,`questionario_id`,`pergunta`,`ordem`,`is_active`,`created_at`,`updated_at`) values (11,5,'3- Qual é o seu momento atual:',3,1,'2021-01-18 11:30:13','2021-01-18 11:30:13');
insert into `perguntas`(`id`,`questionario_id`,`pergunta`,`ordem`,`is_active`,`created_at`,`updated_at`) values (12,5,'4- O Programa Corporativo Gestantes e Futuros Pais atendeu às suas expectativas?',4,1,'2021-01-18 11:33:32','2021-01-18 11:35:27');
insert into `perguntas`(`id`,`questionario_id`,`pergunta`,`ordem`,`is_active`,`created_at`,`updated_at`) values (13,5,'5- O formato utilizado para os materiais de apoio foram adequados?',5,1,'2021-01-18 11:36:35','2021-01-18 11:36:35');
insert into `perguntas`(`id`,`questionario_id`,`pergunta`,`ordem`,`is_active`,`created_at`,`updated_at`) values (14,5,'6- O conteúdo trabalhado nos materiais de apoio atendeu às suas expectativas?',6,1,'2021-01-18 11:38:59','2021-01-18 11:38:59');
insert into `perguntas`(`id`,`questionario_id`,`pergunta`,`ordem`,`is_active`,`created_at`,`updated_at`) values (15,5,'7- Sobre as videoaulas: O formato utilizado foi adequado?',7,1,'2021-01-18 15:27:24','2021-01-18 15:27:24');
insert into `perguntas`(`id`,`questionario_id`,`pergunta`,`ordem`,`is_active`,`created_at`,`updated_at`) values (16,5,'8- Sobre as videoaulas: A duração foi suficiente?',8,1,'2021-01-18 15:29:47','2021-01-18 15:29:47');
insert into `perguntas`(`id`,`questionario_id`,`pergunta`,`ordem`,`is_active`,`created_at`,`updated_at`) values (17,5,'9- Sobre as videoaulas: O conteúdo atendeu a sua expectativa?',9,1,'2021-01-18 15:31:41','2021-01-18 15:31:41');
insert into `perguntas`(`id`,`questionario_id`,`pergunta`,`ordem`,`is_active`,`created_at`,`updated_at`) values (18,5,'10- Sobre o módulo I, coloque uma nota de 0 à 7 (sendo 0 péssimo e 7 ótimo):',10,1,'2021-01-18 15:33:58','2021-01-18 15:33:58');
insert into `perguntas`(`id`,`questionario_id`,`pergunta`,`ordem`,`is_active`,`created_at`,`updated_at`) values (19,5,'11- Sobre o módulo II, coloque uma nota de 0 à 7 (sendo 0 péssimo e 7 ótimo):',11,1,'2021-01-18 15:37:36','2021-01-18 15:37:36');
insert into `perguntas`(`id`,`questionario_id`,`pergunta`,`ordem`,`is_active`,`created_at`,`updated_at`) values (20,5,'12- Sobre o módulo III, coloque uma nota de 0 à 7 (sendo 0 péssimo e 7 ótimo):',12,1,'2021-01-18 15:42:03','2021-01-18 15:42:03');
insert into `perguntas`(`id`,`questionario_id`,`pergunta`,`ordem`,`is_active`,`created_at`,`updated_at`) values (21,5,'13- Você recomendaria este Programa para outras gestantes e futuros pais?',13,1,'2021-01-18 15:48:40','2021-01-18 15:48:40');
/*Table structure for table `permissions` */
DROP TABLE IF EXISTS `permissions`;
CREATE TABLE `permissions` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*Data for the table `permissions` */
insert into `permissions`(`id`,`name`,`guard_name`,`created_at`,`updated_at`) values (1,'role-list','web','2020-12-17 23:25:01','2020-12-17 23:25:01');
insert into `permissions`(`id`,`name`,`guard_name`,`created_at`,`updated_at`) values (2,'role-create','web','2020-12-17 23:25:01','2020-12-17 23:25:01');
insert into `permissions`(`id`,`name`,`guard_name`,`created_at`,`updated_at`) values (3,'role-edit','web','2020-12-17 23:25:01','2020-12-17 23:25:01');
insert into `permissions`(`id`,`name`,`guard_name`,`created_at`,`updated_at`) values (4,'role-delete','web','2020-12-17 23:25:01','2020-12-17 23:25:01');
insert into `permissions`(`id`,`name`,`guard_name`,`created_at`,`updated_at`) values (5,'product-list','web','2020-12-17 23:25:01','2020-12-17 23:25:01');
insert into `permissions`(`id`,`name`,`guard_name`,`created_at`,`updated_at`) values (6,'product-create','web','2020-12-17 23:25:01','2020-12-17 23:25:01');
insert into `permissions`(`id`,`name`,`guard_name`,`created_at`,`updated_at`) values (7,'product-edit','web','2020-12-17 23:25:01','2020-12-17 23:25:01');
insert into `permissions`(`id`,`name`,`guard_name`,`created_at`,`updated_at`) values (8,'product-delete','web','2020-12-17 23:25:01','2020-12-17 23:25:01');
/*Table structure for table `planos` */
DROP TABLE IF EXISTS `planos`;
CREATE TABLE `planos` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`nome` varchar(255) NOT NULL,
`descricao` text DEFAULT NULL,
`valor` double(10,2) NOT NULL DEFAULT 0.00,
`is_active` tinyint(4) NOT NULL DEFAULT 1,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/*Data for the table `planos` */
insert into `planos`(`id`,`nome`,`descricao`,`valor`,`is_active`,`created_at`,`updated_at`) values (7,'Plano Bronze','<p>teste de descrição</p>',0.00,1,'2021-01-05 15:18:59','2021-01-05 15:18:59');
insert into `planos`(`id`,`nome`,`descricao`,`valor`,`is_active`,`created_at`,`updated_at`) values (8,'Plano prata','<p>teste descrição plano prata</p>',0.00,1,'2021-01-05 15:19:32','2021-01-05 15:19:32');
insert into `planos`(`id`,`nome`,`descricao`,`valor`,`is_active`,`created_at`,`updated_at`) values (9,'Plano ouro','<p>teste de dexcrição plano ouro</p>',0.00,1,'2021-01-05 15:19:59','2021-01-05 15:19:59');
insert into `planos`(`id`,`nome`,`descricao`,`valor`,`is_active`,`created_at`,`updated_at`) values (10,'Plano Super Plus','<p>Este ó super plano</p>',0.00,1,'2021-01-07 21:54:47','2021-01-07 21:54:47');
/*Table structure for table `planos_has_cursos` */
DROP TABLE IF EXISTS `planos_has_cursos`;
CREATE TABLE `planos_has_cursos` (
`plano_id` bigint(20) NOT NULL,
`curso_id` bigint(20) NOT NULL,
`usuarios` int(11) NOT NULL DEFAULT 0,
`tempo_acesso` int(11) NOT NULL,
PRIMARY KEY (`plano_id`,`curso_id`),
KEY `fk_planos_has_cursos_cursos1_idx` (`curso_id`),
KEY `fk_planos_has_cursos_planos1_idx` (`plano_id`),
CONSTRAINT `fk_planos_has_cursos_cursos1` FOREIGN KEY (`curso_id`) REFERENCES `cursos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_planos_has_cursos_planos1` FOREIGN KEY (`plano_id`) REFERENCES `planos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `planos_has_cursos` */
insert into `planos_has_cursos`(`plano_id`,`curso_id`,`usuarios`,`tempo_acesso`) values (7,3,50,270);
insert into `planos_has_cursos`(`plano_id`,`curso_id`,`usuarios`,`tempo_acesso`) values (8,3,100,270);
insert into `planos_has_cursos`(`plano_id`,`curso_id`,`usuarios`,`tempo_acesso`) values (9,3,200,270);
insert into `planos_has_cursos`(`plano_id`,`curso_id`,`usuarios`,`tempo_acesso`) values (10,3,500,270);
/*Table structure for table `planos_has_empresas` */
DROP TABLE IF EXISTS `planos_has_empresas`;
CREATE TABLE `planos_has_empresas` (
`plano_id` bigint(20) NOT NULL,
`empresa_id` bigint(20) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`plano_id`,`empresa_id`),
KEY `fk_planos_has_empresas_empresas1_idx` (`empresa_id`),
KEY `fk_planos_has_empresas_planos1_idx` (`plano_id`),
CONSTRAINT `fk_planos_has_empresas_empresas1` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_planos_has_empresas_planos1` FOREIGN KEY (`plano_id`) REFERENCES `planos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `planos_has_empresas` */
insert into `planos_has_empresas`(`plano_id`,`empresa_id`,`created_at`) values (7,4,'2021-01-05 15:22:14');
insert into `planos_has_empresas`(`plano_id`,`empresa_id`,`created_at`) values (9,5,'2021-01-06 22:43:48');
insert into `planos_has_empresas`(`plano_id`,`empresa_id`,`created_at`) values (9,6,'2021-01-07 18:17:24');
insert into `planos_has_empresas`(`plano_id`,`empresa_id`,`created_at`) values (10,7,'2021-01-07 21:55:41');
insert into `planos_has_empresas`(`plano_id`,`empresa_id`,`created_at`) values (10,8,'2021-01-08 14:42:57');
/*Table structure for table `posts` */
DROP TABLE IF EXISTS `posts`;
CREATE TABLE `posts` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) unsigned NOT NULL,
`curso_id` bigint(20) NOT NULL,
`post_id` bigint(20) DEFAULT NULL,
`empresa_id` bigint(20) DEFAULT NULL,
`post` text NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`is_active` tinyint(4) NOT NULL DEFAULT 1,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_posts_users1_idx` (`user_id`),
KEY `fk_posts_posts1_idx` (`post_id`),
KEY `fk_posts_cursos1_idx` (`curso_id`),
KEY `fk_posts_empresas1_idx` (`empresa_id`),
CONSTRAINT `fk_posts_cursos1` FOREIGN KEY (`curso_id`) REFERENCES `cursos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_posts_empresas1` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_posts_posts1` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_posts_users1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8;
/*Data for the table `posts` */
insert into `posts`(`id`,`user_id`,`curso_id`,`post_id`,`empresa_id`,`post`,`created_at`,`is_active`,`updated_at`) values (24,96,3,NULL,NULL,'Primeiro post do fórum.','2021-01-05 15:58:36',1,'2021-01-05 15:58:36');
insert into `posts`(`id`,`user_id`,`curso_id`,`post_id`,`empresa_id`,`post`,`created_at`,`is_active`,`updated_at`) values (25,96,3,24,NULL,'bacana... parabens pelo ppst','2021-01-05 15:59:23',1,'2021-01-05 15:59:23');
insert into `posts`(`id`,`user_id`,`curso_id`,`post_id`,`empresa_id`,`post`,`created_at`,`is_active`,`updated_at`) values (26,96,3,24,NULL,'Ok','2021-01-05 15:59:29',1,'2021-01-05 15:59:29');
insert into `posts`(`id`,`user_id`,`curso_id`,`post_id`,`empresa_id`,`post`,`created_at`,`is_active`,`updated_at`) values (30,119,3,24,NULL,'concordo plenamente','2021-01-08 15:38:17',1,'2021-01-08 15:38:17');
insert into `posts`(`id`,`user_id`,`curso_id`,`post_id`,`empresa_id`,`post`,`created_at`,`is_active`,`updated_at`) values (31,119,3,NULL,NULL,'Que bacana este forum','2021-01-08 15:38:33',1,'2021-01-08 15:38:33');
insert into `posts`(`id`,`user_id`,`curso_id`,`post_id`,`empresa_id`,`post`,`created_at`,`is_active`,`updated_at`) values (32,119,3,31,NULL,'Complementando','2021-01-08 15:38:48',1,'2021-01-08 15:38:48');
insert into `posts`(`id`,`user_id`,`curso_id`,`post_id`,`empresa_id`,`post`,`created_at`,`is_active`,`updated_at`) values (33,96,3,31,4,'byxuhsuhijdirjirjir','2021-01-18 16:19:01',1,'2021-01-18 16:19:01');
/*Table structure for table `questionarios` */
DROP TABLE IF EXISTS `questionarios`;
CREATE TABLE `questionarios` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`curso_id` bigint(20) NOT NULL,
`nome` varchar(255) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_questionarios_cursos1_idx` (`curso_id`),
KEY `uq_curso` (`curso_id`),
CONSTRAINT `fk_questionarios_cursos1` FOREIGN KEY (`curso_id`) REFERENCES `cursos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*Data for the table `questionarios` */
insert into `questionarios`(`id`,`curso_id`,`nome`,`created_at`,`updated_at`) values (5,3,'Pesquisa de Satisfação Programa Corporativo Gestantes e Futuros Pais','2021-01-07 22:43:37','2021-01-18 11:19:11');
/*Table structure for table `respostas` */
DROP TABLE IF EXISTS `respostas`;
CREATE TABLE `respostas` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`pergunta_id` bigint(20) NOT NULL,
`resposta` varchar(500) NOT NULL,
`ordem` char(1) NOT NULL DEFAULT '0',
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_respostas_perguntas1_idx` (`pergunta_id`),
CONSTRAINT `fk_respostas_perguntas1` FOREIGN KEY (`pergunta_id`) REFERENCES `perguntas` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8;
/*Data for the table `respostas` */
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (22,8,'Feminino','A','2021-01-18 11:23:44','2021-01-18 11:23:44');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (23,8,'Masculino','B','2021-01-18 11:24:14','2021-01-18 11:24:14');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (24,8,'Prefiro não responder','C','2021-01-18 11:24:56','2021-01-18 11:24:56');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (25,8,'Outro','D','2021-01-18 11:25:24','2021-01-18 11:25:24');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (26,9,'0','A','2021-01-18 11:27:40','2021-01-18 11:27:40');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (27,9,'1','B','2021-01-18 11:28:04','2021-01-18 11:28:04');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (28,9,'2','C','2021-01-18 11:28:32','2021-01-18 11:28:32');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (29,9,'3','D','2021-01-18 11:29:03','2021-01-18 11:29:03');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (30,9,'Mais de 3','E','2021-01-18 11:29:28','2021-01-18 11:29:28');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (31,11,'Esperando um bebê (primeiro trimestre)','A','2021-01-18 11:31:11','2021-01-18 11:31:11');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (32,11,'Esperando um bebê (segundo trimestre)','B','2021-01-18 11:31:45','2021-01-18 11:31:45');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (33,11,'Esperando um bebê (terceiro trimestre)','C','2021-01-18 11:32:07','2021-01-18 11:32:07');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (34,11,'Estou em processo de adoção','D','2021-01-18 11:32:42','2021-01-18 11:32:42');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (35,11,'Outro','E','2021-01-18 11:33:06','2021-01-18 11:33:06');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (36,12,'Sim, mais do que eu esperava.','A','2021-01-18 11:34:01','2021-01-18 11:34:01');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (37,12,'Sim, atendeu à minha expectativa.','B','2021-01-18 11:34:39','2021-01-18 11:34:39');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (38,12,'Não atendeu à minha expectativa.','C','2021-01-18 11:35:06','2021-01-18 11:35:06');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (39,13,'Sim, com certeza','A','2021-01-18 11:37:12','2021-01-18 11:37:12');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (40,13,'Sim, em partes','B','2021-01-18 11:37:36','2021-01-18 11:37:36');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (41,13,'Não','C','2021-01-18 11:37:56','2021-01-18 11:37:56');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (42,14,'Sim, com certeza','A','2021-01-18 11:40:30','2021-01-18 11:40:30');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (43,14,'Sim, em partes','B','2021-01-18 11:40:54','2021-01-18 11:40:54');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (44,14,'Não','C','2021-01-18 11:41:17','2021-01-18 11:41:17');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (45,15,'Sim, com certeza','A','2021-01-18 15:27:57','2021-01-18 15:27:57');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (46,15,'Sim, em partes','B','2021-01-18 15:28:41','2021-01-18 15:28:41');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (47,15,'Não','C','2021-01-18 15:29:01','2021-01-18 15:29:01');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (48,16,'Sim, com certeza','A','2021-01-18 15:30:21','2021-01-18 15:30:21');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (49,16,'Sim, em partes','B','2021-01-18 15:30:41','2021-01-18 15:30:41');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (50,16,'Não','C','2021-01-18 15:31:02','2021-01-18 15:31:02');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (51,17,'Sim, com certeza','A','2021-01-18 15:32:13','2021-01-18 15:32:13');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (52,17,'Sim, em partes','B','2021-01-18 15:32:37','2021-01-18 15:32:37');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (53,17,'Não','C','2021-01-18 15:33:06','2021-01-18 15:33:06');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (54,18,'0','A','2021-01-18 15:34:34','2021-01-18 15:34:34');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (55,18,'1','B','2021-01-18 15:34:52','2021-01-18 15:34:52');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (56,18,'2','C','2021-01-18 15:35:12','2021-01-18 15:35:12');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (57,18,'3','D','2021-01-18 15:35:32','2021-01-18 15:35:32');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (58,18,'4','E','2021-01-18 15:35:53','2021-01-18 15:35:53');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (59,18,'5','F','2021-01-18 15:36:16','2021-01-18 15:36:16');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (60,18,'6','G','2021-01-18 15:36:37','2021-01-18 15:36:37');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (61,18,'7','H','2021-01-18 15:36:56','2021-01-18 15:36:56');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (62,19,'0','A','2021-01-18 15:38:01','2021-01-18 15:39:11');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (63,19,'1','B','2021-01-18 15:38:44','2021-01-18 15:38:44');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (64,19,'2','C','2021-01-18 15:39:33','2021-01-18 15:39:33');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (65,19,'3','D','2021-01-18 15:39:53','2021-01-18 15:39:53');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (66,19,'4','E','2021-01-18 15:40:17','2021-01-18 15:40:17');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (67,19,'5','F','2021-01-18 15:40:37','2021-01-18 15:40:37');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (68,19,'6','G','2021-01-18 15:40:55','2021-01-18 15:40:55');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (69,19,'7','H','2021-01-18 15:41:24','2021-01-18 15:41:24');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (70,20,'0','A','2021-01-18 15:42:33','2021-01-18 15:42:33');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (71,20,'1','B','2021-01-18 15:42:57','2021-01-18 15:42:57');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (72,20,'2','C','2021-01-18 15:43:22','2021-01-18 15:43:22');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (73,20,'3','D','2021-01-18 15:43:55','2021-01-18 15:43:55');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (74,20,'4','E','2021-01-18 15:44:21','2021-01-18 15:44:21');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (75,20,'5','F','2021-01-18 15:45:45','2021-01-18 15:45:45');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (76,20,'6','G','2021-01-18 15:46:06','2021-01-18 15:46:06');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (77,20,'7','E','2021-01-18 15:46:41','2021-01-18 15:46:41');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (78,21,'Sim, com certeza','A','2021-01-18 15:49:58','2021-01-18 15:49:58');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (79,21,'Sim, talvez','B','2021-01-18 15:50:25','2021-01-18 15:50:25');
insert into `respostas`(`id`,`pergunta_id`,`resposta`,`ordem`,`created_at`,`updated_at`) values (80,21,'Não','C','2021-01-18 15:50:51','2021-01-18 15:50:51');
/*Table structure for table `role_has_permissions` */
DROP TABLE IF EXISTS `role_has_permissions`;
CREATE TABLE `role_has_permissions` (
`permission_id` bigint(20) unsigned NOT NULL,
`role_id` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`permission_id`,`role_id`),
KEY `role_has_permissions_role_id_foreign` (`role_id`),
CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*Data for the table `role_has_permissions` */
insert into `role_has_permissions`(`permission_id`,`role_id`) values (1,1);
insert into `role_has_permissions`(`permission_id`,`role_id`) values (2,1);
insert into `role_has_permissions`(`permission_id`,`role_id`) values (3,1);
insert into `role_has_permissions`(`permission_id`,`role_id`) values (4,1);
insert into `role_has_permissions`(`permission_id`,`role_id`) values (5,1);
insert into `role_has_permissions`(`permission_id`,`role_id`) values (6,1);
insert into `role_has_permissions`(`permission_id`,`role_id`) values (7,1);
insert into `role_has_permissions`(`permission_id`,`role_id`) values (8,1);
/*Table structure for table `roles` */
DROP TABLE IF EXISTS `roles`;
CREATE TABLE `roles` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*Data for the table `roles` */
insert into `roles`(`id`,`name`,`guard_name`,`created_at`,`updated_at`) values (1,'Admin','web','2020-12-17 23:28:18','2020-12-17 23:28:18');
insert into `roles`(`id`,`name`,`guard_name`,`created_at`,`updated_at`) values (2,'Aluno','web','2020-12-17 23:28:18',NULL);
insert into `roles`(`id`,`name`,`guard_name`,`created_at`,`updated_at`) values (3,'Gestor','web',NULL,NULL);
/*Table structure for table `users` */
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`empresa_id` bigint(20) DEFAULT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`cpf` char(14) COLLATE utf8mb4_unicode_ci NOT NULL,
`phone` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`is_active` tinyint(4) NOT NULL DEFAULT 1,
`password_changed_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_email_unique` (`email`),
UNIQUE KEY `users_cpf_unique` (`cpf`),
UNIQUE KEY `users_cpf_email_unique` (`cpf`,`email`),
KEY `fk_users_empresas1_idx` (`empresa_id`),
CONSTRAINT `fk_users_empresas1` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=122 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*Data for the table `users` */
insert into `users`(`id`,`empresa_id`,`name`,`email`,`email_verified_at`,`cpf`,`phone`,`password`,`remember_token`,`created_at`,`updated_at`,`is_active`,`password_changed_at`) values (1,8,'Wagner (Administrador)','wagnerggg@gmail.com',NULL,'051.666.616-99','(31) 9825-86122','$2y$10$3dcJVpWR4BEbNHUfzHxd3ODyAqTCRnCIxhQvnavDy6FSEU9CiVUF6','7WJBlXyDNRJBwEHc0CBBh3f4sihpHtUJ5rwlhbio4iq7KvbSAUqZ1OJe3Fj7','2020-12-17 23:28:18','2021-01-18 21:04:54',1,'2020-12-29 00:05:48');
insert into `users`(`id`,`empresa_id`,`name`,`email`,`email_verified_at`,`cpf`,`phone`,`password`,`remember_token`,`created_at`,`updated_at`,`is_active`,`password_changed_at`) values (96,4,'Alexandre Atma','alexandre@atmainterativa.com.br',NULL,'047.993.476-24','(31) 9870-25257','$2y$10$tE/2JNjzmfEH2z5qpAk71.KL688V.LjBhxtTlSI.n2QbpcTk2lBp2','x14VqvATVCryjnuj5IFDZFNGSbybvLyfWfcGEyvA4zv7cdk2g9dtxS6rtUbr','2021-01-05 15:11:52','2021-01-06 22:04:55',1,'2021-01-05 15:14:42');
insert into `users`(`id`,`empresa_id`,`name`,`email`,`email_verified_at`,`cpf`,`phone`,`password`,`remember_token`,`created_at`,`updated_at`,`is_active`,`password_changed_at`) values (115,6,'Aluno Blaster','financeiro@atmainterativa.com.br',NULL,'222.222.222-22','(22) 22222-2222','$2y$10$k79PjRwelB1KCj4.oeM9ne3qXP/cm45Qa75RaNFdRGITRzPq6BMlu',NULL,'2021-01-08 11:37:22','2021-01-08 11:38:24',1,'2021-01-08 11:38:24');
insert into `users`(`id`,`empresa_id`,`name`,`email`,`email_verified_at`,`cpf`,`phone`,`password`,`remember_token`,`created_at`,`updated_at`,`is_active`,`password_changed_at`) values (117,7,'Karina Lara','karina.lara@aldeiaconsultoria.com.br',NULL,'047.689.426-36','(31) 99106-6565','$2y$10$yD/N1SEfvRtDjHnAv.4shOEHgxvhzzoI60mBHTpG4BaDH2PIUleJ6','Ttt3ih6URB2oMGq4a3iMfjmaHqfKibkiK8StrZ3mcfZVyl3LePEO9zuTOGVH','2021-01-08 14:32:28','2021-01-08 14:35:07',1,'2021-01-08 14:35:07');
insert into `users`(`id`,`empresa_id`,`name`,`email`,`email_verified_at`,`cpf`,`phone`,`password`,`remember_token`,`created_at`,`updated_at`,`is_active`,`password_changed_at`) values (118,8,'RH Lojas Americanas','alex80rp@gmail.com',NULL,'888.888.888-88','(31) 3887-77888','$2y$10$S6pFyARIyO5P4Y6iYg8THudjsWxAIhCVGcoxcVH/cLR41t2W9C262',NULL,'2021-01-08 14:46:03','2021-01-08 14:56:03',1,'2021-01-08 14:48:51');
insert into `users`(`id`,`empresa_id`,`name`,`email`,`email_verified_at`,`cpf`,`phone`,`password`,`remember_token`,`created_at`,`updated_at`,`is_active`,`password_changed_at`) values (119,8,'Aluno lojas Americanas 2','contato@atmainterativa.com.br',NULL,'000.000.000-00','(11) 1111-11111','$2y$10$JuqMb7OZgkOXhZZY43KhVulzZ9UwFcSYdVcQErX2l95aRhL0PZuue',NULL,'2021-01-08 15:01:35','2021-01-08 15:02:35',1,'2021-01-08 15:02:35');
insert into `users`(`id`,`empresa_id`,`name`,`email`,`email_verified_at`,`cpf`,`phone`,`password`,`remember_token`,`created_at`,`updated_at`,`is_active`,`password_changed_at`) values (120,8,'Teste A','a@atma.com.br',NULL,'866.545.895-54','(55) 3199-84771','$2y$10$rsEG3dZ3nPNYWSYpWf2skOdOwh8zQY9vyoJglojgv7jMCWUReJfF.',NULL,'2021-01-08 15:08:35','2021-01-08 15:08:35',1,NULL);
insert into `users`(`id`,`empresa_id`,`name`,`email`,`email_verified_at`,`cpf`,`phone`,`password`,`remember_token`,`created_at`,`updated_at`,`is_active`,`password_changed_at`) values (121,8,'Teste B','b@atma.com.br',NULL,'126.545.995-89','(31) 9999-99999','$2y$10$ju/r8v2gATof9LpVKocxDuOdIzeX7gmYn.1gJv7RJjMHv4S4htTma',NULL,'2021-01-08 15:08:41','2021-01-08 15:08:41',1,NULL);
/*Table structure for table `v_historicos` */
DROP TABLE IF EXISTS `v_historicos`;
CREATE TABLE `v_historicos` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) unsigned NOT NULL,
`curso_id` bigint(20) NOT NULL,
`aulas_curso` int(11) NOT NULL DEFAULT 0,
`aulas_concluidas` int(11) NOT NULL DEFAULT 0,
`certificado` text DEFAULT NULL,
`pesquisa_respondida` tinyint(4) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_historicos_users1_idx` (`user_id`),
KEY `fk_historicos_cursos1_idx` (`curso_id`),
CONSTRAINT `fk_historicos_cursos1` FOREIGN KEY (`curso_id`) REFERENCES `cursos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_historicos_users1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `v_historicos` */
/*Table structure for table `visualizacoes` */
DROP TABLE IF EXISTS `visualizacoes`;
CREATE TABLE `visualizacoes` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`aula_id` bigint(20) NOT NULL,
`user_id` bigint(20) unsigned NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_visualizacoes_users1_idx` (`user_id`),
KEY `fk_visualizacoes_aulas1_idx` (`aula_id`),
CONSTRAINT `fk_visualizacoes_aulas1` FOREIGN KEY (`aula_id`) REFERENCES `aulas` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_visualizacoes_users1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=185 DEFAULT CHARSET=utf8;
/*Data for the table `visualizacoes` */
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (72,17,96,'2021-01-05 16:15:28','2021-01-05 16:15:28');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (73,17,96,'2021-01-05 16:15:28','2021-01-05 16:15:28');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (74,17,96,'2021-01-06 23:29:42','2021-01-06 23:29:42');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (75,17,96,'2021-01-06 23:37:25','2021-01-06 23:37:25');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (76,17,96,'2021-01-06 23:38:52','2021-01-06 23:38:52');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (77,17,96,'2021-01-06 23:40:44','2021-01-06 23:40:44');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (78,17,96,'2021-01-06 23:41:26','2021-01-06 23:41:26');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (79,17,96,'2021-01-06 23:44:14','2021-01-06 23:44:14');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (80,18,96,'2021-01-06 23:47:01','2021-01-06 23:47:01');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (81,28,96,'2021-01-07 00:11:45','2021-01-07 00:11:45');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (82,28,96,'2021-01-07 00:12:11','2021-01-07 00:12:11');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (83,17,96,'2021-01-07 00:12:56','2021-01-07 00:12:56');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (84,23,96,'2021-01-07 00:13:24','2021-01-07 00:13:24');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (85,23,96,'2021-01-07 00:13:58','2021-01-07 00:13:58');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (86,23,96,'2021-01-07 00:14:36','2021-01-07 00:14:36');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (87,28,96,'2021-01-07 00:14:56','2021-01-07 00:14:56');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (88,18,96,'2021-01-07 00:15:04','2021-01-07 00:15:04');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (91,28,96,'2021-01-07 00:23:44','2021-01-07 00:23:44');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (97,29,96,'2021-01-07 18:01:19','2021-01-07 18:01:19');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (102,28,96,'2021-01-07 18:30:34','2021-01-07 18:30:34');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (103,17,96,'2021-01-07 18:38:51','2021-01-07 18:38:51');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (104,17,96,'2021-01-07 19:48:00','2021-01-07 19:48:00');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (105,17,96,'2021-01-07 19:49:48','2021-01-07 19:49:48');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (127,20,96,'2021-01-08 10:31:34','2021-01-08 10:31:34');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (146,17,115,'2021-01-08 11:38:40','2021-01-08 11:38:40');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (147,18,115,'2021-01-08 11:38:45','2021-01-08 11:38:45');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (148,19,115,'2021-01-08 11:38:48','2021-01-08 11:38:48');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (149,20,115,'2021-01-08 11:38:50','2021-01-08 11:38:50');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (150,21,115,'2021-01-08 11:38:52','2021-01-08 11:38:52');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (151,22,115,'2021-01-08 11:38:54','2021-01-08 11:38:54');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (152,23,115,'2021-01-08 11:38:56','2021-01-08 11:38:56');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (153,24,115,'2021-01-08 11:38:58','2021-01-08 11:38:58');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (154,25,115,'2021-01-08 11:39:00','2021-01-08 11:39:00');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (155,26,115,'2021-01-08 11:39:02','2021-01-08 11:39:02');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (156,27,115,'2021-01-08 11:39:06','2021-01-08 11:39:06');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (157,28,115,'2021-01-08 11:39:09','2021-01-08 11:39:09');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (158,29,115,'2021-01-08 11:39:11','2021-01-08 11:39:11');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (162,17,119,'2021-01-08 15:13:37','2021-01-08 15:13:37');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (163,18,119,'2021-01-08 15:14:28','2021-01-08 15:14:28');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (164,19,119,'2021-01-08 15:15:33','2021-01-08 15:15:33');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (165,20,119,'2021-01-08 15:16:13','2021-01-08 15:16:13');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (166,21,119,'2021-01-08 15:19:18','2021-01-08 15:19:18');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (167,22,119,'2021-01-08 15:19:22','2021-01-08 15:19:22');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (168,23,119,'2021-01-08 15:19:26','2021-01-08 15:19:26');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (169,24,119,'2021-01-08 15:19:29','2021-01-08 15:19:29');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (170,25,119,'2021-01-08 15:19:33','2021-01-08 15:19:33');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (171,26,119,'2021-01-08 15:19:36','2021-01-08 15:19:36');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (172,27,119,'2021-01-08 15:19:38','2021-01-08 15:19:38');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (173,28,119,'2021-01-08 15:19:40','2021-01-08 15:19:40');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (174,29,119,'2021-01-08 15:19:42','2021-01-08 15:19:42');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (178,21,119,'2021-01-08 15:23:35','2021-01-08 15:23:35');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (179,28,96,'2021-01-08 15:27:56','2021-01-08 15:27:56');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (180,27,96,'2021-01-08 15:30:07','2021-01-08 15:30:07');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (183,24,96,'2021-01-08 15:33:58','2021-01-08 15:33:58');
insert into `visualizacoes`(`id`,`aula_id`,`user_id`,`created_at`,`updated_at`) values (184,20,96,'2021-01-18 16:13:27','2021-01-18 16:13:27');
/*Table structure for table `v_performance` */
DROP TABLE IF EXISTS `v_performance`;
/*!50001 DROP VIEW IF EXISTS `v_performance` */;
/*!50001 DROP TABLE IF EXISTS `v_performance` */;
/*!50001 CREATE TABLE `v_performance`(
`Aluno` varchar(255) ,
`E-mail` varchar(255) ,
`CPF` char(14) ,
`Telefone` varchar(15) ,
`Empresa` varchar(255) ,
`Plano` varchar(255) ,
`Curso` varchar(45) ,
`Aulas do curso` bigint(21) ,
`Aulas assistidas` bigint(21) ,
`Posts realizadoss` bigint(21) ,
`Feedback realizado` varchar(3) ,
`Certificado emitido` varchar(3) ,
`Data limite curso` varchar(10) ,
`Data conclusão` varchar(10) ,
`user_id` bigint(20) unsigned ,
`empresa_id` bigint(20) ,
`plano_id` bigint(20) ,
`curso_id` bigint(20)
)*/;
/*View structure for view v_performance */
/*!50001 DROP TABLE IF EXISTS `v_performance` */;
/*!50001 DROP VIEW IF EXISTS `v_performance` */;
/*!50001 CREATE ALGORITHM=UNDEFINED DEFINER=`vitrineatma`@`%` SQL SECURITY DEFINER VIEW `v_performance` AS select `u`.`name` AS `Aluno`,`u`.`email` AS `E-mail`,`u`.`cpf` AS `CPF`,`u`.`phone` AS `Telefone`,`e`.`nome` AS `Empresa`,`p`.`nome` AS `Plano`,`c`.`nome` AS `Curso`,(select count(`a1`.`id`) from (`aulas` `a1` join `modulos` `m1` on(`m1`.`id` = `a1`.`modulo_id`)) where `m1`.`curso_id` = `c`.`id`) AS `Aulas do curso`,(select count(distinct `v1`.`aula_id`) from ((`visualizacoes` `v1` join `aulas` `a1` on(`a1`.`id` = `v1`.`aula_id`)) join `modulos` `m1` on(`m1`.`id` = `a1`.`modulo_id`)) where `m1`.`curso_id` = `c`.`id` and `v1`.`user_id` = `u`.`id`) AS `Aulas assistidas`,(select count(`p1`.`id`) from `posts` `p1` where `p1`.`user_id` = `u`.`id` and `p1`.`curso_id` = `c`.`id`) AS `Posts realizadoss`,(select if(count(`f1`.`id`) > 0,'SIM','NÃO') from `feedbacks` `f1` where `f1`.`user_id` = `u`.`id` and `f1`.`curso_id` = `c`.`id`) AS `Feedback realizado`,(select if(count(`c1`.`id`) > 0,'SIM','NÃO') from `certificados` `c1` where `c1`.`user_id` = `u`.`id` and `c1`.`curso_id` = `c`.`id`) AS `Certificado emitido`,date_format(`m`.`data_limite`,'%d/%m/%Y') AS `Data limite curso`,date_format(`m`.`data_conclusao`,'%d/%m/%Y') AS `Data conclusão`,`m`.`user_id` AS `user_id`,`m`.`empresa_id` AS `empresa_id`,`m`.`plano_id` AS `plano_id`,`m`.`curso_id` AS `curso_id` from ((((`users` `u` join `matriculas` `m` on(`m`.`user_id` = `u`.`id`)) join `cursos` `c` on(`c`.`id` = `m`.`curso_id`)) join `empresas` `e` on(`e`.`id` = `m`.`empresa_id`)) join `planos` `p` on(`p`.`id` = `m`.`plano_id`)) */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*
WARNINGS:
- Once your backups are encrypted you CANNOT restore them to ANY other server WITHOUT a duplicate/copy of the Certificate
used to encrypt your backups. Please read all instructions BEFORE execution/usage.
DEPENDENCIES:
- SQL Server 2014+
- SQL Server Standard Edition or Enterprise Edition (encypted backups NOT supported on Web or Express).
INSTRUCTIONS:
- If your server doesn't already have a Master Key for the master DB, this script will create one AND back it up for you.
but, to do that, you'll need to specify the password that is used to encrypt all sensitive info on your server (i.e., create the master key)
AND as part of the backup process, you'll need to specify a password that can be used to DECRYPT the encrypted backup that is... your private key.
- Otherwise, this script will create a Backups Certificate and then back it up to disk in the form of a Private Key file
AND a password that protects the contents of that Private Key. You'll need both the Private Key file + password to be able to restore
this certificate to your server (if there's a major crash) or to OTHER servers.
- In short, the order of operations here is to do the following:
1. Come up with a simple/short phrase to be used to 'start' encryption within your database - i.e., a master key.
2. Come up with a password/pass-phrase that will be used to encrypt the contents of your Private Key file.
(Anyone who has your private key file (if there were NOT a password) would be able to then create a cert that would let them restore your
backups, as such the password for the Private Key file is to PROTECT your backups and your Encryption Keys).
3. Come up with a path where you'll write out all backup keys/certs.
4. Replace all parameters below (CTRL+SHIFT+M or use the Query > Specify Values for Template Parameters menu option)
5. Execute the script below.
6. Disaster Protection:
- COPY/PASTE a copy of the final script in this file (i.e., the CREATE CERTIFICATE statement) and put it plus copies
of the .cer file(s) and .key files created into a safe location.
- Further, keep the password for your Master Key + for the Private Key with this info
- And keep them all in a safe and secured location.
- You WILL need these details in the case of a disaster. And without them, all of your databases backed up by the certs
you create here will NOT be recoverable - at all. Period.
*/
USE [master];
GO
--------------------------------------------------------------------------------------------------------------------
-- Create a Master Key if it does NOT exist:
IF NOT EXISTS (SELECT NULL FROM master.sys.symmetric_keys WHERE symmetric_key_id = 101) BEGIN;
-- create the key:
CREATE MASTER KEY ENCRYPTION BY PASSWORD = N'<masterKeyPassword, sysname, xxxxx>';
-- Back up the master key (which needs to be done by means of using a password).
BACKUP MASTER KEY TO FILE = N'<certBackupsPath, sysname, D:\SQLBackups>\master_database_master_key.cer'
ENCRYPTION BY PASSWORD = N'<masterKeyBackupPassword, sysname, xxxxxxx>';
-- NOTE that backing up the master key is not 100% required for native backup encryption - it's always just a good idea.
END;
--------------------------------------------------------------------------------------------------------------------
-- Create a Backp Certificate:
CREATE CERTIFICATE [<backupCertName, sysname, EncryptedBackupsCertificate>]
WITH SUBJECT = N'"<backupCertSubject, sysname, xxxxx>"',
EXPIRY_DATE = N'20401231'; -- December 31, 2040...
GO
BACKUP CERTIFICATE [<backupCertName, sysname, EncryptedBackupsCertificate>]
TO FILE = N'<certBackupsPath, sysname, D:\SQLBackups>\<backupCertName, sysname, EncryptedBackupsCertificate>.cer'
WITH PRIVATE KEY (
FILE = N'<certBackupsPath, sysname, D:\SQLBackups>\<backupCertName, sysname, EncryptedBackupsCertificate>_PrivateKey.key',
ENCRYPTION BY PASSWORD = N'<backupCertEncryptionPassword, sysname, xxxxxx>'
);
GO
SELECT N'COPY the .cer and .key files in [<certBackupsPath, sysname, D:\SQLBackups>] to a safe (off-box) location AND keep all associated certificate backup/decryption passwords SECURE (and, ideally, audited).' [!!!!WARNING!!!!];
GO
/*
At this point, encrypted backups are now possible using admindb.dbo.backup_databases - or via the syntax below:
BACKUP DATABASE admindb TO DISK = N'D:\SQLBackups>\admindb\admindb_encryption_test.bak'
WITH
COMPRESSION,
ENCRYPTION (ALGORITHM = AES_256, SERVER CERTIFICATE = [<backupCertName, sysname, EncryptedBackupsCertificate>]),
STATS = 10;
GO
HOWEVER, encrypted backups can NOT be restored on any other (i.e., different) server UNLESS the certificate used for these backups
has been restored (deployed) to the target server before hand. (i.e., you can restore to 'this' server no problem - but you can't
restore backups to a new/different server unless the same cert that exists on this server has been deployed THERE first).
To address the task of restoring / deploying a certificate, see the accompanying "RESTORE backup certificate.sql" file...
*/
|
--
-- Структура таблицы `configs`
--
CREATE TABLE IF NOT EXISTS `configs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated` timestamp NULL DEFAULT NULL,
`key` varchar(50) NOT NULL,
`value` text NOT NULL,
PRIMARY KEY(`id`),
UNIQUE KEY `key` (`key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
--
-- Структура таблицы `locales`
--
CREATE TABLE IF NOT EXISTS `locales` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated` timestamp NULL DEFAULT NULL,
`prefix` char(2) NOT NULL,
`title` varchar(50) NOT NULL,
`enable` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY(`id`),
UNIQUE KEY `prefix` (`prefix`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
--
-- Структура таблицы `locale_texts`
--
CREATE TABLE IF NOT EXISTS `locale_texts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated` timestamp NULL DEFAULT NULL,
`locale_id` int NOT NULL,
`key` varchar(100) NOT NULL,
`value` text NOT NULL,
PRIMARY KEY(`id`),
UNIQUE KEY `prefix_key` (`locale_id`,`key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
--
-- Структура таблицы `persons`
--
CREATE TABLE IF NOT EXISTS `persons` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated` timestamp NULL DEFAULT NULL,
`username` varchar(20) NOT NULL,
`email` varchar(40) NOT NULL,
`password` varchar(60) NOT NULL,
`admin` int(11) NOT NULL DEFAULT '0',
`name` varchar(50) NULL DEFAULT NULL,
`middlename` varchar(50) NULL DEFAULT NULL,
`surname` varchar(50) NULL DEFAULT NULL,
`birthday` date NULL DEFAULT NULL,
`phone` varchar(50) NULL DEFAULT NULL,
`location` varchar(50) NULL DEFAULT NULL,
PRIMARY KEY(`id`),
UNIQUE KEY `username` (`username`),
UNIQUE KEY `email` (`email`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
--
-- Структура таблицы `person_logins`
--
CREATE TABLE IF NOT EXISTS `person_logins` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated` timestamp NULL DEFAULT NULL,
`person_id` char(8) NOT NULL,
`secret` varchar(32) NOT NULL COMMENT 'Строка входа',
`ip` varchar(15) NOT NULL,
`geo` varchar(100) NULL DEFAULT NULL,
`location` varchar(100) NULL DEFAULT NULL,
`enable` int(11) NOT NULL DEFAULT '1' COMMENT 'Статус авториазции',
PRIMARY KEY(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
--
-- Структура таблицы `menus`
--
CREATE TABLE IF NOT EXISTS `menus` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated` timestamp NULL DEFAULT NULL,
`parent_id` int(11) NULL DEFAULT NULL,
`title_text_key` varchar(100) NOT NULL,
`link_id` int(11) NULL DEFAULT NULL,
`enable` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
--
-- Структура таблицы `files`
--
CREATE TABLE IF NOT EXISTS `files` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated` timestamp NULL DEFAULT NULL,
`filename` varchar(100) NOT NULL,
`filetype` varchar(50) NOT NULL,
`filesize` int(11) NOT NULL,
`cachename` varchar(50) NOT NULL,
`description_text_key` varchar(100) NULL DEFAULT NULL,
PRIMARY KEY(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
--
-- Структура таблицы `links`
--
CREATE TABLE IF NOT EXISTS `links` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated` timestamp NULL DEFAULT NULL,
`title_text_key` varchar(100) NOT NULL,
`file_id` int(11) NULL DEFAULT NULL,
`page_id` int(11) NULL DEFAULT NULL,
`url` varchar(250) NULL DEFAULT NULL,
PRIMARY KEY(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
--
-- Структура таблицы `page_cats`
--
CREATE TABLE IF NOT EXISTS `page_cats` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated` timestamp NULL DEFAULT NULL,
`title` varchar(50) NOT NULL,
`parent_id` int(11) NULL DEFAULT NULL,
PRIMARY KEY(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
--
-- Структура таблицы `pages`
--
CREATE TABLE IF NOT EXISTS `pages` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated` timestamp NULL DEFAULT NULL,
`title_text_key` varchar(100) NOT NULL,
`page_cat_id` int(11) NULL DEFAULT NULL,
`urn` varchar(250) NOT NULL COMMENT 'Ссылка страницы от корня сайта',
`enable` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
--
-- Структура таблицы `page_blocks`
--
CREATE TABLE IF NOT EXISTS `page_blocks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated` timestamp NULL DEFAULT NULL,
`page_id` int(11) NULL DEFAULT NULL,
`order` int(11) NOT NULL DEFAULT 999,
`module` varchar(100) NOT NULL,
`title_text_key` varchar(100) NOT NULL,
`content_text_key` varchar(100) NOT NULL,
`enable` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
|
BEGIN;
CREATE TABLE IF NOT EXISTS "vulnerabilities_by_author"
(
"vulnerability_id" UUID NOT NULL,
"created_at" TIMESTAMP NOT NULL,
"author" VARCHAR(500) NOT NULL,
"workspace_id" UUID NOT NULL,
"repository_id" UUID NOT NULL,
"critical_vulnerability" INT NOT NULL,
"critical_false_positive" INT NOT NULL,
"critical_risk_accepted" INT NOT NULL,
"critical_corrected" INT NOT NULL,
"high_vulnerability" INT NOT NULL,
"high_false_positive" INT NOT NULL,
"high_risk_accepted" INT NOT NULL,
"high_corrected" INT NOT NULL,
"medium_vulnerability" INT NOT NULL,
"medium_false_positive" INT NOT NULL,
"medium_risk_accepted" INT NOT NULL,
"medium_corrected" INT NOT NULL,
"low_vulnerability" INT NOT NULL,
"low_false_positive" INT NOT NULL,
"low_risk_accepted" INT NOT NULL,
"low_corrected" INT NOT NULL,
"info_vulnerability" INT NOT NULL,
"info_false_positive" INT NOT NULL,
"info_risk_accepted" INT NOT NULL,
"info_corrected" INT NOT NULL,
"unknown_vulnerability" INT NOT NULL,
"unknown_false_positive" INT NOT NULL,
"unknown_risk_accepted" INT NOT NULL,
"unknown_corrected" INT NOT NULL,
PRIMARY KEY (vulnerability_id)
);
CREATE TABLE IF NOT EXISTS "vulnerabilities_by_language"
(
"vulnerability_id" UUID NOT NULL,
"created_at" TIMESTAMP NOT NULL,
"language" VARCHAR(255) NOT NULL,
"workspace_id" UUID NOT NULL,
"repository_id" UUID NOT NULL,
"critical_vulnerability" INT NOT NULL,
"critical_false_positive" INT NOT NULL,
"critical_risk_accepted" INT NOT NULL,
"critical_corrected" INT NOT NULL,
"high_vulnerability" INT NOT NULL,
"high_false_positive" INT NOT NULL,
"high_risk_accepted" INT NOT NULL,
"high_corrected" INT NOT NULL,
"medium_vulnerability" INT NOT NULL,
"medium_false_positive" INT NOT NULL,
"medium_risk_accepted" INT NOT NULL,
"medium_corrected" INT NOT NULL,
"low_vulnerability" INT NOT NULL,
"low_false_positive" INT NOT NULL,
"low_risk_accepted" INT NOT NULL,
"low_corrected" INT NOT NULL,
"info_vulnerability" INT NOT NULL,
"info_false_positive" INT NOT NULL,
"info_risk_accepted" INT NOT NULL,
"info_corrected" INT NOT NULL,
"unknown_vulnerability" INT NOT NULL,
"unknown_false_positive" INT NOT NULL,
"unknown_risk_accepted" INT NOT NULL,
"unknown_corrected" INT NOT NULL,
PRIMARY KEY (vulnerability_id)
);
CREATE TABLE IF NOT EXISTS "vulnerabilities_by_repository"
(
"vulnerability_id" UUID NOT NULL,
"created_at" TIMESTAMP NOT NULL,
"repository_name" VARCHAR(255) NOT NULL,
"workspace_id" UUID NOT NULL,
"repository_id" UUID NOT NULL,
"critical_vulnerability" INT NOT NULL,
"critical_false_positive" INT NOT NULL,
"critical_risk_accepted" INT NOT NULL,
"critical_corrected" INT NOT NULL,
"high_vulnerability" INT NOT NULL,
"high_false_positive" INT NOT NULL,
"high_risk_accepted" INT NOT NULL,
"high_corrected" INT NOT NULL,
"medium_vulnerability" INT NOT NULL,
"medium_false_positive" INT NOT NULL,
"medium_risk_accepted" INT NOT NULL,
"medium_corrected" INT NOT NULL,
"low_vulnerability" INT NOT NULL,
"low_false_positive" INT NOT NULL,
"low_risk_accepted" INT NOT NULL,
"low_corrected" INT NOT NULL,
"info_vulnerability" INT NOT NULL,
"info_false_positive" INT NOT NULL,
"info_risk_accepted" INT NOT NULL,
"info_corrected" INT NOT NULL,
"unknown_vulnerability" INT NOT NULL,
"unknown_false_positive" INT NOT NULL,
"unknown_risk_accepted" INT NOT NULL,
"unknown_corrected" INT NOT NULL,
PRIMARY KEY (vulnerability_id)
);
CREATE TABLE IF NOT EXISTS "vulnerabilities_by_time"
(
"vulnerability_id" UUID NOT NULL,
"created_at" TIMESTAMP NOT NULL,
"workspace_id" UUID NOT NULL,
"repository_id" UUID NOT NULL,
"critical_vulnerability" INT NOT NULL,
"critical_false_positive" INT NOT NULL,
"critical_risk_accepted" INT NOT NULL,
"critical_corrected" INT NOT NULL,
"high_vulnerability" INT NOT NULL,
"high_false_positive" INT NOT NULL,
"high_risk_accepted" INT NOT NULL,
"high_corrected" INT NOT NULL,
"medium_vulnerability" INT NOT NULL,
"medium_false_positive" INT NOT NULL,
"medium_risk_accepted" INT NOT NULL,
"medium_corrected" INT NOT NULL,
"low_vulnerability" INT NOT NULL,
"low_false_positive" INT NOT NULL,
"low_risk_accepted" INT NOT NULL,
"low_corrected" INT NOT NULL,
"info_vulnerability" INT NOT NULL,
"info_false_positive" INT NOT NULL,
"info_risk_accepted" INT NOT NULL,
"info_corrected" INT NOT NULL,
"unknown_vulnerability" INT NOT NULL,
"unknown_false_positive" INT NOT NULL,
"unknown_risk_accepted" INT NOT NULL,
"unknown_corrected" INT NOT NULL,
PRIMARY KEY (vulnerability_id)
);
COMMIT;
|
CREATE TABLE [dbo].[Products]
(
[Id] INT NOT NULL PRIMARY KEY IDENTITY,
[CategoryId] INT NOT NULL DEFAULT 0,
[Name] NVARCHAR(100) NOT NULL,
[Price] MONEY NOT NULL,
[ImageUrl] NVARCHAR(500) NOT NULL DEFAULT 'images/products/default_dvd.jpg',
CONSTRAINT [FK_Products_Categories] FOREIGN KEY ([CategoryId]) REFERENCES [Categories]([Id]),
)
|
CREATE TABLE IF NOT EXISTS vocabulary(no serial UNIQUE, word text);
CREATE TABLE IF NOT EXISTS labotter(user_name text UNIQUE, lab_in_flag int, lab_in timestamp, lab_rida timestamp, min_sum int);
|
CREATE TABLE visa_restrictions_index (
country_code VARCHAR (2) PRIMARY KEY,
rank SMALLINT NOT NULL,
acc SMALLINT NOT NULL,
sharing SMALLINT DEFAULT 0
);
|
-- file:join.sql ln:1397 expect:true
explain (costs off)
select i8.* from int8_tbl i8 left join (select f1 from int4_tbl group by f1) i4
on i8.q1 = i4.f1
|
CREATE TABLE Zasilacz (
ID_Zasilacza INT AUTO_INCREMENT PRIMARY KEY,
Nazwa VARCHAR(200),
Moc_max VARCHAR(200),
Standard VARCHAR(200),
Certyfikat VARCHAR(200),
Cena INT
);
INSERT INTO zasilacz (`Nazwa`, `Moc_max`, `Standard`, `Certyfikat`, `Cena`)
VALUES ('SilentiumPC Vero L3 600W 80 Plus Bronze','600 W','ATX','80 PLUS Bronze',239),
('SilentiumPC Vero L3 500W 80 Plus Bronze','500 W','ATX','80 PLUS Bronze',219),
('SilentiumPC Vero L3 700W 80 Plus Bronze','700 W','ATX','80 PLUS Bronze',269),
('SilentiumPC Elementum E2 450W 80 Plus (BULK)','450 W','ATX','80 PLUS',155),
('SilentiumPC Supremo FM2 650W 80 Plus Gold','650 W','ATX','80 PLUS Gold',399);
|
CREATE UNIQUE INDEX "PKEY_CTLAT_LONG_REF_SOURCE" ON "CTLAT_LONG_REF_SOURCE" ("LAT_LONG_REF_SOURCE")
|
INSERT INTO departments (department)
VALUES("Finance"),
("Accounting"),
("Engineering"),
("Corporate");
INSERT INTO roles (title,salary,department_id)
VALUES ("Junior Engineer",50000,3),
("Accountant",48000,2),
("Manager",65000,4),
("Analyst",55000,1);
INSERT INTO employees (first_name,last_name,role_id,department_id)
VALUES ("John","Rockefeller", 1, 3),
("Cornelius","Vanderbilt",2,2),
("Andrew","Carnegie",3,4),
("J.P.","Morgan",4,1);
|
CREATE FUNCTION [dbo].[getRankDesc](
@rank_id int
)
RETURNS VARCHAR(100)
AS
BEGIN
DECLARE @l_role_name VARCHAR(100);
SELECT @l_role_name = rank_desc FROM dbo.ranks where rank_id = @rank_id
RETURN @l_role_name;
END;
|
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
\d pg2_heap_table_gist_index_c0
set enable_seqscan=off;
select property from pg2_heap_table_gist_index_c0 where property='( (0,0), (1,1) )';
DROP TABLE pg2_heap_table_gist_index_c0;
|
--
-- patch-comment-table.sql
--
-- T166732. Add a `comment` table and various columns (and temporary tables) to reference it.
-- Sigh, sqlite, such trouble just to change the default value of a column.
CREATE TABLE /*_*/comment (
comment_id bigint unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
comment_hash INT NOT NULL,
comment_text BLOB NOT NULL,
comment_data BLOB
) /*$wgDBTableOptions*/;
CREATE INDEX /*i*/comment_hash ON /*_*/comment (comment_hash);
CREATE TABLE /*_*/revision_comment_temp (
revcomment_rev int unsigned NOT NULL,
revcomment_comment_id bigint unsigned NOT NULL,
PRIMARY KEY (revcomment_rev, revcomment_comment_id)
) /*$wgDBTableOptions*/;
CREATE UNIQUE INDEX /*i*/revcomment_rev ON /*_*/revision_comment_temp (revcomment_rev);
CREATE TABLE /*_*/image_comment_temp (
imgcomment_name varchar(255) binary NOT NULL,
imgcomment_description_id bigint unsigned NOT NULL,
PRIMARY KEY (imgcomment_name, imgcomment_description_id)
) /*$wgDBTableOptions*/;
CREATE UNIQUE INDEX /*i*/imgcomment_name ON /*_*/image_comment_temp (imgcomment_name);
ALTER TABLE /*_*/recentchanges
ADD COLUMN rc_comment_id bigint unsigned NOT NULL DEFAULT 0;
ALTER TABLE /*_*/logging
ADD COLUMN log_comment_id bigint unsigned NOT NULL DEFAULT 0;
BEGIN;
DROP TABLE IF EXISTS /*_*/revision_tmp;
CREATE TABLE /*_*/revision_tmp (
rev_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
rev_page int unsigned NOT NULL,
rev_text_id int unsigned NOT NULL,
rev_comment varbinary(767) NOT NULL default '',
rev_user int unsigned NOT NULL default 0,
rev_user_text varchar(255) binary NOT NULL default '',
rev_timestamp binary(14) NOT NULL default '',
rev_minor_edit tinyint unsigned NOT NULL default 0,
rev_deleted tinyint unsigned NOT NULL default 0,
rev_len int unsigned,
rev_parent_id int unsigned default NULL,
rev_sha1 varbinary(32) NOT NULL default '',
rev_content_model varbinary(32) DEFAULT NULL,
rev_content_format varbinary(64) DEFAULT NULL
) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=1024;
INSERT OR IGNORE INTO /*_*/revision_tmp (
rev_id, rev_page, rev_text_id, rev_comment, rev_user, rev_user_text,
rev_timestamp, rev_minor_edit, rev_deleted, rev_len, rev_parent_id,
rev_sha1, rev_content_model, rev_content_format)
SELECT
rev_id, rev_page, rev_text_id, rev_comment, rev_user, rev_user_text,
rev_timestamp, rev_minor_edit, rev_deleted, rev_len, rev_parent_id,
rev_sha1, rev_content_model, rev_content_format
FROM /*_*/revision;
DROP TABLE /*_*/revision;
ALTER TABLE /*_*/revision_tmp RENAME TO /*_*/revision;
CREATE INDEX /*i*/rev_page_id ON /*_*/revision (rev_page, rev_id);
CREATE INDEX /*i*/rev_timestamp ON /*_*/revision (rev_timestamp);
CREATE INDEX /*i*/page_timestamp ON /*_*/revision (rev_page,rev_timestamp);
CREATE INDEX /*i*/user_timestamp ON /*_*/revision (rev_user,rev_timestamp);
CREATE INDEX /*i*/usertext_timestamp ON /*_*/revision (rev_user_text,rev_timestamp);
CREATE INDEX /*i*/page_user_timestamp ON /*_*/revision (rev_page,rev_user,rev_timestamp);
COMMIT;
BEGIN;
DROP TABLE IF EXISTS /*_*/archive_tmp;
CREATE TABLE /*_*/archive_tmp (
ar_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
ar_namespace int NOT NULL default 0,
ar_title varchar(255) binary NOT NULL default '',
ar_text mediumblob NOT NULL,
ar_comment varbinary(767) NOT NULL default '',
ar_comment_id bigint unsigned NOT NULL DEFAULT 0,
ar_user int unsigned NOT NULL default 0,
ar_user_text varchar(255) binary NOT NULL,
ar_timestamp binary(14) NOT NULL default '',
ar_minor_edit tinyint NOT NULL default 0,
ar_flags tinyblob NOT NULL,
ar_rev_id int unsigned,
ar_text_id int unsigned,
ar_deleted tinyint unsigned NOT NULL default 0,
ar_len int unsigned,
ar_page_id int unsigned,
ar_parent_id int unsigned default NULL,
ar_sha1 varbinary(32) NOT NULL default '',
ar_content_model varbinary(32) DEFAULT NULL,
ar_content_format varbinary(64) DEFAULT NULL
) /*$wgDBTableOptions*/;
INSERT OR IGNORE INTO /*_*/archive_tmp (
ar_id, ar_namespace, ar_title, ar_text, ar_comment, ar_user, ar_user_text,
ar_timestamp, ar_minor_edit, ar_flags, ar_rev_id, ar_text_id, ar_deleted,
ar_len, ar_page_id, ar_parent_id, ar_sha1, ar_content_model,
ar_content_format)
SELECT
ar_id, ar_namespace, ar_title, ar_text, ar_comment, ar_user, ar_user_text,
ar_timestamp, ar_minor_edit, ar_flags, ar_rev_id, ar_text_id, ar_deleted,
ar_len, ar_page_id, ar_parent_id, ar_sha1, ar_content_model,
ar_content_format
FROM /*_*/archive;
DROP TABLE /*_*/archive;
ALTER TABLE /*_*/archive_tmp RENAME TO /*_*/archive;
CREATE INDEX /*i*/name_title_timestamp ON /*_*/archive (ar_namespace,ar_title,ar_timestamp);
CREATE INDEX /*i*/ar_usertext_timestamp ON /*_*/archive (ar_user_text,ar_timestamp);
CREATE INDEX /*i*/ar_revid ON /*_*/archive (ar_rev_id);
COMMIT;
BEGIN;
DROP TABLE IF EXISTS ipblocks_tmp;
CREATE TABLE /*_*/ipblocks_tmp (
ipb_id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
ipb_address tinyblob NOT NULL,
ipb_user int unsigned NOT NULL default 0,
ipb_by int unsigned NOT NULL default 0,
ipb_by_text varchar(255) binary NOT NULL default '',
ipb_reason varbinary(767) NOT NULL default '',
ipb_reason_id bigint unsigned NOT NULL DEFAULT 0,
ipb_timestamp binary(14) NOT NULL default '',
ipb_auto bool NOT NULL default 0,
ipb_anon_only bool NOT NULL default 0,
ipb_create_account bool NOT NULL default 1,
ipb_enable_autoblock bool NOT NULL default '1',
ipb_expiry varbinary(14) NOT NULL default '',
ipb_range_start tinyblob NOT NULL,
ipb_range_end tinyblob NOT NULL,
ipb_deleted bool NOT NULL default 0,
ipb_block_email bool NOT NULL default 0,
ipb_allow_usertalk bool NOT NULL default 0,
ipb_parent_block_id int default NULL
) /*$wgDBTableOptions*/;
INSERT OR IGNORE INTO /*_*/ipblocks_tmp (
ipb_id, ipb_address, ipb_user, ipb_by, ipb_by_text, ipb_reason,
ipb_timestamp, ipb_auto, ipb_anon_only, ipb_create_account,
ipb_enable_autoblock, ipb_expiry, ipb_range_start, ipb_range_end,
ipb_deleted, ipb_block_email, ipb_allow_usertalk, ipb_parent_block_id)
SELECT
ipb_id, ipb_address, ipb_user, ipb_by, ipb_by_text, ipb_reason,
ipb_timestamp, ipb_auto, ipb_anon_only, ipb_create_account,
ipb_enable_autoblock, ipb_expiry, ipb_range_start, ipb_range_end,
ipb_deleted, ipb_block_email, ipb_allow_usertalk, ipb_parent_block_id
FROM /*_*/ipblocks;
DROP TABLE /*_*/ipblocks;
ALTER TABLE /*_*/ipblocks_tmp RENAME TO /*_*/ipblocks;
CREATE UNIQUE INDEX /*i*/ipb_address ON /*_*/ipblocks (ipb_address(255), ipb_user, ipb_auto, ipb_anon_only);
CREATE INDEX /*i*/ipb_user ON /*_*/ipblocks (ipb_user);
CREATE INDEX /*i*/ipb_range ON /*_*/ipblocks (ipb_range_start(8), ipb_range_end(8));
CREATE INDEX /*i*/ipb_timestamp ON /*_*/ipblocks (ipb_timestamp);
CREATE INDEX /*i*/ipb_expiry ON /*_*/ipblocks (ipb_expiry);
CREATE INDEX /*i*/ipb_parent_block_id ON /*_*/ipblocks (ipb_parent_block_id);
COMMIT;
BEGIN;
DROP TABLE IF EXISTS /*_*/image_tmp;
CREATE TABLE /*_*/image_tmp (
img_name varchar(255) binary NOT NULL default '' PRIMARY KEY,
img_size int unsigned NOT NULL default 0,
img_width int NOT NULL default 0,
img_height int NOT NULL default 0,
img_metadata mediumblob NOT NULL,
img_bits int NOT NULL default 0,
img_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
img_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart", "chemical") NOT NULL default "unknown",
img_minor_mime varbinary(100) NOT NULL default "unknown",
img_description varbinary(767) NOT NULL default '',
img_user int unsigned NOT NULL default 0,
img_user_text varchar(255) binary NOT NULL,
img_timestamp varbinary(14) NOT NULL default '',
img_sha1 varbinary(32) NOT NULL default ''
) /*$wgDBTableOptions*/;
INSERT OR IGNORE INTO /*_*/image_tmp (
img_name, img_size, img_width, img_height, img_metadata, img_bits,
img_media_type, img_major_mime, img_minor_mime, img_description, img_user,
img_user_text, img_timestamp, img_sha1)
SELECT
img_name, img_size, img_width, img_height, img_metadata, img_bits,
img_media_type, img_major_mime, img_minor_mime, img_description, img_user,
img_user_text, img_timestamp, img_sha1
FROM /*_*/image;
DROP TABLE /*_*/image;
ALTER TABLE /*_*/image_tmp RENAME TO /*_*/image;
CREATE INDEX /*i*/img_user_timestamp ON /*_*/image (img_user,img_timestamp);
CREATE INDEX /*i*/img_usertext_timestamp ON /*_*/image (img_user_text,img_timestamp);
CREATE INDEX /*i*/img_size ON /*_*/image (img_size);
CREATE INDEX /*i*/img_timestamp ON /*_*/image (img_timestamp);
CREATE INDEX /*i*/img_sha1 ON /*_*/image (img_sha1(10));
CREATE INDEX /*i*/img_media_mime ON /*_*/image (img_media_type,img_major_mime,img_minor_mime);
COMMIT;
BEGIN;
DROP TABLE IF EXISTS /*_*/oldimage_tmp;
CREATE TABLE /*_*/oldimage_tmp (
oi_name varchar(255) binary NOT NULL default '',
oi_archive_name varchar(255) binary NOT NULL default '',
oi_size int unsigned NOT NULL default 0,
oi_width int NOT NULL default 0,
oi_height int NOT NULL default 0,
oi_bits int NOT NULL default 0,
oi_description varbinary(767) NOT NULL default '',
oi_description_id bigint unsigned NOT NULL DEFAULT 0,
oi_user int unsigned NOT NULL default 0,
oi_user_text varchar(255) binary NOT NULL,
oi_timestamp binary(14) NOT NULL default '',
oi_metadata mediumblob NOT NULL,
oi_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
oi_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart", "chemical") NOT NULL default "unknown",
oi_minor_mime varbinary(100) NOT NULL default "unknown",
oi_deleted tinyint unsigned NOT NULL default 0,
oi_sha1 varbinary(32) NOT NULL default ''
) /*$wgDBTableOptions*/;
INSERT OR IGNORE INTO /*_*/oldimage_tmp (
oi_name, oi_archive_name, oi_size, oi_width, oi_height, oi_bits,
oi_description, oi_user, oi_user_text, oi_timestamp, oi_metadata,
oi_media_type, oi_major_mime, oi_minor_mime, oi_deleted, oi_sha1)
SELECT
oi_name, oi_archive_name, oi_size, oi_width, oi_height, oi_bits,
oi_description, oi_user, oi_user_text, oi_timestamp, oi_metadata,
oi_media_type, oi_major_mime, oi_minor_mime, oi_deleted, oi_sha1
FROM /*_*/oldimage;
DROP TABLE /*_*/oldimage;
ALTER TABLE /*_*/oldimage_tmp RENAME TO /*_*/oldimage;
CREATE INDEX /*i*/oi_usertext_timestamp ON /*_*/oldimage (oi_user_text,oi_timestamp);
CREATE INDEX /*i*/oi_name_timestamp ON /*_*/oldimage (oi_name,oi_timestamp);
CREATE INDEX /*i*/oi_name_archive_name ON /*_*/oldimage (oi_name,oi_archive_name(14));
CREATE INDEX /*i*/oi_sha1 ON /*_*/oldimage (oi_sha1(10));
COMMIT;
BEGIN;
DROP TABLE IF EXISTS /*_*/filearchive_tmp;
CREATE TABLE /*_*/filearchive_tmp (
fa_id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
fa_name varchar(255) binary NOT NULL default '',
fa_archive_name varchar(255) binary default '',
fa_storage_group varbinary(16),
fa_storage_key varbinary(64) default '',
fa_deleted_user int,
fa_deleted_timestamp binary(14) default '',
fa_deleted_reason varbinary(767) default '',
fa_deleted_reason_id bigint unsigned NOT NULL DEFAULT 0,
fa_size int unsigned default 0,
fa_width int default 0,
fa_height int default 0,
fa_metadata mediumblob,
fa_bits int default 0,
fa_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
fa_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart", "chemical") default "unknown",
fa_minor_mime varbinary(100) default "unknown",
fa_description varbinary(767) default '',
fa_description_id bigint unsigned NOT NULL DEFAULT 0,
fa_user int unsigned default 0,
fa_user_text varchar(255) binary,
fa_timestamp binary(14) default '',
fa_deleted tinyint unsigned NOT NULL default 0,
fa_sha1 varbinary(32) NOT NULL default ''
) /*$wgDBTableOptions*/;
INSERT OR IGNORE INTO /*_*/filearchive_tmp (
fa_id, fa_name, fa_archive_name, fa_storage_group, fa_storage_key,
fa_deleted_user, fa_deleted_timestamp, fa_deleted_reason, fa_size,
fa_width, fa_height, fa_metadata, fa_bits, fa_media_type, fa_major_mime,
fa_minor_mime, fa_description, fa_user, fa_user_text, fa_timestamp,
fa_deleted, fa_sha1)
SELECT
fa_id, fa_name, fa_archive_name, fa_storage_group, fa_storage_key,
fa_deleted_user, fa_deleted_timestamp, fa_deleted_reason, fa_size,
fa_width, fa_height, fa_metadata, fa_bits, fa_media_type, fa_major_mime,
fa_minor_mime, fa_description, fa_user, fa_user_text, fa_timestamp,
fa_deleted, fa_sha1
FROM /*_*/filearchive;
DROP TABLE /*_*/filearchive;
ALTER TABLE /*_*/filearchive_tmp RENAME TO /*_*/filearchive;
CREATE INDEX /*i*/fa_name ON /*_*/filearchive (fa_name, fa_timestamp);
CREATE INDEX /*i*/fa_storage_group ON /*_*/filearchive (fa_storage_group, fa_storage_key);
CREATE INDEX /*i*/fa_deleted_timestamp ON /*_*/filearchive (fa_deleted_timestamp);
CREATE INDEX /*i*/fa_user_timestamp ON /*_*/filearchive (fa_user_text,fa_timestamp);
CREATE INDEX /*i*/fa_sha1 ON /*_*/filearchive (fa_sha1(10));
COMMIT;
BEGIN;
DROP TABLE IF EXISTS /*_*/protected_titles_tmp;
CREATE TABLE /*_*/protected_titles_tmp (
pt_namespace int NOT NULL,
pt_title varchar(255) binary NOT NULL,
pt_user int unsigned NOT NULL,
pt_reason varbinary(767) default '',
pt_reason_id bigint unsigned NOT NULL DEFAULT 0,
pt_timestamp binary(14) NOT NULL,
pt_expiry varbinary(14) NOT NULL default '',
pt_create_perm varbinary(60) NOT NULL
) /*$wgDBTableOptions*/;
INSERT OR IGNORE INTO /*_*/protected_titles_tmp (
pt_namespace, pt_title, pt_user, pt_reason, pt_timestamp, pt_expiry, pt_create_perm)
SELECT
pt_namespace, pt_title, pt_user, pt_reason, pt_timestamp, pt_expiry, pt_create_perm
FROM /*_*/protected_titles;
DROP TABLE /*_*/protected_titles;
ALTER TABLE /*_*/protected_titles_tmp RENAME TO /*_*/protected_titles;
CREATE UNIQUE INDEX /*i*/pt_namespace_title ON /*_*/protected_titles (pt_namespace,pt_title);
CREATE INDEX /*i*/pt_timestamp ON /*_*/protected_titles (pt_timestamp);
COMMIT;
|
INSERT INTO `#__extensions` (`extension_id`, `package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(485, 0, 'plg_system_privacyconsent', 'plugin', 'privacyconsent', 'system', 0, 0, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);
CREATE TABLE IF NOT EXISTS `#__privacy_consents` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned NOT NULL DEFAULT 0,
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`subject` varchar(255) NOT NULL DEFAULT '',
`body` text NOT NULL,
`remind` tinyint(4) NOT NULL DEFAULT 0,
`token` varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
|
create or replace view v_report_payments_by_provider_sub3 as
select 1 as timeframe union select 2 as timeframe union select 3 as timeframe union select 4 as timeframe
;
|
CREATE TABLE `mydatabase`.`users` ( `id` INT NOT NULL AUTO_INCREMENT , `username` VARCHAR(50) NOT NULL , `password` VARCHAR(255) NOT NULL , `created_at` DATETIME NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`), UNIQUE (`username`)) ENGINE = InnoDB CHARSET=utf8 COLLATE utf8_unicode_ci;
|
DO $$
DECLARE lid bigint;
BEGIN
lid := (SELECT id FROM i18n.languages WHERE iso_language='en') ;
DELETE FROM i18n.labels l WHERE l.language_id=lid;
INSERT INTO i18n.labels(language_id, key, value) VALUES
--FIXME standardize label keys, either use _ or camelCase
(lid, 'web.generic.title', 'Captura'),
(lid, 'web.generic.brand', 'Captura'),
(lid, 'web.generic.home', 'Home'),
(lid, 'web.generic.name', 'Name'),
(lid, 'web.generic.login', 'Login'),
(lid, 'web.generic.register', 'Create an account'),
(lid, 'web.generic.logout', 'Logout'),
(lid, 'web.generic.project', 'Project'),
(lid, 'web.generic.lookup_table', 'Lookup table'),
(lid, 'web.generic.projects', 'Projects'),
(lid, 'web.generic.myprojects', 'My Projects'),
(lid, 'web.generic.description', 'Description'),
(lid, 'web.generic.password', 'Password'),
(lid, 'web.generic.enterPassword', 'Password'),
(lid, 'web.generic.confirmPassword', 'Confirm Password'),
(lid, 'web.generic.user', 'User'),
(lid, 'web.generic.users', 'Users'),
(lid, 'web.generic.firstname', 'First Name'),
(lid, 'web.generic.lastname', 'Last Name'),
(lid, 'web.generic.mail', 'Email'),
(lid, 'web.generic.form', 'Form'), -- #382
(lid, 'web.generic.forms', 'Forms'),
(lid, 'web.generic.myforms', 'My Forms'),
(lid, 'web.generic.myaccount', 'Configuration'),
(lid, 'web.generic.group', 'Group'),
(lid, 'web.generic.groups', 'Groups'),
(lid, 'web.generic.role', 'Role'),
(lid, 'web.generic.roles', 'Roles'),
(lid, 'web.generic.pool', 'Pool'),
(lid, 'web.generic.pools', 'Pools'),
(lid, 'web.generic.ok', 'OK'),
(lid, 'web.generic.submit', 'Submit'),
(lid, 'web.generic.cancel', 'Cancel'),
(lid, 'web.generic.page', 'Page'),
(lid, 'web.generic.action', 'Action'),
(lid, 'web.generic.error', 'Error'),
(lid, 'web.generic.information', 'Information'),
(lid, 'web.generic.unexpectedException', 'Unexpected Exception'),
(lid, 'web.generic.empty_password', 'Password cannot be empty'),
(lid, 'web.generic.password_not_equal', 'Passwords don''t match'),
(lid, 'web.generic.latitude', 'Latitude'),
(lid, 'web.generic.longitude', 'Longitude'),
(lid, 'web.generic.requiredField', 'Required Field'),
(lid, 'web.generic.notYetImplemented', 'Not yet implemented'),
(lid, 'web.generic.save', 'Save'),
(lid, 'web.generic.saveas', 'Save as'),
(lid, 'web.generic.delete', 'Delete'),
(lid, 'web.generic.next', 'Next'),
(lid, 'web.generic.previous', 'Previous'),
(lid, 'web.generic.not.enough.permissions', 'Not enough permissions to execute the action'),
(lid, 'web.generic.loading', 'Loading...'),
(lid, 'web.generic.addUser', 'Add User'),
(lid, 'web.generic.addGroup', 'Add Group'),
(lid, 'web.generic.addForm', 'Add Form'),
(lid, 'web.generic.clear', 'Clear'),
(lid, 'web.generic.clean', 'Clean'),
(lid, 'web.generic.add', 'Add'),
(lid, 'web.generic.edit', 'Edit'),
(lid, 'web.generic.associate', 'Associate'),
(lid, 'web.generic.selectFile', 'Select file'),
(lid, 'web.generic.version', 'Version'),
(lid, 'web.generic.versionPublished', 'Version Published'),
(lid, 'web.generic.publishedVersion', 'Published Version'),
(lid, 'web.generic.publish', 'Publish'),
(lid, 'web.generic.unpublish', 'Unpublish'),
(lid, 'web.generic.publishLastVersion', 'Publish Last Version'),
(lid, 'web.generic.none', 'None'),
(lid, 'web.generic.saveAndSubmit', 'Save And Submit'),
(lid, 'web.generic.processItems', 'Items'),
(lid, 'web.generic.toolbox', 'TOOLBOX'),
(lid, 'web.generic.profile', 'Profile'),
(lid, 'web.generic.footer', 'SODEP 2012'),
(lid, 'web.generic.newLabel', 'Create Label'),
(lid, 'web.generic.usersInGroup', 'Users in Group'),
(lid, 'web.generic.availableUsers', 'Available Users'),
(lid, 'web.generic.availableRoles', 'Available Roles'),
(lid, 'web.generic.assignedRoles', 'Assigned Roles'),
(lid, 'web.generic.availableGroups', 'Available Groups'),
(lid, 'web.generic.groupsContainingUser', 'Groups containing User'),
(lid, 'web.generic.reloadGrid', 'Reload Grid'),
(lid, 'web.generic.upgrade', 'Upgrade'),
(lid, 'web.generic.upgradeAll', 'Upgrade All'),
(lid, 'web.generic.available', 'Available'),
(lid, 'web.generic.selected', 'Selected'),
(lid, 'web.generic.yes', 'Yes'),
(lid, 'web.generic.no', 'No'),
(lid, 'web.generic.sorry', 'Sorry'),
(lid, 'web.generic.warning', 'Warning'),
(lid, 'web.generic.revokeAuthorization.user', 'Revoke the authorization to the user'),
(lid, 'web.generic.revokeAuthorization.group', 'Revoke the authorization to the group'),
(lid, 'web.index.label01', 'Welcome To Captura!'),
(lid, 'web.index.label02', 'For more information on how Captura can help you and your company leverage the full potential of smartphones please take a tour' ),
(lid, 'web.index.label03', 'This is FUN!'),
(lid, 'web.index.tour', 'Take the tour'),
(lid, 'web.index.title', 'Captura'),
(lid, 'web.registration.title', 'Register a new user'),
(lid, 'web.registration.captcha', 'Prove you''re not a bot'),
(lid, 'web.registration.label01', 'Create an account'),
(lid, 'web.registration.submit', 'Register'),
(lid, 'web.registration.disabled', 'Registration temporarily disabled'),
(lid, 'web.registration.error.emptyField', 'Empty field'),
(lid, 'web.registration.error.requiredFieldEmpty', 'A required field was left empty'),
(lid, 'web.registration.error.catpcha', 'We can''t be sure that you are not a bot. Please try again'),
(lid, 'web.registration.passwordsDontMatch', 'Passwords don''t match'),
(lid, 'web.registration.marketing.title', 'Soon you will be able to... '),
(lid, 'web.registration.marketing.opt1', 'Use our powerful editor to design your forms'),
(lid, 'web.registration.marketing.opt2', 'Let people on the field use their devices to send the data you are looking for.'),
(lid, 'web.registration.marketing.opt3', 'Work even if your device is offline'),
(lid, 'web.registration.marketing.opt4', 'View the uploaded data on the web'),
(lid, 'web.registration.marketing.opt5', 'Manage user rights'),
(lid, 'web.registration.marketing.opt6', 'Much more...'),
(lid, 'web.login.title', 'Sign In'),
(lid, 'web.login.label01', 'Log in to your account'),
(lid, 'web.login.submit', 'Sign In'),
(lid, 'web.login.cantAccesAccount', 'Can''t access your account?'),
(lid, 'web.login.emailEmpty', 'Email is empty'),
(lid, 'web.login.passwordEmpty', 'Password is empty'),
(lid, 'web.validation.user.invalidmail', 'Invalid E-mail address'),
(lid, 'web.validation.user.password', 'Password should be at least 8 characters long'),
(lid, 'web.validation.user.firstName', 'First name should be at least 2 characters long'),
(lid, 'web.validation.user.lastName', 'Last name should be at least 2 characters long'),
(lid, 'web.home.title', 'Captura'),
(lid, 'web.home.welcome', '{0} {1}, Welcome to Captura!'),
(lid, 'web.home.main', 'Main'),
(lid, 'web.home.data', 'Data'),
(lid, 'web.home.editor', 'Form Designer'),
(lid, 'web.home.admin', 'Admin'),
(lid, 'web.home.acmeui', 'ACME UI Components'),
(lid, 'web.home.appchanger.dialog.message', 'Are you sure you want to change your App?'),
(lid, 'web.home.appchanger.dialog.title', 'Change Application?'),
(lid, 'web.home.processes', 'Processes'),
(lid, 'web.home.usersAndGroups', 'Users & Groups'),
(lid, 'web.home.devices', 'Devices'),
(lid, 'web.home.reports', 'Reports of '),
(lid, 'web.home.rolesAndPermissions', 'Roles'),
(lid, 'web.home.rolesDefinition', 'Roles Definition'),
(lid, 'web.home.connectors', 'Connectors'),
(lid, 'web.home.settings', 'Settings'),
(lid, 'web.home.license', 'License'),
(lid, 'web.home.legacy', 'Legacy'),
(lid, 'web.home.processManager', 'Process manager'),
(lid, 'web.home.management', 'Management'),
(lid, 'web.home.administration', 'Administration'),
(lid, 'web.home.systemAdministration', 'System Administration'),
(lid, 'web.home.myaccount', 'My account'),
(lid, 'web.home.myaccount.preferences.title', 'My preferences'),
(lid, 'web.home.myaccount.connector.title', 'Connector Repository preferences'),
(lid, 'web.home.myaccount.password.title', 'Password configuration'),
(lid, 'web.home.myaccount.password.field.old', 'Old password:'),
(lid, 'web.home.myaccount.password.field.new', 'New password:'),
(lid, 'web.home.myaccount.password.field.confirm', 'Confirm password:'),
(lid, 'web.home.myaccount.password.change', 'Change password'),
(lid, 'web.home.myaccount.password.change.success.title', 'Successfully changed the password'),
(lid, 'web.home.myaccount.password.error.confirm', 'The confirmation password doesn''t match the new password'),
(lid, 'web.home.myaccount.password.error.old', 'The old password is not valid'),
(lid, 'web.home.myaccount.userData.title', 'User Data'),
(lid, 'web.home.application_settings', 'Application Settings'),
(lid, 'web.home.first.setup.message', 'The application hasn''t been setup.'),
(lid, 'web.home.first.setup.link', 'Setup the Application'),
(lid, 'web.home.uncaughtException', 'Uncaught Exceptions'),
(lid, 'web.dashboard.your_projects', 'You are currently involved in these projects'),
(lid, 'web.dashboard.view_data', 'View Data'),
(lid, 'web.dashboard.build_edit', 'Build or Design Forms'),
(lid, 'web.dashboard.admin', 'Manage App'),
--Reports
(lid, 'web.home.reports.title', 'Reports'),
(lid, 'web.home.reports.querys.title', 'List of queries'),
(lid, 'web.home.reports.newQuery', 'Create Query'),
(lid, 'web.home.reports.query', 'Query'),
(lid, 'web.home.reports.noVersionIsPublished', 'No Form version is published'),
(lid, 'web.home.reports.column.meta.mail', 'User'),
(lid, 'web.home.reports.column.meta.receivedAt', 'Received At'),
(lid, 'web.home.reports.column.meta.location', 'Location'),
(lid, 'web.home.reports.downloadCSV', 'Download CSV'),
(lid, 'web.home.reports.exportOptions', 'Available on:'),
(lid, 'web.home.reports.button.search', 'Search'),
(lid, 'web.home.reports.csv.tooltip', 'UTF-8 CSV file'),
(lid, 'web.home.reports.xls.tooltip', 'Binary Excel file'),
(lid, 'web.home.reports.pdf.tooltip', 'PDF Format'),
(lid, 'web.home.reports.edit.tooltip', 'Edit this query'),
(lid, 'web.home.reports.createQuery.tooltip', 'Create a new query'),
(lid, 'web.home.reports.error.emptyReport.title', 'Error generating report'),
(lid, 'web.home.reports.error.emptyReport.message', 'There is no data to generate the report'),
--Reports Query
(lid, 'web.home.querys.new.title', 'Create Query'),
(lid, 'web.home.querys.edit.title', 'Edit Query'),
(lid, 'web.home.querys.name', 'Query Name'),
(lid, 'web.home.querys.tableColumns', 'Table Columns'),
(lid, 'web.home.querys.csvColumns', 'CSV Columns'),
(lid, 'web.home.querys.saved.title', 'Query saved successfully'),
(lid, 'web.home.querys.saved.message', 'Query {0} saved successfully'),
(lid, 'web.home.querys.notsaved.title', 'Query not saved'),
(lid, 'web.home.querys.notsaved.message', 'Another user already updated or created the query {0}'),
(lid, 'web.home.querys.backToReports', 'Back to Reports'),
(lid, 'web.home.querys.invalid.duplicated', 'A Query with the provided name already exist for this Form version'),
(lid, 'web.home.querys.setAsDefaultQuery', 'Set as default Query'),
(lid, 'web.home.querys.metadataLabel', 'System data'),
(lid, 'web.home.querys.addFilterDialog.title', 'Choose a column'),
(lid, 'web.home.querys.googleMapsLinks', 'Download locations as Google Maps Links'),
(lid, 'web.home.reports.operator.equals', 'Equals'),
(lid, 'web.home.reports.operator.greater', 'Greater'),
(lid, 'web.home.reports.operator.less', 'Less'),
(lid, 'web.home.reports.operator.between', 'Between'),
(lid, 'web.home.reports.operator.like', 'Like'),
(lid, 'web.home.querys.addFilterButton', 'Add a new Filter'),
(lid, 'web.home.querys.addFilterDialog_title', 'Choose an Item'),
(lid, 'web.home.querys.deleted.title', 'Query deleted'),
(lid, 'web.home.querys.deleted.message', 'The query {0} has been deleted'),
(lid, 'web.home.querys.delete.confirmation.title', 'Delete Query'),
(lid, 'web.home.querys.delete.confirmation.message', 'Are you sure you want to delete this Query?'),
(lid, 'web.home.querys.searchOptions_title', 'Search options'),
(lid, 'web.home.querys.step', 'Step'),
(lid, 'web.home.querys.section.generalInfo', 'General Information'),
(lid, 'web.home.querys.section.tableColumns', 'Select visible columns'),
(lid, 'web.home.querys.section.tableColumns.help', 'Choose the columns that are going to be displayed on this query'),
(lid, 'web.home.querys.section.sortingColumns', 'Select the sorting columns'),
(lid, 'web.home.querys.section.sortingColumns.help', 'The selected columns will be used as sorting criteria'),
(lid, 'web.home.querys.section.filter', 'Select filters'),
(lid, 'web.home.querys.section.filter.help', 'Register filters that will be used by default on this query'),
(lid, 'web.home.querys.save.error.title', 'The query could not be saved'),
(lid, 'web.home.querys.save.error.message', 'Check for errors and try again'),
-- Show Data && Input Data
(lid, 'web.home.data.show', 'Show Data'),
(lid, 'web.home.data.downloadcsv', 'Download CSV Data'),
(lid, 'web.home.data.input', 'Input Data'),
(lid, 'web.home.data.input.title', 'Input Data'),
(lid, 'web.home.data.show.title', 'Show Data'),
(lid, 'web.home.data.input.error.minlenght', 'Minimum length is {0}'),
(lid, 'web.home.data.input.error.maxlenght', 'Maximum length is {0}'),
(lid, 'web.home.data.input.error.minvalue', 'Minimum value is {0}'),
(lid, 'web.home.data.input.error.maxvalue', 'Maximum value is {0}'),
(lid, 'web.data.input.save.ok', 'Form Data Saved Successfully'),
(lid, 'web.data.input.save.error', 'Error. Form Not Saved'),
(lid, 'web.data.input.save.error.field.wrongType', 'Data type error on field {0}'),
(lid, 'web.data.input.save.error.field.wrongField', 'The field {0} is not on definition'),
(lid, 'web.data.input.select.initialLabel', 'Select a Value'),
(lid, 'web.data.input.file.upload.exception', 'Unable to uplaod the file'),
(lid, 'web.data.show.button', 'Show Data'),
(lid, 'web.data.select.project', 'Select a Project'),
(lid, 'web.data.select.form', 'Select a Form'),
(lid, 'web.data.select.version', 'Select a Version'),
(lid, 'web.data.form.empty', 'Form Empty'),
(lid, 'web.data.form.empty.message', 'The Form {0} do not have metadata'),
(lid, 'web.data.show.noFields', 'This Form does not have fields to show'),
(lid, 'web.data.show.showImage', 'Show Image'),
(lid, 'web.data.show.image.loading', 'Loading Image'),
(lid, 'web.data.show.noImage', 'No Image'),
(lid, 'web.data.show.not_available', 'Not Available'),
(lid, 'web.data.show.showSignature', 'Show signature'),
(lid, 'web.data.show.noSignature', 'No signature'),
(lid, 'web.home.admin.users', 'Users'),
(lid, 'web.home.admin.groups', 'Groups'),
(lid, 'web.home.admin.projects', 'Projects'),
(lid, 'web.home.admin.roles', 'Roles'),
(lid, 'web.home.admin.forms', 'Forms'),
(lid, 'web.home.admin.process_items', 'Items'),
(lid, 'web.home.admin.pools', 'Pools'),
(lid, 'web.home.admin.devices', 'Devices'),
(lid, 'web.home.admin.devices.field.identifier', 'Identifier'),
(lid, 'web.home.admin.devices.identifier.msg', 'The unique device ID, for example, the IMEI for GSM and the MEID or ESN for CDMA phones. On Android dial *#06#'),
(lid, 'web.home.admin.devices.identifier.msg2', 'This might not be available on certain devices and a custom hardware ID will be used depending on the platform.'),
(lid, 'web.home.admin.devices.field.brand', 'Brand'),
(lid, 'web.home.admin.devices.field.model', 'Model'),
(lid, 'web.home.admin.devices.field.phone_number', 'Phone number'),
(lid, 'web.home.admin.devices.field.os', 'OS'),
(lid, 'web.home.admin.no_devices', 'The user doesn''t have any associated device'),
(lid, 'web.home.admin.application_management', 'Application management'),
(lid, 'web.home.admin.project.new', 'Create Project'),
(lid, 'web.home.admin.project.edit', 'Project Configuration'),
(lid, 'web.home.admin.project.manager', 'Project Configuration'),
(lid, 'web.home.admin.form.new', 'Create Form'),
(lid, 'web.home.admin.form.edit', 'Design Form'),
(lid, 'web.home.admin.form.manager', 'Form Configuration'),
(lid, 'web.home.admin.device.new', 'Add Device'),
(lid, 'web.home.admin.device.edit', 'Edit Device'),
(lid, 'web.home.admin.group.new', 'Create Group'),
(lid, 'web.home.admin.group.edit', 'Edit Group'),
(lid, 'web.home.admin.user.new', 'Create User'),
(lid, 'web.home.admin.user.edit', 'Edit User'),
(lid, 'web.home.admin.pool.new', 'Create Pool'),
(lid, 'web.home.admin.pool.edit', 'Edit Pool'),
(lid, 'web.home.admin.pool.manager', 'Pool Manager'),
(lid, 'web.home.admin.processitem.manager', 'Item Manager'),
(lid, 'web.home.admin.application_management.usersAndGroups', 'Users & Groups'),
(lid, 'web.home.admin.application_management.process', 'Process'),
(lid, 'web.home.admin.application_management.processManager', 'Process Manager'),
(lid, 'web.home.admin.application_management.reports', 'Reports'),
(lid, 'web.home.admin.application_management.devices', 'Devices'),
(lid, 'web.home.admin.application_management.rolesAndPermissions', 'Roles and Permissions'),
(lid, 'web.home.admin.application_management.settings', 'Application Settings'),
(lid, 'web.home.admin.application_management.licenses', 'Licenses'),
(lid, 'web.home.admin.application_management.connectors', 'Connectors'),
(lid, 'web.home.admin.license.max_user.reached', 'The application reached its maximum of {0} users. Contact your salesman to buy a larger license.'),
(lid, 'services.user.register.mail.duplicate', 'Email address already in use'),
(lid, 'services.user.register.mail.deleted', 'The account has already been deleted and cannot be added again'),
(lid, 'services.user.new.license.max_user.reached', 'License grants up to {0} users, Current count is {1}'),
(lid, 'web.controller.register.newUser', 'Create User'),
(lid, 'web.controller.register.userCreated', 'User created'),
(lid, 'web.controller.register.ok', 'Registration complete, you should receive an email to activate your account soon.'),
(lid, 'web.controller.register.invalid', 'Could not register due to some invalid information, please check the registration form'),
(lid, 'web.controller.register.alreadyActive', '{0} is already registered. Please proceed to login'),
(lid, 'web.controller.register.confirmResend', 'The account already exists but it''s not Active. Click <strong><a href="javascript:void(0)" id="resendLink">here</a></strong> if you want the activation mail to be resent'),
(lid, 'web.controller.register.mailResent', 'We just sent another activation mail to {0}. Please be patient. Thank you!'),
(lid, 'web.controller.register.noSuchUser', 'No such user account'),
(lid, 'web.controller.register.pendingActivation', 'Pending activation'),
(lid, 'web.controller.register.pendingApproval', 'Pending approval'),
-- Show lookup table data
(lid, 'web.data.select.lookup_table', 'Select a Lookup table'),
(lid, 'web.home.data.lookup_table', 'Lookup tables'),
(lid, 'web.home.data.lookup_table.emptyTable', 'Currently, there are no lookup tables in the system'),
(lid, 'web.data.lookup_table.validation.emptyLutParam', 'Empty Lookup table ID provided'),
(lid, 'web.data.lookup_table.validation.invalidLutId', 'Invalid lookup table ID. Not a number'),
(lid, 'web.data.lookup_table.empty.message', 'Lookup table empty'),
(lid, 'web.data.lookup_table.delete.success', 'Lookup table successfully deleted'),
(lid, 'web.data.lookup_table.delete.failure.illegalArgument', 'Illegal lookup table to delete'),
(lid, 'web.data.lookup_table.delete.confirm.title', 'Delete LookupTable'),
(lid, 'web.data.lookup_table.delete.confirm.message', 'Are you sure that you want to delete the lookup Table? '),
-- Cruds' Columns
-- Users' CRUD
(lid, 'admin.cruds.user.title', 'Users'),
(lid, 'admin.cruds.user.cols.id', 'ID'),
(lid, 'admin.cruds.user.cols.firstName', 'First Name'),
(lid, 'admin.cruds.user.cols.lastName', 'Last name'),
(lid, 'admin.cruds.user.cols.mail', 'Mail'),
(lid, 'admin.cruds.user.cols.username', 'Username'),
(lid, 'admin.cruds.user.cols.password', 'Password'),
(lid, 'admin.cruds.user.cols.active', 'Active'),
(lid, 'admin.cruds.user.cols.groups', 'Groups'),
(lid, 'admin.cruds.user.cols.roles', 'Roles'),
(lid, 'admin.cruds.user.cols.devices', 'Devices'),
(lid, 'admin.cruds.user.cols.lastLogin', 'Last Login'),
(lid, 'admin.cruds.user.groups.dialog.title', 'Groups of User {0}'),
(lid, 'admin.cruds.user.roles.dialog.title', 'Roles of User {0}'),
(lid, 'admin.cruds.user.saved.message', 'User {0} saved'),
(lid, 'admin.cruds.user.saved.title', 'User saved'),
(lid, 'admin.cruds.user.deleted.message', 'User {0} deleted'),
(lid, 'admin.cruds.user.deleted.title', 'User deleted'),
(lid, 'admin.cruds.user.diassociate.message', 'The device {0} was deassociated from the user {1}'),
(lid, 'admin.cruds.user.diassociate.title', 'Device deassociated'),
(lid, 'admin.cruds.user.diassociate.warning.title', 'Diassociate device'),
(lid, 'admin.cruds.user.diassociate.warning.msg', 'Do you really want to diassociate the device {0} ?'),
(lid, 'admin.cruds.user.password_reset_button.title', 'Send password reset mail'),
(lid, 'admin.cruds.user.password_reset.ok.title', 'Mail sent'),
(lid, 'admin.cruds.user.password_reset.error.title', 'Mail not sent'),
(lid, 'admin.cruds.user.user_not_selected', 'No user selected'),
(lid, 'admin.cruds.user.invalid.message', 'Invalid user data'),
(lid, 'admin.cruds.user.form.addCaption', 'Add User'),
(lid, 'admin.cruds.user.form.editCaption', 'Edit User'),
(lid, 'admin.cruds.user.new.title', 'Create User'),
(lid, 'admin.cruds.user.edit.title', 'Edit User'),
(lid, 'admin.cruds.user.addGroups', 'Add Groups'),
(lid, 'admin.cruds.user.removeGroups', 'Remove Groups'),
(lid, 'admin.cruds.user.addRoles', 'Assign'),
(lid, 'admin.cruds.user.removeRoles', 'Remove'),
(lid, 'admin.cruds.user.invalid.duplicated', 'A user with the provided mail already exist in this application'),
(lid, 'admin.cruds.user.invitation.cancel.title', 'Invitation canceled'),
(lid, 'admin.cruds.user.invitation.cancel.message', 'Invitation to {0}, canceled'),
(lid, 'admin.cruds.user.invite', 'Invite'),
(lid, 'admin.cruds.user.addGroups.title', 'Groups added to User successfully'),
(lid, 'admin.cruds.user.removeGroups.title', 'Groups removed from User successfully '),
(lid, 'admin.cruds.user.addRoles.title', 'Roles assigned to User successfully'),
(lid, 'admin.cruds.user.removeRoles.title', 'Roles removed from User successfully'),
-- Groups' CRUD
(lid, 'admin.cruds.group.title', 'Groups'),
(lid, 'admin.cruds.group.cols.id', 'ID'),
(lid, 'admin.cruds.group.cols.name', 'Group Name'),
(lid, 'admin.cruds.group.cols.description', 'Description'),
(lid, 'admin.cruds.group.cols.active', 'Active'),
(lid, 'admin.cruds.group.cols.roles', 'Roles'),
(lid, 'admin.cruds.group.saved.message', 'Group {0} saved'),
(lid, 'admin.cruds.group.saved.title', 'Group saved'),
(lid, 'admin.cruds.group.deleted.message', 'Group {0} deleted'),
(lid, 'admin.cruds.group.deleted.title', 'Group deleted'),
(lid, 'admin.cruds.group.roles.dialog.title', 'Roles of Group {0}'),
(lid, 'admin.cruds.group.invalid.message', 'Invalid group data'),
(lid, 'admin.cruds.group.invalid.duplicated', 'A group with the provided name already exist in the application'),
(lid, 'admin.cruds.group.new.title', 'Create Group'),
(lid, 'admin.cruds.group.edit.title', 'Edit Group'),
(lid, 'admin.cruds.group.addUsers', 'Add Users'),
(lid, 'admin.cruds.group.removeFromGroup', 'Remove From Group'),
(lid, 'admin.cruds.group.addRoles', 'Assign'),
(lid, 'admin.cruds.group.removeRoles', 'Remove'),
(lid, 'admin.cruds.group.addUsers.title', 'Users added to Group successfully'),
(lid, 'admin.cruds.group.removeUsers.title', 'Users removed from Group successfully '),
(lid, 'admin.cruds.group.addRoles.title', 'Roles added to Group successfully'),
(lid, 'admin.cruds.group.removeRoles.title', 'Roles removed from Group successfully'),
-- Projects' CRUD
(lid, 'admin.cruds.project.title', 'Projects'),
(lid, 'admin.cruds.project.label.not_set', 'Label not set in English'),
(lid, 'admin.cruds.project.description.not_set', 'Description not set in English'),
(lid, 'admin.cruds.project.cols.id', 'ID'),
(lid, 'admin.cruds.project.cols.label', 'Label'),
(lid, 'admin.cruds.project.cols.description', 'Description'),
(lid, 'admin.cruds.project.cols.language', 'Default Language'),
(lid, 'admin.cruds.project.cols.owner', 'Owner'),
(lid, 'admin.cruds.project.cols.created', 'Created'),
(lid, 'admin.cruds.project.cols.active', 'Active'),
(lid, 'admin.cruds.project.cols.edit', 'Edit'),
(lid, 'admin.cruds.project.cols.clone', 'Clone'),
(lid, 'admin.cruds.project.cols.auths', 'User Management'),
(lid, 'admin.cruds.project.auths.dialog.title', 'User and Group Management of Project {0}'),
(lid, 'admin.cruds.project.saved.message', 'Project {0} saved'),
(lid, 'admin.cruds.project.saved.title', 'Project saved'),
(lid, 'admin.cruds.project.form.imported.message', 'Form {0} imported'),
(lid, 'admin.cruds.project.form.imported.title', 'Form imported'),
(lid, 'admin.cruds.project.roles.saved.title', 'Roles in Project saved'),
(lid, 'admin.cruds.project.roles.deleted.title', 'Roles in Project deleted'),
(lid, 'admin.cruds.project.deleted.title', 'Project deleted'),
(lid, 'admin.cruds.project.deleted.message', 'Project {0} deleted'),
(lid, 'admin.cruds.project.deleted.error', 'An error occurred while tying to delete project {0}'),
(lid, 'admin.cruds.project.invalid.message', 'Invalid project data'),
(lid, 'admin.cruds.project.form.editCaption', 'Project Configuration'),
(lid, 'admin.cruds.project.form.addCaption', 'Add Project'),
(lid, 'admin.cruds.project.new.title', 'Create Project'),
(lid, 'admin.cruds.project.edit.title', 'Project Configuration'),
(lid, 'admin.cruds.project.userGrid.title', 'Users List'),
(lid, 'admin.cruds.project.groupGrid.title', 'Groups List'),
(lid, 'admin.cruds.project.formGrid.title', 'Form List'),
(lid, 'admin.cruds.project.error.userRepeated', 'User Repeated'),
(lid, 'admin.cruds.project.error.groupRepeated', 'Group Repeated'),
(lid, 'admin.cruds.project.notsaved.title', 'Project not saved'),
(lid, 'admin.cruds.project.notsaved.message', 'Another user already updated or created the project {0}'),
(lid, 'admin.cruds.project.delete.confirmation.title', 'Delete Project'),
(lid, 'admin.cruds.project.delete.confirmation.message', 'Are you sure you want to delete this project?. All Forms in the project will be deleted'),
(lid, 'admin.cruds.project.invalid.duplicated', 'There is already a Project with the same name'),
-- Brand CRUD
(lid, 'web.home.admin.brands', 'Brands'),
(lid, 'admin.cruds.brand.cols.edit', 'Edit'),
(lid, 'admin.cruds.brand.title', 'Brands'),
(lid, 'admin.cruds.brand.cols.id', 'ID'),
(lid, 'admin.cruds.brand.cols.name', 'Name'),
(lid, 'admin.cruds.brand.cols.active', 'Active'),
(lid, 'admin.cruds.brand.deleted.title', 'Brand deleted'),
(lid, 'admin.cruds.brand.deleted.message', 'Brand {0} deleted'),
(lid, 'admin.cruds.brand.saved.title', 'Brand saved'),
(lid, 'admin.cruds.brand.saved.message', 'Brand {0} saved'),
(lid, 'admin.cruds.brand.notsaved.title', 'Brand not saved'),
(lid, 'admin.cruds.brand.notsaved.message', 'Brand {0} not saved'),
(lid, 'admin.cruds.brand.invalid.duplicated', 'Duplicated brand'),
(lid, 'admin.cruds.brand.form.editCaption', 'Edit Brand'),
(lid, 'admin.cruds.brand.form.addCaption', 'Add Brand'),
-- Model CRUD
(lid, 'admin.cruds.model.cols.id', 'ID'),
(lid, 'admin.cruds.model.cols.name', 'Model'),
(lid, 'admin.cruds.model.cols.brand', 'Brand'),
(lid, 'admin.cruds.model.cols.active', 'Active'),
(lid, 'admin.cruds.model.title', 'Model'),
(lid, 'admin.cruds.model.form.addCaption', 'Add Model'),
(lid, 'admin.cruds.model.form.editCaption', 'Edit Model'),
(lid, 'web.home.admin.models', 'Models'),
(lid, 'admin.cruds.model.invalid.duplicated', 'Model already exists'),
(lid, 'admin.cruds.model.nonexist.brand.title', 'Error while trying to create Model'),
(lid, 'admin.cruds.model.nonexist.brand.message', 'There are no active Brands to use.'),
-- Roles' CRUD
(lid, 'admin.cruds.role.title', 'Roles'),
(lid, 'admin.cruds.role.cols.id', 'ID'),
(lid, 'admin.cruds.role.cols.name', 'Name'),
(lid, 'admin.cruds.role.cols.description', 'Description'),
(lid, 'admin.cruds.role.cols.level', 'Level'),
(lid, 'admin.cruds.role.cols.active', 'Active'),
(lid, 'admin.cruds.role.cols.auths', 'Manage Permissions'),
(lid, 'admin.cruds.role.saved.message', 'Role {0} saved'),
(lid, 'admin.cruds.role.saved.title', 'Role saved'),
(lid, 'admin.cruds.role.deleted.message', 'Role {0} deleted'),
(lid, 'admin.cruds.role.deleted.title', 'Role deleted'),
(lid, 'admin.cruds.role.auths.dialog.title', 'Authorizations of Role {0}'),
(lid, 'admin.cruds.role.form.addCaption', 'Add Role'),
(lid, 'admin.cruds.role.form.editCaption', 'Edit Role'),
(lid, 'web.home.admin.role.permission_management', 'Manage Permission'),
(lid, 'admin.cruds.role.invalid.duplicated', 'A role with the provided label already exist in the application'),
(lid, 'admin.cruds.role.level.application', 'Application'),
(lid, 'admin.cruds.role.level.project', 'Project'),
(lid, 'admin.cruds.role.level.form', 'Form'),
(lid, 'admin.cruds.role.level.pool', 'Pool'),
-- Permission's Page
(lid, 'web.home.admin.role.permission', 'Permissions'),
(lid, 'admin.cruds.role.permission.title', 'Permissions'),
(lid, 'admin.cruds.role.permission.role', 'Role'),
(lid, 'admin.cruds.role.permission.description', 'Description'),
(lid, 'admin.cruds.role.permission.saved.message', '{0} permissions saved'),
(lid, 'admin.cruds.role.permission.saved.title', 'Permissions saved'),
-- Forms' CRUD
(lid, 'admin.cruds.form.title', 'Form Configuration'),
(lid, 'admin.cruds.form.cols.id','ID' ),
(lid, 'admin.cruds.form.cols.label', 'Label'),
(lid, 'admin.cruds.form.cols.description', 'Description'),
(lid, 'admin.cruds.form.cols.version', 'Version'),
(lid, 'admin.cruds.form.cols.versionPublished', 'Version Published'),
(lid, 'admin.cruds.form.cols.published', 'Published'),
(lid, 'admin.cruds.form.cols.default_language', 'Default Language'),
(lid, 'admin.cruds.form.cols.accept_data', 'Accept Data'),
(lid, 'admin.cruds.form.cols.created', 'Created'),
(lid, 'admin.cruds.form.cols.project', 'Project'),
(lid, 'admin.cruds.form.cols.active', 'Active'),
(lid, 'admin.cruds.form.cols.auths', 'User Management'),
(lid, 'admin.cruds.form.auths.dialog.title', 'User and Group Management of Form {0}'),
(lid, 'admin.cruds.form.saved.message', 'Form {0} saved'),
(lid, 'admin.cruds.form.saved.title', 'Form saved'),
(lid, 'admin.cruds.form.roles.saved.title', 'Roles in Form saved'),
(lid, 'admin.cruds.form.roles.deleted.title', 'Roles in Form deleted'),
(lid, 'admin.cruds.form.published.message', 'Form {0} Published'),
(lid, 'admin.cruds.form.published.title', 'Form Published'),
(lid, 'admin.cruds.form.unpublished.message', 'Form {0} Unpublished'),
(lid, 'admin.cruds.form.unpublished.title', 'Form Unpublished'),
(lid, 'admin.cruds.form.notPublished.noElements.message', 'Form {0} cannot be published because it has no items'),
(lid, 'admin.cruds.form.notPublished.noElements.title', 'Form cannot be published'),
(lid, 'admin.cruds.form.notPublished.noPages.message', 'Form {0} cannot be published because it is empty. Please use the Form Designer to add content'),
(lid, 'admin.cruds.form.notPublished.noPages.title', 'Form cannot be published'),
(lid, 'admin.cruds.form.deleted.message', 'Form {0} deleted'),
(lid, 'admin.cruds.form.deleted.title', 'Form deleted'),
(lid, 'admin.cruds.form.deleted.error', 'An error occurred while tying to delete form {0}'),
(lid, 'admin.cruds.form.invalid.message', 'Invalid Form Data'),
(lid, 'admin.cruds.form.invalid.errorSaving', 'Error saving Form'),
(lid, 'admin.cruds.form.invalid.duplicated', 'You cannot have two Forms with the same name in one Project'),
(lid, 'admin.cruds.form.invalid.lockError.creation', 'The Form or the Project it belongs-to was modified during the creation or edition'),
(lid, 'admin.cruds.form.invalid.lockError.edition', 'The Form or the project it belongs to was modified during the edition'),
(lid, 'admin.cruds.form.button.saveAndGoEditor', 'Save And Go To Designer'),
(lid, 'admin.cruds.form.button.goEditor', 'Go To Designer'),
(lid, 'admin.cruds.form.cols.editForm', 'Design Form'),
(lid, 'admin.cruds.form.cols.openEditor', 'Open Designer'),
(lid, 'admin.cruds.form.delete.confirmation.message', 'Are you sure you want to delete this Form?'),
(lid, 'admin.cruds.form.delete.confirmation.title', 'Delete Form'),
(lid, 'admin.cruds.form.missingRequiredFields', 'There are some required fields missing'),
-- Process items' CRUD
(lid, 'admin.cruds.processitem.title', 'Items'),
(lid, 'admin.cruds.processitem.cols.id','ID' ),
(lid, 'admin.cruds.processitem.cols.label', 'Label'),
(lid, 'admin.cruds.processitem.cols.type', 'Type'),
(lid, 'admin.cruds.processitem.cols.required', 'Required'),
(lid, 'admin.cruds.processitem.cols.visible', 'Visible'),
(lid, 'admin.cruds.processitem.cols.created', 'Created'),
(lid, 'admin.cruds.processitem.cols.active', 'Active'),
(lid, 'admin.cruds.processitem.cols.pool', 'Pool'),
(lid, 'admin.cruds.processitem.add.title', 'Add an item'),
(lid, 'admin.cruds.processitem.saved.message', 'Item {0} saved'),
(lid, 'admin.cruds.processitem.saved.title', 'Item saved'),
(lid, 'admin.cruds.processitem.deleted.message', 'Item {0} deleted'),
(lid, 'admin.cruds.processitem.deleted.title', 'Item deleted'),
(lid, 'admin.cruds.processitem.invalid.duplicated', 'An item with the provided label already exist in the application'),
(lid, 'admin.cruds.processitem.invalid.applicationRequired', 'Cannot save the item. No application selected'),
(lid, 'admin.cruds.processitem.notsaved.title', 'Item not saved'),
(lid, 'admin.cruds.processitem.notsaved.message', 'Another user already updated or created the item {0}'),
(lid, 'admin.processitem.dialog.saveas.title', 'Save Item As'),
(lid, 'admin.processitem.upgrade.success', 'Successful Item Upgrade'),
(lid, 'admin.processitem.upgradeAll.success', 'Successful Item Upgrade in all Forms'),
(lid, 'admin.processitem.processItemVersion', 'Item Version'),
(lid, 'admin.cruds.processitem.delete.confirmation.message', 'Are you sure you want to delete this Item?'),
(lid, 'admin.cruds.processitem.delete.confirmation.title', 'Delete Item'),
(lid, 'admin.cruds.processitem.delete.form.depends.on', 'The following Forms depend on this item :'),
-- Process item form
(lid, 'admin.form.processitem.common.poolselect', 'Pool'),
(lid, 'admin.form.processitem.common.label','Label' ),
(lid, 'admin.form.processitem.common.required','Required' ),
(lid, 'admin.form.processitem.common.visible','Visible' ),
(lid, 'admin.form.processitem.common.active','Active' ),
(lid, 'admin.form.processitem.common.type','Type' ),
(lid, 'admin.form.processitem.input.minimum','Minimum' ),
(lid, 'admin.form.processitem.input.maximum','Maximum' ),
(lid, 'admin.form.processitem.input.readonly','Read only' ),
(lid, 'admin.form.processitem.select.dependson','Depends on' ),
(lid, 'admin.form.processitem.select.lookup','Lookup' ),
(lid, 'admin.form.processitem.select.collection','Collection' ),
(lid, 'admin.form.processitem.select.label','Option label' ),
(lid, 'admin.form.processitem.select.value','Option value' ),
(lid, 'admin.form.processitem.select.textarea','Text area' ),
(lid, 'admin.form.processitem.button.edit','Edit' ),
(lid, 'admin.form.processitem.button.accept','Accept' ),
(lid, 'admin.form.processitem.button.cancel','Cancel' ),
(lid, 'admin.form.processitem.type.text','Text' ),
(lid, 'admin.form.processitem.type.date','Date' ),
(lid, 'admin.form.processitem.type.time','Time' ),
(lid, 'admin.form.processitem.type.datetime', 'Datetime'),
(lid, 'admin.form.processitem.type.password','Password' ),
(lid, 'admin.form.processitem.type.integer','Integer' ),
(lid, 'admin.form.processitem.type.decimal','Decimal' ),
(lid, 'admin.form.processitem.type.textarea','Text area' ),
(lid, 'admin.form.processitem.type.select','Dropdown' ),
(lid, 'admin.form.processitem.type.location','Location' ),
(lid, 'admin.form.processitem.type.photo','Photo' ),
(lid, 'admin.form.processitem.type.headline','Headline'),
(lid, 'admin.form.processitem.type.checkbox', 'Checkbox'),
(lid, 'admin.form.processitem.type.barcode', 'Barcode'),
(lid, 'admin.form.processitem.type.signature', 'Signature'),
(lid, 'admin.form.processitem.type.email', 'E-mail'),
(lid, 'admin.form.processitem.type.external_link', 'External Link'),
(lid, 'admin.form.processitem.select.none','None' ),
(lid, 'admin.form.processitem.select.multiple', 'Multiple'),
(lid, 'admin.form.processitem.select.identifier','Identifier' ),
(lid, 'admin.form.processitem.select.optionLabel','Options' ),
(lid, 'admin.form.processitem.select.manualSource','Lookup table' ),
(lid, 'admin.form.processitem.select.dynamicSource','Embbeded' ),
(lid, 'admin.form.processitem.select.source', 'Source'),
(lid, 'admin.form.processitem.input.defaultValue', 'Default value'),
(lid, 'admin.form.processitem.select.optionlabel', 'Option label'),
(lid, 'admin.form.processitem.select.options', 'Options'),
(lid, 'admin.cruds.processitem.edit.title', 'Edit item'),
(lid, 'admin.form.processitem.input.defaultLongitude', 'Default longitude'),
(lid, 'admin.form.processitem.input.defaultLatitude', 'Default latitude'),
(lid, 'admin.form.processitem.common.storedinpool', 'Stored in Pool'),
(lid, 'admin.form.processitem.properties', 'Properties'),
(lid, 'admin.form.processitem.forms', 'Forms'),
(lid, 'admin.form.processitem.forms.noFormsUsingProcessItem', 'No Forms using this item'),
(lid, 'admin.form.processitem.forms.title', 'Forms using this item'),
(lid, 'web.home.admin.processitem.new', 'Create Item'),
(lid, 'web.home.admin.processitem.edit', 'Edit Item'),
(lid, 'web.home.admin.processitem.list', 'Select Item'),
(lid, 'admin.form.processitem.common.versionInfo', 'Version info'),
(lid, 'admin.form.processitem.common.version', 'Version'),
(lid, 'admin.form.processitem.validation.notRealNumber', 'Not a real number'),
(lid, 'admin.form.processitem.location.latitude', 'Latitude'),
(lid, 'admin.form.processitem.location.longitude', 'Longitude'),
(lid, 'admin.form.processitem.validation.coordinate.invalid', 'The longitude and latitude used is not a valid coordinate'),
(lid, 'admin.form.processitem.validation.coordinate.required', 'The latitude and longitude are required'),
-- Process Item validations
(lid, 'admin.processitem.validation.required','Field is required' ),
(lid, 'admin.processitem.validation.notnull','Field can not be null' ),
(lid, 'admin.processitem.validation.notaninteger','Field is not an integer' ),
(lid, 'admin.processitem.validation.isnegative','Field is negative' ),
(lid, 'admin.processitem.validation.maxlessthanmin','Maximum field is less than minimum field' ),
(lid, 'admin.processitem.error.isnull', 'ERROR: This field can not be null'),
(lid, 'admin.processitem.validation.atleastoneoption', 'At least one option is required'),
(lid, 'admin.processitem.validation.optionalreadydefined', 'Duplicated options'),
(lid, 'admin.processitem.validation.invalid.date', 'Invalid date value'),
(lid, 'admin.processitem.validation.invalid.datetime', 'Invalid datetime value'),
(lid, 'admin.processitem.validation.invalid.time', 'Invalid time value'),
(lid, 'admin.processitem.validation.invalid.empty', 'Value can not be empty'),
(lid, 'admin.processitem.validation.invalid.greaterThanMaximum', 'value is greater than maximum'),
(lid, 'admin.processitem.validation.invalid.lessThanMinimum', 'value is less than minimum'),
(lid, 'admin.processitem.validation.invalid.integer', 'value is not an integer'),
(lid, 'admin.processitem.validation.invalid.decimal', 'value is not decimal'),
(lid, 'admin.processitem.validation.maxExceed', 'max value exceed'),
-- Process Item actions
(lid, 'admin.processitem.save.success','Item successfully saved' ),
(lid, 'admin.processitem.save.failure','There were problems while trying to save the item' ),
-- Pools Crud
(lid, 'admin.cruds.pool.title', 'Items Pools'),
(lid, 'admin.cruds.pool.cols.id', 'ID'),
(lid, 'admin.cruds.pool.cols.name', 'Name'),
(lid, 'admin.cruds.pool.cols.description', 'Description'),
(lid, 'admin.cruds.pool.cols.active', 'Active'),
(lid, 'admin.cruds.pool.invalid.message', 'Invalid pool data'),
(lid, 'admin.cruds.pool.saved.message', 'Pool {0} saved'),
(lid, 'admin.cruds.pool.saved.title', 'Pool saved'),
(lid, 'admin.cruds.pool.processItem.imported.message', 'Item {0} imported'),
(lid, 'admin.cruds.pool.processItem.imported.title', 'Item imported'),
(lid, 'admin.cruds.pool.roles.saved.title', 'Roles in Pool saved'),
(lid, 'admin.cruds.pool.roles.deleted.title', 'Roles in Pool deleted'),
(lid, 'admin.cruds.pool.deleted.message', 'Pool {0} deleted'),
(lid, 'admin.cruds.pool.deleted.title', 'Pool deleted'),
(lid, 'admin.cruds.pool.form.addCaption', 'Add Pool'),
(lid, 'admin.cruds.pool.form.editCaption', 'Edit Pool'),
(lid, 'admin.cruds.pool.new.title', 'Create Pool'),
(lid, 'admin.cruds.pool.edit.title', 'Edit Pool'),
(lid, 'admin.cruds.pool.invalid.duplicated', 'A Pool with the provided name already exist in the application'),
(lid, 'admin.cruds.pool.button.addProcessItem', 'Copy to current Pool'),
(lid, 'admin.cruds.pool.userGrid.title', 'Users List'),
(lid, 'admin.cruds.pool.groupGrid.title', 'Groups List'),
(lid, 'admin.cruds.pool.notsaved.title', 'Pool not saved'),
(lid, 'admin.cruds.pool.notsaved.message', 'Another user already updated or created the pool {0}'),
(lid, 'admin.cruds.pool.delete.confirmation.title', 'Delete Pool'),
(lid, 'admin.cruds.pool.delete.confirmation.message', 'Are you sure you want to delete this pool?'),
(lid, 'admin.cruds.pool.delete.form.depends.on', 'Form {0} depends on these prototypes : '),
-- Device' CRUD
(lid, 'admin.cruds.device.title', 'Devices'),
(lid, 'admin.cruds.device.cols.id', 'ID'),
(lid, 'admin.cruds.device.cols.model', 'Model'),
(lid, 'admin.cruds.device.cols.brand', 'Brand'),
(lid, 'admin.cruds.device.cols.number', 'Number'),
(lid, 'admin.cruds.device.cols.imei', 'IMEI'),
(lid, 'admin.cruds.device.cols.active', 'Active'),
(lid, 'admin.cruds.device.cols.options', 'Options'),
(lid, 'admin.cruds.device.cols.associations', 'Associations'),
(lid, 'admin.cruds.device.cols.edit.link', 'Edit'),
(lid, 'admin.cruds.device.cols.association.link', 'Manage Association'),
(lid, 'admin.cruds.device.cols.device', 'Device'),
(lid, 'admin.cruds.device.saved.message', 'Device {0} saved'),
(lid, 'admin.cruds.device.saved.title', 'Device saved'),
(lid, 'admin.cruds.device.deleted.message', 'Device {0} deleted'),
(lid, 'admin.cruds.device.deleted.title', 'Device deleted'),
(lid, 'admin.cruds.device.invalid.message', 'Invalid Device data'),
(lid, 'admin.cruds.device.new.title', 'Create Device'),
(lid, 'admin.cruds.device.edit.title', 'Edit Device'),
(lid, 'admin.cruds.device.association.title', 'Manage Association'),
(lid, 'admin.cruds.device.brand.select', 'Select a Brand'),
(lid, 'admin.cruds.device.model.select', 'Select a Model'),
(lid, 'admin.cruds.device.notsaved.title', 'Device not saved'),
(lid, 'admin.cruds.device.notsaved.message', 'Another user already updated or created the Device {0}'),
(lid, 'admin.cruds.device.savedAssociation.message', 'Device {0} is associated with {1}'),
(lid, 'admin.cruds.device.savedAssociation.title', 'Device Association saved'),
(lid, 'admin.cruds.device.removeAssociation.title', 'Device Association removed'),
(lid, 'admin.cruds.device.removeAssociation.message', 'Device {0} is not associated with any User'),
(lid, 'admin.cruds.device.cols.removeAssociation.link', 'Remove Association'),
-- Account activation - mail
(lid, 'services.mail.registration.body', '<b>{0}, Welcome to Captura!</b><br /><br />To activate you account follow this link <a href="{1}">{1}</a><br /><br />The Captura team'),
(lid, 'services.mail.registration.subject', 'Captura - Activation'),
(lid, 'web.controller.activation.activated', 'Your account has been activated.'),
(lid, 'web.controller.activation.invalid', 'Invalid Request.'),
(lid, 'web.controller.activation.invalid.hint', 'Please check that the requested URL is exactly as the one we sent to you per email.'),
(lid, 'web.controller.activation.isActive','Your account is already active.'),
-- New user's credentials - mail
(lid, 'services.mail.credentials.subject', 'Create account at Captura'),
(lid, 'services.mail.credentials.body', 'Hello {0}, your user''s credentials at Captura are: <br/>user: {1}<br />password: {2}'),
-- Password reset - mail / Reset Page
(lid, 'services.mail.set_password.subject', 'Set new password for Captura''s account'),
(lid, 'services.mail.set_password.body.sender', 'Hello {0},<br/><br/>{1} thinks you might need to reset your password.<br/><br/>If you want to do it, please follow the link <a href="{2}">{2}</a><br /><br /><br />The Captura team'),
(lid, 'services.mail.set_password.body.nosender', 'Hello {0},<br/><br/>Please use the following link to set your Captura''s password <a href="{1}">{1}</a><br /><br /><br />The Captura team'),
(lid, 'web.controller.password_reset.mailSent', 'A mail was sent to {0} with instructions to reset the account''s password'),
(lid, 'web.controller.password_reset.mailNotSent', 'Mail not sent'),
(lid, 'web.controller.password_reset.invalidId', 'Invalid user id'),
(lid, 'web.controller.password_reset.invalid', 'Invalid Request'),
(lid, 'web.controller.password_reset.greetings', 'Set password for user {0}'),
(lid, 'web.controller.password_reset.new_password_label', 'Enter new password'),
(lid, 'web.controller.password_reset.invalidpasswords', 'Invalid password'),
(lid, 'web.password_reset.title', 'Set new password'),
(lid, 'web.password_reset.success.title', 'New Password'),
(lid, 'web.password_reset.success.message', 'Your new password has been set. You may now <a href="{0}">login</a>'),
(lid, 'web.password_reset.dialog.body', 'Please follow the link: {0}'),
-- Invitation mail
(lid, 'services.mail.invitation.body', 'Hello {0},<br /><br />{1} would like you to join Captura''s Application {2}.<br /><br />If you wish to accept the invitation, follow this link <a href="{3}">{3}</a><br /><br /><br />The Captura team'),
(lid, 'services.mail.invitation.subject', 'Join {0} at Captura'),
(lid, 'web.controller.invitation.accepted', '<p>You have successfully joined the App {0}.</p> <p>You may now login to access the application.</p>'),
(lid, 'web.controller.invitation.accepted_no_password', '<p>You have successfully joined the App {0}.</p> <p>You have already been assigned a password. If you don''t know it please contact {1}</p>'),
(lid, 'web.controller.invitation.notAccepted', 'Sorry, we couldn''t accept the invitation. Please contact with the person that invited you. Thanks.'),
(lid, 'web.controller.invitation.token.invalid', 'Invalid invitation'),
(lid, 'web.controller.invitation.sent.ok', 'Invitation sent'),
(lid, 'web.controller.invitation.mailSent', 'An invitation mail was sent to {0}'),
(lid, 'web.controller.invitation.sent.error', 'Invitation not sent'),
(lid, 'web.controller.invitation.mailNotSent', 'Invitation mail not sent'),
(lid, 'web.controller.invitation.invalidId', 'Invalid user id'),
(lid, 'web.controller.invitation.setPasswordMail', 'You have now joined the Application {0} at Captura. You need to setup your password before you login. We just sent you an e-mail with instructions'),
-- Editor
(lid, 'web.editor.select.project', 'Select a Project'),
(lid, 'web.editor.select.project.noForms', 'Empty Form list'),
(lid, 'web.editor.mainbuttons.new', 'New'),
(lid, 'web.editor.mainbuttons.open', 'Open'),
(lid, 'web.editor.mainbuttons.save', 'Save'),
(lid, 'web.editor.mainbuttons.saveAs', 'Save As'),
(lid, 'web.editor.mainbuttons.cancel', 'Cancel'),
(lid, 'web.editor.dialog.title.newForm', 'Create Form'),
(lid, 'web.editor.dialog.title.openForm', 'Open Form'),
(lid, 'web.editor.dialog.title.saveAs', 'Save Form As'),
(lid, 'web.editor.dialog.buttons.ok', 'OK'),
(lid, 'web.editor.dialog.buttons.cancel', 'Cancel'),
(lid, 'web.editor.dialog.form.invalidName', 'Invalid Name'),
(lid, 'web.editor.dialog.form.notSelected', 'Invalid Form'),
(lid, 'web.editor.toolbox.loadError', 'Error loading toolbox!, Twitter''s blue whale kinda error!'),
(lid, 'web.editor.mainlayer.button.newPage', 'Add Page'),
(lid, 'web.editor.properties', 'Properties'),
(lid, 'web.editor.properties.selectItem', 'Select an item'),
(lid, 'web.editor.properties.type.form', 'Form'),
(lid, 'web.editor.properties.type.input', 'Input'),
(lid, 'web.editor.properties.type.select', 'Dropdown'),
(lid, 'web.editor.properties.type.page', 'Page'),
(lid, 'web.editor.properties.label', 'Label'),
(lid, 'web.editor.properties.position', 'Position'),
(lid, 'web.editor.properties.required', 'Required'),
(lid, 'web.editor.properties.saveable', 'Final'),
(lid, 'web.editor.properties.description', 'Description'),
(lid, 'web.editor.properties.minlength', 'Minimum Length'),
(lid, 'web.editor.properties.maxlength', 'Maximum Length'),
(lid, 'web.editor.properties.minvalue', 'Minimum Value'),
(lid, 'web.editor.properties.maxvalue', 'Maximum Value'),
(lid, 'web.editor.properties.defaultValue', 'Default Value'),
(lid, 'web.editor.properties.defaultLatitude', 'Default Latitude'),
(lid, 'web.editor.properties.defaultLongitude', 'Default Longitude'),
(lid, 'web.editor.properties.fieldName', 'Field'),
(lid, 'web.editor.properties.readOnly', 'Read Only'),
(lid, 'web.editor.properties.select.source.embedded', 'Embedded'),
(lid, 'web.editor.properties.select.source.lookup_table', 'Lookup Table'),
(lid, 'web.editor.properties.select.source', 'Source'),
(lid, 'web.editor.properties.select.lookuptable', 'Lookup Table'),
(lid, 'web.editor.properties.select.lookuptable.value', 'Value Column'),
(lid, 'web.editor.properties.select.lookuptable.label', 'Label Column'),
(lid, 'web.editor.properties.select.embedded.values', 'Values'),
(lid, 'web.editor.properties.photo.cameraOnly', 'Camera Only'),
(lid, 'web.editor.properties.checkbox.checked', 'Checked'),
(lid, 'web.editor.form.newPage.label', 'New Page'),
(lid, 'web.editor.page.id', 'ID'),
(lid, 'web.editor.toolbox.poolLess', 'Other Items'),
(lid, 'web.editor.toolbox.systemPool', 'Items'),
(lid, 'web.editor.toolbox.title', 'Items'),
(lid, 'web.editor.newProcessItem.label', 'Create Item'),
(lid, 'web.editor.noChanges', 'There are no changes to save'),
(lid, 'web.editor.noChanges.Title', 'No changes'),
(lid, 'web.editor.publish.unsavedChanges', 'There are unsaved changes. Please, save the changes to publish the Form'),
(lid, 'web.editor.publish.unsavedChanges.title', 'Unsaved Changes'),
(lid, 'web.editor.saved', 'Form saved'),
(lid, 'web.editor.error.notSaved', 'An error occurred while trying to save the Form'),
(lid, 'web.editor.info', 'Info'),
(lid, 'web.editor.form.automatic.newpage', 'A start page was added to the Form'),
(lid, 'web.editor.exit.unsaved', 'There are unsaved changed. Do you want to leave this page?'),
(lid, 'web.editor.exit.unsaved.title', 'Unsaved Changes'),
(lid, 'web.editor.processItem.moveToPage', 'Move to Page >'),
(lid, 'web.editor.title', 'Form Designer'),
(lid, 'web.editor.backToFormManager', 'Back to Form Configuration'),
(lid, 'web.editor.properties.select.filter.label', 'Filter'),
(lid, 'web.editor.properties.select.filter.button', 'Show Filter Options'),
(lid, 'web.editor.properties.dialogs.filter.label', 'Filters'),
(lid, 'web.editor.properties.dialogs.lookuptable.label', 'Lookup Table'),
(lid, 'web.editor.properties.dialogs.value.label', 'Value'),
(lid, 'web.editor.dialog.incrementversion.confirmation.title', 'A previous version of this Form was published'),
(lid, 'web.editor.dialog.incrementversion.confirmation.message', 'Saving the changes will increment the version number. To make the changes visible to the users, you have to publish this new version. Do you wish to continue?'),
(lid, 'web.editor.unreachablePages', 'Unreachable Pages'),
(lid, 'web.editor.unreachablePages.explanation', 'Your Form has unreachable pages. The pages are higlighted with red.'),
(lid, 'web.editor.page.warning.unreachable', 'This page is unreachable'),
(lid, 'web.editor.element.id', 'Id'),
(lid, 'web.myaccount.myapps.settings.label', '{0} Setup'),
(lid, 'web.session.invalid.title', 'Invalid Session'),
(lid, 'web.session.invalid.message', 'Your session has expired or is invalid'),
(lid, 'web.timeout.dialog.title', 'Inactive Session'),
(lid, 'web.timeout.dialog.message', 'Your session has been inactive and might have expired'),
(lid, 'web.ajax.error', 'Error in Ajax request: {0}'),
(lid, 'web.ajax.status', 'Ajax Request Status: {0}'),
(lid, 'web.ajax.unauthorized', 'Unauthorized'),
(lid, 'web.ajax.forbidden', 'Forbidden'),
(lid, 'web.ajax.unreachable', 'Can''t connect to server'),
(lid, 'web.ajax.unavailable', 'Server temporarily unavailable'),
(lid, 'web.home.data.import', 'Import Data'),
(lid, 'web.dataimport.label', 'CSV data import'),
(lid, 'web.dataimport.lookuptable.name.label', 'Table Name'),
(lid, 'web.dataimport.csv.file.label', 'CSV File'),
(lid, 'web.dataimport.file.label', 'File'),
(lid, 'web.data.import.success.title', 'Data successfully imported'),
(lid, 'web.data.import.success.message', 'The table {0} was created with the CSV data'),
(lid, 'web.data.import.error.row.label', 'Error in row: Field {0}, value {1}, with error {2}'),
(lid, 'web.data.import.error.emptyTableName', 'Table name is empty'),
(lid, 'web.data.import.error.emptyColumnName', 'Error on header {0} . It is not allowed to have an empty column name'),
(lid, 'web.data.import.error.columnNameError', 'Error on header {0} . It is not allowed to have a column with "." (dots) '),
(lid, 'web.data.import.important.title', 'Important'),
(lid, 'web.data.import.important.msg1', 'Please include column names in the first line'),
(lid, 'web.data.import.important.msg2', 'The only supported column separator is currently a comma ","'),
(lid, 'web.dataimport.lookuptable.', ''),
(lid, 'web.dataimport.lookuptable.qualifier.all', 'All'),
(lid, 'web.dataimport.lookuptable.qualifier.none', 'None'),
(lid, 'web.dataimport.lookuptable.qualifier.label', 'Text qualifiers'),
(lid, 'web.dataimport.lookuptable.delimiter.label', 'Delimiter'),
(lid, 'web.dataimport.lookuptable.delimiter.tab', 'Tab'),
(lid, 'web.dataimport.lookuptable.delimiter.semicolon', 'Semicolon'),
(lid, 'web.dataimport.lookuptable.delimiter.colon', 'Colon'),
(lid, 'web.dataimport.lookuptable.delimiter.comma', 'Comma'),
(lid, 'web.dataimport.lookuptable.delimiter.space', 'Space'),
(lid, 'web.dataimport.lookuptable.columnheader.label', 'Column header'),
(lid, 'web.dataimport.lookuptable.importButton.label', 'Import'),
(lid, 'web.dataimport.lookuptable.columnheader.usefirstrow', 'Use first row'),
(lid, 'web.dataimport.lookuptable.chooseFile', 'Choose a File'),
(lid, 'web.dataimport.lookuptable.preview', 'Preview'),
(lid, 'web.dataimport.lookuptable.maxColumns', 'The maximum number of columns is {0}'),
(lid, 'web.controller.id.invalid', 'Invalid ID'),
-- Toolbox
(lid, 'web.toolbox.project.create', 'Create Project'),
(lid, 'web.toolbox.form.create', 'Create Form'),
(lid, 'web.toolbox.weditor.open', 'Open Designer'),
--System
(lid, 'web.system', 'System Admin'),
-- Processes
(lid, 'web.home.v2.processes', 'Processes'),
(lid, 'web.home.v2.processesManager', 'Process Manager'),
(lid, 'web.processes.home', 'Home'),
(lid, 'web.processes.toolbox.newProcessItem', 'Create Item'),
(lid, 'web.processes.toolbox.newPool', 'Create Pool'),
(lid, 'web.processes.toolbox.newForm', 'Create Form'),
(lid, 'web.processes.toolbox.newProject', 'Create Project'),
-- Application management
(lid, 'web.application_management.toolbox.newUser', 'Create User'),
(lid, 'web.application_management.toolbox.newDevice', 'Add Device'),
(lid, 'web.application_management.toolbox.newProject', 'Create Project'),
(lid, 'web.application_management.toolbox.newForm', 'Create Form'),
(lid, 'mobile.login.controller.invalidlogin', 'Invalid User'),
(lid, 'web.multiselect.invalidId', 'Invalid id for the widget'),
(lid, 'web.multiselect.selectAll', 'Select All'),
(lid, 'web.multiselect.unselectAll', 'Unselect All'),
(lid, 'web.multiselect.filter', 'Search...'),
(lid, 'web.usersAndGroups.toolbox.newUser', 'Add User'),
(lid, 'web.usersAndGroups.toolbox.newGroup', 'Create Group'),
(lid, 'web.grid.row.edit', 'Edit'),
(lid, 'web.grid.row.delete', 'Delete'),
(lid, 'web.grid.users.row.resetPassword', 'Reset Password'),
(lid, 'web.grid.users.row.deviceDetails', 'Associated Devices'),
(lid, 'web.grid.users.row.cancelInvitation', 'Cancel invitation'),
(lid, 'web.grid.users.row.resendInvitation', 'Send another invitation'),
(lid, 'web.dialog.buttons.ok', 'OK'),
(lid, 'web.dialog.buttons.cancel', 'Cancel'),
(lid, 'web.dialog.buttons.yes', 'Yes'),
(lid, 'web.dialog.buttons.no', 'No'),
(lid, 'web.usersAndGroups.deleteGroup.confirm', 'Do you want to delete the group {0}?'),
(lid, 'web.usersAndGroups.deleteUser.confirm', 'Do you want to delete the user {0}?'),
(lid, 'web.usersAndGroups.cancelInvitation.confirm', 'Do you want to cancel the invitation to {0}'),
(lid, 'web.usersAndGroups.users.grid.title', 'Users in group {0}'),
(lid, 'web.content.invalid', 'Invalid input content'),
(lid, 'web.content.invalid.title', 'Invalid'),
(lid, 'admin.cruds.user.delete.ok.title', 'User deleted'),
(lid, 'admin.cruds.user.delete.error.title', 'Error while deleting user'),
(lid, 'admin.cruds.user.presave.confirm.newUser', 'Do you wish to send {0} an invitation to join Captura and {1}?'),
(lid, 'admin.cruds.user.presave.confirm.addUser', '{0} is already in Captura, invite the user to join {1}?'),
(lid, 'admin.cruds.user.save.cancelled.title', 'Canceled'),
(lid, 'admin.cruds.user.save.cancelled', 'User was not saved'),
(lid, 'web.application.settings.nameInUse', 'Sorry, an application with the same name already exists. Please choose another name.'),
(lid, 'web.application.settings.nameInUse.title', 'Invalid name'),
(lid, 'web.account.recovery.title', 'Have you forgotten your password?'),
(lid, 'web.account.recovery.message', 'Please enter the email address of your Captura''s account.'),
(lid, 'web.account.recovery.mail.placeholder', 'Your account''s email'),
(lid, 'web.account.recovery.mail.continue', 'Continue'),
(lid, 'web.new-user.mail.label', 'mail'),
(lid, 'web.new-user.mail.placeholder', 'User''s email address'),
(lid, 'web.new-user.username.placeholder', 'User''s username'),
(lid, 'web.new-user.mail.next', 'Next'),
(lid, 'web.new-user.alreadyExists', 'An account for {0} already exists on the system <br/><i class="icon-info-sign"></i> <strong>If you proceed an invitation will be sent to the user to join this application.</strong>'),
(lid, 'web.new-user.addDirectly.alreadyExists', 'An account for {0} already exists on the system <br/><i class="icon-info-sign"></i> <strong>If you proceed the user will be directly joined to this application.</strong>'),
(lid, 'web.new-user.addNewAccount', 'An account will be created for {0}. Please fill in the information.<br/> <i class="icon-info-sign"></i> <strong>The user will receive an activation email before he can login</strong>'),
(lid, 'web.new-user.addDirectly.addNewAccount', 'An account will be created for {0}. Please fill in the information.<br/> <i class="icon-info-sign"></i> <strong>The user will be directly added to this application</strong>'),
(lid, 'web.new-user.mail.clear', 'Clear'),
(lid, 'web.new-user.cancel', 'Cancel'),
(lid, 'web.new-user.alreadyInApp', '<i class="icon-exclamation-sign"></i> <strong>{0} has already been invited or is a member of the application</strong>'),
(lid, 'web.new-user.assignPassword', 'Assign a password to the user'),
(lid, 'web.new-user.userAssignsHisPassword', 'The user should assign his/her password later (Instructions will be sent via Email)'),
(lid, 'web.admin.home.activation', 'Activate/Deactivate application'),
(lid, 'web.admin.home.activation.confirmation', 'Are you sure you want to activate application: '),
(lid, 'web.admin.home.activation.desconfirmation', 'Are you sure you want to deactivate application: '),
(lid, 'web.admin.home.onlyActive', 'Only Active'),
(lid, 'web.admin.home.totalApps', 'Total Apps'),
(lid, 'web.admin.home.activeApps', 'Active Apps'),
(lid, 'web.admin.home.inactiveApps', 'Inactive Apps'),
(lid, 'web.home.admin.devices.field.release', 'OS Release'),
-- Authorization Group Names
(lid, 'authorizationGroup.system.label', 'System'),
(lid, 'authorizationGroup.application.label', 'Application'),
(lid, 'authorizationGroup.project.label', 'Project'),
(lid, 'authorizationGroup.form.label', 'Form'),
(lid, 'authorizationGroup.pool.label', 'Pool'),
(lid, 'authorizationGroup.toolbox.label', 'Toolbox access'),
(lid, 'authorizationGroup.menu.label', 'Menu access'),
(lid, 'authorizationGroup.userAccess.label', 'User access'),
(lid, 'authorizationGroup.connector.label', 'Connector Repository'),
(lid, 'authorizationGroup.REST.label', 'Lookup Tables'),
-- Authorization Names and descriptions
(lid, 'application.config.label', 'Configure Application'),
(lid, 'application.config.description', 'Authorization that allows the user to change the app settings'),
(lid, 'application.project.cancreate.label', 'Create Projects'),
(lid, 'application.project.cancreate.description', 'Allows a user to create projects'),
(lid, 'application.pool.cancreate.label', 'Create Pool'),
(lid, 'application.pool.cancreate.description', 'Authorization that allows a user to create a pool'),
(lid, 'application.user.list.label', 'List Users'),
(lid, 'application.user.list.description', 'Authorizations that allow a user to search other existing users'),
(lid, 'application.user.cancreate.label', 'Create Users'),
(lid, 'application.user.cancreate.description', 'Authorization that allow a user to create another user'),
(lid, 'application.user.edit.label', 'Edit Users'),
(lid, 'application.user.edit.description', 'Authorization that allow a user to edit another user'),
(lid, 'application.user.delete.label', 'Delete Users'),
(lid, 'application.user.delete.description', 'Authorization that allow a user to delete another user'),
(lid, 'application.group.list.label', 'List Groups'),
(lid, 'application.group.list.description', 'Authorization that allow a user to search existing groups'),
(lid, 'application.group.cancreate.label', 'Create Groups'),
(lid, 'application.group.cancreate.description', 'Authorization that allow a user to create groups'),
(lid, 'application.group.edit.label', 'Edit Groups'),
(lid, 'application.group.edit.description', 'Authorization that allow a user to edit groups'),
(lid, 'application.group.delete.label', 'Delete Groups'),
(lid, 'application.group.delete.description', 'Authorization that allow a user to delete groups'),
(lid, 'application.role.list.label', 'List Roles'),
(lid, 'application.role.list.description', 'Authorization that allow a user to search existing roles'),
(lid, 'application.role.edit.label', 'Edit Role'),
(lid, 'application.role.edit.description', 'Authorization that allow a user to edit roles'),
(lid, 'application.role.cancreate.label', 'Create Role'),
(lid, 'application.role.cancreate.description', 'Authorization that allow a user to create roles'),
(lid, 'application.role.administration.label', 'Roles Administration'),
(lid, 'application.role.administration.description', 'Authorization that allow a user to create,edit,delete and configure roles'),
(lid, 'application.workflow.administration.label', 'Workflow Administration'),
(lid, 'application.workflow.administration.description', 'Authorization that allow a user to configure workflow'),
(lid, 'application.project.list.label', 'List Projects'),
(lid, 'application.project.list.description', 'Allows to see the project list in the Process Manager'),
(lid, 'application.form.list.label', 'List Forms'),
(lid, 'application.form.list.description', 'Allows to see the Form list in the Process Manager'),
(lid, 'application.pool.list.label', 'List Pools'),
(lid, 'application.pool.list.description', 'Allows to see the pool list in the Process Manager'),
(lid, 'application.processItem.list.label', 'List Items'),
(lid, 'application.processItem.list.description', 'Allows to see the item list in the Process Manager'),
(lid, 'application.processItem.create.label', 'Create Labels of Items'),
(lid, 'application.processItem.edit.label', 'Edit Labels of Items'),
(lid, 'application.lookupTable.create.label', 'Create Lookup Table'),
(lid, 'application.lookupTable.create.description', 'Allows to create a lookup table inside an application'),
(lid, 'application.lookupTable.edit.label', 'Edit Lookup Table'),
(lid, 'application.lookupTable.edit.description', 'Allows to edit the lookup table and its data, and also remove lookup tables'),
(lid, 'application.lookupTable.read.label', 'Read Lookup Table'),
(lid, 'application.lookupTable.read.description', ' Allows to read the content of a lookup table'),
(lid, 'application.lookupTable.administration.label', 'Lookup Table'),
(lid, 'application.lookupTable.administration.description', 'Grants access to create,edit and delete lookup tables. In addition, allows the import of data from CSV files'),
(lid, 'application.diassociateDevice.label', 'Diassociate Devices'),
(lid, 'application.diassociateDevice.description', ' Allows to diassociate devices from other users'),
(lid, 'lookupTable.delete.confirmation.title', 'Lookup table delete'),
(lid, 'lookupTable.delete.confirmation.message', 'Do you want to delete the lookup table ?'),
(lid, 'lookupTable.definition.identifier.duplicate', 'The identifier {0} already exists. Please use another one'),
(lid, 'lookupTable.definition.max_fields', 'The maximum number of fields or columns of a lookup table is {0}'),
(lid, 'application.menu.processManager.label', 'Process Manager'),
(lid, 'application.menu.processManager.description', 'Allows to access the Process Manager Page'),
(lid, 'application.menu.dataImport.label', 'Data Import'),
(lid, 'application.menu.dataImport.description', 'Allows to access the Data Import Page'),
(lid, 'application.menu.roles.label', 'Roles'),
(lid, 'application.menu.roles.description', 'Allows to access the Roles Page'),
(lid, 'application.menu.usersAndGroups.label', 'Users and Groups'),
(lid, 'application.menu.usersAndGroups.description', 'Allows to access the Users and Groups Page'),
(lid, 'application.menu.devices.label', 'Devices'),
(lid, 'application.menu.devices.description', 'Allows to access the Devices Page'),
(lid, 'application.menu.showData.label', 'Show Data'),
(lid, 'application.menu.showData.description', 'Allows to access the Show Data Page'),
(lid, 'application.menu.config.label', 'Application Settings'),
(lid, 'application.menu.config.description', 'Allows to access the Application Settings Page'),
(lid, 'application.menu.licenses.label', 'Licenses'),
(lid, 'application.menu.licenses.description', 'Allows to access the Application Licenses Page'),
(lid, 'application.menu.lookupTables.label', 'Lookup Tables'),
(lid, 'application.menu.lookupTables.description', 'Allows to access the Lookup tables Page'),
(lid, 'application.toolbox.project.new.label', 'Create Project'),
(lid, 'application.toolbox.project.new.description', 'Allows to create a project from the toolbox'),
(lid, 'application.toolbox.form.new.label', 'Create Form'),
(lid, 'application.toolbox.form.new.description', 'Allows to create a Form from the toolbox'),
(lid, 'application.toolbox.pool.new.label', 'Create Pool'),
(lid, 'application.toolbox.pool.new.description', 'Allows to create a pool from the toolbox'),
(lid, 'application.toolbox.processItem.new.label', 'Create Item'),
(lid, 'application.toolbox.processItem.new.description', 'Allows to create an item from the toolbox'),
(lid, 'application.toolbox.user.new.label', 'Create User'),
(lid, 'application.toolbox.user.new.description', 'Allows to create a user from the toolbox'),
(lid, 'application.toolbox.group.new.label', 'Create Group'),
(lid, 'application.toolbox.group.new.description', 'Allows to create a group from the toolbox'),
(lid, 'application.toolbox.device.new.label', 'Create Device'),
(lid, 'application.toolbox.device.new.description', 'Allows to create a device from the toolbox'),
(lid, 'project.edit.label', 'Project Configuration'),
(lid, 'project.edit.description', 'The user can change the label and description of the project, add Forms and grant authorization to users and groups'),
(lid, 'project.read.mobile.label', 'Read Project Mobile'),
(lid, 'project.read.mobile.description', 'A mobile user has authorization to see a project in the mobile device. Otherwise, the project is not visible'),
(lid, 'project.read.web.label', 'View Project'),
(lid, 'project.read.web.description', 'Allows a user to see a project in the Web application. Otherwise, the project is not visible'),
(lid, 'project.create.form.label', 'Create Forms'),
(lid, 'project.create.form.description', 'The user can create Forms inside a Project'),
(lid, 'project.delete.label', 'Delete Project'),
(lid, 'project.delete.description', 'Allows a user to delete a Project'),
(lid, 'form.edit.label', 'Form Configuration'),
(lid, 'form.edit.description', 'Allows a user to configure a Form in the Web application'),
(lid, 'form.read.web.label', 'View Forms'),
(lid, 'form.read.web.description', 'Allows a user to see a Form in the Web application. Without this authorization the user won''t see the Form in the list of Forms'),
(lid, 'form.delete.label', 'Delete Forms'),
(lid, 'form.delete.description', 'Allows a user to delete Forms'),
(lid, 'form.mobile.label', 'Mobile User'),
(lid, 'form.mobile.description', 'Allows a user to upload data from a mobile device. Without this authorization the user won''t be able to upload data from a mobile device'),
(lid, 'form.publish.label', 'Publish Forms'),
(lid, 'form.publish.description', 'Allows a user to publish Forms'),
(lid, 'form.design.label', 'Design Forms'),
(lid, 'form.design.description', 'Allows a user to design Forms using the Form Designer in the Web application'),
(lid, 'form.inputData.web.label', 'Input Data Web'),
(lid, 'form.inputData.web.description', 'A web user that has authorization to post data on a Form'),
(lid, 'form.viewReport.label', 'View Reports'),
(lid, 'form.viewReport.description', 'Allows a user to see the Report of a Form in the Web application'),
(lid, 'form.createReport.label', 'Create Reports'),
(lid, 'form.createReport.description', 'Allows a user to create Reports of a Form in the Web application'),
(lid, 'form.deleteReport.label', 'Delete Reports'),
(lid, 'form.deleteReport.description', 'Allows a user to delete Reports of a Form in the Web application'),
(lid, 'pool.read.label', 'Read Pool'),
(lid, 'pool.read.description', 'Authorization that allow a user to read pools and the items within them'),
(lid, 'pool.edit.label', 'Edit Pools'),
(lid, 'pool.edit.description', 'Authorization that allow a user to edit pools and the items within them'),
(lid, 'pool.delete.label', 'Delete Pools'),
(lid, 'pool.delete.description', 'Authorization that allow a user to delete pools and the items within them'),
(lid, 'web.processes.project.tooltip.manager', 'Project Configuration'),
(lid, 'web.processes.form.tooltip.manager', 'Form Configuration'),
(lid, 'web.processes.form.tooltip.reports', 'Show Reports'),
(lid, 'web.processes.form.tooltip.editor', 'Design Form'),
(lid, 'web.processes.pool.tooltip.manager', 'Open Pool Manager'),
(lid, 'web.processes.processitem.tooltip.manager', 'Open Item'),
(lid, 'web.editor.properties.dialogs.operators.equals', 'Equals'),
(lid, 'web.editor.properties.dialogs.operators.contains', 'Contains'),
(lid, 'web.editor.properties.dialogs.operators.distinct', 'Distinct'),
(lid, 'web.editor.properties.dialogs.selectColumn', 'Select a Column'),
(lid, 'web.editor.properties.dialogs.selectOperator', 'Select a Condition'),
(lid, 'web.editor.properties.dialogs.selectElement', 'Select an Element'),
(lid, 'web.editor.properties.dialogs.selectLookup', 'Select a Lookup table'),
(lid, 'web.editor.form.properties.provideLocation', 'Provide Location'),
(lid, 'web.editor.properties.page.navigation.label', 'Conditional jumps'),
(lid, 'web.editor.properties.page.navigation.button', 'Set conditional jumps'),
(lid, 'web.editor.properties.dialogs.page.navigation.targets.label', 'Conditional Jumps'),
(lid, 'web.editor.properties.dialogs.page.navigation.value', 'Value'),
(lid, 'web.editor.properties.dialogs.page.navigation.default.label', 'If none of the conditions above is true, then jump to page'),
(lid, 'web.editor.properties.dialogs.selectPage', 'Select a page'),
(lid, 'web.editor.properties.dialogs.page.navigation.title', 'Define conditional jumps for page : "{0}"'),
(lid, 'web.editor.properties.dialogs.page.navigation.heading', 'Define the next page jump target based on selected values'),
(lid, 'web.editor.properties.dialogs.page.navigation.explanation', 'When pressing "Next" on the device, conditions will be checked one after the other, the first being true will trigger the jump to the associated target page.'),
(lid, 'web.editor.properties.dialogs.page.navigation.notification.changes.title', 'Conditional jumps changed'),
(lid, 'web.editor.properties.dialogs.page.navigation.notification.changes.message', 'Conditional jumps for page "{0}" were changed'),
(lid, 'web.editor.properties.dialogs.page.navigation.notification.noChanges.title', 'No changes'),
(lid, 'web.editor.properties.dialogs.page.navigation.notification.noChanges.message', 'No changes for page "{0}"'),
(lid, 'web.editor.properties.dialogs.page.navigation.finalPage.notPossible.title', 'Page is final'),
(lid, 'web.editor.properties.dialogs.page.navigation.finalPage.notPossible', 'Page is final, conditional jumps are not possible'),
(lid, 'web.editor.properties.dialogs.page.navigation.makefinal', 'If this page is made final, then the jumps from this page will be discarded. Do you want to proceed?'),
(lid, 'web.editor.properties.dialogs.page.navigation.makefinal.title','Page with conditional jumps'),
(lid, 'web.editor.properties.dialogs.defaultvalue.title', 'Default value of "{0}"'),
(lid, 'web.editor.properties.dialogs.defaultvalue.heading', 'Set dynamically the default value of this element based on values of other elements'),
(lid, 'web.editor.properties.dialogs.defaultvalue.section1.explanation', 'Select the Lookup Table and Column from which the default value will be picked'),
(lid, 'web.editor.properties.dialogs.defaultvalue.section2.explanation', 'Define matching condition(s) for selecting the default value'),
(lid, 'web.editor.properties.dialogs.dropdown.filters.selectLookupFirst', 'Please, select a lookup table first'),
(lid, 'web.editor.properties.dialogs.dropdown.filters.heading', 'Select dynamically the data available in this element based on the value of other elements'),
(lid, 'web.editor.properties.dialogs.dropdown.filters.explanation', 'Show only data that fulfills all of the following condition(s)'),
(lid, 'web.editor.properties.dialogs.dropdown.filters.title', 'Filter for data available in "{0}"'),
(lid, 'web.editor.properties.defaultvalue.static', 'Static'),
(lid, 'web.editor.properties.defaultvalue.dynamic', 'Lookup Table'),
(lid, 'web.editor.properties.manage.publication', 'Manage Publication'),
(lid, 'web.editor.save.nofinalPage.title', 'No final page'),
(lid, 'web.editor.save.nofinalPage.message', 'There''s no final page. Do you want to make the page "{0}" final?'),
(lid, 'web.editor.properties.staticDefaultValueWillBeLost', 'The element has a static default value, if you continue it will be overridden. Do you wish to continue?'),
(lid, 'web.editor.properties.dynamicDefaultValueWillBeLost', 'The element has a dynamic default value, if you continue it will be overridden. Do you wish to continue?'),
(lid, 'web.editor.properties.dialogs.checkFilters', 'Please check the filters'),
(lid, 'services.commandService.validation.integerField.minValue.numeric', 'The property min value of the element {0} must be a numeric value'),
(lid, 'services.commandService.validation.integerField.maxValue.numeric', 'The property min value of the element {0} must be a numeric value'),
(lid, 'services.commandService.validation.dropdown.noLookupTable', '{0} has source set as Lookup Table, but no table was selected'),
(lid, 'services.commandService.validation.dropdown.noLookupLabel', '{0} has source set as Lookup Table, but no field was selected as label'),
(lid, 'services.commandService.validation.dropdown.noLookupValue', '{0} has source set as Lookup Table, but no field was selected as value'),
(lid, 'services.commandService.validation.dropdown.noEmbeddedData', '{0} has no embedded data'),
(lid, 'services.commandService.validation.form.isEmpty','Form cannot be emtpy'),
(lid, 'web.editor.properties.dialogs.dropdown.lookupColumn', 'Lookup Column'),
(lid, 'web.editor.properties.dialogs.dropdown.condition', 'Condition'),
(lid, 'web.editor.properties.dialogs.dropdown.valueOf', 'Value Of'),
(lid, 'web.editor.properties.dialogs.defaultvalue.lookupColumn', 'Lookup Column'),
(lid, 'web.editor.properties.dialogs.defaultvalue.condition', 'Condition'),
(lid, 'web.editor.properties.dialogs.defaultvalue.valueOf', 'Value of'),
(lid, 'web.editor.properties.dialogs.page.navigation.element', 'Element'),
(lid, 'web.editor.properties.dialogs.page.navigation.condition', 'Condition'),
-- (lid, 'web.editor.properties.dialogs.page.navigation.value', 'Value'),
(lid, 'web.editor.properties.dialogs.page.navigation.targetPage', 'Target Page'),
(lid, 'web.data.input.file.csvTooBig.title', 'CSV File too Big'),
(lid, 'web.data.input.file.csvTooBig.message', 'Currently we do not support CSV files with more than {0} lines'),
--My account page
(lid, 'myAccount.title', 'My account'),
(lid, 'myAccount.language', 'Preferred Language'),
(lid, 'myAccount.changePreferences', 'Change preferences'),
(lid, 'myAccount.success.title', 'Settings saved'),
(lid, 'myAccount.success.languageChangedMessage', 'Your default language has changed. You will be redirected to the home page to load the changes'),
(lid, 'myAccount.success.message', 'Settings saved'),
(lid, 'myAccount.downloadCRConfiguration', 'Download Connector Repository configuration'),
(lid, 'myAccount.defaultApplication', 'Default Application'),
(lid, 'myAccount.userData.title', 'User Data'),
(lid, 'myAccount.userData.success.message', 'User Data has changed. You will be redirected to the home page to load the changes'),
(lid, 'web.data.upload.serverError', 'Server error'),
(lid, 'web.data.upload.interruptException', 'Interrupt Exception'),
(lid, 'web.editor.properties.dialogs.noMorePages.title', 'No more pages'),
(lid, 'web.editor.properties.dialogs.noMorePages.message', 'No more pages to jump to'),
(lid, 'web.editor.enable_location', 'Click to enable location'),
(lid, 'web.editor.disable_location', 'Click to disable location'),
-- Uncaught Exception Views
(lid, 'admin.views.uncaughtException.cols.id', 'Exc No'),
(lid, 'admin.views.uncaughtException.cols.exceptionType', 'Exception Type'),
(lid, 'admin.views.uncaughtException.cols.offendingClass', 'Offending Class'),
(lid, 'admin.views.uncaughtException.cols.userId', 'User ID'),
(lid, 'admin.views.uncaughtException.cols.inserTime', 'Insert Time'),
(lid, 'admin.views.uncaughtException.cols.stackTrace', 'Stack Trace'),
(lid, 'admin.views.uncaughtException.cols.url', 'Url'),
(lid, 'admin.views.uncaughtException.cols.userAgent', 'User Agent'),
(lid, 'admin.views.uncaughtException.msg.noStackTrace', 'no Stack Trace'),
(lid, 'web.invitation.proceed_to', 'Please proceed to '),
(lid, 'web.invitation.login', 'login'),
(lid, 'web.password_reset.done', 'DONE!'),
--No authorization
(lid, 'web.noUserRights', 'This user does not have access to any functionality. Please contact the administrator'),
(lid, 'web.sysadmin.home.title', 'System Administrator Home'),
(lid, 'web.admin.home.title', 'App Admin'),
(lid, 'web.root.home.toolbox.createApp', 'Create Additional Application'),
(lid, 'web.root.home.toolbox.reloadParameters', 'Reload Parameters'),
(lid, 'web.root.home.toolbox.reloadi18n', 'Reload i18n'),
(lid, 'web.admin.home.breadCrumb', 'App Admin'),
(lid, 'web.admin.home.enterApp', 'Go to application'),
(lid, 'web.generic.unknownError', 'An unexpected error occurred'),
(lid, 'web.account.recover.inactiveAccount', '<b>The account first needs to be activated.</b><br />In the first part of the registration process a mail should have been sent to you with instructions on how to activate your account. You can request that mail again. '),
(lid, 'web.account.recover.mailSent', 'Soon you should receive an email at {0}, with instructions on how to reset the account''s password'),
(lid, 'web.account.recover.invalidUser', 'User {0} doesn''t exist'),
(lid, 'web.account.recover.resendActivationMail', 'Resend activation mail'),
(lid, 'web.editor.page.contextmenu.insertPage.before', 'Insert page before'),
(lid, 'web.editor.page.contextmenu.insertPage.after', 'Insert page after'),
(lid, 'admin.cruds.form.cannot.delete.published.title', 'Form cannot be deleted'),
(lid, 'admin.cruds.form.cannot.delete.published.message', 'Form {0} cannot be deleted. It needs to be unplished first'),
--Lookups
(lid, 'web.lookup.cols.id', 'ID'),
(lid, 'web.lookup.cols.label', 'Name'),
(lid, 'web.lookup.cols.isRemote', 'Remote'),
(lid, 'web.lookup.cols.remoteIdentifier', 'Remote Identifier'),
(lid, 'web.lookup.model.remote.true', 'Yes'),
(lid, 'web.lookup.model.remote.false', 'No'),
(lid, 'web.lookup.error.inuse.title', 'The lookup table is in use'),
(lid, 'web.lookup.actions.delete.tooltip', 'Delete the current lookup table'),
(lid, 'web.lookup.actions.view.tooltip', 'View the data of this lookup table'),
(lid, 'web.home.data.lookup_table_data', 'Lookup Table data'),
-- root profile
(lid, 'web.root.createApp.success.title', 'Application created'),
(lid, 'web.root.createApp.success.msg', 'Application {0} successfully created'),
(lid, 'web.root.createApp.error.title', 'Not created'),
(lid, 'web.root.createApp.error.message', 'Application {0} wasn''t created'),
(lid, 'web.root.appOptions.tooltip', 'Application Options'),
(lid, 'web.root.appOptions.popup', 'Application Options'),
(lid, 'web.root.appOptions.popup.workflow.label', 'Workflow'),
(lid, 'web.root.appOptions.popup.workflow.checkbox', 'Enable workflow'),
(lid, 'web.root.appOptions.popup.workflow.description', 'With the workflow you can set up states for your documents and keep track of them.'),
-- System Parameter CRUD
(lid, 'web.home.systemParameters', 'System Parameters'),
(lid, 'admin.cruds.parameter.cols.id', 'ID'),
(lid, 'admin.cruds.parameter.cols.description', 'Description'),
(lid, 'admin.cruds.parameter.cols.label', 'Label'),
(lid, 'admin.cruds.parameter.cols.type', 'Type'),
(lid, 'admin.cruds.parameter.cols.value', 'Value'),
(lid, 'admin.cruds.parameter.type.string', 'String'),
(lid, 'admin.cruds.parameter.type.boolean', 'Boolean'),
(lid, 'admin.cruds.parameter.type.long', 'Long'),
(lid, 'admin.cruds.parameter.type.list', 'List'),
(lid, 'admin.cruds.parameter.form.addCaption', 'Add System Parameter'),
(lid, 'admin.cruds.parameter.form.editCaption', 'Edit System Parameter'),
(lid, 'admin.cruds.parameter.saved.title', 'Save Parameter'),
(lid, 'admin.cruds.parameter.saved.message', 'Parameter saved successfully'),
(lid, 'admin.cruds.parameter.deleted.message', 'Parameter deleted sucessfully'),
(lid, 'admin.cruds.parameter.deleted.title', 'Delete Paramter'),
(lid, 'admin.cruds.parameter.title', 'System Parameters'),
(lid, 'web.root.home.toolbox.pendingRegistrations', 'Pending Activations'),
(lid, 'web.root.pendingRegistration.grid.caption', 'Registrations awaiting activation'),
(lid, 'web.root.pendingRegistration.grid.id', 'ID'),
(lid, 'web.root.pendingRegistration.grid.mail', 'Mail'),
(lid, 'web.root.pendingRegistration.grid.name', 'Name'),
(lid, 'web.root.pendingRegistration.grid.lastName', 'Last name'),
(lid, 'web.root.pendingRegistration.grid.time', 'Registration time'),
(lid, 'web.root.pendingRegistration.grid.activationToken', 'Activate Account'),
(lid, 'web.root.pendingRegistration.grid.options', 'Options'),
(lid, 'web.root.pendingRegistration.accept', 'Activate'),
(lid, 'web.root.pendingRegistration.cancelled.title', 'Cancelled'),
(lid, 'web.root.pendingRegistration.cancelled.message', 'Pending activation cancelled'),
(lid, 'web.root.pendingRegistration.not_cancelled.title','Not Cancelled'),
(lid, 'web.root.pendingRegistration.not_cancelled.message', 'Pending activation id:{0} was not cancelled'),
(lid, 'web.root.createApp.owner','Owner'),
(lid, 'web.root.home.toolbox.register', 'Register user'),
(lid, 'web.controller.register.awaiting_approval', 'Your registration needs to be approved by a system administrator'),
(lid, 'web.controller.register.awaiting_approval_again', 'We already have a registration request on your behalf. Your registration needs to be approved by a system administrator'),
(lid, 'web.controller.register.by_approval_only', 'Account registration is done only by approval of a system administrator'),
(lid, 'web.editor.properties.dropdown.date_not_allowed_as_value', '{0} is of type "Date" and cannot be assigned as value of a dropdown'),
(lid, 'web.settings.applicationLicense', 'Application license'),
(lid, 'web.settings.applicationLicense.applicationId', 'Application ID'),
(lid, 'web.settings.applicationLicense.maxDevices', 'Maximum number of mobile devices per user'),
(lid, 'web.settings.applicationLicense.maxUsers', 'Maximum number of users'),
(lid, 'web.settings.applicationLicense.owner', 'Application Owner'),
(lid, 'web.settings.applicationLicense.validUntil', 'Valid until'),
(lid, 'web.settings.applicationLicense.licenseFile', 'License File'),
(lid, 'web.settings.applicationLicense.upload', 'Upload License'),
(lid, 'web.settings.applicationLicense.licenseUpload', 'License Uploaded'),
(lid, 'web.settings.applicationLicense.invalid', 'The license is not valid for this application'),
(lid, 'web.settings.applicationLicense.validUntil.unlimited', 'No limit'),
(lid, 'web.settings.preferences', 'Preferences'),
(lid, 'web.settings.preferences.applicationName', 'Application Name'),
(lid, 'web.settings.preferences.defaultLanguage', 'Default Language'),
(lid, 'web.settings.aplicationInfo', 'Application Information'),
(lid, 'web.settings.aplicationInfo.owner_name', 'Application owner name'),
(lid, 'web.settings.aplicationInfo.owner_mail', 'Application owner email'),
(lid, 'web.settings.aplicationInfo.appId', 'Application Id'),
(lid, 'web.settings.preferences.saved.title','Preferences saved'),
(lid, 'web.settings.license.invitation','Would you like to upload a new license ?'),
(lid, 'web.settings.preferences.saved.message','Application preferences were successfully saved'),
(lid, 'web.application.application.name.label', 'Application name'),
(lid, 'web.root.max_apps.reached', 'The server reached its maximum of {0} applications. Contact your salesman to buy a larger license.'),
(lid, 'web.root.app.duplicate', 'An application with the name "{0}", already exists'),
(lid, 'services.commandService.validation.flow.invalidNumericValue', 'Invalid value on page {0} navigation rules for item {1}'),
(lid, 'web.editor.properties.dialogs.operators.greater_than', 'Greater than'),
(lid, 'web.editor.properties.dialogs.operators.less_than', 'Less than'),
(lid, 'web.controller.register.notification.subject', 'New Registration'),
(lid, 'web.controller.register.notification.body', 'A new account has been registered for the user {0} {1} with email {2}'),
(lid, 'web.controller.activation.tooManyApplications', 'The account couldn''t be activated because the server has reached its application limit'),
(lid, 'web.controller.activation.tooManyApplications.hint', 'The issue has been reported to the server admin. We will contact you as soon as soon as possible'),
(lid, 'web.controller.register.notification.fail.tooMayApplications.title', 'Registration failed - too many applications'),
(lid, 'web.controller.register.notification.fail.tooMayApplications.subject', 'The user {0} {1} ({2}) tried to create a new application, but the application limit on the server has been reached and no more applications can be created<br/><br/>Please contact support at mf@mf.com to enable more applications<br/><br/>Regards,<br/><br/>The Captura team'),
(lid, 'web.home.application.license.aboutToExpire', 'The Application''s license is about to Expire'),
(lid, 'web.home.application.license.expired', 'The Application''s license has expired'),
(lid, 'admin.cruds.user.owner_cant_deleted.title', 'User cannot be deleted'),
(lid, 'admin.cruds.user.owner_cant_deleted.message', '{0} is the application owner and cannot be deleted'),
(lid, 'web.application.state.message', 'Activation status was succesfully changed'),
(lid, 'web.application.state.title', 'Activation was changed.'),
(lid, 'web.root.home.toolbox.serverInfoPopup', 'Server License properties'),
(lid, 'web.root.home.toolbox.serverInfo', 'Server Info'),
(lid, 'web.root.license.serverId', 'Server Identifier'),
(lid, 'web.root.license.creationDate', 'Creation Date'),
(lid, 'web.root.license.validDays', 'Valid Days'),
(lid, 'web.root.license.expirationDate', 'Expiration Date'),
(lid, 'web.root.license.maxApplications', 'Maximum number of applications allowed'),
(lid, 'web.root.license.applicationsInUse', 'Number of applications in use'),
(lid, 'web.root.license.applicationsRemaining', 'Applications available'),
(lid, 'web.root.license.application.validDays', 'Default application valid days'),
(lid, 'web.root.license.application.maxDevices', 'Default application maximum devices'),
(lid, 'web.root.license.application.maxUsers', 'Default application maximum users'),
(lid, 'web.root.license.otherProperties', 'Other Properties'),
(lid, 'web.home.admin.devices.removeDevice', 'Remove Device'),
(lid, 'web.home.admin.devices.blacklistDevice', 'Blacklist Device'),
(lid, 'web.devices.blacklist.caption', 'Devices'' blacklist'),
(lid, 'web.devices.removeFromBlackList', 'Remove from blacklist'),
(lid, 'admin.cruds.user.blacklist.warning.title', 'Add device to blacklist?'),
(lid, 'admin.cruds.user.blacklist.warning.msg', 'The device will be removed and added to a blacklist'),
(lid, 'web.home.admin.devices.devicePopup.title', 'Devices of {0} {0}'),
(lid, 'web.home.admin.devices.addToBlacklist.success.msg', 'The device was added to the blacklist'),
(lid, 'web.home.admin.devices.addToBlacklist.success.title', 'Added'),
(lid, 'web.home.admin.devices.addToBlacklist.fail.msg', 'The device couldn''t be added to the blacklist'),
(lid, 'web.home.admin.devices.addToBlacklist.fail.title', 'Failed'),
(lid, 'web.home.admin.devices.removeFromBlacklist.success.title', 'Removed'),
(lid, 'web.home.admin.devices.removeFromBlacklist.success.msg', 'The device was removed to the blacklist'),
(lid, 'web.home.admin.devices.removeFromBlacklist.fail.title', 'Failed'),
(lid, 'web.home.admin.devices.removeFromBlacklist.fail.msg', 'The device couldn''t be added to the blacklist'),
-- MESSAGES FROM THE WEB API. SHOULD BE USED ONLY BY THE ENDPOINTS --
(lid, 'web.api.exception.standardMessage', 'Sorry, an internal server error ocurred'),
(lid, 'web.api.authentication.verification.blacklisted', 'Sorry, your device has been blacklisted'),
(lid, 'web.api.authentication.licenseException', 'Sorry, there''s a problem with the server''s license. Please contact the administrator'),
(lid, 'web.api.authentication.invalidUser', 'Invalid User'),
(lid, 'web.api.authentication.passwordIsNull', 'Password in null'),
(lid, 'web.api.authentication.userIsNull', 'User is null'),
(lid, 'web.api.authorization.notMember', 'Sorry, you are not a member of the application'),
(lid, 'web.api.authorization.deviceNotAssociated', 'Sorry, your device doesn''t seem like a valid one. Please try login in again'),
(lid, 'web.api.authorization.inactiveApplication', 'Sorry, the application you are trying to use is inactive'),
(lid, 'web.api.authorization.licenseExpired', 'Sorry, the application''s license has expired'),
(lid, 'web.api.authorization.invalidApplication', 'Sorry, the application is invalid'),
(lid, 'web.api.documents.upload.IOExceptionInFile', 'Sorry, an error ocurred while saving the document in the server'),
-- //////////////////////////////////// --
-- missing labels in role administration --
(lid, 'application.rest.lookupTables.create.label', 'Create Lookup Tables'),
(lid, 'application.rest.lookupTables.create.description', 'Allows the client the creation of Lookup Tables'),
(lid, 'application.rest.lookupTables.list.label', 'List Lookup Tables'),
(lid, 'application.rest.lookupTables.list.description', 'Allows the client to get a list of Lookup Tables'),
(lid, 'application.rest.lookupTables.insert.label', 'Insert data'),
(lid, 'application.rest.lookupTables.insert.description', 'Allows the client to insert data in Lookp Tables'),
(lid, 'application.rest.lookupTables.modify.label', 'Modify data'),
(lid, 'application.rest.lookupTables.modify.description', 'Allows the client to modify data in Lookp Tables'),
(lid, 'application.rest.lookupTables.read.label', 'Read data'),
(lid, 'application.rest.lookupTables.read.description', 'Allows the client to read data in Lookp Tables'),
(lid, 'web.api.noauth', 'Forbidden. You don''t have the required authorization'),
(lid, 'web.admin.home.usage_statistics', 'Usage statistics'),
(lid, 'web.root.home.toolbox.dataUsage', 'Data Usage'),
(lid, 'web.root.home.toolbox.failedDocuments', 'Failed Documents'),
(lid, 'services.mail.failed_document.body', '<b>Upload description:</b><br /><br />{0}<br /><br /><b>Error description:</b><br /><br />{1}'),
(lid, 'services.mail.failed_document.subject', 'Document Failed in Captura. {0}'),
(lid, 'web.admin.failed_document.notification_disabled', 'Notifications are disabled'),
(lid, 'web.admin.failed_document.notification_enabled', 'Notifications enabled to {0}'),
(lid, 'web.home.querys.section.elementsFileNames', 'Photo file names'),
(lid, 'web.home.querys.section.elementsFileNames.help', 'Choose the file name for each photo downloaded with the ''ZIP with Photos'' option. Use [elementName] in places where an element''s value should go' ),
(lid, 'web.home.reports.xlswithphotos.tooltip', 'ZIP format with excel file and photos'),
(lid, 'web.home.querys.section.elementsFileNames.inputHelp', 'Type [ followed by the name of the element'),
(lid, 'web.generic.download', 'Download'),
(lid, 'web.home.reports.column.meta.savedAt', 'Saved in Device'),
(lid, 'web.home.reports.column.meta.state', 'State'),
(lid, 'web.generic.help', 'Help'),
(lid, 'web.generic.privacy', 'Privacy'),
(lid, 'web.generic.grid', 'Grid'),
(lid, 'web.home.reports.formView.emptyMsg', 'Select a row (double-click) in the "Grid" tab'),
(lid, 'web.home.reports.formView.showingDoc', 'Showing document');
END $$
|
/*
Navicat Premium Data Transfer
Source Server : medcon server
Source Server Type : MySQL
Source Server Version : 100138
Source Host : 192.168.161.100:3306
Source Schema : webinarsegmi
Target Server Type : MySQL
Target Server Version : 100138
File Encoding : 65001
Date: 06/04/2021 10:36:26
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for instansi
-- ----------------------------
DROP TABLE IF EXISTS `instansi`;
CREATE TABLE `instansi` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`instansi` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`created_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
`updated_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of instansi
-- ----------------------------
INSERT INTO `instansi` VALUES (1, 'Instalatur', '2021-04-05 12:06:08', '2021-04-05 12:06:08');
INSERT INTO `instansi` VALUES (2, 'Rumah Sakit', '2021-04-05 12:06:13', '2021-04-05 12:06:13');
INSERT INTO `instansi` VALUES (3, 'Mahasiswa', '2021-04-05 12:06:18', '2021-04-05 12:06:18');
-- ----------------------------
-- Table structure for perusahaan
-- ----------------------------
DROP TABLE IF EXISTS `perusahaan`;
CREATE TABLE `perusahaan` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nama` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`alamat` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`email` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`tlpn` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`hp` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`ig` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`fb` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`tw` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of perusahaan
-- ----------------------------
INSERT INTO `perusahaan` VALUES (1, 'Sinarmed Group', 'Jl. Taman Borobudur Indah Blok B No.15C Malang, Jawa Timur 65142', 'info@sinarmed.com', '0341 - 492294', '08113387052', NULL, NULL, NULL);
-- ----------------------------
-- Table structure for segmen
-- ----------------------------
DROP TABLE IF EXISTS `segmen`;
CREATE TABLE `segmen` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`segmen` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`jadwal` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`link_zoom` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL,
`status` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`created_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
`updated_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of segmen
-- ----------------------------
INSERT INTO `segmen` VALUES (1, 'Segmi', '606aaad6e8453.jpg', '<ul><li>Zoom Meeting : </li><li>Meeting ID:&nbsp;</li></ul><p>Passcode:&nbsp;</p>', '1', '2021-04-05 13:14:47', '2021-04-06 08:35:09');
-- ----------------------------
-- Table structure for sertifikat
-- ----------------------------
DROP TABLE IF EXISTS `sertifikat`;
CREATE TABLE `sertifikat` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`segmend_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`file` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`created_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
`updated_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of sertifikat
-- ----------------------------
INSERT INTO `sertifikat` VALUES (1, '2', '1', '606acc88aa612.jpg', '2021-04-05 15:38:33', '2021-04-05 15:38:33');
INSERT INTO `sertifikat` VALUES (2, '3', '1', '', '2021-04-06 09:15:01', '2021-04-06 09:15:01');
-- ----------------------------
-- Table structure for status
-- ----------------------------
DROP TABLE IF EXISTS `status`;
CREATE TABLE `status` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`status` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`created_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
`updated_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of status
-- ----------------------------
INSERT INTO `status` VALUES (1, 'aktif', '2021-04-05 13:36:26', '2021-04-05 13:36:26');
INSERT INTO `status` VALUES (2, 'tidak aktif', '2021-04-05 13:36:39', '2021-04-05 13:36:39');
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nama` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`instansi` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`jabatan` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`email` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`nohp` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`password` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`created_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
`updated_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
`status` varchar(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '1',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES (1, 'Sinarmed', 'sinarmed', NULL, 'info@sinarmed.com', '08113387052', '4f208e87dbf1f6ded475ec7a7c8dea87', '2021-04-05 11:18:42', '2021-04-05 11:24:31', '0');
INSERT INTO `user` VALUES (2, 'Gugus Darmayanto', 'Instalatur', 'IT Programmer', 'ggsd09031997@gmail.com', '08113387052', '550e1bafe077ff0b0b67f4e32f29d751', '2021-04-05 14:48:29', '2021-04-05 14:48:29', '1');
INSERT INTO `user` VALUES (3, 'Sandi Yuda Asmara', 'Karyawan', 'IT', 'sandissa.48@gmail.com', '081131105050', '14e1b600b1fd579f47433b88e8d85291', '2021-04-05 16:05:58', '2021-04-05 16:05:58', '1');
INSERT INTO `user` VALUES (4, 'fitria', 'Mahasiswa', 'teknik', 'fitri@sinarmed.com', '08113387052', '710ae8f9438fc2d7c621153bdfc9e7e5', '2021-04-06 09:28:57', '2021-04-06 09:28:57', '1');
INSERT INTO `user` VALUES (5, 'KARIEF SETIAWAN, S.Tr.Kes', 'Rumah Sakit', 'Teknisi Elektromedis', 'karief.ks@gmail.com', '081358494500', 'c2f1366c51911b52369fe27df307ff84', '2021-04-06 09:45:53', '2021-04-06 09:45:53', '1');
INSERT INTO `user` VALUES (6, 'sugino', 'Rumah Sakit', 'teknisi Gas Medis RSUP dr. Soeradji Tirtonegoro Klaten', 'ginuxginola@gmail.com', '085642044354', '020aeeaec054c58d193e3e64e076cd39', '2021-04-06 09:58:38', '2021-04-06 09:58:38', '1');
INSERT INTO `user` VALUES (7, 'Hery Tommi', 'Rumah Sakit', 'Teknisi Elektromedis', 'herytommi159@gmail.com', '087738253326', 'a8706e684a7d25687a3e3e1821c5df0c', '2021-04-06 10:02:54', '2021-04-06 10:02:54', '1');
SET FOREIGN_KEY_CHECKS = 1;
|
-- TABLES
ALTER TABLE `bx_market_files` CHANGE `size` `size` bigint(20) NOT NULL;
ALTER TABLE `bx_market_photos` CHANGE `size` `size` bigint(20) NOT NULL;
ALTER TABLE `bx_market_photos_resized` CHANGE `size` `size` bigint(20) NOT NULL;
|
INSERT INTO job_opportunity
(jo_name, description, contract_type,working_hours,salary_range_ini,salary_range_end,gender,availability,workplace_country,workplace_city,workplace_neighborhood,workplace_street,workplace_home_number,workplace_complement,workplace_zip_code,
workplace_latitude, workplace_longitude,divulgation_ini,divulgation_end)
VALUES
('Divisão9112','Desenvolvimento', 'CLT','08:00:00',530,2315,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-12-03T23:21:51.096Z','2021-01-09T21:20:38.729Z'),
('Resposta365','Desenvolvimento', 'CLT','08:00:00',288,9625,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-09-14T17:29:06.417Z','2020-10-11T15:42:45.514Z'),
('Contas2717','Desenvolvimento', 'CLT','08:00:00',234,167,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-01-03T18:13:35.523Z','2020-06-03T06:37:42.356Z'),
('Métricas9045','Desenvolvimento', 'CLT','08:00:00',459,1793,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-06-25T00:21:56.180Z','2020-11-07T05:45:05.059Z'),
('Pesquisa1580','Desenvolvimento', 'CLT','08:00:00',543,2361,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-05-07T13:42:31.017Z','2020-10-24T04:05:44.001Z'),
('Marketing6023','Desenvolvimento', 'CLT','08:00:00',790,1570,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-02-18T02:13:24.912Z','2021-07-29T21:59:06.780Z'),
('Configuração436','Desenvolvimento', 'CLT','08:00:00',238,7317,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-11-15T03:48:52.212Z','2021-11-27T02:02:44.970Z'),
('Contas4514','Desenvolvimento', 'CLT','08:00:00',802,5045,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-01-24T12:24:35.795Z','2021-10-08T01:37:42.886Z'),
('Marketing490','Desenvolvimento', 'CLT','08:00:00',49,7487,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-09-22T17:10:28.451Z','2021-05-13T16:49:39.502Z'),
('Pesquisa7102','Desenvolvimento', 'CLT','08:00:00',942,5144,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-09-20T05:07:22.403Z','2021-05-14T23:32:45.530Z'),
('Grupo5178','Desenvolvimento', 'CLT','08:00:00',102,5275,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-11-06T21:06:53.952Z','2020-06-09T16:27:23.712Z'),
('Táticas5836','Desenvolvimento', 'CLT','08:00:00',901,8938,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-11-25T00:02:47.571Z','2021-05-14T19:08:19.819Z'),
('Táticas2578','Desenvolvimento', 'CLT','08:00:00',573,4847,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-05-05T11:49:14.866Z','2021-05-17T08:09:57.130Z'),
('Identidade2463','Desenvolvimento', 'CLT','08:00:00',5,4147,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-10-22T06:31:44.471Z','2021-08-30T13:47:10.030Z'),
('Programa6238','Desenvolvimento', 'CLT','08:00:00',134,3956,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-04-01T12:39:57.010Z','2021-05-26T11:18:24.973Z'),
('Garantia4281','Desenvolvimento', 'CLT','08:00:00',896,7737,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-09-24T20:18:31.464Z','2020-05-19T16:58:44.184Z'),
('Integração9080','Desenvolvimento', 'CLT','08:00:00',566,1439,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-12-20T01:50:48.083Z','2020-06-11T11:21:20.296Z'),
('Funcionalidade6801','Desenvolvimento', 'CLT','08:00:00',927,7105,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-08-17T04:59:29.788Z','2021-12-05T09:21:05.181Z'),
('Branding7051','Desenvolvimento', 'CLT','08:00:00',97,8217,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-01-14T03:12:34.559Z','2020-05-17T13:01:50.249Z'),
('Garantia35','Desenvolvimento', 'CLT','08:00:00',137,7943,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-04-13T20:47:00.077Z','2020-05-14T19:48:38.994Z'),
('Qualidade7239','Desenvolvimento', 'CLT','08:00:00',74,2965,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-08-27T02:58:32.273Z','2021-07-07T08:39:37.038Z'),
('Implementação7886','Desenvolvimento', 'CLT','08:00:00',517,6749,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-06-01T22:22:49.872Z','2020-04-08T22:31:42.812Z'),
('Implementação8592','Desenvolvimento', 'CLT','08:00:00',881,3376,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-11-02T21:06:53.307Z','2021-07-10T07:26:40.473Z'),
('Programa8321','Desenvolvimento', 'CLT','08:00:00',534,7085,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-11-25T02:31:35.296Z','2021-01-01T19:30:19.060Z'),
('Soluções1659','Desenvolvimento', 'CLT','08:00:00',166,775,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-07-27T03:32:53.338Z','2021-06-04T06:40:54.858Z'),
('Pesquisa7779','Desenvolvimento', 'CLT','08:00:00',622,5760,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-08-02T17:48:21.415Z','2020-04-29T15:25:37.141Z'),
('Rede9652','Desenvolvimento', 'CLT','08:00:00',95,7077,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2020-01-02T15:12:27.644Z','2021-05-15T18:43:44.905Z'),
('Programa8530','Desenvolvimento', 'CLT','08:00:00',65,2599,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-01-01T16:44:35.136Z','2020-12-01T04:05:19.337Z'),
('Divisão3563','Desenvolvimento', 'CLT','08:00:00',946,7634,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-08-12T23:17:26.099Z','2021-06-23T01:41:54.020Z'),
('Mobilidade3858','Desenvolvimento', 'CLT','08:00:00',83,1301,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-11-11T04:04:22.398Z','2020-03-24T21:46:01.325Z'),
('Operações1358','Desenvolvimento', 'CLT','08:00:00',653,8884,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-05-20T06:43:04.455Z','2020-03-17T00:19:56.411Z'),
('Integração6326','Desenvolvimento', 'CLT','08:00:00',565,1939,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-06-14T14:02:56.934Z','2020-04-08T20:22:25.449Z'),
('A infraestrutura7774','Desenvolvimento', 'CLT','08:00:00',532,4275,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-10-18T17:54:34.340Z','2020-07-08T11:16:43.405Z'),
('Implementação2774','Desenvolvimento', 'CLT','08:00:00',443,5848,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-12-30T06:36:44.444Z','2020-02-15T02:03:47.994Z'),
('Diretivas2981','Desenvolvimento', 'CLT','08:00:00',297,9926,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-05-21T01:26:39.150Z','2020-03-22T09:52:24.017Z'),
('Mobilidade2705','Desenvolvimento', 'CLT','08:00:00',202,5979,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-08-28T06:42:10.262Z','2021-11-23T06:58:47.489Z'),
('Intranet4444','Desenvolvimento', 'CLT','08:00:00',615,505,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-01-18T13:17:16.904Z','2021-05-26T19:22:39.241Z'),
('Integração1365','Desenvolvimento', 'CLT','08:00:00',288,1271,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-01-08T22:57:15.788Z','2021-09-05T16:24:33.590Z'),
('Comunicações3629','Desenvolvimento', 'CLT','08:00:00',474,5488,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-05-07T20:16:54.262Z','2020-04-28T20:59:12.833Z'),
('Resposta9350','Desenvolvimento', 'CLT','08:00:00',556,2631,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-08-24T01:40:36.816Z','2021-12-29T03:06:58.259Z'),
('Rede4619','Desenvolvimento', 'CLT','08:00:00',236,8826,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-08-30T06:53:03.625Z','2020-04-01T10:45:14.516Z'),
('Operações5748','Desenvolvimento', 'CLT','08:00:00',164,6552,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-11-26T00:47:27.006Z','2021-05-11T02:10:02.603Z'),
('Fatores147','Desenvolvimento', 'CLT','08:00:00',775,9422,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-10-13T20:32:27.789Z','2021-03-18T05:23:54.155Z'),
('Programa4628','Desenvolvimento', 'CLT','08:00:00',436,4676,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-09-26T23:06:48.548Z','2021-08-25T10:25:40.285Z'),
('Garantia9373','Desenvolvimento', 'CLT','08:00:00',437,6147,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-09-06T02:26:34.889Z','2020-06-06T11:36:57.769Z'),
('Táticas9558','Desenvolvimento', 'CLT','08:00:00',336,304,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-09-17T22:56:15.913Z','2020-07-22T09:47:48.707Z'),
('Grupo3120','Desenvolvimento', 'CLT','08:00:00',670,5484,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-10-28T06:54:39.150Z','2020-06-02T21:13:11.097Z'),
('Operações3145','Desenvolvimento', 'CLT','08:00:00',682,1559,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-01-02T05:20:45.411Z','2020-09-30T07:34:29.442Z'),
('Integração588','Desenvolvimento', 'CLT','08:00:00',57,202,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-01-10T15:15:34.219Z','2020-08-09T23:21:21.884Z'),
('Soluções6034','Desenvolvimento', 'CLT','08:00:00',82,1151,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-05-14T01:50:59.542Z','2020-04-28T10:45:35.117Z'),
('Mobilidade6842','Desenvolvimento', 'CLT','08:00:00',362,2815,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-02-19T00:04:12.719Z','2020-03-23T22:05:15.072Z'),
('Prestação de contas6422','Desenvolvimento', 'CLT','08:00:00',71,9458,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-09-19T23:51:37.470Z','2021-02-21T20:04:29.486Z'),
('Implementação449','Desenvolvimento', 'CLT','08:00:00',192,8659,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-12-06T23:17:01.863Z','2021-07-09T08:37:30.126Z'),
('Usabilidade5332','Desenvolvimento', 'CLT','08:00:00',728,5668,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-12-25T04:05:10.613Z','2021-12-13T06:09:52.628Z'),
('Paradigma3564','Desenvolvimento', 'CLT','08:00:00',933,6988,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-02-21T09:28:08.600Z','2021-10-30T05:10:50.937Z'),
('Funcionalidade6624','Desenvolvimento', 'CLT','08:00:00',873,7190,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-11-03T02:10:57.544Z','2021-12-17T04:36:11.733Z'),
('Fatores3683','Desenvolvimento', 'CLT','08:00:00',367,3832,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-11-04T06:11:46.546Z','2020-08-26T16:56:00.465Z'),
('Mobilidade53','Desenvolvimento', 'CLT','08:00:00',985,4715,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-04-07T18:56:43.660Z','2021-04-14T05:25:55.998Z'),
('Táticas8584','Desenvolvimento', 'CLT','08:00:00',280,9921,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-05-29T09:31:05.242Z','2021-11-27T21:54:05.240Z'),
('Grupo8798','Desenvolvimento', 'CLT','08:00:00',816,7381,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-12-05T10:42:26.683Z','2021-05-11T12:19:52.813Z'),
('Mobilidade5822','Desenvolvimento', 'CLT','08:00:00',81,1922,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-01-03T05:38:02.556Z','2020-06-02T03:05:55.393Z'),
('A infraestrutura8974','Desenvolvimento', 'CLT','08:00:00',307,2074,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-11-20T08:34:17.521Z','2020-12-20T00:51:43.993Z'),
('Rede3144','Desenvolvimento', 'CLT','08:00:00',964,4744,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-04-29T06:06:58.480Z','2021-11-22T11:34:06.245Z'),
('Fatores4557','Desenvolvimento', 'CLT','08:00:00',90,7078,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-09-28T11:21:42.236Z','2020-09-29T20:01:38.904Z'),
('A infraestrutura7814','Desenvolvimento', 'CLT','08:00:00',492,5771,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-07-13T09:50:37.696Z','2020-10-13T15:45:16.817Z'),
('Mobilidade9690','Desenvolvimento', 'CLT','08:00:00',247,9711,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-09-11T06:37:03.679Z','2022-01-11T08:39:59.905Z'),
('Identidade3231','Desenvolvimento', 'CLT','08:00:00',222,9990,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-12-25T07:59:50.043Z','2020-05-02T11:06:42.485Z'),
('Otimização7925','Desenvolvimento', 'CLT','08:00:00',18,4761,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-09-16T04:11:56.998Z','2021-08-10T16:55:20.482Z'),
('Criativo5831','Desenvolvimento', 'CLT','08:00:00',661,9587,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-08-09T21:52:18.326Z','2020-07-08T15:37:23.238Z'),
('Qualidade3607','Desenvolvimento', 'CLT','08:00:00',492,9176,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-04-14T06:29:10.729Z','2020-10-06T12:28:50.099Z'),
('Garantia1866','Desenvolvimento', 'CLT','08:00:00',159,4955,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-01-06T20:03:07.337Z','2020-06-07T16:17:10.615Z'),
('Soluções6615','Desenvolvimento', 'CLT','08:00:00',170,6743,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-09-17T04:39:26.000Z','2020-12-07T08:34:14.094Z'),
('Funcionalidade3491','Desenvolvimento', 'CLT','08:00:00',361,3969,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-10-26T11:18:12.139Z','2020-04-27T23:32:53.458Z'),
('Programa4278','Desenvolvimento', 'CLT','08:00:00',22,4402,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-05-28T10:07:57.306Z','2020-09-02T23:57:44.726Z'),
('Comunicações9328','Desenvolvimento', 'CLT','08:00:00',723,142,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-04-07T10:00:32.542Z','2020-11-30T15:31:16.547Z'),
('Marketing1944','Desenvolvimento', 'CLT','08:00:00',527,5533,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-05-21T15:53:51.809Z','2021-04-28T01:05:05.868Z'),
('Integração6635','Desenvolvimento', 'CLT','08:00:00',875,3815,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-03-21T09:01:23.444Z','2020-07-10T05:14:15.755Z'),
('Métricas5718','Desenvolvimento', 'CLT','08:00:00',996,1128,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-02-16T21:37:10.175Z','2021-05-05T01:44:50.345Z'),
('Pesquisa1489','Desenvolvimento', 'CLT','08:00:00',938,7966,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-01-10T14:49:53.053Z','2021-02-11T05:17:19.813Z'),
('Fatores9907','Desenvolvimento', 'CLT','08:00:00',403,3910,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-07-28T13:04:00.174Z','2021-03-21T14:11:30.050Z'),
('Contas5222','Desenvolvimento', 'CLT','08:00:00',993,8064,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-07-31T09:16:26.823Z','2021-08-08T18:27:29.702Z'),
('Criativo5034','Desenvolvimento', 'CLT','08:00:00',493,9022,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-12-25T23:33:47.737Z','2020-05-11T23:20:15.350Z'),
('Comunicações4348','Desenvolvimento', 'CLT','08:00:00',356,7990,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-12-07T04:58:18.395Z','2021-04-22T15:20:56.689Z'),
('Paradigma8647','Desenvolvimento', 'CLT','08:00:00',263,3225,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-06-19T21:54:40.499Z','2020-08-02T05:35:26.521Z'),
('Otimização3249','Desenvolvimento', 'CLT','08:00:00',516,5646,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-09-05T19:09:11.500Z','2021-09-23T13:08:01.840Z'),
('Identidade1023','Desenvolvimento', 'CLT','08:00:00',403,1246,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-08-11T13:21:01.353Z','2020-10-13T14:20:50.541Z'),
('Branding8888','Desenvolvimento', 'CLT','08:00:00',22,4884,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-09-05T23:23:26.662Z','2020-02-27T18:34:37.953Z'),
('Marca4111','Desenvolvimento', 'CLT','08:00:00',114,198,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-08-23T19:26:07.941Z','2020-05-07T00:35:18.753Z'),
('Pesquisa5846','Desenvolvimento', 'CLT','08:00:00',633,3729,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-11-13T22:59:18.677Z','2020-02-09T02:13:27.927Z'),
('Criativo8779','Desenvolvimento', 'CLT','08:00:00',39,7038,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-11-20T23:30:01.972Z','2020-02-19T04:04:09.215Z'),
('Prestação de contas4367','Desenvolvimento', 'CLT','08:00:00',548,6711,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-01-03T18:49:47.095Z','2020-08-17T00:05:51.017Z'),
('Garantia405','Desenvolvimento', 'CLT','08:00:00',628,7501,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-08-28T10:14:06.627Z','2021-09-19T14:56:09.229Z'),
('Diretivas2557','Desenvolvimento', 'CLT','08:00:00',6,4100,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-04-16T10:20:13.915Z','2020-12-14T12:33:46.777Z'),
('A infraestrutura9481','Desenvolvimento', 'CLT','08:00:00',841,1009,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-09-24T14:46:46.824Z','2020-09-02T21:50:06.296Z'),
('Divisão4595','Desenvolvimento', 'CLT','08:00:00',130,3191,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-01-20T18:06:14.261Z','2021-03-24T02:08:06.493Z'),
('Prestação de contas5019','Desenvolvimento', 'CLT','08:00:00',717,9734,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-05-13T01:42:36.987Z','2021-03-03T00:37:08.296Z'),
('Mobilidade4406','Desenvolvimento', 'CLT','08:00:00',908,7417,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-08-30T12:51:45.108Z','2020-11-24T01:14:52.542Z'),
('Identidade60','Desenvolvimento', 'CLT','08:00:00',667,8774,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-12-09T09:21:56.773Z','2021-08-15T06:06:14.035Z'),
('Marketing5298','Desenvolvimento', 'CLT','08:00:00',54,817,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-05-20T08:23:32.929Z','2021-02-13T15:21:08.557Z'),
('Mercados921','Desenvolvimento', 'CLT','08:00:00',627,1472,'female','N','Brasil','São José dos Campos','Monte Castelo','Vinte e Sete de julho',41,'1',12215100,-23.1850273,-45.8770411,'2019-06-29T06:16:13.330Z','2020-08-24T23:58:27.626Z');
|
/*
These tables coordinate scraping of Wikipedia page visit stats and store page
visit counts for pages of interest (i.e. those which are epidemiologically
pertinent).
*/
/*
`wiki` is an optimized store of Wikipedia page visits per hour, per article,
per language (for pre-selected article and language combinations).
Data is public.
+----------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| datetime | datetime | NO | MUL | NULL | |
| article | varchar(64) | NO | MUL | NULL | |
| count | int(11) | NO | | NULL | |
| language | char(2) | NO | | en | |
+----------+-------------+------+-----+---------+----------------+
*/
CREATE TABLE `wiki` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`datetime` datetime NOT NULL,
`article` varchar(64) NOT NULL,
`count` int(11) NOT NULL,
`language` char(2) NOT NULL DEFAULT 'en',
PRIMARY KEY (`id`),
UNIQUE KEY `datetime` (`datetime`,`article`,`language`),
KEY `datetime_2` (`datetime`),
KEY `article` (`article`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*
`wiki_meta` stores timing information (e.g. hour, day, week) and the overall
page visit denominator for a particular language.
Data is public.
+----------+----------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+----------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| datetime | datetime | NO | MUL | NULL | |
| date | date | NO | | NULL | |
| epiweek | int(11) | NO | | NULL | |
| total | int(11) | NO | | NULL | |
| language | char(2) | NO | | en | |
+----------+----------+------+-----+---------+----------------+
*/
CREATE TABLE `wiki_meta` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`datetime` datetime NOT NULL,
`date` date NOT NULL,
`epiweek` int(11) NOT NULL,
`total` int(11) NOT NULL,
`language` char(2) NOT NULL DEFAULT 'en',
PRIMARY KEY (`id`),
UNIQUE KEY `datetime` (`datetime`,`language`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*
`wiki_raw` stores information about a single pagedump file, including a "raw"
JSON dump containing the number of visits to particular pages of interest.
Data is public.
+----------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+---------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| name | varchar(64) | NO | UNI | NULL | |
| hash | char(32) | NO | | NULL | |
| status | int(11) | NO | MUL | 0 | |
| size | int(11) | YES | | NULL | |
| datetime | datetime | YES | | NULL | |
| worker | varchar(256) | YES | | NULL | |
| elapsed | float | YES | | NULL | |
| data | varchar(4096) | YES | | NULL | |
+----------+---------------+------+-----+---------+----------------+
*/
CREATE TABLE `wiki_raw` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`hash` char(32) NOT NULL,
`status` int(11) NOT NULL DEFAULT '0',
`size` int(11) DEFAULT NULL,
`datetime` datetime DEFAULT NULL,
`worker` varchar(256) DEFAULT NULL,
`elapsed` float DEFAULT NULL,
`data` varchar(4096) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`),
KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
select subject_id, cohort_definition_id, cohort_start_date, cohort_end_date
from @tableQualifier.cohort
where subject_id = @subjectId
|
/*** Script to enable Advisory Condition Evaluation Tracking ***
IMPORTANT:
- The SentryOne Scalability Pack must be installed first (partitioned CCI + In-mem OLTP)
https://docs.sentryone.com/help/recommendations#scalabilitypack
- The DynamicConditionStatus table MUST be memory-optimized.
DISCLAIMER: These updates are considered preview, and should be used at your own risk.
Copyright 2020 SQL Sentry, LLC
*/
USE [SentryOne];
DROP TRIGGER IF EXISTS [dbo].[trgLogACEvaluationResults];
GO
DROP TABLE IF EXISTS [dbo].[DynamicConditionEvaluationTracking];
GO
DROP TABLE IF EXISTS [dbo].[DynamicConditionEvaluationValueTypes];
GO
DROP TABLE IF EXISTS [dbo].[DynamicConditionEvaluationObjectTypePerformanceCategory];
GO
DROP TABLE IF EXISTS [Staging].[MO_DynamicConditionEvaluationResults];
GO
DROP PROC IF EXISTS [dbo].[SetAdvisoryConditionEvaluationTracking];
GO
DELETE PerformanceAnalysisCounter WHERE PerformanceAnalysisCounterCategoryID BETWEEN 1000 AND 1020;
GO
DELETE PerformanceAnalysisCounterCategory WHERE ID BETWEEN 1000 AND 1020;
GO
CREATE TABLE [dbo].[DynamicConditionEvaluationTracking]
(
[ID] [int] IDENTITY(1,1) NOT NULL,
[ConditionID] [uniqueidentifier] NOT NULL,
[DynamicConditionID] [int] NOT NULL,
[UniqueKey] [nvarchar](4000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ObjectID] [uniqueidentifier] NULL,
[CounterID] [smallint] NOT NULL,
[Enabled] [bit] NOT NULL,
[CreatedByUser] [nvarchar](128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DateCreatedUTC] [datetime] NULL,
[UpdatedByUser] [nvarchar](128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DateUpdatedUTC] [datetime] NULL,
CONSTRAINT [PK_DynamicConditionEvaluationTracking_MO] PRIMARY KEY NONCLUSTERED HASH
(
[ID]
) WITH ( BUCKET_COUNT = 64 )
) WITH ( MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA )
GO
ALTER TABLE [dbo].[DynamicConditionEvaluationTracking] ADD CONSTRAINT [DF_DynamicConditionEvaluationTracking_Enabled] DEFAULT ((0)) FOR [Enabled]
GO
ALTER TABLE [dbo].[DynamicConditionEvaluationTracking] ADD CONSTRAINT [DF_DynamicConditionEvaluationTracking_DateCreatedUTC] DEFAULT (getutcdate()) FOR [DateCreatedUTC]
GO
CREATE TABLE [dbo].[DynamicConditionEvaluationValueTypes](
[ID] [int] IDENTITY(1,1) NOT NULL,
[ValueTypeID] [nvarchar](36) NOT NULL,
[Description] [nvarchar](128) NOT NULL,
[Enabled] [bit] NOT NULL,
CONSTRAINT [PK_DynamicConditionEvaluationValueTypes] PRIMARY KEY CLUSTERED
(
[ID] ASC
)
)
GO
ALTER TABLE [dbo].[DynamicConditionEvaluationValueTypes] ADD CONSTRAINT [DF_DynamicConditionEvaluationValueTypes_Enabled] DEFAULT ((1)) FOR [Enabled]
GO
CREATE TABLE [dbo].[DynamicConditionEvaluationObjectTypePerformanceCategory]
(
[ObjectTypeID] nvarchar(36) NOT NULL,
[PerformanceAnalysisCounterCategoryID] smallint NOT NULL
CONSTRAINT [PK_DynamicConditionEvaluationObjectTypePerformanceCategory] PRIMARY KEY CLUSTERED
(
[ObjectTypeID], [PerformanceAnalysisCounterCategoryID]
)
);
GO
CREATE TABLE [Staging].[MO_DynamicConditionEvaluationResults]
(
[ID] [int] IDENTITY(1,1) NOT NULL,
[ConditionID] [uniqueidentifier] NOT NULL,
[ObjectID] [uniqueidentifier] NOT NULL,
[CounterID] [smallint] NOT NULL,
[Timestamp] [int] NOT NULL,
[TimestampAligned] [int] NULL,
[Value] [float] NOT NULL,
[InstanceName] [nvarchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
PRIMARY KEY NONCLUSTERED
(
[ID] ASC
)
) WITH ( MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_ONLY )
GO
CREATE TRIGGER [dbo].[trgLogACEvaluationResults]
ON [dbo].[DynamicConditionStatus]
WITH NATIVE_COMPILATION, SCHEMABINDING
AFTER UPDATE
AS BEGIN ATOMIC WITH
(
TRANSACTION ISOLATION LEVEL = SNAPSHOT, LANGUAGE = N'us_english'
)
IF NOT UPDATE([LastEvaluationResults]) --only log when results are updated. prevents dups.
RETURN;
--This check avoids any joins to the tracking table, and also mitigates against issues from multiple inserted table rows... which should never happen on DCS.
DECLARE @ConditionID nvarchar(36);
DECLARE @ObjectID nvarchar(36);
SELECT TOP 1
@ConditionID = ConditionID
,@ObjectID = ObjectID
FROM inserted;
SET @ConditionID =
(
SELECT TOP 1
ConditionID
FROM [dbo].[DynamicConditionEvaluationTracking]
WHERE ConditionID = @ConditionID
AND
(
ObjectID = @ObjectID
OR ObjectID IS NULL
)
);
IF (@ConditionID IS NULL)
RETURN;
INSERT INTO [Staging].[MO_DynamicConditionEvaluationResults]
(
[ConditionID]
,[ObjectID]
,[CounterID]
,[Timestamp]
,[Value]
,[InstanceName]
)
SELECT
[ConditionID]
,[ObjectID]
,[CounterID]
,DATEDIFF(second, '20000101 00:00:00', GETUTCDATE()) / 5
,[Value]
,COALESCE([ValueKeyDisplayValue], [ValueKey])
FROM
(
SELECT
cs.[ConditionID]
,cs.[ObjectID]
,et.[CounterID]
,vr.[Value]
,vr.[ValueKey]
,vr.[ValueKeyDisplayValue]
FROM inserted cs
CROSS APPLY OPENJSON(cs.[LastEvaluationResults], '$.ValueRetrieverResults')
WITH
(
[UniqueKey] nvarchar(4000) '$.UniqueKey'
,[Value] nvarchar(50) '$.Value'
,[ValueKey] nvarchar(4000) '$.ValueKey'
,[ValueKeyDisplayValue] nvarchar(4000) '$.ValueKeyDisplayValue'
) AS vr
JOIN [dbo].[DynamicConditionEvaluationTracking] et
ON et.UniqueKey = vr.UniqueKey
WHERE cs.[LastEvaluationState] = 0 --completed successfully.
AND et.[ConditionID] = @ConditionID
AND et.[Enabled] = 1
AND vr.[Value] IS NOT NULL
) er
END
GO
/*** Proc for Enabling/Disabling AC Tracking ***/
/*
exec SetAdvisoryConditionEvaluationTracking N'High tempdb Version Store KB'; --SQL Server Query
exec SetAdvisoryConditionEvaluationTracking N'High Active User Sessions'; --SQL Server Query
exec SetAdvisoryConditionEvaluationTracking N'Service Broker - Task Limit Reached / Sec'; --User Counter
exec SetAdvisoryConditionEvaluationTracking N'High Read Latency', null, 1; --User Counter
SELECT * FROM [dbo].[PerformanceAnalysisCounter] WHERE ID >= 10000 ORDER BY ID;
SELECT * FROM [dbo].[DynamicConditionEvaluationTracking] ORDER BY ID;
*/
CREATE PROC [dbo].[SetAdvisoryConditionEvaluationTracking]
@ConditionName nvarchar(128) --Advisory Condition name
,@ObjectID uniqueidentifier = NULL --(optional) reserved for future use
,@Enabled bit = 1 --(optional) 1=enable, 0=disable
AS
SET NOCOUNT ON;
DECLARE @output_msg nvarchar(max);
--First update enabled status and object, which also lets us check for existence to avoid adding dups.
UPDATE [DynamicConditionEvaluationTracking]
SET [Enabled] = @Enabled
,[ObjectID] = @ObjectID
,[UpdatedByUser] = SUSER_SNAME()
,[DateUpdatedUTC] = GETUTCDATE()
FROM [DynamicConditionEvaluationTracking] et
JOIN
(
SELECT DISTINCT
[ConditionID]
,[Name]
FROM [DynamicConditionDefinition]
) d
ON d.ConditionID = et.ConditionID
WHERE d.[Name] = @ConditionName;
IF (@@ROWCOUNT > 0)
BEGIN
SET @output_msg = N'Tracking ' + CASE WHEN @Enabled = 0 THEN N'DISABLED' ELSE N'ENABLED' END + N' for ''' + @ConditionName + N'''.';
RAISERROR(@output_msg, 0, 1);
RETURN;
END
DECLARE @ConditionInfo TABLE
(
[ConditionID] [uniqueidentifier] NOT NULL,
[DynamicConditionID] [int] NOT NULL,
[ConditionName] [nvarchar](128) NOT NULL,
[PerformanceAnalysisCounterCategoryID] [smallint] NOT NULL,
[ValueTypeID] [nvarchar](100) NULL,
[CounterID] [int] NULL,
[CategoryName] [nvarchar](1000) NULL,
[CounterName] [nvarchar](1000) NULL,
[InstanceType] [int] NULL,
[InstanceName] [nvarchar](1000) NULL,
[InstanceNameFriendly] [nvarchar](1000) NULL,
[Database] [nvarchar](128) NULL,
[Query] [nvarchar](4000) NULL,
[PerformanceCounterValueRetrievalType] [int] NULL,
[UniqueKey] [nvarchar](4000) NULL,
[RuleDefinition] [nvarchar](max) NOT NULL
);
;WITH MaxVersions
AS
(
SELECT
ConditionID
,MAX(VersionNumber) AS MaxVersionNumber
FROM DynamicConditionDefinition
GROUP BY ConditionID
)
INSERT INTO @ConditionInfo
SELECT
cd.ConditionID
,cd.ID AS DynamicConditionID
,cd.[Name] As ConditionName
,pc.PerformanceAnalysisCounterCategoryID
,rd.ValueTypeID
,rd.CounterID
,rd.CategoryName
,rd.CounterName
,rd.InstanceType
,rd.InstanceName
,rd.InstanceNameFriendly
,rd.[Database]
,rd.Query
,rd.PerformanceCounterValueRetrievalType
,UniqueKey = rd.ValueTypeID +
CASE
WHEN rd.CounterID IS NOT NULL
THEN N'/' + CAST(rd.CounterID as nvarchar(10))
WHEN rd.CounterName IS NOT NULL
THEN N'/' + rd.CategoryName
+ N'/' + rd.CounterName
+ CASE ISNULL(rd.InstanceType, -1)
WHEN -1 THEN N'//'
WHEN 0 THEN N'/Total/'
ELSE N''
END
ELSE
CASE WHEN rd.[Database] IS NOT NULL
THEN N'/' + rd.[Database]
ELSE N''
END
+ N'/' + rd.[Query]
END
,cd.RuleDefinition
FROM DynamicConditionDefinition cd
JOIN MaxVersions mv
ON cd.ConditionID = mv.ConditionID
AND cd.VersionNumber = mv.MaxVersionNumber
LEFT JOIN dbo.DynamicConditionEvaluationObjectTypePerformanceCategory pc
ON cd.AppliesToObjectTypeID = pc.ObjectTypeID
CROSS APPLY OPENJSON([RuleDefinition], '$.Children')
WITH
(
ValueTypeID nvarchar(100) '$.Left.ValueTypeID' --aa61ee90-8a95-4fdf-a208-b9a4afa26d9d=SQL Server Query, f2e88d72-73c6-4ce1-b92a-029c313e707f=S1 Database Query, bd31f3db-a9ba-45fe-a076-9b5f4a386ff0=User Perf Counter
,PerformanceCategoryType int '$.Left.PerformanceCategoryType' --0=Windows, 1=SqlServer, 2=Ssas, 3=Aps, 4=Tintri, 5=Vmware, 6=SqlDb, 7=AmazonRds
,CounterID int '$.Left.CounterID' --Base or virtual counter ID. If null and CounterName is not null, then it's a User Perf Counter.
,CounterName nvarchar(1000) '$.Left.CounterName'
,CategoryName nvarchar(1000) '$.Left.CategoryName'
,InstanceType int '$.Left.InstanceType' --0=Total, 1=Any, 2=Equals, 3=DoesNotEqual, 4=Contains, 5=StartsWith, 6=EndsWith, 7=RegexMatch
,InstanceName nvarchar(1000) '$.Left.InstanceName'
,InstanceNameFriendly nvarchar(1000) '$.Left.InstanceNameFriendly'
,[Database] nvarchar(128) '$.Left.Database' --null for S1 Database Queries
,Query nvarchar(4000) '$.Left.Query'
,PerformanceCounterValueRetrievalType int '$.Left.PerformanceCounterValueRetrievalType' --0=Value, 1=Baseline
) AS rd
WHERE rd.ValueTypeID IN
(
SELECT ValueTypeID
FROM DynamicConditionEvaluationValueTypes
WHERE Enabled = 1
)
AND cd.[Name] = @ConditionName;
DECLARE @ConditionID uniqueidentifier;
DECLARE @DynamicConditionID int;
DECLARE @CounterCategoryID smallint;
DECLARE @UniqueKey nvarchar(4000);
--Load vars for first op only.
SELECT TOP 1
@ConditionID = ConditionID
,@DynamicConditionID = DynamicConditionID
,@CounterCategoryID = PerformanceAnalysisCounterCategoryID
,@UniqueKey = UniqueKey
FROM @ConditionInfo;
IF (@ConditionID IS NULL)
BEGIN
SET @output_msg = N'Condition ''' + @ConditionName + N''' not found or type not supported.';
RAISERROR(@output_msg, 11, 1);
RETURN;
END
ELSE IF (@CounterCategoryID IS NULL)
BEGIN
SET @output_msg = N'Condition object type not supported.';
RAISERROR(@output_msg, 11, 1);
RETURN;
END
--Setup counter vars.
DECLARE @CounterResourceName varchar(42);
SET @CounterResourceName = UPPER(REPLACE(REPLACE(REPLACE(REPLACE(@ConditionName, ' ', '_'), '''', ''), '/', '_'), '\', '_'));
DECLARE @CounterBaseID smallint = 9999;
DECLARE @CounterID smallint;
SET @CounterID = (SELECT ISNULL(MAX(ID), @CounterBaseID) + 1 FROM PerformanceAnalysisCounter WHERE ID >= @CounterBaseID);
--Output counter info.
SELECT
CounterID = @CounterID
,CounterResourceName = @CounterResourceName;
--Add new AC counter.
SET IDENTITY_INSERT [dbo].[PerformanceAnalysisCounter] ON;
INSERT INTO [dbo].[PerformanceAnalysisCounter]
(
[ID]
,[PerformanceAnalysisCounterCategoryID]
,[PerformanceAnalysisSampleIntervalID]
,[CounterResourceName]
,[CounterName]
,[PerformanceAnalysisCounterSampleType]
,[InstanceFilter]
,[IsBaselineApproved]
)
VALUES
(
@CounterID
,@CounterCategoryID
,0
,@CounterResourceName
,@ConditionName
,0
,null
,null
);
SET IDENTITY_INSERT [dbo].[PerformanceAnalysisCounterCategory] OFF;
--Add AC tracking row.
INSERT INTO [dbo].[DynamicConditionEvaluationTracking]
(
[ConditionID]
,[DynamicConditionID]
,[UniqueKey]
,[ObjectID]
,[CounterID]
,[Enabled]
,[CreatedByUser]
,[DateCreatedUTC]
)
VALUES
(
@ConditionID
,@DynamicConditionID
,@UniqueKey
,@ObjectID
,@CounterID
,@Enabled
,SUSER_SNAME()
,GETUTCDATE()
);
IF (@@ROWCOUNT > 0)
BEGIN
SET @output_msg = N'Tracking initialized for ''' + @ConditionName + N''' as ' + CASE WHEN @Enabled = 0 THEN N'DISABLED' ELSE N'ENABLED' END + N'.';
RAISERROR(@output_msg, 0, 1);
END
ELSE
BEGIN
SET @output_msg = N'Tracking NOT initialized for ''' + @ConditionName + N'''.';
RAISERROR(@output_msg, 11, 1);
END
RETURN
GO
/*** Add new Counter Category ***/
set identity_insert [dbo].[PerformanceAnalysisCounterCategory] ON;
INSERT INTO [dbo].[PerformanceAnalysisCounterCategory]
(
[ID]
,[CategoryResourceName]
,[CategoryTypes]
,[NumberOfCounters]
,[PerformanceAnalysisSampleIntervalID]
,[IsDeviceLevel]
,[HistoryDataRetentionHours]
,[PerformanceAnalysisCounterDataPartitionID]
,[MinRollupLevelBreakMinutes]
,[AllowReportOverride]
,[HasInstances]
,[CategoryName]
)
VALUES
(
1000
,'SYSPERF:SQL_AC_EVAL_RESULTS'
,1158
,1
,null
,0
,72
,null
,0
,1
,1
,'Advisory Conditions (SQL Server)'
),
(
1001
,'SYSPERF:WIN_AC_EVAL_RESULTS'
,129
,1
,null
,1
,72
,null
,0
,1
,1
,'Advisory Conditions (Windows)'
);
set identity_insert [dbo].[PerformanceAnalysisCounterCategory] OFF;
GO
/*** Add ObjectType to CategoryID mapping table ***/
INSERT INTO dbo.DynamicConditionEvaluationObjectTypePerformanceCategory
(
ObjectTypeID,
PerformanceAnalysisCounterCategoryID
)
VALUES
(
N'0A11A887-823A-4461-87AF-321CAD1C3623',
1000
),
(
N'49A296EA-155F-4347-8D33-481FC53B6492',
1001
),
(
N'894DE672-3FC0-4779-9A0D-880D4C207C77',
1001
);
GO
/*** Add Supported Counter Value Types ***/
INSERT INTO [dbo].[DynamicConditionEvaluationValueTypes]
(
ValueTypeID,
[Description]
)
VALUES
(N'aa61ee90-8a95-4fdf-a208-b9a4afa26d9d', N'SQL Server Query')
,(N'bd31f3db-a9ba-45fe-a076-9b5f4a386ff0', N'User Performance Counter');
--,(N'f2e88d72-73c6-4ce1-b92a-029c313e707f', N'SentryOne Database Query');
GO
|
DROP TABLE IF EXISTS link_to_be_process;
DROP TABLE IF EXISTS link_already_process;
DROP TABLE IF EXISTS news;
CREATE TABLE link_to_be_process(link VARCHAR(255));
CREATE TABLE link_already_process(link VARCHAR(255));
CREATE TABLE news(id int(11) PRIMARY KEY auto_increment,title text , content text , url VARCHAR(200) , create_time timestamp , update_time timestamp );
|
include: helpers/server_helpers.sql;
-- Test this scenario:
-- mirror has latency replaying the WAL from the primary, the master is reset
-- from PANIC, master will start the DTX recovery process to recover the
-- in-progress two-phase transactions.
-- The FTS process should be able to continue probe and 'sync off' the mirror
-- while the 'dtx recovery' process is hanging recovering distributed transactions.
-- modify fts gucs to speed up the test.
1: alter system set gp_fts_probe_interval to 10;
1: alter system set gp_fts_probe_retries to 1;
1: select pg_reload_conf();
1: create or replace function wait_until_standby_in_state(targetstate text)
returns void as $$
declare
replstate text; /* in func */
begin
loop
select state into replstate from pg_stat_replication; /* in func */
exit when replstate = targetstate; /* in func */
perform pg_sleep(0.1); /* in func */
end loop; /* in func */
end; /* in func */
$$ language plpgsql;
1: create table t_wait_lsn(a int);
-- suspend segment 0 before performing 'COMMIT PREPARED'
2: select gp_inject_fault_infinite('finish_prepared_start_of_function', 'suspend', dbid) from gp_segment_configuration where content=0 and role='p';
1&: insert into t_wait_lsn values(2),(1);
2: select gp_wait_until_triggered_fault('finish_prepared_start_of_function', 1, dbid) from gp_segment_configuration where content=0 and role='p';
-- let walreceiver on mirror 0 skip WAL flush
2: select gp_inject_fault_infinite('walrecv_skip_flush', 'skip', dbid) from gp_segment_configuration where content=0 and role='m';
-- resume 'COMMIT PREPARED', session 1 will hang on 'SyncRepWaitForLSN'
2: select gp_inject_fault_infinite('finish_prepared_start_of_function', 'reset', dbid) from gp_segment_configuration where content=0 and role='p';
0U: select count(*) from pg_prepared_xacts;
-- stop mirror
3: SELECT pg_ctl(datadir, 'stop', 'immediate') FROM gp_segment_configuration WHERE content=0 AND role = 'm';
-- trigger master reset
3: select gp_inject_fault('before_read_command', 'panic', 1);
-- verify master panic happens. The PANIC message does not emit sometimes so
-- mask it.
-- start_matchsubs
-- m/PANIC: fault triggered, fault name:'before_read_command' fault type:'panic'\n/
-- s/PANIC: fault triggered, fault name:'before_read_command' fault type:'panic'\n//
-- end_matchsubs
3: select 1;
-- wait for master finish crash recovery
-1U: select wait_until_standby_in_state('streaming');
-- wait for FTS to 'sync off' the mirror, meanwhile, dtx recovery process will
-- restart repeatedly.
-- the query should succeed finally since dtx recovery process is able to quit.
-- this's what we want to test.
4: select count(*) from t_wait_lsn;
1<:
!\retcode gprecoverseg -a;
-- loop while segments come in sync
4: select wait_until_all_segments_synchronized();
4: select count(*) from t_wait_lsn;
4: drop table t_wait_lsn;
4: alter system reset gp_fts_probe_interval;
4: alter system reset gp_fts_probe_retries;
4: select pg_reload_conf();
|
CREATE TABLE `businesspic` (
`identity` varchar(50) NOT NULL,
`businesstype` int(11) NOT NULL DEFAULT '0',
`pictype` smallint(2) NOT NULL DEFAULT '0',
`uploaded` tinyint(1) NOT NULL DEFAULT '0',
`time` datetime NOT NULL,
PRIMARY KEY (`identity`,`businesstype`,`pictype`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
create table url
(
uri varchar(21) not null
constraint url_pkey
primary key,
full_url varchar(255) not null
constraint url_full_url_key
unique,
short_url varchar(255) not null
constraint url_short_url_key
unique,
count integer
);
|
--*************************GO-LICENSE-START*********************************
-- Copyright 2014 ThoughtWorks, Inc.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--*************************GO-LICENSE-END***********************************
CREATE INDEX idx_modifications_revision ON modifications(revision);
--//@UNDO
DROP INDEX idx_modifications_revision IF EXISTS;
|
CREATE TABLE IF NOT EXISTS User (
id integer primary key autoincrement,
username text unique,
password text,
gender text default null,
image text default "none",
age integer default null,
phone text default null,
fav_color text default null,
interests text default null,
hometown text default null,
permissions integer default 222222,
requests text default "[]"
);
CREATE TABLE IF NOT EXISTS Friend (
id integer primary key autoincrement,
f1 integer not null,
f2 integer not null,
foreign key (f1) references User(id),
foreign key (f2) references User(id),
constraint friendship unique (f1, f2)
);
|
USE test;
INSERT INTO metrics VALUES (15,2012,1,0,1405313702,2012);
INSERT INTO metrics VALUES (15,2013,1,0,1405401901,2013);
INSERT INTO metrics VALUES (15,2014,1,0,1405491001,2014);
INSERT INTO metrics VALUES (15,2015,1,0,1405575902,2015);
INSERT INTO metrics VALUES (15,2016,1,0,1405664101,2016);
INSERT INTO metrics VALUES (15,2017,1,0,1405744801,2017);
INSERT INTO metrics VALUES (15,2018,1,0,1405833602,2018);
INSERT INTO metrics VALUES (15,2019,1,0,1405918202,2019);
INSERT INTO metrics VALUES (15,2020,1,0,1406007001,2020);
INSERT INTO metrics VALUES (15,2021,1,0,1406088301,2021);
INSERT INTO metrics VALUES (15,2022,1,0,1406176802,2022);
INSERT INTO metrics VALUES (15,2023,1,0,1406265601,2023);
INSERT INTO metrics VALUES (15,2024,1,0,1406354701,2024);
INSERT INTO metrics VALUES (15,2025,1,0,1406435702,2025);
INSERT INTO metrics VALUES (15,2026,1,0,1406524501,2026);
INSERT INTO metrics VALUES (15,2027,1,0,1406613001,2027);
INSERT INTO metrics VALUES (15,2028,1,0,1406693701,2028);
INSERT INTO metrics VALUES (15,2029,1,0,1406801101,2029);
|
SELECT name from people
JOIN directors ON directors.person_id = people.id
JOIN ratings ON directors.movie_id = ratings.movie_id
WHERE ratings.rating >= 9.0
GROUP BY people.id;
|
SELECT es.session_id, er.status, er.blocking_session_id, er.command, er.wait_type, er.last_wait_type, er.wait_resource, er.wait_time
FROM sys.dm_exec_requests er
INNER JOIN sys.dm_exec_sessions es
ON er.session_id = es.session_id
AND es.is_user_process = 1;
GO
|
def Main =
block
header = Header
tracks = Many header.track_num Track
-- A tagged block of midi data
def Chunk name Body =
block
ExactBlock 4 (Match name)
ExactBlock (BE32 as uint 64) Body
--------------------------------------------------------------------------------
-- MIDI Header
def Header =
Chunk "MThd"
block
format = BE16 as? MidiFormat
track_num = BE16 as uint 64
time_unit = BE16 as MidiTimeUnit
bitdata MidiFormat where
single_track = 0 : uint 16
multi_track = 1
multi_song = 2
bitdata MidiTimeUnit where
quarter_len = { 0b0; value : uint 15 }
smtpe = { 0b1; value : sint 15 }
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- A MIDI Track
def Track = Chunk "MTrk" (Many (Delta Event))
-- Events spaces by time
def Delta E = block
after = VarQ
event = E
-- Different types of events
def Event =
Choose1
voiceMessage = VoiceMessages
modeMessage = ModeMessages
sysEx = SysEx
meta = Meta
--------------------------------------------------------------------------------
-- Voice Message Events
def VoiceMessages =
case UInt8 as? VoiceMessagesHeader of
VoiceMessagesHeader header ->
block
channel = header.channel
message = VoiceMessage header.tag
extra = Many (Delta (VoiceMessage header.tag))
bitdata VoiceMessagesHeader where
VoiceMessagesHeader = { tag : VoiceMessageTag, channel : uint 4 }
bitdata VoiceMessageTag where
note_off = 0x8 : uint 4
note_on = 0x9
aftertouch = 0xA
controller_change = 0xB
program_change = 0xC
channel_pressure = 0xD
pitch_bend = 0xE
def VoiceMessage (tag : VoiceMessageTag) =
case tag of
note_off -> {| note_off = NoteEvent |}
note_on -> {| note_on = NoteEvent |}
aftertouch -> {| aftertouch = NoteEvent |}
controller_change -> {| controller_change = ControllerChange |}
program_change -> {| program_change = UInt7 |}
channel_pressure -> {| channel_pressure = UInt7 |}
pitch_bend -> {| pitch_bend =
block
let lsb = UInt7
let msb = UInt7
msb # lsb
|}
def NoteEvent = block
key = UInt7
velocity = UInt7
def ControllerChange = block
controller = UInt7
Guard (controller <= 0x77)
value = UInt7
--------------------------------------------------------------------------------
-- Mode Message Events
def ModeMessages =
case UInt8 as? ModeMessagesHeader of
ModeMessagesHeader header ->
block
channel = header.channel
message = ModeMessage
extra = Many (Delta ModeMessage)
bitdata ModeMessagesHeader where
ModeMessagesHeader = { 0xB : uint 4, channel : uint 4 }
def ModeMessage =
Choose1
all_sound_off = @Match [ 0x78; 0x00 ]
reset_controllers = @Match [ 0x79; 0x00 ]
local_control_off = @Match [ 0x7A; 0x00 ]
local_control_on = @Match [ 0x7A; 0x7F ]
all_notes_off = @Match [ 0x7B; 0x00 ]
omni_off = @Match [ 0x7C; 0x00 ]
omni_on = @Match [ 0x7D; 0x00 ]
mono_on = block
Match1 0x7E
$$ = UInt8
Guard ($$ <= 0x10)
poly_on = @Match [ 0x7F; 0x00 ]
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- SysEx Events
def SysEx =
Choose1
add_f0 =
block
Match1 0xF0
Block VarQ (Many UInt8)
as_is =
block
Match1 0xF7
Block VarQ (Many UInt8)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Metdata events
def Meta =
block
Match1 0xFF
let tag = UInt8
Guard (tag <= 0x7F);
ExactBlock VarQ
case tag of
0x00 -> {| sequence = BE16 |}
0x01 -> {| text = Many UInt8 |}
0x02 -> {| copyright = Many UInt8 |}
0x03 -> {| name = Many UInt8 |}
0x04 -> {| instrument = Many UInt8 |}
0x05 -> {| lyrics = Many UInt8 |}
0x06 -> {| marker = Many UInt8 |}
0x07 -> {| cue = Many UInt8 |}
0x20 -> {| channel = UInt8 |}
0x2F -> {| end_track = END |}
0x51 -> {| tempo = BE24 |}
0x54 -> {| smtpe_offset = SMTPEOffset |}
0x58 -> {| time_sig = TimeSig |}
0x59 -> {| key_sig = KeySig |}
0x7F -> {| seq_specifiec = MetaSeqSpecific |}
_ -> {| unknown = MetaUnknown tag |}
def MetaSeqSpecific =
block
manufacturer =
Choose1
block
Match1 0
BE16
UInt8 as uint 16
data = Many UInt8
def MetaUnknown tag =
block
tag = tag : uint 8
data = Many UInt8
bitdata Accidentals where
flats = { 0b1, flats : uint 7 }
sharps = { 0b0, sharps : uint 7 }
bitdata Mode where
minor = 0 : uint 8
major = 1 : uint 8
def KeySig =
block
key = UInt8 as Accidentals
mode = UInt8 as? Mode
def SMTPEOffset =
block
hh = UInt8
mm = UInt8
ss = UInt8
fr = UInt8
ff = UInt8
def TimeSig =
block
nn = UInt8
dd = UInt8
cc = UInt8
bb = UInt8
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Utilities
-- Variable length numbers
bitdata VarQChunk where
More = { 0b1; value : uint 7 }
Last = { 0b0; value : uint 7 }
def VarQBuilder (result : int) =
case UInt8 as VarQChunk of
More x -> VarQBuilder (result <# x.value)
Last x -> result <# x.value
-- The MIDI format restricts tihs to 4 bytes, but we allow a bit more
def VarQ = VarQBuilder 0 as? uint 64
def BE16 = UInt8 # UInt8
def BE24 = BE16 # UInt8
def BE32 = BE16 # BE16
def UInt7 = UInt8 as? uint 7
def Block n P =
block
let cur = GetStream
SetStream (Take n cur)
$$ = P
SetStream (Drop n cur)
def Only P =
block
$$ = P
END
def ExactBlock n P = Block n (Only P)
def Guard p = p is true
|
SELECT tab0.v0 AS v0 , tab1.v3 AS v3 , tab2.v2 AS v2
FROM (SELECT sub AS v0
FROM wsdbm__subscribes$$1$$
WHERE obj = 'wsdbm:Website3520'
) tab0
JOIN (SELECT sub AS v0 , obj AS v2
FROM wsdbm__likes$$3$$
) tab2
ON(tab0.v0=tab2.v0)
JOIN (SELECT obj AS v3 , sub AS v2
FROM sorg__caption$$2$$
) tab1
ON(tab2.v2=tab1.v2)
++++++Tables Statistic
wsdbm__likes$$3$$ 0 VP wsdbm__likes/
VP <wsdbm__likes> 112401
------
wsdbm__subscribes$$1$$ 0 VP wsdbm__subscribes/
VP <wsdbm__subscribes> 152275
------
sorg__caption$$2$$ 0 VP sorg__caption/
VP <sorg__caption> 2501
------
|
INSERT INTO echo(id, message) VALUES (1, 'Echo message');
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Waktu pembuatan: 21 Jan 2021 pada 01.53
-- Versi server: 10.4.14-MariaDB
-- Versi PHP: 7.4.9
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: `wisata`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `data_pemesan`
--
CREATE TABLE `data_pemesan` (
`nama_pemesan` varchar(100) NOT NULL,
`alamat` varchar(200) NOT NULL,
`email` varchar(50) NOT NULL,
`nomor_pemesanan` varchar(200) NOT NULL,
`hp` varchar(200) NOT NULL,
`id_data_pemesan` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `data_pemesan`
--
INSERT INTO `data_pemesan` (`nama_pemesan`, `alamat`, `email`, `nomor_pemesanan`, `hp`, `id_data_pemesan`) VALUES
('nila', 'nila3', 'test@gmail.com', '001', '823', 34),
('ktyi', 'kiyri', 'test@gmail.com', '002', '097', 35),
('lkfe', 'fsdfd', 'kl@gmail.com', '004', '023', 36);
-- --------------------------------------------------------
--
-- Struktur dari tabel `fasilitas`
--
CREATE TABLE `fasilitas` (
`id_fasilitas` int(11) NOT NULL,
`keterangan` varchar(5000) NOT NULL,
`status_fasilitas` int(11) NOT NULL,
`status_delete` int(11) NOT NULL,
`is_tiket` int(11) NOT NULL,
`id_kateg_fasilitas` int(11) NOT NULL,
`id_wisata` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `fasilitas`
--
INSERT INTO `fasilitas` (`id_fasilitas`, `keterangan`, `status_fasilitas`, `status_delete`, `is_tiket`, `id_kateg_fasilitas`, `id_wisata`) VALUES
(1, '<p>tiket pesawat</p>', 1, 0, 1, 3, 1),
(2, '<p>tiket pesawat</p>', 1, 0, 1, 3, 2),
(3, '<p>tiekt</p>', 1, 0, 1, 1, 8);
-- --------------------------------------------------------
--
-- Struktur dari tabel `itenerary`
--
CREATE TABLE `itenerary` (
`id_itenerary` int(11) NOT NULL,
`hari` varchar(100) NOT NULL,
`tujuan` varchar(500) NOT NULL,
`keterangan` varchar(5000) NOT NULL,
`id_wisata` int(11) NOT NULL,
`status_itenerary` int(11) NOT NULL,
`status_delete` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `itenerary`
--
INSERT INTO `itenerary` (`id_itenerary`, `hari`, `tujuan`, `keterangan`, `id_wisata`, `status_itenerary`, `status_delete`) VALUES
(1, '1 day', 'Bali', '<br>a. ITENERARY PAKET WISATA PULAU NUSA PENIDA\r\nDAY 1 (Broken Beach, Angel Bilabong, Kelingking Beach, Paluang Cliff, dan Crystal bay)\r\n- 07.30 Meeting Point di Pantai Sanur Jalan Hang Tuah (Dekat Warung Makan Mak Beng) untuk pengambilan tiket speedboat dan konfirmasi kehadiran di loket boat di Sanur\r\n- 08.00 Berangkat menuju Nusa Penida dengan Speedboat dengan lama perjalanan 40 menit\r\n- 08.45 Tiba di Pulau Nusa Penida. Driver siap jemput dengan membawa papan nama tamu\r\n- 10.00 Tiba di Obyek pertama Broken Beach, melihat keunikan pantai dengan tebing yang berlubang di tengah- tengahnya\r\n- 10.30 Tiba di Obyek kedua Angel Bilabong, kolam renang alami pada cekungan tebing. Bisa ambil aktivitas berenang\r\n- 12.30 Makan siang\r\n- 13.00 Tiba di obyek ke tiga Kelingking Beach, menikmati indahnya bukit kelingking yang berbentuk seperti kepala dinosaurus. Bisa juga mengambil aktivitas menuruni bukit untuk mencapai pantai kelingking\r\n- 13.30 Tiba di obyek ke empat, Paluang Cliff. Lokasi ini menikmati pesona bukit kelingking dari Belakang.\r\n- 15.00 Lokasi obyek ke lima di Crystal Bay melihat hamparan pantai dengan panorama atol di tengah laut atau bisa juga melakukan aktivitas berenang di pantai\r\n- 16.00 Kembali ke pelabuhan Nusa Penida, check in Tiket Penyebrangan di Loket Speadboat\r\n- 17.00 Kembali ke Pantai Sanur dengan Speedboat\r\n- 17.40 Tiba di pantai Sanur\r\n\r\nb. FASILITAS PAKET WISATA PULAU NUSA PENIDA\r\nINCLUDE\r\n- Kendaraan\r\n- Speedboat\r\n- Makan 1 kali\r\n- Tiket selama tour\r\n- Air Mineral selama trip\r\nEXCLUDE\r\n- Makan diluar program\r\n- Belanja Pribadi\r\n- Tips\r\n</br>', 1, 1, 0),
(2, '3 day', 'Bali', '<p>a. ITENERARY PAKET WISATA BALI\r\n\r\nDay 1 (GWK – Uluwatu)\r\n- Pickup di Bandara Internasional I Gusti Ngurah Rai Bali\r\n- Check in di Hotel\r\n- Mengunjungi Garuda Wisnu Kencana (GWK)\r\n- Makan siang disekitar GWK\r\n- Menuju Uluwatu\r\n- Makan malam disekitar Uluwatu\r\n- Kembali ke Hotel dan istirahat\r\n\r\nDay 2 (Pantai Pandawa – Pura Petitenget – Sunset di Pantai Kuta)\r\n- Sarapan di Hotel\r\n- Menuju ke Pantai Pandawa\r\n- Beralih ke Pura Petitenget\r\n- Makan siang disekitar Kuta\r\n- Explore ke tempat oleh-oleh \r\n- Menikmati sunset di Pantai Kuta\r\n- Makan malam disekitar Pantai Kuta\r\n- Kembali ke Hotel dan istirahat\r\n\r\nDay 3 (Pantai Melasti – Pura Tanah Lot – Pulang)\r\n- Sarapan di Hotel\r\n- Menuju Pantai Melasti, Tanah Lot\r\n- Beralih ke Pura Tanah Lot\r\n- Makan siang disekitar Tanah Lot\r\n- Kembali ke Hotel\r\n- Siap-siap untuk menuju Bandara I Gusti Ngurah Rai\r\n\r\nb. FASILITAS PAKET WISATA BALI\r\n\r\nINCLUDE\r\n- Tiket Pesawat\r\n- Penginapan 2 Malam\r\n- Kendaraan\r\n- Makan siang 3 kali\r\n- Air Mineral selama trip\r\nEXCLUDE\r\n- Tips \r\n- Kebutuhan pribadi\r\n</p>\r\n', 2, 1, 0),
(3, '2 day', 'Jawa Timur', '<p>a. ITENERARY PAKET WISATA BROMO\r\nDay 1 (Kedatangan, Desa Tengger)\r\n- 09.00 – 09.30 : Penjemputan (Hotel/Bandara/Stasiun di Malang).\r\n- 09.30 – 13.00 : Perjalanan ke Wonokitri.\r\n- 13.00 – 14.00 : Check In Hotel.\r\n- 14.00 – 15.00 : Istirahat, Sholat dan Makan.\r\n- 15.00 – 17.00 : Wisata Keliling desa Tengger\r\n- 17.00 – 18.00 : Kembali ke Hotel.\r\n- 18.00 – Selesai : Free Program.\r\n\r\nDay 2 (Gunung Bromo, Padang Savana, Pasir Berbisik, dan Bukit Teletubies)\r\n- 02.00 – 02.15 : Penjemputan di Hotel.\r\n- 02.15 – 03.00 : Perjalanan ke Wonokitri.\r\n- 03.00 – 06.00 Menunggu dan Menikmati indahnya sunrise Bromo.\r\n- 06.00 – 07.00 Kawah Bromo dan Pura Luhur Poten.\r\n- 07.00 – 09.00 Padang Savana, Pasir Berbisik dan Bukit Teletubies.\r\n- 09.00 – 10.00 Kembali ke Wonokitri.\r\n- 10.00 – 13.00 Kembali ke Malang/Batu/Surabaya.\r\n- 13.00 – 13.30 Drop ke Hotel/Bandara/Stasiun di kota Malang, Batu, Surabaya.\r\n- 14.00 Finish.\r\n\r\n\r\n\r\nb. FASILITAS PAKET WISATA BROMO\r\nINCLUDE\r\n- Transportasi antar-jemput Stasiun Malang/Bandara Abdul Rachman Saleh\r\n- Makan sesuai program 3x\r\n- Air mineral selama trip\r\n- Guest House/Homestay (sharing)\r\n- Tiket wisata\r\n- Jeep\r\n- Dokumentasi\r\n- Tour guide local\r\nEXCLUDE\r\n- Tipping Guide IDR 20.000/guest (Dikolektifkan kepada Tour Guide/Tour Leader)\r\n- Sewa Kuda\r\n- Hal-hal diluar fasilitas dan pengeluaran pribadi\r\n</p>', 3, 1, 0),
(4, '3 day', 'Belitung', '<p>a. ITENERARY PAKET WISATA BELITUNG\r\nDAY 1 (Tour Laskar Pelangi)\r\n- Penjemputan di Bandara Hanadjoedin\r\n- Sarapan di Mie Belitung\r\n- Menuju SD Muhammadiyah (SD Laskar Pelangi)\r\n- Menuju Rumah Keong ( Dermaga Kirana )\r\n- Beralih ke Museum Kata Andrea Hirata\r\n- Mengunjungi Kampung Ahok\r\n- Jadwal Makan Siang\r\n- Beralih ke Vihara Dewi Khuan In\r\n- Pergi ke Pantai Burung mandi\r\n- Kembali ke kota Tanjung Pandan\r\n- Tiba di hotel dan isitirahat\r\n- Jadwal Makan malam\r\n- Kembali ke Hotel dan istirahat.\r\n\r\nDAY 2 (Hopping Island)\r\n- Sarapan di Hotel\r\n- Pergi ke Pantai Tanjung Kelayang\r\n- Persiapan ke Hopping Island\r\n- Menuju Batu Garuda, Pulau Pasir, Pulau Batu Berlayar, dan Pulau Lengkuas\r\n- Jadwal Makan Siang\r\n- Snorkeling\r\n- Menuju Pulau Kelayang + Goa Kelayang\r\n- Kembali ke pantai Tanjung Kelayang\r\n- Kembali Pantai Tanjung Pendam\r\n- Kembali ke Hotel\r\n- Jadwal makan malam\r\n- Free Program\r\n- Kembali ke hotel dan istirahat.\r\n\r\nDAY 3 (City Tour)\r\n- Sarapan di Hotel\r\n- Menuju Pantai Tanjung Tinggi (Pantai Laskar Pelangi)\r\n- Belanja Oleh-oleh Belitung\r\n- Mengunjungi Rumah adat Belitung\r\n- Melihat Danau kaolin\r\n- Coffee Break Kongdjie\r\n- Pengantaran menuju Bandara H.AS Hanandjoedin\r\n- Trip Selesai.\r\n\r\nb. FASILITAS PAKET WISATA BELITUNG\r\nINCLUDE\r\n- Transportasi selama di Belitung\r\n- Tradisional boat\r\n- Makan sesuai Program 3x (Include Mie Belitung dan Es Jeruk Kunci)\r\n- Air mineral selama trip\r\n- Akomodasi Mitra Belitung\r\n- Tiket Wisata\r\n- Alat Snorkeling\r\n- Dokumentasi\r\n- Tour guide local\r\nEXCLUDE\r\n- Makan malam\r\n- Donasi Museum Kata Andrea Hirata (Buku saku Laskar Pelangi) IDR 50,000\r\n- Tipping Guide (Dikolektifkan kepada Tour Guide/Tour Leader)\r\n- Hal-hal di luar fasilitas dan pengeluaran pribadi\r\n</p>', 4, 1, 0),
(5, '3 day', 'Nusa Tenggara Timur', '<p>a. ITENERARY PAKET WISATA PULAU KOMODO\r\nDay 1 (Pulau Kanawa, dan Gili Lawa)\r\n- 09.00 – 10.00 : Berkumpul di area Meeting Point\r\n- 10.00 – 12.00 : Berangkat menuju ke Pulau Kanawa, Beraktivitas, dan Makan Siang\r\n- 12.00 – 14.00 : Berangkat menuju ke Manta Point\r\n- 14.00 – 15.30 : Snorkeling\r\n- 15.30 – 16.30 : Menuju ke Gili Lawa\r\n- 16.30 – 18.00 : Treking ke Puncak Gili Lawa (Lokasi Sunset View)\r\n- 18.00 – 19.00 : Kembali ke kapal\r\n- 19.00 – 20.00 : Acara Makan Malam\r\n- 20.00 – selesai : Acara bebas, beristirahat, finish hari pertama\r\nDay 2 (Pulau Padar, Pulau Komodo, Pink Beach, Pantai Namong, dan Pantai Kalong\r\n- 06.00 – 07.00 : Bangun Pagi dilanjutkan dengan sarapan pagi\r\n- 07.00 – 09.00 : Menuju ke Pulau Padar\r\n- 09.00 – 11.00 : Treking di Puncak Pulau Padar\r\n- 11.00 – 12.00 : Kembali ke kapal, Makan Siang, Menuju ke Pulau Komodo\r\n- 12.00 – 13.00 : Treking di Pulau Komodo\r\n- 13.00 – 15.00 : Menuju ke Pink Beach\r\n- 15.00 – 17.00 : Menuju ke Pantai Namong, aktifitas snorkelling\r\n- 17.00 – 18.00 : Menuju ke Pulau Kalong (Lokasi Sunset View)\r\n- 18.00 – 18.30 : Kembali ke Kapal\r\n- 18.30 – 19.30 : Istirahat, Bersih-bersih, acara makan malam\r\n- 19.00 – selesai : istirahat, finish hari kedua\r\nDay 3 (Taka Makassar, dan Pulau Kelor)\r\n- 07.00 – 08.00 : Bangun, Sarapan pagi\r\n- 08.00 – 10.00 : Menuju ke Taka Makassar\r\n- 10.00 – 12.00 : Pelaksanaan aktivitas di Taka Makassar\r\n- 12.00 – 15.00 : Kembali ke kapal, menuju ke Pulau Kelor, Makan siang\r\n- 15.00 – 17.00 : Aktivitas di Pulau Kelor (Treking & Snorkeling)\r\n- 17.00 – 18.00 : Kembali menuju ke Labuan Bajo\r\n- 18.00 – Selesai : Sampai di Labuan Bajo, perpisahan, trip selesai\r\n\r\nb. FASILITAS PAKET WISSATA PULAU KOMODO\r\nINCLUDE\r\n- Transport Airport – Hotel / Meeting Point 2x (return)\r\n- Sekoci / Speed Boat\r\n- Makan sesuai program\r\n- Alat Snorkeling\r\n- Mineral water free refill\r\n- Tour Leader & Guide Lokal\r\n- Snack, Coffee, & Tea selama trip\r\n- Life Jacket\r\nEXCLUDE\r\n- Transportasi dari dan menuju kota asal\r\n- Makan dan Minum di luar Program\r\n- Tipping Guide dan Boat crew (Dikolektifkan kepada Tour Guide / Tour Leader)\r\n- Tiket masuk Taman Nasional Komodo\r\n- Hal-hal yang diluar fasilitas dan pengeluaran pribadi\r\n</p>', 5, 1, 0),
(6, '1 day', 'Kepulauan Seribu', '<p>a. ITENERARY PAKET WISATA KEPULAUAN SERIBU\r\nDay I (Pulau Kelor, Pulau Onrust, dan Pulau Cipir)\r\n- 08.00 - 08.30 Meeting Point di Dermaga Kamal Muara, bertemu dengan team kami\r\n- 08.30 - 09.30 Menuju Pulau Kelor, photostop dan explore Pulau Kelor\r\n- 09.30 - 10.00 Menuju Pulau Onrust\r\n- 10.00 - 13.00 Tour sejarah dan explore Pulau Onrust. Istirahat, shalat, dan makan di Pulau Onrust\r\n- 13.00 - 16.00 Menuju Pulau Cipir, photostop dan explore Pulau Cipir\r\n- 16.00 - 17.00 Kembali ke Dermaga Kamal Muara, Sayonara.\r\n\r\nb. FASILITAS PAKET WISATA KEPULAUAN SERIBU\r\nINCLUDE\r\n- Transportasi kapal tradisional\r\n- Biaya retribusi Pulau\r\n- Life jacket\r\n- Makan sesuai Program 1x\r\n- Air mineral selama trip\r\n- Dokumentasi\r\n- Tour guide lokal\r\nEXCLUDE\r\n- Tipping Guide (Dikolektifkan kepada Tour Guide/Tour Leader)\r\n- Hal-hal diluar fasilitas dan pengeluaran pribadi\r\n</p>', 6, 1, 0),
(7, '2 day', 'Kepulauan Seribu', '<p>a. ITENERARY PAKET WISATA PULAU TIDUNG\r\nDAY 1 (Pulau Tidung, Pantai Tanjung Barat, dan Pantai Jembatan Cinta)\r\n- 06.00-06.30 WIB: Sudah berkumpul di pelabuhan kaliadem muara angke, kapal berangkat menuju pulau tidung pukul 08.00 WIB.\r\n- 08.00 WIB: Kapal berangkat menuju pulau tidung.\r\n- 10.30 WIB: Tiba di pelabuhan pulau tidung langsung menuju homestay untuk check-in (dipandu tour guide), setelah sampai di homestay istirahat sejenak sambil menikmati welcomedrink.\r\n- 11.00-12.00 WIB: Makan siang.\r\n- 12.00-13.00 WIB: Istirahat sejenak, menunggu waktu snorkeling tiba.\r\n- 13.00-15.00 WIB: Snorkeling di perairan/laut pulau tidung kecil & pulau payung.\r\n- 15.00-16.00 WIB: Mampir ke pantai jembatan cinta. (bermain banana boat bagi yang booking paket lengkap).\r\n- 16.00-17.00 WIB: Kembali ke homestay.\r\n- 17.00-18.00 WIB: Hunting sunset di pantai tanjung barat.\r\n- 18.00-19.00 WIB: Makan malam.\r\n- 19.00-21.00 WIB: Istirahat sejenak, sambil menunggu waktu barbeque tiba.\r\n- 21.00 WIB: Barbeque time s/d selesai.\r\n\r\nDAY 2 (Pantai Saung Cemara)\r\n- 05.30-07.30 WIB: Hunting sunrise di pantai jembatan cinta & lanjut ke pantai saung cemara.\r\n- 07.30-08.30 WIB: Sarapan pagi.\r\n- 08.30-09.30 WIB: Siap packing.\r\n- 09.30-10.00 WIB: Berkumpul di pelabuhan pulau tidung.\r\n- 10.00-11.00 WIB: Kapal berangkat menuju Jakarta.\r\n\r\n\r\nb. FASILITAS PAKET WISATA PULAU TIDUNG\r\nINCLUDE\r\n- Tiket kapal PP Pelabuhan Kali Adem – Pulau Tidung\r\n- Welcome drink, makan sesuai program 3x, dan barbeque\r\n- Air mineral selama trip\r\n- Sepeda selama di Pulau Tidung\r\n- Guest House/Homestay (sharing)\r\n- Tiket wisata dan Retribusi\r\n- Alat Snorkeling\r\n- Kamera Underwater\r\n- Tour guide local\r\n- Asuransi perjalanan by Mega/MSIG Insurance\r\nEXCLUDE\r\n- Tipping Guide (Dikolektifkan kepada Tour Guide / Tour Leader)\r\n- Hal-hal diluar fasilitas dan pengeluaran pribadi\r\n</p>', 7, 1, 0),
(8, '3 day', 'Malaysia', '<p>a. ITENERARY PAKET WISATA MALYSIA\r\nDAY 1 (Dataran Merdeka, Masjid Negara, Cocoa Boutique dan Petronas Twin Tower)\r\n- Tiba di Bandara KLIA, bertemu dengan Tour Guide Berlisensi Bahasa Indonesia (tamu group)\r\n- Tour Kuala Lumpur ke Dataran Merdeka, I Love KL Boutique, en-route Masjid Negara, Cocoa Boutique & Photostop di Petronas Twin Tower KLCC\r\n- Check in Hotel \r\n\r\nDAY 2 (Istana Raja, Batu Caves, Genting Highland, Sungei Wang, dan Bukit Bintang)\r\n- City Tour Kuala Lumpur ke Istana Raja Malaysia, Batu Caves Patung Emas, Lokal Produk, Genting Highland (Sudah Termasuk Tiket Skyway Cable Car), Belanja di Genting Premium Outlets & Mall Sungei Wang Bukit Bintang\r\n- Kembali ke hotel\r\n\r\nDAY 3 (Dataran Putrajaya, Masjid Putrajaya, dan Mitsui Premium Outlets)\r\n- Check out dari hotel, City Tour Putrajaya ke Jembatan Sri Warisan, Dataran Putrajaya, Masjid Putra, Danau Putrajaya & Kantor Perdana Menteri Malaysia\r\n- Belanja di Mitsui Premium Outlets (Jika Ada Waktu)\r\n- Di antar ke Bandara KLIA (Min 3 jam sebelum keberangkatan)\r\n\r\nb. FASILITAS PAKET WISATA MALAYSIA\r\nINCLUDE\r\n- Tour Leader\r\n- Menginap di hotel *3\r\n- Snack dan Air Mineral\r\n- Tiket masuk objek wisata dan Guide Lokal\r\nEXCLUDE\r\n- Antar - jemput dari rumah ke bandara di kota asal\r\n- Airport tax, fiskal dan tax lainnya yang berlaku di negara-negara tempat-tempat yang dikunjungi.\r\n- Biaya pembuatan dokumen perjalanan: paspor, visa, dll.\r\n- Asuransi perjalanan.\r\n- Excess baggage (biaya kelebihan barang bawaan di atas 20 kg).\r\n- Biaya bea masuk bagi barang yang dikenakan bea masuk oleh duane di Jakarta / Surabaya / negara-negara yang dikunjungi.\r\n- Tips guide, Optional Tour, dan acara di luar itinerary\r\n- Keperluan yang bersifat pribadi\r\n</p>', 8, 1, 0),
(9, '3 day', 'Thailand', '<p>a. ITENERARY PAKET WISATA THAILAND\r\nDAY 1 (Wat Arun, Wat Pho, Royal Grand Palace, Wat Pha Kaew, dan Siam Niramit Show)\r\n- Tiba di Bandara Internasional Suvarnabhumi, bertemu dengan Tour Guide Berlisensi Bahasa Indonesia (tamu group)\r\n- Tour Thailand ke 5 Objek Wisata yaitu Wat Arun, Wat Pho, Royal Grand Palace, Wat Pha Kaew, dan Siam Niramit Show\r\n- Check in Hotel \r\n\r\nDAY 2 (ke Jim Thompson House, Vimanek Mansion, Khao San Road serta Chinatown)\r\n- City Tour Thailand ke Jim Thompson House, Vimanek Mansion, Khao San Road serta Chinatown\r\n- Kembali ke hotel\r\n\r\nDAY 3 (Chatuchak Weekend Market dan MBK Shopping Mall)\r\n- Check out dari hotel\r\n- Belanja di Chatuchak Weekend Market atau MBK Shopping Mall\r\n- Di antar ke Bandara Internasional Suvarnabhumi (Min 3 jam sebelum keberangkatan)\r\n\r\nb. FASILITAS PAKET WISATA THAILAND\r\nINCLUDE\r\n- Tour Leader\r\n- Menginap di hotel *3\r\n- Snack dan Air Mineral\r\n- Tiket masuk objek wisata dan Guide Lokal\r\n \r\nEXCLUDE\r\n- Antar - jemput dari rumah ke bandara di kota asal\r\n- Airport tax, fiskal dan tax lainnya yang berlaku di negara-negara tempat-tempat yang dikunjungi.\r\n- Biaya pembuatan dokumen perjalanan: paspor, visa, dll.\r\n- Asuransi perjalanan.\r\n- Excess baggage (biaya kelebihan barang bawaan di atas 20 kg).\r\n- Biaya bea masuk bagi barang yang dikenakan bea masuk oleh duane di Jakarta / Surabaya / negara-negara yang dikunjungi.\r\n- Tips guide, Optional Tour, dan acara di luar itinerary\r\n- Keperluan yang bersifat pribadi\r\n</p>', 9, 1, 0),
(10, '3 day', 'Singapore', '<p>a. ITENERARY PAKET WISATA SINGAPORE\r\nDAY 1 (Seputar Bugis, Merlion Park, Esplanade, Marina Bay Sands, Gardens by the Bay, Seputar Orchard Road)\r\n- 09.00 Berangkat dari Indonesia\r\n- 11.00 Tiba di Changi International Airport, Singapura\r\n- 12.00 Menuju ke hotel\r\n- 13.00 Makan siang di Kampong Glam dan belanja di seputar Bugis\r\n- 15.30 Menuju ke Merlion Park untuk foto di Patung Merlion\r\n- 16.00 Jalan kaki ke Esplanade, yang ada di seberang Merlion Park\r\n- 17.00 Menikmati sore di Gardens by the Bay, naik OCBC Skyway\r\n- 18.00 Marina Bay Sands Mall, jalan kaki dari Gardens by the Bay\r\n- 19.30 Menuju ke Orchard Road, jalan-jalan dan makan malam\r\n- 20.00 Makan malam di foodcourt 313@Somerset atau di Ion Orchard\r\n- 22.00 Balik ke hotel dan istirahat\r\n\r\nDAY 2 (Singapore Botanic Gardens, Sentosa Island, Little India, Clarke Quay, Chinatown)\r\n- 08.00 Sarapan di hotel dan persiapan jalan-jalan\r\n- 09.00 Ke Singapore Botanic Gardens dan National Orchid Garden\r\n- 12.00 Menuju ke VivoCity Mall, makan siang di foodcourt\r\n- 13.00 Ke Sentosa Island dan foto depan Universal Studios Singapore\r\n- 14.00 Keliling Sentosa Island\r\n- 17.00 Ke Little India, jalan-jalan dan foto seputar daerah ini\r\n- 18.00 Ke Clarke Quay, menikmati suasana seputar Singapore River\r\n- 20.00 Keliling Chinatown, makan malam dan belanja oleh-oleh\r\n- 23.00 Balik ke hotel, istirahat\r\n\r\nDAY 3 (Pulau Ubin atau hanya di Changi International Airport, kembali ke Indonesia)\r\n- 08.00 Sarapan di hotel dan check-out\r\n- 09.00 Jika mau, ke Pulau Ubin – Kampong terakhir di Singapura\r\n- 11.00 Balik dari Pulau Ubin menuju ke Changi Airport\r\n- 13.00 Makan siang di Changi Airport dan siap-siap balik ke Indonesia\r\n\r\nc. FASILITAS PAKET WISATA SINAGPORE\r\nINCLUDE\r\n- Tour Leader\r\n- Menginap di hotel *3\r\n- Snack dan Air Mineral\r\n- Tiket masuk objek wisata dan Guide Lokal\r\n \r\nEXCLUDE\r\n- Antar - jemput dari rumah ke bandara di kota asal\r\n- Airport tax, fiskal dan tax lainnya yang berlaku di negara-negara tempat-tempat yang dikunjungi.\r\n- Biaya pembuatan dokumen perjalanan: paspor, visa, dll.\r\n- Asuransi perjalanan.\r\n- Excess baggage (biaya kelebihan barang bawaan di atas 20 kg).\r\n- Biaya bea masuk bagi barang yang dikenakan bea masuk oleh duane di Jakarta / Surabaya / negara-negara yang dikunjungi.\r\n- Tips guide, Optional Tour, dan acara di luar itinerary\r\n- Keperluan yang bersifat pribadi\r\n\r\n</p>', 10, 1, 0),
(11, '6 day', 'Thailand, Singapore, Malaysia', '<p>a. ITENERARY PAKET WISATA 3 NEGARA ASIA Day 1 ( Explore Malaka, Johor Bahru) - Berkumpul di bandara Soekarno Hatta - Tiba di Kuala Lumpur bertemu dengan perwakilan kami - Makan siang di Restorant Lokal - Perjalanan menuju Johor Bahru via MALAKA - Setelah tiba di malaka di ajak city tour mengunjungi kota sejarah seperti : Benteng Portugis, Gedung Merah, Gereja Malaka, Kincir Air Belanda, Forta D’santiago, Patung Santo Francis Savier, Gereja Santo Paulus, Kota A’famosa, Street Harmoni / Jongker Street - Makan malam di Restorant Lokal - Setelah itu perjalanan ke Johor Bahru - Check in hotel - Acara bebas DAY 2 (Johor Bahru – Fullday Singapore – Malaka) - Sarapan pagi di hotel - Berangkat menuju Singapore via Second Link. - Tiba di Singapore, kemudian Anda di ajak mengunjungi : Patung Merlion dan Garden By The Bay - Setelah itu makan siang di Restorant Lokal - Kemudian perjalanan di lanjutkan ke: Bugis & Orchard Road, Sentosa Island, Universal Studio - Sore hari berangkat kembali ke Malaysia - Makan malam di rest area menuju Malaka - Check in hotel - Acara Bebas DAY 3 (Malaka – Kuala Lumpur – Ipoh – Kedah) - Sarapan agi pagi di hotel - Berangkat menuju Kuala Lumpur untuk mengunjungi : Dataran Merdeka, Petronas Twin Tower, Chocolate Factory, Istana Merdeka - Setelah makan siang, melanjutkan perjalanan menuju Kedah - Tiba di Ipoh untuk mengunjungi : Kellies Castle, Kek Loh Tong - Makan malam di Kedah - Check in hotel, Acara bebas DAY 4 (Kedah – Hat Yai) - Sarapan pagi di hotel, berangkat menuju Hatyai via perbatasan Malaysia – Thailand yaitu Sadao Border untuk penukaran mata uang lokal dan pengisian imigration card & check - Tiba di Hatyai kemudian berangkat menuju Songkla - Kemudian acara city tour di lanjutkan menuju : Sleeping Budha, Mermaid Statue, Shopping Ke Kaysorn Souvenir, Reenu Local Product - Lalu berangkat menuju Hat Yai Floating Market - Makan malam dan check-in hotel - Acara bebas dan menikmati kuliner malam dan shopping bazzar di kawasan Lee Garden Plaza DAY 5 (Hat Yai – Kuala Lumpur) - Sarapan pagi di hotel, berangkat menuju Kuala Lumpur kurang lebih 7 jam pejalanan - Tiba di Kuala Lumpur City, kemudian Anda di ajak City Tour mengunjungi : Batu Cave yang merupakan kuil India terbesar di Malaysia, menaiki anak tangga untuk mencapai gua - Makan siang di Restorant Lokal - Setelah itu belanja di sungai Wang Plaza - Makan malam di Restorant Lokal - Check in hotel - Acara Bebas DAY 6 (Kuala Lumpur – Genting Highland – Airport) - Sarapan pagi di hotel - Berangkat menuju Genting Highland yang merupakan pusat hiburan keluarga dan arena bermain serta kasino dengan menggunakan Cable Car - Kembali ke Kuala Lumpur - Makan siang di restorant local - Mengunjungi Putrajaya - Berangkat ke Bandara KLIA untuk kembali ke Indonesia - Paket Tour 3 Negara Malaysia, Singapore, Thailand 6 Hari 5 Malam selesai, b. FASILITAS PAKET WISATA 3 NEGARA ASIA INCLUDE - Tiket Pesawat Jakarta – Kuala Lumpur PP - Hotel 5 malam di Hotel Bintang 3 - Bagasi Sesuai Maskapai - Transportasi Bus pariwisata AC - Makan Sesuai Jadwal (pagi, siang dan malam) - Tiket biaya masuk wisata yang tercantum - Air Mineral 600ml 1x 1 hari EXCLUDE - Tipping Guide dan Adm IDR 200.000 / Orang - Tourism Tax +- MYR 20 / Orang - Depart Tax +- MYR 8 / Orang - Hal hal yang tidak disebutkan dalam program acara - Makan dan minum diluar program - Kelebihan bagasi - Biaya pengeluaran pribadi selama tour berlangsung - Biaya pembuatan pasport baru atau perpanjang</p>', 11, 0, 0),
(12, 'uu', 'hh', '<p>jkk</p>', 2, 1, 0);
-- --------------------------------------------------------
--
-- Struktur dari tabel `kategori_fasilitas`
--
CREATE TABLE `kategori_fasilitas` (
`id_kateg_fasilitas` int(11) NOT NULL,
`kategori_wisata` varchar(50) NOT NULL,
`status_delete` int(11) NOT NULL,
`status_kateg_fasilitas` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `kategori_fasilitas`
--
INSERT INTO `kategori_fasilitas` (`id_kateg_fasilitas`, `kategori_wisata`, `status_delete`, `status_kateg_fasilitas`) VALUES
(1, 'include', 0, 1),
(2, 'exclude', 0, 0),
(3, 'testing', 0, 1);
-- --------------------------------------------------------
--
-- Struktur dari tabel `komentar`
--
CREATE TABLE `komentar` (
`id_komentar` int(11) NOT NULL,
`nama_komentar` varchar(20) NOT NULL,
`isi` varchar(500) NOT NULL,
`tgl_komentar` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `komentar`
--
INSERT INTO `komentar` (`id_komentar`, `nama_komentar`, `isi`, `tgl_komentar`) VALUES
(1, 'lina', 'testing sekarang', '2021-01-11'),
(2, 'test', 'ok lah', '2021-01-11'),
(3, 'Ani', 'pelayanan baik', '2021-01-18'),
(4, 'Ani', 'pelayanan baik', '2021-01-18');
-- --------------------------------------------------------
--
-- Struktur dari tabel `lokasi`
--
CREATE TABLE `lokasi` (
`id_lokasi` int(11) NOT NULL,
`lokasi` varchar(200) NOT NULL,
`status_lokasi` int(11) NOT NULL,
`status_delete` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `lokasi`
--
INSERT INTO `lokasi` (`id_lokasi`, `lokasi`, `status_lokasi`, `status_delete`) VALUES
(1, 'Bali', 1, 0),
(2, 'Pulau Nusa Dua', 1, 0),
(3, 'Thailand', 1, 0),
(4, 'Singapur', 0, 1),
(6, 'Jawa Timur', 1, 0),
(7, 'Bangka Belitung', 1, 0),
(8, 'Nusa Tenggara Timur', 1, 0),
(9, 'Kepulauan Seribu', 1, 0),
(10, 'Malaysia', 1, 0),
(11, 'Thai,SG,KL', 1, 0);
-- --------------------------------------------------------
--
-- Struktur dari tabel `migrations`
--
CREATE TABLE `migrations` (
`migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data untuk tabel `migrations`
--
INSERT INTO `migrations` (`migration`, `batch`) VALUES
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1);
-- --------------------------------------------------------
--
-- Struktur dari tabel `oborolan`
--
CREATE TABLE `oborolan` (
`id_oborolan` int(11) NOT NULL,
`oborolan` varchar(200) NOT NULL,
`status_oborolan` int(11) NOT NULL,
`tgl_oboralan` date NOT NULL,
`nama_pengirim` varchar(200) NOT NULL,
`nama_penerima` varchar(200) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Struktur dari tabel `paket_wisata`
--
CREATE TABLE `paket_wisata` (
`id_wisata` int(11) NOT NULL,
`nama_wisata` varchar(500) NOT NULL,
`id_lokasi` int(11) NOT NULL,
`waktu` varchar(100) NOT NULL,
`harga` bigint(20) NOT NULL,
`id_trip` int(11) DEFAULT NULL,
`status_wisata` int(11) NOT NULL,
`status_delete` int(11) NOT NULL,
`image` varchar(200) NOT NULL,
`jumlah_orang` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `paket_wisata`
--
INSERT INTO `paket_wisata` (`id_wisata`, `nama_wisata`, `id_lokasi`, `waktu`, `harga`, `id_trip`, `status_wisata`, `status_delete`, `image`, `jumlah_orang`) VALUES
(1, 'Pulau Nusa Penida', 2, '1D', 699000, 1, 1, 1, 'nusa.png', 5),
(2, 'Bali Island', 1, '3D2N', 1950000, 2, 1, 0, 'bali.jpg', 4),
(3, 'Bromo Mountain', 6, '2D1N', 600000, 2, 0, 0, 'bromo.png', 4),
(4, 'Belitung Island', 7, '3D2N', 950000, 2, 0, 0, 'belitung.png', 5),
(5, 'Komodo Island', 8, '3D2N', 2300000, 2, 0, 0, 'komodo.png', 4),
(6, 'Kepulauan Seribu', 9, '1D', 120000, 1, 0, 0, 'seribu.png', 5),
(7, 'Tidung Island', 9, '2D1N', 385000, 2, 0, 0, 'tidung.png', 4),
(8, 'Malaysia', 10, '3D2N', 1800000, 3, 1, 0, 'malaysia.png', 5),
(9, 'Thailand', 3, '3D2N', 1950000, 3, 1, 0, 'thai.png', 5),
(10, 'Singapore', 4, '3D2N', 1900000, 3, 1, 0, 'singapore.png', 5),
(11, 'Thailand, Malaysia, Singapore', 11, '6D5N', 5400000, 3, 1, 0, 'thaisgkl.png', 5);
-- --------------------------------------------------------
--
-- Struktur dari tabel `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Struktur dari tabel `pelanggan`
--
CREATE TABLE `pelanggan` (
`id_pengguna` int(11) NOT NULL,
`nama` varchar(200) NOT NULL,
`email` varchar(50) NOT NULL,
`username` varchar(50) NOT NULL,
`password` varchar(100) NOT NULL,
`alamat` varchar(100) NOT NULL,
`tgl_lahir` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `pelanggan`
--
INSERT INTO `pelanggan` (`id_pengguna`, `nama`, `email`, `username`, `password`, `alamat`, `tgl_lahir`) VALUES
(1, 'lina', 'lina@gmail.com', 'lina', '12345', 'jakarta', '2021-01-11');
-- --------------------------------------------------------
--
-- Struktur dari tabel `pemesanan`
--
CREATE TABLE `pemesanan` (
`nomor_pemesanan` varchar(200) NOT NULL,
`status_pemesanan` int(11) NOT NULL,
`tgl_pemesanan` datetime NOT NULL,
`total` int(11) NOT NULL,
`pembayaran` int(11) NOT NULL,
`bukti_pembayaran` varchar(200) DEFAULT NULL,
`tgl_wisata` date DEFAULT NULL,
`status_delete` int(11) NOT NULL,
`id_pelanggan` int(11) NOT NULL,
`nama_pelanggan` varchar(50) NOT NULL,
`status_approve` int(11) NOT NULL,
`jumlah_bayar` int(11) DEFAULT NULL,
`status` int(11) NOT NULL,
`id_pemesanan` bigint(200) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `pemesanan`
--
INSERT INTO `pemesanan` (`nomor_pemesanan`, `status_pemesanan`, `tgl_pemesanan`, `total`, `pembayaran`, `bukti_pembayaran`, `tgl_wisata`, `status_delete`, `id_pelanggan`, `nama_pelanggan`, `status_approve`, `jumlah_bayar`, `status`, `id_pemesanan`) VALUES
('001', 2, '2021-01-20 00:00:00', 1800000, 2, '1611158035.png', NULL, 0, 6, 'Ani', 2, 540000, 0, 48),
('002', 2, '2021-01-18 23:52:22', 1950000, 1, '1611161592.jpeg', NULL, 0, 6, 'Ani', 2, 585000, 0, 49),
('003', 0, '2021-01-21 01:03:44', 1800000, 0, NULL, NULL, 0, 6, 'Ani', 0, NULL, 0, 50),
('004', 0, '2021-01-19 01:18:25', 5400000, 1, '1611166755.jpeg', NULL, 0, 6, 'Ani', 0, 1620000, 0, 51);
-- --------------------------------------------------------
--
-- Struktur dari tabel `pemesanan_detail`
--
CREATE TABLE `pemesanan_detail` (
`id_pemesanan_detail` int(11) NOT NULL,
`nama_wisata` varchar(200) NOT NULL,
`jumlah` int(11) NOT NULL,
`nomor_pemesanan` varchar(200) NOT NULL,
`lokasi` varchar(100) NOT NULL,
`trip` varchar(100) NOT NULL,
`waktu` varchar(50) NOT NULL,
`status_delete` int(11) NOT NULL,
`id_wisata` int(11) NOT NULL,
`dari_tgl_wisata` date NOT NULL,
`sampai_tgl_wisata` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `pemesanan_detail`
--
INSERT INTO `pemesanan_detail` (`id_pemesanan_detail`, `nama_wisata`, `jumlah`, `nomor_pemesanan`, `lokasi`, `trip`, `waktu`, `status_delete`, `id_wisata`, `dari_tgl_wisata`, `sampai_tgl_wisata`) VALUES
(86, 'Malaysia', 1800000, '001', 'Malaysia', 'International Trip', '3D2N', 0, 8, '2021-02-07', '2021-02-09'),
(87, 'Thailand', 1950000, '002', 'Thailand', 'International Trip', '3D2N', 0, 9, '2021-05-10', '2021-05-13'),
(88, 'Malaysia', 1800000, '003', 'Malaysia', 'International Trip', '3D2N', 0, 8, '2021-02-07', '2021-02-09'),
(89, 'Thailand, Malaysia, Singapore', 5400000, '004', 'Thai,SG,KL', 'International Trip', '6D5N', 0, 11, '2021-10-01', '2021-10-06');
-- --------------------------------------------------------
--
-- Struktur dari tabel `refund`
--
CREATE TABLE `refund` (
`nomor_pemesanan` varchar(100) NOT NULL,
`total_sebelum` int(11) NOT NULL,
`total_refund` int(11) NOT NULL,
`nama_pelanggan` varchar(100) NOT NULL,
`waktu` varchar(100) NOT NULL,
`lokasi` varchar(100) NOT NULL,
`trip` varchar(100) NOT NULL,
`status_approve` int(11) NOT NULL,
`dari_tgl_wisata` date NOT NULL,
`sampai_tgl_wisata` date NOT NULL,
`nama_wisata` varchar(100) NOT NULL,
`id_pelanggan` int(11) NOT NULL,
`tgl_refund` date NOT NULL,
`id_refund` bigint(20) NOT NULL,
`tgl_pemesan` datetime NOT NULL,
`status_refund` int(11) NOT NULL,
`rek` varchar(50) DEFAULT NULL,
`hp` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `refund`
--
INSERT INTO `refund` (`nomor_pemesanan`, `total_sebelum`, `total_refund`, `nama_pelanggan`, `waktu`, `lokasi`, `trip`, `status_approve`, `dari_tgl_wisata`, `sampai_tgl_wisata`, `nama_wisata`, `id_pelanggan`, `tgl_refund`, `id_refund`, `tgl_pemesan`, `status_refund`, `rek`, `hp`) VALUES
('001', 1800000, 450000, 'nila', '3D2N', 'Malaysia', 'International Trip', 1, '2021-09-10', '2021-08-09', 'Malaysia', 6, '2021-01-20', 2, '2021-01-20 00:00:00', 1, '8798', '076'),
('002', 1950000, 487500, 'ktyi', '3D2N', 'Thailand', 'International Trip', 2, '2021-05-10', '2021-05-13', 'Thailand', 6, '2021-01-20', 7, '2021-01-20 23:52:22', 1, '54545', '98867'),
('004', 5400000, 1350000, 'lkfe', '6D5N', 'Thai,SG,KL', 'International Trip', 0, '2021-10-01', '2021-10-06', 'Thailand, Malaysia, Singapore', 6, '2021-01-21', 8, '2021-01-21 01:18:25', 0, NULL, NULL);
-- --------------------------------------------------------
--
-- Struktur dari tabel `reschedule`
--
CREATE TABLE `reschedule` (
`id_reschedule` int(11) NOT NULL,
`nomor_pemesanan` int(11) NOT NULL,
`total_sebelum` int(11) NOT NULL,
`total_reschedule` int(11) NOT NULL,
`status_delete` int(11) NOT NULL,
`from_tgl_wisata` date NOT NULL,
`id_pelanggan` int(11) NOT NULL,
`to_tgl_wisata` date NOT NULL,
`new_tgl_wisata` varchar(200) DEFAULT NULL,
`nama_pelanggan` varchar(50) NOT NULL,
`nama_wisata` varchar(100) NOT NULL,
`lokasi` varchar(100) NOT NULL,
`status_approve` int(11) NOT NULL,
`status_reschedule` int(11) NOT NULL,
`hp` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `reschedule`
--
INSERT INTO `reschedule` (`id_reschedule`, `nomor_pemesanan`, `total_sebelum`, `total_reschedule`, `status_delete`, `from_tgl_wisata`, `id_pelanggan`, `to_tgl_wisata`, `new_tgl_wisata`, `nama_pelanggan`, `nama_wisata`, `lokasi`, `status_approve`, `status_reschedule`, `hp`) VALUES
(1, 1, 1800000, 1800000, 0, '2021-09-10', 6, '2021-08-09', '2021-02-07 - 2021-02-09', 'nila', 'Malaysia', 'Malaysia', 2, 1, '9232'),
(2, 2, 1950000, 1950000, 0, '2021-05-10', 6, '2021-05-13', NULL, 'ktyi', 'Thailand', 'Thailand', 0, 0, NULL),
(3, 4, 5400000, 5400000, 0, '2021-10-01', 6, '2021-10-06', NULL, 'lkfe', 'Thailand, Malaysia, Singapore', 'Thai,SG,KL', 0, 0, NULL);
-- --------------------------------------------------------
--
-- Struktur dari tabel `reschedule_detail`
--
CREATE TABLE `reschedule_detail` (
`id_reschedule_detail` int(11) NOT NULL,
`nama_wisata` varchar(200) NOT NULL,
`lokasi` varchar(100) NOT NULL,
`trip` varchar(100) NOT NULL,
`waktu` varchar(150) NOT NULL,
`status_delete` int(11) NOT NULL,
`id_reschedule` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Struktur dari tabel `syarat`
--
CREATE TABLE `syarat` (
`id_syarat` int(10) NOT NULL,
`keterangan` varchar(5000) NOT NULL,
`id_wisata` int(11) NOT NULL,
`status_syarat` int(11) NOT NULL,
`status_delete` int(11) NOT NULL,
`judul` varchar(150) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `syarat`
--
INSERT INTO `syarat` (`id_syarat`, `keterangan`, `id_wisata`, `status_syarat`, `status_delete`, `judul`) VALUES
(1, 'PEMBAYARAN\r\n- Pembayaran dapat dilakukan dengan membayar DP sebesar 30% terlebih dahulu\r\n- Pelunasan dilakukan h-3 sebelum berangkat. Nanti akan terdapat alert pelunasan.\r\n- Pembayaran bisa dilakukan dengan Transfer Bank yang dipilih, wajib melakukan konfirmasi pembayaran di halaman konfirmasi atau mengiriman Bukti Transfer via whatsapp Alfa Tour and Travel.\r\n- Setelah melakukan transfer, pihak Alfa Tour and Travel akan mengirimkan invoice ke email atau Whatsapp.\r\n- Alfa Tour and Travel akan konfirmasi untuk perjalanan anda\r\n', 1, 0, 0, ''),
(2, '<p>qe</p>', 2, 1, 0, 'yr');
-- --------------------------------------------------------
--
-- Struktur dari tabel `tanggal_wisata`
--
CREATE TABLE `tanggal_wisata` (
`dari_tanggal` date NOT NULL,
`sampai_tanggal` date NOT NULL,
`id_wisata` int(11) NOT NULL,
`status_delete` int(11) NOT NULL,
`id_tanggal` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `tanggal_wisata`
--
INSERT INTO `tanggal_wisata` (`dari_tanggal`, `sampai_tanggal`, `id_wisata`, `status_delete`, `id_tanggal`) VALUES
('2021-01-11', '2021-01-13', 2, 1, 1),
('2021-01-11', '0201-01-12', 1, 1, 2),
('2021-02-04', '2021-02-05', 3, 0, 3),
('2021-03-15', '2021-03-17', 4, 0, 4),
('2021-05-07', '2021-05-08', 6, 1, 5),
('2021-09-26', '2021-09-28', 5, 0, 6),
('2021-12-25', '2021-12-26', 7, 0, 7),
('2021-02-07', '2021-02-09', 8, 0, 8),
('2021-09-10', '2021-08-09', 8, 0, 9),
('2021-01-15', '2021-01-16', 1, 0, 10),
('2021-02-07', '2021-02-08', 1, 0, 11),
('2021-02-07', '2021-02-08', 6, 1, 12),
('2021-03-07', '2021-03-08', 6, 1, 13),
('2021-02-07', '2021-02-08', 6, 1, 14),
('2021-02-09', '2021-02-11', 2, 1, 15),
('2021-02-19', '2021-02-21', 2, 0, 16),
('2021-02-20', '2021-02-21', 3, 0, 17),
('2021-04-02', '2021-04-04', 4, 0, 18),
('2021-05-10', '2021-05-13', 9, 0, 19),
('2021-08-10', '2021-08-13', 10, 0, 20),
('2021-10-01', '2021-10-06', 11, 0, 21);
-- --------------------------------------------------------
--
-- Struktur dari tabel `tiket_pemesanan`
--
CREATE TABLE `tiket_pemesanan` (
`id_tiket_pemesanan` int(11) NOT NULL,
`nama_pemesanan` varchar(200) NOT NULL,
`nomor_pemesanan` int(11) NOT NULL,
`status_delete` int(11) NOT NULL,
`id_wisata` int(11) NOT NULL,
`nama_wisata` varchar(100) NOT NULL,
`ktp` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `tiket_pemesanan`
--
INSERT INTO `tiket_pemesanan` (`id_tiket_pemesanan`, `nama_pemesanan`, `nomor_pemesanan`, `status_delete`, `id_wisata`, `nama_wisata`, `ktp`) VALUES
(14, 'adf', 1, 0, 8, 'Malaysia', '31'),
(15, 'uy', 1, 0, 8, 'Malaysia', '23'),
(16, 'we', 1, 0, 8, 'Malaysia', '13141');
-- --------------------------------------------------------
--
-- Struktur dari tabel `trip`
--
CREATE TABLE `trip` (
`id_trip` int(10) NOT NULL,
`trip` varchar(50) NOT NULL,
`status_trip` int(10) NOT NULL,
`status_delete` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `trip`
--
INSERT INTO `trip` (`id_trip`, `trip`, `status_trip`, `status_delete`) VALUES
(1, 'One Day Trip', 1, 0),
(2, 'Domestic Trip', 1, 0),
(3, 'International Trip', 1, 0);
-- --------------------------------------------------------
--
-- Struktur dari tabel `users`
--
CREATE TABLE `users` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
`activation_code` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`active` tinyint(1) NOT NULL DEFAULT 0,
`remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data untuk tabel `users`
--
INSERT INTO `users` (`id`, `name`, `email`, `password`, `activation_code`, `active`, `remember_token`, `created_at`, `updated_at`) VALUES
(6, 'Ani', 'opam.qweiop@gmail.com', '$2b$10$bDnIPjxBp.ScsKGutDg61uWA5GirxYRQcWZhB7087twzzwsYD4N0O', '', 1, 'wYlSCSM15iR50dvDIukXQ8jdsNLD1dn8N9izFmSexcvtfn9lvcvZWfdfEsKQ', '2015-07-19 14:12:20', '2015-07-19 14:13:10'),
(7, 'Admin', 'admin@gmail.com', '$2y$10$qhtL.SNj9beiX46VLG3Li.ENIis1tmtxAf8.5n5pOFpnl9hLnspUC', '1', 1, 'BwCLmFybKcw6aqpffwMH0qlntpSgxXnyGQIw7Ehjgb6EDkX0ziHRtFZfu5CT', '2021-01-10 14:04:39', '2021-01-11 14:04:44'),
(8, 'test', 'test@gmail.com', '$2y$10$I/xVrN52VrhDeFM6TYFlAe0AdK5EZO6IkAWGuvl4U8DTmQld5Kusu', '2', 1, 'R3nzgF5qSw8biecxARitYReKc8klXwoRpUCiFr6tTBRdi20YLJhIgV5sGgVp', '2021-01-10 07:15:11', '2021-01-10 07:15:11'),
(12, 'nani', 'nani.com', '$2y$10$5T9KIwWxH7Bzr0Gxf8JaMe9h4y3lBm3N7GFsKwHl1cLguf9fWZtvu', '2', 1, NULL, '2021-01-19 05:40:16', '2021-01-19 05:40:16'),
(16, 'nani', 'nanii.com', '$2y$10$Cwow3embQHjjWfeE8wEO9uFcsfPCgNTTcSuFdPBajb3Ml8y8qqGsi', '2', 1, NULL, '2021-01-19 05:41:17', '2021-01-19 05:41:17'),
(17, 'budi', 'budi.com', '$2y$10$bcgwYVbXeooW9pyUJquhG.lLOwXmErYs19bl19oat0YxJcZwO6tiW', '2', 1, NULL, '2021-01-19 05:43:39', '2021-01-19 05:43:39'),
(18, 'test1', 'test1@gmail.com', '$2y$10$IS.170jNdhYx/vFnGrlwrulK37GjONW.NbqvUyun0P5vEuR8BHi5O', '2', 1, 'KcJk0gCvkw8ZCWcXQklXSTTHH4INDULRMwLaq5YBb0onxDVjNJk7G7HCi7DA', '2021-01-19 05:58:15', '2021-01-19 05:58:15'),
(19, 'Ali', 'ali@gmail.com', '$2y$10$jkCkxLs7VFjM5y0CZimb..ukhC4yUI2d1GtI2jkpq4SDR0avmqw5C', '2', 1, 'LeYkvb6oQRESvXgpfOqWSYs2VK4Mos8QPjnByhUBMFYIAAPyHKj218y2af3J', '2021-01-19 07:46:27', '2021-01-19 07:46:27'),
(20, 'Audrey', 'audrey07@gmail.com', '$2y$10$nCQUz4ulsqe/0a3vHKXtke4Ypq4oNBQredDj0mD2TR2.cv7wdsoRq', '2', 1, 'hazjvPBlIIJBFcA8ohUrLgYnl1db5ylqviqgASeqMBrXpk14lQzZT5Tr09bi', '2021-01-19 08:53:49', '2021-01-19 08:53:49'),
(21, 'Ahmad', 'ahmad@gmail.com', '$2y$10$efKSUz3VpcHre9UrI4EPNu7Il89Rqc.Wi9QaPVasW0h/k1Kr3J33i', '2', 1, 'vPRcSjMP3CpTriAO4M3SUqsiNEJCPmMbRxgszsTR1hViPf7sj4XQW9CD68yV', '2021-01-19 09:50:27', '2021-01-19 09:50:27'),
(22, 'mutia', 'mutia@gmail.com', '$2y$10$9wxi7E0a4wxabMx6WfxyjOucJVoHHv12vFUMhV5MTCeGDGWJN.5RG', '2', 1, 'k3KY5h0WpcpfMxGecNDo2sBbS6RRZ9njFu1BZQtgGUsUdX5iwwPXCE9fdzrK', '2021-01-19 11:05:29', '2021-01-19 11:05:29');
--
-- Indexes for dumped tables
--
--
-- Indeks untuk tabel `data_pemesan`
--
ALTER TABLE `data_pemesan`
ADD PRIMARY KEY (`id_data_pemesan`);
--
-- Indeks untuk tabel `fasilitas`
--
ALTER TABLE `fasilitas`
ADD PRIMARY KEY (`id_fasilitas`);
--
-- Indeks untuk tabel `itenerary`
--
ALTER TABLE `itenerary`
ADD PRIMARY KEY (`id_itenerary`);
--
-- Indeks untuk tabel `kategori_fasilitas`
--
ALTER TABLE `kategori_fasilitas`
ADD PRIMARY KEY (`id_kateg_fasilitas`);
--
-- Indeks untuk tabel `komentar`
--
ALTER TABLE `komentar`
ADD PRIMARY KEY (`id_komentar`);
--
-- Indeks untuk tabel `lokasi`
--
ALTER TABLE `lokasi`
ADD PRIMARY KEY (`id_lokasi`);
--
-- Indeks untuk tabel `oborolan`
--
ALTER TABLE `oborolan`
ADD PRIMARY KEY (`id_oborolan`),
ADD KEY `nama_pengirim` (`nama_pengirim`),
ADD KEY `nama_penerima` (`nama_penerima`);
--
-- Indeks untuk tabel `paket_wisata`
--
ALTER TABLE `paket_wisata`
ADD PRIMARY KEY (`id_wisata`);
--
-- Indeks untuk tabel `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`),
ADD KEY `password_resets_token_index` (`token`);
--
-- Indeks untuk tabel `pelanggan`
--
ALTER TABLE `pelanggan`
ADD PRIMARY KEY (`id_pengguna`);
--
-- Indeks untuk tabel `pemesanan`
--
ALTER TABLE `pemesanan`
ADD PRIMARY KEY (`id_pemesanan`);
--
-- Indeks untuk tabel `pemesanan_detail`
--
ALTER TABLE `pemesanan_detail`
ADD PRIMARY KEY (`id_pemesanan_detail`);
--
-- Indeks untuk tabel `refund`
--
ALTER TABLE `refund`
ADD PRIMARY KEY (`id_refund`);
--
-- Indeks untuk tabel `reschedule`
--
ALTER TABLE `reschedule`
ADD PRIMARY KEY (`id_reschedule`);
--
-- Indeks untuk tabel `reschedule_detail`
--
ALTER TABLE `reschedule_detail`
ADD PRIMARY KEY (`id_reschedule_detail`);
--
-- Indeks untuk tabel `syarat`
--
ALTER TABLE `syarat`
ADD PRIMARY KEY (`id_syarat`);
--
-- Indeks untuk tabel `tanggal_wisata`
--
ALTER TABLE `tanggal_wisata`
ADD PRIMARY KEY (`id_tanggal`);
--
-- Indeks untuk tabel `tiket_pemesanan`
--
ALTER TABLE `tiket_pemesanan`
ADD PRIMARY KEY (`id_tiket_pemesanan`);
--
-- Indeks untuk tabel `trip`
--
ALTER TABLE `trip`
ADD PRIMARY KEY (`id_trip`);
--
-- Indeks untuk tabel `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`);
--
-- AUTO_INCREMENT untuk tabel yang dibuang
--
--
-- AUTO_INCREMENT untuk tabel `data_pemesan`
--
ALTER TABLE `data_pemesan`
MODIFY `id_data_pemesan` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37;
--
-- AUTO_INCREMENT untuk tabel `fasilitas`
--
ALTER TABLE `fasilitas`
MODIFY `id_fasilitas` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT untuk tabel `itenerary`
--
ALTER TABLE `itenerary`
MODIFY `id_itenerary` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT untuk tabel `kategori_fasilitas`
--
ALTER TABLE `kategori_fasilitas`
MODIFY `id_kateg_fasilitas` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT untuk tabel `komentar`
--
ALTER TABLE `komentar`
MODIFY `id_komentar` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT untuk tabel `lokasi`
--
ALTER TABLE `lokasi`
MODIFY `id_lokasi` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT untuk tabel `oborolan`
--
ALTER TABLE `oborolan`
MODIFY `id_oborolan` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT untuk tabel `paket_wisata`
--
ALTER TABLE `paket_wisata`
MODIFY `id_wisata` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT untuk tabel `pelanggan`
--
ALTER TABLE `pelanggan`
MODIFY `id_pengguna` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT untuk tabel `pemesanan`
--
ALTER TABLE `pemesanan`
MODIFY `id_pemesanan` bigint(200) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=52;
--
-- AUTO_INCREMENT untuk tabel `pemesanan_detail`
--
ALTER TABLE `pemesanan_detail`
MODIFY `id_pemesanan_detail` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=90;
--
-- AUTO_INCREMENT untuk tabel `refund`
--
ALTER TABLE `refund`
MODIFY `id_refund` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT untuk tabel `reschedule`
--
ALTER TABLE `reschedule`
MODIFY `id_reschedule` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT untuk tabel `reschedule_detail`
--
ALTER TABLE `reschedule_detail`
MODIFY `id_reschedule_detail` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT untuk tabel `syarat`
--
ALTER TABLE `syarat`
MODIFY `id_syarat` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT untuk tabel `tanggal_wisata`
--
ALTER TABLE `tanggal_wisata`
MODIFY `id_tanggal` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT untuk tabel `tiket_pemesanan`
--
ALTER TABLE `tiket_pemesanan`
MODIFY `id_tiket_pemesanan` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
--
-- AUTO_INCREMENT untuk tabel `trip`
--
ALTER TABLE `trip`
MODIFY `id_trip` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT untuk tabel `users`
--
ALTER TABLE `users`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;
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 */;
|
ALTER TABLE [dbo].[smscenter_groups] ADD
[state_sent] [smallint] NOT NULL DEFAULT 0,
[state_enabled] [smallint] NOT NULL DEFAULT 0,
[state_manual] [smallint] NOT NULL DEFAULT 0
GO
CREATE TRIGGER [dbo].[grSmsInsertTrigger] ON [dbo].[GrRec] FOR INSERT AS
INSERT INTO [dbo].[smscenter_groups] (grID) SELECT grID FROM inserted
GO
CREATE TRIGGER [dbo].[grSmsUpdateTrigger] ON [dbo].[GrRec] FOR UPDATE AS
UPDATE [dbo].[smscenter_groups]
SET state_enabled = inserted.grPublish
FROM inserted
INNER JOIN deleted ON inserted.grID = deleted.grID
WHERE [dbo].[smscenter_groups].state_manual = 0
AND inserted.grPublish <> deleted.grPublish
GO
INSERT INTO [dbo].[smscenter_groups] (grID, state_enabled)
SELECT GrRec.grID, GrRec.grPublish
FROM GrRec LEFT OUTER JOIN smscenter_groups ON GrRec.grID = smscenter_groups.grID
WHERE smscenter_groups.grID IS NULL
GO
|
INSERT INTO sys_user(pk_id,user_code,real_name,user_desc,user_type) VALUES(1234567890,'U1000001','张三','描述',1);
|
prompt --application/shared_components/user_interface/templates/report/badge_list
begin
-- Manifest
-- ROW TEMPLATE: BADGE_LIST
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2020.10.01'
,p_release=>'20.2.0.00.20'
,p_default_workspace_id=>2601326064169245
,p_default_application_id=>138
,p_default_id_offset=>71778820537478575
,p_default_owner=>'ORACLE_TOOLS'
);
wwv_flow_api.create_row_template(
p_id=>wwv_flow_api.id(49613246963366404)
,p_row_template_name=>'Badge List'
,p_internal_name=>'BADGE_LIST'
,p_row_template1=>wwv_flow_string.join(wwv_flow_t_varchar2(
'<li class="t-BadgeList-item">',
' <span class="t-BadgeList-wrap u-color">',
' <span class="t-BadgeList-label">#COLUMN_HEADER#</span>',
' <span class="t-BadgeList-value">#COLUMN_VALUE#</span>',
' </span>',
'</li>'))
,p_row_template_before_rows=>'<ul class="t-BadgeList #COMPONENT_CSS_CLASSES#" data-region-id="#REGION_STATIC_ID#">'
,p_row_template_after_rows=>wwv_flow_string.join(wwv_flow_t_varchar2(
'</ul>',
'<table class="t-Report-pagination" role="presentation">#PAGINATION#</table>'))
,p_row_template_type=>'GENERIC_COLUMNS'
,p_row_template_display_cond1=>'0'
,p_row_template_display_cond2=>'0'
,p_row_template_display_cond3=>'0'
,p_row_template_display_cond4=>'0'
,p_pagination_template=>'<span class="t-Report-paginationText">#TEXT#</span>'
,p_next_page_template=>wwv_flow_string.join(wwv_flow_t_varchar2(
'<a href="#LINK#" class="t-Button t-Button--small t-Button--noUI t-Report-paginationLink t-Report-paginationLink--next">',
' #PAGINATION_NEXT#<span class="a-Icon icon-right-arrow"></span>',
'</a>'))
,p_previous_page_template=>wwv_flow_string.join(wwv_flow_t_varchar2(
'<a href="#LINK#" class="t-Button t-Button--small t-Button--noUI t-Report-paginationLink t-Report-paginationLink--prev">',
' <span class="a-Icon icon-left-arrow"></span>#PAGINATION_PREVIOUS#',
'</a>'))
,p_next_set_template=>wwv_flow_string.join(wwv_flow_t_varchar2(
'<a href="#LINK#" class="t-Button t-Button--small t-Button--noUI t-Report-paginationLink t-Report-paginationLink--next">',
' #PAGINATION_NEXT_SET#<span class="a-Icon icon-right-arrow"></span>',
'</a>'))
,p_previous_set_template=>wwv_flow_string.join(wwv_flow_t_varchar2(
'<a href="#LINK#" class="t-Button t-Button--small t-Button--noUI t-Report-paginationLink t-Report-paginationLink--prev">',
' <span class="a-Icon icon-left-arrow"></span>#PAGINATION_PREVIOUS_SET#',
'</a>'))
,p_theme_id=>42
,p_theme_class_id=>6
,p_preset_template_options=>'t-BadgeList--large:t-BadgeList--fixed:t-BadgeList--circular'
,p_reference_id=>2103197159775914759
,p_translate_this_template=>'N'
);
wwv_flow_api.component_end;
end;
/
|
CREATE TABLE IF NOT EXISTS product_category(
id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
name varchar(20) unique,
description varchar(50)
);
|
PROMPT Prepare runner for the top package procedure without sub-suites by package name for current user
--Arrange
declare
c_path varchar2(100) := 'test_package_2.test2';
l_objects_to_run ut_suite_items;
l_test0_suite ut_logical_suite;
l_test1_suite ut_logical_suite;
l_test_proc ut_test;
begin
--Act
l_objects_to_run := ut_suite_manager.configure_execution_by_path(ut_varchar2_list(c_path));
--Assert
ut.expect(l_objects_to_run.count).to_equal(1);
l_test0_suite := treat(l_objects_to_run(1) as ut_logical_suite);
ut.expect(l_test0_suite.name).to_equal('tests');
ut.expect(l_test0_suite.items.count).to_equal(1);
l_test1_suite := treat(l_test0_suite.items(1) as ut_logical_suite);
ut.expect(l_test1_suite.name).to_equal('test_package_3');
ut.expect(l_test1_suite.items.count).to_equal(1);
l_test_proc := treat(l_test1_suite.items(1) as ut_test);
ut.expect(l_test_proc.name).to_equal('test2');
ut.expect(l_test_proc.before_test is not null).to_be_true;
ut.expect(l_test_proc.after_test is not null).to_be_true;
if ut_expectation_processor.get_status = ut_utils.tr_success then
:test_result := ut_utils.tr_success;
end if;
end;
/
|
-- @testpoint: 隐式游标%notfound,提取不到数据
drop table if exists emp;
create table emp(empno int,ename varchar(10),job varchar(10) ,sal integer);
insert into emp values(1,'zhangsan','doctor1',10000),(2,'zhangsan2','doctor2',10000),(123,'zhangsan3','doctor3',10000);
create or replace procedure p_emp_005(str boolean)
as
declare
a emp%rowtype;
cursor mycursor is select * from emp where empno=1 order by ename;
begin
open mycursor;
fetch mycursor into a;
if mycursor%notfound then
insert into emp values(4,'zhangsan','doctor1',10002);
end if;
close mycursor;
end;
/
call p_emp_005(true);
select * from emp;
drop procedure p_emp_005;
drop table emp;
|
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: mydb
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.36-MariaDB
/*!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 utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `seguro`
--
DROP TABLE IF EXISTS `seguro`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `seguro` (
`idSeguro` int(11) NOT NULL AUTO_INCREMENT,
`Nome` varchar(45) NOT NULL,
`TipoDeCobertura` varchar(45) NOT NULL,
`Descricao` varchar(45) DEFAULT NULL,
`Custo` varchar(45) NOT NULL,
`Reserva_idReserva` int(11) DEFAULT NULL,
PRIMARY KEY (`idSeguro`),
KEY `idReserva_idx` (`Reserva_idReserva`),
CONSTRAINT `idReserva` FOREIGN KEY (`Reserva_idReserva`) REFERENCES `reserva` (`idReserva`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `seguro`
--
LOCK TABLES `seguro` WRITE;
/*!40000 ALTER TABLE `seguro` DISABLE KEYS */;
/*!40000 ALTER TABLE `seguro` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-06-07 2:40:36
|
prompt --application/shared_components/security/app_access_control/contributor
begin
-- Manifest
-- ACL ROLE: Contributor
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2021.04.15'
,p_release=>'21.1.6'
,p_default_workspace_id=>9690978936188613
,p_default_application_id=>122
,p_default_id_offset=>0
,p_default_owner=>'ILA'
);
wwv_flow_api.create_acl_role(
p_id=>wwv_flow_api.id(12859740316571040)
,p_static_id=>'CONTRIBUTOR'
,p_name=>'Contributor'
,p_description=>'Role assigned to application contributors.'
);
wwv_flow_api.component_end;
end;
/
|
{{ config(materialized='view') }}
with data as (
{{ dbt_ml_preprocessing.standard_scaler( ref('data_standard_scaler') ,'col_to_scale') }}
)
select * from data
|
UPDATE SnComment
SET
RelationshipId
=
(SELECT
TOP 1 Id
FROM
SnRelationship
WHERE
(SnComment.NoteId IS NULL OR SnRelationship.NoteId = SnComment.NoteId)
AND
(SnComment.FileId IS NULL OR SnRelationship.FileId = SnComment.FileId)
AND
(SnComment.AlbumId IS NULL OR SnRelationship.AlbumId = SnComment.AlbumId)
AND
(SnComment.BlogPostId IS NULL OR SnRelationship.BlogPostId = SnComment.BlogPostId)
AND
(SnComment.CustomId1 IS NULL OR SnRelationship.CustomId1 = SnComment.CustomId1)
AND
(SnComment.CustomId2 IS NULL OR SnRelationship.CustomId2 = SnComment.CustomId2)
AND
(SnComment.CustomId3 IS NULL OR SnRelationship.CustomId3 = SnComment.CustomId3)
)
if exists ( select * from INFORMATION_SCHEMA.COLUMNS
where TABLE_NAME='SnComment'
and COLUMN_NAME='RelationshipId' )
ALTER TABLE dbo.SnComment ALTER COLUMN RelationshipId uniqueidentifier not null
else
ALTER TABLE SnComment ADD RelationshipId uniqueidentifier not null
|
CREATE TABLE "SENTRY_USER" (
"USER_ID" BIGINT NOT NULL,
"USER_NAME" character varying(128) NOT NULL,
"CREATE_TIME" BIGINT NOT NULL
);
ALTER TABLE ONLY "SENTRY_USER"
ADD CONSTRAINT "SENTRY_USER_PK" PRIMARY KEY ("USER_ID");
ALTER TABLE ONLY "SENTRY_USER"
ADD CONSTRAINT "SENTRY_USER_USER_NAME_UNIQUE" UNIQUE ("USER_NAME");
-- Table SENTRY_USER_DB_PRIVILEGE_MAP for join relationship
CREATE TABLE "SENTRY_USER_DB_PRIVILEGE_MAP" (
"USER_ID" BIGINT NOT NULL,
"DB_PRIVILEGE_ID" BIGINT NOT NULL,
"GRANTOR_PRINCIPAL" character varying(128)
);
ALTER TABLE "SENTRY_USER_DB_PRIVILEGE_MAP"
ADD CONSTRAINT "SENTRY_USR_DB_PRV_MAP_PK" PRIMARY KEY ("USER_ID","DB_PRIVILEGE_ID");
ALTER TABLE ONLY "SENTRY_USER_DB_PRIVILEGE_MAP"
ADD CONSTRAINT "SN_USR_DB_PRV_MAP_SN_USER_FK"
FOREIGN KEY ("USER_ID") REFERENCES "SENTRY_USER"("USER_ID") DEFERRABLE;
ALTER TABLE ONLY "SENTRY_USER_DB_PRIVILEGE_MAP"
ADD CONSTRAINT "SEN_USR_DB_PRV_MAP_DB_PRV_FK"
FOREIGN KEY ("DB_PRIVILEGE_ID") REFERENCES "SENTRY_DB_PRIVILEGE"("DB_PRIVILEGE_ID") DEFERRABLE;
CREATE INDEX "SEN_USR_DB_PRV_MAP_USR_FK_IDX" ON "SENTRY_USER_DB_PRIVILEGE_MAP" ("USER_ID");
CREATE INDEX "SEN_USR_DB_PRV_MAP_PRV_FK_IDX" ON "SENTRY_USER_DB_PRIVILEGE_MAP" ("DB_PRIVILEGE_ID");
|
SELECT
`T1`.`shift_time_left`,
`T1`.`shift_time_right`,
`T1`.`shift_time`
FROM
`price_seasonal` AS `T1`
WHERE
`T1`.`symbol` = '{strSymbol}' AND
`T1`.`time_frames` = '{strTimeFrames}' AND
`T1`.`samples` = {nSamples} AND
`T1`.`frequency` = {nFrequency}
ORDER BY
`T1`.`shift_time` ASC
LIMIT 1;
|
create table log.slow_expression
(
id bigserial primary key,
expression_source varchar(126) not null,
expression_id integer not null,
site_id bigint not null,
site_task_id bigint not null,
search_time numeric not null check (search_time > 0),
dt timestamptz not null default current_timestamp
);
grant select, insert on log.slow_expression to datatrace;
|
CREATE TABLE workflow (
workflow_id varchar(8) not null,
type varchar(50) not null,
state varchar(30) not null,
last_update timestamp,
primary key ( workflow_id )
);
CREATE TABLE workflow_history (
workflow_hist_id varchar(8) not null,
workflow_id varchar(8) not null,
action varchar(25) not null,
description varchar(255) null,
state varchar(30) not null,
workflow_user varchar(50) null,
history_date timestamp,
primary key( workflow_hist_id ),
foreign key( workflow_id ) references workflow( workflow_id )
);
|
drop procedure if exists sp_LoadCityMaster;
create procedure sp_LoadCityMaster()
begin
declare currentSchema varchar(100) default '';
select database() into currentSchema;
if exists(
select 1
from information_schema.TABLES
where TABLE_SCHEMA = currentSchema
and TABLE_NAME = 'tbl_CityMaster'
) then
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Adilabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Anantapur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Chittoor', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Cuddapah', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'East Godavari', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Guntur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Hyderabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Karimnagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Khammam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Krishna', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Kurnool', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Mahabubnagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Medak', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Nalgonda', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Nellore', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Nizamabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Prakasam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Rangareddy', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Srikakulam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Visakhapatnam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Vizianagaram', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'Warangal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 1, 'West Godavari', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 2, 'Anjaw', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 2, 'Changlang', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 2, 'Dibang Valley', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 2, 'East Kameng', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 2, 'East Siang', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 2, 'Itanagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 2, 'Kurung Kumey', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 2, 'Lohit', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 2, 'Lower Dibang Valley', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 2, 'Lower Subansiri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 2, 'Papum Pare', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 2, 'Tawang', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 2, 'Tirap', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 2, 'Upper Siang', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 2, 'Upper Subansiri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 2, 'West Kameng', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 2, 'West Siang', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Barpeta', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Bongaigaon', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Cachar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Darrang', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Dhemaji', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Dhubri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Dibrugarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Goalpara', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Golaghat', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Guwahati', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Hailakandi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Jorhat', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Kamrup', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Karbi Anglong', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Karimganj', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Kokrajhar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Lakhimpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Marigaon', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Nagaon', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Nalbari', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'North Cachar Hills', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Silchar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Sivasagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Sonitpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Tinsukia', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 3, 'Udalguri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Araria', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Aurangabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Banka', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Begusarai', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Bhagalpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Bhojpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Buxar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Darbhanga', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'East Champaran', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Gaya', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Gopalganj', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Jamshedpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Jamui', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Jehanabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Kaimur (Bhabua)', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Katihar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Khagaria', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Kishanganj', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Lakhisarai', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Madhepura', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Madhubani', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Munger', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Muzaffarpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Nalanda', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Nawada', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Patna', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Purnia', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Rohtas', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Saharsa', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Samastipur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Saran', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Sheikhpura', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Sheohar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Sitamarhi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Siwan', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Supaul', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'Vaishali', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 4, 'West Champaran', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Bastar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Bhilai', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Bijapur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Bilaspur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Dhamtari', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Durg', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Janjgir-Champa', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Jashpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Kabirdham-Kawardha', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Korba', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Korea', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Mahasamund', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Narayanpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Norh Bastar-Kanker', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Raigarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Raipur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Rajnandgaon', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'South Bastar-Dantewada', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 5, 'Surguja', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 6, 'Canacona', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 6, 'Candolim', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 6, 'Chinchinim', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 6, 'Cortalim', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 6, 'Goa', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 6, 'Jua', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 6, 'Madgaon', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 6, 'Mahem', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 6, 'Mapuca', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 6, 'Marmagao', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 6, 'Panji', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 6, 'Ponda', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 6, 'Sanvordem', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 6, 'Terekhol', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Ahmedabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Amreli', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Anand', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Banaskantha', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Baroda', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Bharuch', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Bhavnagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Dahod', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Dang', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Dwarka', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Gandhinagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Jamnagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Junagadh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Kheda', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Kutch', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Mehsana', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Nadiad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Narmada', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Navsari', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Panchmahals', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Patan', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Porbandar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Rajkot', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Sabarkantha', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Surat', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Surendranagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Vadodara', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Valsad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 7, 'Vapi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Ambala', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Bhiwani', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Faridabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Fatehabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Gurgaon', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Hisar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Jhajjar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Jind', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Kaithal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Karnal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Kurukshetra', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Mahendragarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Mewat', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Panchkula', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Panipat', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Rewari', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Rohtak', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Sirsa', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Sonipat', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 8, 'Yamunanagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 9, 'Bilaspur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 9, 'Chamba', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 9, 'Dalhousie', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 9, 'Hamirpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 9, 'Kangra', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 9, 'Kinnaur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 9, 'Kullu', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 9, 'Lahaul & Spiti', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 9, 'Mandi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 9, 'Shimla', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 9, 'Sirmaur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 9, 'Solan', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 9, 'Una', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 10, 'Anantnag', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 10, 'Baramulla', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 10, 'Budgam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 10, 'Doda', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 10, 'Jammu', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 10, 'Kargil', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 10, 'Kathua', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 10, 'Kupwara', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 10, 'Leh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 10, 'Poonch', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 10, 'Pulwama', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 10, 'Rajauri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 10, 'Srinagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 10, 'Udhampur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Bokaro', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Chatra', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Deoghar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Dhanbad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Dumka', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'East Singhbhum', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Garhwa', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Giridih', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Godda', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Gumla', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Hazaribag', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Jamtara', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Koderma', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Latehar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Lohardaga', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Pakur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Palamu', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Ranchi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Sahibganj', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Seraikela', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'Simdega', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 11, 'West Singhbhum', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Bagalkot', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Bangalore', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Bangalore Rural', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Belgaum', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Bellary', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Bhatkal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Bidar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Bijapur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Chamrajnagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Chickmagalur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Chikballapur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Chitradurga', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Dakshina Kannada', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Davanagere', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Dharwad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Gadag', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Gulbarga', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Hampi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Hassan', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Haveri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Hospet', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Karwar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Kodagu', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Kolar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Koppal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Madikeri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Mandya', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Mangalore', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Manipal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Mysore', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Raichur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Shimoga', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Sirsi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Sringeri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Srirangapatna', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Tumkur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Udupi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 12, 'Uttara Kannada', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Alappuzha', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Alleppey', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Alwaye', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Ernakulam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Idukki', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Kannur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Kasargod', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Kochi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Kollam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Kottayam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Kovalam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Kozhikode', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Malappuram', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Palakkad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Pathanamthitta', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Perumbavoor', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Thiruvananthapuram', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Thrissur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Trichur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Trivandrum', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 13, 'Wayanad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Anuppur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Ashoknagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Balaghat', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Barwani', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Betul', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Bhind', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Bhopal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Burhanpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Chhatarpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Chhindwara', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Damoh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Datia', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Dewas', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Dhar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Dindori', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Guna', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Gwalior', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Harda', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Hoshangabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Indore', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Jabalpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Jagdalpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Jhabua', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Katni', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Khandwa', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Khargone', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Mandla', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Mandsaur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Morena', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Narsinghpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Neemuch', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Panna', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Raisen', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Rajgarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Ratlam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Rewa', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Sagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Satna', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Sehore', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Seoni', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Shahdol', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Shajapur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Sheopur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Shivpuri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Sidhi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Tikamgarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Ujjain', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Umaria', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 14, 'Vidisha', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Ahmednagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Akola', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Amravati', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Aurangabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Beed', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Bhandara', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Buldhana', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Chandrapur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Dhule', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Gadchiroli', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Gondia', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Hingoli', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Jalgaon', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Jalna', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Kolhapur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Latur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Mahabaleshwar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Mumbai', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Mumbai City', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Mumbai Suburban', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Nagpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Nanded', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Nandurbar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Nashik', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Osmanabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Parbhani', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Pune', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Raigad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Ratnagiri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Sangli', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Satara', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Sholapur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Sindhudurg', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Thane', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Wardha', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Washim', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 15, 'Yavatmal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 16, 'Bishnupur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 16, 'Chandel', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 16, 'Churachandpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 16, 'Imphal East', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 16, 'Imphal West', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 16, 'Senapati', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 16, 'Tamenglong', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 16, 'Thoubal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 16, 'Ukhrul', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 17, 'East Garo Hills', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 17, 'East Khasi Hills', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 17, 'Jaintia Hills', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 17, 'Ri Bhoi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 17, 'Shillong', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 17, 'South Garo Hills', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 17, 'West Garo Hills', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 17, 'West Khasi Hills', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 18, 'Aizawl', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 18, 'Champhai', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 18, 'Kolasib', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 18, 'Lawngtlai', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 18, 'Lunglei', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 18, 'Mamit', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 18, 'Saiha', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 18, 'Serchhip', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 18, 'Aizawl', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 18, 'Champhai', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 18, 'Kolasib', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 18, 'Lawngtlai', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 18, 'Lunglei', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 18, 'Mamit', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 18, 'Saiha', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 18, 'Serchhip', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 19, 'Dimapur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 19, 'Kohima', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 19, 'Mokokchung', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 19, 'Mon', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 19, 'Phek', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 19, 'Tuensang', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 19, 'Wokha', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 19, 'Zunheboto', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Angul', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Balangir', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Balasore', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Baleswar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Bargarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Berhampur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Bhadrak', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Bhubaneswar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Boudh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Cuttack', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Deogarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Dhenkanal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Gajapati', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Ganjam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Jagatsinghapur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Jajpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Jharsuguda', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Kalahandi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Kandhamal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Kendrapara', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Kendujhar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Khordha', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Koraput', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Malkangiri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Mayurbhanj', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Nabarangapur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Nayagarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Nuapada', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Puri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Rayagada', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Rourkela', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Sambalpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Subarnapur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 20, 'Sundergarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Amritsar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Barnala', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Bathinda', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Faridkot', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Fatehgarh Sahib', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Ferozepur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Gurdaspur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Hoshiarpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Jalandhar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Kapurthala', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Ludhiana', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Mansa', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Moga', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Muktsar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Nawanshahr', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Pathankot', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Patiala', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Rupnagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Sangrur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'SAS Nagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 21, 'Tarn Taran', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Ajmer', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Alwar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Banswara', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Baran', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Barmer', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Bharatpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Bhilwara', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Bikaner', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Bundi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Chittorgarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Churu', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Dausa', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Dholpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Dungarpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Hanumangarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Jaipur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Jaisalmer', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Jalore', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Jhalawar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Jhunjhunu', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Jodhpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Karauli', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Kota', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Nagaur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Pali', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Pilani', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Rajsamand', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Sawai Madhopur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Sikar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Sirohi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Sri Ganganagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Tonk', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 22, 'Udaipur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Barmiak', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Be', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Bhurtuk', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Chhubakha', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Chidam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Chubha', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Chumikteng', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Dentam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Dikchu', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Dzongri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Gangtok', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Gauzing', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Gyalshing', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Hema', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Kerung', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Lachen', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Lachung', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Lema', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Lingtam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Lungthu', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Mangan', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Namchi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Namthang', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Nanga', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Nantang', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Naya Bazar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Padamachen', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Pakhyong', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Pemayangtse', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Phensang', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Rangli', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Rinchingpong', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Sakyong', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Samdong', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Singtam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Siniolchu', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Sombari', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Soreng', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Sosing', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Tekhug', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Temi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Tsetang', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Tsomgo', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Tumlong', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Yangang', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 23, 'Yumtang', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Chennai', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Chidambaram', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Chingleput', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Coimbatore', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Courtallam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Cuddalore', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Dharmapuri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Dindigul', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Erode', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Hosur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Kanchipuram', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Kanyakumari', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Karaikudi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Karur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Kodaikanal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Kovilpatti', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Krishnagiri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Kumbakonam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Madurai', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Mayiladuthurai', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Nagapattinam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Nagarcoil', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Namakkal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Neyveli', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Nilgiris', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Ooty', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Palani', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Perambalur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Pollachi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Pudukkottai', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Rajapalayam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Ramanathapuram', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Salem', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Sivaganga', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Sivakasi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Thanjavur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Theni', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Thoothukudi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Tiruchirappalli', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Tirunelveli', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Tirupur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Tiruvallur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Tiruvannamalai', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Tiruvarur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Trichy', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Tuticorin', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Vellore', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Villupuram', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Virudhunagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 24, 'Yercaud', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 26, 'Agartala', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 26, 'Ambasa', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 26, 'Bampurbari', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 26, 'Belonia', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 26, 'Dhalai', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 26, 'Dharam Nagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 26, 'Kailashahar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 26, 'Kamal Krishnabari', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 26, 'Khopaiyapara', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 26, 'Khowai', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 26, 'Phuldungsei', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 26, 'Radha Kishore Pur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 26, 'Tripura', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Alipur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Andaman Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Anderson Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Arainj-Laka-Punga', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Austinabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Bamboo Flat', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Barren Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Beadonabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Betapur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Bindraban', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Bonington', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Brookesabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Cadell Point', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Calicut', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Chetamale', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Cinque Islands', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Defence Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Digilpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Dolyganj', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Flat Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Geinyale', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Great Coco Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Haddo', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Havelock Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Henry Lawrence Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Herbertabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Hobdaypur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Ilichar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Ingoie', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Inteview Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Jangli Ghat', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Jhon Lawrence Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Karen', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Kartara', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'KYD Islannd', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Landfall Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Little Andmand', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Little Coco Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Long Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Maimyo', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Malappuram', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Manglutan', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Manpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Mitha Khari', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Neill Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Nicobar Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'North Brother Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'North Passage Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'North Sentinel Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Nothen Reef Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Outram Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Pahlagaon', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Palalankwe', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Passage Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Phaiapong', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Phoenix Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Port Blair', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Preparis Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Protheroepur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Rangachang', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Rongat', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Rutland Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Sabari', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Saddle Peak', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Shadipur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Smith Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Sound Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'South Sentinel Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Spike Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Tarmugli Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Taylerabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Titaije', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Toibalawe', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Tusonabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'West Island', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Wimberleyganj', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 30, 'Yadita', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 31, 'Chandigarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 31, 'Mani Marja', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Amal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Amli', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Bedpa', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Chikhli', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Dadra & Nagar Haveli', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Dahikhed', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Dolara', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Galonda', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Kanadi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Karchond', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Khadoli', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Kharadpada', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Kherabari', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Kherdi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Kothar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Luari', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Mashat', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Rakholi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Rudana', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Saili', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Sili', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Silvassa', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Sindavni', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Udva', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Umbarkoi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Vansda', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Vasona', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 32, 'Velugam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 33, 'Brancavare', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 33, 'Dagasi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 33, 'Daman', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 33, 'Diu', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 33, 'Magarvara', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 33, 'Nagwa', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 33, 'Pariali', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 33, 'Passo Covo', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 34, 'Central Delhi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 34, 'East Delhi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 34, 'New Delhi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 34, 'North Delhi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 34, 'North East Delhi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 34, 'North West Delhi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 34, 'Old Delhi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 34, 'South Delhi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 34, 'South West Delhi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 34, 'West Delhi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 25, 'Hyderabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 25, 'Karimnagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 25, 'Khammam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 25, 'Mahbubnagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 25, 'Nizamabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 25, 'Sangareddi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Agra', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Aligarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Amroha', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Ayodhya', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Azamgarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Bahraich', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Ballia', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Banda', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Bara Banki', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Bareilly', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Basti', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Bijnor', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Bithur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Budaun', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Bulandshahr', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Deoria', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Etah', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Etawah', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Faizabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Farrukhabad-cum-Fatehgarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Fatehpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Fatehpur Sikri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Ghaziabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Ghazipur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Gonda', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Gorakhpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Hamirpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Hardoi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Hathras', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Jalaun', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Jaunpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Jhansi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Kannauj', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Kanpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Lakhimpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Lalitpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Lucknow', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Mainpuri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Mathura', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Meerut', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Mirzapur-Vindhyachal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Moradabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Muzaffarnagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Partapgarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Pilibhit', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Prayagraj', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Rae Bareli', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Rampur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Saharanpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Sambhal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Shahjahanpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Sitapur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Sultanpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Tehri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Varanasi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Agra', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Aligarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Amroha', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Ayodhya', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Azamgarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Bahraich', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Ballia', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Banda', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Bara Banki', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Bareilly', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Basti', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Bijnor', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Bithur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Budaun', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Bulandshahr', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Deoria', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Etah', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Etawah', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Faizabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Farrukhabad-cum-Fatehgarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Fatehpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Fatehpur Sikri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Ghaziabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Ghazipur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Gonda', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Gorakhpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Hamirpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Hardoi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Hathras', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Jalaun', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Jaunpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Jhansi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Kannauj', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Kanpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Lakhimpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Lalitpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Lucknow', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Mainpuri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Mathura', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Meerut', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Mirzapur-Vindhyachal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Moradabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Muzaffarnagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Partapgarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Pilibhit', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Prayagraj', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Rae Bareli', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Rampur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Saharanpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Sambhal', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Shahjahanpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Sitapur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Sultanpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Tehri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 27, 'Varanasi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 28, 'Almora', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 28, 'Dehra Dun', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 28, 'Haridwar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 28, 'Mussoorie', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 28, 'Nainital', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 28, 'Pithoragarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Alipore', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Alipur Duar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Asansol', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Baharampur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Bally', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Balurghat', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Bankura', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Baranagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Barasat', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Barrackpore', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Basirhat', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Bhatpara', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Bishnupur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Budge Budge', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Burdwan', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Chandernagore', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Darjiling', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Diamond Harbour', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Dum Dum', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Durgapur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Bhalisahar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Haora', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Hugli', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Ingraj Bazar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Jalpaiguri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Kalimpong', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Kamarhati', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Kanchrapara', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Kharagpur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Koch Bihar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Kolkata', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Krishnanagar', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Malda', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Midnapore', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Murshidabad', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Navadwip', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Palashi', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Panihati', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Purulia', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Raiganj', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Santipur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Shantiniketan', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Shrirampur', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Siliguri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Siuri', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Tamluk', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 29, 'Titagarh', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 37, 'Ariankuppam', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 37, 'Kurumbapet', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 37, 'Manavely', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 37, 'Ozhukarai', null, 1);
INSERT INTO tbl_CityMaster (country_id, state_id, city_name, city_org_id, created_by)
VALUES (1, 37, 'Villianur', null, 1);
select 1 as id;
else
select -1 as id;
end if;
end;
call sp_LoadCityMaster();
drop procedure if exists sp_LoadCityMaster;
|
CREATE SCHEMA `cats` ;
USE cats;
CREATE TABLE `cats`.`employee` (
`employeeid` VARCHAR(15) NOT NULL,
`managerid` VARCHAR(15) NULL,
`name` VARCHAR(45) NULL,
PRIMARY KEY (`employeeid`));
CREATE TABLE `cats`.`role` (
`roleid` VARCHAR(15) NOT NULL,
`name` VARCHAR(45) NULL,
`description` VARCHAR(45) NULL,
PRIMARY KEY (`roleid`));
CREATE TABLE `cats`.`user` (
`userid` VARCHAR(15) NOT NULL,
`name` VARCHAR(45) NULL,
`password` VARCHAR(45) NULL,
`employeeid` VARCHAR(15) NULL,
PRIMARY KEY (`userid`),
INDEX `efk_idx` (`employeeid` ASC),
CONSTRAINT `efk`
FOREIGN KEY (`employeeid`)
REFERENCES `cats`.`employee` (`employeeid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
CREATE TABLE `cats`.`userrole` (
`roleid` VARCHAR(15) NOT NULL,
`userid` VARCHAR(15) NOT NULL,
PRIMARY KEY (`roleid`, `userid`),
CONSTRAINT `ufk`
FOREIGN KEY (`userid`)
REFERENCES `cats`.`user` (`userid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `rfk`
FOREIGN KEY (`roleid`)
REFERENCES `cats`.`role` (`roleid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
CREATE TABLE `cats`.`department` (
`departmentid` VARCHAR(15) NOT NULL,
`managerid` VARCHAR(15) NOT NULL,
PRIMARY KEY (`departmentid`),
INDEX `mfk_idx` (`managerid` ASC),
CONSTRAINT `mfk`
FOREIGN KEY (`managerid`)
REFERENCES `cats`.`employee` (`employeeid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
CREATE TABLE `cats`.`course` (
`courseid` int NOT NULL AUTO_INCREMENT,
`employeeid` VARCHAR(15) NULL,
`coursename` VARCHAR(45) NULL,
`organiser` VARCHAR(45) NULL,
`fromdate` DATE NULL,
`todate` DATE NULL,
`fees` DOUBLE NULL,
`gstincluded` TINYINT(1) NULL,
`justification` VARCHAR(100) NULL,
`status` VARCHAR(15) NULL,
`comments` VARCHAR(100) NULL, PRIMARY KEY (`courseid`),
INDEX `efk_idx` (`employeeid` ASC),
CONSTRAINT `efk1`
FOREIGN KEY (`employeeid`)
REFERENCES `cats`.`employee` (`employeeid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
CREATE TABLE `cats`.`courseevent` (
`courseeventid` int NOT NULL AUTO_INCREMENT,
`courseid` int NULL,
`timestamp` DATE NULL,
`eventtype` VARCHAR(20) NULL,
`eventby` VARCHAR(30) NULL,
`comment` VARCHAR(100) NULL,
PRIMARY KEY (`courseeventid`),
INDEX `cfk_idx` (`courseid` ASC),
CONSTRAINT `cfk`
FOREIGN KEY (`courseid`)
REFERENCES `cats`.`course` (`courseid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
INSERT INTO `cats`.`employee`
(`employeeid`,
`managerid`,
`name`)
VALUES
("dilbert",
"pointy",
"Dilbert");
INSERT INTO `cats`.`employee`
(`employeeid`,
`managerid`,
`name`)
VALUES
("pointy",
"dogbert",
"Pointy");
INSERT INTO `cats`.`employee`
(`employeeid`,
`managerid`,
`name`)
VALUES
("alice",
"pointy",
"Alice");
INSERT INTO `cats`.`employee`
(`employeeid`,
`managerid`,
`name`)
VALUES
("wally",
"pointy",
"Wally");
INSERT INTO `cats`.`employee`
(`employeeid`,
`managerid`,
`name`)
VALUES
("ashok",
"dilbert",
"Ashok");
INSERT INTO `cats`.`employee`
(`employeeid`,
`managerid`,
`name`)
VALUES
("dogbert",
"",
"Dogbert");
INSERT INTO `cats`.`employee`
(`employeeid`,
`managerid`,
`name`)
VALUES
("ted",
"",
"Ted");
INSERT INTO `cats`.`employee`
(`employeeid`,
`managerid`,
`name`)
VALUES
("howard",
"",
"Loud Howard");
INSERT INTO `cats`.`employee`
(`employeeid`,
`managerid`,
`name`)
VALUES
("catbert",
"dogbert",
"Catbert HR");
INSERT INTO `cats`.`employee`
(`employeeid`,
`managerid`,
`name`)
VALUES
("ratbert",
"dogbert",
"Ratbert low form");
INSERT INTO `cats`.`employee`
(`employeeid`,
`managerid`,
`name`)
VALUES
("bob",
"pointy",
"Bob the dino");
INSERT INTO `cats`.`employee`
(`employeeid`,
`managerid`,
`name`)
VALUES
("tina",
"",
"Tina the technical writer");
----
INSERT INTO `cats`.`role`
(`roleid`,
`name`,
`description`)
VALUES
("admin",
"Administrator",
"System administrator");
INSERT INTO `cats`.`role`
(`roleid`,
`name`,
`description`)
VALUES
("staff",
"Staff",
"Staff members");
INSERT INTO `cats`.`role`
(`roleid`,
`name`,
`description`)
VALUES
("manager",
"Manager",
"Manager");
----
INSERT INTO `cats`.`user`
(`userid`,
`name`,
`password`,
`employeeid`)
VALUES
("dilbert",
"dilbert",
"dilbert",
"dilbert");
INSERT INTO `cats`.`user`
(`userid`,
`name`,
`password`,
`employeeid`)
VALUES
("pointy",
"pointy",
"pointy",
"pointy");
INSERT INTO `cats`.`user`
(`userid`,
`name`,
`password`,
`employeeid`)
VALUES
("alice",
"alice",
"alice",
"alice");
INSERT INTO `cats`.`user`
(`userid`,
`name`,
`password`,
`employeeid`)
VALUES
("wally",
"wally",
"wally",
"wally");
INSERT INTO `cats`.`user`
(`userid`,
`name`,
`password`,
`employeeid`)
VALUES
("ashok",
"ashok",
"ashok",
"ashok");
INSERT INTO `cats`.`user`
(`userid`,
`name`,
`password`,
`employeeid`)
VALUES
("dogbert",
"dogbert",
"dogbert",
"dogbert");
INSERT INTO `cats`.`user`
(`userid`,
`name`,
`password`,
`employeeid`)
VALUES
("ted",
"ted",
"ted",
"ted");
INSERT INTO `cats`.`user`
(`userid`,
`name`,
`password`,
`employeeid`)
VALUES
("howard",
"howard",
"howard",
"howard");
INSERT INTO `cats`.`user`
(`userid`,
`name`,
`password`,
`employeeid`)
VALUES
("catbert",
"catbert",
"catbert",
"catbert");
INSERT INTO `cats`.`user`
(`userid`,
`name`,
`password`,
`employeeid`)
VALUES
("ratbert",
"ratbert",
"ratbert",
"ratbert");
INSERT INTO `cats`.`user`
(`userid`,
`name`,
`password`,
`employeeid`)
VALUES
("bob",
"bob",
"bob",
"bob");
INSERT INTO `cats`.`user`
(`userid`,
`name`,
`password`,
`employeeid`)
VALUES
("tina",
"tina",
"tina",
"tina");
----
INSERT INTO `cats`.`userrole`
(`roleid`,
`userid`)
VALUES
("manager",
"dilbert");
INSERT INTO `cats`.`userrole`
(`roleid`,
`userid`)
VALUES
("staff",
"dilbert");
INSERT INTO `cats`.`userrole`
(`roleid`,
`userid`)
VALUES
("manager",
"pointy");
INSERT INTO `cats`.`userrole`
(`roleid`,
`userid`)
VALUES
("staff",
"pointy");
INSERT INTO `cats`.`userrole`
(`roleid`,
`userid`)
VALUES
("staff",
"alice");
INSERT INTO `cats`.`userrole`
(`roleid`,
`userid`)
VALUES
("staff",
"wally");
INSERT INTO `cats`.`userrole`
(`roleid`,
`userid`)
VALUES
("staff",
"ashok");
INSERT INTO `cats`.`userrole`
(`roleid`,
`userid`)
VALUES
("manager",
"dogbert");
INSERT INTO `cats`.`userrole`
(`roleid`,
`userid`)
VALUES
("staff",
"dogbert");
INSERT INTO `cats`.`userrole`
(`roleid`,
`userid`)
VALUES
("staff",
"ted");
INSERT INTO `cats`.`userrole`
(`roleid`,
`userid`)
VALUES
("staff",
"howard");
INSERT INTO `cats`.`userrole`
(`roleid`,
`userid`)
VALUES
("admin",
"catbert");
INSERT INTO `cats`.`userrole`
(`roleid`,
`userid`)
VALUES
("staff",
"catbert");
INSERT INTO `cats`.`userrole`
(`roleid`,
`userid`)
VALUES
("staff",
"ratbert");
INSERT INTO `cats`.`userrole`
(`roleid`,
`userid`)
VALUES
("staff",
"bob");
INSERT INTO `cats`.`userrole`
(`roleid`,
`userid`)
VALUES
("staff",
"tina");
---
INSERT INTO `cats`.`department`
(`departmentid`,
`managerid`)
VALUES
("engineering",
"pointy");
INSERT INTO `cats`.`department`
(`departmentid`,
`managerid`)
VALUES
("hr",
"catbert");
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.