sql
stringlengths
6
1.05M
-- Drops the blogger if it exists currently -- DROP DATABASE IF EXISTS employee_db; -- Creates the "blogger" database -- CREATE DATABASE employee_db; -- this used to create the database USE employee_db; CREATE TABLE departments ( id INT NOT NULL AUTO_INCREMENT, department_name VARCHAR(30) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE employee_roles ( id INT NOT NULL AUTO_INCREMENT, title VARCHAR(30) NOT NULL, salary DECIMAL(10,2) NOT NULL, department_id INT NOT NULL, PRIMARY KEY (id) ); CREATE TABLE employees ( id INT NOT NULL AUTO_INCREMENT, first_name VARCHAR(75) NOT NULL, last_name VARCHAR(75) NOT NULL, role_id INT NOT NULL, manager_id INT DEFAULT NULL, PRIMARY KEY (id) );
/* */ set serveroutput on size unlimited echo off ACCEPT p_owner PROMPT "Owner: " ACCEPT p_tables DEFAULT '.*' PROMPT "Table name. [ALL]: " ACCEPT p_types DEFAULT 'P,U,R' PROMPT "Constraint type (P,U,R). [ALL]: " PROMPT PROMPT Disabled constraints (before) SELECT c.owner, c.table_name, c.constraint_type, c.constraint_name FROM dba_constraints c WHERE regexp_like(c.owner, '^&p_owner.$', 'i') AND regexp_like(c.table_name, '^&p_tables.$', 'i') AND regexp_like(c.constraint_type, '^(' || replace('&p_types', ',', '|') || ')$', 'i') AND c.status = 'DISABLED' AND c.table_name not in (SELECT q.queue_table FROM dba_queues q WHERE q.owner = c.owner) ORDER BY c.owner, c.table_name, decode(c.constraint_type, 'P', 1, 'U', 2, 'R', 3, 4), c.constraint_name / PROMPT PROMPT Disabling constraints... begin dbms_output.enable(null); for x in (SELECT '"' || c.owner || '"."' || c.table_name || '"' as table_name, '"' || c.constraint_name || '"' as constraint_name, c.constraint_type, t.iot_type FROM dba_constraints c, dba_tables t WHERE regexp_like(c.owner, '^&p_owner.$', 'i') AND regexp_like(c.table_name, '^&p_tables.$', 'i') AND regexp_like(c.constraint_type, '^(' || replace('&p_types', ',', '|') || ')$', 'i') AND c.owner = t.owner AND c.table_name = t.table_name AND t.table_name not in (SELECT queue_table FROM dba_queues WHERE owner = t.owner) AND c.status = 'ENABLED' ORDER BY decode(c.constraint_type, 'U', 1, 'R', 2, 'P', 3, 4), c.owner, c.table_name) loop begin if x.constraint_type = 'P' then if x.iot_type is null then execute immediate 'ALTER TABLE ' || x.table_name || ' DISABLE CONSTRAINT ' || x.constraint_name || ' CASCADE DROP INDEX'; end if; else execute immediate 'ALTER TABLE ' || x.table_name || ' DISABLE CONSTRAINT ' || x.constraint_name; end if; exception when others then dbms_output.put_line(SQLERRM); end; end loop; end; / PROMPT PROMPT Still enabled constraints (after) SELECT c.owner, c.table_name, c.constraint_type, c.constraint_name FROM dba_constraints c WHERE regexp_like(c.owner, '^&p_owner.$', 'i') AND regexp_like(c.table_name, '^&p_tables.$', 'i') AND regexp_like(c.constraint_type, '^(' || replace('&p_types', ',', '|') || ')$', 'i') AND c.status = 'ENABLED' AND c.table_name not in (SELECT q.queue_table FROM dba_queues q WHERE q.owner = c.owner) ORDER BY c.owner, c.table_name, decode(c.constraint_type, 'P', 1, 'U', 2, 'R', 3, 4), c.constraint_name / undefine p_owner undefine p_tables undefine p_types
INSERT INTO honeywell5800_trips(sensor, loop, trippedBy) SELECT @sensor as new_sensor, @loop as new_loop, @trippedBy as new_trippedBy -- do not insert a new record if last trip contained -- the same information WHERE new_trippedBy NOT IN ( SELECT trippedBy FROM honeywell5800_trips WHERE sensor=new_sensor AND loop=new_loop ORDER BY id DESC LIMIT 1 )
<gh_stars>1-10 -- Add used protocol to producer table DO $$ BEGIN RAISE NOTICE '--- Running alter-script v 2.2.2: REST support ---'; RAISE NOTICE 'Removing default value of producer table protocol column.'; ALTER TABLE <misp2_schema>.producer ALTER COLUMN protocol DROP DEFAULT; RAISE NOTICE 'Changing producer table protocol values from WSDL&NONE&ALL to SOAP and OPENAPI to REST.'; UPDATE <misp2_schema>.producer SET protocol = 'SOAP' WHERE protocol in ('WSDL', 'NONE', 'ALL'); UPDATE <misp2_schema>.producer SET protocol = 'REST' WHERE protocol = 'OPENAPI'; RAISE NOTICE 'Adding column openapi_service_code to query table'; ALTER TABLE <misp2_schema>.query ADD COLUMN openapi_service_code varchar(256); COMMENT ON COLUMN <misp2_schema>.query.openapi_service_code IS 'Teenuse nimi, mis on vajalik xroad rest teenuste kasutamiseks.'; RAISE NOTICE 'Changing producer unique constraint to contain protocol'; DROP INDEX IF EXISTS <misp2_schema>.in_producer_portal_id_name; CREATE UNIQUE INDEX in_producer_portal_id_name_protocol on <misp2_schema>.producer (portal_id, short_name, xroad_instance, member_class, subsystem_code, protocol); RAISE NOTICE 'Changing query unique constraint to contain openapi_service_code'; DROP INDEX IF EXISTS <misp2_schema>.in_query; CREATE UNIQUE INDEX in_query_partial_producer_name ON <misp2_schema>.query (producer_id, name) WHERE openapi_service_code IS NULL; CREATE UNIQUE INDEX in_query_partial_producer_name_service_code on <misp2_schema>.query (producer_id, name, openapi_service_code) WHERE openapi_service_code IS NOT NULL; RAISE NOTICE '--- Alter-script v 2.2.2 finished successfully ---'; END $$;
<reponame>EmmaRocheteau/eICU-GNN-LSTM -- MUST BE RUN FIRST -- creates a materialized view labels which looks like this: /* patientunitstayid | predictedhospitalmortality | actualhospitalmortality | predictediculos | actualiculos -------------------+----------------------------+-------------------------+-------------------+-------------- 141265 | 5.2291724973649173E-2 | ALIVE | 2.04551427140529 | 4.2138 141650 | 9.8379312792900908E-2 | ALIVE | 4.0173515857653 | 4.0187 141806 | 0.61324392319420928 | ALIVE | 8.47993403963615 | 26.9763 141920 | 0.1220932810791483 | ALIVE | 5.7713323573653 | 2.0868 */ -- delete the materialized view labels if it already exists drop materialized view if exists labels cascade; create materialized view labels as -- select all the data we need from the apache predictions table, plus patient identifier and hospital identifier -- information because we only want to select one episode per patient (more on this later) with all_labels as ( select p.uniquepid, p.patienthealthsystemstayid, apr.patientunitstayid, p.unitvisitnumber, apr.predictedhospitalmortality, apr.actualhospitalmortality, apr.predictediculos, apr.actualiculos from patient as p inner join apachepatientresult as apr on p.patientunitstayid = apr.patientunitstayid -- only use the most recent apache prediction model and exclude anyone who doesn't have at least 24 hours of data where apr.apacheversion = 'IVa' and apr.actualiculos >= 1 ) select al.patientunitstayid, al.predictedhospitalmortality, al.actualhospitalmortality, al.predictediculos, al.actualiculos from all_labels as al -- 'selection' is a table which will choose a random hospital stay (the lowest number is fine because the stays -- are randomly ordered). In the case of multiple ICU stays within that hospital admission, it will choose the -- first ICU stay that satisfies the 24 hours of data requirement. The rationale is that the model should be -- applied as soon as there is 24 hours of continuous data within the hospital. This query extracts 89143 stays. inner join ( select p.uniquepid, p.patienthealthsystemstayid, min(p.unitvisitnumber) as unitvisitnumber from patient as p inner join ( select uniquepid, min(patienthealthsystemstayid) as patienthealthsystemstayid from all_labels group by uniquepid ) as intermediate_selection on p.patienthealthsystemstayid = intermediate_selection.patienthealthsystemstayid group by p.uniquepid, p.patienthealthsystemstayid ) as selection on al.patienthealthsystemstayid = selection.patienthealthsystemstayid and al.unitvisitnumber = selection.unitvisitnumber;
-- file:updatable_views.sql ln:99 expect:true UPDATE ro_view20 SET b=upper(b)
<reponame>franciscosens/doa-sangue DROP TABLE IF EXISTS usuarios; DROP TABLE IF EXISTS doacoes_perguntas; DROP TABLE IF EXISTS doacoes; DROP TABLE IF EXISTS hemocentros; DROP TABLE IF EXISTS perguntas; DROP TABLE IF EXISTS doadores; DROP TABLE IF EXISTS hemocentros; CREATE TABLE hemocentros( id INTEGER PRIMARY KEY IDENTITY(1, 1), nome VARCHAR(100) NOT NULL, descricao TEXT, estado VARCHAR(100), cidade VARCHAR(100), bairro VARCHAR(100), numero INTEGER, cep VARCHAR(10), complemento TEXT ); CREATE TABLE doadores( id INTEGER PRIMARY KEY IDENTITY(1, 1), id_hemocentro INTEGER NOT NULL, FOREIGN KEY(id_hemocentro) REFERENCES hemocentros(id), nome VARCHAR(100) NOT NULL, sobrenome VARCHAR(100) NOT NULL, data_nascimento DATE NOT NULL, tipo_sanguineo VARCHAR(6) NOT NULL, peso FLOAT, altura FLOAT ); CREATE TABLE perguntas( id INTEGER PRIMARY KEY IDENTITY(1, 1), nome VARCHAR(100) NOT NULL, resposta BIT ); CREATE TABLE doacoes( id INTEGER PRIMARY KEY IDENTITY(1, 1), id_doador INTEGER NOT NULL, FOREIGN KEY(id_doador) REFERENCES doadores(id), aceitavel BIT, atendente VARCHAR(100), litros FLOAT, data DATE ); CREATE TABLE doacoes_perguntas( id INTEGER PRIMARY KEY IDENTITY(1, 1), id_doacao INTEGER NOT NULL, id_pergunta INTEGER NOT NULL, FOREIGN KEY(id_doacao) REFERENCES doacoes(id), FOREIGN KEY(id_pergunta) REFERENCES perguntas(id), resposta BIT NOT NULL ); CREATE TABLE usuarios( id INTEGER PRIMARY KEY IDENTITY(1, 1), nome VARCHAR(100) NOT NULL, login VARCHAR(30) NOT NULL, senha VARCHAR(128) NOT NULL, privilegio VARCHAR(100) NOT NULL );
<filename>conf/evolutions/default/1.sql # --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table random ( id varchar(255) not null, sequence varchar(255), lane varchar(255), seed varchar(255), name varchar(255), constraint uq_random_1 unique (seed,sequence,lane), constraint pk_random primary key (id)) ; create sequence random_seq; # --- !Downs SET REFERENTIAL_INTEGRITY FALSE; drop table if exists random; SET REFERENTIAL_INTEGRITY TRUE; drop sequence if exists random_seq;
<filename>39/src/main/resources/db/migration/V1.1.0__sys_user_add_column.sql alter table SYS_USER add signature varchar(60) comment 'ca签名';
<reponame>zeropsio/recipe-contember-engine<filename>packages/engine-tenant-api/src/migrations/2019-02-18-160155-session-expiration.sql<gh_stars>10-100 ALTER TABLE "api_key" ADD COLUMN expiration INT DEFAULT NULL;
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; SET client_min_messages = warning; SET row_security = off; INSERT INTO public.personne VALUES (1, true, 'admin', '<EMAIL>', 'admin', 'admin', '$2a$10$1LqLK3XoVufvBFNG5UyiveWsovMbfkp1FBViNwfxbl0UfNeHdqtlO', 'admin', 'admin', NULL, NULL, NULL); INSERT INTO public.rucher VALUES (2, true, '', 100, '', true, 43.5383759, 5.5266428, 'Dépôt', '', 1); SELECT pg_catalog.setval('public.hibernate_sequence', 3, false); -- -- PostgreSQL database dump complete --
create table client ( id bigserial not null primary key, name varchar(50) ); create table manager ( no bigserial not null primary key, label varchar(50) );
<filename>Odev4-5.sql<gh_stars>0 --dvdrental örnek veri tabanı üzerinden city tablosundaki şehir isimlerinin kaç tanesi 'R' veya r karakteri ile biter? SELECT COUNT(city) FROM city WHERE city ILIKE '%R';
<gh_stars>0 SELECT COUNT(i.InvoiceLineId) as Id37LineItems FROM InvoiceLine i WHERE i.InvoiceId = 37;
-- MySQL dump 10.13 Distrib 5.7.26, for osx10.10 (x86_64) -- -- Host: 127.0.0.1 Database: laraclassified -- ------------------------------------------------------ -- Server version 5.7.26 /*!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 */; -- -- Dumping data for table `<<prefix>>subadmin1` -- /*!40000 ALTER TABLE `<<prefix>>subadmin1` DISABLE KEYS */; INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('NC.02','NC','South Province','South Province',1); INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('NC.01','NC','North Province','North Province',1); INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('NC.03','NC','Loyalty Islands','Loyalty Islands',1); /*!40000 ALTER TABLE `<<prefix>>subadmin1` ENABLE KEYS */; -- -- Dumping data for table `<<prefix>>subadmin2` -- /*!40000 ALTER TABLE `<<prefix>>subadmin2` DISABLE KEYS */; INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.02.98832','NC','NC.02','Yaté','Yate',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.01.98831','NC','NC.01','Voh','Voh',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.01.98830','NC','NC.01','Touho','Touho',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.02.98829','NC','NC.02','Thio','Thio',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.02.98828','NC','NC.02','Sarraméa','Sarramea',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.01.98827','NC','NC.01','Poya','Poya',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.01.98825','NC','NC.01','Pouembout','Pouembout',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.01.98824','NC','NC.01','Pouébo','Pouebo',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.01.98823','NC','NC.01','Ponérihouen','Ponerihouen',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.01.98822','NC','NC.01','Poindimié','Poindimie',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.02.98821','NC','NC.02','Païta','Paita',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.03.98820','NC','NC.03','Ouvéa','Ouvea',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.01.98819','NC','NC.01','Ouégoa','Ouegoa',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.02.98818','NC','NC.02','Nouméa','Noumea',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.02.98817','NC','NC.02','Le Mont-Dore','Le Mont-Dore',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.02.98816','NC','NC.02','Moindou','Moindou',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.03.98815','NC','NC.03','Maré','Mare',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.03.98814','NC','NC.03','Lifou','Lifou',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.01.98812','NC','NC.01','Koumac','Koumac',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.01.98810','NC','NC.01','Kaala-Gomén','Kaala-Gomen',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.01.98801','NC','NC.01','Bélep','Belep',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.02.98809','NC','NC.02','L’Île des Pins','L\'Ile des Pins',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.01.98808','NC','NC.01','Houaïlou','Houailou',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.01.98807','NC','NC.01','Hienghéne','Hienghene',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.02.98806','NC','NC.02','Farino','Farino',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.02.98805','NC','NC.02','Dumbéa','Dumbea',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.01.98804','NC','NC.01','Canala','Canala',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.02.98803','NC','NC.02','Bourail','Bourail',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.02.98802','NC','NC.02','Bouloupari','Bouloupari',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.01.98811','NC','NC.01','Koné','Kone',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.02.98813','NC','NC.02','La Foa','La Foa',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.01.98833','NC','NC.01','Kouaoua','Kouaoua',1); INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('NC.01.98826','NC','NC.01','Poum','Poum',1); /*!40000 ALTER TABLE `<<prefix>>subadmin2` ENABLE KEYS */; -- -- Dumping data for table `<<prefix>>cities` -- /*!40000 ALTER TABLE `<<prefix>>cities` DISABLE KEYS */; INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('NC','Wé','We',167.265,-20.9169,'P','PPLA','NC.03','NC.03.98814',10375,'Pacific/Noumea',1,'2017-01-11 23:00:00','2017-01-11 23:00:00'); INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('NC','Tadine','Tadine',167.88,-21.5475,'P','PPL','NC.03','NC.03.98815',7492,'Pacific/Noumea',1,'2019-02-20 23:00:00','2019-02-20 23:00:00'); INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('NC','Païta','Paita',166.357,-22.1311,'P','PPL','NC.02','NC.02.98821',12617,'Pacific/Noumea',1,'2017-01-09 23:00:00','2017-01-09 23:00:00'); INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('NC','Nouméa','Noumea',166.449,-22.2741,'P','PPLC','NC.02','NC.02.98818',93060,'Pacific/Noumea',1,'2017-07-26 23:00:00','2017-07-26 23:00:00'); INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('NC','Mont-Dore','Mont-Dore',166.566,-22.2626,'P','PPL','NC.02','NC.02.98817',24680,'Pacific/Noumea',1,'2017-01-09 23:00:00','2017-01-09 23:00:00'); INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('NC','La Foa','La Foa',165.828,-21.7108,'P','PPLA','NC.02','NC.02.98813',2947,'Pacific/Noumea',1,'2013-05-02 23:00:00','2013-05-02 23:00:00'); INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('NC','Koné','Kone',164.866,-21.0595,'P','PPLA','NC.01','NC.01.98811',4572,'Pacific/Noumea',1,'2017-05-25 23:00:00','2017-05-25 23:00:00'); INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('NC','Dumbéa','Dumbea',166.457,-22.1576,'P','PPL','NC.02','NC.02.98805',19346,'Pacific/Noumea',1,'2018-10-04 23:00:00','2018-10-04 23:00:00'); /*!40000 ALTER TABLE `<<prefix>>cities` ENABLE KEYS */; /*!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
<reponame>SebastianBienert/AdvancedDatabase --Lista artystów, którzy stworzyli albumy o łącznym czasie utworów z gatunku rock dłuższym niż 1 godzina. DECLARE artistname VARCHAR(200); BEGIN for v_rec in ( SELECT DISTINCT ( ar.name ) FROM artist ar JOIN album a ON ar.artistid = a.artistid JOIN track tr ON tr.albumid = a.albumid JOIN genre ON tr.genreid = genre.genreid WHERE genre.name = 'Rock' GROUP BY tr.albumid, ar.name HAVING SUM(tr.milliseconds) / 3600000 > 1 ) loop artistname := v_rec.NAME; end loop; END;
-- 1. insert two new records into the employee table. Select * from Employee; Insert into Employee(EmployeeId, LastName, FirstName) Values (9,'Funtanilla', 'Noah'); Insert into Employee(EmployeeId, LastName, FirstName) Values (10,'Hello', 'World'); -- 2. insert two new records into the tracks table. Select * From Track; Select * From MediaType; Insert into Track(TrackId, Name, UnitPrice, MediaTypeId, Milliseconds) Values (3504,'The Mountaineer', 1, 1, 300000); Insert into Track(TrackId, Name, UnitPrice, MediaTypeId, Milliseconds) Values (3505,'Someone Out There', 1, 1, 300000); -- 3. update customer <NAME>'s name to <NAME> Select * From Customer where CustomerId = 32; Update Customer Set FirstName = 'Robert', LastName = 'Walter' where CustomerId = 32; -- 4. delete one of the employees you inserted. Delete from Employee where Employee.FirstName = 'Hello'; -- 5. delete customer <NAME>.
<filename>SQL/Configure/Configure OLE Automation Procedures.sql<gh_stars>0 /************************************************************************************** ** CREATED BY: <NAME> ** CREATED DATE: 2018.08.21 ** CREATION: Quick script to get a comma separated list of data. **************************************************************************************/ SET ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, NOCOUNT ON; USE master; EXECUTE sp_configure 'show advanced options', 1; GO RECONFIGURE; GO EXECUTE sp_configure 'Ole Automation Procedures', 1; GO RECONFIGURE; GO
<filename>database/hotich.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th7 17, 2017 lúc 11:57 SA -- Phiên bản máy phục vụ: 10.1.21-MariaDB -- Phiên bản PHP: 5.6.30 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 */; -- -- Cơ sở dữ liệu: `hotich` -- -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `capbansaotrichluc` -- CREATE TABLE `capbansaotrichluc` ( `id` int(10) UNSIGNED NOT NULL, `madv` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `matinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mahuyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `maxa` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `level` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaycap` date DEFAULT NULL, `sotrichluc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quyentrichluc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `plbstrichluc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quyenhotich` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sohotich` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mahs` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoiky` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `chucvu` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `soluongbs` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ghichu` text COLLATE utf8_unicode_ci, `hotennyc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `plgiaytonyc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sogiaytonyc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `trangthai` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `chamecon` -- CREATE TABLE `chamecon` ( `id` int(10) UNSIGNED NOT NULL, `mahs` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `soso` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `soquyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `soqd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `coquanqd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `phanloai` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `cancu` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `lydo` text COLLATE utf8_unicode_ci, `phanloainhap` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoiky` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `chucvu` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoithuchien` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaydangky` date DEFAULT NULL, `hotennk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `loaigiaytonk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sogiaytonk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noicapgtnk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaycapgtnk` date DEFAULT NULL, `quanhenk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `diachink` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mann` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotennn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `gioitinhnn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinhnn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dantocnn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctichnn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tamtrutamvangnn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `loaigiaytonn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sogiaytonn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noicapgtnn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaycapgtnn` date DEFAULT NULL, `mandn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotenndn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `gioitinhndn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinhndn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dantocndn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctichndn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tamtrutamvangndn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `loaigiaytondn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sogiaytondn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noicapgtndn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaycapgtndn` date DEFAULT NULL, `trangthai` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ghichu` text COLLATE utf8_unicode_ci, `matinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mahuyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `maxa` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `congdan` -- CREATE TABLE `congdan` ( `id` int(10) UNSIGNED NOT NULL, `matinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mahuyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `maxa` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `macongdan` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `hoten` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotenk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `gioitinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinh` date DEFAULT NULL, `noisinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dantoc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctich` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tongiao` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quequan` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `thuongtru` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `socmnd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ttcmnd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tthonnhan` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `trangthai` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tttd` text COLLATE utf8_unicode_ci, `action` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Đang đổ dữ liệu cho bảng `congdan` -- INSERT INTO `congdan` (`id`, `matinh`, `mahuyen`, `maxa`, `macongdan`, `hoten`, `hotenk`, `gioitinh`, `ngaysinh`, `noisinh`, `dantoc`, `quoctich`, `tongiao`, `quequan`, `thuongtru`, `socmnd`, `ttcmnd`, `tthonnhan`, `trangthai`, `tttd`, `action`, `created_at`, `updated_at`) VALUES (1, NULL, 'mh', 'mx', 'mhmxCD1500280972', 'a', 'a', 'Nam', '1988-08-11', 'xx', 'Kinh', 'Viet Nam', 'Không', 'dqd', 'dq', '1212', 'dqd', 'Chưa kết hôn', NULL, NULL, NULL, '2017-07-17 08:42:52', '2017-07-17 08:43:04'); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `connuoi` -- CREATE TABLE `connuoi` ( `id` int(10) UNSIGNED NOT NULL, `matinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mahuyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `maxa` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `masohoso` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `masoconnuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `macdconnuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `so` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotenchanuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `macdchanuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinhchanuoi` date DEFAULT NULL, `dantocchanuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctichchanuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `cmndchanuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noicapgtcn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaycapgtcn` date DEFAULT NULL, `thuongtrucn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotenmenuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `macdmenuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinhmenuoi` date DEFAULT NULL, `dantocmenuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctichmenuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `cmndmenuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noicapgtmn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaycapgtmn` date DEFAULT NULL, `thuongtrumn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotenconnuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `gioitinhconnuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinhconnuoi` date DEFAULT NULL, `noisinhconnuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dantocconnuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctichconnuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `thuongtruconnuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotenchagiao` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `macdchagiao` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinhchagiao` date DEFAULT NULL, `dantocchagiao` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctichchagiao` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `cmndchagiao` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noicapgtcg` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaycapgtcg` date DEFAULT NULL, `thuongtrucg` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotenmegiao` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `macdmegiao` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinhmegiao` date DEFAULT NULL, `dantocmegiao` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctichmegiao` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `cmndmegiao` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noicapgtmg` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaycapgtmg` date DEFAULT NULL, `thuongtrumg` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quanhenguoigiao` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tencsnuoiduong` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoidaidiencsnd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `chucvundd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noidkconnuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaythangdk` date DEFAULT NULL, `nguoithuchien` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoikygiaycn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `chucvunguoidk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaythangqd` date DEFAULT NULL, `soqd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ghichu` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `lydo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tinhtrangsk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `phanloaiconnuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tuoiconnuoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `trangthai` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `dantoc` -- CREATE TABLE `dantoc` ( `id` int(10) UNSIGNED NOT NULL, `dantoc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Đang đổ dữ liệu cho bảng `dantoc` -- INSERT INTO `dantoc` (`id`, `dantoc`, `created_at`, `updated_at`) VALUES (1, 'Kinh', NULL, NULL), (2, 'Tay', NULL, NULL); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `districts` -- CREATE TABLE `districts` ( `id` int(10) UNSIGNED NOT NULL, `mahuyen` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `tenhuyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `diachi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dienthoai` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fax` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `website` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `chucvunguoiky` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoiky` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoithuchien` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Đang đổ dữ liệu cho bảng `districts` -- INSERT INTO `districts` (`id`, `mahuyen`, `tenhuyen`, `diachi`, `dienthoai`, `fax`, `email`, `website`, `chucvunguoiky`, `nguoiky`, `nguoithuchien`, `created_at`, `updated_at`) VALUES (1, 'mh', 'Huyện A', '5444', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (2, 'mhb', 'Huyện B', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (3, 'mhc', 'Huyện C', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `general-configs` -- CREATE TABLE `general-configs` ( `id` int(10) UNSIGNED NOT NULL, `matinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `maqhns` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tendv` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `diachi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tel` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `thutruong` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ketoan` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoilapbieu` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `setting` text COLLATE utf8_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Đang đổ dữ liệu cho bảng `general-configs` -- INSERT INTO `general-configs` (`id`, `matinh`, `maqhns`, `tendv`, `diachi`, `tel`, `thutruong`, `ketoan`, `nguoilapbieu`, `setting`, `created_at`, `updated_at`) VALUES (1, NULL, '12345678', 'cc', NULL, NULL, NULL, NULL, NULL, '{\"congdan\":{\"index\":\"1\"},\"khaisinh\":{\"index\":\"1\"},\"khaitu\":{\"index\":\"1\"},\"tthonnhan\":{\"index\":\"1\"},\"kethon\":{\"index\":\"1\"},\"dkconnuoi\":{\"index\":\"1\"},\"dkgiamho\":{\"index\":\"1\"},\"dknhanchamecon\":{\"index\":\"1\"},\"capbansao\":{\"index\":\"1\"},\"chungthuc\":{\"index\":\"1\"}}', NULL, '2017-06-23 03:43:26'); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `giamho` -- CREATE TABLE `giamho` ( `id` int(10) UNSIGNED NOT NULL, `mahs` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `soso` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `soquyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `soqd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `coquanqd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `phanloai` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `cancu` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `lydo` text COLLATE utf8_unicode_ci, `phanloainhap` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoiky` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `chucvu` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoithuchien` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaydangky` date DEFAULT NULL, `hotennk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `loaigiaytonk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sogiaytonk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noicapgtnk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaycapgtnk` date DEFAULT NULL, `quanhenk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `diachink` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mangh1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotenngh1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `gioitinhngh1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinhngh1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dantocngh1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctichngh1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tamtrutamvangngh1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `loaigiaytongh1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sogiaytongh1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noicapgtngh1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaycapgtngh1` date DEFAULT NULL, `mangh2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotenngh2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `gioitinhngh2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinhngh2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dantocngh2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctichngh2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tamtrutamvangngh2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `loaigiaytongh2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sogiaytongh2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noicapgtngh2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaycapgtngh2` date DEFAULT NULL, `mandgh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotenndgh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `gioitinhndgh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinhndgh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dantocndgh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctichndgh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tamtrutamvangndgh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noisinhndgh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `loaigiaytondgh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sogiaytondgh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noicapgtndgh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaycapgtndgh` date DEFAULT NULL, `trangthai` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ghichu` text COLLATE utf8_unicode_ci, `matinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mahuyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `maxa` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `kethon` -- CREATE TABLE `kethon` ( `id` int(10) UNSIGNED NOT NULL, `matinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mahuyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `maxa` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mahs` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `pldangky` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sokethon` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quyenkethon` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaydangky` date DEFAULT NULL, `nguoiky` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `chucvu` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoithuchien` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ghichu` text COLLATE utf8_unicode_ci, `hotenvo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `loaigiaytovo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sogiaytovo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinhvo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dantocvo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctichvo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `diachivo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotenchong` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `loaigiaytochong` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sogiaytochong` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinhchong` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dantocchong` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctichchong` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `diachichong` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `trangthai` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `khaisinh` -- CREATE TABLE `khaisinh` ( `id` int(10) UNSIGNED NOT NULL, `matinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mahuyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `maxa` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mahs` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `plkhaisinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `pldangky` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dunghanquahan` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `so` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaydangky` date DEFAULT NULL, `nguoiky` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `chucvu` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoithuchien` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotennk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `loaigiaytonk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sogiaytonk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noicapgtnk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaycapgtnk` date DEFAULT NULL, `quanhenk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `diachink` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sochungsinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sodinhdanhcanhan` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotenks` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `gioitinhks` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinhks` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinhksbangchu` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dantocks` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctichks` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `plnoisinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noisinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quequanks` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `deathme` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotenme` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `loaigiaytome` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sogiaytome` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinhme` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dantocme` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctichme` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `diachime` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `deathcha` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotencha` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `loaigiaytocha` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sogiaytocha` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinhcha` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dantoccha` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctichcha` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `diachicha` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `trangthai` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sobansao` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noikcbbd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sodtlh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `emaillh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sosohokhau` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotenchuho` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quanhechuho` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tongiaoks` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `diachiht` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `thuongtru` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Đang đổ dữ liệu cho bảng `khaisinh` -- INSERT INTO `khaisinh` (`id`, `matinh`, `mahuyen`, `maxa`, `mahs`, `plkhaisinh`, `pldangky`, `dunghanquahan`, `so`, `quyen`, `ngaydangky`, `nguoiky`, `chucvu`, `nguoithuchien`, `hotennk`, `loaigiaytonk`, `sogiaytonk`, `noicapgtnk`, `ngaycapgtnk`, `quanhenk`, `diachink`, `sochungsinh`, `sodinhdanhcanhan`, `hotenks`, `gioitinhks`, `ngaysinhks`, `ngaysinhksbangchu`, `dantocks`, `quoctichks`, `plnoisinh`, `noisinh`, `quequanks`, `deathme`, `hotenme`, `loaigiaytome`, `sogiaytome`, `ngaysinhme`, `dantocme`, `quoctichme`, `diachime`, `deathcha`, `hotencha`, `loaigiaytocha`, `sogiaytocha`, `ngaysinhcha`, `dantoccha`, `quoctichcha`, `diachicha`, `trangthai`, `sobansao`, `noikcbbd`, `sodtlh`, `emaillh`, `sosohokhau`, `hotenchuho`, `quanhechuho`, `tongiaoks`, `diachiht`, `thuongtru`, `created_at`, `updated_at`) VALUES (1, NULL, 'mh', 'mx', 'mhmxKS1500280377', 'Khai sinh thông thường', 'Đăng ký mới', 'Đúng hạn', '1', '1', '2017-07-17', 'x', 'x', 'x', 'x', 'Chứng minh nhân dân', '12', 'x', '2012-12-12', 'Bố', 'x', '1', '1', 'x', 'Nam', '2017-07-17', 'xxx', 'Kinh', 'Viet Nam', 'Sinh trong nước', 'xxx', 'xxxx', NULL, 'x', 'Chứng minh nhân dân', '11', '2012-12-12', 'Kinh', 'Viet Nam', 'x', NULL, 'x', 'Chứng minh nhân dân', '1', '2012-12-12', 'Kinh', 'Viet Nam', 'x', 'Duyệt', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2017-07-17 08:32:57', '2017-07-17 08:33:22'), (2, NULL, 'mh', 'mx', 'mhmxKS1500280508', 'Khai sinh thông thường', 'Đăng ký mới', 'Đúng hạn', '2', '1', '2017-07-17', 'xxxx', 'x', 'xxxxx', 'x', 'Chứng minh nhân dân', '1', 'x', '2012-12-20', 'Ông', 'x', '1', '1', 'x', 'Nam', '2017-07-17', 'x', 'Kinh', 'Viet Nam', 'Sinh trong nước', 'x', 'x', NULL, 'x', 'Chứng minh nhân dân', '1', '2012-12-12', 'Kinh', 'Viet Nam', 'x', NULL, 'x', 'Chứng minh nhân dân', '112', '2012-12-12', 'Kinh', 'Viet Nam', 'x', 'Chờ duyệt', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2017-07-17 08:35:08', '2017-07-17 08:37:34'); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `khaitu` -- CREATE TABLE `khaitu` ( `id` int(10) UNSIGNED NOT NULL, `matinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mahuyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `maxa` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `masohoso` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `macongdan` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `so` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hoten` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `gioitinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinh` date DEFAULT NULL, `noisinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dantoc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctich` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `thuongtru` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `loaigiayto` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `sogiayto` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `giotu` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `phuttu` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaychet` date DEFAULT NULL, `noichet` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguyennhan` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `giaybaotu` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `donvicapgbt` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaycapgbt` date DEFAULT NULL, `noidangkykt` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaydangkykt` date DEFAULT NULL, `ghichukt` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoithuchien` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoikygct` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `chucvu` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotennk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `giaytonk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quanhe` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `phanloaikt` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `phanloaidk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `phanloaituoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tuoinguoitu` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dunghanquahan` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `trangthai` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Đang đổ dữ liệu cho bảng `khaitu` -- INSERT INTO `khaitu` (`id`, `matinh`, `mahuyen`, `maxa`, `masohoso`, `macongdan`, `so`, `quyen`, `hoten`, `gioitinh`, `ngaysinh`, `noisinh`, `dantoc`, `quoctich`, `thuongtru`, `loaigiayto`, `sogiayto`, `giotu`, `phuttu`, `ngaychet`, `noichet`, `nguyennhan`, `giaybaotu`, `donvicapgbt`, `ngaycapgbt`, `noidangkykt`, `ngaydangkykt`, `ghichukt`, `nguoithuchien`, `nguoikygct`, `chucvu`, `hotennk`, `giaytonk`, `quanhe`, `phanloaikt`, `phanloaidk`, `phanloaituoi`, `tuoinguoitu`, `dunghanquahan`, `trangthai`, `created_at`, `updated_at`) VALUES (1, NULL, 'mh', 'mx', 'mhmxKT1500280453', NULL, '1', '1', 'xx', 'Nam', '2012-12-12', 'xxx', NULL, NULL, NULL, 'Chứng minh nhân dân', '11111', '1', '1', '2012-12-12', 'x', 'x', '112', 'x', '2012-12-12', 'x', '2017-07-17', 'x', 'x', 'x', NULL, 'x', NULL, 'x', 'Đúng hạn', 'Đăng ký mới', 'Dưới 1 tuổi', NULL, NULL, 'Duyệt', '2017-07-17 08:34:13', '2017-07-17 08:56:23'), (2, NULL, 'mh', 'mx', 'mhmxKT1500281212', NULL, '2', '1', 'x', 'Nam', '1996-02-18', 'xxx', NULL, NULL, NULL, 'Chứng minh nhân dân', '11111222', '1', '1', '2015-05-26', 'x', 'x', 'x', 'x', '2011-05-17', 'x', '2017-07-17', 'xx', 'x', 'x', NULL, 'x', NULL, 'x', 'Đúng hạn', 'Đăng ký mới', 'Dưới 1 tuổi', NULL, NULL, 'Chờ duyệt', '2017-07-17 08:46:52', '2017-07-17 08:51:20'); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `migrations` -- CREATE TABLE `migrations` ( `id` int(10) UNSIGNED NOT NULL, `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `batch` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Đang đổ dữ liệu cho bảng `migrations` -- INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1, '2014_10_12_000000_create_users_table', 1), (2, '2016_10_14_022915_create_general-configs_table', 1), (3, '2017_06_06_090717_create_districts_table', 1), (4, '2017_06_06_090904_create_towns_table', 1), (5, '2017_06_06_175000_create_congdan_table', 1), (6, '2017_06_07_095456_create_dantoc_table', 1), (7, '2017_06_07_095652_create_quoctich_table', 1), (8, '2017_06_07_152937_create_khaisinh_table', 1), (9, '2017_06_07_193700_create_KhaiTu_table', 1), (10, '2017_06_09_154122_create_ConNuoi_table', 1), (11, '2017_06_17_112329_create_kethon_table', 1), (12, '2017_06_20_154235_create_capbansaotrichluc_table', 1), (13, '2017_06_21_085715_create_sohotich_table', 1), (14, '2017_06_06_202208_create_giamho_table', 2), (15, '2017_06_06_202231_create_chamecon_table', 2), (16, '2017_06_17_105145_create_tthonnhan_table', 2), (17, '2017_07_01_082809_create_thongtinthaydoi_table', 3); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `quoctich` -- CREATE TABLE `quoctich` ( `id` int(10) UNSIGNED NOT NULL, `quoctich` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Đang đổ dữ liệu cho bảng `quoctich` -- INSERT INTO `quoctich` (`id`, `quoctich`, `created_at`, `updated_at`) VALUES (1, 'Viet Nam', NULL, NULL), (2, 'My', NULL, NULL); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `sohotich` -- CREATE TABLE `sohotich` ( `id` int(10) UNSIGNED NOT NULL, `matinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mahuyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `maxa` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quyenhotich` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `plhotich` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sobatdau` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `soketthuc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaybatdau` date DEFAULT NULL, `ngayketthuc` date DEFAULT NULL, `namso` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Đang đổ dữ liệu cho bảng `sohotich` -- INSERT INTO `sohotich` (`id`, `matinh`, `mahuyen`, `maxa`, `quyenhotich`, `plhotich`, `sobatdau`, `soketthuc`, `ngaybatdau`, `ngayketthuc`, `namso`, `created_at`, `updated_at`) VALUES (1, NULL, 'mh', 'mx', '1', 'Khai sinh', '1', NULL, '2017-01-01', '2017-12-31', '2017', '2017-07-17 07:58:43', '2017-07-17 07:58:43'), (2, NULL, 'mh', 'mx', '1', 'Khai tử', '1', NULL, '2017-01-01', '2017-12-31', '2017', '2017-07-17 08:22:54', '2017-07-17 08:22:54'), (3, NULL, 'mh', 'mx', '1', 'Tình trạng hôn nhân', '1', NULL, '2017-01-01', '2017-12-31', '2017', '2017-07-17 08:26:04', '2017-07-17 08:26:04'), (4, NULL, 'mh', 'mx', '1', 'Thay đổi bổ xung', '1', NULL, '2017-01-01', '2017-12-31', '2017', '2017-07-17 09:22:21', '2017-07-17 09:22:21'); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `thongtinthaydoi` -- CREATE TABLE `thongtinthaydoi` ( `id` int(10) UNSIGNED NOT NULL, `matinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mahuyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `maxa` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mahs` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `plgiayto` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `plthaydoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotennk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `thuongtrunk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `cmndnk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quanhengntd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotenntd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinhntd` date DEFAULT NULL, `gioitinhntd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dantocntd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctichntd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `cmndntd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `thuongtruntd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noidkks` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaydkks` date DEFAULT NULL, `noidungtd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `thaydoitu` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `thaydoithanh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `lydo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `cancu` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaydk` date DEFAULT NULL, `nguoikygiay` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `chucvunguoikygiay` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoithuchien` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noithaydoi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quyentd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sotd` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `trangthai` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Đang đổ dữ liệu cho bảng `thongtinthaydoi` -- INSERT INTO `thongtinthaydoi` (`id`, `matinh`, `mahuyen`, `maxa`, `mahs`, `plgiayto`, `plthaydoi`, `hotennk`, `thuongtrunk`, `cmndnk`, `quanhengntd`, `hotenntd`, `ngaysinhntd`, `gioitinhntd`, `dantocntd`, `quoctichntd`, `cmndntd`, `thuongtruntd`, `noidkks`, `ngaydkks`, `noidungtd`, `thaydoitu`, `thaydoithanh`, `lydo`, `cancu`, `ngaydk`, `nguoikygiay`, `chucvunguoikygiay`, `nguoithuchien`, `noithaydoi`, `quyentd`, `sotd`, `trangthai`, `created_at`, `updated_at`) VALUES (1, NULL, 'mh', 'mx', 'mhmxKS1500280377', 'Khai sinh', 'Thay đổi hộ tịch', 'za', 'z', '1', 'Ông', 'x', '2012-12-20', 'Nam', 'Kinh', 'xx', '11212112123', NULL, NULL, NULL, 'xxx', 'xx', 'xxx', 'xxx', 'xxx', '1970-01-01', 'x', NULL, 'x', 'x', '1', '1', 'Duyệt', '2017-07-17 09:22:30', '2017-07-17 09:23:22'), (2, NULL, 'mh', 'mx', 'mhmxKS1500280377', 'Khai sinh', 'Thay đổi hộ tịch', 'x', 'x', '1212', 'Bà', 'x', '2012-02-11', 'Nam', 'Tay', 'xxxx', '121212', NULL, NULL, NULL, 'xxxx', 'xxx', 'xxx', 'xxx', 'xxx', '2017-07-17', 'x', NULL, 'x', 'x', '1', '2', 'Duyệt', '2017-07-17 09:31:33', '2017-07-17 09:31:39'); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `towns` -- CREATE TABLE `towns` ( `id` int(10) UNSIGNED NOT NULL, `mahuyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tenhuyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `maxa` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `tenxa` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `diachi` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dienthoai` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fax` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `website` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `chucvunguoiky` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoiky` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoithuchien` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Đang đổ dữ liệu cho bảng `towns` -- INSERT INTO `towns` (`id`, `mahuyen`, `tenhuyen`, `maxa`, `tenxa`, `diachi`, `dienthoai`, `fax`, `email`, `website`, `chucvunguoiky`, `nguoiky`, `nguoithuchien`, `created_at`, `updated_at`) VALUES (1, 'mh', 'Huyện A', 'mx', 'Xã A', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (2, 'mhb', 'Huyện B', 'mxb', 'Xã B', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (3, 'mhb', 'Huyện C', 'mxc', 'Xã C', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `tthonnhan` -- CREATE TABLE `tthonnhan` ( `id` int(10) UNSIGNED NOT NULL, `matinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mahuyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `maxa` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mahs` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `soxacnhan` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngayxn` date DEFAULT NULL, `donvixn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nguoidn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quanhe` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotenxn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ngaysinh` date DEFAULT NULL, `gioitinh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dantoc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `quoctich` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `giayto` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noicutru` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tungay` date DEFAULT NULL, `denngay` date DEFAULT NULL, `tthonnhan` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `noidungxn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `trangthai` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `hotennk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `chucvunk` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `phanloai` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `users` -- CREATE TABLE `users` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `phone` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `status` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `maxa` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mahuyen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `level` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sadmin` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `permission` text COLLATE utf8_unicode_ci, `emailxt` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `question` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `answer` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=COMPACT; -- -- Đang đổ dữ liệu cho bảng `users` -- INSERT INTO `users` (`id`, `name`, `username`, `password`, `phone`, `email`, `status`, `maxa`, `mahuyen`, `level`, `sadmin`, `permission`, `emailxt`, `question`, `answer`, `created_at`, `updated_at`) VALUES (1, 'hungdd', 'hung', '<PASSWORD>', '<PASSWORD>', '<EMAIL>', 'Kích hoạt', '', 'mh', 'H', 'ssa', NULL, NULL, NULL, NULL, NULL, NULL); -- -- Chỉ mục cho các bảng đã đổ -- -- -- Chỉ mục cho bảng `capbansaotrichluc` -- ALTER TABLE `capbansaotrichluc` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `chamecon` -- ALTER TABLE `chamecon` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `congdan` -- ALTER TABLE `congdan` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `congdan_macongdan_unique` (`macongdan`); -- -- Chỉ mục cho bảng `connuoi` -- ALTER TABLE `connuoi` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `dantoc` -- ALTER TABLE `dantoc` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `districts` -- ALTER TABLE `districts` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `districts_mahuyen_unique` (`mahuyen`); -- -- Chỉ mục cho bảng `general-configs` -- ALTER TABLE `general-configs` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `giamho` -- ALTER TABLE `giamho` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `kethon` -- ALTER TABLE `kethon` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `khaisinh` -- ALTER TABLE `khaisinh` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `khaitu` -- ALTER TABLE `khaitu` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `migrations` -- ALTER TABLE `migrations` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `quoctich` -- ALTER TABLE `quoctich` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `sohotich` -- ALTER TABLE `sohotich` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `thongtinthaydoi` -- ALTER TABLE `thongtinthaydoi` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `towns` -- ALTER TABLE `towns` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `towns_maxa_unique` (`maxa`); -- -- Chỉ mục cho bảng `tthonnhan` -- ALTER TABLE `tthonnhan` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `users_username_unique` (`username`); -- -- AUTO_INCREMENT cho các bảng đã đổ -- -- -- AUTO_INCREMENT cho bảng `capbansaotrichluc` -- ALTER TABLE `capbansaotrichluc` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT cho bảng `chamecon` -- ALTER TABLE `chamecon` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT cho bảng `congdan` -- ALTER TABLE `congdan` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT cho bảng `connuoi` -- ALTER TABLE `connuoi` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT cho bảng `dantoc` -- ALTER TABLE `dantoc` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT cho bảng `districts` -- ALTER TABLE `districts` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT cho bảng `general-configs` -- ALTER TABLE `general-configs` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT cho bảng `giamho` -- ALTER TABLE `giamho` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT cho bảng `kethon` -- ALTER TABLE `kethon` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT cho bảng `khaisinh` -- ALTER TABLE `khaisinh` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT cho bảng `khaitu` -- ALTER TABLE `khaitu` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT cho bảng `migrations` -- ALTER TABLE `migrations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18; -- -- AUTO_INCREMENT cho bảng `quoctich` -- ALTER TABLE `quoctich` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT cho bảng `sohotich` -- ALTER TABLE `sohotich` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT cho bảng `thongtinthaydoi` -- ALTER TABLE `thongtinthaydoi` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT cho bảng `towns` -- ALTER TABLE `towns` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT cho bảng `tthonnhan` -- ALTER TABLE `tthonnhan` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT cho bảng `users` -- ALTER TABLE `users` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; /*!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 */;
<filename>sql/2111/units.sql -- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Nov 21, 2019 at 05:32 PM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.11 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: `fapos` -- -- -------------------------------------------------------- -- -- Table structure for table `units` -- CREATE TABLE `units` ( `unit_id` int(11) NOT NULL, `name_unit` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `created` datetime NOT NULL DEFAULT current_timestamp(), `updated` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `units` -- INSERT INTO `units` (`unit_id`, `name_unit`, `created`, `updated`) VALUES (1, 'Kilogram', '2019-11-21 22:18:42', 2019); -- -- Indexes for dumped tables -- -- -- Indexes for table `units` -- ALTER TABLE `units` ADD PRIMARY KEY (`unit_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `units` -- ALTER TABLE `units` MODIFY `unit_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; 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 */;
CREATE TABLE owner_tokens( owner_id int(11) NOT NULL, api_token varchar(255) CHARACTER SET '<PASSWORD>', created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`owner_id`), UNIQUE uniq_token (`api_token`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- file:rowsecurity.sql ln:1194 expect:true CREATE TABLE copy_t (a integer, b text)
<filename>Transaction/トランザクション分離レベルの確認.sql SELECT s.session_id, CASE s.transaction_isolation_level WHEN 0 THEN 'Unspecified' WHEN 1 THEN 'ReadUncommitted' WHEN 2 THEN 'ReadCommitted' WHEN 3 THEN 'Repeatable' WHEN 4 THEN 'Serializable' WHEN 5 THEN 'Snapshot' END AS Transaction_Isolation_Level , s.host_name, s.program_name, s.client_interface_name, s.login_name, s.nt_domain, s.nt_user_name, s.status, st.enlist_count, st.is_user_transaction, st.is_local, st.is_enlisted, st.is_bound, st.open_transaction_count, CASE at.transaction_type WHEN 1 THEN 'Read/write' WHEN 2 THEN 'Read-only' WHEN 3 THEN 'System' WHEN 4 THEN 'Distributed' END as transaction_type, at.transaction_uow, CASE at.transaction_state WHEN 0 THEN 'The transaction has not been completely initialized yet.' WHEN 1 THEN 'The transaction has been initialized but has not started.' WHEN 2 THEN 'The transaction is active.' WHEN 3 THEN 'The transaction has ended. This is used for read-only transactions.' WHEN 4 THEN 'The commit process has been initiated on the distributed transaction. This is for distributed transactions only. The distributed transaction is still active but further processing cannot take place.' WHEN 5 THEN 'The transaction is in a prepared state and waiting resolution.' WHEN 6 THEN 'The transaction has been committed.' WHEN 7 THEN 'The transaction is being rolled back.' WHEN 8 THEN 'The transaction has been rolled back.' END AS transaction_state, CASE dtc_state WHEN 1 THEN 'ACTIVE' WHEN 2 THEN 'PREPARED' WHEN 3 THEN 'COMMITTED' WHEN 4 THEN 'ABORTED' WHEN 5 THEN 'RECOVERED' ELSE CAST(dtc_state AS nvarchar(50)) END AS dtc_state FROM sys.dm_exec_sessions s LEFT JOIN sys.dm_tran_session_transactions st ON s.session_id = st.session_id LEFT JOIN sys.dm_tran_active_transactions at ON st.transaction_id = at.transaction_id WHERE st.is_user_transaction = 1 AND s.session_id > 50
DROP TABLE IF EXISTS user_secrets;
/*Clear Query Store and procedure cache*/ ALTER DATABASE AdventureWorks2016_EXT SET QUERY_STORE CLEAR; ALTER DATABASE AdventureWorks2016_EXT SET QUERY_STORE = ON (QUERY_CAPTURE_MODE = ALL); DBCC FREEPROCCACHE GO USE AdventureWorks2016_EXT; GO /*Run simple query - what data is collected and where does it go to?*/ SELECT * FROM Part; SELECT * FROM sys.query_store_query_text; SELECT * FROM sys.query_store_query; SELECT * FROM sys.query_store_plan; SELECT * FROM sys.query_store_runtime_stats; /* Combine all info vw_QueryStoreCompileInfo is custom view (created for presentation) */ SELECT * FROM vw_QueryStoreCompileInfo WHERE query_sql_text = 'SELECT * FROM Part' /*The same query from the proc*/ DROP PROCEDURE IF EXISTS sp_GetParts GO CREATE PROCEDURE sp_GetParts AS SELECT * FROM Part; GO EXEC sp_GetParts; /*Again the same query, from sp_executesql*/ EXEC sp_executesql N'SELECT * FROM Part' SELECT * FROM vw_QueryStoreCompileInfo WHERE query_sql_text = 'SELECT * FROM Part' /*Finally trigger*/ DROP TRIGGER IF EXISTS dbo.OnPartInsert GO CREATE TRIGGER dbo.OnPartInsert ON dbo.Part AFTER INSERT AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; SELECT * FROM Part; END GO INSERT INTO Part VALUES (3000020, 'Part_300020'); SELECT * FROM vw_QueryStoreCompileInfo WHERE query_sql_text = 'SELECT * FROM Part' /*What happens with parametrized query?*/ SELECT * FROM Part WHERE PartId = 5; SELECT * FROM vw_QueryStoreCompileInfo WHERE query_sql_text = 'SELECT * FROM Part = 5' /* Check sys.query_store_query_text */ SELECT * FROM sys.query_store_query_text; /*Try sys.fn_stmt_sql_handle_from_sql_stmt this instead*/ SELECT * FROM sys.fn_stmt_sql_handle_from_sql_stmt ('SELECT * FROM Part WHERE PartId = 5', NULL) /*Changed searched criteria*/ SELECT V.* FROM vw_QueryStoreCompileInfo V JOIN sys.fn_stmt_sql_handle_from_sql_stmt ('SELECT * FROM Part WHERE PartId = 5', NULL) F ON V.statement_sql_handle = F.statement_sql_handle /*Get runtime info for the queries*/ SELECT * FROM vw_QueryStoreRuntimeInfo WHERE query_sql_text = 'SELECT * FROM Part' ORDER BY start_time DESC SELECT * FROM vw_QueryStoreRuntimeInfo V JOIN sys.fn_stmt_sql_handle_from_sql_stmt ('SELECT * FROM Part WHERE PartId = 5', NULL) F ON V.statement_sql_handle = F.statement_sql_handle ORDER BY start_time DESC
<gh_stars>1000+ -- 2017-07-19T17:17:54.862 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Table SET EntityType='de.metas.handlingunits',Updated=TO_TIMESTAMP('2017-07-19 17:17:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=540831 ; -- 2017-07-19T17:18:12.053 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='de.metas.handlingunits',Updated=TO_TIMESTAMP('2017-07-19 17:18:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=556971 ; -- 2017-07-19T17:18:16.976 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='de.metas.handlingunits',Updated=TO_TIMESTAMP('2017-07-19 17:18:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=556972 ; -- 2017-07-19T17:18:20.335 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='de.metas.handlingunits',Updated=TO_TIMESTAMP('2017-07-19 17:18:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=557015 ; -- 2017-07-19T17:18:23.491 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='de.metas.handlingunits',Updated=TO_TIMESTAMP('2017-07-19 17:18:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=556973 ; -- 2017-07-19T17:18:27.942 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='de.metas.handlingunits',Updated=TO_TIMESTAMP('2017-07-19 17:18:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=556974 ; -- 2017-07-19T17:18:31.969 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='de.metas.handlingunits',Updated=TO_TIMESTAMP('2017-07-19 17:18:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=556975 ; -- 2017-07-19T17:18:34.858 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='de.metas.handlingunits',Updated=TO_TIMESTAMP('2017-07-19 17:18:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=556981 ; -- 2017-07-19T17:18:37.449 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='de.metas.handlingunits', IsUpdateable='N',Updated=TO_TIMESTAMP('2017-07-19 17:18:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=556978 ; -- 2017-07-19T17:18:40.009 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='de.metas.handlingunits',Updated=TO_TIMESTAMP('2017-07-19 17:18:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=556980 ; -- 2017-07-19T17:18:42.443 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='de.metas.handlingunits', IsUpdateable='N',Updated=TO_TIMESTAMP('2017-07-19 17:18:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=556979 ; -- 2017-07-19T17:18:45.173 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='de.metas.handlingunits',Updated=TO_TIMESTAMP('2017-07-19 17:18:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=557013 ; -- 2017-07-19T17:18:47.536 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='de.metas.handlingunits',Updated=TO_TIMESTAMP('2017-07-19 17:18:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=557014 ; -- 2017-07-19T17:18:49.827 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='de.metas.handlingunits',Updated=TO_TIMESTAMP('2017-07-19 17:18:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=556976 ; -- 2017-07-19T17:19:06.141 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='de.metas.handlingunits',Updated=TO_TIMESTAMP('2017-07-19 17:19:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=556977 ;
/* Navicat MySQL Data Transfer Source Server : 本地 Source Server Version : 50716 Source Host : 127.0.0.1:3306 Source Database : qzxyback Target Server Type : MYSQL Target Server Version : 50716 File Encoding : 65001 Date: 2019-01-16 21:46:16 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for qzlit_application -- ---------------------------- DROP TABLE IF EXISTS `qzlit_application`; CREATE TABLE `qzlit_application` ( `apid` int(11) NOT NULL, `appname` varchar(255) DEFAULT NULL, `appurl` varchar(255) DEFAULT NULL, `appdescrip` varchar(255) DEFAULT NULL, PRIMARY KEY (`apid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of qzlit_application -- ---------------------------- -- ---------------------------- -- Table structure for qzlit_chunk -- ---------------------------- DROP TABLE IF EXISTS `qzlit_chunk`; CREATE TABLE `qzlit_chunk` ( `id` int(11) NOT NULL AUTO_INCREMENT, `type` varchar(5) NOT NULL DEFAULT '0', `chunk_name` varchar(255) DEFAULT NULL COMMENT '幻灯片', `chunk_lv` int(8) DEFAULT NULL, `chunk_below` varchar(255) DEFAULT NULL, `banner` varchar(512) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of qzlit_chunk -- ---------------------------- -- ---------------------------- -- Table structure for qzlit_comments -- ---------------------------- DROP TABLE IF EXISTS `qzlit_comments`; CREATE TABLE `qzlit_comments` ( `rid` int(32) NOT NULL AUTO_INCREMENT, `uid` int(11) DEFAULT NULL, `ip` varchar(64) DEFAULT NULL, `time` int(12) DEFAULT NULL, `rptid` int(16) DEFAULT NULL, `rprid` int(32) DEFAULT NULL, `rpuid` int(11) DEFAULT NULL, `message` longtext, `assistids` longtext, `treadsids` longtext, `likedids` longtext, PRIMARY KEY (`rid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of qzlit_comments -- ---------------------------- -- ---------------------------- -- Table structure for qzlit_config -- ---------------------------- DROP TABLE IF EXISTS `qzlit_config`; CREATE TABLE `qzlit_config` ( `type` varchar(255) DEFAULT NULL, `name` varchar(255) DEFAULT NULL, `order` int(11) NOT NULL DEFAULT '0', `data` varchar(4096) DEFAULT NULL, `df` varchar(4096) DEFAULT NULL, `descrip` varchar(255) DEFAULT NULL, `updatetime` int(12) DEFAULT NULL, `issolid` int(1) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of qzlit_config -- ---------------------------- INSERT INTO `qzlit_config` VALUES ('Info', 'webkey', '0', '<KEY>', null, '接口密匙,外部程序访问本机接口时的对接口令。', null, '1'); INSERT INTO `qzlit_config` VALUES ('Info', 'open', '1', 'on', 'on', '设置为 off 时,只有管理员可以访问网站', null, null); INSERT INTO `qzlit_config` VALUES ('info', 'getAddr', '2', 'on', 'on', '通过系统来获取用户IP地理信息(可以提高准确性,但会影响网站性能.需要网站能够请求淘宝接口)', null, null); INSERT INTO `qzlit_config` VALUES ('Info', 'campus', '4', '{&quot;1&quot;:&quot;明向&quot;,&quot;2&quot;:&quot;迎西&quot;,&quot;3&quot;:&quot;虎峪&quot;}', '{&quot;1&quot;:&quot;明向校区&quot;,&quot;2&quot;:&quot;迎西校区&quot;,&quot;3&quot;:&quot;虎峪校区&quot;}', '校区', null, null); INSERT INTO `qzlit_config` VALUES ('Info', 'party', '5', '{&quot;1&quot;:&quot;运营部(办公室)&quot;,&quot;2&quot;:&quot;卡乐坊&quot;,&quot;3&quot;:&quot;新闻中心&quot;,&quot;4&quot;:&quot;清泽微视&quot;,&quot;5&quot;:&quot;综合媒体&quot;,&quot;6&quot;:&quot;公关策划部&quot;,&quot;7&quot;:&quot;UED[体验设计]&quot;,&quot;8&quot;:&quot;蓝之青[网络安全]&quot;}', '{&quot;1&quot;:&quot;运营部&quot;,&quot;2&quot;:&quot;卡乐坊&quot;,&quot;3&quot;:&quot;新闻中心&quot;,&quot;4&quot;:&quot;清泽微视&quot;,&quot;5&quot;:&quot;综合媒体&quot;,&quot;6&quot;:&quot;公关策划部&quot;,&quot;7&quot;:&quot;UED[体验设计]&quot;,&quot;8&quot;:&quot;蓝之青[网络安全]&quot;}', '部门类型', null, null); INSERT INTO `qzlit_config` VALUES ('SmsService', 'ServiceStat', '5', 'off', 'off', '是否开启短信接口', null, null); INSERT INTO `qzlit_config` VALUES ('SmsService', 'AccessKeyId', '6', '', null, '阿里云账户AK', null, null); INSERT INTO `qzlit_config` VALUES ('SmsService', 'AccessKeySecret', '7', '', null, '阿里云账户AKS', null, null); INSERT INTO `qzlit_config` VALUES ('SmsService', 'AccessSignName', '8', '', null, '阿里云短信签名名称', null, null); INSERT INTO `qzlit_config` VALUES ('SmsService', 'SmsTemplateCode', '9', '', 'SMS_139239203', '阿里云短信模板编号', null, null); INSERT INTO `qzlit_config` VALUES ('SmsService', 'SmsDomain', '10', 'dysmsapi.aliyuncs.com', 'dysmsapi.aliyuncs.com', '短信服务域名(默认:dysmsapi.aliyuncs.com)', null, null); INSERT INTO `qzlit_config` VALUES ('SmsService', 'SmsProduct', '12', 'Dysmsapi', 'Dysmsapi', '短信服务产品名称(默认:Dysmsapi)', null, null); INSERT INTO `qzlit_config` VALUES ('SmsService', 'SmsRegion', '13', 'cn-hangzhou', 'cn-hangzhou', '短信服务区号(默认:cn-hangzhou)', null, null); INSERT INTO `qzlit_config` VALUES ('SmsService', 'SmsEndpoint1', '14', 'cn-hangzhou', 'cn-hangzhou', '短信服务节点1(默认:cn-hangzhou)', null, null); INSERT INTO `qzlit_config` VALUES ('SmsService', 'SmsEndpoint2', '15', 'cn-hangzhou', 'cn-hangzhou', '短信服务节点2(默认:cn-hangzhou)', null, null); INSERT INTO `qzlit_config` VALUES ('Pm', 'df_admin', '16', '{&quot;site_visite&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;site_visite&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;访问网站&quot;,&quot;sort&quot;:&quot;user&quot;,&quot;solid&quot;:true},&quot;thread_visite&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;thread_visite&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;查看文章&quot;,&quot;sort&quot;:&quot;user&quot;,&quot;solid&quot;:true},&quot;thread_subscrib&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;thread_subscrib&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;评论文章&quot;,&quot;sort&quot;:&quot;user&quot;,&quot;solid&quot;:true},&quot;user_subscrip&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;user_subscrip&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;评论用户评论&quot;,&quot;sort&quot;:&quot;user&quot;,&quot;solid&quot;:true},&quot;thread_mag&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;thread_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;增改文章&quot;,&quot;sort&quot;:&quot;admin&quot;,&quot;solid&quot;:true},&quot;user_mag&quot;:{&quot;value&quot;:&quot;1&quot;,&quot;token&quot;:&quot;user_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;管理用户&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;chunk_mag&quot;:{&quot;value&quot;:false,&quot;token&quot;:&quot;chunk_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;板块管理&quot;,&quot;sort&quot;:&quot;admin&quot;,&quot;solid&quot;:true},&quot;nav_mag&quot;:{&quot;value&quot;:false,&quot;token&quot;:&quot;nav_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;修改导航&quot;,&quot;sort&quot;:&quot;admin&quot;,&quot;solid&quot;:true},&quot;sms_use&quot;:{&quot;value&quot;:&quot;&quot;,&quot;token&quot;:&quot;sms_use&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;发送短信&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;enroll_use&quot;:{&quot;value&quot;:&quot;&quot;,&quot;token&quot;:&quot;enroll_use&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;使用报名系统&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;config_mag&quot;:{&quot;value&quot;:false,&quot;token&quot;:&quot;config_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;修改网站配置&quot;,&quot;sort&quot;:&quot;admin&quot;,&quot;solid&quot;:true},&quot;chunk_ct_mag&quot;:{&quot;value&quot;:&quot;&quot;,&quot;token&quot;:&quot;chunk_ct_mag&quot;,&quot;type&quot;:&quot;char&quot;,&quot;name&quot;:&quot;管理板块内容&quot;,&quot;sort&quot;:&quot;admin&quot;,&quot;solid&quot;:true}}', '{&quot;site_visite&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;site_visite&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;访问网站&quot;,&quot;sort&quot;:&quot;user&quot;,&quot;solid&quot;:true},&quot;thread_visite&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;thread_visite&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;查看文章&quot;,&quot;sort&quot;:&quot;user&quot;,&quot;solid&quot;:true},&quot;thread_subscrib&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;thread_subscrib&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;评论文章&quot;,&quot;sort&quot;:&quot;user&quot;,&quot;solid&quot;:true},&quot;user_subscrip&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;user_subscrip&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;评论用户评论&quot;,&quot;sort&quot;:&quot;user&quot;,&quot;solid&quot;:true},&quot;thread_mag&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;thread_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;增改文章&quot;,&quot;sort&quot;:&quot;admin&quot;,&quot;solid&quot;:true},&quot;user_mag&quot;:{&quot;value&quot;:&quot;1&quot;,&quot;token&quot;:&quot;user_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;管理用户&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;chunk_mag&quot;:{&quot;value&quot;:false,&quot;token&quot;:&quot;chunk_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;板块管理&quot;,&quot;sort&quot;:&quot;admin&quot;,&quot;solid&quot;:true},&quot;nav_mag&quot;:{&quot;value&quot;:false,&quot;token&quot;:&quot;nav_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;修改导航&quot;,&quot;sort&quot;:&quot;admin&quot;,&quot;solid&quot;:true},&quot;sms_use&quot;:{&quot;value&quot;:&quot;&quot;,&quot;token&quot;:&quot;sms_use&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;发送短信&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;enroll_use&quot;:{&quot;value&quot;:&quot;&quot;,&quot;token&quot;:&quot;enroll_use&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;使用报名系统&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;config_mag&quot;:{&quot;value&quot;:false,&quot;token&quot;:&quot;config_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;修改网站配置&quot;,&quot;sort&quot;:&quot;admin&quot;,&quot;solid&quot;:true},&quot;chunk_ct_mag&quot;:{&quot;value&quot;:&quot;&quot;,&quot;token&quot;:&quot;chunk_ct_mag&quot;,&quot;type&quot;:&quot;char&quot;,&quot;name&quot;:&quot;管理板块内容&quot;,&quot;sort&quot;:&quot;admin&quot;,&quot;solid&quot;:true}}', '默认管理员权限', null, '1'); INSERT INTO `qzlit_config` VALUES ('Pm', 'df_editor', '17', '{&quot;site_visite&quot;:{&quot;token&quot;:&quot;site_visite&quot;,&quot;name&quot;:&quot;访问网站&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;user&quot;},&quot;thread_visite&quot;:{&quot;token&quot;:&quot;thread_visite&quot;,&quot;name&quot;:&quot;查看文章&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;user&quot;},&quot;thread_subscrib&quot;:{&quot;token&quot;:&quot;thread_subscrib&quot;,&quot;name&quot;:&quot;评论文章&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;user&quot;},&quot;user_subscrip&quot;:{&quot;token&quot;:&quot;user_subscrip&quot;,&quot;name&quot;:&quot;评论用户评论&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;user&quot;},&quot;thread_mag&quot;:{&quot;token&quot;:&quot;thread_mag&quot;,&quot;name&quot;:&quot;增改文章&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;user_mag&quot;:{&quot;token&quot;:&quot;user_mag&quot;,&quot;name&quot;:&quot;管理用户&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;chunk_mag&quot;:{&quot;token&quot;:&quot;chunk_mag&quot;,&quot;name&quot;:&quot;板块管理&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;nav_mag&quot;:{&quot;token&quot;:&quot;nav_mag&quot;,&quot;name&quot;:&quot;修改导航&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;sms_use&quot;:{&quot;token&quot;:&quot;sms_use&quot;,&quot;name&quot;:&quot;发送短信&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;enroll_use&quot;:{&quot;token&quot;:&quot;enroll_use&quot;,&quot;name&quot;:&quot;使用报名系统&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;config_mag&quot;:{&quot;token&quot;:&quot;config_mag&quot;,&quot;name&quot;:&quot;修改网站配置&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;chunk_ct_mag&quot;:{&quot;token&quot;:&quot;chunk_ct_mag&quot;,&quot;name&quot;:&quot;管理板块内容&quot;,&quot;value&quot;:&quot;&quot;,&quot;type&quot;:&quot;char&quot;,&quot;sort&quot;:&quot;admin&quot;}}', '{&quot;site_visite&quot;:{&quot;token&quot;:&quot;site_visite&quot;,&quot;name&quot;:&quot;访问网站&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;user&quot;},&quot;thread_visite&quot;:{&quot;token&quot;:&quot;thread_visite&quot;,&quot;name&quot;:&quot;查看文章&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;user&quot;},&quot;thread_subscrib&quot;:{&quot;token&quot;:&quot;thread_subscrib&quot;,&quot;name&quot;:&quot;评论文章&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;user&quot;},&quot;user_subscrip&quot;:{&quot;token&quot;:&quot;user_subscrip&quot;,&quot;name&quot;:&quot;评论用户评论&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;user&quot;},&quot;thread_mag&quot;:{&quot;token&quot;:&quot;thread_mag&quot;,&quot;name&quot;:&quot;增改文章&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;user_mag&quot;:{&quot;token&quot;:&quot;user_mag&quot;,&quot;name&quot;:&quot;管理用户&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;chunk_mag&quot;:{&quot;token&quot;:&quot;chunk_mag&quot;,&quot;name&quot;:&quot;板块管理&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;nav_mag&quot;:{&quot;token&quot;:&quot;nav_mag&quot;,&quot;name&quot;:&quot;修改导航&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;sms_use&quot;:{&quot;token&quot;:&quot;sms_use&quot;,&quot;name&quot;:&quot;发送短信&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;enroll_use&quot;:{&quot;token&quot;:&quot;enroll_use&quot;,&quot;name&quot;:&quot;使用报名系统&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;config_mag&quot;:{&quot;token&quot;:&quot;config_mag&quot;,&quot;name&quot;:&quot;修改网站配置&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;chunk_ct_mag&quot;:{&quot;token&quot;:&quot;chunk_ct_mag&quot;,&quot;name&quot;:&quot;管理板块内容&quot;,&quot;value&quot;:&quot;&quot;,&quot;type&quot;:&quot;char&quot;,&quot;sort&quot;:&quot;admin&quot;}}', '默认编辑员权限', null, '1'); INSERT INTO `qzlit_config` VALUES ('Pm', 'df_all', '18', '{&quot;site_visite&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;site_visite&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;访问网站&quot;,&quot;sort&quot;:&quot;user&quot;,&quot;solid&quot;:true},&quot;thread_visite&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;thread_visite&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;查看文章&quot;,&quot;sort&quot;:&quot;user&quot;,&quot;solid&quot;:true},&quot;thread_subscrib&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;thread_subscrib&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;评论文章&quot;,&quot;sort&quot;:&quot;user&quot;,&quot;solid&quot;:true},&quot;user_subscrip&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;user_subscrip&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;评论用户评论&quot;,&quot;sort&quot;:&quot;user&quot;,&quot;solid&quot;:true},&quot;thread_mag&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;thread_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;增改文章&quot;,&quot;sort&quot;:&quot;admin&quot;,&quot;solid&quot;:true},&quot;user_mag&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;user_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;管理用户&quot;,&quot;sort&quot;:&quot;admin&quot;,&quot;solid&quot;:true},&quot;chunk_mag&quot;:{&quot;value&quot;:&quot;1&quot;,&quot;token&quot;:&quot;chunk_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;板块管理&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;nav_mag&quot;:{&quot;value&quot;:&quot;1&quot;,&quot;token&quot;:&quot;nav_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;修改导航&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;sms_use&quot;:{&quot;value&quot;:&quot;&quot;,&quot;token&quot;:&quot;sms_use&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;发送短信&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;enroll_use&quot;:{&quot;value&quot;:&quot;&quot;,&quot;token&quot;:&quot;enroll_use&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;使用报名系统&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;config_mag&quot;:{&quot;value&quot;:&quot;&quot;,&quot;token&quot;:&quot;config_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;修改网站配置&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;chunk_ct_mag&quot;:{&quot;value&quot;:&quot;&quot;,&quot;token&quot;:&quot;chunk_ct_mag&quot;,&quot;type&quot;:&quot;char&quot;,&quot;name&quot;:&quot;管理板块内容&quot;,&quot;sort&quot;:&quot;admin&quot;,&quot;solid&quot;:true}}', '{&quot;site_visite&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;site_visite&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;访问网站&quot;,&quot;sort&quot;:&quot;user&quot;,&quot;solid&quot;:true},&quot;thread_visite&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;thread_visite&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;查看文章&quot;,&quot;sort&quot;:&quot;user&quot;,&quot;solid&quot;:true},&quot;thread_subscrib&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;thread_subscrib&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;评论文章&quot;,&quot;sort&quot;:&quot;user&quot;,&quot;solid&quot;:true},&quot;user_subscrip&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;user_subscrip&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;评论用户评论&quot;,&quot;sort&quot;:&quot;user&quot;,&quot;solid&quot;:true},&quot;thread_mag&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;thread_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;增改文章&quot;,&quot;sort&quot;:&quot;admin&quot;,&quot;solid&quot;:true},&quot;user_mag&quot;:{&quot;value&quot;:true,&quot;token&quot;:&quot;user_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;管理用户&quot;,&quot;sort&quot;:&quot;admin&quot;,&quot;solid&quot;:true},&quot;chunk_mag&quot;:{&quot;value&quot;:&quot;1&quot;,&quot;token&quot;:&quot;chunk_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;板块管理&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;nav_mag&quot;:{&quot;value&quot;:&quot;1&quot;,&quot;token&quot;:&quot;nav_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;修改导航&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;sms_use&quot;:{&quot;value&quot;:&quot;&quot;,&quot;token&quot;:&quot;sms_use&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;发送短信&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;enroll_use&quot;:{&quot;value&quot;:&quot;&quot;,&quot;token&quot;:&quot;enroll_use&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;使用报名系统&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;config_mag&quot;:{&quot;value&quot;:&quot;&quot;,&quot;token&quot;:&quot;config_mag&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;name&quot;:&quot;修改网站配置&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;chunk_ct_mag&quot;:{&quot;value&quot;:&quot;&quot;,&quot;token&quot;:&quot;chunk_ct_mag&quot;,&quot;type&quot;:&quot;char&quot;,&quot;name&quot;:&quot;管理板块内容&quot;,&quot;sort&quot;:&quot;admin&quot;,&quot;solid&quot;:true}}', '默认站长权限', null, '1'); INSERT INTO `qzlit_config` VALUES ('Pm', 'df_user', '19', '{&quot;site_visite&quot;:{&quot;token&quot;:&quot;site_visite&quot;,&quot;name&quot;:&quot;访问网站&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;user&quot;},&quot;thread_visite&quot;:{&quot;token&quot;:&quot;thread_visite&quot;,&quot;name&quot;:&quot;查看文章&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;user&quot;},&quot;thread_subscrib&quot;:{&quot;token&quot;:&quot;thread_subscrib&quot;,&quot;name&quot;:&quot;评论文章&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;user&quot;},&quot;user_subscrip&quot;:{&quot;token&quot;:&quot;user_subscrip&quot;,&quot;name&quot;:&quot;评论用户评论&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;user&quot;},&quot;thread_mag&quot;:{&quot;token&quot;:&quot;thread_mag&quot;,&quot;name&quot;:&quot;增改文章&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;user_mag&quot;:{&quot;token&quot;:&quot;user_mag&quot;,&quot;name&quot;:&quot;管理用户&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;chunk_mag&quot;:{&quot;token&quot;:&quot;chunk_mag&quot;,&quot;name&quot;:&quot;板块管理&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;nav_mag&quot;:{&quot;token&quot;:&quot;nav_mag&quot;,&quot;name&quot;:&quot;修改导航&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;sms_use&quot;:{&quot;token&quot;:&quot;sms_use&quot;,&quot;name&quot;:&quot;发送短信&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;enroll_use&quot;:{&quot;token&quot;:&quot;enroll_use&quot;,&quot;name&quot;:&quot;使用报名系统&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;config_mag&quot;:{&quot;token&quot;:&quot;config_mag&quot;,&quot;name&quot;:&quot;修改网站配置&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;chunk_ct_mag&quot;:{&quot;token&quot;:&quot;chunk_ct_mag&quot;,&quot;name&quot;:&quot;管理板块内容&quot;,&quot;value&quot;:&quot;&quot;,&quot;type&quot;:&quot;char&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;}}', '{&quot;site_visite&quot;:{&quot;token&quot;:&quot;site_visite&quot;,&quot;name&quot;:&quot;访问网站&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;user&quot;},&quot;thread_visite&quot;:{&quot;token&quot;:&quot;thread_visite&quot;,&quot;name&quot;:&quot;查看文章&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;user&quot;},&quot;thread_subscrib&quot;:{&quot;token&quot;:&quot;thread_subscrib&quot;,&quot;name&quot;:&quot;评论文章&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;user&quot;},&quot;user_subscrip&quot;:{&quot;token&quot;:&quot;user_subscrip&quot;,&quot;name&quot;:&quot;评论用户评论&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;user&quot;},&quot;thread_mag&quot;:{&quot;token&quot;:&quot;thread_mag&quot;,&quot;name&quot;:&quot;增改文章&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;user_mag&quot;:{&quot;token&quot;:&quot;user_mag&quot;,&quot;name&quot;:&quot;管理用户&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;chunk_mag&quot;:{&quot;token&quot;:&quot;chunk_mag&quot;,&quot;name&quot;:&quot;板块管理&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;nav_mag&quot;:{&quot;token&quot;:&quot;nav_mag&quot;,&quot;name&quot;:&quot;修改导航&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;sms_use&quot;:{&quot;token&quot;:&quot;sms_use&quot;,&quot;name&quot;:&quot;发送短信&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;enroll_use&quot;:{&quot;token&quot;:&quot;enroll_use&quot;,&quot;name&quot;:&quot;使用报名系统&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;config_mag&quot;:{&quot;token&quot;:&quot;config_mag&quot;,&quot;name&quot;:&quot;修改网站配置&quot;,&quot;value&quot;:false,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;chunk_ct_mag&quot;:{&quot;token&quot;:&quot;chunk_ct_mag&quot;,&quot;name&quot;:&quot;管理板块内容&quot;,&quot;value&quot;:&quot;&quot;,&quot;type&quot;:&quot;char&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;}}', '默认普通用户权限', null, '1'); INSERT INTO `qzlit_config` VALUES ('Enroll', 'startdate', '20', '19000101', '19000101', '面试开始时间 / 2016年2月13日 写作 20160213 ', null, null); INSERT INTO `qzlit_config` VALUES ('Enroll', 'enddate', '21', '19000101', '19000101', '面试结束时间 / 2016年2月13日 写作 20160213 ', null, null); INSERT INTO `qzlit_config` VALUES ('info', 'autologin', '3', 'off', 'off', '开启/关闭网站的自动登陆功能', null, null); INSERT INTO `qzlit_config` VALUES ('info', 'mobiletpl', '1', 'on', 'off', '开启移动端模板的使用', null, null); INSERT INTO `qzlit_config` VALUES ('info', 'visitlimit', '0', '2', '2', '访问频率限制,设置为零则不限制。(设置为3,表示允许普通用户最短三秒打开一次访问网页)', null, null); INSERT INTO `qzlit_config` VALUES ('info', 'mainsearch', '0', 'on', 'off', '搜索功能开关', null, null); -- ---------------------------- -- Table structure for qzlit_group -- ---------------------------- DROP TABLE IF EXISTS `qzlit_group`; CREATE TABLE `qzlit_group` ( `uid` int(11) NOT NULL AUTO_INCREMENT, `unreg` int(1) DEFAULT NULL, `username` varchar(255) DEFAULT NULL, `party` int(1) DEFAULT NULL, `promise` int(1) DEFAULT NULL, `pml` varchar(4096) DEFAULT NULL, `salt` varchar(255) DEFAULT NULL, `key` varchar(255) DEFAULT NULL, `regtime` varchar(64) DEFAULT NULL, `lastlogin` varchar(64) DEFAULT NULL, `lastip` varchar(64) DEFAULT NULL, `phone` varchar(18) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `name` varchar(255) DEFAULT NULL, PRIMARY KEY (`uid`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of qzlit_group -- ---------------------------- INSERT INTO `qzlit_group` VALUES ('1', null, 'zhangyu', null, '999', '{&quot;site_visite&quot;:{&quot;token&quot;:&quot;site_visite&quot;,&quot;name&quot;:&quot;访问网站&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;user&quot;},&quot;thread_visite&quot;:{&quot;token&quot;:&quot;thread_visite&quot;,&quot;name&quot;:&quot;查看文章&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;user&quot;},&quot;thread_subscrib&quot;:{&quot;token&quot;:&quot;thread_subscrib&quot;,&quot;name&quot;:&quot;评论文章&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;user&quot;},&quot;user_subscrip&quot;:{&quot;token&quot;:&quot;user_subscrip&quot;,&quot;name&quot;:&quot;评论用户评论&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;user&quot;},&quot;thread_mag&quot;:{&quot;token&quot;:&quot;thread_mag&quot;,&quot;name&quot;:&quot;增改文章&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;user_mag&quot;:{&quot;token&quot;:&quot;user_mag&quot;,&quot;name&quot;:&quot;管理用户&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;chunk_mag&quot;:{&quot;token&quot;:&quot;chunk_mag&quot;,&quot;name&quot;:&quot;板块管理&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;nav_mag&quot;:{&quot;token&quot;:&quot;nav_mag&quot;,&quot;name&quot;:&quot;修改导航&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;sms_use&quot;:{&quot;token&quot;:&quot;sms_use&quot;,&quot;name&quot;:&quot;发送短信&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;enroll_use&quot;:{&quot;token&quot;:&quot;enroll_use&quot;,&quot;name&quot;:&quot;使用报名系统&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;config_mag&quot;:{&quot;token&quot;:&quot;config_mag&quot;,&quot;name&quot;:&quot;修改网站配置&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;chunk_ct_mag&quot;:{&quot;token&quot;:&quot;chunk_ct_mag&quot;,&quot;name&quot;:&quot;管理板块内容&quot;,&quot;value&quot;:&quot;&quot;,&quot;type&quot;:&quot;char&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;}}', 'L1l8HkydB1girGd', '8fb87e0c31f5c090b9b106e3a255e879', '201707141126', '201801271928', '127.0.0.1', '18534459162', '<EMAIL>', 'superadmin'); INSERT INTO `qzlit_group` VALUES ('2', null, 'admin', null, '999', '{&quot;site_visite&quot;:{&quot;token&quot;:&quot;site_visite&quot;,&quot;name&quot;:&quot;访问网站&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;user&quot;},&quot;thread_visite&quot;:{&quot;token&quot;:&quot;thread_visite&quot;,&quot;name&quot;:&quot;查看文章&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;user&quot;},&quot;thread_subscrib&quot;:{&quot;token&quot;:&quot;thread_subscrib&quot;,&quot;name&quot;:&quot;评论文章&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;user&quot;},&quot;user_subscrip&quot;:{&quot;token&quot;:&quot;user_subscrip&quot;,&quot;name&quot;:&quot;评论用户评论&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;user&quot;},&quot;thread_mag&quot;:{&quot;token&quot;:&quot;thread_mag&quot;,&quot;name&quot;:&quot;增改文章&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;user_mag&quot;:{&quot;token&quot;:&quot;user_mag&quot;,&quot;name&quot;:&quot;管理用户&quot;,&quot;value&quot;:true,&quot;type&quot;:&quot;boolean&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;},&quot;chunk_mag&quot;:{&quot;token&quot;:&quot;chunk_mag&quot;,&quot;name&quot;:&quot;板块管理&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;nav_mag&quot;:{&quot;token&quot;:&quot;nav_mag&quot;,&quot;name&quot;:&quot;修改导航&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;sms_use&quot;:{&quot;token&quot;:&quot;sms_use&quot;,&quot;name&quot;:&quot;发送短信&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;enroll_use&quot;:{&quot;token&quot;:&quot;enroll_use&quot;,&quot;name&quot;:&quot;使用报名系统&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;config_mag&quot;:{&quot;token&quot;:&quot;config_mag&quot;,&quot;name&quot;:&quot;修改网站配置&quot;,&quot;value&quot;:&quot;1&quot;,&quot;type&quot;:&quot;boolean&quot;,&quot;sort&quot;:&quot;admin&quot;},&quot;chunk_ct_mag&quot;:{&quot;token&quot;:&quot;chunk_ct_mag&quot;,&quot;name&quot;:&quot;管理板块内容&quot;,&quot;value&quot;:&quot;&quot;,&quot;type&quot;:&quot;char&quot;,&quot;solid&quot;:true,&quot;sort&quot;:&quot;admin&quot;}}', '', '', '200000000000', '', '127.0.0.1', '', '', ''); -- ---------------------------- -- Table structure for qzlit_log -- ---------------------------- DROP TABLE IF EXISTS `qzlit_log`; CREATE TABLE `qzlit_log` ( `vid` int(11) NOT NULL AUTO_INCREMENT, `time` int(14) DEFAULT NULL, `ip` text, `country` varchar(48) DEFAULT NULL, `area` varchar(48) DEFAULT NULL, `city` varchar(48) DEFAULT NULL, `region` varchar(48) DEFAULT NULL, `county` varchar(48) DEFAULT NULL, `isp` varchar(24) DEFAULT NULL, `target` text NOT NULL, `data` text NOT NULL, `func` varchar(255) DEFAULT NULL, `post` text NOT NULL, `get` text, PRIMARY KEY (`vid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of qzlit_log -- ---------------------------- -- ---------------------------- -- Table structure for qzlit_menu -- ---------------------------- DROP TABLE IF EXISTS `qzlit_menu`; CREATE TABLE `qzlit_menu` ( `label` varchar(255) DEFAULT NULL, `content` varchar(255) DEFAULT NULL, `lurl` varchar(255) DEFAULT NULL, `reorder` varchar(255) DEFAULT NULL, `level` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of qzlit_menu -- ---------------------------- -- ---------------------------- -- Table structure for qzlit_nav -- ---------------------------- DROP TABLE IF EXISTS `qzlit_nav`; CREATE TABLE `qzlit_nav` ( `id` int(11) NOT NULL AUTO_INCREMENT, `order` smallint(1) NOT NULL DEFAULT '0', `type` smallint(3) DEFAULT NULL, `bel` smallint(3) NOT NULL DEFAULT '0', `name` varchar(255) DEFAULT NULL, `key` varchar(255) DEFAULT NULL, `blank` smallint(1) NOT NULL DEFAULT '1', `url` varchar(255) DEFAULT NULL, `active` smallint(1) NOT NULL DEFAULT '1', `system` smallint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of qzlit_nav -- ---------------------------- -- ---------------------------- -- Table structure for qzlit_portal -- ---------------------------- DROP TABLE IF EXISTS `qzlit_portal`; CREATE TABLE `qzlit_portal` ( `show_id` int(11) DEFAULT NULL COMMENT '首页展示区域id', `chunk_id` int(11) DEFAULT NULL COMMENT '内容来源板块id' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of qzlit_portal -- ---------------------------- -- ---------------------------- -- Table structure for qzlit_site -- ---------------------------- DROP TABLE IF EXISTS `qzlit_site`; CREATE TABLE `qzlit_site` ( `id` int(2) NOT NULL, `title` varchar(255) DEFAULT NULL, `url` varchar(255) DEFAULT NULL, `keywords` text, `description` text, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of qzlit_site -- ---------------------------- -- ---------------------------- -- Table structure for qzlit_thread -- ---------------------------- DROP TABLE IF EXISTS `qzlit_thread`; CREATE TABLE `qzlit_thread` ( `cuid` int(11) NOT NULL AUTO_INCREMENT, `thread_title` varchar(255) DEFAULT NULL COMMENT '文章标题', `thread_coverimg` varchar(255) DEFAULT NULL, `thread_context` text, `thread_editor` varchar(255) NOT NULL, `thread_author` text, `thread_ctime` int(12) DEFAULT NULL COMMENT '修改时间', `thread_ptime` int(12) DEFAULT NULL COMMENT '创建时间', `thread_htime` text NOT NULL COMMENT '事件时间', `hk_keywords` text COMMENT '网页meta描述', `hk_descrip` text COMMENT '收录用的简介', `hk_url` varchar(255) DEFAULT NULL, `hk_mode` int(1) DEFAULT NULL COMMENT '1-编辑副本,2-发布,3-回收站', `hk_sort` int(1) DEFAULT NULL COMMENT '1-要闻,2-信息中心,3-热点,4-微视', `hk_sortclassify` varchar(64) DEFAULT NULL COMMENT '可自定义类型', `ore_hot` varchar(255) DEFAULT NULL COMMENT '热度', `ore_degree` varchar(255) DEFAULT NULL COMMENT '重要度', `ore_view` varchar(255) DEFAULT NULL COMMENT '浏览次数', PRIMARY KEY (`cuid`,`thread_editor`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of qzlit_thread -- ---------------------------- -- ---------------------------- -- Table structure for qzlit_usenroll -- ---------------------------- DROP TABLE IF EXISTS `qzlit_usenroll`; CREATE TABLE `qzlit_usenroll` ( `id` int(11) NOT NULL AUTO_INCREMENT, `sex` varchar(10) DEFAULT NULL, `name` varchar(255) DEFAULT NULL, `photo` varchar(128) DEFAULT NULL, `phone` varchar(18) DEFAULT NULL, `email` varchar(64) DEFAULT NULL, `aim` varchar(48) DEFAULT NULL, `aim2` varchar(255) DEFAULT NULL, `studentid` varchar(11) DEFAULT NULL, `campus` int(2) DEFAULT NULL, `college` varchar(32) DEFAULT NULL, `major` varchar(64) DEFAULT NULL, `class` varchar(128) DEFAULT NULL, `reasion` varchar(4096) DEFAULT NULL, `reasion2` varchar(4096) DEFAULT NULL, `ip` varchar(32) DEFAULT NULL, `time` int(16) DEFAULT NULL, `ftime` varchar(64) DEFAULT NULL, `hascalled` int(1) DEFAULT NULL, `score` int(5) DEFAULT NULL, `sug` varchar(255) DEFAULT NULL, `isfaced` varchar(10) DEFAULT NULL, `isenrolled` varchar(10) DEFAULT NULL, `f2f` varchar(30) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of qzlit_usenroll -- ---------------------------- -- ---------------------------- -- Table structure for qzlit_visiter -- ---------------------------- DROP TABLE IF EXISTS `qzlit_visiter`; CREATE TABLE `qzlit_visiter` ( `vid` int(8) NOT NULL AUTO_INCREMENT, `ip` text, `time` int(14) NOT NULL, `target` text NOT NULL, `date` text NOT NULL, `post` text, `get` text, PRIMARY KEY (`vid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of qzlit_visiter -- ---------------------------- -- ---------------------------- -- Table structure for sms_log -- ---------------------------- DROP TABLE IF EXISTS `sms_log`; CREATE TABLE `sms_log` ( `id` int(20) NOT NULL AUTO_INCREMENT, `time` varchar(18) DEFAULT NULL, `call` varchar(18) DEFAULT NULL, `msgtplcode` varchar(255) DEFAULT NULL, `stat` varchar(64) DEFAULT NULL, `BizId` varchar(64) DEFAULT NULL, `Code` varchar(64) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of sms_log -- ---------------------------- INSERT INTO `sms_log` VALUES ('1', '1531640174', '15536368637', 'SMS_139239203', 'OK', '759309831640173854^0', '45F5DB2A-3355-4CA9-B5CE-A4CA3EC1478E'); INSERT INTO `sms_log` VALUES ('2', '1531654837', '13233177025', 'SMS_139239203', 'OK', '614420031654836935^0', '416458FB-8F8F-4D39-AEA3-AAD558148F2E'); INSERT INTO `sms_log` VALUES ('3', '1531654859', '15536368637', 'SMS_139239203', 'OK', '996909431654859770^0', '46BDA6C4-DBE3-42CB-9943-DE7E73C14EE9'); -- ---------------------------- -- Table structure for tool_feedback -- ---------------------------- DROP TABLE IF EXISTS `tool_feedback`; CREATE TABLE `tool_feedback` ( `fid` int(20) NOT NULL AUTO_INCREMENT, `type` int(1) DEFAULT NULL, `aid` varchar(12) DEFAULT NULL, `name` varchar(255) DEFAULT NULL, `ip` varchar(64) DEFAULT NULL, `message` varchar(4096) DEFAULT NULL, `phone` varchar(18) DEFAULT NULL, `email` varchar(64) DEFAULT NULL, `time` int(12) DEFAULT NULL, PRIMARY KEY (`fid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of tool_feedback -- ---------------------------- -- ---------------------------- -- Table structure for tool_quesbank -- ---------------------------- DROP TABLE IF EXISTS `tool_quesbank`; CREATE TABLE `tool_quesbank` ( `year` text, `course` text, `chapter` text, `type` text, `ques` text, `ans` longtext, `note` text, `A` text, `B` text, `C` text, `D` text, `E` text, `F` text, `G` text, `H` text, `I` text, `J` text ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of tool_quesbank -- ----------------------------
<filename>src/test/resources/com/foundationdb/sql/parser/group-by-var-pop.sql SELECT var_pop(a), b GROUP BY b
create table contact ( id serial PRIMARY KEY , first_name varchar(60) not null , last_name varchar(60) not null , birth_date date , version int not null default 0 , unique (first_name, last_name) ); create table hobby ( hobby_id varchar(20) not null , primary key (hobby_id) ); create table contact_tel_detail ( id serial primary key , contact_id int not null , version int not null , tel_type varchar(20) not null , tel_number varchar(20) not null , unique (contact_id, tel_type) , constraint fk_contact_tel_detail_1 foreign key (contact_id) references contact(id) ); create table contact_hobby_detail ( contact_id int not null , hobby_id varchar(20) not null , primary key (contact_id, hobby_id) , constraint fk_contact_hobby_detail_1 foreign key(contact_id) references contact (id) on delete cascade , constraint fk_contact_hobby_detail_2 foreign key (hobby_id) references hobby(hobby_id) );
INSERT INTO borrow (inventory_nr, inventory_device_name, maintainer_shift_id, motivation, start_at, end_at) VALUES (1, 'guanti', 2, 'DPI minimale per classe di pericolo indicata PE00', '2018-08-19 16:25:00', '2018-08-19 18:38:00'); INSERT INTO borrow (inventory_nr, inventory_device_name, maintainer_shift_id, motivation, start_at, end_at) VALUES (1, 'indumenti a norma', 2, 'DPI minimale per classe di pericolo indicata PE00', '2018-08-19 16:25:00', '2018-08-19 18:38:00'); INSERT INTO borrow (inventory_nr, inventory_device_name, maintainer_shift_id, motivation, start_at, end_at) VALUES (1, 'guanti', 6, 'DPI minimale per classe di pericolo indicata PE01', '2018-08-21 12:50:00', '2018-08-21 13:30:00'); INSERT INTO borrow (inventory_nr, inventory_device_name, maintainer_shift_id, motivation, start_at, end_at) VALUES (1, 'indumenti a norma', 6, 'DPI minimale per classe di pericolo indicata PE01', '2018-08-21 12:50:00', '2018-08-21 13:30:00'); INSERT INTO borrow (inventory_nr, inventory_device_name, maintainer_shift_id, motivation, start_at, end_at) VALUES (1, 'guanti', 9, 'DPI minimale per classe di pericolo indicata PE02', '2018-08-22 10:15:00', '2018-08-22 11:28:00'); INSERT INTO borrow (inventory_nr, inventory_device_name, maintainer_shift_id, motivation, start_at, end_at) VALUES (1, 'indumenti a norma', 9, 'DPI minimale per classe di pericolo indicata PE02', '2018-08-22 10:15:00', '2018-08-22 11:28:00'); INSERT INTO borrow (inventory_nr, inventory_device_name, maintainer_shift_id, motivation, start_at, end_at) VALUES (1, 'puntali', 9, 'DPI minimale per classe di pericolo indicata PE02', '2018-08-22 10:15:00', '2018-08-22 11:28:00');
SELECT rg.id , rg.code , rg.name , COALESCE( ( SELECT COUNT( 1 ) FROM role r WHERE r.gid = rg.id ) ) roles_count , rg.description FROM role_group rg LEFT JOIN role_company rc ON rc.gid = rg.id LEFT JOIN company c ON rc.cid = c.id WHERE true /*%if conditions == null*/ AND false /*%end*/ /*%if conditions != null*/ -- if selected company (sys-admin or company of current logged-in user) AND ( fn_iv_is_system_admin( /* conditions.getUsername() */'abc' ) OR ( COALESCE( ( SELECT COUNT( 1 ) FROM "user" u1 WHERE u1.cid = c.id AND u1.enabled = true AND u1.user_name = /* conditions.getUsername() */'abc' AND ( u1.expired_at IS NULL OR DATE_TRUNC( 'second', u1.expired_at ) <= DATE_TRUNC( 'second', CURRENT_TIMESTAMP ) ) ), 0 ) > 0 ) ) /*%end*/ /*%if conditions != null && @isNotEmpty(conditions.keyword) && conditions.isPrefix()*/ AND ( LOWER(rg.code) LIKE LOWER(/* @prefix(conditions.keyword) */'abc') escape '$' OR LOWER(rg.name) LIKE LOWER(/* @prefix(conditions.keyword) */'abc') escape '$' ) /*%end*/ /*%if conditions != null && @isNotEmpty(conditions.keyword) && conditions.isSuffix()*/ AND ( LOWER(rg.code) LIKE LOWER(/* @suffix(conditions.keyword) */'abc') escape '$' OR LOWER(rg.name) LIKE LOWER(/* @suffix(conditions.keyword) */'abc') escape '$' ) /*%end*/ /*%if conditions != null && @isNotEmpty(conditions.keyword) && conditions.isContain()*/ AND ( LOWER(rg.code) LIKE LOWER(/* @contain(conditions.keyword) */'abc') escape '$' OR LOWER(rg.name) LIKE LOWER(/* @contain(conditions.keyword) */'abc') escape '$' ) /*%end*/ /*# orderBy */
<gh_stars>1-10 CREATE TABLE TABLE1 (ID VARCHAR(100) PRIMARY KEY); INSERT INTO TABLE1 VALUES ('http://other.example.com/1');
INSERT INTO PLM_VERSION(ID,NAME,STATUS,PRIORITY,PROJECT_ID) VALUES(11,'1.0.0','active',1,11);
ALTER TABLE `lh_chat` ADD `unanswered_chat` int(11) NOT NULL DEFAULT '0', COMMENT=''; ALTER TABLE `lh_chat` ADD INDEX `unanswered_chat` (`unanswered_chat`); ALTER TABLE `lh_users` ADD `attr_int_1` int(11) NOT NULL, COMMENT=''; ALTER TABLE `lh_users` ADD `attr_int_2` int(11) NOT NULL, COMMENT=''; ALTER TABLE `lh_users` ADD `attr_int_3` int(11) NOT NULL, COMMENT='';
<filename>sql/_12_mysql_compatibility/_09_table_related/cases/_Q3005_create_table_constraint_add.sql --+ holdcas on; set system parameters 'compat_mode=mysql'; create table t1 (a int); insert into t1 values (1),(2),(3); alter table t1 add column b int primary key; drop table t1; create table t1 (a int); insert into t1 values (1),(2); alter table t1 add column b int not null; select count(*) from t1 where b is null; drop table t1; create table t1 (a int); insert into t1 values (1),(2); alter table t1 add column b int unique key; select count(*) from t1 where b is null; drop table t1; create table t1 (a int); insert into t1 values (1),(2); alter table t1 add column b int unique; select count(*) from t1 where b is null; drop table t1; create table t1 (a int not null, b int); insert into t1(b) values (1); drop table t1; create table t1 (a int primary key); create table t2 (a int); insert into t2 values (1), (2), (3), (3); insert into t1 select * from t2; select count(*) from t1; drop table t1; drop table t2; --CUBRIDSUS-3083[Original] create table t1 (a int); insert into t1 values (1),(2); alter table t1 add column b int unique key; update t1 set b=1 where b is null; select count(*) from t1 where b is null; drop table t1; create table t1 (a int); insert into t1 values (1),(2) alter table t1 add column b int unique key; create table t2 (a int,b int); insert into t2(a,b) values (3,1), (4,1); insert into t1(a,b) select a,b from t2; drop table t1; drop table t2; --CUBRIDSUS-3083[QA Effort] create table foo (a int unique); insert into foo values (null); insert into foo values (null); update foo set a=3 where a is null; select * from foo; drop table foo; set system parameters 'compat_mode=cubrid';commit; --+ holdcas off;
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.4deb2 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jul 06, 2021 at 01:06 PM -- Server version: 10.3.29-MariaDB-0+deb10u1 -- PHP Version: 7.3.27-1~deb10u1 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: `pcd` -- -- -------------------------------------------------------- -- -- Table structure for table `cases` -- CREATE TABLE `cases` ( `caseId` int(11) NOT NULL, `caseNo` varchar(100) NOT NULL, `assignedTo` varchar(255) NOT NULL, `criminalName` varchar(255) NOT NULL, `charges` varchar(255) NOT NULL, `conviction` text DEFAULT NULL, `conDate` datetime NOT NULL DEFAULT current_timestamp(), `caseStatus` varchar(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `cases` -- INSERT INTO `cases` (`caseId`, `caseNo`, `assignedTo`, `criminalName`, `charges`, `conviction`, `conDate`, `caseStatus`) VALUES (8, 'urp/rb/3232/2021', '', '<NAME>', 'Dolorem ex libero ipsum aut mollit adipisicing non ullam saepe proident pariatur Est quasi eius ', NULL, '2021-07-06 13:36:22', 'NOT SOLVED'); -- -------------------------------------------------------- -- -- Table structure for table `complainers` -- CREATE TABLE `complainers` ( `complainerId` int(50) NOT NULL, `Fname` varchar(255) NOT NULL, `Lname` varchar(255) NOT NULL, `address` varchar(255) NOT NULL, `date` datetime NOT NULL DEFAULT current_timestamp(), `natureComplaints` varchar(255) NOT NULL, `phoneNum` varchar(50) NOT NULL, `th_name` varchar(30) NOT NULL, `accusation` varchar(255) NOT NULL, `def_info` varchar(255) NOT NULL, `other_info` varchar(255) NOT NULL, `type` varchar(50) NOT NULL, `p_number` int(15) NOT NULL, `color` varchar(20) NOT NULL, `w_statement` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `complainers` -- INSERT INTO `complainers` (`complainerId`, `Fname`, `Lname`, `address`, `date`, `natureComplaints`, `phoneNum`, `th_name`, `accusation`, `def_info`, `other_info`, `type`, `p_number`, `color`, `w_statement`) VALUES (28, '<NAME>', '<NAME>', 'Consequuntur ex quisquam voluptatem Ea fuga Voluptatem in ipsam sit mollit delectus', '1975-09-21 11:52:00', 'Delectus occaecat nihil aut id autem ut ex qui ut sit doloremque quos excepteur sunt architecto en', '+255449342767', '<NAME>', 'Doloribus et in sed blanditiis sed duis ducimus lorem obcaecati molestiae nemo nostrum', 'Adipisicing eum dolor optio corrupti et et aliquid', 'Sunt rerum sunt fuga Eveniet qui ea deleniti aut reprehenderit', '', 466, 'Qui aliqua Omnis con', 'assets/uploads/documents/59-594549_best-spacex.jpg'), (29, '<NAME>', '<NAME>', 'Minus quaerat illum facilis ad voluptatem', '2011-08-20 09:09:00', 'Suscipit dolore sint aperiam sed culpa do magni dolore', '+255605500883', '<NAME>', 'Et culpa laborum Tempora iusto nulla est recusandae Ex molestiae autem libero quo', 'Nisi excepturi omnis quasi quisquam adipisicing placeat irure similique repellendus Quisquam deser', 'Voluptas sint tempora veniam consequat Eius dolore soluta tempor sed voluptatem minima assumenda', '', 451, 'Ex eveniet deserunt ', 'assets/uploads/documents/320453.jpg'), (30, '<NAME>', '<NAME>', 'Impedit magna deserunt numquam voluptate numquam amet quis odio nihil nisi iusto aute veritatis se', '1988-09-15 23:57:00', 'Natus possimus ratione rerum dolor voluptas totam non ut et autem', '+255908293272', '<NAME>', 'Error et autem mollitia libero sequi ex minim sed', 'Dolorem laborum Consequuntur molestiae quae commodi ut alias nisi ea eiusmod nihil', 'Sint est voluptatum totam aut voluptates qui error nobis numquam eum mollit', '', 301, 'Dolore hic dolore mo', 'assets/uploads/documents/adrien-converse-FWhTeWRCeis-unsplash.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `criminals` -- CREATE TABLE `criminals` ( `fName` varchar(255) DEFAULT NULL, `accuserId` int(11) NOT NULL, `lName` varchar(255) NOT NULL, `age` int(11) NOT NULL, `locationArrested` varchar(255) NOT NULL, `guardianName` varchar(255) NOT NULL, `gRelation` varchar(255) NOT NULL, `circumstance` varchar(255) NOT NULL, `bailset` int(50) NOT NULL, `charges` varchar(255) NOT NULL, `resident` varchar(50) NOT NULL, `wstatus` varchar(50) NOT NULL, `dateArrested` datetime DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT; -- -- Dumping data for table `criminals` -- INSERT INTO `criminals` (`fName`, `accuserId`, `lName`, `age`, `locationArrested`, `guardianName`, `gRelation`, `circumstance`, `bailset`, `charges`, `resident`, `wstatus`, `dateArrested`) VALUES ('<NAME>', 48, '<NAME>', 8, 'Sit qui excepteur id et aut similique perferendis enim ea odit et voluptate quisquam', '<NAME>', '', 'Nobis labore duis et exercitationem saepe cillum in irure nulla aperiam exercitation ut voluptatem c', 96, 'Dolorem ex libero ipsum aut mollit adipisicing non ullam saepe proident pariatur Est quasi eius ', '', '', '1976-02-12 19:54:00'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `policeId` int(11) NOT NULL, `policeNo` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, `policepic` varchar(255) NOT NULL, `Fname` varchar(255) NOT NULL, `Lname` varchar(255) NOT NULL, `rank` varchar(255) NOT NULL, `age` int(11) NOT NULL, `tel_number` varchar(255) NOT NULL, `role` tinyint(11) NOT NULL, `description` varchar(255) NOT NULL, `updated_at` datetime NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `users` -- INSERT INTO `users` (`policeId`, `policeNo`, `password`, `policepic`, `Fname`, `Lname`, `rank`, `age`, `tel_number`, `role`, `description`, `updated_at`) VALUES (24, '00321', '$2y$10$V8z46EaE7nniKADaMxOQFeR/69bhz5NQ4jepc4VVPpy5bEZI3QGgy', '', 'Hashir', 'Saleh', 'Admin', 0, '+255754552233', 0, 'hashir saleh papa ', '2021-07-05 02:37:53'), (25, '00654', '$2y$10$cBYTy76GY7/sOMXvYfzbHOjddSLRFhAQ1bf7QD/jTY22yhG9OCmx2', '', 'mohammed', 'issa', 'Police officer', 0, '+255754558899', 0, 'mohammed issa hamad\n ', '2021-07-05 02:39:21'), (28, '00123', '$2y$10$g0YEy/9/IKROGQ4pBqMOgONF8TPxzd3UgagzVQUv.e2oKVv8WpgD2', '', 'Noulasco', 'Kapinga', 'Head Of Station', 0, '+255623589856', 0, 'The head of station', '2021-07-06 14:04:09'); -- -- Indexes for dumped tables -- -- -- Indexes for table `cases` -- ALTER TABLE `cases` ADD PRIMARY KEY (`caseId`); -- -- Indexes for table `complainers` -- ALTER TABLE `complainers` ADD PRIMARY KEY (`complainerId`); -- -- Indexes for table `criminals` -- ALTER TABLE `criminals` ADD PRIMARY KEY (`accuserId`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`policeId`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `cases` -- ALTER TABLE `cases` MODIFY `caseId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `complainers` -- ALTER TABLE `complainers` MODIFY `complainerId` int(50) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31; -- -- AUTO_INCREMENT for table `criminals` -- ALTER TABLE `criminals` MODIFY `accuserId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=49; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `policeId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29; 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 */;
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 24, 2019 at 05:01 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.1.27 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: `landlordtech2` -- -- -------------------------------------------------------- -- -- Table structure for table `activities` -- CREATE TABLE `activities` ( `id` int(10) UNSIGNED NOT NULL, `description` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `user_id` int(10) UNSIGNED NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `bank_details` -- CREATE TABLE `bank_details` ( `id` int(10) UNSIGNED NOT NULL, `accountName` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `accountNumber` bigint(20) NOT NULL, `bankName` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `accountType` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `user_id` int(10) UNSIGNED DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `cards` -- CREATE TABLE `cards` ( `id` int(10) UNSIGNED NOT NULL, `authCode` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `bin` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `cardBrand` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `expMonth` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `expYear` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `last4` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `isActive` tinyint(1) NOT NULL DEFAULT '1', `user_id` int(10) UNSIGNED NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `customer_transactions` -- CREATE TABLE `customer_transactions` ( `id` int(10) UNSIGNED NOT NULL, `user_id` int(10) UNSIGNED NOT NULL, `transactionFor` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `amount` bigint(20) NOT NULL, `property_id` int(10) UNSIGNED NOT NULL, `transactionType_id` int(10) UNSIGNED NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `document_uploads` -- CREATE TABLE `document_uploads` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `property_id` int(10) UNSIGNED NOT NULL, `votes` bigint(20) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `document_uploads` -- INSERT INTO `document_uploads` (`id`, `name`, `title`, `property_id`, `votes`, `created_at`, `updated_at`) VALUES (1, 'agreements/1CVIQmTf2zSy3WIfjbji4lPw2B4hOmT4itG7WJox.jpeg', NULL, 3, NULL, '2019-06-23 17:14:13', '2019-06-23 17:14:13'), (2, 'agreements/YOAycRkkPZcaL9VYRH59GyFRN4joCiLY0v7Bj319.jpeg', NULL, 3, NULL, '2019-06-23 17:14:13', '2019-06-23 17:14:13'), (3, 'agreements/x1KOUvayWJiCWKg6XjNKNf9W1CSfhhnxUGKbjm9c.jpeg', NULL, 3, NULL, '2019-06-23 17:15:29', '2019-06-23 17:15:29'), (4, 'agreements/hWAedb2iNGUZqTngXLKF2MJEPNjUVFBqF1yC0RBE.jpeg', NULL, 3, NULL, '2019-06-23 17:15:29', '2019-06-23 17:15:29'); -- -------------------------------------------------------- -- -- Table structure for table `featured_property` -- CREATE TABLE `featured_property` ( `id` int(10) UNSIGNED NOT NULL, `verifiedProperty_id` int(10) UNSIGNED DEFAULT NULL, `iActive` tinyint(1) NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `invoices` -- CREATE TABLE `invoices` ( `id` int(10) UNSIGNED NOT NULL, `status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `description` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `paymentFor` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `user_id` int(10) UNSIGNED NOT NULL, `verifiedProperty_id` int(10) UNSIGNED NOT NULL, `amount` bigint(20) NOT NULL, `refId` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `transactionType_id` int(10) UNSIGNED NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `invoices` -- INSERT INTO `invoices` (`id`, `status`, `description`, `paymentFor`, `user_id`, `verifiedProperty_id`, `amount`, `refId`, `transactionType_id`, `created_at`, `updated_at`) VALUES (73, 'success', 'Successful', 'INTEREST', 12, 1, 2000, 'LT-468308', 2, '2019-06-13 15:35:06', '2019-06-13 15:35:06'); -- -------------------------------------------------------- -- -- Table structure for table `landlord_admin_transactions` -- CREATE TABLE `landlord_admin_transactions` ( `id` int(10) UNSIGNED NOT NULL, `user_id` int(10) UNSIGNED NOT NULL, `transactionFor` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `amount` int(11) NOT NULL, `transactionType_id` int(10) UNSIGNED NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `migrations` -- CREATE TABLE `migrations` ( `id` int(10) UNSIGNED NOT NULL, `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `migrations` -- INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1, '2014_10_12_100000_create_password_resets_table', 1), (2, '2019_01_2_172425_create_transaction_response_table', 1), (3, '2019_01_2_173021_create_transaction_types_table', 1), (4, '2019_01_2_183819_create_roles_table', 1), (5, '2019_01_2_190244_create_property_categories_table', 1), (6, '2019_01_3_000000_create_users_table', 1), (7, '2019_04_22_183951_create_property_response_table', 1), (8, '2019_04_23_155626_create_properties_table', 1), (9, '2019_04_23_183854_create_verified_properties_table', 1), (10, '2019_04_23_185533_create_document_uploads_table', 1), (11, '2019_04_23_190005_create_property_images_table', 1), (12, '2019_04_23_190447_create_property_interests_table', 1), (13, '2019_04_23_191236_create_landlord_admin_transactions_table', 1), (14, '2019_04_23_192611_create_activities_table', 1), (15, '2019_04_23_192715_create_customer_transactions_table', 1), (16, '2019_04_24_172719_create_featured_property_table', 1), (17, '2019_04_24_173425_create_cards_table', 1), (18, '2019_04_24_173511_create_rentals_table', 1), (19, '2019_04_24_174848_create_bank_details_table', 1), (20, '2019_05_27_195508_create_notifications_table', 1), (21, '2020_05_26_182345_create_invoices_table', 1); -- -------------------------------------------------------- -- -- Table structure for table `notifications` -- CREATE TABLE `notifications` ( `id` int(10) UNSIGNED NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `sender_id` int(10) UNSIGNED NOT NULL, `message` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `receiver_id` int(10) UNSIGNED NOT NULL, `isRead` tinyint(1) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `password_resets` -- CREATE TABLE `password_resets` ( `email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `properties` -- CREATE TABLE `properties` ( `id` int(10) UNSIGNED NOT NULL, `area` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `description` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `mainImage` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `state` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `lga` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `address` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `documentsTitle` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `useOfProperty` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `bedrooms` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `bathrooms` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `toilets` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `price` bigint(20) NOT NULL, `additionalInfo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `currency` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `duration` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `startDate` datetime DEFAULT NULL, `endDate` datetime DEFAULT NULL, `isDocumentUploaded` tinyint(1) NOT NULL DEFAULT '0', `user_id` int(10) UNSIGNED NOT NULL, `showProperty` tinyint(1) NOT NULL DEFAULT '0', `LUIN` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `CUIN` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `isPropertyVerified` tinyint(1) NOT NULL DEFAULT '0', `propertyResponse_id` int(10) UNSIGNED NOT NULL, `propertyCategory_id` int(10) UNSIGNED NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `properties` -- INSERT INTO `properties` (`id`, `area`, `description`, `mainImage`, `state`, `lga`, `address`, `documentsTitle`, `useOfProperty`, `bedrooms`, `bathrooms`, `toilets`, `price`, `additionalInfo`, `currency`, `duration`, `startDate`, `endDate`, `isDocumentUploaded`, `user_id`, `showProperty`, `LUIN`, `CUIN`, `isPropertyVerified`, `propertyResponse_id`, `propertyCategory_id`, `created_at`, `updated_at`) VALUES (3, 'lagos', NULL, 'mainImages/Dqx8dFyEAbhhtamfkIo3go2mCyOya5WtWR3wpCL4.jpeg', 'Edo', 'Esan Central', '26 oremerin', '3', 'LEASE', '2', '2', '3', 1000000, '3 Bedroom duplex', '₦', '2 weeks before', '2019-05-22 00:00:00', '2019-05-08 00:00:00', 0, 1, 0, NULL, NULL, 0, 1, 3, '2019-05-29 09:27:51', '2019-05-29 09:27:51'); -- -------------------------------------------------------- -- -- Table structure for table `property_categories` -- CREATE TABLE `property_categories` ( `id` int(10) UNSIGNED NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `description` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `categoryImage` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `property_categories` -- INSERT INTO `property_categories` (`id`, `created_at`, `updated_at`, `name`, `description`, `categoryImage`) VALUES (1, '2019-05-09 19:45:46', '2019-05-09 19:45:46', 'Office Space', 'office space', ''), (2, '2019-05-09 19:45:46', '2019-05-09 19:45:46', 'land', 'land', ''), (3, '2019-05-09 19:49:27', '2019-05-09 19:49:27', 'house', 'house', ''), (4, '2019-05-09 19:49:27', '2019-05-09 19:49:27', 'land', 'land', ''); -- -------------------------------------------------------- -- -- Table structure for table `property_images` -- CREATE TABLE `property_images` ( `id` int(10) UNSIGNED NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `property_id` int(10) UNSIGNED NOT NULL, `propertyCategory_id` int(10) UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `property_images` -- INSERT INTO `property_images` (`id`, `created_at`, `updated_at`, `name`, `title`, `property_id`, `propertyCategory_id`) VALUES (2, '2019-05-29 09:27:51', '2019-05-29 09:27:51', 'propertyImages/kUGUGAlpfgAEKfmGPDXJ5bYtqBbc8LvivA7ofuJG.jpeg', NULL, 3, 3); -- -------------------------------------------------------- -- -- Table structure for table `property_interests` -- CREATE TABLE `property_interests` ( `id` int(10) UNSIGNED NOT NULL, `user_id` int(10) UNSIGNED NOT NULL, `isInterestValid` tinyint(1) NOT NULL DEFAULT '0', `verifiedProperty_id` int(10) UNSIGNED NOT NULL, `startDate` datetime NOT NULL, `endDate` datetime NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `property_interests` -- INSERT INTO `property_interests` (`id`, `user_id`, `isInterestValid`, `verifiedProperty_id`, `startDate`, `endDate`, `created_at`, `updated_at`) VALUES (2, 12, 1, 1, '2019-06-08 00:00:00', '2019-06-15 00:00:00', '2019-06-13 15:35:06', '2019-06-13 15:35:06'); -- -------------------------------------------------------- -- -- Table structure for table `property_responses` -- CREATE TABLE `property_responses` ( `id` int(10) UNSIGNED NOT NULL, `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `description` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `property_responses` -- INSERT INTO `property_responses` (`id`, `title`, `description`, `created_at`, `updated_at`) VALUES (1, 'pending', 'Awaiting Validation', NULL, NULL), (2, 'Verified', '', NULL, NULL), (3, 'rejected', 'Failed Vaildation', NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `rentals` -- CREATE TABLE `rentals` ( `id` int(10) UNSIGNED NOT NULL, `user_id` int(10) UNSIGNED NOT NULL, `propertyCategory_id` int(10) UNSIGNED NOT NULL, `verifiedProperty_id` int(10) UNSIGNED NOT NULL, `startDate` datetime NOT NULL, `endDate` datetime NOT NULL, `card_id` int(10) UNSIGNED NOT NULL, `paymentDueDate` datetime NOT NULL, `status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `duration` enum('DAILY','WEEKLY','MONTHLY','YEARLY') COLLATE utf8mb4_unicode_ci DEFAULT NULL, `rentalType` enum('RENT','LEASE','SALE') COLLATE utf8mb4_unicode_ci NOT NULL, `otherDuration` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `roles` -- CREATE TABLE `roles` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `alias` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `roles` -- INSERT INTO `roles` (`id`, `name`, `alias`, `created_at`, `updated_at`) VALUES (1, 'tenant', 'TEN', '2019-04-29 16:44:05', '2019-04-29 16:44:05'), (2, 'landlord', 'landlord', '2019-04-29 16:44:05', '2019-04-29 16:44:05'), (3, 'super-admin', 'super-admin', '2019-04-29 16:45:16', '2019-04-29 16:45:16'), (4, 'sub-admin', 'sub-admin', NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `transaction_response` -- CREATE TABLE `transaction_response` ( `id` int(10) UNSIGNED NOT NULL, `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `description` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `transaction_types` -- CREATE TABLE `transaction_types` ( `id` int(10) UNSIGNED NOT NULL, `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `description` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `transaction_types` -- INSERT INTO `transaction_types` (`id`, `type`, `description`, `created_at`, `updated_at`) VALUES (1, 'RENT', 'Payment for rent', '2019-05-26 14:36:52', '2019-05-26 14:36:52'), (2, 'INTEREST', 'Payment for shown ineterests', NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(10) UNSIGNED NOT NULL, `firstname` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `lastname` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `photo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `state_of_origin` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `isActive` tinyint(1) NOT NULL DEFAULT '0', `phoneNumber` bigint(20) NOT NULL, `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `role_id` int(10) UNSIGNED NOT NULL, `email_verified_at` timestamp NULL DEFAULT NULL, `password` varchar(191) 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 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `firstname`, `lastname`, `photo`, `address`, `state_of_origin`, `isActive`, `phoneNumber`, `email`, `role_id`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 'jude', '<PASSWORD>ha', NULL, '', NULL, 0, 8139590238, '<EMAIL>', 2, NULL, '$2y$10$6EBeCMeCCzeLtrDPBcRDX..j22qK6jNy.SXPy0/.NneaZyZbzTCsm', NULL, '2019-05-01 10:57:37', '2019-05-01 10:57:37'), (3, 'jude', 'iyoha', NULL, '', NULL, 0, 8139590238, '<EMAIL>', 2, NULL, '$2y$10$YlLNYOxhxr/5mTV08es/help0SNGOe8muWbccRuuRU6cmBkLOGNkK', NULL, '2019-05-01 11:01:44', '2019-05-01 11:01:44'), (4, 'jude', 'iyoha', NULL, '', NULL, 0, 8139590238, '<EMAIL>', 2, NULL, '$2y$10$ciesgeauikLU1GWCLya2Ve/WnNaixidnYEtDB0eAngpOcP7PfZiHa', NULL, '2019-05-01 11:03:57', '2019-05-01 11:03:57'), (5, 'jude', 'iyoha', NULL, '', NULL, 0, 8139590238, '<EMAIL>', 2, NULL, '$2y$10$KE2EgxlcJLm6G46fPoq40uabGM7DBo17khACV3yW2HoSubHhdyco2', NULL, '2019-05-01 11:06:53', '2019-05-01 11:06:53'), (6, 'jude', 'jude', NULL, '', NULL, 0, 8139590238, '<EMAIL>', 3, NULL, '$2y$10$ZJlXUDeNfQKe2VOonUdFMedrkrb5Ul3V0rtGoDWwciSiRVA0emZvm', NULL, '2019-05-01 11:10:06', '2019-05-01 11:10:06'), (7, 'jude', 'iyoha', NULL, '', NULL, 0, 8139590238, '<EMAIL>', 2, NULL, '$2y$10$JtTuh5MAyR16IZvfcdzjmOwax0oUMSUNk42qmLW5LBEHcj2uGyI5e', NULL, '2019-05-01 11:22:44', '2019-05-01 11:22:44'), (9, 'jude', 'iyoha', NULL, '', NULL, 0, 8139590238, '<EMAIL>', 2, NULL, '$2y$10$.WcUls/EN7saE.VczmA6dOUl03DoyQ2TiPKhmKxogWhE2s/W9FG9W', NULL, '2019-05-01 11:25:20', '2019-05-01 11:25:20'), (10, 'jude', 'Ajayis', 'users/Ly87A0d5CXixtJ9Tt20uLdHWFBUSiP0D8z1Xg3M6.jpeg', '26 Ayinde Akinmade', NULL, 0, 8139590238, '<EMAIL>', 2, NULL, '$2y$10$XNi.YQSXtbL5L3vlUxbA6uRGid5.jrGf2c1t6L3yHY6OjqToVIW8K', NULL, '2019-05-04 05:47:09', '2019-05-09 23:16:03'), (11, 'femi', 'iyoha', NULL, '', NULL, 0, 8139590238, '<EMAIL>', 2, NULL, '$2y$10$3KEpz9.3zQOW25ryPSwptuosyptYla1DgDrdAmtJdTgtjsYGMGBaC', NULL, '2019-05-09 15:23:44', '2019-05-09 15:23:44'), (12, 'Tokunbo', 'iyoha', NULL, '26 Ayinde Akinmades', NULL, 0, 8139590238, '<EMAIL>', 1, NULL, '$2y$10$Fz71SsVSRo256vq2rybTAuyjG/YIaaiiQpSxvIkkQruokzDpP6n7m', NULL, '2019-05-13 12:17:30', '2019-05-14 08:51:29'); -- -------------------------------------------------------- -- -- Table structure for table `verified_properties` -- CREATE TABLE `verified_properties` ( `id` int(10) UNSIGNED NOT NULL, `property_id` int(10) UNSIGNED NOT NULL, `isActive` tinyint(1) NOT NULL DEFAULT '0', `newPropertyPrice` bigint(20) DEFAULT NULL, `duration` enum('daily','weekly','monthly','yearly','others') COLLATE utf8mb4_unicode_ci DEFAULT NULL, `otherDuration` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `verified_by` int(10) UNSIGNED DEFAULT NULL, `rating` int(11) NOT NULL, `uniqueId` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `verified_properties` -- INSERT INTO `verified_properties` (`id`, `property_id`, `isActive`, `newPropertyPrice`, `duration`, `otherDuration`, `verified_by`, `rating`, `uniqueId`, `created_at`, `updated_at`) VALUES (1, 3, 1, NULL, NULL, NULL, 6, 1, 'LTUID-345634', '2019-05-29 09:31:21', '2019-06-13 15:35:06'); -- -- Indexes for dumped tables -- -- -- Indexes for table `activities` -- ALTER TABLE `activities` ADD PRIMARY KEY (`id`), ADD KEY `activities_user_id_foreign` (`user_id`); -- -- Indexes for table `bank_details` -- ALTER TABLE `bank_details` ADD PRIMARY KEY (`id`), ADD KEY `bank_details_user_id_foreign` (`user_id`); -- -- Indexes for table `cards` -- ALTER TABLE `cards` ADD PRIMARY KEY (`id`), ADD KEY `cards_user_id_foreign` (`user_id`); -- -- Indexes for table `customer_transactions` -- ALTER TABLE `customer_transactions` ADD PRIMARY KEY (`id`), ADD KEY `customer_transactions_user_id_foreign` (`user_id`), ADD KEY `customer_transactions_property_id_foreign` (`property_id`), ADD KEY `customer_transactions_transactiontype_id_foreign` (`transactionType_id`); -- -- Indexes for table `document_uploads` -- ALTER TABLE `document_uploads` ADD PRIMARY KEY (`id`), ADD KEY `document_uploads_property_id_foreign` (`property_id`); -- -- Indexes for table `featured_property` -- ALTER TABLE `featured_property` ADD PRIMARY KEY (`id`), ADD KEY `featured_property_verifiedproperty_id_foreign` (`verifiedProperty_id`); -- -- Indexes for table `invoices` -- ALTER TABLE `invoices` ADD PRIMARY KEY (`id`), ADD KEY `invoices_user_id_foreign` (`user_id`), ADD KEY `invoices_verifiedproperty_id_foreign` (`verifiedProperty_id`), ADD KEY `invoices_transactiontype_id_foreign` (`transactionType_id`); -- -- Indexes for table `landlord_admin_transactions` -- ALTER TABLE `landlord_admin_transactions` ADD PRIMARY KEY (`id`), ADD KEY `landlord_admin_transactions_user_id_foreign` (`user_id`), ADD KEY `landlord_admin_transactions_transactiontype_id_foreign` (`transactionType_id`); -- -- Indexes for table `migrations` -- ALTER TABLE `migrations` ADD PRIMARY KEY (`id`); -- -- Indexes for table `notifications` -- ALTER TABLE `notifications` ADD PRIMARY KEY (`id`), ADD KEY `notifications_sender_id_foreign` (`sender_id`), ADD KEY `notifications_receiver_id_foreign` (`receiver_id`); -- -- Indexes for table `password_resets` -- ALTER TABLE `password_resets` ADD KEY `password_resets_email_index` (`email`); -- -- Indexes for table `properties` -- ALTER TABLE `properties` ADD PRIMARY KEY (`id`), ADD KEY `properties_user_id_foreign` (`user_id`), ADD KEY `properties_propertyresponse_id_foreign` (`propertyResponse_id`), ADD KEY `properties_propertycategory_id_foreign` (`propertyCategory_id`); -- -- Indexes for table `property_categories` -- ALTER TABLE `property_categories` ADD PRIMARY KEY (`id`); -- -- Indexes for table `property_images` -- ALTER TABLE `property_images` ADD PRIMARY KEY (`id`), ADD KEY `property_images_property_id_foreign` (`property_id`), ADD KEY `property_images_propertycategory_id_foreign` (`propertyCategory_id`); -- -- Indexes for table `property_interests` -- ALTER TABLE `property_interests` ADD PRIMARY KEY (`id`), ADD KEY `property_interests_user_id_foreign` (`user_id`), ADD KEY `property_interests_verifiedproperty_id_foreign` (`verifiedProperty_id`); -- -- Indexes for table `property_responses` -- ALTER TABLE `property_responses` ADD PRIMARY KEY (`id`); -- -- Indexes for table `rentals` -- ALTER TABLE `rentals` ADD PRIMARY KEY (`id`), ADD KEY `rentals_user_id_foreign` (`user_id`), ADD KEY `rentals_propertycategory_id_foreign` (`propertyCategory_id`), ADD KEY `rentals_verifiedproperty_id_foreign` (`verifiedProperty_id`), ADD KEY `rentals_card_id_foreign` (`card_id`); -- -- Indexes for table `roles` -- ALTER TABLE `roles` ADD PRIMARY KEY (`id`); -- -- Indexes for table `transaction_response` -- ALTER TABLE `transaction_response` ADD PRIMARY KEY (`id`); -- -- Indexes for table `transaction_types` -- ALTER TABLE `transaction_types` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `users_email_unique` (`email`), ADD KEY `users_role_id_foreign` (`role_id`); -- -- Indexes for table `verified_properties` -- ALTER TABLE `verified_properties` ADD PRIMARY KEY (`id`), ADD KEY `verified_properties_property_id_foreign` (`property_id`), ADD KEY `verified_properties_verified_by_foreign` (`verified_by`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `activities` -- ALTER TABLE `activities` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `bank_details` -- ALTER TABLE `bank_details` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `cards` -- ALTER TABLE `cards` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `customer_transactions` -- ALTER TABLE `customer_transactions` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `document_uploads` -- ALTER TABLE `document_uploads` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `featured_property` -- ALTER TABLE `featured_property` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `invoices` -- ALTER TABLE `invoices` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=74; -- -- AUTO_INCREMENT for table `landlord_admin_transactions` -- ALTER TABLE `landlord_admin_transactions` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `migrations` -- ALTER TABLE `migrations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22; -- -- AUTO_INCREMENT for table `notifications` -- ALTER TABLE `notifications` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `properties` -- ALTER TABLE `properties` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `property_categories` -- ALTER TABLE `property_categories` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `property_images` -- ALTER TABLE `property_images` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `property_interests` -- ALTER TABLE `property_interests` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `property_responses` -- ALTER TABLE `property_responses` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `rentals` -- ALTER TABLE `rentals` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `roles` -- ALTER TABLE `roles` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `transaction_response` -- ALTER TABLE `transaction_response` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `transaction_types` -- ALTER TABLE `transaction_types` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; -- -- AUTO_INCREMENT for table `verified_properties` -- ALTER TABLE `verified_properties` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- Constraints for dumped tables -- -- -- Constraints for table `activities` -- ALTER TABLE `activities` ADD CONSTRAINT `activities_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`); -- -- Constraints for table `bank_details` -- ALTER TABLE `bank_details` ADD CONSTRAINT `bank_details_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`); -- -- Constraints for table `cards` -- ALTER TABLE `cards` ADD CONSTRAINT `cards_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`); -- -- Constraints for table `customer_transactions` -- ALTER TABLE `customer_transactions` ADD CONSTRAINT `customer_transactions_property_id_foreign` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`), ADD CONSTRAINT `customer_transactions_transactiontype_id_foreign` FOREIGN KEY (`transactionType_id`) REFERENCES `transaction_types` (`id`), ADD CONSTRAINT `customer_transactions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`); -- -- Constraints for table `document_uploads` -- ALTER TABLE `document_uploads` ADD CONSTRAINT `document_uploads_property_id_foreign` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`); -- -- Constraints for table `featured_property` -- ALTER TABLE `featured_property` ADD CONSTRAINT `featured_property_verifiedproperty_id_foreign` FOREIGN KEY (`verifiedProperty_id`) REFERENCES `verified_properties` (`id`); -- -- Constraints for table `invoices` -- ALTER TABLE `invoices` ADD CONSTRAINT `invoices_transactiontype_id_foreign` FOREIGN KEY (`transactionType_id`) REFERENCES `transaction_types` (`id`), ADD CONSTRAINT `invoices_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`), ADD CONSTRAINT `invoices_verifiedproperty_id_foreign` FOREIGN KEY (`verifiedProperty_id`) REFERENCES `verified_properties` (`id`); -- -- Constraints for table `landlord_admin_transactions` -- ALTER TABLE `landlord_admin_transactions` ADD CONSTRAINT `landlord_admin_transactions_transactiontype_id_foreign` FOREIGN KEY (`transactionType_id`) REFERENCES `transaction_types` (`id`), ADD CONSTRAINT `landlord_admin_transactions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`); -- -- Constraints for table `notifications` -- ALTER TABLE `notifications` ADD CONSTRAINT `notifications_receiver_id_foreign` FOREIGN KEY (`receiver_id`) REFERENCES `users` (`id`), ADD CONSTRAINT `notifications_sender_id_foreign` FOREIGN KEY (`sender_id`) REFERENCES `users` (`id`); -- -- Constraints for table `properties` -- ALTER TABLE `properties` ADD CONSTRAINT `properties_propertycategory_id_foreign` FOREIGN KEY (`propertyCategory_id`) REFERENCES `property_categories` (`id`), ADD CONSTRAINT `properties_propertyresponse_id_foreign` FOREIGN KEY (`propertyResponse_id`) REFERENCES `property_responses` (`id`), ADD CONSTRAINT `properties_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`); -- -- Constraints for table `property_images` -- ALTER TABLE `property_images` ADD CONSTRAINT `property_images_property_id_foreign` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`), ADD CONSTRAINT `property_images_propertycategory_id_foreign` FOREIGN KEY (`propertyCategory_id`) REFERENCES `property_categories` (`id`); -- -- Constraints for table `property_interests` -- ALTER TABLE `property_interests` ADD CONSTRAINT `property_interests_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`), ADD CONSTRAINT `property_interests_verifiedproperty_id_foreign` FOREIGN KEY (`verifiedProperty_id`) REFERENCES `verified_properties` (`id`); -- -- Constraints for table `rentals` -- ALTER TABLE `rentals` ADD CONSTRAINT `rentals_card_id_foreign` FOREIGN KEY (`card_id`) REFERENCES `cards` (`id`), ADD CONSTRAINT `rentals_propertycategory_id_foreign` FOREIGN KEY (`propertyCategory_id`) REFERENCES `property_categories` (`id`), ADD CONSTRAINT `rentals_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`), ADD CONSTRAINT `rentals_verifiedproperty_id_foreign` FOREIGN KEY (`verifiedProperty_id`) REFERENCES `verified_properties` (`id`); -- -- Constraints for table `users` -- ALTER TABLE `users` ADD CONSTRAINT `users_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`); -- -- Constraints for table `verified_properties` -- ALTER TABLE `verified_properties` ADD CONSTRAINT `verified_properties_property_id_foreign` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`), ADD CONSTRAINT `verified_properties_verified_by_foreign` FOREIGN KEY (`verified_by`) REFERENCES `users` (`id`); COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
<gh_stars>0 DROP TABLE IF EXISTS user; DROP TABLE IF EXISTS course; DROP TABLE IF EXISTS program; DROP TABLE IF EXISTS course_type; DROP TABLE IF EXISTS focus; DROP TABLE IF EXISTS traditional; DROP TABLE IF EXISTS equipment; DROP TABLE IF EXISTS experience; DROP TABLE IF EXISTS university; DROP TABLE IF EXISTS university_type; DROP TABLE IF EXISTS notes; PRAGMA encoding='UTF-8'; CREATE TABLE user ( id INTEGER PRIMARY KEY AUTOINCREMENT, email TEXT UNIQUE NOT NULL, password TEXT NOT NULL ); CREATE TABLE course ( id INTEGER PRIMARY KEY AUTOINCREMENT, identifier TEXT NOT NULL, user_id INTEGER NOT NULL, program_id INTEGER NOT NULL, course_type_id INTEGER NOT NULL, focus_id INTEGER NOT NULL, traditional_id INTEGER NOT NULL, equipment_id INTEGER NOT NULL, experience_id INTEGER NOT NULL, university_type_id INTEGER NOT NULL, university_id INTEGER NOT NULL, notes_id INTEGER, number_students INTEGER NOT NULL, students_per_instructor REAL NOT NULL, lab_per_lecture REAL NOT NULL, hours_per_lab REAL NOT NULL, number_labs INTEGER NOT NULL, number_experiments INTEGER, number_projects INTEGER, week_guided REAL, start_date_pre TEXT NOT NULL, start_date_post TEXT NOT NULL, name TEXT NOT NULL, frequency_phys_principle INTEGER NOT NULL, frequency_known_principle INTEGER NOT NULL, frequency_unknown_principle INTEGER NOT NULL, students_questions INTEGER NOT NULL, students_plan INTEGER NOT NULL, students_design INTEGER NOT NULL, students_apparatus INTEGER NOT NULL, students_analysis INTEGER NOT NULL, students_troubleshoot INTEGER NOT NULL, students_groups INTEGER NOT NULL, modeling_mathematics INTEGER NOT NULL, modeling_model INTEGER NOT NULL, modeling_tools INTEGER NOT NULL, modeling_measurement INTEGER NOT NULL, modeling_predictions INTEGER NOT NULL, modeling_uncertainty INTEGER NOT NULL, modeling_calibrate INTEGER NOT NULL, analysis_uncertainty INTEGER NOT NULL, analysis_calculate INTEGER NOT NULL, analysis_computer INTEGER NOT NULL, analysis_control INTEGER NOT NULL, communication_oral INTEGER NOT NULL, communication_written INTEGER NOT NULL, communication_lab INTEGER NOT NULL, communication_journal INTEGER NOT NULL, communication_test INTEGER NOT NULL, FOREIGN KEY (user_id) REFERENCES user (id), FOREIGN KEY (program_id) REFERENCES program (id), FOREIGN KEY (course_type_id) REFERENCES course_type (id), FOREIGN KEY (focus_id) REFERENCES focus (id), FOREIGN KEY (traditional_id) REFERENCES traditional (id), FOREIGN KEY (equipment_id) REFERENCES equipment (id), FOREIGN KEY (experience_id) REFERENCES experience (id), FOREIGN KEY (university_id) REFERENCES university (id), FOREIGN KEY (university_type_id) REFERENCES university_type (id), FOREIGN KEY (university_id) REFERENCES university (id), FOREIGN KEY (notes_id) REFERENCES notes (id) ); CREATE TABLE program ( id INTEGER PRIMARY KEY AUTOINCREMENT, program_name TEXT NOT NULL ); CREATE TABLE course_type ( id INTEGER PRIMARY KEY AUTOINCREMENT, course_type_name TEXT NOT NULL ); CREATE TABLE focus ( id INTEGER PRIMARY KEY AUTOINCREMENT, focus_name TEXT NOT NULL ); CREATE TABLE traditional ( id INTEGER PRIMARY KEY AUTOINCREMENT, traditional_name TEXT NOT NULL ); CREATE TABLE equipment ( id INTEGER PRIMARY KEY AUTOINCREMENT, equipment_type TEXT NOT NULL ); CREATE TABLE experience ( id INTEGER PRIMARY KEY AUTOINCREMENT, experience_level TEXT NOT NULL ); CREATE TABLE university ( id INTEGER PRIMARY KEY AUTOINCREMENT, university_name TEXT NOT NULL ); CREATE TABLE notes ( id INTEGER PRIMARY KEY AUTOINCREMENT, notes_text TEXT NOT NULL ); CREATE TABLE university_type ( id INTEGER PRIMARY KEY AUTOINCREMENT, university_type_name TEXT NOT NULL );
<filename>sql/recruitment.sql -- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 25, 2020 at 10:28 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.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: `recruitment` -- -- -------------------------------------------------------- -- -- Table structure for table `bahasa` -- CREATE TABLE `bahasa` ( `bahasa_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `nama` varchar(100) NOT NULL, `baca` varchar(10) NOT NULL, `tulis` varchar(10) NOT NULL, `dengar` varchar(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `biodata` -- CREATE TABLE `biodata` ( `biodata_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `nama` varchar(100) NOT NULL, `tempat_lahir` varchar(100) NOT NULL, `tanggal_lahir` date NOT NULL, `agama` varchar(10) NOT NULL, `jenis_kelamin` varchar(1) NOT NULL, `alamat` text NOT NULL, `no_hp` varchar(15) NOT NULL, `email` varchar(50) NOT NULL, `jabatan1` varchar(100) NOT NULL, `jabatan2` varchar(100) NOT NULL, `jabatan3` varchar(100) NOT NULL, `ekspetasi_gaji` varchar(20) NOT NULL, `foto` text NOT NULL, `cv` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `biodata` -- INSERT INTO `biodata` (`biodata_id`, `user_id`, `nama`, `tempat_lahir`, `tanggal_lahir`, `agama`, `jenis_kelamin`, `alamat`, `no_hp`, `email`, `jabatan1`, `jabatan2`, `jabatan3`, `ekspetasi_gaji`, `foto`, `cv`) VALUES (1, 7, '<NAME>', 'Jakarta', '1999-01-04', 'Islam', 'P', 'Jl Lontar VI no.46', '082123145680', '<EMAIL>', 'Junior Programmer', '', '', '4000000', 'd12cc4383b3712422de27dcf258ceb4b.jpg', '1bb22243a5120874c4bedb34ac41e22b.pdf'); -- -------------------------------------------------------- -- -- Table structure for table `fpk` -- CREATE TABLE `fpk` ( `fpk_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `nama_pemohon` varchar(100) NOT NULL, `jabatan_pemohon` varchar(50) NOT NULL, `lokasi` text NOT NULL, `jabatan` varchar(50) NOT NULL, `status` varchar(20) NOT NULL, `jumlah_kebutuhan` int(11) NOT NULL, `usia_min` int(11) NOT NULL, `usia_max` int(11) NOT NULL, `pendidikan_min` varchar(10) NOT NULL, `pengalaman_min` int(11) NOT NULL, `deskripsi_pekerjaan` varchar(1024) NOT NULL, `alasan` varchar(512) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fpk` -- INSERT INTO `fpk` (`fpk_id`, `user_id`, `nama_pemohon`, `jabatan_pemohon`, `lokasi`, `jabatan`, `status`, `jumlah_kebutuhan`, `usia_min`, `usia_max`, `pendidikan_min`, `pengalaman_min`, `deskripsi_pekerjaan`, `alasan`) VALUES (1, 6, '<NAME>', 'Program Analyst', 'Jakarta Utara', 'Junior Programmer', 'dirut_approve', 2, 20, 25, 'D3', 1, 'Membantu project dino retail', 'urgent'); -- -------------------------------------------------------- -- -- Table structure for table `keahlian` -- CREATE TABLE `keahlian` ( `keahlian_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `nama` varchar(100) NOT NULL, `deskripsi` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `pelatihan` -- CREATE TABLE `pelatihan` ( `pelatihan_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `nama` varchar(100) NOT NULL, `penyelenggara` varchar(50) NOT NULL, `lokasi` varchar(50) NOT NULL, `tanggal_mulai` date NOT NULL, `tanggal_selesai` date NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `pengalaman_kerja` -- CREATE TABLE `pengalaman_kerja` ( `pengalaman_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `nama_perusahaan` varchar(50) NOT NULL, `tanggal_masuk` date NOT NULL, `tanggal_keluar` date NOT NULL, `jabatan` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `riwayat_pendidikan` -- CREATE TABLE `riwayat_pendidikan` ( `riwayat_pendidikan_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `sekolah` varchar(100) NOT NULL, `kota` varchar(50) NOT NULL, `tingkat_pendidikan` varchar(10) NOT NULL, `program_studi` varchar(50) NOT NULL, `tahun_masuk` varchar(5) NOT NULL, `tahun_keluar` varchar(5) NOT NULL, `nilai` varchar(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `status_lamaran` -- CREATE TABLE `status_lamaran` ( `status_lamaran_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `fpk_id` int(11) NOT NULL, `status` varchar(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `status_lamaran` -- INSERT INTO `status_lamaran` (`status_lamaran_id`, `user_id`, `fpk_id`, `status`) VALUES (1, 7, 1, 'approved'); -- -------------------------------------------------------- -- -- Table structure for table `user` -- CREATE TABLE `user` ( `user_id` int(11) NOT NULL, `username` varchar(128) NOT NULL, `password` varchar(50) NOT NULL, `email` varchar(128) NOT NULL, `hak_akses` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user` -- INSERT INTO `user` (`user_id`, `username`, `password`, `email`, `hak_akses`) VALUES (1, 'admin', '<PASSWORD>', '<EMAIL>', 1), (4, 'dirut', '12345678', '<EMAIL>', 2), (5, 'hrd', '12345678', '<EMAIL>', 3), (6, 'divisi', '12345678', '<EMAIL>', 4), (7, '<EMAIL>', '12345678', '<EMAIL>', 5); -- -- Indexes for dumped tables -- -- -- Indexes for table `bahasa` -- ALTER TABLE `bahasa` ADD PRIMARY KEY (`bahasa_id`); -- -- Indexes for table `biodata` -- ALTER TABLE `biodata` ADD PRIMARY KEY (`biodata_id`); -- -- Indexes for table `fpk` -- ALTER TABLE `fpk` ADD PRIMARY KEY (`fpk_id`); -- -- Indexes for table `keahlian` -- ALTER TABLE `keahlian` ADD PRIMARY KEY (`keahlian_id`); -- -- Indexes for table `pelatihan` -- ALTER TABLE `pelatihan` ADD PRIMARY KEY (`pelatihan_id`); -- -- Indexes for table `pengalaman_kerja` -- ALTER TABLE `pengalaman_kerja` ADD PRIMARY KEY (`pengalaman_id`); -- -- Indexes for table `riwayat_pendidikan` -- ALTER TABLE `riwayat_pendidikan` ADD PRIMARY KEY (`riwayat_pendidikan_id`); -- -- Indexes for table `status_lamaran` -- ALTER TABLE `status_lamaran` ADD PRIMARY KEY (`status_lamaran_id`); -- -- Indexes for table `user` -- ALTER TABLE `user` ADD PRIMARY KEY (`user_id`), ADD UNIQUE KEY `email` (`email`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `bahasa` -- ALTER TABLE `bahasa` MODIFY `bahasa_id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `biodata` -- ALTER TABLE `biodata` MODIFY `biodata_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `fpk` -- ALTER TABLE `fpk` MODIFY `fpk_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `keahlian` -- ALTER TABLE `keahlian` MODIFY `keahlian_id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `pelatihan` -- ALTER TABLE `pelatihan` MODIFY `pelatihan_id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `pengalaman_kerja` -- ALTER TABLE `pengalaman_kerja` MODIFY `pengalaman_id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `riwayat_pendidikan` -- ALTER TABLE `riwayat_pendidikan` MODIFY `riwayat_pendidikan_id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `status_lamaran` -- ALTER TABLE `status_lamaran` MODIFY `status_lamaran_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `user` -- ALTER TABLE `user` MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; 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 */;
-- phpMyAdmin SQL Dump -- version 4.9.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Dec 16, 2020 at 05:30 PM -- Server version: 5.6.49-cll-lve -- PHP Version: 7.3.6 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: `shiny_wnm608` -- -- -------------------------------------------------------- -- -- Table structure for table `products` -- CREATE TABLE `products` ( `id` int(11) NOT NULL, `product_name` varchar(64) NOT NULL, `product_price` decimal(9,2) NOT NULL, `product_description` varchar(512) NOT NULL, `category` varchar(64) NOT NULL, `quantity` int(11) NOT NULL, `image_main` varchar(256) NOT NULL, `image_other` varchar(512) NOT NULL, `image_thumb` varchar(256) NOT NULL, `date_create` datetime NOT NULL, `date_modify` datetime NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `products` -- INSERT INTO `products` (`id`, `product_name`, `product_price`, `product_description`, `category`, `quantity`, `image_main`, `image_other`, `image_thumb`, `date_create`, `date_modify`) VALUES (16, 'Butterfly Windchime', 18.00, 'Butterfly shaped elements, Paper product, pink color, windchime\', \'home decor', 'home decor', 15, 'windchime.jpg', 'windchime.jpg,windchime_2.jpg,windchime_3.jpg', 'windchime.jpg', '2020-11-07 22:35:07', '2020-12-15 01:56:22'), (2, '25 anniversary theme Bottle Lamp ', 35.00, '25th Anniversary Themed bottle silver lamp with fairy lights and picture frames silver color', 'home decor', 1, 'bottlelamp.jpg', 'bottlelamp.jpg,bottlelamp_2.jpg', 'bottlelamp.jpg', '2020-11-07 22:35:42', '0000-00-00 00:00:00'), (3, 'family book ', 47.00, 'scrap book / family album , insert customized pictures and messages ', 'photo albums', 1, 'family_book.jpg', 'family_book.jpg,family_book_2.jpg', 'family_book.jpg', '2020-11-07 22:35:38', '0000-00-00 00:00:00'), (4, 'valentines day photo album', 45.00, 'valentines day theme photo album, insert your pictures and messages ', 'photo album', 1, 'doctortheme_book.jpg', 'doctortheme_book.jpg', 'doctortheme_book.jpg', '2020-11-07 22:35:32', '0000-00-00 00:00:00'), (5, 'Birthday Hamper - blue purple theme color', 60.00, 'purple blue Theme Birthday Basket Hamper with 12 products (handmade cards and accessories)', 'hampers', 1, 'hamper1.jpg', 'hamper1.jpg,hamper1_2.jpg', 'hamper1.jpg', '2020-11-07 22:35:07', '0000-00-00 00:00:00'), (6, 'Birthday Hamper - Red color theme', 60.00, 'Red Theme Birthday Basket Hamper with 12 products (handmade cards and accessories)', 'hampers', 1, 'hamper2.jpg', 'hamper2.jpg,hamper2_2.jpg', 'hamper2.jpg', '2020-11-07 22:35:07', '0000-00-00 00:00:00'), (7, 'frame - mothers day ', 25.00, 'mothers day wall frame with 11 pictures insertable, dimensions: 24inch*8inch', 'frames', 1, 'frame_mom_1.jpg', 'frame_mom_1.jpg', 'frame_mom_1.jpg', '2020-11-07 22:35:07', '0000-00-00 00:00:00'), (8, 'Frame - Motivational quote ', 25.00, 'Frames with motivational quotes, can add your own quote and message, Hardboard frame suitable for desk accessory, dimensions: 8inch*8inch', 'frames', 1, 'frame_1.jpg', 'frame_1.jpg,frame_1_2.jpg', 'frame_1.jpg', '2020-11-07 22:35:07', '0000-00-00 00:00:00'), (9, 'explosion box - rose, valentines day theme', 45.00, 'explosion box with customized pictures and messages, 3 layers', 'explosion box', 1, 'explosionbox_1.jpg', 'explosionbox_1.jpg', 'explosionbox_1.jpg', '2020-11-07 22:35:07', '0000-00-00 00:00:00'), (10, 'explosion box - red and black anniversary gift theme', 45.00, 'explosion box with customized pictures and messages, 3 layers', 'explosion box', 1, 'explosionbox_2.jpg', 'explosionbox_2.jpg', 'explosionbox_2.jpg', '2020-11-07 22:35:07', '0000-00-00 00:00:00'), (11, 'thank you card ', 8.00, 'Handmade Thank you Card', 'cards', 1, 'thankyou_card_1.jpg', 'thankyou_card_1.jpg,thankyou_card_2.jpg', 'thankyou_card_1.jpg', '2020-11-07 22:35:07', '0000-00-00 00:00:00'), (12, 'birthday card ', 8.00, 'Piano style - Handmade birthday Card ', 'cards', 1, 'pianocard_1.jpg', 'pianocard_1.jpg,pianocard_2.jpg,pianocard_3.jpg', 'pianocard_1.jpg', '2020-11-07 22:35:07', '0000-00-00 00:00:00'), (18, 'Gold Theme Explosion Box', 50.00, 'Gold Theme explosion box with 3 layers. Insert your own images and messages. The final box opens with gold coin chocolates', 'Explosion Box', 5, '', 'explosionbox_3_1.jpg,explosionbox_3_2.jpg', 'explosionbox_3_1.jpg', '2020-12-16 16:30:48', '2020-12-16 16:30:48'); -- -- Indexes for dumped tables -- -- -- Indexes for table `products` -- ALTER TABLE `products` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `products` -- ALTER TABLE `products` 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 */;
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 07, 2020 at 11:15 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.2.12 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: `appointo` -- -- -------------------------------------------------------- -- -- Table structure for table `bookings` -- CREATE TABLE `bookings` ( `id` int(10) UNSIGNED NOT NULL, `business_id` int(10) UNSIGNED DEFAULT NULL, `employee_id` int(11) DEFAULT NULL, `user_id` int(10) UNSIGNED DEFAULT NULL, `date_time` datetime NOT NULL, `status` enum('pending','in progress','completed','canceled') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'pending', `payment_gateway` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `original_amount` double(8,2) NOT NULL, `discount` double(8,2) NOT NULL, `discount_percent` double NOT NULL, `tax_name` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `tax_percent` double(8,2) DEFAULT NULL, `tax_amount` double(8,2) DEFAULT NULL, `amount_to_pay` double(8,2) NOT NULL, `payment_status` enum('pending','completed') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'pending', `source` varchar(191) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'pos', `additional_notes` text COLLATE utf8_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `bookings` -- INSERT INTO `bookings` (`id`, `business_id`, `employee_id`, `user_id`, `date_time`, `status`, `payment_gateway`, `original_amount`, `discount`, `discount_percent`, `tax_name`, `tax_percent`, `tax_amount`, `amount_to_pay`, `payment_status`, `source`, `additional_notes`, `created_at`, `updated_at`) VALUES (1, 1, 1, 1, '2019-11-15 11:09:33', 'pending', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (2, 2, 1, 2, '2019-11-15 11:09:33', 'in progress', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (3, 1, 2, 3, '2019-11-15 11:09:33', 'completed', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (4, 2, 2, 4, '2019-11-15 11:09:33', 'canceled', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (5, 3, 3, 5, '2019-11-15 11:09:33', 'completed', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (6, 4, 2, 6, '2019-11-15 11:09:33', 'canceled', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (7, 5, 3, 7, '2019-11-15 11:09:33', 'completed', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (8, 3, 3, 8, '2019-11-15 11:09:33', 'completed', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (9, 1, 1, 1, '2019-11-15 11:09:33', 'pending', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (10, 1, 1, 1, '2019-11-15 11:09:33', 'pending', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (11, 1, 1, 1, '2019-11-15 11:09:33', 'pending', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (12, 1, 1, 1, '2019-11-15 11:09:33', 'pending', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (13, 1, 1, 1, '2019-11-15 11:09:33', 'pending', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (14, 1, 1, 1, '2019-11-15 11:09:33', 'pending', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (15, 1, 1, 1, '2019-11-15 11:09:33', 'pending', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (16, 1, 1, 1, '2019-11-15 11:09:33', 'pending', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (17, 1, 1, 1, '2019-11-15 11:09:33', 'pending', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (18, 1, 1, 1, '2019-11-15 11:09:33', 'pending', '', 0.00, 0.00, 0, NULL, NULL, NULL, 0.00, '', '', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'); -- -------------------------------------------------------- -- -- Table structure for table `booking_items` -- CREATE TABLE `booking_items` ( `id` int(10) UNSIGNED NOT NULL, `booking_id` int(10) UNSIGNED NOT NULL, `business_service_id` int(10) UNSIGNED NOT NULL, `quantity` tinyint(4) NOT NULL, `unit_price` double NOT NULL, `amount` double NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `booking_items` -- INSERT INTO `booking_items` (`id`, `booking_id`, `business_service_id`, `quantity`, `unit_price`, `amount`, `created_at`, `updated_at`) VALUES (1, 1, 1, 25, 5, 25, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (2, 2, 2, 35, 5, 25, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (3, 3, 3, 25, 5, 25, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (4, 4, 4, 35, 5, 25, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (5, 5, 5, 45, 5, 25, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (6, 6, 6, 55, 5, 25, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (7, 7, 7, 65, 5, 25, '2019-11-14 03:09:33', '2019-11-14 03:09:33'); -- -------------------------------------------------------- -- -- Table structure for table `booking_times` -- CREATE TABLE `booking_times` ( `id` int(10) UNSIGNED NOT NULL, `business_id` int(10) UNSIGNED DEFAULT NULL, `booking_id` int(10) UNSIGNED DEFAULT NULL, `day` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `start_time` time NOT NULL, `end_time` time NOT NULL, `multiple_booking` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'yes', `status` enum('enabled','disabled') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'enabled', `slot_duration` int(11) NOT NULL DEFAULT '30', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `booking_times` -- INSERT INTO `booking_times` (`id`, `business_id`, `booking_id`, `day`, `start_time`, `end_time`, `multiple_booking`, `status`, `slot_duration`, `created_at`, `updated_at`) VALUES (1, NULL, NULL, 'monday', '04:30:00', '14:30:00', 'yes', 'enabled', 30, NULL, '2020-02-07 02:09:43'), (2, NULL, NULL, 'tuesday', '04:30:00', '14:30:00', 'yes', 'enabled', 30, NULL, '2020-02-07 02:09:43'), (3, NULL, NULL, 'wednesday', '04:30:00', '14:30:00', 'yes', 'enabled', 30, NULL, '2020-02-07 02:09:43'), (4, NULL, NULL, 'thursday', '04:30:00', '14:30:00', 'yes', 'enabled', 30, NULL, '2020-02-07 02:09:43'), (5, NULL, NULL, 'friday', '04:30:00', '14:30:00', 'yes', 'enabled', 30, NULL, '2020-02-07 02:09:43'), (6, NULL, NULL, 'saturday', '04:30:00', '14:30:00', 'yes', 'enabled', 30, NULL, '2020-02-07 02:09:43'), (7, NULL, NULL, 'sunday', '04:30:00', '14:30:00', 'yes', 'enabled', 30, NULL, '2020-02-07 02:09:43'), (8, 1, 1, 'monday', '04:30:00', '14:30:00', '', '', 0, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (9, 2, 2, 'tuesday', '04:30:00', '14:30:00', '', '', 0, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (10, 1, 3, 'wednesday', '04:30:00', '14:30:00', '', '', 0, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (11, 2, 4, 'thursday', '04:30:00', '14:30:00', '', '', 0, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (12, 3, 5, 'friday', '04:30:00', '14:30:00', '', '', 0, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (13, 4, 6, 'thursday', '04:30:00', '14:30:00', '', '', 0, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (14, 5, 7, 'friday', '04:30:00', '14:30:00', '', '', 0, '2019-11-14 03:09:33', '2019-11-14 03:09:33'); -- -------------------------------------------------------- -- -- Table structure for table `businesses` -- CREATE TABLE `businesses` ( `id` int(10) UNSIGNED NOT NULL, `title` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `slug` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `businesses` -- INSERT INTO `businesses` (`id`, `title`, `slug`, `created_at`, `updated_at`) VALUES (1, 'Food Business', 'food-business', '2019-11-14 03:09:33', '2019-11-14 03:09:34'), (2, 'Shirt Business', 'shirt-business', '2019-11-14 03:09:33', '2019-11-14 03:09:34'), (3, 'Technology Business', 'technology-business', '2019-11-14 03:09:33', '2019-11-14 03:09:34'), (4, 'House Business', 'house-business', '2019-11-14 03:09:33', '2019-11-14 03:09:34'), (5, 'Cars Business', 'cars-business', '2019-11-14 03:09:33', '2019-11-14 03:09:34'); -- -------------------------------------------------------- -- -- Table structure for table `business_services` -- CREATE TABLE `business_services` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `slug` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `description` text COLLATE utf8_unicode_ci NOT NULL, `price` double(8,2) NOT NULL, `time` double(8,2) NOT NULL, `time_type` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `discount` double(8,2) NOT NULL, `discount_type` enum('percent','fixed') COLLATE utf8_unicode_ci NOT NULL, `category_id` int(10) UNSIGNED DEFAULT NULL, `location_id` int(10) UNSIGNED NOT NULL DEFAULT '1', `business_id` int(10) UNSIGNED DEFAULT NULL, `booking_id` int(10) UNSIGNED DEFAULT NULL, `image` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `status` enum('active','deactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `business_services` -- INSERT INTO `business_services` (`id`, `name`, `slug`, `description`, `price`, `time`, `time_type`, `discount`, `discount_type`, `category_id`, `location_id`, `business_id`, `booking_id`, `image`, `status`, `created_at`, `updated_at`) VALUES (1, 'Burger King', 'burger-king', 'Fast Food Services', 25.00, 5.00, 'minutes', 5.00, 'percent', 1, 2, 1, 1, NULL, 'active', '2019-12-20 03:09:33', '2019-12-20 03:09:33'), (2, '<NAME>', 'louis-vuitton', 'Accessories Company Services', 25.00, 5.00, 'minutes', 5.00, 'percent', 2, 3, 2, 2, NULL, 'active', '2019-12-20 03:09:33', '2019-12-20 03:09:33'), (3, '<NAME>', 'mc-donald', 'Fast Food Services', 25.00, 5.00, 'minutes', 5.00, 'percent', 8, 4, 1, 1, NULL, 'active', '2019-12-20 03:09:33', '2019-12-20 03:09:33'), (4, 'D<NAME>', 'dunkin-donuts', 'Fast Food Services', 25.00, 5.00, 'minutes', 5.00, 'percent', 3, 2, 1, 3, NULL, 'active', '2019-12-20 03:09:33', '2019-12-20 03:09:33'), (5, 'Lacoste Shirt', 'lacoste-shirt', 'Clothing Company Services', 25.00, 5.00, 'minutes', 5.00, 'percent', 4, 5, 2, 4, NULL, 'active', '2019-12-20 03:09:33', '2019-12-20 03:09:33'), (6, 'Google Company', 'google-company', 'Tech-Company Service', 25.00, 5.00, 'minutes', 5.00, 'percent', 5, 6, 3, 5, NULL, 'active', '2019-12-20 03:09:33', '2019-12-20 03:09:33'), (7, 'Camella Homes', 'camella-homes', 'Real State Property', 25.00, 5.00, 'minutes', 5.00, 'percent', 6, 7, 4, 6, NULL, 'active', '2019-12-20 03:09:33', '2019-12-20 03:09:33'), (8, 'Honda Motorcycle', 'honda-motorcycle', 'Motorcycle Replacement Services', 25.00, 5.00, 'minutes', 5.00, 'percent', 7, 8, 5, 7, NULL, 'active', '2019-12-20 03:09:33', '2019-12-20 03:09:33'); -- -------------------------------------------------------- -- -- Table structure for table `business_user` -- CREATE TABLE `business_user` ( `id` int(10) UNSIGNED NOT NULL, `user_id` int(10) UNSIGNED DEFAULT NULL, `business_id` int(10) UNSIGNED DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `business_user` -- INSERT INTO `business_user` (`id`, `user_id`, `business_id`, `created_at`, `updated_at`) VALUES (1, 1, 1, '2019-11-14 03:09:33', '2019-11-14 03:09:34'), (2, 2, 2, '2019-11-14 03:09:33', '2019-11-14 03:09:34'), (3, 3, 1, '2019-11-14 03:09:33', '2019-11-14 03:09:34'), (4, 4, 2, '2019-11-14 03:09:33', '2019-11-14 03:09:34'), (5, 5, 3, '2019-11-14 03:09:33', '2019-11-14 03:09:34'), (6, 6, 4, '2019-11-14 03:09:33', '2019-11-14 03:09:34'), (7, 7, 5, '2019-11-14 03:09:33', '2019-11-14 03:09:34'), (8, 8, 3, '2019-11-14 03:09:33', '2019-11-14 03:09:34'); -- -------------------------------------------------------- -- -- Table structure for table `categories` -- CREATE TABLE `categories` ( `id` int(10) UNSIGNED NOT NULL, `business_id` int(10) UNSIGNED DEFAULT NULL, `booking_id` int(10) UNSIGNED DEFAULT NULL, `name` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `slug` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `image` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `status` enum('active','deactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `categories` -- INSERT INTO `categories` (`id`, `business_id`, `booking_id`, `name`, `slug`, `image`, `status`, `created_at`, `updated_at`) VALUES (1, 1, 1, 'Food', 'food', NULL, 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (2, 2, 2, 'Accessories', 'accessories', NULL, 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (3, 1, 3, 'Snack', 'snack', NULL, 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (4, 2, 4, 'Clothing', 'clothing', NULL, 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (5, 3, 5, 'Techonolgy', 'techonolgy', NULL, 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (6, 4, 6, 'Real State', 'real-state', NULL, 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (7, 5, 7, 'Cars', 'cars', NULL, 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (8, 1, 3, 'Beverage', 'beverage', NULL, 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'); -- -------------------------------------------------------- -- -- Table structure for table `company_settings` -- CREATE TABLE `company_settings` ( `id` int(10) UNSIGNED NOT NULL, `business_id` int(10) UNSIGNED DEFAULT NULL, `booking_id` int(10) UNSIGNED DEFAULT NULL, `company_name` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `company_email` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `company_phone` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `logo` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `address` text COLLATE utf8_unicode_ci NOT NULL, `website` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `timezone` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `locale` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `latitude` decimal(10,8) NOT NULL, `longitude` decimal(11,8) NOT NULL, `currency_id` int(10) UNSIGNED NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `purchase_code` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `supported_until` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `company_settings` -- INSERT INTO `company_settings` (`id`, `business_id`, `booking_id`, `company_name`, `company_email`, `company_phone`, `logo`, `address`, `website`, `timezone`, `locale`, `latitude`, `longitude`, `currency_id`, `created_at`, `updated_at`, `purchase_code`, `supported_until`) VALUES (1, NULL, NULL, 'Froiden Technologies Pvt Ltd', '<EMAIL>', '1234512345', NULL, 'Jaipur, India', 'http://www.xyz.com', 'Asia/Kolkata', 'en', '26.91243360', '75.78727090', 1, NULL, '2020-02-07 02:09:41', 'envato-dev', NULL), (2, 1, 1, 'Food Business', '<EMAIL>', '639088184445', NULL, 'Manila / Philippines', 'http://www.food_Business.com', 'Asia/Manila', 'en', '26.91243360', '75.78727090', 1, NULL, NULL, 'envato-dev', NULL), (3, 2, 1, 'Shirt Business', '<EMAIL>', '639088184446', NULL, 'Tokyo / Japan', 'http://www.shirt_Business.com', 'Asia/Tokyo', 'en', '26.91243360', '75.78727090', 1, NULL, NULL, 'envato-dev', NULL), (4, 3, 1, 'Technology Business', '<EMAIL>', '639088184447', NULL, 'Kuala Lumpur / Malaysia', 'http://www.street_Businesss.com', 'Asia/Kuala Lumpur', 'en', '26.91243360', '75.78727090', 1, NULL, NULL, 'envato-dev', NULL), (5, 4, 1, 'House Business', '<EMAIL>', '639088184448', NULL, 'Bangkok / Thailand', 'http://www.house_Business.com', 'Asia/Bangkok', 'en', '26.91243360', '75.78727090', 1, NULL, NULL, 'envato-dev', NULL), (6, 5, 1, 'Cars Business', '<EMAIL>', '639088184449', NULL, 'Seoul / South Korea', 'http://www.cars_Business.com', 'Asia/Seoul', 'en', '26.91243360', '75.78727090', 1, NULL, NULL, 'envato-dev', NULL); -- -------------------------------------------------------- -- -- Table structure for table `currencies` -- CREATE TABLE `currencies` ( `id` int(10) UNSIGNED NOT NULL, `currency_name` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `currency_symbol` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `currency_code` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `currencies` -- INSERT INTO `currencies` (`id`, `currency_name`, `currency_symbol`, `currency_code`, `created_at`, `updated_at`) VALUES (1, 'United Arab Emirates Dirham', 'AED', 'AED', '2020-02-07 02:09:13', '2020-02-07 02:09:13'); -- -------------------------------------------------------- -- -- Table structure for table `employee_groups` -- CREATE TABLE `employee_groups` ( `id` int(10) UNSIGNED NOT NULL, `business_id` int(10) UNSIGNED DEFAULT NULL, `booking_id` int(10) UNSIGNED DEFAULT NULL, `name` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `status` enum('active','deactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `employee_groups` -- INSERT INTO `employee_groups` (`id`, `business_id`, `booking_id`, `name`, `status`, `created_at`, `updated_at`) VALUES (1, 1, 1, 'Epic Games', 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (2, 2, 2, 'Origin Games', 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (3, 1, 3, 'Epic Games', 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (4, 2, 4, 'Origin Games', 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (5, 3, 5, 'Steam Games', 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (6, 4, 6, 'Blizzard Games', 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (7, 5, 7, 'Ubisoft Games', 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'); -- -------------------------------------------------------- -- -- Table structure for table `front_theme_settings` -- CREATE TABLE `front_theme_settings` ( `id` int(10) UNSIGNED NOT NULL, `business_id` int(10) UNSIGNED DEFAULT NULL, `booking_id` int(10) UNSIGNED DEFAULT NULL, `primary_color` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `secondary_color` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `logo` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `front_theme_settings` -- INSERT INTO `front_theme_settings` (`id`, `business_id`, `booking_id`, `primary_color`, `secondary_color`, `logo`, `created_at`, `updated_at`) VALUES (1, NULL, NULL, '#414552', '#788AE2', NULL, NULL, NULL), (2, 1, 1, '#414552', '#788AE2', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (3, 2, 2, '#414552', '#788AE2', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (4, 1, 3, '#414552', '#788AE2', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (5, 2, 4, '#414552', '#788AE2', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (6, 3, 5, '#414552', '#788AE2', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (7, 4, 6, '#414552', '#788AE2', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (8, 5, 7, '#414552', '#788AE2', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (9, 3, 8, '#414552', '#788AE2', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'); -- -------------------------------------------------------- -- -- Table structure for table `languages` -- CREATE TABLE `languages` ( `id` int(10) UNSIGNED NOT NULL, `language_code` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `language_name` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `status` enum('enabled','disabled') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'disabled', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `languages` -- INSERT INTO `languages` (`id`, `language_code`, `language_name`, `status`, `created_at`, `updated_at`) VALUES (1, 'es', 'Spanish', 'disabled', '2020-02-07 02:09:19', '2020-02-07 02:09:19'); -- -------------------------------------------------------- -- -- Table structure for table `locations` -- CREATE TABLE `locations` ( `id` int(10) UNSIGNED NOT NULL, `business_id` int(10) UNSIGNED DEFAULT NULL, `booking_id` int(10) UNSIGNED DEFAULT NULL, `name` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `locations` -- INSERT INTO `locations` (`id`, `business_id`, `booking_id`, `name`, `created_at`, `updated_at`) VALUES (1, NULL, NULL, 'Jaipur, India', '2020-02-07 02:09:49', '2020-02-07 02:09:49'), (2, 1, 1, 'Manila / Philippines', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (3, 2, 2, 'Tokyo / Japan', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (4, 1, 3, 'Beijing / China', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (5, 2, 4, 'Taipei / Taiwan', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (6, 3, 5, 'Kuala Lumpur / Malaysia', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (7, 4, 6, 'Bangkok / Thailand', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (8, 5, 7, 'Seoul / South Korea', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (9, 3, 8, 'Seoul / South Korea', '2019-11-14 03:09:33', '2019-11-14 03:09:33'); -- -------------------------------------------------------- -- -- Table structure for table `ltm_translations` -- CREATE TABLE `ltm_translations` ( `id` int(10) UNSIGNED NOT NULL, `status` int(11) NOT NULL DEFAULT '0', `locale` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `group` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `key` text COLLATE utf8_unicode_ci NOT NULL, `value` text COLLATE utf8_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `media` -- CREATE TABLE `media` ( `id` int(10) UNSIGNED NOT NULL, `business_id` int(10) UNSIGNED DEFAULT NULL, `booking_id` int(10) UNSIGNED DEFAULT NULL, `file_name` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `media` -- INSERT INTO `media` (`id`, `business_id`, `booking_id`, `file_name`, `created_at`, `updated_at`) VALUES (1, 1, 1, 'Epic Games', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (2, 2, 2, 'Origin Games', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (3, 1, 3, 'Epic Games', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (4, 2, 4, 'Origin Games', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (5, 3, 5, 'Steam Games', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (6, 4, 6, 'Blizzard Games', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (7, 5, 7, 'Ubisoft Games', '2019-11-14 03:09:33', '2019-11-14 03:09:33'); -- -------------------------------------------------------- -- -- Table structure for table `migrations` -- CREATE TABLE `migrations` ( `id` int(10) UNSIGNED NOT NULL, `migration` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `batch` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `migrations` -- INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1, '2014_04_02_193005_create_translations_table', 1), (2, '2014_10_12_000000_create_users_table', 1), (3, '2014_10_12_100000_create_password_resets_table', 1), (4, '2018_09_06_071923_create_categories_table', 1), (5, '2018_09_11_093015_create_business_services_table', 1), (6, '2018_09_11_173520_create_bookings_table', 1), (7, '2018_09_11_174709_add_discount_column_serices_table', 1), (8, '2018_09_11_184348_create_tax_settings_table', 1), (9, '2018_09_12_151158_create_booking_times_table', 1), (10, '2018_09_18_064516_add_mobile_column_users_table', 1), (11, '2018_09_19_095300_add_status_column_categories_table', 1), (12, '2018_09_19_095530_add_status_column_booking_services_table', 1), (13, '2018_09_20_130124_create_currencies_table', 1), (14, '2018_09_20_131417_create_company_settings_table', 1), (15, '2018_09_25_112040_create_booking_items_table', 1), (16, '2018_09_28_074544_add_columns_bookings_table', 1), (17, '2018_10_03_182207_create_languages_table', 1), (18, '2018_10_04_100225_add_spanish_language', 1), (19, '2018_10_04_112244_create_smtp_settings_table', 1), (20, '2018_10_08_122033_add_image_users_table', 1), (21, '2018_10_09_121006_create_theme_settings_table', 1), (22, '2018_10_15_123811_add_time_slot_duration_booing_times_table', 1), (23, '2018_11_01_091108_add_is_admin_column_users_table', 1), (24, '2018_11_02_052534_add_topbar_textcolor_column_theme_settings', 1), (25, '2018_12_03_104905_change_tax_column_nullable_bookings_table', 1), (26, '2018_12_19_192042_add_source_column_bookings_table', 1), (27, '2018_12_20_115707_allow_soft_delete_user', 1), (28, '2018_12_27_053940_create_payment_gateway_credential_table', 1), (29, '2018_12_27_064431_create_payments_table', 1), (30, '2019_01_03_192042_alter_credential_table', 1), (31, '2019_01_31_111812_add_multiple_booking_column_booking_times_table', 1), (32, '2019_02_10_075422_add_addition_notes_column_bookings_table', 1), (33, '2019_04_08_053940_create_employee_groups_table', 1), (34, '2019_04_08_075422_alter_user_employee_table', 1), (35, '2019_04_08_085422_alter_booking_group_table', 1), (36, '2019_08_06_104829_create_media_table', 1), (37, '2019_08_08_071516_create_locations_table', 1), (38, '2019_08_08_095010_add_location_id_column_in_business_services_table', 1), (39, '2019_08_13_073129_update_settings_add_envato_key', 1), (40, '2019_08_13_073129_update_settings_add_support_key', 1), (41, '2019_08_14_093126_alter_booking_times_and_bookings_table', 1), (42, '2019_08_14_121322_create_front_theme_settings_table', 1), (43, '2019_08_27_043810_create_pages_table', 1), (44, '2019_08_28_081847_update_smtp_setting_verified', 1), (45, '2019_09_03_110646_add_slug_field_in_categories_and_business_services_table', 1), (46, '2019_09_17_083105_create_sms_settings_table', 1), (47, '2019_09_18_115145_add_mobile_verified_column_in_users_table', 1), (48, '2019_09_23_064129_create_universal_search_table', 1), (49, '2019_10_07_073041_add_status_column_in_languages_table', 1), (50, '2019_10_14_084220_alter_foreign_key_in_business_services_table', 1), (51, '2019_11_13_055043_create_businesses_table', 1), (52, '2019_11_14_022157_insert_businessess_table', 1), (53, '2019_11_14_053010_insert_user_table', 1), (54, '2019_11_14_070828_create_business_user_table', 1), (55, '2019_11_14_071035_insert_business_user_table', 1), (56, '2019_11_14_082706_add_booking_id_column', 1), (57, '2019_11_14_092840_add_business_id_column', 1), (58, '2019_11_15_032515_insert_bookings_table', 1), (59, '2019_11_15_033308_insert_booking_times_table', 1), (60, '2019_11_15_055817_insert_categories_table', 1), (61, '2019_11_15_060319_insert_locations_table', 1), (62, '2019_11_15_060855_insert_business_services_table', 1), (63, '2019_11_15_181634_insert_booking_items_table', 1), (64, '2019_11_15_182156_insert_employee_groups_table', 1), (65, '2019_11_15_182612_insert_front_theme_settings_table', 1), (66, '2019_11_15_182833_insert_media_table', 1), (67, '2019_11_15_184006_insert_pages_table', 1), (68, '2019_11_15_185102_insert_payments_table', 1), (69, '2019_11_15_185600_insert_sms_settings_table', 1), (70, '2019_11_15_190001_insert_smtp_settings_table', 1), (71, '2019_11_15_190733_insert_tax_settings_table', 1), (72, '2019_11_15_190939_insert_theme_settings_table', 1), (73, '2019_11_18_092248_insert_purchase_code_in_company_settings_table', 1), (74, '2019_11_22_072625_insert_company_settings_table', 1), (75, '2019_12_01_123824_update_payment_gateway_credentials_record', 1), (76, '2019_12_09_081447_create_plan_table', 1), (77, '2019_12_10_022900_create_subscription_table', 1), (78, '2019_12_10_051343_insert_super_admin_data', 1), (79, '2019_12_10_090732_create_payment_history_table', 1), (80, '2019_12_13_065728_create_payment_card_table', 1), (81, '2020_01_13_081601_create_payment_subscription_table', 1); -- -------------------------------------------------------- -- -- Table structure for table `pages` -- CREATE TABLE `pages` ( `id` bigint(20) UNSIGNED NOT NULL, `business_id` int(10) UNSIGNED DEFAULT NULL, `booking_id` int(10) UNSIGNED DEFAULT NULL, `title` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `content` text COLLATE utf8_unicode_ci NOT NULL, `slug` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `pages` -- INSERT INTO `pages` (`id`, `business_id`, `booking_id`, `title`, `content`, `slug`, `created_at`, `updated_at`) VALUES (1, NULL, NULL, 'About Us', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'about-us', '2020-02-07 02:09:49', '2020-02-07 02:09:49'), (2, NULL, NULL, 'Contact Us', '<h2>Contact Us</h2>\r\n\r\n <p>How can we help you? We will try to get back to you as soon as possible.</p>', 'contact-us', '2020-02-07 02:09:49', '2020-02-07 02:09:49'), (3, NULL, NULL, 'How It Works', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'how-it-works', '2020-02-07 02:09:50', '2020-02-07 02:09:50'), (4, NULL, NULL, 'Privacy Policy', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'privacy-policy', '2020-02-07 02:09:50', '2020-02-07 02:09:50'), (5, 1, NULL, 'About Us', '(Food Business) Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'about-us', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (6, 1, NULL, 'Contact Us', '<h2>Contact Us</h2>\r\n\r\n <p>How can we help you? We will try to get back to you as soon as possible.</p>', 'contact-us', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (7, 1, NULL, 'How It Works', '(Food Business) Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'how-it-works', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (8, 1, NULL, 'Privacy Policy', '(Food Business) Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'privacy-policy', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (9, 2, NULL, 'About Us', '(Shirt Business) Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'about-us', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (10, 2, NULL, 'Contact Us', '<h2>Contact Us</h2>\r\n\r\n <p>How can we help you? We will try to get back to you as soon as possible.</p>', 'contact-us', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (11, 2, NULL, 'How It Works', '(Shirt Business) Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'how-it-works', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (12, 2, NULL, 'Privacy Policy', '(Shirt Business) Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'privacy-policy', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (13, 3, NULL, 'About Us', '(Technology Business) Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'about-us', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (14, 3, NULL, 'Contact Us', '<h2>Contact Us</h2>\r\n\r\n <p>How can we help you? We will try to get back to you as soon as possible.</p>', 'contact-us', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (15, 3, NULL, 'How It Works', '(Technology Business) Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'how-it-works', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (16, 3, NULL, 'Privacy Policy', '(Technology Business) Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'privacy-policy', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (17, 4, NULL, 'About Us', '(House Business) Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'about-us', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (18, 4, NULL, 'Contact Us', '<h2>Contact Us</h2>\r\n\r\n <p>How can we help you? We will try to get back to you as soon as possible.</p>', 'contact-us', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (19, 4, NULL, 'How It Works', '(House Business) Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'how-it-works', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (20, 4, NULL, 'Privacy Policy', '(House Business) Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'privacy-policy', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (21, 5, NULL, 'About Us', '(Cars Business) Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'about-us', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (22, 5, NULL, 'Contact Us', '<h2>Contact Us</h2>\r\n\r\n <p>How can we help you? We will try to get back to you as soon as possible.</p>', 'contact-us', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (23, 5, NULL, 'How It Works', '(Cars Business) Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'how-it-works', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (24, 5, NULL, 'Privacy Policy', '(Cars Business) Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'privacy-policy', '2019-11-14 03:09:33', '2019-11-14 03:09:33'); -- -------------------------------------------------------- -- -- Table structure for table `password_resets` -- CREATE TABLE `password_resets` ( `email` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `token` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `payments` -- CREATE TABLE `payments` ( `id` int(10) UNSIGNED NOT NULL, `currency_id` int(11) DEFAULT NULL, `booking_id` int(10) UNSIGNED NOT NULL, `amount` double NOT NULL, `gateway` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `transaction_id` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `status` enum('complete','pending') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'pending', `paid_on` datetime DEFAULT NULL, `customer_id` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `event_id` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `payments` -- INSERT INTO `payments` (`id`, `currency_id`, `booking_id`, `amount`, `gateway`, `transaction_id`, `status`, `paid_on`, `customer_id`, `event_id`, `created_at`, `updated_at`) VALUES (1, 1, 1, 5, NULL, NULL, '', '2019-11-14 11:09:33', '1', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (2, 1, 2, 5, NULL, NULL, '', '2019-11-14 11:09:33', '2', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (3, 1, 3, 5, NULL, NULL, '', '2019-11-14 11:09:33', '1', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (4, 1, 4, 5, NULL, NULL, '', '2019-11-14 11:09:33', '2', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (5, 1, 5, 5, NULL, NULL, '', '2019-11-14 11:09:33', '3', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (6, 1, 6, 5, NULL, NULL, '', '2019-11-14 11:09:33', '4', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (7, 1, 7, 5, NULL, NULL, '', '2019-11-14 11:09:33', '5', NULL, '2019-11-14 03:09:33', '2019-11-14 03:09:33'); -- -------------------------------------------------------- -- -- Table structure for table `payment_card` -- CREATE TABLE `payment_card` ( `id` int(10) UNSIGNED NOT NULL, `user_id` int(10) UNSIGNED DEFAULT NULL, `account_name` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `card_number` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `pt_invoice_id` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `payment_card` -- INSERT INTO `payment_card` (`id`, `user_id`, `account_name`, `card_number`, `pt_invoice_id`, `created_at`, `updated_at`) VALUES (1, 1, '', '', '', '2019-12-11 03:09:34', '2019-12-11 03:09:34'), (2, 2, '', '', '', '2019-12-11 03:09:34', '2019-12-11 03:09:34'), (3, 8, '', '', '', '2019-12-11 03:09:34', '2019-12-11 03:09:34'); -- -------------------------------------------------------- -- -- Table structure for table `payment_gateway_credentials` -- CREATE TABLE `payment_gateway_credentials` ( `id` int(10) UNSIGNED NOT NULL, `paypal_client_id` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `paypal_secret` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `stripe_client_id` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `stripe_secret` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `stripe_webhook_secret` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `stripe_status` enum('active','deactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'deactive', `paypal_status` enum('active','deactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'deactive', `offline_payment` enum('0','1') COLLATE utf8_unicode_ci NOT NULL DEFAULT '1', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `payment_gateway_credentials` -- INSERT INTO `payment_gateway_credentials` (`id`, `paypal_client_id`, `paypal_secret`, `stripe_client_id`, `stripe_secret`, `stripe_webhook_secret`, `stripe_status`, `paypal_status`, `offline_payment`, `created_at`, `updated_at`) VALUES (1, NULL, NULL, NULL, NULL, NULL, 'deactive', 'deactive', '1', '2020-02-07 02:09:30', '2020-02-07 02:09:30'); -- -------------------------------------------------------- -- -- Table structure for table `payment_history` -- CREATE TABLE `payment_history` ( `id` int(10) UNSIGNED NOT NULL, `business_id` int(10) UNSIGNED DEFAULT NULL, `plan_id` int(10) UNSIGNED DEFAULT NULL, `user_id` int(10) UNSIGNED DEFAULT NULL, `amount` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `currency` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `transaction_id` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `order_id` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `pt_invoice_id` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `card_last_number` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `payment_history` -- INSERT INTO `payment_history` (`id`, `business_id`, `plan_id`, `user_id`, `amount`, `currency`, `transaction_id`, `order_id`, `pt_invoice_id`, `card_last_number`, `created_at`, `updated_at`) VALUES (1, 1, 2, 1, '', '', '', '', '', '', '2019-12-11 03:09:34', '2019-12-11 03:09:34'), (2, 2, 2, 2, '', '', '', '', '', '', '2019-12-11 03:09:34', '2019-12-11 03:09:34'), (3, 3, 1, 8, '', '', '', '', '', '', '2019-12-11 03:09:34', '2019-12-11 03:09:34'); -- -------------------------------------------------------- -- -- Table structure for table `payment_subscription` -- CREATE TABLE `payment_subscription` ( `id` int(10) UNSIGNED NOT NULL, `subscription_id` int(10) UNSIGNED DEFAULT NULL, `invoice_id` int(11) NOT NULL, `references_no` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `transaction_id` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `pt_token` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `pt_customer_email` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `pt_customer_password` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `title` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `cc_first_name` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `cc_last_name` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `order_id` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `product_name` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `customer_email` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `phone_number` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `amount` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `currency` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `address_billing` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `state_billing` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `city_billing` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `postal_code_billing` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `country_billing` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `address_shipping` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `city_shipping` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `state_shipping` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `postal_code_shipping` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `country_shipping` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `payment_subscription` -- INSERT INTO `payment_subscription` (`id`, `subscription_id`, `invoice_id`, `references_no`, `transaction_id`, `pt_token`, `pt_customer_email`, `pt_customer_password`, `title`, `cc_first_name`, `cc_last_name`, `order_id`, `product_name`, `customer_email`, `phone_number`, `amount`, `currency`, `address_billing`, `state_billing`, `city_billing`, `postal_code_billing`, `country_billing`, `address_shipping`, `city_shipping`, `state_shipping`, `postal_code_shipping`, `country_shipping`, `created_at`, `updated_at`) VALUES (1, 1, 373661, 'ABC-123', '423428', 'iX6x4eDoANoJOWERe16PeCg02ut7Mwd5', '<EMAIL>', 'wrLpdt<PASSWORD>', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '2019-12-11 03:09:34', '2019-12-11 03:09:34'), (2, 2, 373321, 'ABC-123', '423428', 'iX6x4eDoANoJOWERe16PeCg02ut7Mwd5', '<EMAIL>', 'wrLpdt5i26', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '2019-12-11 03:09:34', '2019-12-11 03:09:34'), (3, 3, 373316, 'ABC-123', '423428', 'iX6x4eDoANoJOWERe16PeCg02ut7Mwd5', '423428', 'wrLpdt5i26', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '2019-12-11 03:09:34', '2019-12-11 03:09:34'); -- -------------------------------------------------------- -- -- Table structure for table `plan` -- CREATE TABLE `plan` ( `id` int(10) UNSIGNED NOT NULL, `plan_name` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `monthly` double(8,2) NOT NULL, `annual` double(8,2) NOT NULL, `description` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `services_limit` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `bookings_limit` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `plan` -- INSERT INTO `plan` (`id`, `plan_name`, `monthly`, `annual`, `description`, `services_limit`, `bookings_limit`, `created_at`, `updated_at`) VALUES (1, 'Free', 0.00, 0.00, 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', '5', '5', '2019-12-09 03:09:34', '2019-12-09 03:09:34'), (2, 'Standard', 5.00, 55.00, 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', '10', '10', '2019-12-09 03:09:34', '2019-12-09 03:09:34'), (3, 'Professional', 15.00, 155.00, 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', '50', '100', '2019-12-09 03:09:34', '2019-12-09 03:09:34'), (4, 'Advance', 25.00, 200.00, 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'Unlimited', 'Unlimited', '2019-12-09 03:09:34', '2019-12-09 03:09:34'); -- -------------------------------------------------------- -- -- Table structure for table `sms_settings` -- CREATE TABLE `sms_settings` ( `id` bigint(20) UNSIGNED NOT NULL, `business_id` int(10) UNSIGNED DEFAULT NULL, `booking_id` int(10) UNSIGNED DEFAULT NULL, `nexmo_status` enum('active','deactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'deactive', `nexmo_key` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `nexmo_secret` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `nexmo_from` varchar(191) COLLATE utf8_unicode_ci DEFAULT 'NEXMO', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `sms_settings` -- INSERT INTO `sms_settings` (`id`, `business_id`, `booking_id`, `nexmo_status`, `nexmo_key`, `nexmo_secret`, `nexmo_from`, `created_at`, `updated_at`) VALUES (1, NULL, NULL, 'deactive', NULL, NULL, 'NEXMO', '2020-02-07 02:09:48', '2020-02-07 02:09:48'), (2, 1, 1, 'deactive', NULL, NULL, 'NEXMO', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (3, 2, 2, 'deactive', NULL, NULL, 'NEXMO', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (4, 1, 3, 'deactive', NULL, NULL, 'NEXMO', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (5, 2, 4, 'deactive', NULL, NULL, 'NEXMO', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (6, 3, 5, 'deactive', NULL, NULL, 'NEXMO', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (7, 4, 6, 'deactive', NULL, NULL, 'NEXMO', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (8, 5, 7, 'deactive', NULL, NULL, 'NEXMO', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (9, 3, 8, 'deactive', NULL, NULL, 'NEXMO', '2019-11-14 03:09:33', '2019-11-14 03:09:33'); -- -------------------------------------------------------- -- -- Table structure for table `smtp_settings` -- CREATE TABLE `smtp_settings` ( `id` int(10) UNSIGNED NOT NULL, `business_id` int(10) UNSIGNED DEFAULT NULL, `booking_id` int(10) UNSIGNED DEFAULT NULL, `mail_driver` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `mail_host` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `mail_port` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `mail_username` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `mail_password` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `mail_from_name` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `mail_from_email` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `mail_encryption` enum('none','tls','ssl') COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `verified` tinyint(1) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `smtp_settings` -- INSERT INTO `smtp_settings` (`id`, `business_id`, `booking_id`, `mail_driver`, `mail_host`, `mail_port`, `mail_username`, `mail_password`, `mail_from_name`, `mail_from_email`, `mail_encryption`, `created_at`, `updated_at`, `verified`) VALUES (1, NULL, NULL, 'mail', 'smtp.gmail.com', '587', '<EMAIL>', 'mypassword', '<PASSWORD>', '<EMAIL>', 'none', '2020-02-07 02:09:19', '2020-02-07 02:09:19', 0), (2, 1, 1, 'mail', 'one_smtp.gmail.com', '587', '<EMAIL>', 'mypassword', '<PASSWORD>', '<EMAIL>', 'none', '2019-11-14 03:09:33', '2019-11-14 03:09:33', 0), (3, 2, 2, 'mail', 'two_smtp.gmail.com', '587', '<EMAIL>', 'mypassword', '<PASSWORD>', '<EMAIL>', 'none', '2019-11-14 03:09:33', '2019-11-14 03:09:33', 0), (4, 1, 3, 'mail', 'one_smtp.gmail.com', '587', '<EMAIL>', '<PASSWORD>', '<PASSWORD>', '<EMAIL>', 'none', '2019-11-14 03:09:33', '2019-11-14 03:09:33', 0), (5, 2, 4, 'mail', 'two_smtp.gmail.com', '587', '<EMAIL>', 'mypassword', '<PASSWORD>', '<EMAIL>', 'none', '2019-11-14 03:09:33', '2019-11-14 03:09:33', 0), (6, 3, 5, 'mail', 'three_smtp.gmail.com', '587', '<EMAIL>', 'mypassword', '<PASSWORD>', '<EMAIL>', 'none', '2019-11-14 03:09:33', '2019-11-14 03:09:33', 0), (7, 4, 6, 'mail', 'four_smtp.gmail.com', '587', '<EMAIL>', 'mypassword', '<PASSWORD>', '<EMAIL>', 'none', '2019-11-14 03:09:33', '2019-11-14 03:09:33', 0), (8, 5, 7, 'mail', 'five_smtp.gmail.com', '587', '<EMAIL>', 'mypassword', '<PASSWORD>', '<EMAIL>', 'none', '2019-11-14 03:09:33', '2019-11-14 03:09:33', 0), (9, 3, 8, 'mail', 'five_smtp.gmail.com', '587', '<EMAIL>', 'mypassword', '<PASSWORD>', '<EMAIL>', 'none', '2019-11-14 03:09:33', '2019-11-14 03:09:33', 0); -- -------------------------------------------------------- -- -- Table structure for table `subscription` -- CREATE TABLE `subscription` ( `id` int(10) UNSIGNED NOT NULL, `business_id` int(10) UNSIGNED DEFAULT NULL, `plan_id` int(10) UNSIGNED DEFAULT NULL, `user_id` int(10) UNSIGNED DEFAULT NULL, `last_payment` datetime NOT NULL, `next_payment` datetime NOT NULL, `recuring_payment` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `subscription` -- INSERT INTO `subscription` (`id`, `business_id`, `plan_id`, `user_id`, `last_payment`, `next_payment`, `recuring_payment`, `created_at`, `updated_at`) VALUES (1, 1, 2, 1, '2019-12-09 11:09:34', '2020-01-09 11:09:34', 'Monthly', '2019-12-09 03:09:34', '2019-12-09 03:09:34'), (2, 2, 2, 2, '2019-12-09 11:09:34', '2020-01-09 11:09:34', 'Monthly', '2019-12-09 03:09:34', '2019-12-09 03:09:34'), (3, 3, 1, 8, '2019-12-09 11:09:34', '2020-01-09 11:09:34', 'Monthly', '2019-12-09 03:09:34', '2019-12-09 03:09:34'); -- -------------------------------------------------------- -- -- Table structure for table `tax_settings` -- CREATE TABLE `tax_settings` ( `id` int(10) UNSIGNED NOT NULL, `business_id` int(10) UNSIGNED DEFAULT NULL, `booking_id` int(10) UNSIGNED DEFAULT NULL, `tax_name` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `percent` double(8,2) NOT NULL, `status` enum('active','deactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `tax_settings` -- INSERT INTO `tax_settings` (`id`, `business_id`, `booking_id`, `tax_name`, `percent`, `status`, `created_at`, `updated_at`) VALUES (1, NULL, NULL, 'GST', 18.00, 'active', '2020-02-07 02:09:09', '2020-02-07 02:09:09'), (2, 1, 1, 'VAT', 5.00, 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (3, 2, 2, 'VAT', 5.00, 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (4, 1, 3, 'VAT', 5.00, 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (5, 2, 4, 'VAT', 5.00, 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (6, 3, 5, 'VAT', 5.00, 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (7, 4, 6, 'VAT', 5.00, 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (8, 5, 7, 'VAT', 5.00, 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'), (9, 3, 8, 'VAT', 5.00, 'active', '2019-11-14 03:09:33', '2019-11-14 03:09:33'); -- -------------------------------------------------------- -- -- Table structure for table `theme_settings` -- CREATE TABLE `theme_settings` ( `id` int(10) UNSIGNED NOT NULL, `business_id` int(10) UNSIGNED DEFAULT NULL, `booking_id` int(10) UNSIGNED DEFAULT NULL, `primary_color` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `secondary_color` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `sidebar_bg_color` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `sidebar_text_color` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `topbar_text_color` varchar(191) COLLATE utf8_unicode_ci NOT NULL DEFAULT '#FFFFFF', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `theme_settings` -- INSERT INTO `theme_settings` (`id`, `business_id`, `booking_id`, `primary_color`, `secondary_color`, `sidebar_bg_color`, `sidebar_text_color`, `topbar_text_color`, `created_at`, `updated_at`) VALUES (1, NULL, NULL, '#414552', '#788AE2', '#FFFFFF', '#5C5C62', '#FFFFFF', NULL, NULL), (2, 1, 1, '#414552', '#788AE2', '#FFFFFF', '#5C5C62', '#FFFFFF', NULL, NULL), (3, 2, 2, '#414552', '#788AE2', '#FFFFFF', '#5C5C62', '#FFFFFF', NULL, NULL), (4, 1, 3, '#414552', '#788AE2', '#FFFFFF', '#5C5C62', '#FFFFFF', NULL, NULL), (5, 2, 4, '#414552', '#788AE2', '#FFFFFF', '#5C5C62', '#FFFFFF', NULL, NULL), (6, 3, 5, '#414552', '#788AE2', '#FFFFFF', '#5C5C62', '#FFFFFF', NULL, NULL), (7, 4, 6, '#414552', '#788AE2', '#FFFFFF', '#5C5C62', '#FFFFFF', NULL, NULL), (8, 5, 7, '#414552', '#788AE2', '#FFFFFF', '#5C5C62', '#FFFFFF', NULL, NULL), (9, 3, 8, '#414552', '#788AE2', '#FFFFFF', '#5C5C62', '#FFFFFF', NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `universal_searches` -- CREATE TABLE `universal_searches` ( `id` bigint(20) UNSIGNED NOT NULL, `searchable_id` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `searchable_type` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `title` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `route_name` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `universal_searches` -- INSERT INTO `universal_searches` (`id`, `searchable_id`, `searchable_type`, `title`, `route_name`, `created_at`, `updated_at`) VALUES (1, '1', 'Location', 'Jaipur, India', 'admin.locations.edit', '2020-02-07 02:09:49', '2020-02-07 02:09:49'), (2, 'about-us', 'Page', 'About Us', 'admin.pages.edit', '2020-02-07 02:09:49', '2020-02-07 02:09:49'), (3, 'contact-us', 'Page', 'Contact Us', 'admin.pages.edit', '2020-02-07 02:09:50', '2020-02-07 02:09:50'), (4, 'how-it-works', 'Page', 'How It Works', 'admin.pages.edit', '2020-02-07 02:09:50', '2020-02-07 02:09:50'), (5, 'privacy-policy', 'Page', 'Privacy Policy', 'admin.pages.edit', '2020-02-07 02:09:50', '2020-02-07 02:09:50'), (6, '1', 'Service', '<NAME>', 'admin.business-services.edit', '2020-02-07 02:11:37', '2020-02-07 02:11:37'), (7, '2', 'Service', '<NAME>', 'admin.business-services.edit', '2020-02-07 02:11:37', '2020-02-07 02:11:37'), (8, '3', 'Service', '<NAME>', 'admin.business-services.edit', '2020-02-07 02:11:37', '2020-02-07 02:11:37'), (9, '4', 'Service', '<NAME>', 'admin.business-services.edit', '2020-02-07 02:11:37', '2020-02-07 02:11:37'), (10, '5', 'Service', 'Lacoste Shirt', 'admin.business-services.edit', '2020-02-07 02:11:37', '2020-02-07 02:11:37'), (11, '6', 'Service', 'Google Company', 'admin.business-services.edit', '2020-02-07 02:11:38', '2020-02-07 02:11:38'), (12, '7', 'Service', 'Camella Homes', 'admin.business-services.edit', '2020-02-07 02:11:38', '2020-02-07 02:11:38'), (13, '8', 'Service', 'Honda Motorcycle', 'admin.business-services.edit', '2020-02-07 02:11:38', '2020-02-07 02:11:38'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(10) UNSIGNED NOT NULL, `group_id` int(11) DEFAULT NULL, `name` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `calling_code` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `mobile` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `mobile_verified` tinyint(1) NOT NULL DEFAULT '0', `password` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `image` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL, `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `is_admin` tinyint(4) NOT NULL, `is_employee` int(11) NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `group_id`, `name`, `email`, `calling_code`, `mobile`, `mobile_verified`, `password`, `image`, `remember_token`, `is_admin`, `is_employee`, `created_at`, `updated_at`, `deleted_at`) VALUES (1, NULL, 'M.S.Dhoni', '<EMAIL>', NULL, '1919191919', 0, '$2y$10$6Hqf.yISteTz6uNophja0OZjmsfAV6bYKVE0imYKhKRE3AwK/.Yiu', NULL, 'lgaR8kE8pRA8ydkuT4YCZNX2c1HqSz3N8OT4hYIAs4KoB3NEAz4H2AhqDeaf', 1, 0, '2019-11-14 03:09:33', NULL, NULL), (2, NULL, '<NAME>', '<EMAIL>', NULL, '1919191911', 0, '$2y$10$6Hqf.yISteTz6uNophja0OZjmsfAV6bYKVE0imYKhKRE3AwK/.Yiu', NULL, 'lgaR8kE8pRA8ydkuT4YCZNX2c1HqSz3N8OT4hYIAs4KoB3NEAz4H2AhqDeaf', 1, 0, '2019-11-14 03:09:33', NULL, NULL), (3, 1, '<NAME>', '<EMAIL>', '+63', '9088184444', 0, '$2y$10$6Hqf.yISteTz6uNophja0OZjmsfAV6bYKVE0imYKhKRE3AwK/.Yiu', NULL, NULL, 0, 1, '2019-11-14 03:09:33', NULL, NULL), (4, 2, '<NAME>', '<EMAIL>', '+63', '9088184445', 0, '$2y$10$6Hqf.yISteTz6uNophja0OZjmsfAV6bYKVE0imYKhKRE3AwK/.Yiu', NULL, NULL, 0, 1, '2019-11-14 03:09:33', NULL, NULL), (5, 3, '<NAME>', '<EMAIL>', '+63', '9088184446', 0, '$2y$10$6Hqf.yISteTz6uNophja0OZjmsfAV6bYKVE0imYKhKRE3AwK/.Yiu', NULL, NULL, 0, 1, '2019-11-14 03:09:33', NULL, NULL), (6, 4, '<NAME>', '<EMAIL>', '+63', '9088184447', 0, '$2y$10$6Hqf.yISteTz6uNophja0OZjmsfAV6bYKVE0imYKhKRE3AwK/.Yiu', NULL, NULL, 0, 1, '2019-11-14 03:09:33', NULL, NULL), (7, 5, '<NAME>', '<EMAIL>', '+63', '9088184448', 0, '$2y$10$6Hqf.yISteTz6uNophja0OZjmsfAV6bYKVE0imYKhKRE3AwK/.Yiu', NULL, NULL, 0, 1, '2019-11-14 03:09:33', NULL, NULL), (8, NULL, '<NAME>', '<EMAIL>', NULL, '1919191911', 0, '$2y$10$6Hqf.yISteTz6uNophja0OZjmsfAV6bYKVE0imYKhKRE3AwK/.Yiu', NULL, 'lgaR8kE8pRA8ydkuT4YCZNX2c1HqSz3N8OT4hYIAs4KoB3NEAz4H2AhqDeaf', 1, 0, '2019-11-14 03:09:33', NULL, NULL), (9, NULL, 'Super Admin', '<EMAIL>', NULL, '999999999', 0, '$2y$10$r2q90LXnSUmMnNrbcq/fKO44G.h11UmOg2Qxql6r7CURv5ed.xTO.', NULL, NULL, 2, 0, '2019-11-14 03:09:33', NULL, NULL); -- -- Indexes for dumped tables -- -- -- Indexes for table `bookings` -- ALTER TABLE `bookings` ADD PRIMARY KEY (`id`), ADD KEY `bookings_user_id_foreign` (`user_id`), ADD KEY `bookings_business_id_foreign` (`business_id`); -- -- Indexes for table `booking_items` -- ALTER TABLE `booking_items` ADD PRIMARY KEY (`id`), ADD KEY `booking_items_booking_id_foreign` (`booking_id`), ADD KEY `booking_items_business_service_id_foreign` (`business_service_id`); -- -- Indexes for table `booking_times` -- ALTER TABLE `booking_times` ADD PRIMARY KEY (`id`), ADD KEY `booking_times_booking_id_foreign` (`booking_id`), ADD KEY `booking_times_business_id_foreign` (`business_id`); -- -- Indexes for table `businesses` -- ALTER TABLE `businesses` ADD PRIMARY KEY (`id`); -- -- Indexes for table `business_services` -- ALTER TABLE `business_services` ADD PRIMARY KEY (`id`), ADD KEY `business_services_category_id_foreign` (`category_id`), ADD KEY `business_services_location_id_foreign` (`location_id`), ADD KEY `business_services_booking_id_foreign` (`booking_id`), ADD KEY `business_services_business_id_foreign` (`business_id`); -- -- Indexes for table `business_user` -- ALTER TABLE `business_user` ADD PRIMARY KEY (`id`), ADD KEY `business_user_user_id_foreign` (`user_id`), ADD KEY `business_user_business_id_foreign` (`business_id`); -- -- Indexes for table `categories` -- ALTER TABLE `categories` ADD PRIMARY KEY (`id`), ADD KEY `categories_booking_id_foreign` (`booking_id`), ADD KEY `categories_business_id_foreign` (`business_id`); -- -- Indexes for table `company_settings` -- ALTER TABLE `company_settings` ADD PRIMARY KEY (`id`), ADD KEY `company_settings_currency_id_foreign` (`currency_id`), ADD KEY `company_settings_booking_id_foreign` (`booking_id`), ADD KEY `company_settings_business_id_foreign` (`business_id`); -- -- Indexes for table `currencies` -- ALTER TABLE `currencies` ADD PRIMARY KEY (`id`); -- -- Indexes for table `employee_groups` -- ALTER TABLE `employee_groups` ADD PRIMARY KEY (`id`), ADD KEY `employee_groups_booking_id_foreign` (`booking_id`), ADD KEY `employee_groups_business_id_foreign` (`business_id`); -- -- Indexes for table `front_theme_settings` -- ALTER TABLE `front_theme_settings` ADD PRIMARY KEY (`id`), ADD KEY `front_theme_settings_booking_id_foreign` (`booking_id`), ADD KEY `front_theme_settings_business_id_foreign` (`business_id`); -- -- Indexes for table `languages` -- ALTER TABLE `languages` ADD PRIMARY KEY (`id`); -- -- Indexes for table `locations` -- ALTER TABLE `locations` ADD PRIMARY KEY (`id`), ADD KEY `locations_booking_id_foreign` (`booking_id`), ADD KEY `locations_business_id_foreign` (`business_id`); -- -- Indexes for table `ltm_translations` -- ALTER TABLE `ltm_translations` ADD PRIMARY KEY (`id`); -- -- Indexes for table `media` -- ALTER TABLE `media` ADD PRIMARY KEY (`id`), ADD KEY `media_booking_id_foreign` (`booking_id`), ADD KEY `media_business_id_foreign` (`business_id`); -- -- Indexes for table `migrations` -- ALTER TABLE `migrations` ADD PRIMARY KEY (`id`); -- -- Indexes for table `pages` -- ALTER TABLE `pages` ADD PRIMARY KEY (`id`), ADD KEY `pages_booking_id_foreign` (`booking_id`), ADD KEY `pages_business_id_foreign` (`business_id`); -- -- Indexes for table `password_resets` -- ALTER TABLE `password_resets` ADD KEY `password_resets_email_index` (`email`); -- -- Indexes for table `payments` -- ALTER TABLE `payments` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `payments_transaction_id_unique` (`transaction_id`), ADD UNIQUE KEY `payments_event_id_unique` (`event_id`), ADD KEY `payments_booking_id_foreign` (`booking_id`); -- -- Indexes for table `payment_card` -- ALTER TABLE `payment_card` ADD PRIMARY KEY (`id`), ADD KEY `payment_card_user_id_foreign` (`user_id`); -- -- Indexes for table `payment_gateway_credentials` -- ALTER TABLE `payment_gateway_credentials` ADD PRIMARY KEY (`id`); -- -- Indexes for table `payment_history` -- ALTER TABLE `payment_history` ADD PRIMARY KEY (`id`), ADD KEY `payment_history_business_id_foreign` (`business_id`), ADD KEY `payment_history_plan_id_foreign` (`plan_id`), ADD KEY `payment_history_user_id_foreign` (`user_id`); -- -- Indexes for table `payment_subscription` -- ALTER TABLE `payment_subscription` ADD PRIMARY KEY (`id`), ADD KEY `payment_subscription_subscription_id_foreign` (`subscription_id`); -- -- Indexes for table `plan` -- ALTER TABLE `plan` ADD PRIMARY KEY (`id`); -- -- Indexes for table `sms_settings` -- ALTER TABLE `sms_settings` ADD PRIMARY KEY (`id`), ADD KEY `sms_settings_booking_id_foreign` (`booking_id`), ADD KEY `sms_settings_business_id_foreign` (`business_id`); -- -- Indexes for table `smtp_settings` -- ALTER TABLE `smtp_settings` ADD PRIMARY KEY (`id`), ADD KEY `smtp_settings_booking_id_foreign` (`booking_id`), ADD KEY `smtp_settings_business_id_foreign` (`business_id`); -- -- Indexes for table `subscription` -- ALTER TABLE `subscription` ADD PRIMARY KEY (`id`), ADD KEY `subscription_business_id_foreign` (`business_id`), ADD KEY `subscription_plan_id_foreign` (`plan_id`), ADD KEY `subscription_user_id_foreign` (`user_id`); -- -- Indexes for table `tax_settings` -- ALTER TABLE `tax_settings` ADD PRIMARY KEY (`id`), ADD KEY `tax_settings_booking_id_foreign` (`booking_id`), ADD KEY `tax_settings_business_id_foreign` (`business_id`); -- -- Indexes for table `theme_settings` -- ALTER TABLE `theme_settings` ADD PRIMARY KEY (`id`), ADD KEY `theme_settings_booking_id_foreign` (`booking_id`), ADD KEY `theme_settings_business_id_foreign` (`business_id`); -- -- Indexes for table `universal_searches` -- ALTER TABLE `universal_searches` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `users_email_unique` (`email`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `bookings` -- ALTER TABLE `bookings` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19; -- -- AUTO_INCREMENT for table `booking_items` -- ALTER TABLE `booking_items` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- AUTO_INCREMENT for table `booking_times` -- ALTER TABLE `booking_times` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; -- -- AUTO_INCREMENT for table `businesses` -- ALTER TABLE `businesses` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `business_services` -- ALTER TABLE `business_services` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `business_user` -- ALTER TABLE `business_user` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `categories` -- ALTER TABLE `categories` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `company_settings` -- ALTER TABLE `company_settings` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT for table `currencies` -- ALTER TABLE `currencies` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `employee_groups` -- ALTER TABLE `employee_groups` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- AUTO_INCREMENT for table `front_theme_settings` -- ALTER TABLE `front_theme_settings` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT for table `languages` -- ALTER TABLE `languages` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `locations` -- ALTER TABLE `locations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT for table `ltm_translations` -- ALTER TABLE `ltm_translations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `media` -- ALTER TABLE `media` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- AUTO_INCREMENT for table `migrations` -- ALTER TABLE `migrations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=82; -- -- AUTO_INCREMENT for table `pages` -- ALTER TABLE `pages` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25; -- -- AUTO_INCREMENT for table `payments` -- ALTER TABLE `payments` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- AUTO_INCREMENT for table `payment_card` -- ALTER TABLE `payment_card` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `payment_gateway_credentials` -- ALTER TABLE `payment_gateway_credentials` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `payment_history` -- ALTER TABLE `payment_history` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `payment_subscription` -- ALTER TABLE `payment_subscription` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `plan` -- ALTER TABLE `plan` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `sms_settings` -- ALTER TABLE `sms_settings` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT for table `smtp_settings` -- ALTER TABLE `smtp_settings` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT for table `subscription` -- ALTER TABLE `subscription` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `tax_settings` -- ALTER TABLE `tax_settings` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT for table `theme_settings` -- ALTER TABLE `theme_settings` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT for table `universal_searches` -- ALTER TABLE `universal_searches` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- Constraints for dumped tables -- -- -- Constraints for table `bookings` -- ALTER TABLE `bookings` ADD CONSTRAINT `bookings_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `bookings_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `booking_items` -- ALTER TABLE `booking_items` ADD CONSTRAINT `booking_items_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `booking_items_business_service_id_foreign` FOREIGN KEY (`business_service_id`) REFERENCES `business_services` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `booking_times` -- ALTER TABLE `booking_times` ADD CONSTRAINT `booking_times_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `booking_times_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `business_services` -- ALTER TABLE `business_services` ADD CONSTRAINT `business_services_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `business_services_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `business_services_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `business_services_location_id_foreign` FOREIGN KEY (`location_id`) REFERENCES `locations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `business_user` -- ALTER TABLE `business_user` ADD CONSTRAINT `business_user_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `business_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `categories` -- ALTER TABLE `categories` ADD CONSTRAINT `categories_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `categories_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `company_settings` -- ALTER TABLE `company_settings` ADD CONSTRAINT `company_settings_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `company_settings_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `company_settings_currency_id_foreign` FOREIGN KEY (`currency_id`) REFERENCES `currencies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `employee_groups` -- ALTER TABLE `employee_groups` ADD CONSTRAINT `employee_groups_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `employee_groups_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `front_theme_settings` -- ALTER TABLE `front_theme_settings` ADD CONSTRAINT `front_theme_settings_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `front_theme_settings_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `locations` -- ALTER TABLE `locations` ADD CONSTRAINT `locations_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `locations_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `media` -- ALTER TABLE `media` ADD CONSTRAINT `media_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `media_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `pages` -- ALTER TABLE `pages` ADD CONSTRAINT `pages_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `pages_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `payments` -- ALTER TABLE `payments` ADD CONSTRAINT `payments_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `payment_card` -- ALTER TABLE `payment_card` ADD CONSTRAINT `payment_card_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `payment_history` -- ALTER TABLE `payment_history` ADD CONSTRAINT `payment_history_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `payment_history_plan_id_foreign` FOREIGN KEY (`plan_id`) REFERENCES `plan` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `payment_history_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `payment_subscription` -- ALTER TABLE `payment_subscription` ADD CONSTRAINT `payment_subscription_subscription_id_foreign` FOREIGN KEY (`subscription_id`) REFERENCES `subscription` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `sms_settings` -- ALTER TABLE `sms_settings` ADD CONSTRAINT `sms_settings_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `sms_settings_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `smtp_settings` -- ALTER TABLE `smtp_settings` ADD CONSTRAINT `smtp_settings_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `smtp_settings_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `subscription` -- ALTER TABLE `subscription` ADD CONSTRAINT `subscription_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `subscription_plan_id_foreign` FOREIGN KEY (`plan_id`) REFERENCES `plan` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `subscription_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `tax_settings` -- ALTER TABLE `tax_settings` ADD CONSTRAINT `tax_settings_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `tax_settings_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `theme_settings` -- ALTER TABLE `theme_settings` ADD CONSTRAINT `theme_settings_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `theme_settings_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Create Table Departments( Department_ID Number Not Null Constraint Dept_ID_PK Primary Key, Department_Name Varchar2(255) Not Null Constraint Dept_Name_QK Unique, Manager_ID Number Location_ID Number, );
<gh_stars>0 # ************************************************************ # Sequel Pro SQL dump # Version 4096 # # http://www.sequelpro.com/ # http://code.google.com/p/sequel-pro/ # # Host: us-cdbr-iron-east-02.cleardb.net (MySQL 5.5.42-log) # Database: heroku_e56800c88b7a6b4 # Generation Time: 2015-06-07 19:16:58 +0000 # ************************************************************ /*!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 */; /*!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 */; # Dump of table ACCOUNT # ------------------------------------------------------------ DROP TABLE IF EXISTS `ACCOUNT`; CREATE TABLE `account` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `financial_institution` varchar(500) NOT NULL DEFAULT '', `name` varchar(1000) NOT NULL DEFAULT '', `currency` varchar(10) NOT NULL DEFAULT '', `type` varchar(100) NOT NULL DEFAULT '', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; # Dump of table BUDGET # ------------------------------------------------------------ DROP TABLE IF EXISTS `BUDGET`; CREATE TABLE `budget` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(1000) NOT NULL DEFAULT '', `limit` decimal(10,0) NOT NULL, `period` varchar(100) NOT NULL DEFAULT '', `rollover` tinyint(1) DEFAULT NULL, `rollover_date` date DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; # Dump of table TRANSACTION # ------------------------------------------------------------ DROP TABLE IF EXISTS `TRANSACTION`; CREATE TABLE `transaction` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `type` varchar(100) NOT NULL DEFAULT '', `description` varchar(1000) DEFAULT '', `amount` decimal(10,0) NOT NULL, `budget_id` int(11) NOT NULL, `date` date NOT NULL, `account_id` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_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 */;
<reponame>mtasca/CurrencyConverter # # Drop database currency_converter # ------------------------------------------------------------ DROP DATABASE IF EXISTS currency_converter; # # Create database currency_converter # ------------------------------------------------------------ CREATE DATABASE currency_converter; USE currency_converter; # # Dump of table currencies # ------------------------------------------------------------ DROP TABLE IF EXISTS `currencies`; CREATE TABLE `currencies` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL DEFAULT '', `description` varchar(100) NOT NULL DEFAULT '', `iso_code` varchar(30) NOT NULL DEFAULT '', `iso_number` int(10) unsigned NOT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `iso_code` (`iso_code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO currencies VALUES (1, 'US Dollar', 'US Dollar', 'USD', 840,NOW(), NOW()), (2, 'Euro', 'Euro', 'EUR', 978, NOW(), NOW()), (3, 'Argentine peso', 'Argentine peso', 'ARS', 032, NOW(), NOW()), (4, 'Brazilian real', 'Brazilian real', 'BRL', 986, NOW(), NOW()), (5, 'Chilean peso', 'Chilean peso', 'CLP', 152, NOW(), NOW()), (6, 'Pound sterling', 'Pound sterling', 'GBP', 826, NOW(), NOW());
<gh_stars>1-10 --password for all users is "<PASSWORD>" INSERT INTO users (id, city, country, flat_number, postal_code, street_name, street_number, email, gender, initial_password_changed, is_activated, name, password, last_password_reset_date, phone_number, surname, user_type, version) values (10, 'Beograd', 'Srbija', 4, '25000', 'M<NAME>', 44, '<EMAIL>', 'FEMALE', false, true,'Ana', '$2y$10$oVutWPmlktcw/hSDyklg7uF8jt7r1vXXkPUEwGoOllqZSwN2KaQmS', '2021-02-02', '065555555', 'Rajic', 'ROLE_PHARMACIST', 0); INSERT INTO users (id, city, country, flat_number, postal_code, street_name, street_number, email, gender, initial_password_changed, is_activated, name, password, last_password_reset_date, phone_number, surname, user_type, version) values (2, '<NAME>', 'Srbija', 6, '23000', 'Des<NAME>ana', 7, '<EMAIL>', 'MALE', true, true,'Dimitrije', '$2y$10$oVutWPmlktcw/hSDyklg7uF8jt7r1vXXkPUEwGoOllqZSwN2KaQmS', '2021-02-02', '0600822253', 'Bulaja', 'ROLE_PHARMACIST', 0); INSERT INTO users (id, city, country, flat_number, postal_code, street_name, street_number, email, gender, initial_password_changed, is_activated, name, password, last_password_reset_date, phone_number, surname, user_type, version) values (3, 'Zrenjanin', 'Srbija', 4, '21000', '<NAME>', 11, '<EMAIL>', 'MALE', true, true,'Marko', '$2y$10$oVutWPmlktcw/hSDyklg7uF8jt7r1vXXkPUEwGoOllqZSwN2KaQmS', '2021-02-02', '061111111', 'Djurisic', 'ROLE_DERMATOLOGIST', 0); INSERT INTO users (id, city, country, flat_number, postal_code, street_name, street_number, email, gender, initial_password_changed, is_activated, name, password, last_password_reset_date, phone_number, surname, user_type, version) values (4, 'Sombor', 'Srbija', 6, '56000', '<NAME>', 23, '<EMAIL>', 'FEMALE', true, true, 'Danica', '$2y$10$oVutWPmlktcw/hSDyklg7uF8jt7r1vXXkPUEwGoOllqZSwN2KaQmS', '2021-02-02', '069999999', 'Vojvodic', 'ROLE_PATIENT', 0); INSERT INTO users (id, city, country, flat_number, postal_code, street_name, street_number, email, gender, initial_password_changed, is_activated, name, password, last_password_reset_date, phone_number, surname, user_type, version) values (5, 'Budimpesta', 'Madjarska', 8, '58000', '<NAME>', 9, '<EMAIL>', 'MALE', true, true, 'Mihajlo', '$2y$10$oVutWPmlktcw/hSDyklg7uF8jt7r1vXXkPUEwGoOllqZSwN2KaQmS', '2021-02-02', '062222222', 'Omaljev', 'ROLE_PATIENT', 0); INSERT INTO users (id, city, country, flat_number, postal_code, street_name, street_number, email, gender, initial_password_changed, is_activated, name, password, last_password_reset_date, phone_number, surname, user_type, version) values (6, '<NAME>', 'Republika Srbija', 3, '21000', 'Turgenjeva', 7, '<EMAIL>', 'MALE', true, true,'Denis', '$2y$10$oVutWPmlktcw/hSDyklg7uF8jt7r1vXXkPUEwGoOllqZSwN2KaQmS', '2021-02-02', '0649853278', 'Fruza', 'ROLE_PATIENT', 0); INSERT INTO users (id, city, country, flat_number, postal_code, street_name, street_number, email, gender, initial_password_changed, is_activated, name, password, last_password_reset_date, phone_number, surname, user_type, version) values (7, '<NAME>', 'Republika Srbija', 11, '21000', '<NAME>', 11, '<EMAIL>', 'MALE', true, true,'Petar', '$2y$10$oVutWPmlktcw/hSDyklg7uF8jt7r1vXXkPUEwGoOllqZSwN2KaQmS', '2021-02-02', '06498543278', 'Peric', 'ROLE_DERMATOLOGIST', 0); INSERT INTO users (id, city, country, flat_number, postal_code, street_name, street_number, email, gender, initial_password_changed, is_activated, name, password, last_password_reset_date, phone_number, surname, user_type, version) values (8, '<NAME>', 'Srbija', 15, '21000', 'Futoska', 18, '<EMAIL>', 'MALE', true, true,'Aleksandar', '$2y$10$oVutWPmlktcw/hSDyklg7uF8jt7r1vXXkPUEwGoOllqZSwN2KaQmS', '2021-02-02', '0637709858', 'Vorgic', 'ROLE_SUPPLIER', 0); INSERT INTO users (id, city, country, flat_number, postal_code, street_name, street_number, email, gender, initial_password_changed, is_activated, name, password, last_password_reset_date, phone_number, surname, user_type, version) values (9, 'Zrenjanin', 'Srbija', 23, '23000', 'Dalmatinska', 18, '<EMAIL>', 'MALE', true, true,'Strahinja', '$2y$10$oVutWPmlktcw/hSDyklg7uF8jt7r1vXXkPUEwGoOllqZSwN2KaQmS', '2021-02-02', '0637709858', 'Cvijanovic', 'ROLE_PHARMACYADMINISTRATOR', 0); INSERT INTO users (id, city, country, flat_number, postal_code, street_name, street_number, email, gender, initial_password_changed, is_activated, name, password, last_password_reset_date, phone_number, surname, user_type, version) values (11, 'Zrenjanin', 'Srbija', 23, '23000', 'Dalmatinska', 18, '<EMAIL>', 'MALE', true, true,'Stefan', '$2y$10$oVutWPmlktcw/hSDyklg7uF8jt7r1vXXkPUEwGoOllqZSwN2KaQmS', '2021-02-02', '0637709858', 'Stefanovic', 'ROLE_PHARMACIST', 0); INSERT INTO users (id, city, country, flat_number, postal_code, street_name, street_number, email, gender, initial_password_changed, is_activated, name, password, last_password_reset_date, phone_number, surname, user_type, version) values (12, 'Zrenjanin', 'Srbija', 23, '23000', 'Dalmatinska', 18, '<EMAIL>', 'MALE', true, true,'Predrag', '$2y$10$oVutWPmlktcw/hSDyklg7uF8jt7r1vXXkPUEwGoOllqZSwN2KaQmS', '2021-02-02', '0637709858', 'Zigic', 'ROLE_PHARMACIST', 0); INSERT INTO patients (loyalty_points, patient_category, penalty_points, id) values (5, 'REGULAR', 0, 4); INSERT INTO patients (loyalty_points, patient_category, penalty_points, id) values (3, 'SILVER', 1, 5); INSERT INTO patients (loyalty_points, patient_category, penalty_points, id) values (12,'SILVER', 0, 6); INSERT INTO authorities (id, name) VALUES (1,'ROLE_PHARMACIST'); INSERT INTO authorities (id, name) VALUES (2,'ROLE_DERMATOLOGIST'); INSERT INTO authorities (id, name) VALUES (3,'ROLE_PATIENT'); INSERT INTO authorities (id, name) VALUES (4,'ROLE_PHARMACYADMINISTRATOR'); INSERT INTO authorities (id, name) VALUES (5,'ROLE_SUPPLIER'); INSERT INTO USER_AUTHORITY (user_id, authority_id) VALUES (10, 1); INSERT INTO USER_AUTHORITY (user_id, authority_id) VALUES (2, 1); INSERT INTO USER_AUTHORITY (user_id, authority_id) VALUES (3, 2); INSERT INTO USER_AUTHORITY (user_id, authority_id) VALUES (7, 2); INSERT INTO USER_AUTHORITY (user_id, authority_id) VALUES (4, 3); INSERT INTO USER_AUTHORITY (user_id, authority_id) VALUES (5, 3); INSERT INTO USER_AUTHORITY (user_id, authority_id) VALUES (6, 3); INSERT INTO USER_AUTHORITY (user_id, authority_id) VALUES (8, 5); INSERT INTO USER_AUTHORITY (user_id, authority_id) VALUES (9, 4); INSERT INTO USER_AUTHORITY (user_id, authority_id) VALUES (11, 1); INSERT INTO USER_AUTHORITY (user_id, authority_id) VALUES (12, 1); -----MEDICINES----- INSERT INTO medicine_specifications (id, recommended_dose, type, shape) values (1, '1 tablet every 8 hours.', 'ANAESTHETIC', 'PILL'); INSERT INTO medicine_specifications (id, recommended_dose, type, shape) values (2, '600mg every 12 hours.', 'ANTIBIOTIC', 'CAPSULE'); INSERT INTO medicine_specifications (id, recommended_dose, type, shape) values (3, '1 tablet every 4 hours.', 'ANAESTHETIC', 'CAPSULE'); INSERT INTO medicine_specifications (id, recommended_dose, type, shape) values (4, '400mg every 4 hours.', 'ANAESTHETIC', 'POWDER'); INSERT INTO medicine_specifications (id, recommended_dose, type, shape) values (5, '100ml every 24 hours.', 'ANTIBIOTIC', 'SYRUP'); INSERT INTO ingredients (id, name) values (1, 'paracetamol'); INSERT INTO ingredients (id, name) values (2, 'caffeine'); INSERT INTO ingredients (id, name) values (3, 'azithromycin'); INSERT INTO ingredients (id, name) values (4, 'penicilin'); INSERT INTO ingredients (id, name) values (5, 'bactrim'); insert into side_effects(id, description) values (1, 'dizziness'); insert into side_effects(id, description) values (2, 'abdominal pain'); insert into side_effects(id, description) values (3, 'headache'); insert into side_effects(id, description) values (4, 'increased heart rate'); insert into side_effects(id, description) values (5, 'tiredness'); insert into medicine_specifications_ingredients (medicine_specification_id, ingredients_id) values (1, 1); insert into medicine_specifications_ingredients (medicine_specification_id, ingredients_id) values (1, 4); insert into medicine_specifications_ingredients (medicine_specification_id, ingredients_id) values (2, 3); insert into medicine_specifications_ingredients (medicine_specification_id, ingredients_id) values (2, 4); insert into medicine_specifications_ingredients (medicine_specification_id, ingredients_id) values (2, 5); insert into medicine_specifications_ingredients (medicine_specification_id, ingredients_id) values (3, 1); insert into medicine_specifications_ingredients (medicine_specification_id, ingredients_id) values (3, 2); insert into medicine_specifications_ingredients (medicine_specification_id, ingredients_id) values (3, 5); insert into medicine_specifications_ingredients (medicine_specification_id, ingredients_id) values (4, 5); insert into medicine_specifications_ingredients (medicine_specification_id, ingredients_id) values (4, 4); insert into medicine_specifications_ingredients (medicine_specification_id, ingredients_id) values (5, 2); insert into medicine_specifications_side_effects (medicine_specification_id, side_effects_id) values (1, 1); insert into medicine_specifications_side_effects (medicine_specification_id, side_effects_id) values (2, 2); insert into medicine_specifications_side_effects (medicine_specification_id, side_effects_id) values (2, 3); insert into medicine_specifications_side_effects (medicine_specification_id, side_effects_id) values (2, 4); insert into medicine_specifications_side_effects (medicine_specification_id, side_effects_id) values (3, 5); insert into medicine_specifications_side_effects (medicine_specification_id, side_effects_id) values (3, 1); insert into medicine_specifications_side_effects (medicine_specification_id, side_effects_id) values (4, 1); insert into medicine_specifications_side_effects (medicine_specification_id, side_effects_id) values (4, 2); insert into medicine_specifications_side_effects (medicine_specification_id, side_effects_id) values (5, 5); insert into medicine_specifications_side_effects (medicine_specification_id, side_effects_id) values (5, 3); INSERT INTO medicines (id, name, manufacturer, on_prescription, additional_info, average_grade, loyalty_points, med_spec_id) values (1, 'Panadol', 'Hemofarm', true, 'Helps with all types of pain.', 4.2, 8, 1); INSERT INTO medicines (id, name, manufacturer, on_prescription, additional_info, average_grade, loyalty_points, med_spec_id) values (2, 'Caffetin', 'Galenika', false, 'Helps with all types of pain.', 5, 1, 5); INSERT INTO medicines (id, name, manufacturer, on_prescription, additional_info, average_grade, loyalty_points, med_spec_id) values (3, 'Hemomicin', 'Medicopharm', true, 'Helps with all types of bacterial infections.', 4.5, 2, 2); INSERT INTO medicines (id, name, manufacturer, on_prescription, additional_info, average_grade, loyalty_points, med_spec_id) values (4, 'Bromazepam', 'Hemofarm', true, 'Helps with pain and relaxes.', 4.7, 1, 3); INSERT INTO medicines (id, name, manufacturer, on_prescription, additional_info, average_grade, loyalty_points, med_spec_id) values (5, 'Aspirin', 'Galenika', false, 'Helps with headache.', 3.7, 2, 4); insert into medicines_alternative_medicines (medicine_id, alternative_medicines_id) values (1, 2); insert into medicines_alternative_medicines (medicine_id, alternative_medicines_id) values (1, 5); insert into medicines_alternative_medicines (medicine_id, alternative_medicines_id) values (2, 5); insert into medicines_alternative_medicines (medicine_id, alternative_medicines_id) values (1, 3); -------------------- ----PatientsAllergies----- insert into patients_allergies (patient_id, allergies_id) values (6, 3); insert into patients_allergies (patient_id, allergies_id) values (5, 1); ------ SUPPLIER ------ insert into suppliers (id) values(8); ---------------------- -----PHARMACIES----- insert into pharmacies (id, city, description, country, flat_number, postal_code, street_name, street_number, average_grade, dermatologist_loyalty_points, dermatologist_price, name, pharmacist_loyalty_points, pharmacist_price) values (1, '<NAME>', '', 'Republika Srbija', 0, '21000', 'Bulevar oslobodjenja', 123, 4.7, 10, 20.0, 'Jankovic', 12, 15.0); insert into pharmacies (id, city, description, country, flat_number, postal_code, street_name, street_number, average_grade, dermatologist_loyalty_points, dermatologist_price, name, pharmacist_loyalty_points, pharmacist_price) values (2, '<NAME>', '','Republika Srbija', 1, '21000', 'Turgenjeva', 7, 5, 13, 26.0, 'Benu', 8, 22.5); insert into pharmacies (id, city, description, country, flat_number, postal_code, street_name, street_number, average_grade, dermatologist_loyalty_points, dermatologist_price, name, pharmacist_loyalty_points, pharmacist_price) values (3, 'Zrenjanin', '', 'Republika Srbija', 2, '23000', '<NAME>', 18, 4.9, 15, 18.99, 'Zegin', 15, 19.99); INSERT INTO pharmacy_administrators (id, pharmacy_id) values (9, 3); INSERT INTO dermatologists (average_grade, id) values (4.2, 3); INSERT INTO pharmacies_dermatologists (pharmacy_id, dermatologists_id) values (2, 3); INSERT INTO pharmacies_dermatologists (pharmacy_id, dermatologists_id) values (1, 3); INSERT INTO dermatologists (average_grade, id) values (4.8, 7); INSERT INTO pharmacies_dermatologists (pharmacy_id, dermatologists_id) values (1, 7); INSERT INTO pharmacies_dermatologists (pharmacy_id, dermatologists_id) values (3, 7); INSERT INTO pharmacists (average_grade, id, pharmacy_id) values (5.0, 10, 2); INSERT INTO pharmacists (average_grade, id, pharmacy_id) values (4.0, 2, 1); INSERT INTO pharmacists (average_grade, id, pharmacy_id) values (4.5, 11, 3); INSERT INTO pharmacists (average_grade, id, pharmacy_id) values (4.5, 12, null); insert into patients_subscribed_pharmacies(patient_id, subscribed_pharmacies_id) values (6,1); -------------------- -------- ABSCENCE ---------------- insert into absences (id, employee_id, status, type, start_time, end_time) values (1, 7, 'PENDING', 'VACATION', '2021-09-10 12:00:00', '2021-09-15 12:00:00'); insert into absences (id, employee_id, status, type, start_time, end_time) values (2, 11, 'PENDING', 'VACATION', '2021-09-10 12:00:00', '2021-09-15 12:00:00'); ---------------------------------- -------- MEDICINE ORDER ---------- insert into medicine_order_items (id, medicine_id, amount_to_order) values (1, 1, 5); insert into medicine_order_items (id, medicine_id, amount_to_order) values (2, 3, 10); insert into medicine_orders (id, status, due_date, pharmacy_id) values (1, 'PENDING', '2021-08-29 12:00:00', 3); insert into medicine_orders (id, status, due_date, pharmacy_id) values (2, 'PENDING', '2021-09-29 12:00:00', 3); insert into medicine_orders_medicine_order_items(medicine_order_id, medicine_order_items_id) values (1, 1); insert into medicine_orders_medicine_order_items(medicine_order_id, medicine_order_items_id) values (1, 2); insert into medicine_orders_medicine_order_items(medicine_order_id, medicine_order_items_id) values (2, 1); insert into medicine_orders_medicine_order_items(medicine_order_id, medicine_order_items_id) values (2, 2); ---------------------------------- -------- MEDICINE OFFER -------- insert into medicine_offers (id, total_price, due_date, status, medicine_order_id, supplier_id) values (1, 5000, '2021-08-31 12:00:00', 'PENDING', 1, 8); insert into medicine_offers (id, total_price, due_date, status, medicine_order_id, supplier_id) values (2, 5000, '2021-08-31 12:00:00', 'PENDING', 1, 8); insert into medicine_offers (id, total_price, due_date, status, medicine_order_id, supplier_id) values (3, 5000, '2021-08-31 12:00:00', 'PENDING', 1, 8); insert into medicine_offers (id, total_price, due_date, status, medicine_order_id, supplier_id) values (4, 5000, '2021-08-31 12:00:00', 'PENDING', 2, 8); insert into medicine_offers (id, total_price, due_date, status, medicine_order_id, supplier_id) values (5, 5000, '2021-08-31 12:00:00', 'PENDING', 2, 8); -------------------------------- -----PHARMACY MEDICINES----- insert into pharmacy_medicines (id, amount, cost, start_time, end_time, medicine_id, pharmacy_id, version) values (1, 214, 534.00, '2021-06-01', '2022-08-30', 1, 1, 0); insert into pharmacy_medicines (id, amount, cost, start_time, end_time, medicine_id, pharmacy_id, version) values (2, 0, 528.70, '2021-06-02', '2022-07-30', 2, 1, 0); insert into pharmacy_medicines (id, amount, cost, start_time, end_time, medicine_id, pharmacy_id, version) values (3, 328, 560, '2021-06-07', '2022-07-25', 3, 1, 0); insert into pharmacy_medicines (id, amount, cost, start_time, end_time, medicine_id, pharmacy_id, version) values (4, 76, 320.25, '2021-06-01', '2022-07-15', 4, 1, 0); insert into pharmacy_medicines (id, amount, cost, start_time, end_time, medicine_id, pharmacy_id, version) values (5, 200, 290.28, '2021-06-02', '2022-09-30', 1, 2, 0); insert into pharmacy_medicines (id, amount, cost, start_time, end_time, medicine_id, pharmacy_id, version) values (6, 76, 1230.00, '2021-06-03', '2022-08-30', 3, 2, 0); insert into pharmacy_medicines (id, amount, cost, start_time, end_time, medicine_id, pharmacy_id, version) values (7, 43, 1250.99, '2021-06-05', '2022-09-20', 4, 2, 0); insert into pharmacy_medicines (id, amount, cost, start_time, end_time, medicine_id, pharmacy_id, version) values (8, 0, 150.70, '2021-07-07', '2022-09-11', 5, 2, 0); insert into pharmacy_medicines (id, amount, cost, start_time, end_time, medicine_id, pharmacy_id, version) values (9, 120, 150.70, '2021-07-07', '2022-09-11', 1, 3, 0); insert into pharmacy_medicines (id, amount, cost, start_time, end_time, medicine_id, pharmacy_id, version) values (10, 4, 150.70, '2021-07-07', '2022-09-11', 2, 3, 0); insert into pharmacy_medicines (id, amount, cost, start_time, end_time, medicine_id, pharmacy_id, version) values (11, 0, 150.70, '2021-07-07', '2022-09-11', 3, 3, 0); -------------------- -----WORKING HOURS----- INSERT INTO working_hours (id, end_time, start_time, pharmacy_id) values (1,'2021-10-20 14:00:00' , '2021-10-20 08:00:00', 1); INSERT INTO working_hours (id, end_time, start_time, pharmacy_id) values (2,'2021-09-21 16:00:00' , '2021-09-21 09:00:00', 1); INSERT INTO working_hours (id, end_time, start_time, pharmacy_id) values (3,'2021-08-08 18:00:00' , '2021-08-08 12:00:00', 1); INSERT INTO working_hours (id, end_time, start_time, pharmacy_id) values (4,'2021-10-21 19:00:00' , '2021-10-21 10:00:00', 1); INSERT INTO working_hours (id, end_time, start_time, pharmacy_id) values (5,'2021-08-09 10:00:00' , '2021-08-09 06:00:00', 1); INSERT INTO working_hours (id, end_time, start_time, pharmacy_id) values (6,'2021-10-17 13:00:00' , '2021-10-17 07:00:00', 2); INSERT INTO working_hours (id, end_time, start_time, pharmacy_id) values (7,'2021-10-20 18:00:00' , '2021-10-20 13:30:00', 2); INSERT INTO working_hours (id, end_time, start_time, pharmacy_id) values (8,'2021-10-20 18:00:00' , '2021-10-20 13:30:00', 3); INSERT INTO working_hours (id, end_time, start_time, pharmacy_id) values (9,'2021-09-15 18:00:00' , '2021-09-10 13:30:00', 3); INSERT INTO pharmacists_working_hours (pharmacists_id, working_hours_id) values (2, 1); INSERT INTO pharmacists_working_hours (pharmacists_id, working_hours_id) values (2, 2); INSERT INTO pharmacists_working_hours (pharmacists_id, working_hours_id) values (2, 3); INSERT INTO pharmacists_working_hours (pharmacists_id, working_hours_id) values (2, 4); INSERT INTO pharmacists_working_hours (pharmacists_id, working_hours_id) values (2, 5); INSERT INTO pharmacists_working_hours (pharmacists_id, working_hours_id) values (10, 6); INSERT INTO pharmacists_working_hours (pharmacists_id, working_hours_id) values (10, 7); INSERT INTO pharmacists_working_hours (pharmacists_id, working_hours_id) values (11, 6); INSERT INTO pharmacists_working_hours (pharmacists_id, working_hours_id) values (11, 7); INSERT INTO pharmacists_working_hours (pharmacists_id, working_hours_id) values (11, 9); INSERT INTO dermatologists_working_hours (dermatologists_id, working_hours_id) values (3, 1); INSERT INTO dermatologists_working_hours (dermatologists_id, working_hours_id) values (3, 2); INSERT INTO dermatologists_working_hours (dermatologists_id, working_hours_id) values (3, 3); INSERT INTO dermatologists_working_hours (dermatologists_id, working_hours_id) values (3, 4); INSERT INTO dermatologists_working_hours (dermatologists_id, working_hours_id) values (3, 5); INSERT INTO dermatologists_working_hours (dermatologists_id, working_hours_id) values (3, 6); INSERT INTO dermatologists_working_hours (dermatologists_id, working_hours_id) values (7, 6); INSERT INTO dermatologists_working_hours (dermatologists_id, working_hours_id) values (7, 7); INSERT INTO dermatologists_working_hours (dermatologists_id, working_hours_id) values (7, 9); -------------------- INSERT INTO e_prescriptions(id, release_date, patient_id, status) values (1, '2021-05-21', 6, 'PENDING'); INSERT INTO e_prescriptions(id, release_date, patient_id, status) values (2, '2021-03-21', 6, 'PROCESSED'); insert into medicine_quantities(id, medicine_id, quantity) values (1, 1, 5); insert into medicine_quantities(id, medicine_id, quantity) values (2, 2, 4); insert into medicine_quantities(id, medicine_id, quantity) values (3, 1, 7); insert into e_prescriptions_medicine_quantity (eprescription_id, medicine_quantity_id) values(1, 1); insert into e_prescriptions_medicine_quantity (eprescription_id, medicine_quantity_id) values(1, 2); insert into e_prescriptions_medicine_quantity (eprescription_id, medicine_quantity_id) values(2, 2); insert into medicine_reservations(id, due_date, status, pharmacy_id, medicine_quantity_id, patient_id, total_price,purchase_date, version) values (1, '2021-05-21', 'PURCHASED', 3, 1, 6, 1900,'2021-05-12', 0); insert into medicine_reservations(id, due_date, status, pharmacy_id, medicine_quantity_id, patient_id, total_price,purchase_date, version) values (2, '2021-06-21', 'PENDING', 1, 2, 6, 2300,null, 0); insert into medicine_reservations(id, due_date, status, pharmacy_id, medicine_quantity_id, patient_id, total_price,purchase_date, version) values (3, '2021-10-28', 'PENDING', 1, 3, 6, 3200,null, 0); insert into medicine_reservations(id, due_date, status, pharmacy_id, medicine_quantity_id, patient_id, total_price,purchase_date, version) values (4, '2021-10-30', 'PENDING', 2, 3, 6, 2200,null, 0); insert into medicine_reservations(id, due_date, status, pharmacy_id, medicine_quantity_id, patient_id, total_price,purchase_date, version) values (5, '2021-09-10', 'PURCHASED', 3, 1, 6, 1900,'2021-09-06', 0); insert into medicine_reservations(id, due_date, status, pharmacy_id, medicine_quantity_id, patient_id, total_price,purchase_date, version) values (6, '2021-09-10', 'PURCHASED', 3, 1, 6, 1900,'2021-05-05', 0); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (4, 10, 2, 30.0, 'Everything is alright', 'SUCCEEDED', '2021-07-17 10:00', '2021-07-17 08:00', 'PHARMACIST_APPOINTMENT', 1, 0, 4); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (5, 2, 2, 10.0, 'Patient is sick, he must stay at home', 'SUCCEEDED', '2021-08-09 07:00:00', '2021-08-09 06:30:00', 'PHARMACIST_APPOINTMENT', 1, 0, 4); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (6, 2, 2, 20.0, 'Patient is sick, he must stay at home', 'SUCCEEDED', '2021-08-09 09:00:00', '2021-08-09 08:30:00', 'PHARMACIST_APPOINTMENT', 1, 0, 6); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (7, 2, 4, 15.0, 'Patient is sick, he must stay at home', 'SUCCEEDED', '2021-08-08 15:00:00', '2021-08-08 14:30:00', 'PHARMACIST_APPOINTMENT', 1, 0, 6); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (8, 2, 2, 20.0, '', 'FAILED', '2021-08-09 08:30:00', '2021-08-09 08:00:00', 'PHARMACIST_APPOINTMENT', 1, 0, 6); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (9, 2, 2, 12.0, '', 'FAILED', '2021-08-08 13:00:00', '2021-08-08 12:30:00', 'PHARMACIST_APPOINTMENT', 1, 0, 5); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (10, 2, 2, 30.0, '', 'SCHEDULED', '2021-09-21 09:30:00', '2021-09-21 09:00:00', 'PHARMACIST_APPOINTMENT', 1, 0, 6); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (11, 2, 2, 25.0, '', 'SCHEDULED', '2021-09-21 10:00:00', '2021-09-21 09:30:00', 'PHARMACIST_APPOINTMENT', 1, 0, 4); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (12, 2, 4, 20.0, '', 'AVAILABLE', '2021-09-21 10:30:00', '2021-09-21 10:00:00', 'PHARMACIST_APPOINTMENT', 1, 0, null); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (13, 2, 4, 20.0, '', 'AVAILABLE', '2021-10-21 11:00:00', '2021-10-21 10:30:00', 'PHARMACIST_APPOINTMENT', 1, 0, null); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (21, 11, 2, 25.0, '', 'SCHEDULED', '2021-09-10 15:00:00', '2021-09-10 14:30:00', 'PHARMACIST_APPOINTMENT', 3, 0, 4); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (22, 11, 4, 20.0, '', 'AVAILABLE', '2021-09-10 15:30:00', '2021-09-10 15:00:00', 'PHARMACIST_APPOINTMENT', 3, 0, null); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (23, 11, 2, 30.0, 'Everything is alright', 'SUCCEEDED', '2021-09-10 16:00:00', '2021-09-10 15:30:00', 'PHARMACIST_APPOINTMENT', 3, 0, 4); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (14, 3, 4, 40.0, '', 'AVAILABLE', '2021-10-20 11:30:00', '2021-10-20 11:00:00', 'DERMATOLOGIST_APPOINTMENT', 1, 0, null); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (15, 3, 18, 500.0, '', 'SCHEDULED', '2021-10-20 12:30:00', '2021-10-20 12:00:00', 'DERMATOLOGIST_APPOINTMENT', 1, 0, 6); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (16, 3, 10, 500.0, '', 'SCHEDULED', '2021-10-21 14:00:00', '2021-10-21 13:30:00', 'DERMATOLOGIST_APPOINTMENT', 1, 0, 5); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (17, 3, 2, 30.0, 'Everything is alright with patient', 'SUCCEEDED', '2021-07-17 10:00', '2021-07-17 08:00', 'DERMATOLOGIST_APPOINTMENT', 2, 0, 6); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (18, 7, 10, 500.0, '', 'SCHEDULED', '2021-09-10 15:30:00', '2021-09-10 15:00:00', 'DERMATOLOGIST_APPOINTMENT', 3, 0, 5); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (19, 7, 10, 500.0, 'Everything is alright with patient', 'SUCCEEDED', '2021-09-10 16:00:00', '2021-09-10 15:30:00', 'DERMATOLOGIST_APPOINTMENT', 3, 0, 5); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (20, 7, 2, 30.0, 'Everything is alright with patient', 'SUCCEEDED', '2021-09-10 16:30:00', '2021-09-10 16:00:00', 'DERMATOLOGIST_APPOINTMENT', 3, 0, 6); INSERT INTO appointments (id, examiner_id, loyalty_points, price, report, status, end_time, start_time, type, pharmacy_id, version, patient_id) values (24, 7, 2, 30.0, '', 'AVAILABLE', '2021-09-10 17:00:00', '2021-09-10 16:30:00', 'DERMATOLOGIST_APPOINTMENT', 3, 0, 6); INSERT INTO therapies(id, description, medicine_id, start_time, end_time) values (1, 'One tablet every 8 hours.', 1,'2021-02-02', '2021-02-05' ); insert into appointments_therapies(appointment_id, therapies_id) values (17,1); INSERT INTO therapies(id, description, medicine_id, start_time, end_time) values (2, 'One tablet every 12 hours', 2,'2021-02-02', '2021-02-05' ); insert into appointments_therapies(appointment_id, therapies_id) values (17,2); INSERT INTO therapies(id, description, medicine_id, start_time, end_time) values (3, 'One tablet every 6 hours.', 1,'2021-02-02', '2021-02-05' ); insert into appointments_therapies(appointment_id, therapies_id) values (5,3); INSERT INTO therapies(id, description, medicine_id, start_time, end_time) values (4, 'One tablet every 7 hours', 2,'2021-02-02', '2021-02-05' ); insert into appointments_therapies(appointment_id, therapies_id) values (5,4); ------------GRADES------------ insert into grades(id, type, patient_id, graded_id, grade) values (1, 'PHARMACIST_GRADE', 6, 10, 2); insert into grades(id, type, patient_id, graded_id, grade) values (2, 'PHARMACIST_GRADE', 5, 10, 3); insert into grades(id, type, patient_id, graded_id, grade) values (3, 'PHARMACIST_GRADE', 4, 10, 5); insert into grades(id, type, patient_id, graded_id, grade) values (4, 'PHARMACIST_GRADE', 4, 2, 4); insert into grades(id, type, patient_id, graded_id, grade) values (5, 'PHARMACIST_GRADE', 5, 2, 5); insert into grades(id, type, patient_id, graded_id, grade) values (6, 'PHARMACIST_GRADE', 6, 2, 4); insert into grades(id, type, patient_id, graded_id, grade) values (7, 'DERMATOLOGIST_GRADE', 6, 3, 5); insert into grades(id, type, patient_id, graded_id, grade) values (8, 'DERMATOLOGIST_GRADE', 5, 3, 5); insert into grades(id, type, patient_id, graded_id, grade) values (9, 'DERMATOLOGIST_GRADE', 4, 3, 4); insert into grades(id, type, patient_id, graded_id, grade) values (10, 'DERMATOLOGIST_GRADE', 5, 7, 3); insert into grades(id, type, patient_id, graded_id, grade) values (11, 'DERMATOLOGIST_GRADE', 4, 7, 4); insert into grades(id, type, patient_id, graded_id, grade) values (12, 'DERMATOLOGIST_GRADE', 6, 7, 5); insert into grades(id, type, patient_id, graded_id, grade) values (13, 'MEDICINE_GRADE', 6, 1, 4); insert into grades(id, type, patient_id, graded_id, grade) values (14, 'MEDICINE_GRADE', 5, 2, 5); insert into grades(id, type, patient_id, graded_id, grade) values (15, 'MEDICINE_GRADE', 4, 3, 3); insert into grades(id, type, patient_id, graded_id, grade) values (16, 'MEDICINE_GRADE', 5, 1, 4); insert into grades(id, type, patient_id, graded_id, grade) values (17, 'MEDICINE_GRADE', 4, 2, 5); insert into grades(id, type, patient_id, graded_id, grade) values (18, 'MEDICINE_GRADE', 6, 3, 4); insert into grades(id, type, patient_id, graded_id, grade) values (25, 'MEDICINE_GRADE', 6, 4, 4); insert into grades(id, type, patient_id, graded_id, grade) values (26, 'MEDICINE_GRADE', 6, 5, 3); insert into grades(id, type, patient_id, graded_id, grade) values (19, 'PHARMACY_GRADE', 6, 1, 5); insert into grades(id, type, patient_id, graded_id, grade) values (20, 'PHARMACY_GRADE', 5, 2, 4); insert into grades(id, type, patient_id, graded_id, grade) values (21, 'PHARMACY_GRADE', 4, 3, 3); insert into grades(id, type, patient_id, graded_id, grade) values (22, 'PHARMACY_GRADE', 4, 1, 4); insert into grades(id, type, patient_id, graded_id, grade) values (23, 'PHARMACY_GRADE', 5, 2, 4); insert into grades(id, type, patient_id, graded_id, grade) values (24, 'PHARMACY_GRADE', 6, 3, 5); ------------------------------
ALTER TABLE ONLY transactions DROP CONSTRAINT IF EXISTS transactions_pkey;
CREATE INDEX IF NOT EXISTS md_cockpit_dategeneral ON public.md_cockpit USING btree (dategeneral); CREATE UNIQUE INDEX IF NOT EXISTS md_cockpit_uc ON public.md_cockpit USING btree (dategeneral, m_product_id, attributeskey);
<filename>db/patches/2410_activity_v2_deprecations.sql /* Changes to create a modern version of the Activity */ COMMENT ON COLUMN activity.duration IS 'DEPRECATED - use activity_duration to document the time taken to perform the activity.'; COMMENT ON COLUMN activity.data_usage IS 'DEPRECATED - A description of the way in which input data were used for this activity.'; COMMENT ON COLUMN activity.notes IS 'DEPRECATED - Other information about this activity which might be useful for traceability or reproducability.'; COMMENT ON COLUMN activity.output_artifacts IS 'Deprecated outside of NCO assessment activities. The final output filenames from the process.'; COMMENT ON COLUMN activity.methodology IS 'The process of creating the resulting object from the input, in the author’s own words and in such a way that another expert partycould reproduce the output.'; COMMENT ON COLUMN activity.visualization_software IS 'Primary visualization software (with version) used.'; COMMENT ON COLUMN activity.start_time IS 'Time bounds used to restrict the input object. Optional, depending on applicability. If equal to end_time, indicates a temporal moment.'; COMMENT ON COLUMN activity.end_time IS 'Time bounds used to restrict the input object. Optional, depending on applicability. If equal to start_time, indicates a temporal moment.';
<reponame>SPbAU-ProgrammingParadigms/materials select * from Country where GovernmentForm in ('Monarchy', 'Republic');
exec arcsql.stop; drop package body arcsql; drop package arcsql; drop function arcsql_version; drop view locked_objects; drop view lockers; drop view name_generator; drop view lock_time; drop table cache; drop table config_settings; drop sequence seq_sql_log_id; drop table sql_snap; drop table sql_log; drop table sql_log_arc; drop table sql_log_active_session_history; drop view sql_snap_view; drop sequence seq_counter_id; drop table arcsql_counter; drop sequence seq_event_id; drop table arcsql_event; drop table audsid_event; drop table arcsql_event_log; drop sequence seq_version_update_id; drop table app_version cascade constraints purge; drop table arcsql_log_type cascade constraints purge; drop sequence seq_arcsql_log_entry; drop table arcsql_log; drop table test_profile cascade constraints purge; drop table app_test cascade constraints purge; drop table contact_group cascade constraints purge; drop table arcsql_alert_priority cascade constraints purge; drop table arcsql_alert cascade constraints purge;
alter table medal_tally drop primary key cascade; drop table medal_tally cascade constraints purge; create table medal_tally ( id number ,ranking number ,country varchar2(125) ,gold number ,silver number ,bronze number ,total number ,constraint medal_tally_pk primary key (id) ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (1, 1, 'Australia', 74, 55, 48, 177 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (2, 19, 'Bahamas', 1, 1, 4, 6 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (3, 35, 'Bangladesh', 0, 0, 1, 1 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (4, 22, 'Botswana', 1, 0, 3, 4 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (5, 26, 'Cameroon', 0, 2, 4, 6 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (6, 4, 'Canada', 26, 17, 33, 76 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (7, 23, 'Cayman Islands', 1, 0, 0, 1 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (8, 12, 'Cyprus', 4, 3, 4, 11 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (9, 3, 'England', 37, 60, 45, 142 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (10, 27, 'Ghana', 0, 1, 3, 4 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (11, 29, 'Guyana', 0, 1, 0, 1 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (12, 2, 'India', 38, 27, 36, 101 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (13, 32, 'Isle of Man', 0, 0, 2, 2 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (14, 16, 'Jamaica', 2, 4, 1, 7 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (15, 6, 'Kenya', 12, 11, 9, 32 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (16, 7, 'Malaysia', 12, 10, 14, 36 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (17, 32, 'Mauritius', 0, 0, 2, 2 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (18, 28, 'Namibia', 0, 1, 2, 3 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (19, 21, 'Nauru', 1, 1, 0, 2 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (20, 11, 'New Zealand', 6, 22, 8, 36 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (21, 9, 'Nigeria', 11, 8, 14, 33 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (22, 13, 'Northern Ireland', 3, 3, 4, 10 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (23, 17, 'Pakistan', 2, 1, 2, 5 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (24, 29, 'Papua New Guinea', 0, 1, 0, 1 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (25, 35, 'Saint Lucia', 0, 0, 1, 1 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (26, 23, 'Saint Vincent and the Grenadines', 1, 0, 0, 1 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (27, 14, 'Samoa', 3, 0, 1, 4 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (28, 10, 'Scotland', 9, 10, 7, 26 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (29, 29, 'Seychelles', 0, 1, 0, 1 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (30, 8, 'Singapore', 11, 11, 9, 31 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (31, 5, 'South Africa', 12, 11, 10, 33 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (32, 20, 'Sri Lanka', 1, 1, 1, 3 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (33, 32, 'Tonga', 0, 0, 2, 2 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (34, 25, 'Trinidad and Tobago', 0, 4, 2, 6 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (35, 18, 'Uganda', 2, 0, 0, 2 ); insert into medal_tally (id,ranking,country,gold, silver,bronze,total) values (36, 15, 'Wales', 2, 7, 10, 19 ); commit;
--Tytuł: Procedura tworzy listę pracowników z podsumowaniem warunków szkodliwych w 1 wierszu --Autor: <NAME> --Update: 13-03-2022 --Version v1.2 /* Skrót do obsługi procedury EXEC dbo.EmpHarmCondPlus */ USE EmployeeMedicalTest GO --Usuń Procedure jeżeli istnieje IF OBJECT_ID ('dbo.EmpHarmCondPlus') IS NOT NULL DROP PROC dbo.EmpHarmCondPlus GO --Tworzenie procedury CREATE PROC dbo.EmpHarmCondPlus AS DECLARE @Tab TABLE ( EmpName nvarchar (30), WorkName nvarchar (30), HarmCondName nvarchar (1000), HarmCondCount INT ); INSERT INTO @Tab(EmpName, WorkName, HarmCondName, HarmCondCount) /*Tabela z raporu dbo.View_EmpHarmCond. Można zastapić zmienną tablicową @Tab odniesieniem do widoku dbo.View_EmpHarmCond W przypadku zmian w strukturze widoku procedura przestanie działać prawidłowo */ SELECT E.Name as EmpName, W.Name as WorkName, HC.Name as HarmCondName, COUNT(*)OVER(PARTITION BY E.Name ORDER BY E.Name) as HarmCondCount FROM dbo.Employee as E JOIN dbo.EmployeeWorkplace as EW ON E.IdEmp = EW.IdEmp JOIN dbo.Workplace as W ON EW.IdWork = W.IdWork JOIN dbo.WorkplaceHarmCond as WHC ON EW.IdWork = WHC.IdWork JOIN dbo.HarmfulConditions as HC ON WHC.IdHC = HC.IdHC; /* Kursor tworzy wiersz końcowy przy każdym pracowniku w którym zapisuje wszystkie warunki szkodliwe przypisane do osoby. Prościej by było to zrobić za pomocą funkcji STRING_AGG, niestety to rozwiązanie jest dostępna od wersji SQL Server 2016, kod pisany na wersji SQL Server 2014 stąd oparcie na kursorze co odbija się na wydajności i czytelności kodu */ DECLARE @Result TABLE ( Id INT IDENTITY PRIMARY KEY, EmpName nvarchar (30), WorkName nvarchar (30), HarmCondName nvarchar (1000), HarmCondCount INT ); DECLARE @EmpName as nvarchar(30), @WorkName as nvarchar (30), @HarmCondName as nvarchar(100), @HarmCondCount as INT, @PrvEmpName as nvarchar(30), @AllHarmCondName as nvarchar(1000), @First as INT; DECLARE C CURSOR FAST_FORWARD FOR SELECT EmpName, WorkName, HarmCondName, HarmCondCount FROM @Tab ORDER BY EmpName, HarmCondName; SET @First = 1 OPEN C; FETCH NEXT FROM C INTO @EmpName, @WorkName, @HarmCondName, @HarmCondCount; SET @PrvEmpName = @EmpName SET @AllHarmCondName = '' WHILE @@FETCH_STATUS = 0 BEGIN IF @First = 0 SET @AllHarmCondName = @AllHarmCondName + ' + ' --znak rozdzielający ELSE SET @First = 0 SET @AllHarmCondName = @AllHarmCondName + @HarmCondName IF @PrvEmpName <> @EmpName BEGIN SET @PrvEmpName = @EmpName SET @AllHarmCondName = @HarmCondName END INSERT INTO @Result VALUES(@EmpName, @WorkName, @AllHarmCondName, @HarmCondCount); FETCH NEXT FROM C INTO @EmpName, @WorkName, @HarmCondName, @HarmCondCount; END CLOSE C; DEALLOCATE C; SET NOCOUNT ON; --Tworzenie raportu z listą pracowników i zbiorczym podsumowaniem wszystkich warunków szkodliwych SELECT R1.EmpName as [Imię i nazwisko], R1.WorkName as Stanowisko, R1.HarmCondName as [Lista warunków szkodliwych], R1.HarmCondCount as [Liczba warunków szkodliwych] FROM @Result as R1 WHERE R1.Id = (SELECT MAX(R2.Id) FROM @Result as R2 WHERE R1.EmpName = R2.EmpName) ORDER BY EmpName, HarmCondName
-- -- scoring support -- CREATE OR REPLACE FUNCTION score(ctid tid) RETURNS float4 PARALLEL UNSAFE LANGUAGE c AS 'MODULE_PATHNAME', 'zdb_score';
<reponame>zixia/17salsa.com -- -- 導出表中的數據 `ecm_regions` -- INSERT INTO `ecm_regions` (region_id, parent_id, region_name, store_id) VALUES (1, 0, '中國', 0), (2, 1, '北京', 0), (3, 1, '天津', 0), (4, 1, '河北', 0), (5, 1, '山西', 0), (6, 1, '內蒙古', 0), (7, 1, '遼寧', 0), (8, 1, '吉林', 0), (9, 1, '黑龍江', 0), (10, 1, '上海', 0), (11, 1, '江蘇', 0), (12, 1, '浙江', 0), (13, 1, '安徽', 0), (14, 1, '福建', 0), (15, 1, '江西', 0), (16, 1, '山東', 0), (17, 1, '河南', 0), (18, 1, '湖北', 0), (19, 1, '湖南', 0), (20, 1, '廣東', 0), (21, 1, '廣西', 0), (22, 1, '海南', 0), (23, 1, '重慶', 0), (24, 1, '四川', 0), (25, 1, '貴州', 0), (26, 1, '雲南', 0), (27, 1, '西藏', 0), (28, 1, '陝西', 0), (29, 1, '甘肅', 0), (30, 1, '青海', 0), (31, 1, '寧夏', 0), (32, 1, '新疆', 0), (33, 1, '香港', 0), (34, 1, '台灣', 0); -- -- 導出表中的數據 `ecm_config_item` -- INSERT INTO `ecm_config_item` (`code`, `group_code`, `required`, `type`, `params`, `default_value`, `sort_order`, `owner`) VALUES ('mall_language', 'mall_conf', 0, 'hidden', 'languages', 'utf-8', 1, 'mall'), ('mall_time_zone', 'mall_conf', 1, 'time_zone', '', '8', 2, 'mall'), ('mall_editor_type', 'mall_conf', 1, 'radio', '0=BBCode,1=HTML', '0', 3, 'mall'), ('mall_version', 'mall_conf', 1, 'hidden', '', '3', 3, 'mall'), ('mall_time_format_simple', 'mall_conf', 1, 'string', '^[^\\<|\\>]+$', 'd/m/y', 3, 'mall'), ('mall_time_format_complete', 'mall_conf', 1, 'string', '^[^\\<|\\>]+$', 'Y-m-d H:i:s', 4, 'mall'), ('mall_url_rewrite', 'mall_conf', 0, 'radio', '0=off,1=on', '0', 5, 'mall'), ('mall_max_file', 'mall_conf', 0, 'int', '0,*', '300', 7, 'mall'), ('mall_cache_life', 'mall_conf', 0, 'int', '0,*', '1800', 8, 'mall'), ('mall_goods_default_img', 'mall_conf', 0, 'file', 'image', './data/common/goods_default_img.gif', 10, 'mall'), ('mall_thumb_quality', 'mall_conf', 0, 'int', '60,100', '85', 11, 'mall'), ('mall_name', 'mall_base', 1, 'string', '^.{0,50}$', 'ECMall', 1, 'mall'), ('mall_title', 'mall_base', 1, 'string', '^[^\\<|\\>]+$', 'ECMall', 2, 'mall'), ('mall_keywords', 'mall_base', 0, 'string', '^[^\\<|\\>]+$', '', 3, 'mall'), ('mall_description', 'mall_base', 0, 'text', '', '', 3, 'mall'), ('mall_copyright', 'mall_base', 0, 'string', '', '', 4, 'mall'), ('mall_logo', 'mall_base', 1, 'file', 'image', './data/common/logo.gif', 5, 'mall'), ('mall_icp_number', 'mall_base', 0, 'string', '^[^\\<|\\>]+$', '', 6, 'mall'), ('mall_region_id', 'mall_base', 0, 'region', '', '', 8, 'mall'), ('mall_address', 'mall_base', 0, 'string', '^.{0,200}$', '', 9, 'mall'), ('mall_post_code', 'mall_base', 0, 'post_code', '', '', 10, 'mall'), ('mall_tel_num', 'mall_base', 0, 'tel_num', '', '', 11, 'mall'), ('mall_email', 'mall_base', 0, 'email', '', '', 12, 'mall'), ('mall_page_size', 'mall_base', 1, 'int', '1,*', '12', 13, 'mall'), ('mall_status', 'mall_base', 0, 'radio', '0=off,1=on', '', 14, 'mall'), ('mall_closed_reason', 'mall_base', 0, 'text', '', '商城維護中,暫時關閉,請稍後訪問', 15, 'mall'), ('mall_email_type', 'mall_email', 0, 'radio', 'mail,smtp', 'mail', 1, 'mall'), ('mall_email_host', 'mall_email', 0, 'string', '^.{0,50}$', 'localhost', 2, 'mall'), ('mall_email_port', 'mall_email', 0, 'int', '0,*', '25', 3, 'mall'), ('mall_email_id', 'mall_email', 0, 'string', '^[^\<|\>]+$', '', 5, 'mall'), ('mall_email_pass', 'mall_email', 0, 'password', '', '', 6, 'mall'), ('mall_email_addr', 'mall_email', 0, 'email', '', '', 4, 'mall'), ('mall_test_email', 'mall_email', 0, 'email', 'test', '', 8, 'mall'), ('mall_captcha_status', 'mall_captcha', 0, 'checkbox', '0=login,1=regist,2=comment,3=admin', '14', 1, 'mall'), ('mall_captcha_error_login', 'mall_captcha', 0, 'int', '0,*', '5', 2, 'mall'), ('mall_allow_guest_buy', 'mall_conf', 0, 'radio', '0=off,1=on', '1', 20, 'mall'), ('mall_storeapply', 'mall_store', 0, 'radio', '0=off,1=on', '1', 1, 'mall'), ('mall_need_paper', 'mall_store', 0, 'radio', '0=off,1=on', '1', 2, 'mall'), ('mall_store_free_days', 'mall_store', 0, 'int', '0,*', '0', 3, 'mall'), ('mall_default_allowed_goods', 'mall_store', 0, 'int', '0,*', '0', 4, 'mall'), ('mall_default_allowed_file', 'mall_store', 0, 'int', '0,*', '0', 5, 'mall'), ('mall_allow_comment', 'mall_conf', 1, 'radio', '0=off,1=on', '1', 23, 'mall'), ('mall_display_volumn', 'mall_conf', 1, 'radio', '0=off,1=on', '1', 24, 'mall'), ('mall_hot_search', 'mall_base', 0, 'string', '', '', 15, 'mall'), ('mall_max_address_num', 'mall_conf', 1, 'int', '1,20', '5', 6, 'mall'), ('mall_skin', 'mall_conf', 0, 'hidden', '', 'default', 0, 'mall'), ('mall_site_id', 'mall_conf', 0, 'hidden', '', '0', 0, 'mall'), ('mall_cycle_image', 'mall_conf', 0, 'hidden', '', '', 0, 'mall'), ('mall_min_goods_amount', 'mall_credit', 1, 'int', '0,*', 1, 1, 'mall'), ('mall_store_repeat_limit', 'mall_credit', 1, 'int', '0,*', 5, 2, 'mall'), ('mall_goods_repeat_limit', 'mall_credit', 1, 'int', '0,*', 10, 3, 'mall'), ('mall_max_goods_amount', 'mall_credit', 1, 'int', '1,*', 1000, 4, 'mall'), ('mall_value_of_heart', 'mall_credit', 1, 'int', '1,*', 10, 5, 'mall'), ('mall_auto_evaluation_value', 'mall_credit', '1', 'radio', 'order_evaluation_poor,order_evaluation_common,order_evaluation_good', 'order_evaluation_good', '6', 'mall'), ('mall_auto_allow', 'mall_conf', 1, 'radio', '0=no,1=all,2=certified', 0, 0, 'mall'), ('store_intro', 'store_intro', 0, 'html', '', '', 1, 'store'), ('store_title', 'store_conf', 1, 'string', '^[^\\<|\\>]+$', '我的店舖', 2, 'store'), ('store_logo', 'store_conf', 1, 'file', 'image', '', 3, 'store'), ('store_keywords', 'store_conf', 0, 'string', '^[^\\<|\\>]+$', '', 4, 'store'), ('store_porto_arrived_pay', 'store_conf', 0, 'radio', '0=off,1=on', '0', 9, 'store'), ('store_page_size', 'store_conf', 1, 'int', '1,*', '12', 18, 'store'), ('store_status', 'store_conf', 0, 'radio', '0=off,1=on', '1', 19, 'store'), ('store_inv_enable', 'store_conf', 0, 'radio', '0=off,1=on', '0', 5, 'store'), ('store_tax_rate', 'store_conf', 1, 'float', '0,1', '0', 6, 'store'), ('store_inv_content', 'store_conf', 0, 'text', '', '', 7, 'store'), ('store_feed_default_status', 'store_conf', 0, 'radio', '0=off,1=on', '1', 14, 'store'), ('store_skin', 'store_conf', 0, 'hidden', '', 'default', 0, 'store'), ('store_qq', 'store_conf', '0', 'string', '^\\d{5,15}$', '', '4', 'store'), ('store_ww', 'store_conf', '0', 'string', '', '', '4', 'store'), ('store_msn', 'store_conf', '0', 'email', '', '', '4', 'store'); -- -- 導出表中的數據 `ecm_config_value` -- INSERT INTO `ecm_config_value` (`store_id`, `code`, `value`) VALUES (0, 'mall_language', ''), (0, 'mall_time_zone', '8'), (0, 'mall_editor_type', '0'), (0, 'mall_version', '1.0.0'), (0, 'mall_time_format_simple', 'Y-m-d'), (0, 'mall_time_format_complete', 'Y-m-d H:i:s'), (0, 'mall_url_rewrite', '0'), (0, 'mall_max_file', '300'), (0, 'mall_cache_life', '1800'), (0, 'mall_store_apply', '0'), (0, 'mall_goods_default_img', './data/common/default_img.jpg'), (0, 'mall_thumb_quality', '85'), (0, 'mall_name', '您的網站名稱'), (0, 'mall_title', '您的網站標題'), (0, 'mall_keywords', ''), (0, 'mall_description', '這是一個用ECMall架設的網上商城'), (0, 'mall_copyright', '&copy; 2008 Company Name, All rights reserved.'), (0, 'mall_logo', ''), (0, 'mall_icp_number', ''), (0, 'mall_region_id', ''), (0, 'mall_address', ''), (0, 'mall_post_code', ''), (0, 'mall_tel_num', ''), (0, 'mall_email', ''), (0, 'mall_page_size', '12'), (0, 'mall_status', '1'), (0, 'mall_closed_reason', '商城維護中,暫時關閉,請稍候訪問。'), (0, 'mall_email_type', 'smtp'), (0, 'mall_email_host', ''), (0, 'mall_email_port', '25'), (0, 'mall_email_id', ''), (0, 'mall_email_pass', ''), (0, 'mall_email_addr', ''), (0, 'mall_test_email', ''), (0, 'mall_captcha_status', '15'), (0, 'mall_captcha_error_login', '3'), (0, 'mall_captcha_width', '200'), (0, 'mall_captcha_height', '50'), (0, 'mall_allow_guest_buy', '0'), (0, 'mall_storeapply', 1), (0, 'mall_need_paper', 1), (0, 'mall_store_free_days', 0), (0, 'mall_default_allowed_goods', 100), (0, 'mall_default_allowed_file', 500), (0, 'mall_hot_search', ''), (0, 'mall_max_address_num', '3'), (0, 'mall_skin', 'default'), (0, 'mall_site_id', '0'), (0, 'mall_min_goods_amount', 1), (0, 'mall_store_repeat_limit', 5), (0, 'mall_goods_repeat_limit', 10), (0, 'mall_max_goods_amount', 1000), (0, 'mall_value_of_heart', 10), (0, 'mall_auto_evaluation_value', 'order_evaluation_good'), (0, 'mall_auto_allow', 1), (0, 'mall_cycle_image', '<bcaster><item id="1" link="http://www.shopex.cn" item_url="data/images/default.jpg"></item></bcaster>'), (0, 'mall_allow_comment', 1), (0, 'mall_display_volumn', 1); -- -- 導出表中的數據 `ecm_mail_templates` -- INSERT INTO `ecm_mail_templates` (`template_id`, `template_code`, `subject`, `content`) VALUES (1, 'send_coupon', '{$store_name}送給您的優惠券', '{$user_name},您好:\r\n  {$store_name}通過{$mall_name}贈送給您一個價值{$coupon_value}的優惠券。\r\n  優惠券號碼為:{$coupon_sn} 請記住這個號碼,該優惠券可使用{$max_times}次,請在{$start_time}至{$end_time}期間使用,並且訂單中包含的商品金額大於{$min_amount}的訂單才可使用,點擊下面的鏈接前往[url={$store_url}]{$store_name}[/url]選購您喜歡的商品。 \r\n[url={$store_url}]{$store_url}[/url]\r\n                           {$send_date}'), (2, 'add_admin', '恭喜您升為{$store_name}管理員', '恭喜您!\r\n店鋪[url={$store_url}]{$store_name}[/url]要把您加為管理員,您是否接受,若您接受,請點擊以下地址接受並成為店舖的管理員\r\n[url={$accept_url}]接受地址:{$accept_url}[/url]\r\n提示:若您接受並成為店舖的管理員後,您將失去開獨立開店的機會,除非您不再是任何店舖的管理員\r\n{$store_name}的管理地址: {$admin_url} ') , (3, 'shipping_notice', '賣家{$boss}已經給你發貨了,請注意查收', '親愛的{$order.consignee}。你好!\r\n您的訂單{$order. order_sn}已於{$send_date}按照您預定的配送方式給您發貨了。\r\n給您的發貨單號是{$order.invoice_no}。 \r\n在您收到貨物之後請點擊下面的鏈接確認您已經收到貨物:\r\n[url={$confirm_url}]{$confirm_url} [/url]\r\n警告:若您還沒有收到貨,請不要點擊確認收貨。若賣家發貨後14天您還沒有確認收貨,系統將自動為您收貨\r\n再次感謝您對我們的支持。歡迎您的再次光臨。 \r\n\r\n {$boss}\r\n{$send_date}\r\n本郵件為ECMall系統自動發出,您無需回复'), (4, 'order_cancel', '{$boss}取消了您的訂單', '親愛的{$order.consignee},你好! \r\n您的編號為:{$order.order_sn}的訂單已取消。\r\n{$boss}\r\n{$send_date}\r\n\r\n本郵件為ECMall系統自動發出'), (5, 'order_acceptted', '{$boss}接受了您的訂單', '親愛的{$order.consignee},你好! \r\n\r\n我們已經收到您於{$order. add_time|date:Ymd H:i}提交的訂單,該訂單編號為:{$order.order_sn}請記住這個編號以便日後的查詢。\r\n\r\n{$boss}\r\n {$sent_date}\r\n\r\n\r\n'), (6, 'get_pwd', '取回密碼', '您好!{$cur_date}申請了密碼取回。\r\n點擊:[url={$repwd_url}]點{$repwd_url}[/url]重置您的密碼。\r\n此鏈接有效期至:{$expire_date}\r\n請您盡快點擊上面的重置密碼鏈接重置您的密碼'), (7, 'new_order_notify', '{$mall_name}:您的訂單信息', '親愛的{$order.consignee}:\r\n你好!\r\n您於{$order.add_time|date: Ymd H:i}在{$mall_name}提交了訂單。\r\n以下是該訂單的簡要信息,供您查詢\r\n訂單編號:{$order.order_sn}\r \n收貨人信息\r\n姓名:{$order.consignee}\r\n地址:[{$order.region}] {$order.address}\r\n郵編:{$order.zipcode}\r\nEMail: {$order.email}\r\n手機:{$order.mobile_phone}\r\n電話:{$order.home_phone}\r\n 辦公電話:{$order.office_phone}\r\n最佳配送時間:{$order.best_time}\r\n標誌建築: {$order.sign_building}\r\n配送支付信息\r\n配送方式:{$order.shipping_name}\r\n支付方式: {$order.pay_name}\r\n請記住訂單編號以便日後的查詢\r\n若以上信息有誤,請及時聯繫賣家解決,您可以通過登錄賣家的店舖首頁找到該賣家的聯繫方式,賣家的店舖首頁是:[url={$store_url}]{$boss}:{$store_url}[/url]\r\n請及時支付,支付地址是[url={$pay_url}]{$pay_url}[/url]\r\n{$boss}\r\n{$sent_date}'), (8, 'seller_new_order_notify', '{$mall_name}:{$order.consignee}在您的店鋪下了一個新訂單', '親愛的{$boss}:\r\n你好!\r\n您於{$order.add_time|date:Ymd H:i}收到了由{$order.consignee}提交的訂單。\r\n以下是該訂單的簡要信息,供您查詢\r\n訂單編號:{ $order.order_sn}\r\n收貨人信息\r\n姓名:{$order.consignee}\r\n地址: [{$order.region}] {$order.address}\r\n郵編:{$order.zipcode}\r\nEMail:{$order.email}\r\n手機: {$order.mobile_phone}\r\n電話:{$order.home_phone}\r\n辦公電話: {$order.office_phone}\r\n最佳配送時間:{$order.best_time}\r\n標誌建築: {$order.sign_building}\r\n配送支付信息\r\n配送方式:{$ order.shipping_name}\r\n支付方式:{$order.pay_name}\r\n請及時根據處理該訂單,[url= {$parse_order_url}]點擊我馬上處理:{$parse_order_url}[/url]\ r\n登錄您的店舖管理後台[url={$store_admin_url}]{$store_admin_url}[/url]\r \n{$mall_name}{$sent_date}'), (9, 'evaluation_invalid_to_buyer', '{$mall_name}:您給商家{$seller}的評價無效', '親愛的{$buyer}:\r\n 您給您于{$order.add_time|date}下的訂單(訂單號:{$order.order_sn})的評價被視為無效的評價,因此該評價將不對商家{$seller}的信用積分造成影響。\r\n 具體的原因為:{$reason|escape}\r\n\r\n 點擊以下鏈接訪問{$mall_name}\r\n [url={$site_url}]{$site_url}[/url]\r\n\r\n{$sent_date}'), (10, 'evaluation_invalid_to_seller', '{$mall_name}:您給買家{$buyer}的評價無效', '親愛的{$seller}:\r\n 您給{$buyer}于{$order.add_time|date}在您店鋪下的訂單(訂單號:{$order.order_sn})的評價被視為無效的評價,因此該評價將不對該買家的信用積分造成影響。\r\n 具體的原因為:{$reason|escape}\r\n\r\n 點擊以下鏈接訪問{$mall_name}\r\n [url={$site_url}]{$site_url}[/url]\r\n\r\n{$sent_date}'), (11, 'evaluation_invalid_from_seller', '{$mall_name}:買家給您的評價已無效', '親愛的{$seller}:\r\n {$order.user_name|escape}給您的交易(訂單號:{$order.order_sn})的評價已被視為無效,因此這次評價將不會給您的信用積分造成影響\r\n 具體原因:{$reason|escape}\r\n\r\n\r\n 點擊以下鏈接訪問{$mall_name}\r\n [url={$site_url}]{$site_url}[/url]\r\n\r\n{$sent_date}'), (12, 'evaluation_invalid_from_buyer', '{$mall_name}:商家給您的評價已無效', '親愛的{$buyer}:\r\n 商家{$boss}給您的交易(訂單號:{$order.order_sn})的評價已被視為無效,因此這次評價將不會給您的信用積分造成影響\r\n 具體原因:{$reason|escape}\r\n\r\n\r\n 點擊以下鏈接訪問{$mall_name}\r\n [url={$site_url}]{$site_url}[/url]\r\n\r\n{$sent_date}'), (13, 'to_seller_evaluation_notify', '{$mall_name}:與您交易的買家{$buyer}給您做了評價', '親愛的{$seller}:\r\n 買家{$buyer}給與您的交易(訂單號:{$order.order_sn})做了評價,請盡快給對方評價。\r\n \r\n 點擊以下鏈接管理訂單\r\n [url={$site_url}/admin.php?app=order&act=change_status&order_id={$order.order_id}]{$site_url}/admin.php?app=order&act=change_status&order_id={$order.order_id}[/url]\r\n\r\n 點擊以下鏈接訪問商城\r\n [url={$site_url}]{$site_url}[/url]\r\n{$sent_date}'), (14, 'to_buyer_evaluation_notify', '{$mall_name}:與您交易的賣家{$seller}給您做了評價', '親愛的{$buyer}:\r\n 賣家{$seller}給與您的交易(訂單號:{$order.order_sn})做了評價,謝謝您的惠顧。\r\n\r\n 點擊以下鏈接查看訂單\r\n [url={$site_url}/index.php?app=member&act=order_detail&id={$order.order_id}]{$site_url}/index.php?app=member&act=order_detail&id={$order.order_id}[/url]\r\n\r\n 點擊以下鏈接訪問商城\r\n [url={$site_url}]{$site_url}[/url]\r\n{$sent_date}'), (15, 'relet_remind', '您的店鋪即將到期', '親愛的{$user_name}\r\n\r\n您的店鋪將於{$days_left}日後到期,請您及時續費。 \r\n\r\n\r\n {$mall_name} {$site_url}\r\n {$sent_date}\r\n'); -- -- 導出表中的數據 `ecm_article_cate` -- INSERT INTO `ecm_article_cate` (`cate_id`, `store_id`, `cate_name`, `parent_id`, `keywords`, `sort_order`, `editable`) VALUES (1, 0, '商城幫助', 0, '', 0, 0), (2, 0, '商城快訊', 0, '', 0, 0); -- -- 導出表中的數據 `ecm_partner` -- INSERT INTO `ecm_partner` VALUES (1, 0, 'Shopex', 'http://www.shopex.cn', '', 0), (2, 0, 'ECShop', 'http://www.ecshop.com', '', 0); -- -- 導出表中的數據 `ecm_templates` -- INSERT INTO `ecm_templates` (`store_id`, `config`, `filename`, `pagename`, `hash_code`) VALUES (0, 'a:6:{s:7:"region1";a:2:{s:8:"denyEdit";i:1;s:8:"children";a:2:{s:11:"page_header";a:2:{s:2:"id";s:11:"page_header";s:3:"src";s:37:"themes/mall/resource/page_header.html";}s:11:"search_form";a:2:{s:2:"id";s:11:"search_form";s:3:"src";s:37:"themes/mall/resource/search_form.html";}}}s:7:"region4";a:1:{s:8:"children";a:5:{s:14:"goods_category";a:3:{s:2:"id";s:14:"goods_category";s:3:"src";s:40:"themes/mall/resource/goods_category.html";s:6:"parent";s:7:"region4";}s:17:"recommended_store";a:3:{s:2:"id";s:17:"recommended_store";s:3:"src";s:43:"themes/mall/resource/recommended_store.html";s:6:"parent";s:7:"region4";}s:17:"recommended_brand";a:3:{s:2:"id";s:17:"recommended_brand";s:3:"src";s:43:"themes/mall/resource/recommended_brand.html";s:6:"parent";s:7:"region4";}s:11:"latest_sold";a:3:{s:2:"id";s:11:"latest_sold";s:3:"src";s:37:"themes/mall/resource/latest_sold.html";s:6:"parent";s:7:"region4";}s:7:"partner";a:3:{s:2:"id";s:7:"partner";s:3:"src";s:33:"themes/mall/resource/partner.html";s:6:"parent";s:7:"region4";}}}s:7:"region6";a:1:{s:8:"children";a:1:{s:10:"cycleimage";a:3:{s:2:"id";s:10:"cycleimage";s:3:"src";s:36:"themes/mall/resource/cycleimage.html";s:6:"parent";s:7:"region6";}}}s:7:"region7";a:1:{s:8:"children";a:1:{s:16:"latest_site_news";a:3:{s:2:"id";s:16:"latest_site_news";s:3:"src";s:42:"themes/mall/resource/latest_site_news.html";s:6:"parent";s:7:"region7";}}}s:7:"region8";a:1:{s:8:"children";a:4:{s:9:"group_buy";a:3:{s:2:"id";s:9:"group_buy";s:3:"src";s:35:"themes/mall/resource/group_buy.html";s:6:"parent";s:7:"region8";}s:4:"cm_2";a:6:{s:2:"id";s:4:"cm_2";s:5:"mtype";s:2:"cm";s:4:"type";s:1:"0";s:4:"name";s:11:"<NAME>";s:8:"store_id";s:1:"0";s:4:"conf";a:10:{s:2:"ic";i:4;s:2:"wc";i:4;s:2:"hc";i:8;s:1:"c";i:2;s:4:"tbgc";s:0:"";s:3:"tfc";s:0:"";s:4:"cbgc";s:0:"";s:3:"cfc";s:0:"";s:4:"bbgc";s:0:"";s:3:"bfc";s:0:"";}}s:4:"cm_4";a:6:{s:2:"id";s:4:"cm_4";s:5:"mtype";s:2:"cm";s:4:"type";s:1:"0";s:4:"name";s:14:"Digital Camera";s:8:"store_id";s:1:"0";s:4:"conf";a:10:{s:2:"ic";i:4;s:2:"wc";i:4;s:2:"hc";i:8;s:1:"c";i:28;s:4:"tbgc";s:0:"";s:3:"tfc";s:0:"";s:4:"cbgc";s:0:"";s:3:"cfc";s:0:"";s:4:"bbgc";s:0:"";s:3:"bfc";s:0:"";}}s:4:"cm_1";a:6:{s:2:"id";s:4:"cm_1";s:5:"mtype";s:2:"cm";s:4:"type";s:1:"0";s:4:"name";s:6:"Mobile";s:8:"store_id";s:1:"0";s:4:"conf";a:10:{s:2:"ic";i:4;s:2:"wc";i:4;s:2:"hc";i:8;s:1:"c";i:24;s:4:"tbgc";s:0:"";s:3:"tfc";s:0:"";s:4:"cbgc";s:0:"";s:3:"cfc";s:0:"";s:4:"bbgc";s:0:"";s:3:"bfc";s:0:"";}}}}s:7:"region3";a:2:{s:8:"denyEdit";i:1;s:8:"children";a:1:{s:11:"page_footer";a:2:{s:2:"id";s:11:"page_footer";s:3:"src";s:37:"themes/mall/resource/page_footer.html";}}}}', 'default.layout', 'homepage', '527e4d037cdf839f58c9720fb85ffc95'); -- -- 導出表中的數據 `ecm_custom_modules` -- INSERT INTO `ecm_custom_modules` (`id`, `name`, `type`, `config`) VALUES (1, '手機', 0, 'a:10:{s:1:"c";i:24;s:4:"tbgc";s:0:"";s:3:"tfc";s:0:"";s:2:"ic";s:1:"4";s:2:"wc";s:1:"4";s:2:"hc";s:2:"10";s:4:"cbgc";s:0:"";s:3:"cfc";s:0:"";s:4:"bbgc";s:0:"";s:3:"bfc";s:0:"";}'), (2, '女裝', 0, 'a:10:{s:2:"ic";s:1:"4";s:2:"wc";s:1:"4";s:2:"hc";s:2:"10";s:1:"c";i:2;s:4:"tbgc";s:0:"";s:3:"tfc";s:0:"";s:4:"cbgc";s:0:"";s:3:"cfc";s:0:"";s:4:"bbgc";s:0:"";s:3:"bfc";s:0:"";}'), (4, '數碼相機', 0, 'a:10:{s:2:"ic";s:1:"4";s:2:"wc";s:1:"4";s:2:"hc";s:2:"10";s:1:"c";i:28;s:4:"tbgc";s:0:"";s:3:"tfc";s:0:"";s:4:"cbgc";s:0:"";s:3:"cfc";s:0:"";s:4:"bbgc";s:0:"";s:3:"bfc";s:0:"";}'); -- -- 導出表中的數據 `ecm_crontab` -- INSERT INTO `ecm_crontab` (`task_name`, `plan_time`, `run_time`) VALUES ('auto_order_handle', 0, 0), ('auto_store_handle', 0, 0), ('auto_send_mail', 0, 0);
print ' Generating template dynamic view triggers...' IF OBJECT_ID('[orm_meta].[generate_template_view_triggers]', 'P') IS NOT NULL DROP PROCEDURE [orm_meta].[generate_template_view_triggers] go create procedure [orm_meta].[generate_template_view_triggers] @template_guid uniqueidentifier as begin set nocount on; declare @string_columns nvarchar(max) , @integer_columns nvarchar(max) , @decimal_columns nvarchar(max) , @datetime_columns nvarchar(max) , @instance_columns nvarchar(max) , @action_check nvarchar(20) , @delete_trigger_sql nvarchar(max) , @update_trigger_sql nvarchar(max) , @update_merge_template nvarchar(max) , @update_merge nvarchar(max) , @insert_trigger_sql nvarchar(max) , @insert_merge_template nvarchar(max) , @insert_merge nvarchar(max) , @template_name nvarchar(max) , @template_name_quoted nvarchar(max) , @template_name_unquoted nvarchar(max) , @template_name_sanitized nvarchar(max) set @template_name = (select top 1 name from [orm_meta].[templates] where template_guid = @template_guid) set @template_name_quoted = quotename(@template_name) set @template_name_unquoted = substring(@template_name_quoted, 2,len(@template_name_quoted)-2) -- remove the brackets set @template_name_sanitized = orm_meta.sanitize_string(@template_name_quoted) set @string_columns = ( select quotename(name) + ',' from [orm_meta].[properties] as p where p.datatype_guid = 0x00000000000000000000000000000001 and (p.is_extended is NULL or p.is_extended = 0) and p.template_guid = @template_guid for xml path('')) if len(@string_columns) > 1 set @string_columns = substring(@string_columns,1, len(@string_columns)-1) else set @string_columns = '' set @integer_columns = ( select quotename(name) + ',' from [orm_meta].[properties] as p where p.datatype_guid = 0x00000000000000000000000000000002 and (p.is_extended is NULL or p.is_extended = 0) and p.template_guid = @template_guid for xml path('')) if len(@integer_columns) > 1 set @integer_columns = substring(@integer_columns,1, len(@integer_columns)-1) else set @integer_columns = '' set @decimal_columns = ( select quotename(name) + ',' from [orm_meta].[properties] as p where p.datatype_guid = 0x00000000000000000000000000000003 and (p.is_extended is NULL or p.is_extended = 0) and p.template_guid = @template_guid for xml path('')) if len(@decimal_columns) > 1 set @decimal_columns = substring(@decimal_columns,1, len(@decimal_columns)-1) else set @decimal_columns = '' set @datetime_columns = ( select quotename(name) + ',' from [orm_meta].[properties] as p where p.datatype_guid = 0x00000000000000000000000000000004 and (p.is_extended is NULL or p.is_extended = 0) and p.template_guid = @template_guid for xml path('')) if len(@datetime_columns) > 1 set @datetime_columns = substring(@datetime_columns,1, len(@datetime_columns)-1) else set @datetime_columns = '' set @instance_columns = ( select quotename(name) + ',' from [orm_meta].[properties] as p where p.datatype_guid > 0x00000000000000000000000000000004 and (p.is_extended is NULL or p.is_extended = 0) and p.template_guid = @template_guid for xml path('')) if len(@instance_columns) > 1 set @instance_columns = substring(@instance_columns,1, len(@instance_columns)-1) else set @instance_columns = '' -- delete trigger -- @@@_ACTION_CHECK_@@@ -- @@@_META_TEMPLATE_NAME_@@@ -- @@@_META_TEMPLATE_GUID_@@@ IF OBJECT_ID('trigger_orm_meta_view_' + @template_name_sanitized + '_delete', 'TR') IS NOT NULL set @action_check = 'alter' else set @action_check = 'create' set @delete_trigger_sql = ' @@@_ACTION_CHECK_@@@ trigger trigger_orm_meta_view_@@@_META_TEMPLATE_NAME_SANITIZED_@@@_delete on [dbo].@@@_META_TEMPLATE_NAME_@@@ instead of delete as begin declare @template_guid uniqueidentifier set @template_guid = ''@@@_META_TEMPLATE_GUID_@@@'' delete omi from [orm_meta].[instances] as omi inner join deleted as d on d.Instance_guid = omi.instance_guid end ' set @delete_trigger_sql = replace(@delete_trigger_sql, '@@@_ACTION_CHECK_@@@', @action_check) set @delete_trigger_sql = replace(@delete_trigger_sql, '@@@_META_TEMPLATE_NAME_@@@', @template_name_quoted) set @delete_trigger_sql = replace(@delete_trigger_sql, '@@@_META_TEMPLATE_NAME_SANITIZED_@@@', @template_name_sanitized) set @delete_trigger_sql = replace(@delete_trigger_sql, '@@@_META_TEMPLATE_GUID_@@@', @template_guid) -- update trigger -- @@@_ACTION_CHECK_@@@ -- @@@_META_TEMPLATE_NAME_@@@ -- @@@_META_TEMPLATE_NAME_UNQUOTED_@@@ -- @@@_META_TEMPLATE_GUID_@@@ IF OBJECT_ID('trigger_orm_meta_view_' + @template_name_sanitized + '_update', 'TR') IS NOT NULL set @action_check = 'alter' else set @action_check = 'create' set @update_trigger_sql = ' @@@_ACTION_CHECK_@@@ trigger trigger_orm_meta_view_@@@_META_TEMPLATE_NAME_SANITIZED_@@@_update on [dbo].@@@_META_TEMPLATE_NAME_@@@ instead of update as begin declare @template_guid uniqueidentifier set @template_guid = ''@@@_META_TEMPLATE_GUID_@@@'' -- This will be useful later on for smarter filtering declare @updated_columns table (column_name varchar(100), property_guid uniqueidentifier) insert into @updated_columns (column_name, property_guid) select ducb.COLUMN_NAME, p.property_guid from [orm_meta].[decode_updated_columns_bitmask]( columns_updated(), ''@@@_META_TEMPLATE_NAME_UNQUOTED_@@@'' ) as ducb inner join [orm_meta].[properties] as p on p.name = ducb.COLUMN_NAME where p.template_guid = @template_guid if (update(instance_guid)) begin rollback transaction raiserror(''The instance id and guid can not be written (for internal use only). Simply remove it from the update statement.'', 16, 5) return end -- fix the instance names before doing anything else if (columns_updated() & 1) = 1 begin update omi set omi.name = ins.instance_name from [orm_meta].[instances] as omi inner join inserted as ins on omi.instance_guid = ins.instance_guid end -- Rotate the table to prep for merging into the values tables -- Note we will need an unpivot for each of the four main types ' set @update_trigger_sql = replace(@update_trigger_sql,'@@@_ACTION_CHECK_@@@', @action_check) set @update_trigger_sql = replace(@update_trigger_sql, '@@@_META_TEMPLATE_NAME_@@@', @template_name_quoted) set @update_trigger_sql = replace(@update_trigger_sql, '@@@_META_TEMPLATE_NAME_UNQUOTED_@@@', @template_name_unquoted) set @update_trigger_sql = replace(@update_trigger_sql, '@@@_META_TEMPLATE_NAME_SANITIZED_@@@', @template_name_sanitized) set @update_trigger_sql = replace(@update_trigger_sql,'@@@_META_TEMPLATE_GUID_@@@', @template_guid) set @update_merge_template = ' ------------------------------------ -- @@@_BASE_TYPE_@@@ ------------------------------------ ;with updated_values as ( select instance_name , property_name , value , instances.instance_guid , properties.property_guid from inserted unpivot ( value for property_name in (@@@_TYPE_COLUMNS_@@@) ) unpivoted inner join [orm_meta].[properties] as properties on unpivoted.property_name = properties.name inner join [orm_meta].[instances] as instances on unpivoted.Instance_name = instances.name where properties.template_guid = @template_guid and properties.datatype_guid @@@_BASE_DATATYPE_GUID_FILTER_@@@ and instances.template_guid = @template_guid ) -- UNPIVOT will not include the NULLs, so we need to add them back , possible_values as ( select NULL as value , i.instance_guid , uc.property_guid from inserted as i cross join @updated_columns as uc ) , update_set as ( select uv.value , pv.instance_guid , pv.property_guid from possible_values as pv left join updated_values as uv on pv.instance_guid = uv.instance_guid and pv.property_guid = uv.property_guid ) merge into [orm_meta].[values_@@@_BASE_TYPE_@@@] as d using update_set as s on d.instance_guid = s.instance_guid and d.property_guid = s.property_guid when not matched and (s.value is not null) then insert ( instance_guid, property_guid, value) values (s.instance_guid, s.property_guid, s.value) when matched and (s.value is null) then delete when matched and (not s.value is null) then update set d.value = s.value ; ' -- string if @string_columns <> '' begin set @update_merge = replace(@update_merge_template,'@@@_BASE_TYPE_@@@', 'string') set @update_merge = replace(@update_merge,'@@@_TYPE_COLUMNS_@@@', @string_columns) set @update_merge = replace(@update_merge,'@@@_BASE_DATATYPE_GUID_FILTER_@@@', ' = 0x00000000000000000000000000000001') set @update_trigger_sql = @update_trigger_sql + @update_merge end -- integers if @integer_columns <> '' begin set @update_merge = replace(@update_merge_template,'@@@_BASE_TYPE_@@@', 'integer') set @update_merge = replace(@update_merge,'@@@_TYPE_COLUMNS_@@@', @integer_columns) set @update_merge = replace(@update_merge,'@@@_BASE_DATATYPE_GUID_FILTER_@@@', ' = 0x00000000000000000000000000000002') set @update_trigger_sql = @update_trigger_sql + @update_merge end -- decimals if @decimal_columns <> '' begin set @update_merge = replace(@update_merge_template,'@@@_BASE_TYPE_@@@', 'decimal') set @update_merge = replace(@update_merge,'@@@_TYPE_COLUMNS_@@@', @decimal_columns) set @update_merge = replace(@update_merge,'@@@_BASE_DATATYPE_GUID_FILTER_@@@', ' = 0x00000000000000000000000000000003') set @update_trigger_sql = @update_trigger_sql + @update_merge end -- datetime if @datetime_columns <> '' begin set @update_merge = replace(@update_merge_template,'@@@_BASE_TYPE_@@@', 'datetime') set @update_merge = replace(@update_merge,'@@@_TYPE_COLUMNS_@@@', @datetime_columns) set @update_merge = replace(@update_merge,'@@@_BASE_DATATYPE_GUID_FILTER_@@@', ' = 0x00000000000000000000000000000004') set @update_trigger_sql = @update_trigger_sql + @update_merge end -- instances if @instance_columns <> '' begin set @update_merge = replace(@update_merge_template,'@@@_BASE_TYPE_@@@', 'instance') set @update_merge = replace(@update_merge,'@@@_TYPE_COLUMNS_@@@', @instance_columns) set @update_merge = replace(@update_merge,'@@@_BASE_DATATYPE_GUID_FILTER_@@@', ' > 0x00000000000000000000000000000004') set @update_trigger_sql = @update_trigger_sql + @update_merge end set @update_trigger_sql = @update_trigger_sql + ' end ' -- insert trigger -- @@@_ACTION_CHECK_@@@ -- @@@_META_TEMPLATE_NAME_@@@ -- @@@_META_TEMPLATE_GUID_@@@ IF OBJECT_ID('trigger_orm_meta_view_' + @template_name_sanitized + '_insert', 'TR') IS NOT NULL set @action_check = 'alter' else set @action_check = 'create' set @insert_trigger_sql = ' @@@_ACTION_CHECK_@@@ trigger trigger_orm_meta_view_@@@_META_TEMPLATE_NAME_SANITIZED_@@@_insert on [dbo].@@@_META_TEMPLATE_NAME_@@@ instead of insert as begin declare @template_guid uniqueidentifier set @template_guid = ''@@@_META_TEMPLATE_GUID_@@@'' -- if there is no specific instances being inserted, raise an error (there is nothing to attach values to!) if (columns_updated() & 1) = 0 begin rollback transaction raiserror(''Can not insert without an instance to attach values to.'', 16, 5) return end -- verify that all the instances does not already exist (this aint an update statement!) if (exists( select ins.instance_name from inserted as ins inner join [orm_meta].[instances] as omi on ins.instance_name = omi.name where omi.template_guid = @template_guid)) begin rollback transaction raiserror(''Can not insert duplicate Instance_name (new instances should be added via an insert).'', 16, 5) return end -- Add any instances not yet tracked in the instance table merge into [orm_meta].[instances] as d using ( select instance_name as name from inserted ) as s on d.name = s.name when not matched then insert ( template_guid, name) values (@template_guid, s.name) ; -- Rotate the table to prep for merging into the values tables -- Note we will need an unpivot for each of the four main types -- Also note: we want to raise an error if we attempt to insert an already set -- value, so on a match we will insert an invalid record (violates a primary key) -- and add our own error message ' set @insert_trigger_sql = replace(@insert_trigger_sql,'@@@_ACTION_CHECK_@@@', @action_check) set @insert_trigger_sql = replace(@insert_trigger_sql, '@@@_META_TEMPLATE_NAME_@@@', @template_name_quoted) set @insert_trigger_sql = replace(@insert_trigger_sql, '@@@_META_TEMPLATE_NAME_SANITIZED_@@@', @template_name_sanitized) set @insert_trigger_sql = replace(@insert_trigger_sql,'@@@_META_TEMPLATE_GUID_@@@', @template_guid) set @insert_merge_template = ' ------------------------------------ -- @@@_BASE_TYPE_@@@ ------------------------------------ begin try ;with insert_values as ( select instance_name , property_name , value , instances.instance_guid , properties.property_guid from inserted unpivot ( value for property_name in (@@@_TYPE_COLUMNS_@@@) ) unpivoted inner join [orm_meta].[properties] as properties on unpivoted.property_name = properties.name inner join [orm_meta].[instances] as instances on unpivoted.Instance_name = instances.name where properties.template_guid = @template_guid and properties.datatype_guid @@@_BASE_DATATYPE_GUID_FILTER_@@@ and instances.template_guid = @template_guid and value is not null ) merge into [orm_meta].[values_@@@_BASE_TYPE_@@@] as d using ( select instance_guid , property_guid , value from insert_values ) as s on d.instance_guid = s.instance_guid and d.property_guid = s.property_guid when not matched then insert ( instance_guid, property_guid, value) values (s.instance_guid, s.property_guid, s.value) when matched then -- throw error! update set d.value = convert(nvarchar(max), d.value) + convert(nvarchar(max), 0/0) ; end try begin catch rollback transaction raiserror(''Can not insert over an existing value. Use update instead.'', 16, 5) return end catch ' -- string if @string_columns <> '' begin set @insert_merge = replace(@insert_merge_template,'@@@_BASE_TYPE_@@@', 'string') set @insert_merge = replace(@insert_merge,'@@@_TYPE_COLUMNS_@@@', @string_columns) set @insert_merge = replace(@insert_merge,'@@@_BASE_DATATYPE_GUID_FILTER_@@@', ' = 0x00000000000000000000000000000001') set @insert_trigger_sql = @insert_trigger_sql + @insert_merge end -- integers if @integer_columns <> '' begin set @insert_merge = replace(@insert_merge_template,'@@@_BASE_TYPE_@@@', 'integer') set @insert_merge = replace(@insert_merge,'@@@_TYPE_COLUMNS_@@@', @integer_columns) set @insert_merge = replace(@insert_merge,'@@@_BASE_DATATYPE_GUID_FILTER_@@@', ' = 0x00000000000000000000000000000002') set @insert_trigger_sql = @insert_trigger_sql + @insert_merge end -- decimal if @decimal_columns <> '' begin set @insert_merge = replace(@insert_merge_template,'@@@_BASE_TYPE_@@@', 'decimal') set @insert_merge = replace(@insert_merge,'@@@_TYPE_COLUMNS_@@@', @decimal_columns) set @insert_merge = replace(@insert_merge,'@@@_BASE_DATATYPE_GUID_FILTER_@@@', ' = 0x00000000000000000000000000000003') set @insert_trigger_sql = @insert_trigger_sql + @insert_merge end -- datetime if @datetime_columns <> '' begin set @insert_merge = replace(@insert_merge_template,'@@@_BASE_TYPE_@@@', 'datetime') set @insert_merge = replace(@insert_merge,'@@@_TYPE_COLUMNS_@@@', @datetime_columns) set @insert_merge = replace(@insert_merge,'@@@_BASE_DATATYPE_GUID_FILTER_@@@', ' = 0x00000000000000000000000000000004') set @insert_trigger_sql = @insert_trigger_sql + @insert_merge end -- instances if @instance_columns <> '' begin set @insert_merge = replace(@insert_merge_template,'@@@_BASE_TYPE_@@@', 'instance') set @insert_merge = replace(@insert_merge,'@@@_TYPE_COLUMNS_@@@', @instance_columns) set @insert_merge = replace(@insert_merge,'@@@_BASE_DATATYPE_GUID_FILTER_@@@', ' > 0x00000000000000000000000000000004') set @insert_trigger_sql = @insert_trigger_sql + @insert_merge end set @insert_trigger_sql = @insert_trigger_sql + ' end ' --begin transaction generate_triggers --begin try -- Apply the templates exec sp_executesql @delete_trigger_sql exec sp_executesql @update_trigger_sql exec sp_executesql @insert_trigger_sql -- commit transaction generate_triggers --end try --begin catch -- rollback transaction generate_triggers -- raiserror('Generating the template triggers failed.', 16, 5) -- return --end catch end go
<filename>tpc-c/benchmark/run/sql.common/indexCreates.sql alter table bmsql_warehouse add constraint bmsql_warehouse_pkey primary key (w_id); alter table bmsql_district add constraint bmsql_district_pkey primary key (d_w_id, d_id); alter table bmsql_customer add constraint bmsql_customer_pkey primary key (c_w_id, c_d_id, c_id); create index bmsql_customer_idx1 on bmsql_customer (c_w_id, c_d_id, c_last, c_first); alter table bmsql_oorder add constraint bmsql_oorder_pkey primary key (o_w_id, o_d_id, o_id); create unique index bmsql_oorder_idx1 on bmsql_oorder (o_w_id, o_d_id, o_carrier_id, o_id); alter table bmsql_new_order add constraint bmsql_new_order_pkey primary key (no_w_id, no_d_id, no_o_id); alter table bmsql_order_line add constraint bmsql_order_line_pkey primary key (ol_w_id, ol_d_id, ol_o_id, ol_number); alter table bmsql_stock add constraint bmsql_stock_pkey primary key (s_w_id, s_i_id); alter table bmsql_item add constraint bmsql_item_pkey primary key (i_id);
WITH revenue0 AS ( SELECT l.suppkey as supplier_no, sum(l.extendedprice*(1-l.discount)) as total_revenue FROM "${database}"."${schema}"."${prefix}lineitem" l WHERE l.shipdate >= DATE '1996-01-01' AND l.shipdate < DATE '1996-01-01' + INTERVAL '3' MONTH GROUP BY l.suppkey ) /* TPC_H Query 15 - Top Supplier */ SELECT s.suppkey, s.name, s.address, s.phone, total_revenue FROM "${database}"."${schema}"."${prefix}supplier" s, revenue0 WHERE s.suppkey = supplier_no AND total_revenue = (SELECT max(total_revenue) FROM revenue0) ORDER BY s.suppkey ;
-- the feed list has three seq scans on xml_tree_values and be pretty much unusable drop index if exists xml_tree_values_results_state_path_idx; create index xml_tree_values_results_state_path_idx on xml_tree_values(results_id, simple_path) where simple_path = 'VipObject.State.Name'; drop index if exists xml_tree_values_results_date_path_idx; create index xml_tree_values_results_date_path_idx on xml_tree_values(results_id, simple_path) where simple_path = 'VipObject.Election.Date'; drop index if exists xml_tree_values_results_election_type_path_idx; create index xml_tree_values_results_election_type_path_idx on xml_tree_values(results_id, path) where path ~ 'VipObject.*.Election.*.ElectionType.*.Text.0'; -- help the `approvable_status` query, as used on a feed's overview page drop index if exists validations_results_scoped_severity_idx; create index validations_results_scoped_severity_idx on validations(results_id, severity) where severity = 'critical' or severity = 'fatal';
CREATE OR REPLACE FUNCTION devilry__on_imageannotationcomment_after_insert_or_update() RETURNS TRIGGER AS $$ DECLARE var_group_id integer; BEGIN var_group_id = devilry__get_group_id_from_feedbackset_id(NEW.feedback_set_id); PERFORM devilry__rebuild_assignmentgroupcacheddata(var_group_id); RETURN NEW; END $$ LANGUAGE plpgsql; DROP TRIGGER IF EXISTS devilry__on_imageannotationcomment_after_insert_or_update_trigger ON devilry_group_imageannotationcomment; CREATE TRIGGER devilry__on_imageannotationcomment_after_insert_or_update_trigger AFTER INSERT OR UPDATE ON devilry_group_imageannotationcomment FOR EACH ROW EXECUTE PROCEDURE devilry__on_imageannotationcomment_after_insert_or_update(); CREATE OR REPLACE FUNCTION devilry__on_imageannotationcomment_after_delete() RETURNS TRIGGER AS $$ DECLARE var_group_id integer; BEGIN var_group_id = devilry__get_group_id_from_feedbackset_id(OLD.feedback_set_id); PERFORM devilry__rebuild_assignmentgroupcacheddata(var_group_id); RETURN OLD; END $$ LANGUAGE plpgsql; DROP TRIGGER IF EXISTS devilry__on_imageannotationcomment_after_delete ON devilry_group_imageannotationcomment; CREATE TRIGGER devilry__on_imageannotationcomment_after_delete AFTER DELETE ON devilry_group_imageannotationcomment FOR EACH ROW EXECUTE PROCEDURE devilry__on_imageannotationcomment_after_delete();
<gh_stars>1-10 --03_natural_join_bug_from_web_009.sql drop table if exists a; drop table if exists b; drop table if exists c; create table a ( id nchar(10)); create table b ( id nchar(20)); create table c ( id nchar(20)); insert into a values(n'aaa'); insert into a values(n'bbb'); insert into b values(n'aaa'); insert into b values(n'ddd'); insert into c values(n'aaa'); insert into c values(n'dddd'); select * from a where id in (select id from b where id in (select id from c)); select * from a where id in (select id from b where id in (select id from c where id in (select id from a))); select * from a where id in (select id from b where id in (select id from c where id in (select id from a where id in (select id from b where id in (select id from c where id in (select id from a)))))); drop table if exists a; drop table if exists b; drop table if exists c; drop table if exists masterTABLE,childTABLE1,childTABLE2; CREATE TABLE masterTABLE ( pid int(11) NOT NULL default '0', c1id int(11) default NULL, c2id int(11) default NULL, `value` int(11) NOT NULL default '0', UNIQUE KEY pid2 (pid,c1id,c2id), UNIQUE KEY pid (pid,`value`) ) ; INSERT INTO masterTABLE VALUES (1, 1, NULL, 1); INSERT INTO masterTABLE VALUES (1, 2, NULL, 2); INSERT INTO masterTABLE VALUES (1, NULL, 3, 3); INSERT INTO masterTABLE VALUES (1, 4, NULL, 4); INSERT INTO masterTABLE VALUES (1, 5, NULL, 5); CREATE TABLE childTABLE1 ( id int(11) NOT NULL default '0', active enum('Yes','No') NOT NULL default 'Yes', PRIMARY KEY (id) ) ; INSERT INTO childTABLE1 VALUES (1, 'Yes'); INSERT INTO childTABLE1 VALUES (2, 'No'); INSERT INTO childTABLE1 VALUES (4, 'Yes'); INSERT INTO childTABLE1 VALUES (5, 'No'); CREATE TABLE childTABLE2 ( id int(11) NOT NULL default '0', active enum('Yes','No') NOT NULL default 'Yes', PRIMARY KEY (id) ) ; INSERT INTO childTABLE2 VALUES (3, 'Yes'); SELECT MAX( `value` ) FROM masterTABLE AS m NATURAL LEFT JOIN childTABLE1 AS c1 NATURAL LEFT JOIN childTABLE2 AS c2 WHERE m.pid=1 AND c1.id IS NOT NULL OR c2.id IS NOT NULL OR c1.active = 'Yes' OR c2.active = 'Yes'; drop table if exists masterTABLE,childTABLE1,childTABLE2; ----------------------------------------------------------------------------- DROP TABLE IF EXISTS t1, t2, t3, t4, t5, t6; CREATE TABLE t1 (a INT); CREATE TABLE t2 (a INT); CREATE TABLE t3 (a INT,index t3_a (a)); CREATE TABLE t4 (a INT); CREATE TABLE t5 (a INT); CREATE TABLE t6 (a INT); INSERT INTO t1 VALUES (1), (1), (1),(2), (2), (2), (2), (2), (2), (2), (2), (2), (2), (2), (2), (2), (2), (2),(3), (3); INSERT INTO t2 VALUES (2), (2), (2), (2), (2), (2), (2), (2), (2), (2), (2), (2), (2), (2), (2),(3), (3); INSERT INTO t3 VALUES (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3),(2), (2),(1), (1); INSERT INTO t4 VALUES (4), (4), (4), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3),(2), (2),(1), (1); INSERT INTO t5 VALUES (5), (5), (5), (4), (4), (4), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3),(2), (2),(1), (1); INSERT INTO t6 VALUES (4), (4), (4), (5), (6), (4), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3), (3),(2), (2),(1), (1); SELECT * FROM t1 LEFT OUTER join (select * from t2 order by 1) t2 ON t1.a = t2.a LEFT OUTER join (select * from t3 order by 1) t3 ON t1.a = t3.a LEFT OUTER JOIN t4 ON t3.a = t4.a LEFT OUTER JOIN t5 ON t4.a = t5.a LEFT OUTER JOIN t6 ON t5.a = t6.a WHERE t2.a=2; SELECT * FROM t1 NATURAL LEFT OUTER join (select * from t2 order by 1) t2 NATURAL LEFT OUTER join (select * from t3 order by 1) t3 NATURAL LEFT OUTER JOIN t4 NATURAL LEFT OUTER JOIN t5 NATURAL LEFT OUTER JOIN t6 WHERE t2.a=2; SELECT * FROM t1 NATURAL LEFT OUTER join (select * from t2 order by 1) t2 NATURAL LEFT OUTER join (select * from t3 order by 1) t3 NATURAL RIGHT OUTER JOIN t4 NATURAL LEFT OUTER JOIN t5 NATURAL RIGHT OUTER JOIN t6 WHERE t2.a=2; DROP TABLE IF EXISTS t1, t2, t3, t4, t5, t6; ----------- drop table if exists test; create table test (id int primary key, name char(20)); insert into test values(1,'name1'),(2,'name2'),(3,'name3'),(4,'name4'); select * from test order by 1,2; --Positive delete test from test inner join (values(1),(2)) as t(id) on [test].id=t.id; select * from test order by 1,2; delete from test; insert into test values(1,'name1'),(2,'name2'),(3,'name3'),(4,'name4'); delete test from test natural join (values(1),(2)) as t(id); select * from test order by 1,2; select * from test natural join (values(1),(2)) as t(id) order by 1,2; delete test from test natural join (values(1),(2)) as t(id); select * from test order by 1,2; delete from test; insert into test values(1,'name1'),(2,'name2'),(3,'name3'),(4,'name4'); delete test from test inner join (values(1),(2)) as t(id) on test.id=t.id; select * from test order by 1,2; --bug drop table if exists test; create table test (id int primary key, name char(20)); insert into test values(1,'name1'),(2,'name2'),(3,'name3'),(4,'name4'); select * from test order by 1,2; select * from test natural join (values(1),(2)) as t(id); delete test from test natural join (values(1),(2)) as t(id); select * from test order by 1,2; drop table if exists test; create table test (id int primary key, name char(20)); insert into test values(1,'name1'),(2,'name2'),(3,'name3'),(4,'name4'); delete test from test inner join (values(1),(2)) as t(id) on test.id=t.id; select * from test order by 1,2; delete from test; insert into test values(1,'name1'),(2,'name2'),(3,'name3'),(4,'name4'); delete test from test natural join (values(1),(2)) as t(id); select * from test order by 1,2; drop table if exists test; create table test (id int primary key, name char(20)); insert into test values(1,'name1'),(2,'name2'),(3,'name3'),(4,'name4'); select * from test inner join (values(1),(2)) as t(id) on 1 order by 1,2; select * from test inner join (values(1),(2)) as t(id) on t.id=test.id order by 1,2; update test set id=5 where id =1 union (1 inner join (values(1),(2)) as t(id)); update test set id=5 where id =1 join (values(1),(2)) as t(id); update test set id=5 where id =1 natural join (values(1),(2)) as t(id); drop table if exists test; create table test (id int primary key, name char(20)); insert into test values(1,'name1'),(2,'name2'),(3,'name3'),(4,'name4'); delete test from test left join (values(1),(2)) as t(id) on test.id=t.id; select * from test order by 1,2; delete from test; drop table if exists test; create table test (id int primary key, name char(20)); insert into test values(1,'name1'),(2,'name2'),(3,'name3'),(4,'name4'); delete test from test right join (values(1),(2)) as t(id) on test.id=t.id; select * from test order by 1,2; delete from test; drop table if exists test; create table test (id int primary key, name char(20)); insert into test values(1,'name1'),(2,'name2'),(3,'name3'),(4,'name4'); delete test from test cross join (values(1),(2)) as t(id) ; select * from test order by 1,2; delete from test; drop table if exists test; create table test (id int , name char(20)); insert into test values(1,'name1'),(2,'name2'),(3,'name3'),(4,'name4'); update test inner join (values(1),(2)) as t(id) on test.id=t.id set test.id=5 ; select * from test order by 1,2; delete from test; --good result update test inner join (values(1),(2)) as t(id) test.id=t.id set test.id=5 ; select * from test order by 1,2; delete from test; drop table if exists test; create table test (id int , name char(20)); insert into test values(1,'name1'),(2,'name2'),(3,'name3'),(4,'name4'); --good result update test inner join (values(1),(2)) as t(id) on test.id=t.id set test.id=5 ; select * from test order by 1,2; delete from test; insert into test values(1,'name1'),(2,'name2'),(3,'name3'),(4,'name4'); --error result update test natural join (values(1),(2)) as t(id) set test.id=5 ; select * from test order by 1,2; delete from test; drop table if exists test; -------------------------------------------------------- DROP TABLE /*! IF EXISTS */ t1; DROP TABLE /*! IF EXISTS */ t2; CREATE TABLE t1 ( `pk` int(11) NOT NULL AUTO_INCREMENT, `col_int_key` int(11) DEFAULT NULL, `col_varchar_key` varchar(1) DEFAULT NULL, `col_varchar_nokey` varchar(1) DEFAULT NULL, PRIMARY KEY (`pk`), KEY `col_int_key` (`col_int_key`), KEY `col_varchar_key` (`col_varchar_key`,`col_int_key`)) ; INSERT INTO t1 VALUES (29,4,'c','c'); CREATE TABLE t2 ( `pk` int(11) NOT NULL AUTO_INCREMENT, `col_int_key` int(11) DEFAULT NULL, `col_varchar_key` varchar(1) DEFAULT NULL, `col_varchar_nokey` varchar(1) DEFAULT NULL, PRIMARY KEY (`pk`), KEY `col_int_key` (`col_int_key`), KEY `col_varchar_key` (`col_varchar_key`,`col_int_key`)) ; INSERT INTO t2 VALUES (4,9,'k','k'); INSERT INTO t2 VALUES (5,NULL,'r','r'); INSERT INTO t2 VALUES (6,9,'t','t'); INSERT INTO t2 VALUES (7,3,'j','j'); INSERT INTO t2 VALUES (8,8,'u','u'); INSERT INTO t2 VALUES (9,8,'h','h'); INSERT INTO t2 VALUES (10,53,'o','o'); INSERT INTO t2 VALUES (11,0,NULL,NULL); INSERT INTO t2 VALUES (12,5,'k','k'); INSERT INTO t2 VALUES (13,166,'e','e'); INSERT INTO t2 VALUES (14,3,'n','n'); INSERT INTO t2 VALUES (15,0,'t','t'); INSERT INTO t2 VALUES (16,1,'c','c'); INSERT INTO t2 VALUES (17,9,'m','m'); INSERT INTO t2 VALUES (18,5,'y','y'); SELECT t1 .`col_int_key` from (select * from t1 order by 1,2) t1 JOIN (( select table2.`pk`,table2.`col_int_key`,table2.`col_varchar_key` from t2 table2 join (select * from t2 order by 1,2) table3 ON table3 .`pk` )t ) WHERE t .`col_int_key` >= t1 .`pk` AND t .`col_varchar_key` > t1 .`col_varchar_nokey` order by 1; select table2.`pk`,table2.`col_int_key`,table2.`col_varchar_key` from t2 table2 join (select * from t2 order by 1,2) table3 ON table3 .`pk` order by 1,2,3; SELECT t1 .`col_int_key` from (select * from t1 order by 1,2) t1 JOIN (( select table2.`pk`,table2.`col_int_key`,table2.`col_varchar_key` from t2 table2 join (select * from t2 order by 1,2) table3 ON table3 .`pk` )t ) ON t .`col_int_key` >= t1 .`pk` AND t .`col_varchar_key` < t1 .`col_varchar_nokey` order by 1; SELECT t1 .`col_int_key` from (select * from t1 order by 1,2) t1 JOIN (( select table2.`pk`,table2.`col_int_key`,table2.`col_varchar_key` from t2 table2 join (select * from t2 order by 1,2) table3 ON table3 .`pk` )t ) ON t .`col_int_key` >= t1 .`pk` AND t .`col_varchar_key` = t1 .`col_varchar_nokey` order by 1; SELECT t1 .`col_int_key` from (select * from t1 order by 1,2) t1 JOIN (( select table2.`pk`,table2.`col_int_key`,table2.`col_varchar_key` from t2 table2 join (select * from t2 order by 1,2) table3 ON table3 .`pk` )t ) ON t .`col_int_key` >= t1 .`pk` AND t .`col_varchar_key` > t1 .`col_varchar_nokey` order by 1; SELECT table2 .`col_int_key` from (select * from t1 order by 1,2) t1 JOIN ( t2 table2 join (select * from t2 order by 1,2) table3 ON table3 .`pk` ) ON table3 .`col_int_key` >= table2 .`pk` AND table3 .`col_varchar_key` = table2 .`col_varchar_nokey` order by 1; SELECT table2 .`col_int_key` from (select * from t1 order by 1,2) t1 JOIN ( t2 table2 join (select * from t2 order by 1,2) table3 ON table3 .`pk` ) where table3 .`col_int_key` >= table2 .`pk` AND table3 .`col_varchar_key` = table2 .`col_varchar_nokey` order by 1; SELECT table2 .`col_int_key` from (select * from t1 order by 1,2) t1 join (select * from t2 order by 1,2) t2 table2 join (select * from t2 order by 1,2) table3 ON table3 .`pk` order by 1; SELECT table2 .`col_int_key` from (select * from t1 order by 1,2) t1 join (select * from t2 order by 1,2) t2 table2 join (select * from t2 order by 1,2) table3 ON table3 .`pk` where table3 .`col_int_key` >= table2 .`pk` AND table3 .`col_varchar_key` = table2 .`col_varchar_nokey` order by 1; SELECT table2 .`col_int_key` from (select * from t1 order by 1,2) t1 join (select * from t2 order by 1,2) t2 table2 join (select * from t2 order by 1,2) table3 where table3 .`col_int_key` >= table2 .`pk` AND table3 .`col_varchar_key` = table2 .`col_varchar_nokey` order by 1; DROP TABLE /*! IF EXISTS */ t1; DROP TABLE /*! IF EXISTS */ t2;
<filename>openGaussBase/testcase/SQL/DDL/table/Opengauss_Function_DDL_Table_Case0041.sql -- @testpoint: 列存表支持修改字段的数据类型 drop table if exists alter_table_tb041; create table alter_table_tb041 ( c1 int, c2 bigint, c3 varchar(20) )with(ORIENTATION=COLUMN); insert into alter_table_tb041 values('11',null,'sss'); insert into alter_table_tb041 values('21','','sss'); insert into alter_table_tb041 values('31',66,''); insert into alter_table_tb041 values('41',66,null); insert into alter_table_tb041 values('41',66,null); ALTER TABLE alter_table_tb041 MODIFY (c3 char(20)) ; drop table if exists alter_table_tb041;
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Nov 14, 2021 at 09:21 AM -- Server version: 5.7.19 -- PHP Version: 7.2.34 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: `interview` -- -- -------------------------------------------------------- -- -- Table structure for table `failed_jobs` -- DROP TABLE IF EXISTS `failed_jobs`; CREATE TABLE IF NOT EXISTS `failed_jobs` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `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`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `industries` -- DROP TABLE IF EXISTS `industries`; CREATE TABLE IF NOT EXISTS `industries` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `industries` -- INSERT INTO `industries` (`id`, `name`) VALUES (1, 'Finance'), (2, 'Technology'); -- -------------------------------------------------------- -- -- Table structure for table `migrations` -- DROP TABLE IF EXISTS `migrations`; CREATE TABLE IF NOT EXISTS `migrations` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `migrations` -- INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1, '2014_10_12_000000_create_users_table', 1), (2, '2014_10_12_100000_create_password_resets_table', 1), (3, '2019_08_19_000000_create_failed_jobs_table', 1); -- -------------------------------------------------------- -- -- Table structure for table `password_resets` -- DROP TABLE IF EXISTS `password_resets`; CREATE TABLE IF NOT EXISTS `password_resets` ( `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, KEY `password_resets_email_index` (`email`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `roles` -- DROP TABLE IF EXISTS `roles`; CREATE TABLE IF NOT EXISTS `roles` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `roles` -- INSERT INTO `roles` (`id`, `name`) VALUES (1, 'Developer'), (2, 'Manager'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- DROP TABLE IF EXISTS `users`; CREATE TABLE IF NOT EXISTS `users` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `email_verified_at` timestamp NULL DEFAULT NULL, `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `profile_score` int(11) DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `users_email_unique` (`email`) ) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `profile_score`, `created_at`, `updated_at`) VALUES (1, 'Harsh1', '<EMAIL>', NULL, '$2y$10$PPezSAjuojstHslheMp11ONHYUs6Vz9g/pO/MpGtYwbsSRAkXNzIO', NULL, 0, '2021-11-13 13:33:53', '2021-11-13 14:31:04'), (2, 'Harsh2', '<EMAIL>', NULL, '$2y$10$ws8.uyDuqb3hNd5yDLEDyuv6llCSAyFsZHM/vslRccu7nbw/hjpva', NULL, 1, '2021-11-13 13:34:14', '2021-11-13 14:31:04'), (3, 'Harsh3', '<EMAIL>', NULL, '$2y$10$u.iNzCQ.A/Ukc1u8afvSzO9Avd27BZngN4gh2/PWkqQSnvt4dRzXG', NULL, 0, '2021-11-13 14:07:12', '2021-11-13 14:30:42'); -- -------------------------------------------------------- -- -- Table structure for table `user_industries` -- DROP TABLE IF EXISTS `user_industries`; CREATE TABLE IF NOT EXISTS `user_industries` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) DEFAULT NULL, `industry_id` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `user_industries` -- INSERT INTO `user_industries` (`id`, `user_id`, `industry_id`, `created_at`, `updated_at`) VALUES (1, 1, 1, '2021-11-13 13:33:53', '2021-11-13 13:33:53'), (2, 2, 2, '2021-11-13 13:34:14', '2021-11-13 13:34:14'), (3, 3, 2, '2021-11-13 14:07:12', '2021-11-13 14:07:12'); -- -------------------------------------------------------- -- -- Table structure for table `user_roles` -- DROP TABLE IF EXISTS `user_roles`; CREATE TABLE IF NOT EXISTS `user_roles` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) DEFAULT NULL, `role_id` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `user_roles` -- INSERT INTO `user_roles` (`id`, `user_id`, `role_id`, `created_at`, `updated_at`) VALUES (1, 1, 1, '2021-11-13 13:33:53', '2021-11-13 13:33:53'), (2, 2, 2, '2021-11-13 13:34:14', '2021-11-13 13:34:14'), (3, 3, 1, '2021-11-13 14:07:12', '2021-11-13 14:07:12'); -- -------------------------------------------------------- -- -- Table structure for table `user_views` -- DROP TABLE IF EXISTS `user_views`; CREATE TABLE IF NOT EXISTS `user_views` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) DEFAULT NULL, `suggestion_id` int(11) DEFAULT NULL, `views` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `user_views` -- INSERT INTO `user_views` (`id`, `user_id`, `suggestion_id`, `views`, `created_at`, `updated_at`) VALUES (1, 3, 1, 16, '2021-11-13 14:40:30', '2021-11-13 14:48:26'), (2, 3, 2, 16, '2021-11-13 14:40:30', '2021-11-13 14:48:26'), (3, 1, 2, 44, '2021-11-14 02:17:42', '2021-11-14 03:49:38'), (4, 1, 3, 49, '2021-11-14 02:17:42', '2021-11-14 03:49:38'); 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 */;
<filename>djequis/adp/sql/insert_hrstat_table.sql INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('FT', 'FT Faculty', null, null); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('PT', 'Part-time Fac Day', null, null); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('LV', 'On Leave', null, '2016-07-01'); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('DA', 'Disability Leave', null, '2016-07-01'); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('SA', 'Sabbatical', null, '2016-07-01'); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('REG', 'Regular Employee', null, '2016-07-01'); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('STU', 'Student Work Study', null, null); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('AD', 'Administration', null, null); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('HR', 'Hourly Employee', null, null); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('HRPT', 'Part-time Hourly', null, null); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('PATH', 'Part-time Athletics', null, null); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('ADPT', 'Part-time Admin', null, null); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('TLE', 'TLE', null, null); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('EMER', 'Emeritus', null, null); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('VEND', 'Vendor', null, null); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('OTH', 'Other Employee', null, null); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('PDG', 'Pending Employee', null, null); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('STD', 'Student Worker', null, null); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('CO', 'College Official', null, '2016-07-01'); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('SUM', 'Summer Worker', null, null); INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('PTGP', 'Part-time Fac GPS', null, null);
<reponame>scoven2/Employee-Tracker USE employeesDB; INSERT INTO department (name) VALUES ("Operations"); INSERT INTO department (name) VALUES ("Compliance"); INSERT INTO department (name) VALUES ("Finance"); INSERT INTO department (name) VALUES ("Human Resources"); INSERT INTO department (name) VALUES ("Legal"); INSERT INTO role (title, salary, department_id) VALUES ("Operations Lead", 100000, 1); INSERT INTO role (title, salary, department_id) VALUES ("Compliance Liason", 90000, 2); INSERT INTO role (title, salary, department_id) VALUES ("Accountant", 85000, 3); INSERT INTO role (title, salary, department_id) VALUES ("Hiring Manager", 80000, 4); INSERT INTO role (title, salary, department_id) VALUES ("Attorney", 200000, 5); INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ("Scott", "Siegel", 5, 7); INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ("Steve", "Siegel", 3, 1); INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ("Stan", "Siegel", 5, 1); INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ("Sarah", "Siegel", 1, 2); INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ("Sue", "Gallucci", 4, 4); INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ("Jaime", "Wu", 2, 1); INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ("Shia", "Lu", 5, null); INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ("Pooh", "Bear", 1, 7);
insert into department(id, departmentName) values (1001, 'parzulpan');
<reponame>arianvaldivieso/pos<filename>application/migrations/20170712141515_min_and_max_price_items_item_kits.sql -- min_and_max_price_items_item_kits -- ALTER TABLE `phppos_items` ADD `max_edit_price` decimal(23,10) NULL DEFAULT NULL,ADD `min_edit_price` decimal(23,10) NULL DEFAULT NULL; ALTER TABLE `phppos_item_kits` ADD `max_edit_price` decimal(23,10) NULL DEFAULT NULL,ADD `min_edit_price` decimal(23,10) NULL DEFAULT NULL;
<reponame>mnabavi84/datacamp-join-data-sql<filename>06-CROSSing the rubicon.sql -- 4. Select fields SELECT c.name AS city, l.name AS language -- 1. From cities (alias as c) FROM cities AS c -- 2. Join to languages (alias as l) CROSS JOIN languages AS l -- 3. Where c.name like Hyderabad WHERE c.name LIKE 'Hyder%'; -- 5. Select fields SELECT c.name AS city, l.name AS language -- 1. From cities (alias as c) FROM cities AS c -- 2. Join to languages (alias as l) INNER JOIN languages AS L -- 3. Match on country code ON c.country_code = l.code -- 4. Where c.name like Hyderabad WHERE c.name LIKE 'Hyder%'; -- Select fields SELECT c.name AS country, region, life_expectancy AS life_exp -- From countries (alias as c) FROM countries AS c -- Join to populations (alias as p) LEFT JOIN populations AS p -- Match on country code ON c.code=p.country_code -- Focus on 2010 WHERE year=2010 -- Order by life_exp ORDER BY life_exp -- Limit to 5 records LIMIT 5;
<reponame>karang24/crud_laravel -- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 06, 2017 at 11:57 AM -- Server version: 5.6.21 -- PHP Version: 5.6.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: `belajar-crud` -- -- -------------------------------------------------------- -- -- Table structure for table `crud` -- CREATE TABLE IF NOT EXISTS `crud` ( `id` int(10) unsigned NOT NULL, `judul` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `isi` text COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `crud` -- INSERT INTO `crud` (`id`, `judul`, `isi`) VALUES (1, 'dfghnhgfd', 'dfvgffgbhnhgfsdsgdhggrgdrgfvffffdgrffrr'), (2, 'jaka ', 'coba coba coba'), (3, 'cooobbbaaaa', 'mau aja ahh\r\njjkkdkdkkdjfbobwgbgebg\r\nejbrjejjkwkkwooakkaff\r\nnnfjjjrjjjwkwklqlqjff''wjejefb\r\n'); -- -------------------------------------------------------- -- -- Table structure for table `migrations` -- CREATE TABLE IF NOT EXISTS `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 for table `migrations` -- INSERT INTO `migrations` (`migration`, `batch`) VALUES ('2017_03_06_080140_create_crud_table', 1); -- -- Indexes for dumped tables -- -- -- Indexes for table `crud` -- ALTER TABLE `crud` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `crud` -- ALTER TABLE `crud` MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4; /*!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 */;
<reponame>CallistoM/calc-shape-tool<gh_stars>0 # ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: 127.0.0.1 (MySQL 5.7.18) # Database: vat_tool # Generation Time: 2017-10-25 20:13:04 +0000 # ************************************************************ /*!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 */; /*!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 */; # Dump of table shape # ------------------------------------------------------------ DROP TABLE IF EXISTS `shape`; CREATE TABLE `shape` ( `shape_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(11) NOT NULL DEFAULT '', PRIMARY KEY (`shape_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; LOCK TABLES `shape` WRITE; /*!40000 ALTER TABLE `shape` DISABLE KEYS */; INSERT INTO `shape` (`shape_id`, `name`) VALUES (1,'cilinder'), (5,'sphere'), (6,'cubic'); /*!40000 ALTER TABLE `shape` ENABLE KEYS */; UNLOCK TABLES; # Dump of table shape_objects # ------------------------------------------------------------ DROP TABLE IF EXISTS `shape_objects`; CREATE TABLE `shape_objects` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `shape` int(11) unsigned DEFAULT '0', `height` double DEFAULT NULL, `radius` double DEFAULT NULL, `width` double DEFAULT NULL, `length` double DEFAULT NULL, PRIMARY KEY (`id`), KEY `shape` (`shape`), CONSTRAINT `shape_objects_ibfk_1` FOREIGN KEY (`shape`) REFERENCES `shape` (`shape_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; LOCK TABLES `shape_objects` WRITE; /*!40000 ALTER TABLE `shape_objects` DISABLE KEYS */; INSERT INTO `shape_objects` (`id`, `shape`, `height`, `radius`, `width`, `length`) VALUES (7,5,20.5,20.5,20.5,20.5), (13,6,40.5,40.5,40.5,40.5), (15,1,10.4,10.4,10.4,10.4), (17,1,432,432,10.4,10.4), (18,1,10,10,10.4,10.4), (19,1,543,543,10.4,10.4), (20,6,40.5,40.5,40.5,40.5), (21,1,322,432,10.4,10.4), (22,1,10.4,10.4,10.4,10.4), (24,5,20.5,20.5,20.5,20.5), (25,6,40.5,40.5,40.5,40.5), (26,1,432,123,10.4,10.4), (111,1,234.2,23.2,NULL,NULL), (112,1,422.2,432.2,NULL,NULL), (113,1,5543.3,432.4,NULL,NULL), (114,1,534.3,654.4,NULL,NULL), (115,6,42.4,NULL,44.2,22.2), (116,5,NULL,432,NULL,NULL), (117,1,543,543,NULL,NULL), (119,1,10,10,NULL,NULL), (120,6,30,NULL,40,20), (121,5,NULL,20,NULL,NULL), (122,5,NULL,2432,NULL,NULL), (123,6,30.5,NULL,20.5,20.5), (124,6,30.5,NULL,20.5,20.5), (125,6,30.5,NULL,20.5,20.5), (126,5,NULL,20.5,NULL,NULL), (127,1,30.5,20.5,NULL,NULL), (128,6,30.5,NULL,20.5,20.5), (129,5,NULL,20.5,NULL,NULL), (130,1,30.5,20.5,NULL,NULL), (131,6,30.5,NULL,20.5,20.5), (132,5,NULL,20.5,NULL,NULL), (133,1,30.5,20.5,NULL,NULL), (134,6,30.5,NULL,20.5,20.5), (135,5,NULL,20.5,NULL,NULL), (136,1,30.5,20.5,NULL,NULL), (137,1,234.2,432.2,NULL,NULL), (138,1,234.2,432.2,NULL,NULL); /*!40000 ALTER TABLE `shape_objects` ENABLE KEYS */; UNLOCK TABLES; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_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 */;
DROP DATABASE IF EXISTS avito_small; CREATE DATABASE avito_small; \connect avito_small; CREATE TABLE search_stream( search_id NUMERIC, ad_id NUMERIC, position NUMERIC, object_type NUMERIC, hist_ctr NUMERIC, is_click NUMERIC ); CREATE TABLE search_info( search_id NUMERIC, search_date TIMESTAMP, ip_id NUMERIC, user_id NUMERIC, is_user_logged_on NUMERIC, search_query TEXT, search_location_id NUMERIC, search_category_id NUMERIC, search_params TEXT ); CREATE TABLE ads_info( ad_id NUMERIC, location_id NUMERIC, category_id NUMERIC, params TEXT, price NUMERIC, title TEXT, is_context NUMERIC ); CREATE TABLE visits_stream( user_id NUMERIC, ip_id NUMERIC, ad_id NUMERIC, view_date TIMESTAMP ); CREATE TABLE phone_requests_stream( user_id NUMERIC, ip_id NUMERIC, ad_id NUMERIC, phone_request_date TIMESTAMP ); CREATE TABLE category( category_id NUMERIC, level NUMERIC, parent_category NUMERIC, subcategory NUMERIC ); CREATE TABLE location( location_id NUMERIC, level NUMERIC, region_id NUMERIC, city_id NUMERIC ); \copy search_stream FROM 'data/interim/SearchStream.csv' DELIMITER ',' CSV HEADER; \copy search_info FROM 'data/interim/SearchInfo.csv' DELIMITER ',' CSV HEADER; \copy ads_info FROM 'data/interim/AdsInfo.csv' DELIMITER ',' CSV HEADER; \copy visits_stream FROM 'data/interim/VisitsStream.csv' DELIMITER ',' CSV HEADER; \copy phone_requests_stream FROM 'data/interim/PhoneRequestsStream.csv' DELIMITER ',' CSV HEADER; \copy category FROM 'data/interim/Category.csv' DELIMITER ',' CSV HEADER; \copy location FROM 'data/interim/Location.csv' DELIMITER ',' CSV HEADER;
 DECLARE @SummaryOfChanges_JobTypeGroup TABLE ([EventId] INT, [Action] VARCHAR(100)); MERGE INTO [dbo].[JobTypeGroup] AS Target USING (VALUES (1, 'Collection Submission', 25), (2, 'Period End', 25), (3, 'Reference Data', 25) ) AS Source([JobTypeGroupId], [Description], [ConcurrentExecutionCount]) ON Target.[JobTypeGroupId] = Source.[JobTypeGroupId] WHEN MATCHED AND EXISTS ( SELECT Target.[JobTypeGroupId] EXCEPT SELECT Source.[JobTypeGroupId] ) THEN UPDATE SET Target.[JobTypeGroupId] = Source.[JobTypeGroupId], Target.[Description] = Source.[Description], Target.[ConcurrentExecutionCount] = Source.[ConcurrentExecutionCount] WHEN NOT MATCHED BY TARGET THEN INSERT([JobTypeGroupId], [Description], [ConcurrentExecutionCount]) VALUES ([JobTypeGroupId], [Description], [ConcurrentExecutionCount]) WHEN NOT MATCHED BY SOURCE THEN DELETE OUTPUT Inserted.[JobTypeGroupId],$action INTO @SummaryOfChanges_JobTypeGroup([EventId],[Action]) ; DECLARE @AddCount_JTG INT, @UpdateCount_JTG INT, @DeleteCount_JTG INT SET @AddCount_JTG = ISNULL((SELECT Count(*) FROM @SummaryOfChanges_JobTypeGroup WHERE [Action] = 'Insert' GROUP BY Action),0); SET @UpdateCount_JTG = ISNULL((SELECT Count(*) FROM @SummaryOfChanges_JobTypeGroup WHERE [Action] = 'Update' GROUP BY Action),0); SET @DeleteCount_JTG = ISNULL((SELECT Count(*) FROM @SummaryOfChanges_JobTypeGroup WHERE [Action] = 'Delete' GROUP BY Action),0); RAISERROR(' %s - Added %i - Update %i - Delete %i',10,1,'JobType', @AddCount_JTG, @UpdateCount_JTG, @DeleteCount_JTG) WITH NOWAIT;
<gh_stars>1-10 BEGIN; SET client_min_messages TO ERROR; SET client_encoding = 'UTF8'; DROP SCHEMA IF EXISTS peeps CASCADE; CREATE SCHEMA peeps; SET search_path = peeps; -- Country codes used mainly for foreign key constraint on people.country -- From http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 -- No need for any API to update, insert, or delete from this table. CREATE TABLE peeps.countries ( code character(2) NOT NULL primary key, name text ); CREATE TABLE peeps.people ( id serial primary key, email text UNIQUE CHECK (email ~ '\A\S+@\S+\.\S+\Z'), name text NOT NULL CHECK (LENGTH(name) > 0), city text, state text, country char(2) REFERENCES peeps.countries(code) ); COMMIT;
<reponame>coderkan/crud-example create table [dbo].[VR_ISG]( [id] [int] IDENTITY (1, 1) NOT NULL PRIMARY KEY, [name]VARCHAR(50), [date] DATE, [update_date] DATE, [sicil] VARCHAR(10), [flag][int] )
<filename>prisma/migrations/20210912090522_reinstate_profile_v7/migration.sql /* Warnings: - The primary key for the `Profile` table will be changed. If it partially fails, the table could be left without primary key constraint. */ -- AlterTable ALTER TABLE "Profile" DROP CONSTRAINT "Profile_pkey"; -- RenameIndex ALTER INDEX "Profile_userId_unique" RENAME TO "Profile.userId_unique";
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100 -- file:replica_identity.sql ln:74 expect:true SELECT count(*) FROM pg_index WHERE indrelid = 'test_replica_identity'::regclass AND indisreplident
<filename>data/migrations/V0030__more_real_efile_objects.sql SET search_path = real_efile, pg_catalog; -- Name: f1; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f1 ( repid numeric NOT NULL, comid character varying(9), com_name character varying(200), com_str1 character varying(34), com_str2 character varying(34), com_city character varying(30), com_state character varying(2), com_zip character varying(9), sub_date date, amend_name character varying(1), amend_address character varying(1), cmte_type character varying(1), canid character varying(9), can_lname character varying(90), can_fname character varying(20), can_mname character varying(20), can_prefix character varying(10), can_suffix character varying(10), office character varying(1), el_state character varying(2), district character varying(2), party character varying(3), party_code character varying(3), lrpac5e character varying(1), lrpac5f character varying(1), lead_pac character varying(1), aff_comid character varying(9), aff_canid character varying(9), ac_name character varying(200), aff_fname character varying(20), aff_mname character varying(20), aff_prefix character varying(10), aff_suffix character varying(10), acstr1 character varying(34), acstr2 character varying(34), accity character varying(30), acstate character varying(2), aczip character varying(9), relations character varying(38), organ_type character varying(1), affrel_code character varying(3), c_lname character varying(90), c_fname character varying(20), c_mname character varying(20), c_prefix character varying(10), c_suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), title character varying(20), phone character varying(10), t_lname character varying(90), t_fname character varying(20), t_mname character varying(20), t_prefix character varying(10), t_suffix character varying(10), tstr1 character varying(34), tstr2 character varying(34), tcity character varying(30), tstate character varying(2), tzip character varying(9), ttitle character varying(20), tphone character varying(10), d_lname character varying(90), d_fname character varying(20), d_mname character varying(20), d_prefix character varying(10), d_suffix character varying(10), dstr1 character varying(34), dstr2 character varying(34), dcity character varying(30), dstate character varying(2), dzip character varying(9), dtitle character varying(20), dphone character varying(10), b_lname character varying(200), bstr1 character varying(34), bstr2 character varying(34), bcity character varying(30), bstate character varying(2), bzip character varying(9), bname_2 character varying(200), bstr1_2 character varying(34), bstr2_2 character varying(34), bcity_2 character varying(30), bstate_2 character varying(2), bzip_2 character varying(9), lname character varying(90), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), sign_date date, amend_email character varying(1), email character varying(90), amend_url character varying(1), url character varying(90), fax character varying(12), imageno numeric, create_dt timestamp without time zone ); ALTER TABLE f1 OWNER TO fec; -- -- Name: f10; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f10 ( repid numeric(12,0) NOT NULL, comid character varying(9), lname character varying(90), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), canid character varying(9), off character varying(1), state character varying(2), dist character varying(2), com_name character varying(200), com_str1 character varying(34), com_str2 character varying(34), com_city character varying(30), com_state character varying(2), com_zip character varying(9), previous numeric, total numeric, ctd numeric, s_lname character varying(90), s_fname character varying(20), s_mname character varying(20), s_prefix character varying(10), s_suffix character varying(10), sign_date date, f6 character varying(1), can_emp character varying(90), can_occ character varying(90), imageno character varying(22), create_dt timestamp without time zone ); ALTER TABLE f10 OWNER TO fec; -- -- Name: f105; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f105 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), exp_date date, item_elect_cd character varying(5), item_elect_oth character varying(20), amount numeric(12,2), loan character varying(1), amend character varying(1), tran_id character varying(32) NOT NULL, imageno character varying(22), create_dt timestamp without time zone ); ALTER TABLE f105 OWNER TO fec; -- -- Name: f13; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f13 ( repid numeric(12,0) NOT NULL, comid character varying(9), com_name character varying(200), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), chgadd character varying(1), rptcode character varying(3), amend_date date, frm_date date, thr_date date, accepted numeric, refund numeric, net numeric, last character varying(30), first character varying(20), middle character varying(20), prefix character varying(10), suffix character varying(10), f13_date date, imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f13 OWNER TO fec; -- -- Name: f132; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f132 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), entity character varying(3), org character varying(200), last_nm character varying(30), first_nm character varying(20), middle character varying(20), prefix character varying(10), suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), receipt_date date, received numeric, aggregate numeric, memo_code character varying(1), memo_text character varying(100), amend character varying(1), tran_id character varying(32) NOT NULL, br_tran_id character varying(32), br_sname character varying(8), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f132 OWNER TO fec; -- -- Name: f133; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f133 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), entity character varying(3), org character varying(200), last character varying(30), first character varying(20), middle character varying(20), prefix character varying(10), suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), ref_date date, expended numeric, memo_code character varying(1), memo_text character varying(100), amend character varying(1), tran_id character varying(32) NOT NULL, br_tran_id character varying(32), br_sname character varying(8), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f133 OWNER TO fec; -- -- Name: f1m; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f1m ( repid numeric(12,0) NOT NULL, comid character varying(9), com_name character varying(200), com_str1 character varying(34), com_str2 character varying(34), com_city character varying(30), com_state character varying(2), com_zip character varying(9), ctype character varying(1), aff_date date, aff_comid character varying(9), aff_name character varying(200), can1_id character varying(9), can1_lname character varying(90), can1_fname character varying(20), can1_mname character varying(20), can1_prefix character varying(10), can1_suffix character varying(10), can1_office character varying(1), can1_el_state character varying(2), can1_district character varying(2), can1_con date, can2_id character varying(9), can2_lname character varying(90), can2_fname character varying(20), can2_mname character varying(20), can2_prefix character varying(10), can2_suffix character varying(10), can2_office character varying(1), can2_el_state character varying(2), can2_district character varying(2), can2_con date, can3_id character varying(9), can3_lname character varying(90), can3_fname character varying(20), can3_mname character varying(20), can3_prefix character varying(10), can3_suffix character varying(10), can3_office character varying(1), can3_el_state character varying(2), can3_district character varying(2), can3_con date, can4_id character varying(9), can4_con date, can4_lname character varying(90), can4_fname character varying(20), can4_mname character varying(20), can4_prefix character varying(10), can4_suffix character varying(10), can4_office character varying(1), can4_el_state character varying(2), can4_district character varying(2), can5_id character varying(9), can5_lname character varying(90), can5_fname character varying(20), can5_mname character varying(20), can5_prefix character varying(10), can5_suffix character varying(10), can5_office character varying(1), can5_el_state character varying(2), can5_district character varying(2), can5_con date, date_51 date, orig_date date, metreq_date date, lname character varying(90), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), sign_date date, imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f1m OWNER TO fec; -- -- Name: f1s; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f1s ( repid numeric(12,0) NOT NULL, comid character varying(9), jfrcomname character varying(200), jfrcomid character varying(9), aff_comid character varying(9), aff_canid character varying(9), ac_name character varying(200), aff_fname character varying(20), aff_mname character varying(20), aff_prefix character varying(10), aff_suffix character varying(10), acstr1 character varying(34), acstr2 character varying(34), accity character varying(30), acstate character varying(2), aczip character varying(9), relations character varying(38), organ_type character varying(1), affrel_code character varying(3), d_lname character varying(90), d_fname character varying(20), d_mname character varying(20), d_prefix character varying(10), d_suffix character varying(10), dstr1 character varying(34), dstr2 character varying(34), dcity character varying(30), dstate character varying(2), dzip character varying(9), dtitle character varying(20), dphone character varying(10), b_lname character varying(200), bstr1 character varying(34), bstr2 character varying(34), bcity character varying(30), bstate character varying(2), bzip character varying(9), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f1s OWNER TO fec; -- -- Name: f2; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f2 ( repid numeric(12,0) NOT NULL, canid character varying(9), lname character varying(90), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), amend_addr character varying(1), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), pty character varying(3), office character varying(1), el_state character varying(2), district numeric, el_year character varying(4), comid character varying(9), c_name character varying(200), c_str1 character varying(34), c_str2 character varying(34), c_city character varying(30), c_state character varying(2), c_zip character varying(9), acomid character varying(9), ac_name character varying(200), ac_str1 character varying(34), ac_str2 character varying(34), ac_city character varying(30), ac_state character varying(2), ac_zip character varying(9), sign_date date, per_fund numeric, gen_fund numeric, can_lname character varying(30), can_fname character varying(20), can_mname character varying(20), can_prefix character varying(10), can_suffix character varying(10), imageno numeric(19,0), create_dt timestamp without time zone, vp_last_name character(30), vp_first_name character(20), vp_middle_name character(20), vp_prefix character(10), vp_suffix character(10) ); ALTER TABLE f2 OWNER TO fec; -- -- Name: f24; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f24 ( repid numeric(12,0) NOT NULL, comid character varying(9), orgamd_date date, name character varying(200), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(10), lname character varying(38), fname character varying(20), mname character varying(10), prefix character varying(10), suffix character varying(10), sign_date date, rpttype character varying(3), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f24 OWNER TO fec; -- -- Name: f2s; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f2s ( repid numeric(12,0) NOT NULL, canid character varying(9), acomid character varying(9), ac_name character varying(200), ac_str1 character varying(34), ac_str2 character varying(34), ac_city character varying(30), ac_state character varying(2), ac_zip character varying(9), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f2s OWNER TO fec; -- -- Name: f3l; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f3l ( repid numeric(12,0) NOT NULL, comid character varying(9), com_name character varying(200), amend_addr character varying(1), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), els character varying(2), eld numeric, rptcode character varying(3), el_date date, el_state character varying(2), semiperiod character varying(1), from_date date, through_date date, semijun character varying(1), semidec character varying(1), bundledcont numeric, semibuncont numeric, lname character varying(90), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), sign_date date, imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f3l OWNER TO fec; -- -- Name: f3ps; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f3ps ( repid numeric(12,0) NOT NULL, comid character varying(9), ge_date date, dayafterge_dt date, imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f3ps OWNER TO fec; -- -- Name: f3pz1; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f3pz1 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), pcc_comid character varying(9), pcc_com_name character varying(200), cvg_start_date date, cvg_end_date date, auth_comid character varying(9), auth_com_name character varying(200), coh_bop numeric, coh_cop numeric, debts_owed_to_cmte numeric, debts_owed_by_committee numeric, exp_subject_to_limit numeric, net_contb numeric, net_op_exp numeric, federal_funds numeric, indv_contb numeric, pol_pty_contb numeric, other_pol_pty_contb numeric, cand_contb numeric, ttl_contb numeric, tranf_from_other_auth_cmte numeric, loans_made_by_cand numeric, all_other_loans numeric, ttl_loans numeric, offsets_to_op_exp numeric, offsets_to_fundraising_exp numeric, offsets_to_legal_acc_exp numeric, ttl_offsets_to_exp numeric, other_receipts numeric, ttl_receipts numeric, op_exp numeric, tranf_to_other_auth_cmte numeric, fundraising_disb numeric, exempt_legal_acc_disb numeric, repymts_loans_made_cand numeric, other_loan_repymts numeric, ttl_loan_repymts numeric, ref_indv_contb numeric, ref_pol_pty_cmte_contb numeric, ref_other_pol_cmte_contb numeric, total_contb_refunds numeric, other_disb numeric, total_disb numeric, items_to_be_liquidated numeric, imageno numeric, create_dt timestamp without time zone ); ALTER TABLE f3pz1 OWNER TO fec; -- -- Name: f3pz2; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f3pz2 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), pcc_comid character varying(9), pcc_com_name character varying(200), cvg_start_date date, cvg_end_date date, coh_bop numeric, coh_cop numeric, debts_owed_to_cmte numeric, debts_owed_by_committee numeric, exp_subject_to_limit numeric, net_contb numeric, net_op_exp numeric, federal_funds numeric, indv_contb numeric, pol_pty_contb numeric, other_pol_pty_contb numeric, cand_contb numeric, ttl_contb numeric, tranf_from_other_auth_cmte numeric, loans_made_by_cand numeric, all_other_loans numeric, ttl_loans numeric, offsets_to_op_exp numeric, offsets_to_fundraising_exp numeric, offsets_to_legal_acc_exp numeric, ttl_offsets_to_exp numeric, other_receipts numeric, ttl_receipts numeric, op_exp numeric, tranf_to_other_auth_cmte numeric, fundraising_disb numeric, exempt_legal_acc_disb numeric, repymts_loans_made_cand numeric, other_loan_repymts numeric, ttl_loan_repymts numeric, ref_indv_contb numeric, ref_pol_pty_cmte_contb numeric, ref_other_pol_cmte_contb numeric, total_contb_refunds numeric, other_disb numeric, total_disb numeric, items_to_be_liquidated numeric, imageno numeric, create_dt timestamp without time zone ); ALTER TABLE f3pz2 OWNER TO fec; -- -- Name: f3s; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f3s ( repid numeric(12,0) NOT NULL, comid character varying(9), ge_date date, dayafterge_dt date, imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f3s OWNER TO fec; -- -- Name: f3z; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f3z ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0) NOT NULL, total character varying(1), comid character varying(9), acomid character varying(9), pccname character varying(200), acom_name character varying(200), from_date date, through_date date, a numeric, b numeric, c numeric, d numeric, e numeric, f numeric, g numeric, h numeric, i numeric, j numeric, k numeric, l numeric, m numeric, n numeric, o numeric, p numeric, q numeric, r numeric, s numeric, t numeric, u numeric, v numeric, w numeric, x numeric, y numeric, z numeric, aa numeric, bb numeric, cc numeric, imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f3z OWNER TO fec; -- -- Name: f3z1; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f3z1 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), pcc_comid character varying(9), pcc_com_name character varying(200), cvg_start_date date, cvg_end_date date, auth_comid character varying(9), auth_com_name character varying(200), net_contb numeric, net_op_exp numeric, debts_owed_to_cmte numeric, debts_owed_by_committee numeric, indv_contb numeric, pol_pty_contb numeric, other_pol_pty_contb numeric, cand_contb numeric, ttl_contb numeric, tranf_from_other_auth_cmte numeric, loans_made_by_cand numeric, all_other_loans numeric, ttl_loans numeric, offsets_to_op_exp numeric, other_receipts numeric, ttl_receipts numeric, op_exp numeric, tranf_to_other_auth_cmte numeric, repymts_loans_made_cand numeric, other_loan_repymts numeric, ttl_loan_repymts numeric, ref_indv_contb numeric, ref_pol_pty_cmte_contb numeric, ref_other_pol_cmte_contb numeric, total_contb_refunds numeric, other_disb numeric, total_disb numeric, coh_bop numeric, coh_cop numeric, imageno numeric, create_dt timestamp without time zone ); ALTER TABLE f3z1 OWNER TO fec; -- -- Name: f3z2; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f3z2 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), pcc_comid character varying(9), pcc_com_name character varying(200), cvg_start_date date, cvg_end_date date, net_contb numeric, net_op_exp numeric, debts_owed_to_cmte numeric, debts_owed_by_committee numeric, indv_contb numeric, pol_pty_contb numeric, other_pol_pty_contb numeric, cand_contb numeric, ttl_contb numeric, tranf_from_other_auth_cmte numeric, loans_made_by_cand numeric, all_other_loans numeric, ttl_loans numeric, offsets_to_op_exp numeric, other_receipts numeric, ttl_receipts numeric, op_exp numeric, tranf_to_other_auth_cmte numeric, repymts_loans_made_cand numeric, other_loan_repymts numeric, ttl_loan_repymts numeric, ref_indv_contb numeric, ref_pol_pty_cmte_contb numeric, ref_other_pol_cmte_contb numeric, total_contb_refunds numeric, other_disb numeric, total_disb numeric, coh_bop numeric, coh_cop numeric, imageno numeric, create_dt timestamp without time zone ); ALTER TABLE f3z2 OWNER TO fec; -- -- Name: f4; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f4 ( repid numeric(12,0) NOT NULL, comid character varying(9), com_name character varying(200), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), con_type character varying(1), description character varying(40), rptcode character varying(3), from_date date, through_date date, lname character varying(90), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), year character varying(4), sign_date date, imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f4 OWNER TO fec; -- -- Name: f5; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f5 ( repid numeric(12,0) NOT NULL, comid character varying(9), entity character varying(3), com_name character varying(200), com_fname character varying(20), com_mname character varying(20), com_prefix character varying(10), com_suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(10), amend_addr character varying(1), qual character varying(1), indemp character varying(38), indocc character varying(38), rptcode character varying(3), rptpgi character varying(5), el_date date, el_state character varying(2), orig_amend_date date, from_date date, through_date date, total_con numeric, total_expe character varying(22), pcf_lname character varying(38), pcf_fname character varying(20), pcf_mname character varying(20), pcf_prefix character varying(10), pcf_suffix character varying(10), sign_date date, not_date date, expire_date date, lname character varying(38), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), h_code numeric, imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f5 OWNER TO fec; -- -- Name: f56; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f56 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), entity character varying(3), lname character varying(200), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), indemp character varying(38), indocc character varying(38), con_date date, amount numeric(12,2), other_comid character varying(9), other_canid character varying(9), can_name character varying(90), can_off character varying(1), can_state character varying(2), can_dist character varying(2), other_name character varying(90), other_str1 character varying(34), other_str2 character varying(34), other_city character varying(30), other_state character varying(2), other_zip character varying(9), amend character varying(1), tran_id character varying(32) NOT NULL, imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f56 OWNER TO fec; -- -- Name: f6; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f6 ( repid numeric(12,0) NOT NULL, comid character varying(9), orgamd_date date, com_name character varying(200), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), canid character varying(9), lname character varying(38), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), office character varying(1), can_state character varying(2), can_dist character varying(2), sign_lname character varying(30), sign_fname character varying(20), sign_mname character varying(20), sign_prefix character varying(10), sign_suffix character varying(10), sign_date date, imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f6 OWNER TO fec; -- -- Name: f65; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f65 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), entity character varying(3), lname character varying(200), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), indemp character varying(38), indocc character varying(38), con_date date, amount numeric(12,2), other_canid character varying(9), other_comid character varying(9), can_name character varying(90), can_off character varying(1), can_state character varying(2), can_dist character varying(2), other_name character varying(90), other_str1 character varying(34), other_str2 character varying(34), other_city character varying(30), other_state character varying(2), other_zip character varying(9), amend character varying(1), tran_id character varying(32) NOT NULL, imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f65 OWNER TO fec; -- -- Name: f7; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f7 ( repid numeric(12,0) NOT NULL, comid character varying(9), com_name character varying(200), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), org_type character varying(1), rptcode character varying(3), el_date date, el_state character varying(2), from_date date, through_date date, tot_cost numeric, lname character varying(90), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), sign_date date, title character varying(21), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f7 OWNER TO fec; -- -- Name: f76; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f76 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), comm_type character varying(2), description character varying(40), comm_class character varying(1), comm_date date, supop character varying(3), other_canid character varying(9), can_name character varying(90), can_fname character varying(20), can_mname character varying(20), can_prefix character varying(10), can_suffix character varying(10), can_off character varying(1), can_state character varying(2), can_dist character varying(2), rptpgi character varying(5), elec_desc character varying(20), comm_cost numeric, amend character varying(1), tran_id character varying(32) NOT NULL, imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f76 OWNER TO fec; -- -- Name: f8; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f8 ( repid numeric(12,0) NOT NULL, comid character varying(9), com_name character varying(200), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), l1 numeric, l1a date, l2 numeric, l3 numeric, l4 numeric, l5 numeric, l6 numeric, l7 numeric, l8 numeric, l9 numeric, l10 numeric, l11 character varying(1), l11d date, l12 character varying(1), l12d character varying(300), l13 character varying(1), l13d character varying(100), l14 character varying(1), l15 character varying(1), l15d character varying(100), suff character varying(1), suff_des character varying(100), lname character varying(90), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), sign_date date, imageno character varying(22), create_dt timestamp without time zone ); ALTER TABLE f8 OWNER TO fec; -- -- Name: f8ii; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f8ii ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), entity character varying(3), lname character varying(200), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), a_lname character varying(90), a_fname character varying(20), a_mname character varying(20), a_prefix character varying(10), a_suffix character varying(10), creditor_type character varying(3), inc_date date, amount_owed numeric(12,2), amount_off numeric(12,2), adesc character varying(100), bdesc character varying(100), cdesc character varying(100), dyn character varying(1), ddesc character varying(100), eyn character varying(1), edesc character varying(100), credit_comid character varying(9), credit_canid character varying(9), credit_lname character varying(30), credit_fname character varying(20), credit_mname character varying(20), credit_prefix character varying(10), credit_suffix character varying(10), credit_off character varying(1), credit_state character varying(2), credit_dist character varying(2), sign_date date, amend character varying(1), tran_id character varying(32) NOT NULL, imageno character varying(22), create_dt timestamp without time zone ); ALTER TABLE f8ii OWNER TO fec; -- -- Name: f8iii; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f8iii ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), entity character varying(3), lname character varying(200), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), creditor_type character varying(3), yesno character varying(1), inc_date date, amount_owed numeric(12,2), amount_exp numeric(12,2), credit_comid character varying(9), credit_canid character varying(9), credit_lname character varying(30), credit_fname character varying(20), credit_mname character varying(20), credit_prefix character varying(10), credit_suffix character varying(10), credit_off character varying(1), credit_state character varying(2), credit_dist character varying(2), amend character varying(1), tran_id character varying(32) NOT NULL, imageno character varying(22), create_dt timestamp without time zone ); ALTER TABLE f8iii OWNER TO fec; -- -- Name: f9; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f9 ( repid numeric(12,0) NOT NULL, comid character varying(9), entity character varying(3), lname character varying(200), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), addr_chg character varying(1), empl character varying(38), occup character varying(38), from_date date, through_date date, public_dist date, title character varying(40), qual_np character varying(1), filer_code character varying(3), filercd_desc character varying(20), segreg_bnk character varying(1), c_lname character varying(90), c_fname character varying(20), c_mname character varying(20), c_prefix character varying(10), c_suffix character varying(10), c_str1 character varying(34), c_str2 character varying(34), c_city character varying(30), c_state character varying(2), c_zip character varying(9), c_empl character varying(38), c_occup character varying(38), total numeric, disburs numeric, s_lname character varying(90), s_fname character varying(20), s_mname character varying(20), s_prefix character varying(10), s_suffix character varying(10), sign_date date, imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f9 OWNER TO fec; -- -- Name: f91; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f91 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), lname character varying(90), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), empl character varying(38), occup character varying(38), amend character varying(1), tran_id character varying(32) NOT NULL, imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f91 OWNER TO fec; -- -- Name: f92; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f92 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), entity character varying(3), lname character varying(200), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), item_elect_cd character varying(5), item_elect_oth character varying(20), indemp character varying(38), indocc character varying(38), ytd numeric, receipt_date date, amount numeric(12,2), trans_code character varying(3), trans_desc character varying(40), other_id character varying(9), canid character varying(9), can_name character varying(90), can_off character varying(1), can_state character varying(2), can_dist character varying(2), con_name character varying(200), con_str1 character varying(34), con_str2 character varying(34), con_city character varying(30), con_state character varying(2), con_zip character varying(9), memo_code character varying(1), memo_text character varying(100), amend character varying(1), tran_id character varying(32) NOT NULL, br_tran_id character varying(32), br_sname character varying(8), nc_softacct character varying(9), limit_ind character varying(1), con_orgname character varying(200), con_lname character varying(30), con_fname character varying(20), con_mname character varying(20), con_prefix character varying(10), con_suffix character varying(10), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f92 OWNER TO fec; -- -- Name: f93; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f93 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), entity character varying(3), lname character varying(200), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), trans_code character varying(3), trans_desc character varying(100), item_elect_cd character varying(5), item_elect_oth character varying(20), exp_date date, amount numeric(12,2), employer character varying(38), occupation character varying(38), other_id character varying(9), canid character varying(9), can_name character varying(90), can_off character varying(1), can_state character varying(2), can_dist character varying(2), con_name character varying(200), con_str1 character varying(34), con_str2 character varying(34), con_city character varying(30), con_state character varying(2), con_zip character varying(9), memo_code character varying(1), memo_text character varying(100), amend character varying(1), tran_id character varying(32) NOT NULL, br_tran_id character varying(32), br_sname character varying(8), nc_softacct character varying(9), refund character varying(1), cat_code character varying(3), com_date date, rec_orgname character varying(200), rec_lname character varying(30), rec_fname character varying(20), rec_mname character varying(20), rec_prefix character varying(10), rec_suffix character varying(10), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f93 OWNER TO fec; -- -- Name: f94; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f94 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), canid character varying(9), lname character varying(90), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), off character varying(1), state character varying(2), dist character varying(2), item_elect_cd character varying(5), item_elect_oth character varying(20), amend character varying(1), tran_id character varying(32) NOT NULL, br_tran_id character varying(32), br_sname character varying(8), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f94 OWNER TO fec; -- -- Name: f99; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE f99 ( repid numeric(12,0) NOT NULL, comid character varying(9), name character varying(200), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), lname character varying(90), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), sign_date date, text_code character varying(3), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE f99 OWNER TO fec; -- -- Name: guarantors; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE guarantors ( repid numeric(12,0) NOT NULL, comid character varying(9), line_num character varying(8), tran_id character varying(32) NOT NULL, refid character varying(32), lname character varying(90), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), indemp character varying(38), indocc character varying(38), amt_guar numeric(12,2), amend character varying(1), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE guarantors OWNER TO fec; -- -- Name: h1; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE h1 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), nat_rate numeric, hs_min numeric, hs_persupport numeric, hs_pernonfed numeric, hs_actsupport numeric, hs_actnonfed numeric, hs_actperfed numeric, est_persupport numeric, est_pernonfed numeric, act_support numeric, act_nonfed numeric, act_perfed numeric, pres character varying(1), sen character varying(1), hse character varying(1), subtotal character varying(1), gov character varying(1), other_sw character varying(1), state_sen character varying(1), state_rep character varying(1), local character varying(1), extra character varying(1), sub character varying(2), total character varying(2), fed_per numeric, amend character varying(1), tran_id character varying(32) NOT NULL, memo_code character varying(1), memo_text character varying(100), slp_pres character varying(1), slp_pres_sen character varying(1), slp_sen character varying(1), slp_non character varying(1), min_fedper character varying(1), federal numeric, non_federal numeric, admin_ratio character varying(1), gen_vd_ratio character varying(1), pub_crp_ratio character varying(1), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE h1 OWNER TO fec; -- -- Name: h2; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE h2 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), event character varying(90), fundraising character varying(1), exempt character varying(1), direct character varying(1), ratio_code character varying(1), fed_per numeric, nonfed_per numeric, amend character varying(1), tran_id character varying(32) NOT NULL, memo_code character varying(1), memo_text character varying(100), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE h2 OWNER TO fec; -- -- Name: h3; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE h3 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), refid character varying(32), account character varying(90), event character varying(90), event_type character varying(2), rec_date date, amount numeric(12,2), tot_amount numeric(12,2), amend character varying(1), tran_id character varying(32) NOT NULL, memo_code character varying(1), memo_text character varying(100), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE h3 OWNER TO fec; -- -- Name: h4_2; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE h4_2 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), tran_id character varying(32) NOT NULL, br_tran_id character varying(32), br_sname character varying(8), entity character varying(3), lname character varying(200), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), exp_desc character varying(100), event_date date, amount numeric(12,2), fed_share numeric(12,2), nonfed_share numeric(12,2), event_ytd numeric(12,2), trans_code character varying(3), purpose character varying(100), cat_code character varying(3), admin character varying(1), fundraising character varying(1), exempt character varying(1), gen_vote character varying(1), voter_drive character varying(1), support character varying(1), activity_pc character varying(1), memo_code character varying(1), memo_text character varying(100), amend character varying(1), imageno numeric(19,0), create_dt timestamp without time zone, can_name character varying(90), can_off character varying(1), can_state character varying(2), can_dist character varying(2), event_num character varying(10), other_canid character varying(9), other_comid character varying(9), other_name character varying(200), other_str1 character varying(34), other_str2 character varying(34), other_city character varying(30), other_state character varying(2), other_zip character varying(9), used character varying(1), upr_tran_id character varying(32) ); ALTER TABLE h4_2 OWNER TO fec; -- -- Name: h5; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE h5 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), lname character varying(200), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), receipt_date date, reg numeric, id numeric, gotv numeric, camp numeric, total numeric, amend character varying(1), tran_id character varying(32) NOT NULL, imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE h5 OWNER TO fec; -- -- Name: h6; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE h6 ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), entity character varying(3), lname character varying(200), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), cat_code character varying(3), trans_code character varying(3), trans_desc character varying(100), exp_date date, total numeric, federal numeric, levin numeric, reg character varying(1), id character varying(1), gotv character varying(1), camp character varying(1), ytd numeric, exp_desc character varying(100), other_id character varying(9), canid character varying(9), can_lname character varying(90), can_fname character varying(20), can_prefix character varying(10), can_suffix character varying(10), can_off character varying(1), can_state character varying(2), can_dist character varying(2), con_comid character varying(9), con_name character varying(200), con_str1 character varying(34), con_str2 character varying(34), con_city character varying(30), con_state character varying(2), con_zip character varying(9), memo_code character varying(1), memo_text character varying(100), amend character varying(1), tran_id character varying(32) NOT NULL, br_tran_id character varying(32), br_sname character varying(8), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE h6 OWNER TO fec; -- -- Name: i_sum; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE i_sum ( repid numeric(12,0), iid numeric, lineno numeric(12,0), cola numeric, colb numeric, create_dt timestamp without time zone ); ALTER TABLE i_sum OWNER TO fec; -- -- Name: issues; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE issues ( repid bigint, message character(3000) ); ALTER TABLE issues OWNER TO fec; -- -- Name: sc; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE sc ( repid numeric(12,0) NOT NULL, line_num character varying(8), rel_lineno numeric(12,0), refid character varying(32), entity character varying(3), comid character varying(9), lname character varying(200), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), code character varying(5), code_des character varying(20), orig_amt numeric(12,2), ptd numeric, balance numeric, date_inc date, date_due character varying(15), int_rate character varying(15), secured character varying(1), pers_funds character varying(1), other_comid character varying(9), other_canid character varying(9), can_name character varying(90), can_fname character varying(20), can_mname character varying(20), can_prefix character varying(10), can_suffix character varying(10), can_off character varying(1), can_state character varying(2), can_dist character varying(2), memo_cd character varying(1), memo_txt character varying(100), amend character varying(1), tran_id character varying(32) NOT NULL, rec_lineno character varying(8), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE sc OWNER TO fec; -- -- Name: sc1; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE sc1 ( repid numeric(12,0) NOT NULL, line_num character varying(8), rel_lineno numeric(12,0), tran_id character varying(32) NOT NULL, refid character varying(32), comid character varying(9), entity character varying(3), lender character varying(90), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), amount numeric(12,2), int_rate character varying(15), date_inc date, date_due character varying(15), restruct character varying(1), orig_date date, b1_credit numeric, balance numeric, others character varying(1), collateral character varying(1), coll_des character varying(100), coll_val numeric, perf_int character varying(1), future_inc character varying(1), fi_desc character varying(100), est_val numeric, account_date date, name_acc character varying(90), str1_acc character varying(34), str2_acc character varying(34), city_acc character varying(30), state_acc character varying(2), zip_acc character varying(9), a_date date, basis_desc character varying(100), t_lname character varying(90), t_fname character varying(20), t_mname character varying(20), t_prefix character varying(10), t_suffix character varying(10), signed_date date, lname character varying(90), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), auth_title character varying(20), auth_date date, amend character varying(1), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE sc1 OWNER TO fec; -- -- Name: sd; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE sd ( repid numeric(12,0) NOT NULL, line_num character varying(8), comid character varying(9), rel_lineno numeric(12,0), entity character varying(3), lname character varying(200), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), nature character varying(100), beg_balance numeric, incurred numeric, payment numeric, balance numeric, other_comid character varying(9), other_canid character varying(9), can_name character varying(90), can_off character varying(1), can_state character varying(2), can_dist character varying(2), other_name character varying(200), other_str1 character varying(34), other_str2 character varying(34), other_city character varying(30), other_state character varying(2), other_zip character varying(9), amend character varying(1), tran_id character varying(32) NOT NULL, imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE sd OWNER TO fec; -- -- Name: sf; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE sf ( repid numeric(12,0) NOT NULL, line_num character varying(8), rel_lineno numeric(12,0), comid character varying(9), entity character varying(3), cord_exp character varying(1), des_comid character varying(9), des_com_name character varying(200), sub_comid character varying(9), sub_com_name character varying(200), sub_str1 character varying(34), sub_str2 character varying(34), sub_city character varying(30), sub_state character varying(2), sub_zip character varying(9), lname character varying(200), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), str1 character varying(34), str2 character varying(34), city character varying(30), state character varying(2), zip character varying(9), canid character varying(9), can_name character varying(90), can_fname character varying(20), can_mname character varying(20), can_prefix character varying(10), can_suffix character varying(10), can_off character varying(1), can_state character varying(2), can_dist character varying(2), agg_amount numeric(12,2), transdesc character varying(100), t_date date, amount numeric(12,2), other_comid character varying(9), other_name character varying(200), other_str1 character varying(34), other_str2 character varying(34), other_city character varying(30), other_state character varying(2), other_zip character varying(9), amend character varying(1), tran_id character varying(32) NOT NULL, memo_code character varying(1), memo_text character varying(100), br_tran_id character varying(32), br_sname character varying(8), unlimit character varying(1), cat_code character varying(3), trans_code character varying(3), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE sf OWNER TO fec; -- -- Name: si; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE si ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), bankid character varying(16), account_name character varying(200), from_date date, to_date date, amend character varying(1), tran_id character varying(32) NOT NULL, acct_num character varying(9), imageno character varying(22), create_dt timestamp without time zone ); ALTER TABLE si OWNER TO fec; -- -- Name: sl; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE sl ( repid numeric(12,0) NOT NULL, rel_lineno numeric(12,0), comid character varying(9), lname character varying(200), fname character varying(20), mname character varying(20), prefix character varying(10), suffix character varying(10), rec_id character varying(9), from_date date, through_date date, ending numeric, amend character varying(1), tran_id character varying(32) NOT NULL, imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE sl OWNER TO fec; -- -- Name: sl_sum; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE sl_sum ( repid numeric(12,0) NOT NULL, iid numeric NOT NULL, lineno numeric(12,0) NOT NULL, cola numeric, colb numeric, create_dt timestamp without time zone ); ALTER TABLE sl_sum OWNER TO fec; -- -- Name: supsum; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE supsum ( repid numeric(12,0) NOT NULL, lineno numeric(12,0) NOT NULL, colbs numeric, create_dt timestamp without time zone ); ALTER TABLE supsum OWNER TO fec; -- -- Name: text; Type: TABLE; Schema: real_efile; Owner: fec -- CREATE TABLE text ( repid numeric(12,0) NOT NULL, comid character varying(9), tranid character varying(32) NOT NULL, rec_type character varying(8), br_tran_id character varying(32), text_id character varying(40), amend character varying(1), imageno numeric(19,0), create_dt timestamp without time zone ); ALTER TABLE text OWNER TO fec;
<reponame>mrudulpolus/kc CREATE OR REPLACE procedure GET_S2S_SUBMISSION_TYPE_CODES ( cur_generic IN OUT result_sets.cur_generic) is begin open cur_generic for SELECT S2S_SUBMISSION_TYPE_CODE, DESCRIPTION, UPDATE_TIMESTAMP, UPDATE_USER FROM OSP$S2S_SUBMISSION_TYPE; end; /
<reponame>qEasyChat/EasyChat CREATE TABLE IF NOT EXISTS User( id INTEGER PRIMARY KEY, username TEXT NOT NULL, password TEXT NOT NULL )
<reponame>ErikDono/EmployeeTracker<gh_stars>0 USE employees_DB; insert into role (title, salary, dept_id) values ('Junior Developer I', 70000.00, 1); insert into role (title, salary, dept_id) values ('Developer II', 110000.00, 1); insert into role (title, salary, dept_id) values ('Developer III', 140000.00, 1); insert into role (title, salary, dept_id) values ('Developer Manager', 160000.00, 1); insert into role (title, salary, dept_id) values ('Help Desk Manager', 90000.00, 2); insert into role (title, salary, dept_id) values ('Help Desk Technician', 60000.00, 2); insert into role (title, salary, dept_id) values ('VP Marketing', 300000, 3); insert into role (title, salary, dept_id) values ('Marketing Manager', 120000.00, 3); insert into role (title, salary, dept_id) values ('Marketing Assistant', 60000, 3); insert into role (title, salary, dept_id) values ('Marketing Director I', 950000.00, 3); insert into role (title, salary, dept_id) values ('Account Manager', 140000.00, 4); insert into role (title, salary, dept_id) values ('Account Director', 1000000.00, 4); insert into role (title, salary, dept_id) values ('Account Exectutive', 200000.00, 4); insert into role (title, salary, dept_id) values ('CEO', 500000.00, 5); insert into role (title, salary, dept_id) values ('CFO', 450000.00, 5); insert into role (title, salary, dept_id) values ('Board Member', 700000.00, 5); SELECT * FROM employee LEFT JOIN role ON employee.role_id = role.id; UPDATE employee SET title = 'Junior Developer I' WHERE id = '12'
<reponame>igoralves1/HSJ---PHP INSERT INTO patientecurrentsatus_history (fk_patient, disp_name_patient, paciente_session, fk_exam_status_type, disp_exam_status_type, dt_sys_admission, fk_tournee_medicale_fait, disp_tournee_medicale_fait, fk_tournee_med_nursing_available, disp_tournee_nursing_available, fk_patron, disp_name_patron, fk_type_med, disp_type_med, fk_fellow, disp_name_fellow, fk_nursing, disp_name_nursing, fk_pharmacist, roomnumber, disp_name_pharmacist, fk_resident, disp_name_resident, fk_type_nursing, disp_type_nursing, fk_type_assistance_respiratoire, disp_type_assistance_respiratoire, fk_isolement, disp_isolement, fk_codevacuation, fk_chargetravail, fk_traitmentsparticuliers, disp_traitmentsparticuliers, fk_deplacementcritique, disp_deplacementcritique, note, scheduled_departure, performed_departure, nb_lit_hospitalier, mouvement_alert, codevacuation_hexacode, traitmentsparticuliers_hexacode, mouvement_alert_path, fk_type_conge, disp_type_conge, disp_type_conge_hexacode) SELECT fk_patient, disp_name_patient, paciente_session, fk_exam_status_type, disp_exam_status_type, dt_sys_admission, fk_tournee_medicale_fait, disp_tournee_medicale_fait, fk_tournee_med_nursing_available, disp_tournee_nursing_available, fk_patron, disp_name_patron, fk_type_med, disp_type_med, fk_fellow, disp_name_fellow, fk_nursing, disp_name_nursing, fk_pharmacist, roomnumber, disp_name_pharmacist, fk_resident, disp_name_resident, fk_type_nursing, disp_type_nursing, fk_type_assistance_respiratoire, disp_type_assistance_respiratoire, fk_isolement, disp_isolement, fk_codevacuation, fk_chargetravail, fk_traitmentsparticuliers, disp_traitmentsparticuliers, fk_deplacementcritique, disp_deplacementcritique, note, scheduled_departure, performed_departure, nb_lit_hospitalier, mouvement_alert, codevacuation_hexacode, traitmentsparticuliers_hexacode, mouvement_alert_path, fk_type_conge, disp_type_conge, disp_type_conge_hexacode FROM patientecurrentsatus PST WHERE PST.roomnumber='20' INSERT INTO examcurrentsession_history (fk_exam, fk_session, dt_requested, dt_prevu, dt_finished, fk_status_type, note, dt_sys) SELECT fk_exam, fk_session, dt_requested, dt_prevu, dt_finished, fk_status_type, note, dt_sys FROM examcurrentsession ECS WHERE ECS.fk_session='abc_session_1' INSERT INTO `hsjsi`.`` (`dt_current`, ``, ``, `fellow_name_concatenated`, `type_med_type`, `status_at_work`) VALUES ('gdf', 'df', 'dfg', 'dfg', 'dfg', 'dfg'); INSERT INTO fellow_type_med_availability (dt_current, fk_type_med, fk_fellow, fellow_name_concatenated, type_med_type, status_at_work) VALUES (NOW(), '1','1', 'BARTHÉL<NAME>', '<NAME>', '1'), ('2016-05-01 10:12:18', '1','1', 'BARTHÉLÉMY. S', '<NAME>', '0'), ('2016-02-01 10:12:18', '1','1', 'BARTHÉLÉMY. S', '<NAME>', '0'), ('2016-03-01 10:12:18', '1','1', 'BARTHÉLÉMY. S', '<NAME>', '0'), (NOW(), '2','2', 'CHOMTON. M ', 'Pediatrie A', '1'), ('2016-05-01 10:12:18', '2','2', 'CHOMTON. M', 'Pediatrie A', '0'), ('2016-02-01 10:12:18', '2','2', 'CHOMTON. M', 'Pediatrie A', '0'), ('2016-03-01 10:12:18', '2','2', 'CHOMTON. M', 'Pediatrie A', '0'), (NOW(), '3','4', 'DE CLOEDT. L', 'Pediatrie B', '1'), ('2016-05-01 10:12:18', '3','4', 'DE CLOEDT. L', 'Pediatrie B', '0'), ('2016-02-01 10:12:18', '3','4', 'DE CLOEDT. L', 'Pediatrie B', '0'), ('2016-03-01 10:12:18', '3','4', 'DE CLOEDT. L', 'Pediatrie B', '0'); -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema hsjsi -- ----------------------------------------------------- -- ----------------------------------------------------- -- Schema hsjsi -- ----------------------------------------------------- CREATE SCHEMA IF NOT EXISTS `hsjsi` DEFAULT CHARACTER SET utf8 ; USE `hsjsi` ; -- ----------------------------------------------------- -- Table `hsjsi`.`userprivileges` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`userprivileges` ( `id` INT NOT NULL AUTO_INCREMENT, `privileges` VARCHAR(80) NOT NULL COMMENT '0-Admin\n1-Child(father)\n2-Others (see later)', `description` VARCHAR(80) NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`userapp` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`userapp` ( `id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(80) NOT NULL, `last_name` VARCHAR(80) NOT NULL, `active` VARCHAR(1) NOT NULL DEFAULT 0 COMMENT '0-no\n1-yes', `login` VARCHAR(80) NOT NULL COMMENT 'suggestion - profissional e-mail', `password` VARCHAR(80) NOT NULL, `fk_userprivileges` INT NOT NULL, `dt_sys` DATETIME NOT NULL, PRIMARY KEY (`id`), UNIQUE INDEX `login_UNIQUE` (`login` ASC), INDEX `fkusrpriv_idx` (`fk_userprivileges` ASC), CONSTRAINT `fkusrpriv` FOREIGN KEY (`fk_userprivileges`) REFERENCES `hsjsi`.`userprivileges` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`patient` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`patient` ( `id` BIGINT NOT NULL AUTO_INCREMENT, `nb_dossier` VARCHAR(50) NOT NULL, `first_name` VARCHAR(80) NOT NULL, `last_name` VARCHAR(80) NOT NULL, `status` VARCHAR(1) NOT NULL COMMENT '0-inactive\n1-active', `dt_sys` DATETIME NOT NULL, PRIMARY KEY (`id`), UNIQUE INDEX `nb_dossier_UNIQUE` (`nb_dossier` ASC)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`nursing` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`nursing` ( `id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(80) NOT NULL, `last_name` VARCHAR(80) NOT NULL, `pic` VARCHAR(80) NULL, `status` VARCHAR(1) NOT NULL DEFAULT 0, `dt_sys` DATETIME NOT NULL, `tel` VARCHAR(15) NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`typeresident` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`typeresident` ( `id` INT NOT NULL AUTO_INCREMENT, `description` VARCHAR(80) NOT NULL, `dt_sys` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`resident` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`resident` ( `id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(80) NOT NULL, `last_name` VARCHAR(80) NOT NULL, `pic` VARCHAR(80) NULL, `fk_type` INT NOT NULL, `status` VARCHAR(1) NOT NULL DEFAULT 0 COMMENT '0-inactive\n1-active', `dt_sys` DATETIME NOT NULL, `tel` VARCHAR(15) NULL, PRIMARY KEY (`id`), INDEX `fkresidtyppe_idx` (`fk_type` ASC), CONSTRAINT `fkresidtyppe` FOREIGN KEY (`fk_type`) REFERENCES `hsjsi`.`typeresident` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`type_nursing` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`type_nursing` ( `id` INT NOT NULL AUTO_INCREMENT, `type` VARCHAR(100) NOT NULL COMMENT '1-Soins intensif Pediatric \n2-Soins intensif Intermediaire', `description` MEDIUMTEXT NULL, `dt_sys` DATETIME NOT NULL, PRIMARY KEY (`id`, `type`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`type_med` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`type_med` ( `id` INT NOT NULL AUTO_INCREMENT, `type` VARCHAR(80) NOT NULL COMMENT '1-N/A\n2-Cardiac surgery\n3-Pediatric I\n4-Pediatric II\n', `description` MEDIUMTEXT NULL, `disp_type_med` VARCHAR(80) NOT NULL COMMENT 'A - Pedi A\nB - Pedi B\nC - Chir Cardiac\n', `dt_sys` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`type_assistance_respiratoire` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`type_assistance_respiratoire` ( `id` INT NOT NULL AUTO_INCREMENT, `type` VARCHAR(80) NOT NULL COMMENT '1-N/A\n2-NV - Non ventile\n3-VNI - Ventile non invasiv\n4-VI - Ventile invasif ', `description` MEDIUMTEXT NULL, `dt_sys` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`isolement` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`isolement` ( `id` INT NOT NULL AUTO_INCREMENT, `isolement` VARCHAR(80) NOT NULL COMMENT '1-Contact (vert)\n2-Goutellettes –contact (bleu)\n3-Contact + (violet)\n4-Goutellettes (bleu pâle)\n5-Préventif (orange)\n6-Aérien (rouge)', `description` MEDIUMTEXT NULL, `hexrgbcode` VARCHAR(7) NOT NULL DEFAULT '#', `dt_sys` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`evacuation` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`evacuation` ( `id` INT NOT NULL AUTO_INCREMENT, `evacuation` VARCHAR(80) NOT NULL COMMENT '1-Vert\n2-Jaune\n3-Rouge', `description` MEDIUMTEXT NULL, `hexrgbcode` VARCHAR(7) NOT NULL DEFAULT '#', `dt_sys` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`chargetravail` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`chargetravail` ( `id` INT NOT NULL AUTO_INCREMENT, `chargetravail` VARCHAR(80) NOT NULL, `description` MEDIUMTEXT NULL, `hexrgbcode` VARCHAR(7) NOT NULL DEFAULT '#' COMMENT '1\n2\n3\n4', `dt_sys` DATETIME NOT NULL, PRIMARY KEY (`id`, `chargetravail`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`fellow` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`fellow` ( `id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(80) NOT NULL, `last_name` VARCHAR(80) NOT NULL, `pic` VARCHAR(80) NULL, `status` VARCHAR(1) NOT NULL DEFAULT 0 COMMENT '0-inactive\n1-active', `dt_sys` DATETIME NOT NULL, `tel` VARCHAR(15) NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`pharmacist` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`pharmacist` ( `id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(80) NOT NULL, `last_name` VARCHAR(80) NOT NULL, `pic` VARCHAR(80) NULL, `status` VARCHAR(1) NOT NULL DEFAULT 0, `dt_sys` DATETIME NOT NULL, `tel` VARCHAR(15) NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`patron` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`patron` ( `id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(80) NOT NULL, `last_name` VARCHAR(80) NOT NULL, `pic` VARCHAR(80) NULL, `status` VARCHAR(1) NOT NULL DEFAULT 0, `dt_sys` DATETIME NOT NULL, `tel` VARCHAR(15) NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`room` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`room` ( `id` INT NOT NULL AUTO_INCREMENT, `roomnumber` VARCHAR(5) NOT NULL, `pression` VARCHAR(20) NOT NULL DEFAULT 0 COMMENT '0-N/A\n1-Positive\n2-Negative\n', `hemodialysis` VARCHAR(20) NOT NULL DEFAULT 0 COMMENT '0-no\n1-yes', `soins_palliatif` VARCHAR(20) NULL, `tel` VARCHAR(20) NOT NULL DEFAULT 0, `virtualroom` VARCHAR(1) NULL COMMENT '0-no\n1-yes\n', `dt_sys` VARCHAR(80) NOT NULL, `mac_addrss` VARCHAR(80) NOT NULL, PRIMARY KEY (`id`), UNIQUE INDEX `roomnumber_UNIQUE` (`roomnumber` ASC)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`traitements_particuliers` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`traitements_particuliers` ( `id` INT NOT NULL AUTO_INCREMENT, `type` VARCHAR(80) NOT NULL COMMENT '1-N/A\n2-NV - Non ventile\n3-VNI - Ventile non invasiv\n4-VI - Ventile invasif ', `description` MEDIUMTEXT NULL, `hexrgbcode` VARCHAR(7) NOT NULL DEFAULT '#' COMMENT '1\n2\n3\n4', `dt_sys` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`deplacement_critique` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`deplacement_critique` ( `id` INT NOT NULL AUTO_INCREMENT, `type` VARCHAR(80) NOT NULL, `description` MEDIUMTEXT NULL, `hexrgbcode` VARCHAR(7) NOT NULL DEFAULT '#' COMMENT '1\n2\n3\n4', `dt_sys` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`examstatus_type` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`examstatus_type` ( `id` INT NOT NULL AUTO_INCREMENT, `type` VARCHAR(80) NOT NULL COMMENT '0-N/A (no exams was assigned)\n2-waiting (at laste one exam was not done)\n1-done (all exams in the list must be done)', PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`tournee_medicale_type` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`tournee_medicale_type` ( `id` INT NOT NULL AUTO_INCREMENT, `type` VARCHAR(80) NOT NULL COMMENT '0-Non\n1-Oui', PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`tournee_med_nursing_available_type` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`tournee_med_nursing_available_type` ( `id` INT NOT NULL AUTO_INCREMENT, `type` VARCHAR(80) NULL COMMENT '0-Non\n1-Oui\n', PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`type_conge` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`type_conge` ( `id` INT NOT NULL AUTO_INCREMENT, `type` VARCHAR(80) NOT NULL COMMENT 'NA\nCONGE ETAGE - #032149\nCONGE MAISON - #074daa\nCONGE TEMPORAIRE - #045b61', `description` MEDIUMTEXT NULL, `hexrgbcode` VARCHAR(7) NOT NULL DEFAULT '#', `dt_sys` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`patientecurrentsatus` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`patientecurrentsatus` ( `fk_patient` BIGINT NOT NULL COMMENT 'This table will store only the current status of the patient.\nEach change, makes to save the current staus in a history table and the aplly the changes in a history table.\nOnce the tratement has ended, this is the final status, grab the whole line, save inside the history and delete from current status. ', `disp_name_patient` VARCHAR(100) NOT NULL, `paciente_session` VARCHAR(50) NOT NULL COMMENT 'That will be a number like SESSION. Composed by \npatient.nb_dossier+datetime+milisseconds. (created by the system)\n\nthis number will be used to track a patinent session in te service.\nwill be used to link to exams', `fk_exam_status_type` INT NOT NULL DEFAULT 0 COMMENT '0-N/A (no exams was assigned)\n1-waiting (at laste one exam was not done)\n2-done (all exams in the list must be done)\n\n', `disp_exam_status_type` VARCHAR(100) NOT NULL, `dt_sys_admission` DATETIME NOT NULL, `fk_tournee_medicale_fait` INT NOT NULL DEFAULT 0 COMMENT 'tournoi medicale was done\n0-Non\n1-Oui', `disp_tournee_medicale_fait` VARCHAR(100) NOT NULL, `fk_tournee_med_nursing_available` INT NOT NULL COMMENT 'Nursing is avaliable pour le tournoi\n0-Non\n1-Oui\n', `disp_tournee_nursing_available` VARCHAR(100) NOT NULL, `fk_patron` INT NOT NULL, `disp_name_patron` VARCHAR(100) NOT NULL, `fk_type_med` INT NOT NULL, `disp_type_med` VARCHAR(100) NOT NULL, `fk_fellow` INT NOT NULL, `disp_name_fellow` VARCHAR(100) NOT NULL, `fk_nursing` INT NOT NULL, `disp_name_nursing` VARCHAR(100) NOT NULL, `fk_pharmacist` INT NOT NULL, `roomnumber` VARCHAR(5) NOT NULL COMMENT 'do not use id becaouse there is no room nb 13', `disp_name_pharmacist` VARCHAR(100) NOT NULL, `fk_resident` INT NOT NULL, `disp_name_resident` VARCHAR(100) NOT NULL, `fk_type_nursing` INT NOT NULL, `disp_type_nursing` VARCHAR(100) NOT NULL, `fk_type_assistance_respiratoire` INT NOT NULL, `disp_type_assistance_respiratoire` VARCHAR(100) NOT NULL, `fk_isolement` INT NOT NULL, `disp_isolement` VARCHAR(100) NOT NULL, `fk_codevacuation` INT NOT NULL, `fk_chargetravail` INT NOT NULL, `fk_traitmentsparticuliers` INT NOT NULL, `disp_traitmentsparticuliers` VARCHAR(100) NOT NULL, `fk_deplacementcritique` INT NOT NULL, `disp_deplacementcritique` VARCHAR(100) NOT NULL, `note` LONGTEXT NULL, `scheduled_departure` DATETIME NULL, `performed_departure` DATETIME NULL, `nb_lit_hospitalier` VARCHAR(50) NOT NULL, `mouvement_alert` VARCHAR(80) NOT NULL DEFAULT '1' COMMENT '0-Non\n1-Oui', `codevacuation_hexacode` VARCHAR(8) NULL, `traitmentsparticuliers_hexacode` VARCHAR(8) NULL, `mouvement_alert_path` VARCHAR(80) NULL DEFAULT '\"\"', `fk_type_conge` INT NOT NULL, `disp_type_conge` VARCHAR(80) NOT NULL, `disp_type_conge_hexacode` VARCHAR(80) NOT NULL, PRIMARY KEY (`fk_patient`, `paciente_session`, `dt_sys_admission`, `roomnumber`), INDEX `fkkpatientt_idx` (`fk_patient` ASC), INDEX `fkkresidentt_idx` (`fk_resident` ASC), INDEX `fkknursing_idx` (`fk_nursing` ASC), INDEX `fkktypnurs_idx` (`fk_type_nursing` ASC), INDEX `fkktpmeed_idx` (`fk_type_med` ASC), INDEX `fkktypassresp_idx` (`fk_type_assistance_respiratoire` ASC), INDEX `fkkisolamnt_idx` (`fk_isolement` ASC), INDEX `fkkevacuation_idx` (`fk_codevacuation` ASC), INDEX `fkkchargetravail_idx` (`fk_chargetravail` ASC), UNIQUE INDEX `pacientesession_UNIQUE` (`paciente_session` ASC), INDEX `fkkpharmacistfg_idx` (`fk_pharmacist` ASC), INDEX `fkkpattronn_idx` (`fk_patron` ASC), INDEX `fkroomnnmbbr_idx` (`roomnumber` ASC), INDEX `fk_traitmmmnetpart_idx` (`fk_traitmentsparticuliers` ASC), INDEX `fk_deplaccritq_idx` (`fk_deplacementcritique` ASC), INDEX `fkkfellow_idx` (`fk_fellow` ASC), INDEX `fk_sttatus_eexams_ttype_idx` (`fk_exam_status_type` ASC), INDEX `fk_tour_med_idx` (`fk_tournee_medicale_fait` ASC), INDEX `fk_tour_nursg_idx` (`fk_tournee_med_nursing_available` ASC), INDEX `fk_fkcongetype_idx` (`fk_type_conge` ASC), UNIQUE INDEX `roomnumber_UNIQUE` (`roomnumber` ASC), CONSTRAINT `fkkpatientt` FOREIGN KEY (`fk_patient`) REFERENCES `hsjsi`.`patient` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fkkresidentt` FOREIGN KEY (`fk_resident`) REFERENCES `hsjsi`.`resident` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fkknursing` FOREIGN KEY (`fk_nursing`) REFERENCES `hsjsi`.`nursing` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fkktypnurs` FOREIGN KEY (`fk_type_nursing`) REFERENCES `hsjsi`.`type_nursing` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fkktpmeed` FOREIGN KEY (`fk_type_med`) REFERENCES `hsjsi`.`type_med` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fkktypassresp` FOREIGN KEY (`fk_type_assistance_respiratoire`) REFERENCES `hsjsi`.`type_assistance_respiratoire` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fkkisolamnt` FOREIGN KEY (`fk_isolement`) REFERENCES `hsjsi`.`isolement` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fkkevacuation` FOREIGN KEY (`fk_codevacuation`) REFERENCES `hsjsi`.`evacuation` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fkkchargetravail` FOREIGN KEY (`fk_chargetravail`) REFERENCES `hsjsi`.`chargetravail` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fkkfellow` FOREIGN KEY (`fk_fellow`) REFERENCES `hsjsi`.`fellow` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fkkpharmacistfg` FOREIGN KEY (`fk_pharmacist`) REFERENCES `hsjsi`.`pharmacist` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fkkpattronn` FOREIGN KEY (`fk_patron`) REFERENCES `hsjsi`.`patron` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fkroomnnmbbr` FOREIGN KEY (`roomnumber`) REFERENCES `hsjsi`.`room` (`roomnumber`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_traitmmmnetpart` FOREIGN KEY (`fk_traitmentsparticuliers`) REFERENCES `hsjsi`.`traitements_particuliers` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_deplaccritq` FOREIGN KEY (`fk_deplacementcritique`) REFERENCES `hsjsi`.`deplacement_critique` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_sttatus_eexams_ttype` FOREIGN KEY (`fk_exam_status_type`) REFERENCES `hsjsi`.`examstatus_type` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_tour_med` FOREIGN KEY (`fk_tournee_medicale_fait`) REFERENCES `hsjsi`.`tournee_medicale_type` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_tour_nursg` FOREIGN KEY (`fk_tournee_med_nursing_available`) REFERENCES `hsjsi`.`tournee_med_nursing_available_type` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_fkcongetype` FOREIGN KEY (`fk_type_conge`) REFERENCES `hsjsi`.`type_conge` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`statusroom` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`statusroom` ( `id` INT NOT NULL AUTO_INCREMENT, `statusroom` VARCHAR(80) NOT NULL, `description` VARCHAR(50) NULL COMMENT '1-Disponible\n2-Occupé\n3-À désinfecter\n4-Indisponible', `hexrgbcode` VARCHAR(7) NOT NULL DEFAULT '#', `dt_sys` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`roomcurrentstatus` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`roomcurrentstatus` ( `fk_room` INT NOT NULL COMMENT 'Store the current status for each room.\nAs we have 32 rooms, we will have 32 status.\nThe status history will be stored in roomstatushistory', `fk_statusroom` INT NOT NULL, `dt_sys` DATETIME NOT NULL, INDEX `fkkstatusrrromfk_idx` (`fk_statusroom` ASC), INDEX `fkroomstatukfk_idx` (`fk_room` ASC), PRIMARY KEY (`fk_room`), CONSTRAINT `fkkstatusrrromfk` FOREIGN KEY (`fk_statusroom`) REFERENCES `hsjsi`.`statusroom` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fkroomstatukfk` FOREIGN KEY (`fk_room`) REFERENCES `hsjsi`.`room` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`type_exams` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`type_exams` ( `id` INT NOT NULL AUTO_INCREMENT, `type` VARCHAR(80) NULL COMMENT '1-bloc\n2-exam', `hexrgbcode` VARCHAR(7) NOT NULL DEFAULT '#' COMMENT '1\n2\n3\n4', PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`exams` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`exams` ( `id` INT NOT NULL AUTO_INCREMENT, `exams` VARCHAR(80) NOT NULL, `place` VARCHAR(100) NULL, `descripion` MEDIUMTEXT NULL, `hexrgbcode` VARCHAR(7) NOT NULL DEFAULT '#' COMMENT '1\n2\n3\n4', `fk_type_exams` INT NOT NULL, PRIMARY KEY (`id`), INDEX `fk_exams_type_idx` (`fk_type_exams` ASC), CONSTRAINT `fk_exams_type` FOREIGN KEY (`fk_type_exams`) REFERENCES `hsjsi`.`type_exams` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`examcurrentsession` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`examcurrentsession` ( `id` INT NOT NULL AUTO_INCREMENT COMMENT 'Will store the current status of each exam for each current patient SESSTION.\n', `fk_exam` INT NOT NULL, `fk_session` VARCHAR(50) NOT NULL, `dt_requested` DATETIME NULL, `dt_prevu` DATETIME NULL, `dt_finished` VARCHAR(80) NULL, `fk_status_type` INT NOT NULL DEFAULT '1' COMMENT '1-waiting\n2-done\n\n0-N/A (no exams was assigned)\n1-waiting (at laste one exam was not done)\n2-done (all exams in the list must be done)', `note` MEDIUMTEXT NULL, `dt_sys` DATETIME NOT NULL, PRIMARY KEY (`id`), INDEX `fkexamm_idx` (`fk_exam` ASC), INDEX `fkksessionpatient_idx` (`fk_session` ASC), INDEX `fkexamsttta_idx` (`fk_status_type` ASC), CONSTRAINT `fkksessionpatient` FOREIGN KEY (`fk_session`) REFERENCES `hsjsi`.`patientecurrentsatus` (`paciente_session`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fkexamm` FOREIGN KEY (`fk_exam`) REFERENCES `hsjsi`.`exams` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fkexamsttta` FOREIGN KEY (`fk_status_type`) REFERENCES `hsjsi`.`examstatus_type` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB COMMENT = 'All the data related to each patient session will stay in this table untill patient will be relased from the service.\nOnce the patient is released, the data will be send to patientexamshistory and deleted fom examcurrentsession.\nSo the best approach to gram information will be \" select * \" then create an array of exams for each fk_session'; -- ----------------------------------------------------- -- Table `hsjsi`.`examcurrentsession_history` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`examcurrentsession_history` ( `id` INT NOT NULL AUTO_INCREMENT COMMENT 'Will store the current status of each exam for each current patient SESSTION.\n', `fk_exam` INT NOT NULL, `fk_session` VARCHAR(50) NOT NULL, `dt_requested` DATETIME NULL, `dt_prevu` DATETIME NULL, `dt_finished` VARCHAR(80) NULL, `statusdone` VARCHAR(1) NOT NULL DEFAULT '1' COMMENT '1-waiting\n2-done', `note` MEDIUMTEXT NULL, `dt_sys` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`parentspatient` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`parentspatient` ( `fk_userapp` INT NOT NULL, `fk_patient` BIGINT NOT NULL, `statusactive` VARCHAR(1) NULL DEFAULT '1', `dt_sys` DATETIME NOT NULL, PRIMARY KEY (`fk_userapp`, `fk_patient`), INDEX `fkkpattie_idx` (`fk_patient` ASC), CONSTRAINT `fkuserapppppat` FOREIGN KEY (`fk_userapp`) REFERENCES `hsjsi`.`userapp` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fkkpattie` FOREIGN KEY (`fk_patient`) REFERENCES `hsjsi`.`patient` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`agentsalubrite` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`agentsalubrite` ( `id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(80) NOT NULL, `last_name` VARCHAR(80) NOT NULL, `pic` VARCHAR(80) NULL, `status` VARCHAR(1) NOT NULL DEFAULT 0, `tel` VARCHAR(15) NULL, `dt_sys` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`roomcleaning` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`roomcleaning` ( `fk_room` INT NOT NULL, `fk_agentsalublite` INT NOT NULL, `performed_cleaning` DATETIME NULL, `dt_sys` DATETIME NOT NULL, INDEX `fkagentsal_idx` (`fk_agentsalublite` ASC), INDEX `fkrrommsal_idx` (`fk_room` ASC), CONSTRAINT `fkagentsal` FOREIGN KEY (`fk_agentsalublite`) REFERENCES `hsjsi`.`agentsalubrite` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fkrrommsal` FOREIGN KEY (`fk_room`) REFERENCES `hsjsi`.`room` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`chefeequipe` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`chefeequipe` ( `id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(80) NOT NULL, `last_name` VARCHAR(80) NOT NULL, `pic` VARCHAR(80) NULL, `status` VARCHAR(1) NOT NULL DEFAULT 0, `dt_sys` DATETIME NOT NULL, `tel` VARCHAR(15) NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`chefeunite` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`chefeunite` ( `id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(80) NOT NULL, `last_name` VARCHAR(80) NOT NULL, `pic` VARCHAR(80) NULL, `status` VARCHAR(1) NOT NULL DEFAULT 0, `dt_sys` DATETIME NOT NULL, `tel` VARCHAR(15) NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`assistant` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`assistant` ( `id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(80) NOT NULL, `last_name` VARCHAR(80) NOT NULL, `pic` VARCHAR(80) NULL, `status` VARCHAR(1) NOT NULL DEFAULT 0, `dt_sys` DATETIME NOT NULL, `tel` VARCHAR(15) NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`prepose` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`prepose` ( `id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(80) NOT NULL, `last_name` VARCHAR(80) NOT NULL, `pic` VARCHAR(80) NULL, `status` VARCHAR(1) NOT NULL DEFAULT 0, `dt_sys` DATETIME NOT NULL, `tel` VARCHAR(15) NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`agentadmin` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`agentadmin` ( `id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(80) NOT NULL, `last_name` VARCHAR(80) NOT NULL, `pic` VARCHAR(80) NULL, `status` VARCHAR(1) NOT NULL DEFAULT 0, `dt_sys` DATETIME NOT NULL, `tel` VARCHAR(15) NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`roomstatushistory` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`roomstatushistory` ( `fk_room` INT NOT NULL COMMENT 'Sote the room status history', `fk_statusroom` INT NOT NULL, `dt_sys` DATETIME NOT NULL) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`inhalotherapeute` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`inhalotherapeute` ( `id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(80) NOT NULL, `last_name` VARCHAR(80) NOT NULL, `pic` VARCHAR(80) NULL, `status` VARCHAR(1) NOT NULL DEFAULT 0, `dt_sys` DATETIME NOT NULL, `tel` VARCHAR(15) NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`patron_type_med_availability` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`patron_type_med_availability` ( `id` BIGINT NOT NULL AUTO_INCREMENT, `dt_current` DATETIME NOT NULL, `fk_patron` INT NOT NULL, `fk_type_med` INT NOT NULL COMMENT 'there will only have the numbrs of type_med for the specific date.\nEx, for today there are 3 different types of type_med. Must assign \nwith patron will be related to the type_med.\nWhen change will be apllyied store the information in a table and clear the content of this table.\nThan store all relationship agaig.\nAt the end of the process we will only have the numbers of line thesam one of the numbers of type_med\n\nWhen', `patron_name_concatenated` VARCHAR(80) NULL, `type_med_type` VARCHAR(80) NULL, `status_at_work` VARCHAR(1) NOT NULL COMMENT 'For the current day.\nWho is working (active)?\n1-not active\n2-active\n\n', PRIMARY KEY (`id`), INDEX `fk_patrtymedavali_idx` (`fk_patron` ASC), INDEX `fk_typmedavalia_idx` (`fk_type_med` ASC), CONSTRAINT `fk_patrtymedavali` FOREIGN KEY (`fk_patron`) REFERENCES `hsjsi`.`patron` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_typmedavalia` FOREIGN KEY (`fk_type_med`) REFERENCES `hsjsi`.`type_med` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`fellow_type_med_availability` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`fellow_type_med_availability` ( `id` INT NOT NULL AUTO_INCREMENT, `dt_current` DATETIME NOT NULL, `fk_type_med` INT NOT NULL COMMENT 'there will only have the numbrs of type_med for the specific date.\nEx, for today there are 3 different types of type_med. Must assign \nwith patron will be related to the type_med.\nWhen change will be apllyied store the information in a table and clear the content of this table.\nThan store all relationship agaig.\nAt the end of the process we will only have the numbers of line thesam one of the numbers of type_med\n\nWhen', `fk_fellow` INT NOT NULL, `fellow_name_concatenated` VARCHAR(80) NULL, `type_med_type` VARCHAR(80) NULL, `status_at_work` VARCHAR(1) NOT NULL COMMENT 'For the current day.\nWho is working (active)?\n1-not active\n2-active\n\n', PRIMARY KEY (`id`), INDEX `fk_type_med_fellowfk_idx` (`fk_type_med` ASC), INDEX `fk_fellow_fktp_idx` (`fk_fellow` ASC), CONSTRAINT `fk_type_med_fellowfk` FOREIGN KEY (`fk_type_med`) REFERENCES `hsjsi`.`type_med` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_fellow_fktp` FOREIGN KEY (`fk_fellow`) REFERENCES `hsjsi`.`fellow` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`chefeunite_current_status` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`chefeunite_current_status` ( `id` INT NOT NULL AUTO_INCREMENT, `fk_chefeunite` INT NOT NULL, `disp_name` VARCHAR(80) NOT NULL, `dt_sys` DATETIME NOT NULL, `status_at_work` VARCHAR(1) NOT NULL COMMENT 'For the current day.\nWho is working (active)?\n1-not active\n2-active\n\n', PRIMARY KEY (`id`), INDEX `fk_chefunitfk_idx` (`fk_chefeunite` ASC), CONSTRAINT `fk_chefunitfk` FOREIGN KEY (`fk_chefeunite`) REFERENCES `hsjsi`.`chefeunite` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`inhalo_current_status` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`inhalo_current_status` ( `id` INT NOT NULL AUTO_INCREMENT, `fk_inhalo` INT NOT NULL, `disp_name` VARCHAR(80) NOT NULL, `dt_sys` DATETIME NOT NULL, `status_at_work` VARCHAR(1) NOT NULL COMMENT 'For the current day.\nWho is working (active)?\n1-not active\n2-active\n\n', PRIMARY KEY (`id`), INDEX `fk_inhalocst_idx` (`fk_inhalo` ASC), CONSTRAINT `fk_inhalocst` FOREIGN KEY (`fk_inhalo`) REFERENCES `hsjsi`.`inhalotherapeute` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`prepose_current_status` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`prepose_current_status` ( `id` INT NOT NULL AUTO_INCREMENT, `fk_prepose` INT NOT NULL, `disp_name` VARCHAR(80) NOT NULL, `dt_sys` DATETIME NOT NULL, `status_at_work` VARCHAR(1) NOT NULL COMMENT 'For the current day.\nWho is working (active)?\n1-not active\n2-active\n\n', PRIMARY KEY (`id`), INDEX `fk_prepfk_idx` (`fk_prepose` ASC), CONSTRAINT `fk_prepfk` FOREIGN KEY (`fk_prepose`) REFERENCES `hsjsi`.`prepose` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`assistant_current_status` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`assistant_current_status` ( `id` INT NOT NULL AUTO_INCREMENT, `fk_assistant` INT NOT NULL, `disp_name` VARCHAR(80) NOT NULL, `dt_sys` DATETIME NOT NULL, `status_at_work` VARCHAR(1) NOT NULL COMMENT 'For the current day.\nWho is working (active)?\n1-not active\n2-active\n\n', PRIMARY KEY (`id`), INDEX `fk_assistant_fkk_idx` (`fk_assistant` ASC), CONSTRAINT `fk_assistant_fkk` FOREIGN KEY (`fk_assistant`) REFERENCES `hsjsi`.`assistant` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`chefeequipe_current_status` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`chefeequipe_current_status` ( `id` INT NOT NULL AUTO_INCREMENT, `fk_chefeequipe` INT NOT NULL, `disp_name` VARCHAR(80) NOT NULL, `dt_sys` DATETIME NOT NULL, `status_at_work` VARCHAR(1) NOT NULL COMMENT 'For the current day.\nWho is working (active)?\n1-not active\n2-active\n\n', PRIMARY KEY (`id`), INDEX `fk_chefeequipe_fwk_idx` (`fk_chefeequipe` ASC), CONSTRAINT `fk_chefeequipe_fwk` FOREIGN KEY (`fk_chefeequipe`) REFERENCES `hsjsi`.`chefeequipe` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`agentadmin_current_status` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`agentadmin_current_status` ( `id` INT NOT NULL AUTO_INCREMENT, `fk_agentadmin` INT NOT NULL, `disp_name` VARCHAR(80) NOT NULL, `dt_sys` DATETIME NOT NULL, `status_at_work` VARCHAR(1) NOT NULL COMMENT 'For the current day.\nWho is working (active)?\n1-not active\n2-active\n\n', PRIMARY KEY (`id`), INDEX `fk_agentadmin_fkwk_idx` (`fk_agentadmin` ASC), CONSTRAINT `fk_agentadmin_fkwk` FOREIGN KEY (`fk_agentadmin`) REFERENCES `hsjsi`.`agentadmin` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`agentsalubrite_current_status` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`agentsalubrite_current_status` ( `id` INT NOT NULL AUTO_INCREMENT, `fk_agentsalubrite` INT NOT NULL, `disp_name` VARCHAR(80) NOT NULL, `dt_sys` DATETIME NOT NULL, `status_at_work` VARCHAR(1) NOT NULL COMMENT 'For the current day.\nWho is working (active)?\n1-not active\n2-active\n\n', PRIMARY KEY (`id`), INDEX `fk_kkagsabt_idx` (`fk_agentsalubrite` ASC), CONSTRAINT `fk_kkagsabt` FOREIGN KEY (`fk_agentsalubrite`) REFERENCES `hsjsi`.`agentsalubrite` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`pharmacist_current_status` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`pharmacist_current_status` ( `id` INT NOT NULL AUTO_INCREMENT, `fk_pharmacist` INT NOT NULL, `disp_name` VARCHAR(80) NOT NULL, `dt_sys` DATETIME NOT NULL, `status_at_work` VARCHAR(1) NOT NULL COMMENT 'For the current day.\nWho is working (active)?\n1-not active\n2-active\n\n', PRIMARY KEY (`id`), INDEX `fk_pharmss_idx` (`fk_pharmacist` ASC)) ENGINE = MyISAM; -- ----------------------------------------------------- -- Table `hsjsi`.`resident_current_status` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`resident_current_status` ( `id` INT NOT NULL AUTO_INCREMENT, `fk_resident` INT NOT NULL, `disp_name` VARCHAR(80) NOT NULL, `dt_sys` DATETIME NOT NULL, `status_at_work` VARCHAR(1) NOT NULL COMMENT 'For the current day.\nWho is working (active)?\n1-not active\n2-active\n\n', PRIMARY KEY (`id`), INDEX `fk_resctst_idx` (`fk_resident` ASC), CONSTRAINT `fk_resctst` FOREIGN KEY (`fk_resident`) REFERENCES `hsjsi`.`resident` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`nursing_current_status` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `hsjsi`.`nursing_current_status` ( `id` INT NOT NULL AUTO_INCREMENT, `fk_nursing` INT NOT NULL, `disp_name` VARCHAR(80) NOT NULL, `dt_sys` DATETIME NOT NULL, `status_at_work` VARCHAR(1) NOT NULL COMMENT 'For the current day.\nWho is working (active)?\n1-not active\n2-active\n\n', PRIMARY KEY (`id`), INDEX `fk_nurscst_idx` (`fk_nursing` ASC), CONSTRAINT `fk_nurscst` FOREIGN KEY (`fk_nursing`) REFERENCES `hsjsi`.`nursing` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `hsjsi`.`patientecurrentsatus_history` -- ----------------------------------------------------- CREATE TABLE patientecurrentsatus_history ( `id` INT NOT NULL AUTO_INCREMENT, `fk_patient` BIGINT NOT NULL COMMENT 'This table will store only the current status of the patient.\nEach change, makes to save the current staus in a history table and the aplly the changes in a history table.\nOnce the tratement has ended, this is the final status, grab the whole line, save inside the history and delete from current status. ', `disp_name_patient` VARCHAR(100) NOT NULL, `paciente_session` VARCHAR(50) NOT NULL COMMENT 'That will be a number like SESSION. Composed by \npatient.nb_dossier+datetime+milisseconds. (created by the system)\n\nthis number will be used to track a patinent session in te service.\nwill be used to link to exams', `fk_exam_status_type` INT NOT NULL DEFAULT 0 COMMENT '0-N/A (no exams was assigned)\n1-waiting (at laste one exam was not done)\n2-done (all exams in the list must be done)\n\n', `disp_exam_status_type` VARCHAR(100) NOT NULL, `dt_sys_admission` DATETIME NOT NULL, `fk_tournee_medicale_fait` INT NOT NULL DEFAULT 0 COMMENT 'tournoi medicale was done\n0-Non\n1-Oui', `disp_tournee_medicale_fait` VARCHAR(100) NOT NULL, `fk_tournee_med_nursing_available` INT NOT NULL COMMENT 'Nursing is avaliable pour le tournoi\n0-Non\n1-Oui\n', `disp_tournee_nursing_available` VARCHAR(100) NOT NULL, `fk_patron` INT NOT NULL, `disp_name_patron` VARCHAR(100) NOT NULL, `fk_type_med` INT NOT NULL, `disp_type_med` VARCHAR(100) NOT NULL, `fk_fellow` INT NOT NULL, `disp_name_fellow` VARCHAR(100) NOT NULL, `fk_nursing` INT NOT NULL, `disp_name_nursing` VARCHAR(100) NOT NULL, `fk_pharmacist` INT NOT NULL, `roomnumber` VARCHAR(5) NOT NULL COMMENT 'do not use id becaouse there is no room nb 13', `disp_name_pharmacist` VARCHAR(100) NOT NULL, `fk_resident` INT NOT NULL, `disp_name_resident` VARCHAR(100) NOT NULL, `fk_type_nursing` INT NOT NULL, `disp_type_nursing` VARCHAR(100) NOT NULL, `fk_type_assistance_respiratoire` INT NOT NULL, `disp_type_assistance_respiratoire` VARCHAR(100) NOT NULL, `fk_isolement` INT NOT NULL, `disp_isolement` VARCHAR(100) NOT NULL, `fk_codevacuation` INT NOT NULL, `fk_chargetravail` INT NOT NULL, `fk_traitmentsparticuliers` INT NOT NULL, `disp_traitmentsparticuliers` VARCHAR(100) NOT NULL, `fk_deplacementcritique` INT NOT NULL, `disp_deplacementcritique` VARCHAR(100) NOT NULL, `note` LONGTEXT NULL, `scheduled_departure` DATETIME NULL, `performed_departure` DATETIME NULL, `nb_lit_hospitalier` VARCHAR(50) NOT NULL, `mouvement_alert` VARCHAR(80) NOT NULL DEFAULT '1' COMMENT '0-Non\n1-Oui', `codevacuation_hexacode` VARCHAR(8) NULL, `traitmentsparticuliers_hexacode` VARCHAR(8) NULL, `mouvement_alert_path` VARCHAR(80) NULL DEFAULT '\"\"', `fk_type_conge` INT NOT NULL, `disp_type_conge` VARCHAR(80) NOT NULL, `disp_type_conge_hexacode` VARCHAR(80) NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
/************************************************************************************************** * FUNCTION eniwarenet.purge_completed_instructions(timestamp with time zone) * * Delete instructions that have reached the Declined or Completed state, and whose * instruction date is older than the given date. * * @param older_date The maximum date to delete instructions for. * @return The number of instructions deleted. */ CREATE OR REPLACE FUNCTION eniwarenet.purge_completed_instructions(older_date timestamp with time zone) RETURNS BIGINT AS $BODY$ DECLARE num_rows BIGINT := 0; BEGIN DELETE FROM eniwarenet.sn_Edge_instruction WHERE instr_date < older_date AND deliver_state IN ( 'Declined'::eniwarenet.instruction_delivery_state, 'Completed'::eniwarenet.instruction_delivery_state); GET DIAGNOSTICS num_rows = ROW_COUNT; RETURN num_rows; END;$BODY$ LANGUAGE plpgsql VOLATILE; CREATE SEQUENCE eniwarenet.instruction_seq; SELECT setval('eniwarenet.instruction_seq', (SELECT COALESCE(MAX(id), 1) FROM eniwarenet.sn_Edge_instruction), true); ALTER TABLE eniwarenet.sn_Edge_instruction ALTER COLUMN id SET DEFAULT nextval('eniwarenet.instruction_seq');
CREATE PROCEDURE [dbo].[DataSet_Delete] @datasetId int AS DECLARE @tableName nvarchar(64) SELECT @tableName=tableName FROM DataSets WHERE datasetId=@datasetId DECLARE @sql nvarchar(MAX) = 'DROP TABLE DataSet_' + @tableName EXEC sp_executesql @sql SET @sql = 'DROP SEQUENCE Sequence_DataSet_' + @tableName EXEC sp_executesql @sql DELETE FROM DataSets WHERE datasetId=@datasetId
<filename>pcm-db-sample/insert_i18n_messages.sql -- Pcm Sample Data -- ------------------------------------------------------ USE `pcm`; -- -- Insert i18n messages for Purpose of Use -- insert into i18n_message values (1, 'PURPOSE.1.DISPLAY','Purpose of user treatment','en', 'Treatment'); insert into i18n_message values (2, 'PURPOSE.1.DISPLAY','(ES)Purpose of user treatment','es', '(ES)Treatment'); insert into i18n_message values (3, 'PURPOSE.1.DESCRIPTION','Description for Treatment','en', 'Treatment'); insert into i18n_message values (4, 'PURPOSE.1.DESCRIPTION','(ES)Description for Treatment','es', '(ES)To perform one or more operations on information for the provision of health care.'); insert into i18n_message values (5, 'PURPOSE.2.DISPLAY','Purpose of user healthcare payment','en', 'Healthcare Payment'); insert into i18n_message values (6, 'PURPOSE.2.DISPLAY','(ES)Purpose of user healthcare payment','es', '(ES)Healthcare Payment'); insert into i18n_message values (7, 'PURPOSE.2.DESCRIPTION','Description for Healthcare payment','en', 'To perform one or more operations on information for conducting financial or contractual activities related to payment for the provision of health care.'); insert into i18n_message values (8, 'PURPOSE.2.DESCRIPTION','(ES)Description for Healthcare payment','es', '(ES)To perform one or more operations on information for conducting financial or contractual activities related to payment for the provision of health care.'); insert into i18n_message values (9, 'PURPOSE.3.DISPLAY','Purpose of user Healthcare Research','en', 'Healthcare Research'); insert into i18n_message values (10, 'PURPOSE.3.DISPLAY','(ES)Purpose of user Healthcare Research','es', '(ES)Healthcare Research'); insert into i18n_message values (11, 'PURPOSE.3.DESCRIPTION','Description for Healthcare Research','en', 'To perform one or more operations on information for conducting scientific investigations to obtain health care knowledge.'); insert into i18n_message values (12, 'PURPOSE.3.DESCRIPTION','(ES)Description for Healthcare Research','es', '(ES)To perform one or more operations on information for conducting scientific investigations to obtain health care knowledge.'); -- -- Insert i18n messages for Consent Revocation Terms -- insert into i18n_message values (13, 'CONSENT_REVOCATION_TERM.1.TEXT',' Consent revocation text','en', 'I have previously signed a patient consent form allowing my providers to access my electronic health records through the Consent2Share system and now want to withdraw that consent. If I sign this form as the Patient\'s Legal Representative, I understand that all references in this form to \"me\" or \"my\" refer to the Patient.\\n\\nBy withdrawing my Consent, I understand that:\n\n 1. I Deny Consent for all Participants to access my electronic health information through Consent2Share for any purpose, EXCEPT in a medical emergency.\n 2. Health care provider and health insurers that I am enrolled with will no longer be able to access health information about me through Consent2Share, except in an emergency.\n 3. The Withdrawal of Consent will not affect the exchange of my health information while my Consent was in effect.\n 4. No Consent2Share participating provider will deny me medical care and my insurance eligibility will not be affected based on my Withdrawal of Consent.\n 5. If I wish to reinstate Consent, I may do so by signing and completing a new Patient Consent form and returning it to a participating provider or payer.\n 6. Revoking my Consent does not prevent my health care provider from submitting claims to my health insurer for reimbursement for services rendered to me in reliance on the Consent while it was in effect.\n 7. I understand that I will get a copy of this form after I sign it.'); insert into i18n_message values (14, 'CONSENT_REVOCATION_TERM.1.TEXT',' Consent revocation text','es', '(ES)I have previously signed a patient consent form allowing my providers to access my electronic health records through the Consent2Share system and now want to withdraw that consent. If I sign this form as the Patient\'s Legal Representative, I understand that all references in this form to \"me\" or \"my\" refer to the Patient.\n\nBy withdrawing my Consent, I understand that:\n\n 1. I Deny Consent for all Participants to access my electronic health information through Consent2Share for any purpose, EXCEPT in a medical emergency.\n 2. Health care provider and health insurers that I am enrolled with will no longer be able to access health information about me through Consent2Share, except in an emergency.\n 3. The Withdrawal of Consent will not affect the exchange of my health information while my Consent was in effect.\n 4. No Consent2Share participating provider will deny me medical care and my insurance eligibility will not be affected based on my Withdrawal of Consent.\n 5. If I wish to reinstate Consent, I may do so by signing and completing a new Patient Consent form and returning it to a participating provider or payer.\n 6. Revoking my Consent does not prevent my health care provider from submitting claims to my health insurer for reimbursement for services rendered to me in reliance on the Consent while it was in effect.\n 7. I understand that I will get a copy of this form after I sign it.'); -- -- Insert i18n messages for Consent Attestation Terms -- insert into i18n_message values (15, 'CONSENT_ATTESTATION_TERM.1.TEXT',' Consent attestation text','en', 'I, ${ATTESTER_FULL_NAME}, understand that my records are protected under the federal regulations governing Confidentiality of Alcohol and Drug Abuse Patient Records, 42 CFR part 2, and cannot be disclosed without my written permission or as otherwise permitted by 42 CFR part 2. I also understand that I may revoke this consent at any time except to the extent that action has been taken in reliance on it, and that any event this consent expires automatically as follows:'); insert into i18n_message values (16, 'CONSENT_ATTESTATION_TERM.1.TEXT',' Consent attestation text','es', '(ES)I, ${ATTESTER_FULL_NAME}, understand that my records are protected under the federal regulations governing Confidentiality of Alcohol and Drug Abuse Patient Records, 42 CFR part 2, and cannot be disclosed without my written permission or as otherwise permitted by 42 CFR part 2. I also understand that I may revoke this consent at any time except to the extent that action has been taken in reliance on it, and that any event this consent expires automatically as follows:'); insert into i18n_message values (17, 'CONSENT_ATTESTATION_TERM.2.TEXT',' Consent attestation text','en', 'I, ${ATTESTER_FULL_NAME}, understand that my records are protected under the federal regulations governing Confidentiality of Alcohol and Drug Abuse Patient Records, 42 CFR part 2, and cannot be disclosed without my written permission or as otherwise permitted by 42 CFR part 2. I also understand that I may revoke this consent at any time except to the extent that action has been taken in reliance on it, and that any event this consent expires automatically as set forth below.\n \n By signing this form below, I acknowledge that I have reviewed all of the information on this consent, confirm that such information is accurate, and accept and understand the terms of this consent.'); insert into i18n_message values (18, 'CONSENT_ATTESTATION_TERM.2.TEXT',' Consent attestation text','es', '(ES)I, ${ATTESTER_FULL_NAME}, understand that my records are protected under the federal regulations governing Confidentiality of Alcohol and Drug Abuse Patient Records, 42 CFR part 2, and cannot be disclosed without my written permission or as otherwise permitted by 42 CFR part 2. I also understand that I may revoke this consent at any time except to the extent that action has been taken in reliance on it, and that any event this consent expires automatically as set forth below.\n \n By signing this form below, I acknowledge that I have reviewed all of the information on this consent, confirm that such information is accurate, and accept and understand the terms of this consent.'); insert into i18n_message values (19, 'CONSENT_ATTESTATION_TERM.3.TEXT',' Consent attestation text','en', 'I, ${PROVIDER_FULL_NAME}, attest that I completed this consent form granting permission to disclose ${ATTESTER_FULL_NAME}\'s records governed by 42 CFR Part 2\'s regulations protecting the Confidentiality of Alcohol and Drug Abuse Patient Records in the presence of the patient and in accordance with their preferences, and that the patient acknowledges that he or she reviewed all of the information on this consent, confirmed that such information is accurate, and has accepted and understood the terms of this consents as evidenced by his or her signature (or the signature of his or her personal representative).'); insert into i18n_message values (21, 'CONSENT_ATTESTATION_TERM.3.TEXT',' Consent attestation text','es', '(ES)I, ${PROVIDER_FULL_NAME}, attest that I completed this consent form granting permission to disclose ${ATTESTER_FULL_NAME}\'s records governed by 42 CFR Part 2\'s regulations protecting the Confidentiality of Alcohol and Drug Abuse Patient Records in the presence of the patient and in accordance with their preferences, and that the patient acknowledges that he or she reviewed all of the information on this consent, confirmed that such information is accurate, and has accepted and understood the terms of this consents as evidenced by his or her signature (or the signature of his or her personal representative).');
-- db_patches INSERT INTO `db_patches` (issue, created) VALUES ('POCOR-2967', NOW()); -- code here ALTER TABLE `institution_subject_students` ADD INDEX `institution_id` (`institution_id`); ALTER TABLE `institution_subject_students` ADD INDEX `student_id` (`student_id`); ALTER TABLE `institution_subject_students` ADD INDEX `institution_class_id` (`institution_class_id`); ALTER TABLE `institution_subject_students` ADD INDEX `academic_period_id` (`academic_period_id`); ALTER TABLE `institution_subject_students` ADD INDEX `education_subject_id` (`education_subject_id`);
-- -- Copyright 2020 The Android Open Source Project -- -- 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 -- -- https://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. -- -- This is a templated metric that takes 3 parameters: -- input: name of a table/view which must have columns: id, ts, dur and a -- "category" column -- output: name of the view that will be created -- category: name of the category column in the input table, which will be -- preserved in the output SELECT RUN_METRIC('chrome/chrome_processes.sql'); SELECT RUN_METRIC('android/power_drain_in_watts.sql'); DROP TABLE IF EXISTS real_{{input}}_power; CREATE VIRTUAL TABLE real_{{input}}_power USING SPAN_JOIN( {{input}}, drain_in_watts ); -- Actual power usage for chrome across the categorised slices contained in the -- input table broken down by subsystem. DROP VIEW IF EXISTS {{output}}; CREATE VIEW {{output}} AS SELECT s.id, ts, dur, {{category}}, subsystem, joules, joules / dur * 1e9 AS drain_w FROM ( SELECT id, subsystem, SUM(drain_w * dur / 1e9) AS joules FROM real_{{input}}_power JOIN power_counters WHERE real_{{input}}_power.name = power_counters.name GROUP BY id, subsystem ) p JOIN {{input}} s WHERE s.id = p.id ORDER BY s.id;
<reponame>menhuan/notes<gh_stars>10-100 SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for people -- ---------------------------- CREATE TABLE `people` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id', `name` varchar(40) CHARACTER SET utf8 COLLATE utf8_hungarian_ci NOT NULL COMMENT '名字', `create_date` datetime(0) NULL DEFAULT NULL COMMENT '创建日期', `user_id` int(11) NULL DEFAULT NULL COMMENT '创建人id', `age` int(11) NOT NULL COMMENT '年龄', `company` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 38 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of people -- ---------------------------- INSERT INTO `people` VALUES (2, 'ninini', '2019-02-13 16:39:46', 2, 0, NULL); INSERT INTO `people` VALUES (3, 'dsds', '2019-02-19 16:20:43', 3, 18, 'bb'); INSERT INTO `people` VALUES (4, 'www', '2019-02-20 11:41:49', 4, 4, 'aa'); INSERT INTO `people` VALUES (5, 'qqq', '2019-02-20 11:41:59', 5, 5, 'aa'); INSERT INTO `people` VALUES (6, 'aaa', '2019-02-20 11:42:09', 6, 6, NULL); INSERT INTO `people` VALUES (7, 'bbb', '2019-02-20 11:42:18', 7, 7, NULL); INSERT INTO `people` VALUES (8, 'wowow', '2019-02-20 11:42:28', 8, 8, NULL); INSERT INTO `people` VALUES (9, 'wowowo', '2019-02-20 11:42:44', 9, 9, NULL); INSERT INTO `people` VALUES (10, 'nini', '2019-02-20 11:42:55', 10, 10, NULL); INSERT INTO `people` VALUES (11, 'wo', '2019-02-20 11:43:35', 11, 11, NULL); INSERT INTO `people` VALUES (14, 'xiaohei', '2019-02-20 16:32:27', 20, 45, NULL); INSERT INTO `people` VALUES (15, 'ruiqi', '2019-02-22 17:17:28', NULL, 15, 'tuixiang'); INSERT INTO `people` VALUES (16, 'xiaohui', '2019-02-20 17:48:15', 20, 44, NULL); INSERT INTO `people` VALUES (17, 'xiaolv', '2019-02-20 17:48:53', 1, 44, NULL); INSERT INTO `people` VALUES (18, 'xiaolan', '2019-02-20 17:49:34', 1, 44, NULL); INSERT INTO `people` VALUES (19, 'rruiqi1', '2019-02-20 17:58:39', 101, 22, 'tt'); INSERT INTO `people` VALUES (20, 'rruiqi2', '2019-02-20 17:58:50', 102, 25, 'tt'); INSERT INTO `people` VALUES (21, 'rruiqi3', '2019-02-20 17:59:02', 103, 25, 'tt'); INSERT INTO `people` VALUES (22, 'rruiqi4', '2019-02-20 17:59:08', 104, 25, 'tt'); INSERT INTO `people` VALUES (23, 'rruiqi5', '2019-02-20 17:59:13', 105, 25, 'tt'); INSERT INTO `people` VALUES (24, 'rruiqi6', '2019-02-20 17:59:18', 106, 25, 'tt'); INSERT INTO `people` VALUES (25, 'rruiqi7', '2019-02-20 17:59:22', 107, 25, 'tt'); INSERT INTO `people` VALUES (26, 'rruiqi8', '2019-02-20 17:59:27', 108, 25, 'tt'); INSERT INTO `people` VALUES (28, 'rruiqi10', '2019-02-20 17:59:37', 110, 25, 'tt'); INSERT INTO `people` VALUES (29, 'xiaozi', '2019-02-20 20:32:27', NULL, 44, NULL); INSERT INTO `people` VALUES (30, '', '2019-02-20 20:40:39', 20, 44, NULL); INSERT INTO `people` VALUES (31, '', '2019-02-20 20:41:50', 20, 44, NULL); INSERT INTO `people` VALUES (32, '', '2019-02-20 20:43:08', 20, 44, NULL); INSERT INTO `people` VALUES (33, '', '2019-02-20 20:48:09', 21, 44, NULL); INSERT INTO `people` VALUES (34, '', '2019-02-20 20:49:04', 26, 44, NULL); INSERT INTO `people` VALUES (35, '', '2019-02-20 20:58:53', 26, 44, NULL); INSERT INTO `people` VALUES (36, 're', '2019-02-20 21:01:22', 29, 44, NULL); INSERT INTO `people` VALUES (37, 'de', '2019-02-20 21:08:19', 87, 44, NULL); -- ---------------------------- -- Table structure for test -- ---------------------------- CREATE TABLE `test` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id', `name` varchar(40) CHARACTER SET utf8 COLLATE utf8_hungarian_ci NOT NULL COMMENT '名字', `create_date` datetime(0) NULL DEFAULT NULL COMMENT '创建日期', `user_id` int(11) NULL DEFAULT NULL COMMENT '创建人id', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of test -- ---------------------------- INSERT INTO `test` VALUES (2, 'ninini', '2019-02-13 16:39:46', 2); INSERT INTO `test` VALUES (3, 'xiaoming', '2019-02-18 18:44:39', 1); INSERT INTO `test` VALUES (4, 'wowo', '2019-02-19 11:30:07', 3); SET FOREIGN_KEY_CHECKS = 1;
<reponame>jambulud/devon4j -- *** BinaryObject (BLOBs) *** CREATE COLUMN TABLE BinaryObject ( id BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY, modificationCounter INTEGER NOT NULL, content BLOB, filesize BIGINT NOT NULL, mimeType VARCHAR(255), CONSTRAINT PK_BinaryObject_id PRIMARY KEY(ID) );
<gh_stars>100-1000 -- // CLOUD-73592 ability to specify more rdsconfig -- Migration SQL that makes the change goes here. CREATE TABLE cluster_rdsconfig ( clusters_id bigint NOT NULL, rdsconfigs_id bigint NOT NULL ); ALTER TABLE ONLY cluster_rdsconfig ADD CONSTRAINT cluster_rdsconfig_pkey PRIMARY KEY (clusters_id, rdsconfigs_id); ALTER TABLE ONLY cluster_rdsconfig ADD CONSTRAINT fk_cluster_rdsconfig_cluster_id FOREIGN KEY (clusters_id) REFERENCES cluster(id); ALTER TABLE ONLY cluster_rdsconfig ADD CONSTRAINT fk_cluster_rdsconfig_rdsconfig_id FOREIGN KEY (rdsconfigs_id) REFERENCES rdsconfig(id); INSERT INTO cluster_rdsconfig(clusters_id, rdsconfigs_id) SELECT id, rdsconfig_id FROM cluster WHERE rdsconfig_id IS NOT NULL; ALTER TABLE cluster DROP COLUMN rdsconfig_id; -- //@UNDO -- SQL to undo the change goes here. ALTER TABLE cluster ADD COLUMN rdsconfig_id BIGINT REFERENCES rdsconfig(id); DROP TABLE cluster_rdsconfig;
# ************************************************************ # Sequel Pro SQL dump # Version 3408 # # http://www.sequelpro.com/ # http://code.google.com/p/sequel-pro/ # # Host: 127.0.0.1 (MySQL 5.5.21) # Database: pixeltenchi # Generation Time: 2013-01-03 20:32:19 +0000 # ************************************************************ /*!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 */; /*!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 */; # Dump of table campaigns # ------------------------------------------------------------ DROP TABLE IF EXISTS `campaigns`; CREATE TABLE `campaigns` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `campaign_code` int(10) NOT NULL, `name` varchar(255) NOT NULL DEFAULT '', `description` varchar(255) DEFAULT NULL, `download_link` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; LOCK TABLES `campaigns` WRITE; /*!40000 ALTER TABLE `campaigns` DISABLE KEYS */; INSERT INTO `campaigns` (`id`, `campaign_code`, `name`, `description`, `download_link`) VALUES (1,100,'general','General Site Visit',NULL); /*!40000 ALTER TABLE `campaigns` ENABLE KEYS */; UNLOCK TABLES; # Dump of table components # ------------------------------------------------------------ DROP TABLE IF EXISTS `components`; CREATE TABLE `components` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `type` enum('model','method','view','content') NOT NULL DEFAULT 'content', `name` varchar(85) NOT NULL DEFAULT '', `description` varchar(255) DEFAULT NULL, `content` text, `model` varchar(255) DEFAULT NULL, `directory` varchar(255) DEFAULT NULL, `controller` varchar(255) DEFAULT NULL, `method` varchar(255) DEFAULT NULL, `view` varchar(255) DEFAULT NULL, `vars` varchar(255) DEFAULT NULL, `language` tinyint(1) NOT NULL DEFAULT '1', `disabled` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; # Dump of table creation_tags # ------------------------------------------------------------ DROP TABLE IF EXISTS `creation_tags`; CREATE TABLE `creation_tags` ( `creation_id` int(10) unsigned NOT NULL, `tag_id` int(10) unsigned NOT NULL, PRIMARY KEY (`creation_id`,`tag_id`), KEY `fk-tag-creations` (`tag_id`), CONSTRAINT `fk-creation-tags` FOREIGN KEY (`creation_id`) REFERENCES `creations` (`id`) ON DELETE CASCADE, CONSTRAINT `fk-tag-creations` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; LOCK TABLES `creation_tags` WRITE; /*!40000 ALTER TABLE `creation_tags` DISABLE KEYS */; INSERT INTO `creation_tags` (`creation_id`, `tag_id`) VALUES (1,1), (3,1), (5,1), (6,1), (7,1), (15,1), (16,1), (18,1), (19,1), (21,1), (23,1), (24,1), (2,2), (11,2), (12,2), (13,2), (17,2), (20,2), (25,2), (27,2), (1,3), (3,3), (5,3), (6,3), (7,3), (15,3), (23,3), (24,3), (3,4), (5,4), (6,4), (7,4), (15,4), (18,4), (19,4), (21,4), (3,5), (5,5), (6,5), (7,5), (15,5), (18,5), (19,5), (21,5), (24,5), (3,6), (5,6), (7,6), (15,6), (1,7), (3,7), (18,7), (22,7), (23,7), (24,7), (1,8), (22,8), (23,8), (24,8), (3,9), (5,9), (6,9), (7,9), (15,9), (1,10), (3,10), (5,10), (13,10), (15,10), (18,10), (21,10), (22,10), (24,10), (25,10), (26,10), (2,11), (3,11), (11,11), (12,11), (13,11), (16,11), (17,11), (18,11), (20,11), (27,11), (1,12), (15,12), (22,12), (23,12), (24,12), (5,13), (6,13), (7,13), (15,13), (5,14), (6,14), (7,14), (15,14), (8,15), (9,15), (10,15), (24,15), (25,15), (26,15), (3,16), (7,16), (15,16), (18,16), (1,17), (2,17), (16,17), (17,17), (18,17), (24,17), (12,18), (27,18), (4,19), (13,19), (14,20), (1,21), (3,21), (5,21), (6,21), (7,21), (15,21), (19,21), (21,21), (22,21), (24,21), (5,22), (6,22), (7,22), (15,22), (19,22); /*!40000 ALTER TABLE `creation_tags` ENABLE KEYS */; UNLOCK TABLES; # Dump of table creations # ------------------------------------------------------------ DROP TABLE IF EXISTS `creations`; CREATE TABLE `creations` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `type` enum('web','logo','print','font','multimedia','video','audio','photography','art') DEFAULT NULL, `title` varchar(255) NOT NULL DEFAULT '', `subtitle` varchar(255) DEFAULT NULL, `comment` text, `content` text NOT NULL, `thumbnail` varchar(55) NOT NULL DEFAULT '', `url` varchar(255) DEFAULT NULL, `download` varchar(255) DEFAULT NULL, `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `disabled` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; LOCK TABLES `creations` WRITE; /*!40000 ALTER TABLE `creations` DISABLE KEYS */; INSERT INTO `creations` (`id`, `type`, `title`, `subtitle`, `comment`, `content`, `thumbnail`, `url`, `download`, `creation_date`, `disabled`) VALUES (1,'web','PixelTenchi Legacy','Original pixeltenchi web portfolio','As a senior project in school I created the original PixelTenchi 1.0 website as my portfolio circa 2001. It remained online for over 12 years. As a legacy project it was created completely in flash and used as a CD porfolio as well as an interactive flash website. Programmed using ActionScript it was meant to be a repository for my original portfolio until I replaced it in early 2013 with PixelTenchi 2.0.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/pixeltenchi-legacy-pres.jpg\" alt=\"PixelTenchi Legacy\" />\n</div><!-- creation-container -->','pixeltenchi-legacy-tn.jpg','http://www.pixeltenchi.com/legacy/',NULL,'2001-04-15 13:00:00',0), (2,'logo','Summit Mental Health','Brand and Logo development','A commision/freelance project to develop a brand for Summit Mental Health in Salt Lake City, UT. Included was a color sheet along with several version of the logo with different backgrounds.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/summit-mental-health.jpg\" alt=\"Summit Mental Health\" />\n</div><!-- creation-container -->','summit-mental-health-tn.jpg',NULL,NULL,'2012-10-15 16:22:58',0), (3,'web','AeroExhaust.com','AeroExhaust.com website','Built completely in raw php without the use of a framework. The site was designed and created from scratch using the existing logo created by me. The site contained a complete shopping cart and backend content managment system along with a dealer login system that allowed dealers to manage their own sales. The site was optimized for organic search and scored in the top five on all major keywords including the top spot for the primary keyword \"Performance Exhaust.\" The site was maintained while I worked at Aero for over 5 years. The site included features to promote Aero Exhaust\'s NASCAR sponsorship and their spokesman <NAME>.','<div class=\"creation-container\">\n <h3>Homepage:</h3>\n <img src=\"/assets/img/uploads/creations/aerohome.jpg\" alt=\"AeroExhaust Homepage\" />\n <h3>Subpage:</h3>\n <img src=\"/assets/img/uploads/creations/aerosub.jpg\" alt=\"AeroExhaust Subpages\" />\n</div><!-- creation-container -->','aeroexhaust-tn.jpg',NULL,NULL,'2008-03-01 17:11:35',0), (4,'font','Trinh Hand Script Font','Regular True Type Font','Trinh Hand Scrpt Regular Font is an open source true type font created as a font for use for designs that include and elegant feel. Feel free to download this font for use.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/trinh-hand-font.jpg\" alt=\"Trihn Hand Script Regular\" />\n</div><!-- creation-container -->','trinh-hand-font-tn.jpg',NULL,'/assets/uploads/trinh_hand.ttf','2012-12-20 21:44:59',0), (5,'web','Matrix42.com','Matrix42.com redesign','Matrix42.com is a multi-language (English/German) website developed for lead production and optimization for user experience. The site was developed using responsive css design for display on all devices. The site broke some common rules in the display for large format devices for new technical users. The backend of the site is built on a proprietary content management system developed in Kohana HMVC framework. Currently in beta testing the site is set to be released in mid 2013.','<div class=\"creation-container\">\n <h3>Homepage:</h3>\n <img src=\"/assets/img/uploads/creations/matrix42-home.jpg\" alt=\"Matrix42 Homepage\" />\n <h3>Subpage:</h3>\n <img src=\"/assets/img/uploads/creations/matrix42-sub.jpg\" alt=\"Matrix42 Subpage\" />\n</div><!-- creation-container -->','matrix42-com-tn.jpg','http://beta.matrix42.com','https://github.com/jneslen/matrix42','2013-01-01 22:00:55',0), (6,'web','Matrix42 Promo','Promotional Microsite','A promotional microsite for Matrix42 created in both English and German to promote sales for September 2012 to existing Matrix42 customers to upgrade to new services. The site was developed for lead flow using Kohana framework and twitter bootstrap responsive interface.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/matrix42-promo.jpg\" alt=\"Matrix42 Promo\" />\n</div><!-- creation-container -->','matrix42-promo-tn.jpg','http://promo.matrix42.com/september',NULL,'2012-09-01 22:32:54',0), (7,'web','ServiceNow microsite','Matrix42 \\ ServiceNow Partnership','With the coming partnership between Matrix42 and ServiceNow, this microsite was made to promote the partnership and allow a landing page for ServiceNow users to find Matrix42 to handle their IT services. The site is being promoted through Google AdWords and is designed as a lead capture site. The site is a Twitter Bootstrap Responsive interface with a Kohana framework backend. The site is developed on a LAMP stack and interfaces with Matrix42\'s Web Services with an API push to their CRM.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/matrix42-servicenow.jpg\" alt=\"Matrix42 ServiceNow\" />\n</div><!-- creation-container -->','matrix42-servicenow-tn.jpg','http://servicenow.matrix42.com',NULL,'2012-05-01 22:46:16',0), (8,'photography','Fubuki','<NAME> 4 years old','Spontaneous photoshoot with Fubuki (my daughter). The lighting was done with natural light using the Fuji S1 Pro SLR. There was no post processing done on these photos.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/edith001.jpg\" alt=\"<NAME>\" />\n <hr />\n <img src=\"/assets/img/uploads/creations/edith001-2.jpg\" alt=\"<NAME>\" />\n</div><!-- creation-container -->','edith001-tn.jpg',NULL,NULL,'2010-09-11 23:09:26',0), (9,'photography','Yumi','Yumi Kamisasanuki Wedding','A commissioned wedding photo project at the Kamisasanuki wedding. Taken in San Diego with a Fuji S1 Pro SLR in natural lighting and light disk. Post processing done in Adobe Lightroom.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/yumi-1.jpg\" alt=\"Yumi Kamisasanuki\" />\n <hr />\n <img src=\"/assets/img/uploads/creations/yumi-2.jpg\" alt=\"Yumi Kamisasanuki Wedding\" />\n</div><!-- creation-container -->','yumi-tn.jpg',NULL,NULL,'2006-09-17 23:20:50',0), (10,'photography','Amy','<NAME>ding','Photos taken by the request of Amy and <NAME> at their wedding in Salt Lake City at Red Butte Gardens. Photos taken using the Fuji S1 Pro SLR in natural light with some post processing in Adobe Lightroom.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/amyennis-1.jpg\" alt=\"<NAME>\" />\n <hr />\n <img src=\"/assets/img/uploads/creations/amyennis-2.jpg\" alt=\"<NAME>nis Wedding\" />\n</div><!-- creation-container -->','amyennis-tn.jpg',NULL,NULL,'2007-06-27 23:29:04',0), (11,'print','AeroExhaust NASCAR','Team Morgan-Mclure #4','First Generation design of the AeroExhaust NASCAR 2006 Nextel Cup Morgan-McClure racing team #4 car and trailer. This design was designed in vector using Illustrator and printed as a wrap for the car and trailer. The car was driven by <NAME> during the 2006 Nextel Cup season.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/aero-nascar-martinsville.jpg\" alt=\"Morgan McClure number 4\" />\n <hr />\n <img src=\"/assets/img/uploads/creations/aero-nascar-template.jpg\" alt=\"AeroExhaust 4 Nascar\" />\n <hr />\n <img src=\"/assets/img/uploads/creations/aero-trailer-template.jpg\" alt=\"M<NAME> Trailer\" />\n <hr />\n <img src=\"/assets/img/uploads/creations/aero-nascar-trailer.jpg\" alt=\"AeroExhaust 4 Nascar Team\" />\n</div><!-- creation-container -->','aero-nascar-templ-tn.jpg',NULL,NULL,'2006-01-10 23:41:21',0), (12,'print','360 OTC NASCAR','Team 360 OTC','This was the consistant design of the first number 36 360 OTC NASCAR teams in both the 2007 Nextel Cup and Truck teams. This team was the first Toyota Nextel Cup Team. The design was used for both divisions for the entire 2007 season. The design was rendered for display using Maya 3D.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/team-360otc.jpg\" alt=\"Team 360 OTC\" />\n</div><!-- creation-container -->','team-360otc-tn.jpg',NULL,NULL,'2006-12-01 23:52:10',0), (13,'print','Matrix42 Booth','ServiceNow Booth San Francisco','Matrix42 booth design for the 2012 ServiceNow Convention in San Francisco California. The booth was designed using a combination of Photoshop and Illustrator using a large format for Print of the 8+ feet panels.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/servicenow-booth.jpg\" alt=\"ServiceNow Booth\" />\n <hr />\n <img src=\"/assets/img/uploads/creations/servicenow-booth2.jpg\" alt=\"ServiceNow Booth Photo\" />\n</div><!-- creation-container -->','servicenow-booth-tn.jpg',NULL,NULL,'2012-04-25 00:15:05',0), (14,'art','<NAME>','Pencil Sketch','<NAME> Bad cover Pencil on artboard. My High School Senior art project. Approximately 90 hours.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/michael-jackson.jpg\" alt=\"<NAME>\" />\n</div><!-- creation-container -->','michael-jackson-tn.jpg',NULL,NULL,'1993-04-02 00:28:53',0), (15,'web','Lendio','Backend B2B Matching','As a web developer for lendio.com I had primary responsibility to develop Lendio\'s backend website on the development team, including UI development and aplication development using SCRUM rapid development. I maintained, updated and debugged the online system software, including financial, client gateway, and product areas using the Kohana framework in a WAMP/LAMP/MAMP environment. The development of Lendio\'s propriatory matching software was a constant job and new developments were always rapidely developed in 2 week sprints.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/lendio-homepage.jpg\" alt=\"Lendio\" />\n</div><!-- creation-container -->','lendio-tn.jpg','http://www.lendio.com',NULL,'2012-01-02 00:49:00',0), (16,'web','AmericanZen','International Penpals','AmericanZen.net was an international penpals page that was used to connect people all over the world. The site was an addon and improvement of the popular site ispint.com which was a social network penpal site long before social networks were popular. The logo design feel was as far as the project got for isp which abandoned the social idea in 2001. The AmericanZen brand project followed after some development time, but the company loved the feel of the branding. ','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/american-zen.jpg\" alt=\"AmericanZen\" />\n</div><!-- creation-container -->','american-zen-tn.jpg',NULL,NULL,'2001-02-09 15:00:08',0), (17,'logo','AskWilla','Brand and Logo','AskWilla is a parenting help site that is a blog spot for sociologists to connect with troubled teens and their parents. I was commisioned to design their logo to help them start on their way to having an online presence.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/askwilla-logo.jpg\" alt=\"AskWilla\" />\n</div><!-- creation-container -->','askwilla-logo-tn.jpg',NULL,NULL,'2008-12-19 15:21:37',0), (18,'web','B2B Credit Experts','B2B microsite brand','B2B Credit Experts was a microsite that was a feeder site for FundingUniverse (now Lendio). The site was a landing page for funnelling leads through an API push for businesses looking to get funding. I was able to brand and present the site with several branding rules and color schemes.','<div class=\"creation-container\">\n <h3>Logo:</h3>\n <img src=\"/assets/img/uploads/creations/b2bcreditexperts-logo.jpg\" alt=\"B2BCreditExperts\" />\n <hr />\n <h3>Homepage:</h3>\n <img src=\"/assets/img/uploads/creations/b2bcreditexperts-home.jpg\" alt=\"B2BCreditExperts homepage\" />\n <hr />\n <h3>Subpage</h3>\n <img src=\"/assets/img/uploads/creations/b2bcreditexperts-sub.jpg\" alt=\"B2BCreditExperts subpage\" />\n</div><!-- creation-container -->','b2bcreditexperts-tn.jpg',NULL,NULL,'2009-03-26 15:32:26',0), (19,'web','Burg Pediatric Dentistry','CSS and UI layout','Burg Pediatric Dentisty was a site that I was commissioned to output in css by Oozle design. I was given the template and was able to output the site into html/css with some minor tweaks to the UI.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/burg-dentist-home.jpg\" alt=\"Burg Pediatric Dentistry\" />\n</div><!-- creation-container -->','burg-dentist-tn.jpg','http://www.burgpediatricdentistry.com/',NULL,'2010-11-11 15:49:48',0), (20,'print','Cobra Kai','Retro T-shirt design','Designed for a peice of nostagia from the 80\'s. This T-shirt design was printed just for fun and sold online. Yes the Karate kid is one of my favorite movies from when I was growing up.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/cobrakai-logo.png\" alt=\"Cobra Kai\" />\n</div><!-- creation-container -->','cobrakai-logo-tn.png',NULL,NULL,'2008-06-03 09:11:04',0), (21,'web','Funding Universe','Web interface','This template design was used only for a brief time as fundinguniverse.com and was quickly replaced when Lendio became the new name of the company. This interface was an enhancement of the existing template used.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/funding-universe.jpg\" alt=\"Funding Universe\" />\n</div><!-- creation-container -->','funding-universe-tn.jpg','http://www.fundinguniverse.com',NULL,'2009-12-15 09:50:12',0), (22,'multimedia','Joyful Moments Photography','Interactive Multimedia Portfolio','Joyful Moments needed a physical CD application to display photography portfolio work. This Flash based application allowed users to view all of the photographers work via CD.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/joyfulmoments1.jpg\" alt=\"Joyful Moments\" />\n <hr />\n <img src=\"/assets/img/uploads/creations/joyfulmoments2.jpg\" alt=\"Joyful Moments Photography\" />\n</div><!-- creation-container -->','joyfulmoments-tn.jpg',NULL,NULL,'2004-04-10 11:17:47',0), (23,'web','NectarTech','Hosting Flash Site','NectarTech was a project commisioned to be a fully interactive flash website back when flash sites were acceptable. The site featured an ambient experience and its own weather. The flash site would bring rain and thunder at a spontaneous and unpredictable times. It was programmed to be random and was subtle enough that no one really noticed. NectarTech was later absorbed by RackSpace and dissapeared into the Web 1.0 void.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/nectartech-home.jpg\" alt=\"NectarTech\" />\n <hr />\n <img src=\"/assets/img/uploads/creations/nectartech-sub.jpg\" alt=\"NectarTech Hosting\" />\n</div><!-- creation-container -->','nectartech-tn.jpg','http://www.pixeltenchi.com/legacy/nectartech/new/',NULL,'2002-02-23 12:22:08',0), (24,'web','Nezlen','My Photography Portfolio','As a school project I created a place to store my photos as a photography hobby. The site was designed with Web 1.0 intentions in 2000 and had to include an html version for dial up users. The flash version of the site contained actionscript programming that allowed for external xml files to drive the content. The site is still active but probably in need of an overhaul given the age of the site. Why the name \"Nezlen\" with a \"Z\"? Well, I intentionally picked this name because of the often overlooked ordering of letters in my family name Neslen pronounced \"Nezlen.\"','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/nezlen-home.jpg\" alt=\"Nezlen.com\" />\n <hr />\n <img src=\"/assets/img/uploads/creations/nezlen-intro.jpg\" alt=\"Nezlen Photography\" />\n</div><!-- creation-container -->','nezlen-tn.jpg','http://www.nezlen.com',NULL,'2000-09-21 12:41:41',0), (25,'art','Mihoko Butterfly','Digital Manipulation','A Photoshop project done just for fun. Simple enough but a unique design of different elements to create a visual stimulating presentation.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/mihoko-butterfly.jpg\" alt=\"Mihoko Butterfly\" />\n</div><!-- creation-container -->','mihoko-butterfly-tn.jpg',NULL,NULL,'2005-02-05 12:53:21',0), (26,'photography','Waiting for Him','Photoshoot','Simply themed Watiting for Him. I\'ll let the observer determine and imagine the rest of the story behind the photoshoot. Shot in Los Angeles.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/waiting-for-him1.jpg\" alt=\"Waiting for Him\" />\n <hr />\n <img src=\"/assets/img/uploads/creations/waiting-for-him2.jpg\" alt=\"Waiting for Him\" />\n</div><!-- creation-container -->','waiting-for-him-tn.jpg',NULL,NULL,'2001-08-22 13:02:38',0), (27,'print','AeroExhaust NASCAR v2','Second Generation','This is the second generation design of the AeroExhaust #4 NASCAR Monte Carlo for the second half of the 2006 Nextel Cup season driven by <NAME> for Morgan-McClure Racing. 3D models and texture templates done in Maya 3D.','<div class=\"creation-container\">\n <img src=\"/assets/img/uploads/creations/aero-car-gen2.jpg\" alt=\"AeroExhaust NASCAR v2\" />\n <hr />\n <img src=\"/assets/img/uploads/creations/aero-car-gen2b.jpg\" alt=\"AeroExhaust NASCAR render\" />\n <hr />\n <img src=\"/assets/img/uploads/creations/aero-car-gen2-lowes.jpg\" alt=\"AeroExhaust NASCAR Lowes\" />\n <hr />\n <img src=\"/assets/img/uploads/creations/aero-car-gen2-mich.jpg\" alt=\"AeroExhaust NASCAR Michigan\" />\n</div><!-- creation-container -->','aero-car-gen2-tn.jpg',NULL,NULL,'2006-03-24 13:28:03',0); /*!40000 ALTER TABLE `creations` ENABLE KEYS */; UNLOCK TABLES; # Dump of table leads # ------------------------------------------------------------ DROP TABLE IF EXISTS `leads`; CREATE TABLE `leads` ( `id` int(10) unsigned NOT NULL, `campaign_id` int(10) unsigned DEFAULT NULL, `business_name` varchar(255) DEFAULT NULL, `newsletter` tinyint(1) NOT NULL DEFAULT '0', `inquiry_ip` varchar(20) DEFAULT NULL, `inquiry_date` datetime DEFAULT NULL, `contact_date` datetime DEFAULT NULL, `downloaded` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `fk-campaign-leads` (`campaign_id`), CONSTRAINT `fk-campaign-leads` FOREIGN KEY (`campaign_id`) REFERENCES `campaigns` (`id`) ON DELETE CASCADE, CONSTRAINT `fk-user-lead` FOREIGN KEY (`id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; # Dump of table notes # ------------------------------------------------------------ DROP TABLE IF EXISTS `notes`; CREATE TABLE `notes` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(10) unsigned NOT NULL, `author_id` int(10) unsigned NOT NULL, `parent_id` int(10) unsigned DEFAULT NULL COMMENT 'Parent note_id', `type` enum('general','sales','response','inquiry','request') NOT NULL DEFAULT 'general', `note` text NOT NULL, `note_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `disabled` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `fk-user-notes` (`user_id`), KEY `fk-author-notes` (`author_id`), KEY `fk-parent-notes` (`parent_id`), CONSTRAINT `fk-author-notes` FOREIGN KEY (`author_id`) REFERENCES `users` (`id`) ON DELETE CASCADE, CONSTRAINT `fk-parent-notes` FOREIGN KEY (`parent_id`) REFERENCES `notes` (`id`) ON DELETE CASCADE, CONSTRAINT `fk-user-notes` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; # Dump of table phones # ------------------------------------------------------------ DROP TABLE IF EXISTS `phones`; CREATE TABLE `phones` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `type` enum('primary','alternate','mobile') DEFAULT NULL, `user_id` int(10) unsigned DEFAULT NULL, `address_id` int(10) unsigned DEFAULT NULL, `number` varchar(20) NOT NULL DEFAULT '', `format` enum('north_america','europe','world','england','spain') NOT NULL DEFAULT 'north_america', `disabled` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `fk-user-phones` (`user_id`), CONSTRAINT `fk-user-phones` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; # Dump of table tags # ------------------------------------------------------------ DROP TABLE IF EXISTS `tags`; CREATE TABLE `tags` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(35) NOT NULL DEFAULT '', `description` varchar(255) DEFAULT NULL, `color` varchar(7) DEFAULT NULL, `class` varchar(255) DEFAULT NULL, `icon` varchar(255) DEFAULT NULL, `disabled` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; LOCK TABLES `tags` WRITE; /*!40000 ALTER TABLE `tags` DISABLE KEYS */; INSERT INTO `tags` (`id`, `name`, `description`, `color`, `class`, `icon`, `disabled`) VALUES (1,'web','Web Design','9b040f',NULL,NULL,0), (2,'print','Print Design','33cc70',NULL,NULL,0), (3,'programming','Programming and Web Development','608da0',NULL,NULL,0), (4,'css','CSS','f05224',NULL,NULL,0), (5,'html','HTML','7b84a3',NULL,NULL,0), (6,'php','PHP','a19727',NULL,NULL,0), (7,'flash','Flash','e19b9b',NULL,NULL,0), (8,'actionscript','ActionScript','6f2dc1',NULL,NULL,0), (9,'mysql','MySQL','2dc1ae',NULL,NULL,0), (10,'photoshop','Adobe PhotoShop','2543fd',NULL,NULL,0), (11,'illustrator','Adobe Illustrator','fd8a25',NULL,NULL,0), (12,'multimedia','Multimedia such as interactives, CD','185562',NULL,NULL,0), (13,'git','Git Developments','6b6b6b',NULL,NULL,0), (14,'kohana','Kohana HMVC','105c10',NULL,NULL,0), (15,'photography','Photography','341862',NULL,NULL,0), (16,'api','Application Programming Interface','624018',NULL,NULL,0), (17,'logo','Logo Design','62182a',NULL,NULL,0), (18,'3d','3D Design','7A000C',NULL,NULL,0), (19,'typography','Typography','7C373F',NULL,NULL,0), (20,'scretch','Pencil Scetch','999999',NULL,NULL,0), (21,'ui','User Interface','ffc907',NULL,NULL,0), (22,'jquery','JQuery','00194c',NULL,NULL,0); /*!40000 ALTER TABLE `tags` ENABLE KEYS */; UNLOCK TABLES; # Dump of table users # ------------------------------------------------------------ DROP TABLE IF EXISTS `users`; CREATE TABLE `users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `email` varchar(255) CHARACTER SET latin1 NOT NULL DEFAULT '', `first` varchar(255) CHARACTER SET latin1 DEFAULT '', `initial` char(2) CHARACTER SET latin1 DEFAULT NULL, `last` varchar(255) CHARACTER SET latin1 DEFAULT NULL, `password` varchar(255) CHARACTER SET latin1 NOT NULL DEFAULT '', `temp_password` char(10) CHARACTER SET latin1 DEFAULT NULL, `temp_password_date` datetime DEFAULT NULL, `role` enum('lead','partner','client','employee','admin','jedi','registrant') CHARACTER SET latin1 NOT NULL DEFAULT 'lead', `logins` int(11) NOT NULL DEFAULT '0', `last_login` datetime DEFAULT NULL, `registration_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `last_activity_date` datetime DEFAULT NULL, `user_notes` text CHARACTER SET latin1, `token` varchar(255) CHARACTER SET latin1 DEFAULT NULL, `email_confirmed` tinyint(1) NOT NULL DEFAULT '0', `last_ip` varchar(20) CHARACTER SET latin1 DEFAULT NULL, `disabled` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `unq_email` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; LOCK TABLES `users` WRITE; /*!40000 ALTER TABLE `users` DISABLE KEYS */; INSERT INTO `users` (`id`, `email`, `first`, `initial`, `last`, `password`, `temp_password`, `temp_password_date`, `role`, `logins`, `last_login`, `registration_date`, `last_activity_date`, `user_notes`, `token`, `email_confirmed`, `last_ip`, `disabled`) VALUES (1,'<EMAIL>','Jeff','G','Neslen','<PASSWORD>',NULL,NULL,'jedi',0,NULL,'2012-12-12 12:12:12',NULL,NULL,NULL,1,NULL,0); /*!40000 ALTER TABLE `users` ENABLE KEYS */; UNLOCK TABLES; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_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 */;
<reponame>PoignantWizard/UsefulSqlQueries<gh_stars>1-10 -- Convert latitude and longitude to spacial data select convert(geography, 'Point(' + convert(varchar(20), Longitude) + ' ' + convert(varchar(20), Latitude) + ')' ) as SpacialData;
<filename>assets/backup/dev_kios27_ci.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 03, 2015 at 12:18 PM -- Server version: 5.6.24 -- PHP Version: 5.6.8 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: `dev_kios27_ci` -- -- -------------------------------------------------------- -- -- Table structure for table `store` -- CREATE TABLE IF NOT EXISTS `store` ( `ID` int(11) NOT NULL, `user_id` int(11) NOT NULL, `store_disp_name` varchar(30) NOT NULL, `store_tagname` varchar(100) NOT NULL, `store_categories` text NOT NULL, `store_email` varchar(100) NOT NULL, `store_phonenumber` varchar(16) NOT NULL, `store_sosmed` text NOT NULL, `store_description` varchar(200) NOT NULL, `status` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE IF NOT EXISTS `users` ( `ID` int(11) unsigned NOT NULL, `user_email` varchar(100) NOT NULL, `user_login` varchar(60) NOT NULL DEFAULT '', `user_pass` varchar(64) NOT NULL DEFAULT '', `user_level` int(11) NOT NULL DEFAULT '80' COMMENT '10=admin;80=member;200=developer', `user_registered` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `user_activation_key` varchar(60) NOT NULL DEFAULT '', `user_status` int(11) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `user_detail` -- CREATE TABLE IF NOT EXISTS `user_detail` ( `ID` int(11) NOT NULL, `user_id` int(11) NOT NULL, `display_name` varchar(20) NOT NULL, `card_id` varchar(30) NOT NULL, `full_name` varchar(100) NOT NULL, `address_on_card` varchar(200) NOT NULL, `domicili_address` varchar(200) NOT NULL, `gender` int(1) NOT NULL, `phone_number` varchar(16) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Indexes for dumped tables -- -- -- Indexes for table `store` -- ALTER TABLE `store` ADD PRIMARY KEY (`ID`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`ID`); -- -- Indexes for table `user_detail` -- ALTER TABLE `user_detail` ADD PRIMARY KEY (`ID`), ADD KEY `user_id` (`user_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `store` -- ALTER TABLE `store` MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `ID` int(11) unsigned NOT NULL AUTO_INCREMENT; /*!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 */;
<filename>src/main/resources/db/migration/V2019.11.20_203934__SoProject.sql -- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64) -- -- Host: localhost Database: test -- ------------------------------------------------------ -- Server version 8.0.15 /*!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 */; SET NAMES utf8mb4 ; /*!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 `so_project` -- DROP TABLE IF EXISTS `so_project`; /*!40101 SET @saved_cs_client = @@character_set_client */; SET character_set_client = utf8mb4 ; CREATE TABLE `so_project` ( `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, `create_time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, `deadline` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, `module_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, `note` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, `project_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, `status` int(11) DEFAULT NULL, `update_time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, `delete_flag` int(11) DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `so_project` -- LOCK TABLES `so_project` WRITE; /*!40000 ALTER TABLE `so_project` DISABLE KEYS */; INSERT INTO `so_project` VALUES ('2c9020f86b976145016b97b12d150000','2019-06-27 14:48:19','2019-06-27','实现博客footer样式设计','footer版本1.0','SO博客前台',1,'2019-06-27 17:01:34',0),('2c9020f86b92e8ce016b92f0c80b002b','2019-06-26 16:39:41','2019-06-28','实现博客文章页面设计','按设计稿实现SO博客文章页面','SO博客前台',1,'2019-06-28 16:58:53',0),('2c9020f86b92e8ce016b92edc8c10029','2019-06-26 16:36:25','2019-06-26','项目管理模块','该模块用于管理项目开发进度','SO博客后台',1,'2019-06-26 16:36:33',0),('2c9020f86b98ac13016b98ade9b50000','2019-06-26 17:24:22','2019-06-27','实现博客首页设计','按设计稿实现SO博客首页','SO博客前台',1,'2019-06-27 14:26:15',0),('2c9020f86bb12ff5016bb201aeee0002','2019-07-02 17:26:23','2019-07-09','标签字段管理','实现标签相关操作接口','SO博客后台',1,'2019-07-09 19:51:18',0),('2c9020f86bb12ff5016bb202b9d40003','2019-07-02 17:27:31','2019-07-10','首页文章列表分页','注意:列表长度不要太长','SO博客前台',0,NULL,1),('2c9020f86bb249d4016bb24d23980000','2019-07-02 18:48:48','2019-07-03','数据库版本控制','在后台集成flyway','SO博客后台',1,'2019-07-04 15:06:08',0),('2c9020f86bbbcf2b016bbbd721c20000','2019-07-04 15:16:06','2019-07-08','博文存储转至ES','先转至ES,再做标签字段管理','SO博客后台',1,'2019-07-08 16:24:54',0),('2c9020f86c03fec7016c0403b5950000','2019-07-18 15:37:27','2019-07-18','相关文章接口','实现相关文章推荐接口','SO博客后台',1,'2019-07-18 15:37:30',0),('2c9020f86c03fec7016c040499020001','2019-07-18 15:38:25','2019-07-20','文章全局搜索接口','实现文章全局搜索','SO博客后台',1,'2019-08-08 16:05:22',0),('2c9020f86c03fec7016c04057e140002','2019-07-18 15:39:24','2019-07-19','首页文章列表分页','实现首页文章列表分页','SO博客前台',1,'2019-07-19 15:29:54',0),('2c9020f86c03fec7016c040643850003','2019-07-18 15:40:15','2019-07-20','关于页面','关于页面(包含SO博客系统介绍和自我介绍)','SO博客前台',1,'2019-08-08 16:05:24',0),('2c9020f86c07d3fa016c095669c40000','2019-07-19 16:25:53','2019-07-21','后台管理-文章管理页面','功能:搜索、查看、编辑、修改、删除','SO博客前台',1,'2019-08-08 16:05:06',0),('2c9020f86c07d3fa016c0958bc0b0001','2019-07-19 16:28:25','2019-07-21','后台管理-文章编写/编辑页面','功能:添加封面(默认取文章中的第一张图片)、添加摘要/副标题(默认从文章的<more>标签中获取)、添加主题/专栏、添加文章来源、文章可见','SO博客前台',1,'2019-08-08 16:05:03',0),('2c9020f86c07d3fa016c095b23a20002','2019-07-19 16:31:03','2019-10-11','后台管理-仪表盘页面','功能:专栏展示、TODO计划栏、恢复文章编写(文章历史纪录)、文章提交日统计(柱状)图、访问量统计(折线)图、标签展示(饼状)图、访问数、文章总数、转发数、评论数、关注数','SO博客前台',1,'2019-10-11 17:15:58',0),('8a80cb816c6fa168016c703d4b880000','2019-08-08 15:59:20','2019-08-08','后台管理-项目管理-页面重构','重构后台管理-项目管理页面','SO博客前台',1,'2019-08-08 16:00:16',0),('8a80cb816db33e25016db57e12710000','2019-10-10 19:46:41','2019-10-10','数据定时备份接口及任务','提供备份数据接口;设置备份数据定时任务','SO博客后台',1,'2019-10-10 19:46:47',0),('8a80cb816db8d2ac016db8d7a9850000','2019-10-11 11:23:24','2019-10-12','文章编写页面重构','文章页面编写逻辑重构,提供良好的交互接口','SO博客前台',1,'2019-10-21 17:08:24',0),('2c9180836e3ad359016e4009e0fd0000','2019-11-06 17:26:59','2019-11-07','完成系统设置','实现系统配置设置页面的接口对接','SO博客前台',1,'2019-11-07 13:12:47',0),('2c9180836e3ad359016e400a6e070001','2019-11-06 17:27:35','2019-11-07','实现用户信息页面','实现用户信息页面','SO博客前台',0,NULL,0),('2c9180836e3ad359016e400b3e730002','2019-11-06 17:28:29','2019-11-07','用户信息设置页面功能实现','实现用户信息设置页面功能','SO博客前台',0,NULL,0),('2c9180836e3ad359016e400bebef0003','2019-11-06 17:29:13','2019-11-08','实现菜单配置功能','实现菜单配置功能','SO博客前台',0,NULL,0); /*!40000 ALTER TABLE `so_project` 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-11-20 20:39:32
CREATE TABLE IF NOT EXISTS navbar_item ( name VARCHAR(20) PRIMARY KEY );
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 09 Agu 2019 pada 13.35 -- Versi server: 10.3.16-MariaDB -- Versi PHP: 7.3.6 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: `absensi1` -- -- -------------------------------------------------------- -- -- Struktur dari tabel `absensi` -- CREATE TABLE `absensi` ( `id_absensi` int(10) NOT NULL, `nik` int(11) NOT NULL, `nama` varchar(25) NOT NULL, `tanggal` date NOT NULL, `id_jadwal` int(11) NOT NULL, `shift` enum('Non Shift','Shift 1','Shift 2','Shift 3') NOT NULL, `jam_masuk` time NOT NULL, `jam_keluar` time NOT NULL, `ketepatan` enum('Tepat Waktu','Terlambat') NOT NULL, `pulang_awal` time DEFAULT NULL, `lembur` time DEFAULT NULL, `keterangan` enum('Masuk','Cuti','Sakit','Izin','Tanpa Keterangan') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Struktur dari tabel `akun` -- CREATE TABLE `akun` ( `nik` int(11) NOT NULL, `nama` varchar(125) NOT NULL, `password` varchar(256) NOT NULL, `image` varchar(256) NOT NULL, `id_level` int(11) NOT NULL, `aktive` int(1) NOT NULL, `tanggal_buat` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data untuk tabel `akun` -- INSERT INTO `akun` (`nik`, `nama`, `password`, `image`, `id_level`, `aktive`, `tanggal_buat`) VALUES (12172531, '<NAME>', <PASSWORD>', 'default.jpg', 1, 1, 1558202402); -- -------------------------------------------------------- -- -- Struktur dari tabel `departemen` -- CREATE TABLE `departemen` ( `id_departemen` int(11) NOT NULL, `departemen` enum('divisi produksi 1','divisi produksi 2','quality control 1','quality control 2','raw materialing production') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data untuk tabel `departemen` -- INSERT INTO `departemen` (`id_departemen`, `departemen`) VALUES (1, 'divisi produksi 1'), (2, 'divisi produksi 2'), (3, 'quality control 1'), (4, 'quality control 2'), (5, 'raw materialing production'); -- -------------------------------------------------------- -- -- Struktur dari tabel `jabatan` -- CREATE TABLE `jabatan` ( `id_jabatan` int(10) NOT NULL, `jabatan` enum('supervisor','foreman','operator','helper') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data untuk tabel `jabatan` -- INSERT INTO `jabatan` (`id_jabatan`, `jabatan`) VALUES (1, 'supervisor'), (2, 'foreman'), (3, 'operator'), (4, 'helper'); -- -------------------------------------------------------- -- -- Struktur dari tabel `jadwal` -- CREATE TABLE `jadwal` ( `id_jadwal` int(10) NOT NULL, `shift` enum('non shift','shift 1','shift 2','shift 3') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data untuk tabel `jadwal` -- INSERT INTO `jadwal` (`id_jadwal`, `shift`) VALUES (1, 'non shift'), (2, 'shift 1'), (3, 'shift 2'), (4, 'shift 3'); -- -------------------------------------------------------- -- -- Struktur dari tabel `karyawan` -- CREATE TABLE `karyawan` ( `nik` int(10) NOT NULL, `nama` varchar(25) NOT NULL, `jenis_kelamin` enum('Laki-laki','Perempuan') NOT NULL, `tgl_lahir` date NOT NULL, `id_departemen` int(11) NOT NULL, `departemen` enum('Divisi Produksi 1','Divisi Produksi 2','Quality Control 1','Quality Control 2','Raw Materialing Production') NOT NULL, `id_jabatan` int(10) NOT NULL, `jabatan` enum('Supervisor','Foreman','Operator','Helper') NOT NULL, `alamat` text NOT NULL, `no_telp` varchar(15) NOT NULL, `tgl_masuk` date NOT NULL, `tgl_keluar` date DEFAULT NULL, `status` enum('Karyawan Tetap','Karyawan Kontrak','Pensiun / Keluar') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data untuk tabel `karyawan` -- INSERT INTO `karyawan` (`nik`, `nama`, `jenis_kelamin`, `tgl_lahir`, `id_departemen`, `departemen`, `id_jabatan`, `jabatan`, `alamat`, `no_telp`, `tgl_masuk`, `tgl_keluar`, `status`) VALUES (12172531, '<NAME>', 'Laki-laki', '2019-05-15', 4, 'Quality Control 2', 3, 'Operator', 'Bandung', '08564568522', '2019-04-16', NULL, 'Karyawan Tetap'); -- -------------------------------------------------------- -- -- Struktur dari tabel `level` -- CREATE TABLE `level` ( `id_level` int(11) NOT NULL, `level` varchar(128) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data untuk tabel `level` -- INSERT INTO `level` (`id_level`, `level`) VALUES (1, 'Administrator'), (2, 'Karyawan'); -- -------------------------------------------------------- -- -- Struktur dari tabel `menu` -- CREATE TABLE `menu` ( `id_menu` int(11) NOT NULL, `menu` varchar(128) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data untuk tabel `menu` -- INSERT INTO `menu` (`id_menu`, `menu`) VALUES (1, 'Administrator'), (2, 'Karyawan'), (3, 'Menu'), (4, 'tes'); -- -------------------------------------------------------- -- -- Struktur dari tabel `menu_akses` -- CREATE TABLE `menu_akses` ( `id_menuakses` int(11) NOT NULL, `id_level` int(11) NOT NULL, `id_menu` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data untuk tabel `menu_akses` -- INSERT INTO `menu_akses` (`id_menuakses`, `id_level`, `id_menu`) VALUES (1, 1, 1), (2, 2, 2), (3, 1, 3); -- -------------------------------------------------------- -- -- Struktur dari tabel `submenu` -- CREATE TABLE `submenu` ( `id_submenu` int(11) NOT NULL, `id_menu` int(11) NOT NULL, `judul` varchar(128) NOT NULL, `url` varchar(128) NOT NULL, `icon` varchar(128) NOT NULL, `aktive` int(1) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data untuk tabel `submenu` -- INSERT INTO `submenu` (`id_submenu`, `id_menu`, `judul`, `url`, `icon`, `aktive`) VALUES (1, 1, 'Dashboard', 'admin', 'fas fa-fw fa-tachometer-alt', 1), (4, 3, 'Menu Manajemen', 'menu', 'fas fa-fw fa-folder', 1), (5, 3, 'Submenu Manajemen', 'menu/submenu', 'fas fa-fw fa-folder-open', 1), (6, 3, 'Level Akses', 'admin/level', 'fas fa-fw fa-user-tie', 1), (7, 1, 'Profil Saya', 'admin/profil', 'fas fa-fw fa-user', 1), (8, 1, 'Ganti Foto Profil', 'admin/editprofil', 'fas fa-fw fa-user-edit', 1), (10, 1, 'Ganti Password', 'admin/gantipassword', 'fas fa-fw fa-key', 1), (14, 2, 'Beranda', 'karyawan', 'fas fa-fw fa-home', 1), (15, 2, 'Akun Saya', 'karyawan/akunsaya', 'fas fa-fw fa-user', 1), (16, 2, 'Ganti Foto Profil', 'karyawan/editprofil', 'fas fa-fw fa-user-edit', 1), (17, 2, 'Ganti Password', 'karyawan/gantipassword', 'fas fa-fw fa-key', 1); -- -- Indexes for dumped tables -- -- -- Indeks untuk tabel `absensi` -- ALTER TABLE `absensi` ADD PRIMARY KEY (`id_absensi`), ADD KEY `nik` (`nik`), ADD KEY `id_jadwal` (`id_jadwal`); -- -- Indeks untuk tabel `akun` -- ALTER TABLE `akun` ADD KEY `id_level` (`id_level`), ADD KEY `nik` (`nik`); -- -- Indeks untuk tabel `departemen` -- ALTER TABLE `departemen` ADD PRIMARY KEY (`id_departemen`); -- -- Indeks untuk tabel `jabatan` -- ALTER TABLE `jabatan` ADD PRIMARY KEY (`id_jabatan`); -- -- Indeks untuk tabel `jadwal` -- ALTER TABLE `jadwal` ADD PRIMARY KEY (`id_jadwal`); -- -- Indeks untuk tabel `karyawan` -- ALTER TABLE `karyawan` ADD PRIMARY KEY (`nik`), ADD UNIQUE KEY `nik` (`nik`), ADD KEY `id_departemen` (`id_departemen`), ADD KEY `id_jabatan` (`id_jabatan`); -- -- Indeks untuk tabel `level` -- ALTER TABLE `level` ADD PRIMARY KEY (`id_level`); -- -- Indeks untuk tabel `menu` -- ALTER TABLE `menu` ADD PRIMARY KEY (`id_menu`); -- -- Indeks untuk tabel `menu_akses` -- ALTER TABLE `menu_akses` ADD PRIMARY KEY (`id_menuakses`); -- -- Indeks untuk tabel `submenu` -- ALTER TABLE `submenu` ADD PRIMARY KEY (`id_submenu`); -- -- AUTO_INCREMENT untuk tabel yang dibuang -- -- -- AUTO_INCREMENT untuk tabel `absensi` -- ALTER TABLE `absensi` MODIFY `id_absensi` int(10) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT untuk tabel `departemen` -- ALTER TABLE `departemen` MODIFY `id_departemen` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT untuk tabel `jabatan` -- ALTER TABLE `jabatan` MODIFY `id_jabatan` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT untuk tabel `jadwal` -- ALTER TABLE `jadwal` MODIFY `id_jadwal` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT untuk tabel `karyawan` -- ALTER TABLE `karyawan` MODIFY `nik` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12172532; -- -- AUTO_INCREMENT untuk tabel `level` -- ALTER TABLE `level` MODIFY `id_level` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT untuk tabel `menu` -- ALTER TABLE `menu` MODIFY `id_menu` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT untuk tabel `menu_akses` -- ALTER TABLE `menu_akses` MODIFY `id_menuakses` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT untuk tabel `submenu` -- ALTER TABLE `submenu` MODIFY `id_submenu` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18; -- -- Ketidakleluasaan untuk tabel pelimpahan (Dumped Tables) -- -- -- Ketidakleluasaan untuk tabel `absensi` -- ALTER TABLE `absensi` ADD CONSTRAINT `absensi_ibfk_1` FOREIGN KEY (`nik`) REFERENCES `karyawan` (`nik`), ADD CONSTRAINT `absensi_ibfk_2` FOREIGN KEY (`id_jadwal`) REFERENCES `jadwal` (`id_jadwal`); -- -- Ketidakleluasaan untuk tabel `akun` -- ALTER TABLE `akun` ADD CONSTRAINT `akun_ibfk_1` FOREIGN KEY (`id_level`) REFERENCES `level` (`id_level`), ADD CONSTRAINT `akun_ibfk_2` FOREIGN KEY (`nik`) REFERENCES `karyawan` (`nik`); -- -- Ketidakleluasaan untuk tabel `karyawan` -- ALTER TABLE `karyawan` ADD CONSTRAINT `karyawan_ibfk_1` FOREIGN KEY (`id_departemen`) REFERENCES `departemen` (`id_departemen`), ADD CONSTRAINT `karyawan_ibfk_2` FOREIGN KEY (`id_jabatan`) REFERENCES `jabatan` (`id_jabatan`); 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 */;
INSERT INTO Books (title,titleLong,isbn,isbn13,deweyDecimal,publisherId,format,language,datePublished,edition,pages,dimensions,overview,image,msrp,excerpt,synopsys,notes) VALUES("Test book","Test book: this book is a test","0123456789",NULL,NULL,1,NULL,"English",2020,"1st Edition",200,NULL,NULL,NULL,NULL,NULL,NULL,"this is a test"); --TODO: think about new/existing tags, authors and publishers
<filename>app/Database/database.sql<gh_stars>0 DROP DATABASE IF EXISTS jwt_auth; CREATE DATABASE jwt_auth; USE jwt_auth; CREATE TABLE users ( id INT AUTO_INCREMENT, email VARCHAR(255), password VARCHAR(255), PRIMARY KEY (id) ); INSERT INTO users (email, password) VALUES ( '<EMAIL>', <PASSWORD>' );
-- Returns: -- - linear_feature_id - primary key of the matched stream -- - gnis_name - name of the nearest stream -- - wscode_ltree - FWA Watershed Code of the nearest stream (as ltree) -- - localcode_ltree - Local Watershed Code of the nearest stream (as ltree) -- - blue_line_key - blue_line_key of the nearest stream -- - downstream_route_measure - the measure at closest point of stream to the provided point -- - distance_to_stream - the distance from point to closest point on the stream -- - bc_ind - indicates if the stream is in BC -- - geom - point geometry of closest location on the stream (at downstream_route_measure) CREATE OR REPLACE FUNCTION FWA_IndexPoint( point geometry(Point, 3005), tolerance float DEFAULT 5000, num_features integer DEFAULT 1 ) RETURNS TABLE ( linear_feature_id bigint, gnis_name text, wscode_ltree ltree, localcode_ltree ltree, blue_line_key integer, downstream_route_measure float, distance_to_stream float, bc_ind boolean, geom geometry(Point, 3005) ) AS $$ WITH pt AS ( SELECT p.geom, CASE WHEN wsg.watershed_group_code is NULL THEN False ELSE True END as bc_ind FROM ( SELECT $1 as geom ) p LEFT OUTER JOIN whse_basemapping.fwa_watershed_groups_subdivided wsg ON ST_intersects(p.geom, wsg.geom) ) SELECT linear_feature_id, gnis_name, wscode_ltree, localcode_ltree, blue_line_key, (ST_LineLocatePoint(stream_geom, ST_ClosestPoint(stream_geom, pt_geom)) * length_metre ) + downstream_route_measure AS downstream_route_measure, ROUND(distance_to_stream::numeric, 3) AS distance_to_stream, bc_ind, ST_ClosestPoint(stream_geom, pt_geom) as geom FROM ( SELECT DISTINCT ON (blue_line_key) linear_feature_id, gnis_name, wscode_ltree, localcode_ltree, blue_line_key, length_metre, downstream_route_measure, stream_geom, pt_geom, bc_ind, distance_to_stream FROM ( SELECT linear_feature_id, gnis_name, wscode_ltree, localcode_ltree, blue_line_key, length_metre, downstream_route_measure, ST_LineMerge(str.geom) as stream_geom, pt.geom as pt_geom, ST_Distance(str.geom, pt.geom) as distance_to_stream, pt.bc_ind FROM whse_basemapping.fwa_stream_networks_sp AS str, pt WHERE NOT wscode_ltree <@ '999' -- do not use 6010 lines, only return nearest stream inside BC AND edge_type != 6010 ORDER BY str.geom <-> (select geom from pt) LIMIT 100 ) AS f ORDER BY blue_line_key, distance_to_stream ) b WHERE distance_to_stream <= $2 ORDER BY distance_to_stream asc LIMIT $3 $$ language 'sql' immutable parallel safe; COMMENT ON FUNCTION FWA_IndexPoint(geometry(Point, 3005), float, integer) IS 'Provided a BC Albers point geometry, return the point indexed (snapped) to nearest stream(s) within specified tolerance (m)'; CREATE OR REPLACE FUNCTION postgisftw.FWA_IndexPoint( x float, y float, srid integer, tolerance float DEFAULT 5000, num_features integer DEFAULT 1 ) RETURNS TABLE ( linear_feature_id bigint, gnis_name text, wscode_ltree ltree, localcode_ltree ltree, blue_line_key integer, downstream_route_measure float, distance_to_stream float, bc_ind boolean, geom geometry(Point, 3005) ) AS $$ WITH pt AS ( SELECT ST_Transform(ST_SetSRID(ST_Makepoint($1, $2), $3), 3005) as geom ) SELECT FWA_IndexPoint(pt.geom, $4, $5) FROM pt $$ language 'sql' immutable parallel safe; COMMENT ON FUNCTION postgisftw.FWA_IndexPoint(float, float, integer, float, integer) IS 'Provided a point (as x,y coordinates and EPSG code), return the point indexed (snapped) to nearest stream(s) within specified tolerance (m)';
CREATE TABLE `users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `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, `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, PRIMARY KEY (`id`), UNIQUE KEY `users_email_unique` (`email`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- LOIJNSU&^%$A7a67s -- $2y$10$k2S5gIlC0G6wVnEDX6xSD.zSiKofQgOXhTIPj9V10J2sPc1UZWZfK INSERT INTO badminto_worktest.users (`name`, `email`, `password`, `created_at`) VALUES ('<NAME>', '<EMAIL>', '$2y$10$k2S5gIlC0G6wVnEDX6xSD.zSiKofQgOXhTIPj9V10J2sPc1UZWZfK', NOW());
DROP DATABASE IF EXISTS zeroexploit; CREATE DATABASE `zeroexploit` DEFAULT CHARACTER SET utf8 collate utf8_general_ci; USE zeroexploit; # type=1 返回是text/html的基准请求 # type=2 是ajax请求 # type=3 其他请求 # checked=0 是未处理 # checked=1 按参数分解处理 CREATE TABLE `http` ( `id` int NOT NULL AUTO_INCREMENT, `gid` int(11) NOT NULL, `host` varchar(255) NOT NULL, `req` LongText COLLATE utf8_bin NOT NULL, `rsp` LongText COLLATE utf8_bin NOT NULL, `time` int(11) NOT NULL, `type` int(8) NOT NULL, `signature` varchar(64) NOT NULL, `checked` int(3) DEFAULT 0, PRIMARY KEY (`id`), UNIQUE KEY (`signature`) )ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `detector`( `id` int NOT NULL AUTO_INCREMENT, `hash` varchar(255) NOT NULL, `url` TEXT, `method` varchar(255) NOT NULL, `info` TEXT, `show` int(3) DEFAULT 1, PRIMARY KEY (`id`), UNIQUE KEY (`hash`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; # lang/framework CREATE TABLE `siteinfo`( `host` varchar(255) NOT NULL, `key` varchar(255) NOT NULL, `value` varchar(255) NOT NULL, PRIMARY KEY (`host`, `key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; # type: int float url str array CREATE TABLE `requests`( `id` int NOT NULL AUTO_INCREMENT, `requestid` int NOT NULL, `method` varchar(255) NOT NULL, `key` varchar(255), `type` varchar(255), `checked` int DEFAULT 0, PRIMARY KEY (`id`), FOREIGN KEY (requestid) REFERENCES http(id) ON UPDATE CASCADE ON DELETE RESTRICT ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `result`( `id` int NOT NULL AUTO_INCREMENT, `requestid` int NOT NULL, `method` varchar(255) NOT NULL, `key` varchar(255) NOT NULL, `host` varchar(255) NOT NULL, `url` TEXT, `hash` varchar(255), `result` varchar(255) NOT NULL, `level` varchar(255) NOT NULL, `info` TEXT, `exploit` varchar(255) NOT NULL, `show` int(3) DEFAULT 1, PRIMARY KEY (`id`), FOREIGN KEY (requestid) REFERENCES http(id) ON UPDATE CASCADE ON DELETE RESTRICT ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `hashlog`( `id` int NOT NULL AUTO_INCREMENT, `hash` varchar(255), PRIMARY KEY (`id`), UNIQUE KEY (`hash`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Azure Search cannot read the view's schema, so copy it to static table SELECT * INTO [SalesLT].[ProductsForSearch] FROM [SalesLT].[vProductsForSearch]