text
stringlengths
6
9.38M
-- start with employee create table sec_user ( id BIGINT IDENTITY(1, 1) not null, login nvarchar(100) not null, password nvarchar(100) not null, emp_id BIGINT not null, PRIMARY KEY (id), FOREIGN KEY (emp_id) REFERENCES employee(id));
CREATE SCHEMA IF NOT EXISTS htsystem; CREATE TABLE IF NOT EXISTS measurement ( time TIMESTAMP NOT NULL, temp INT NOT NULL, hum INT NOT NULL, PRIMARY KEY(time) );
/* Name: Marketing Groups Data source: 4 Created By: Admin Last Update At: 2015-10-28T15:38:33.387202+00:00 */ SELECT id,name FROM (SELECT name, string(id) as id FROM [djomniture:devspark.MG_Marketing_Groups] where {{startdate}} !=0 and {{enddate}} != 0 ORDER BY name ASC)
/*add artists*/ BEGIN insertArtist('Rihanna', '20.02.1988'); insertArtist('David Guetta', '07.11.1967'); insertArtist('Micheal Jackson', '29.08.1958'); insertArtist('Sia', '18.12.1975'); insertArtist('Adele', '05.05.1988'); insertArtist('Madonna', '16.08.1958'); insertArtist('Beyonce', '04.09.1981'); insertArtist('Bruno Mars', '08.10.1985'); insertArtist('Calvin Harris', '17.01.1984'); insertArtist('Tiesto', '17.01.1969'); END; /*add songs*/ BEGIN insertSong('Smooth Criminal', '8'); insertSong('Hello','7'); insertSong('Diamonds','8'); insertSong('Titanium','9'); insertSong('Bad','8'); insertSong('Grenade','8'); insertSong('Wasted','8'); insertSong('I need your love','8'); END; /*add webuser*/ BEGIN insertwebuser('kullanici1','1234', 0); insertwebuser('kullanici2','5678', 0); insertwebuser('kullanici3','1111', 0); insertwebuser('kullanici4','2222', 0); insertwebuser('kullanici5','9999', 0); insertwebuser('admin', 'bbm473', 1); END; /* add publisher*/ BEGIN insertpublisher('Epic',null,null); insertpublisher('Jive',null,null); insertpublisher('Emi',null,null); insertpublisher('Nation',null,null); insertpublisher('Roc',null,null); insertpublisher('Columbia',null,null); END; /* add Genre */ BEGIN insertGenre('Pop'); insertGenre('Rock'); insertGenre('Elecktro'); insertGenre('Dance'); insertGenre('Jazz'); END; /*Add album*/ BEGIN insertalbum('Bad','8','1987','1'); insertalbum('Unapologetic','7','2012','1'); insertalbum('Nothing but the Beat','9','2011','1'); insertalbum('Doo-Wops & Hooligans','8','2010','2'); insertalbum('18 Months','8','2012','2'); insertalbum('Listen','10','2014','2'); insertalbum('25','7','2015','2'); insertalbum('A Town Called Paradise','6','2014','1'); END; /* Add album has song */ BEGIN insertalbumhassong(1, 1); insertalbumhassong(2, 2); insertalbumhassong(3, 3); insertalbumhassong(4, 4); insertalbumhassong(4, 5); insertalbumhassong(5, 5); insertalbumhassong(6, 6); insertalbumhassong(7, 7); insertalbumhassong(8, 8); insertalbumhassong(2, 7); insertalbumhassong(2, 4); END;
ALTER VIEW V_CMS_LOAN_BILL AS SELECT CLI.CORP_ID, BC.CORP_CODE, BC.CORP_NAME, CLI.STATUS AS LOAN_STATE, CLI.LOAN_GENRE, CONVERT(CHAR(20), CLI.LOAN_DATE, 120) AS LOAN_DATE, SUM(ISNULL(CLI.LOAN_MONEY, 0)) AS CONTRACT_SUM, SUM(CASE WHEN DATEPART(YEAR, LSOI.LOAN_SEND_OUT_DATE) = DATEPART(YEAR, GETDATE()) THEN LSOI.LOAN_SEND_OUT_MONEY ELSE 0 END) AS LOAN_SUM, SUM(ISNULL(LSOI.LOAN_SEND_OUT_MONEY, 0)) AS LOAN_SUM_ALL, SUM(CASE WHEN DATEPART(YEAR, CLR.REPAY_DATE) = DATEPART(YEAR, GETDATE()) AND CLR.STATUS >= 95 THEN CLR.REPAY_MONEY ELSE 0 END) AS REPAY_SUM, SUM(CASE WHEN CLR.STATUS >= 95 THEN CLR.REPAY_MONEY ELSE 0 END) AS REPAY_SUM_ALL, SUM(ISNULL(LSOI.LOAN_SEND_OUT_MONEY, 0)) AS LOAN_MONEY, (SUM(ISNULL(CLI.LOAN_MONEY, 0)) - SUM((CASE WHEN CLR.STATUS >= 95 THEN CLR.REPAY_MONEY ELSE 0 END))) AS LOAN_MONEY_LAST FROM CMS_LOAN_INFO CLI LEFT JOIN LOAN_SEND_OUT_INFO LSOI ON CLI.BILL_CODE = LSOI.FATHER_CODE LEFT JOIN CMS_CONTRACT CCT ON LSOI.BILL_CODE = CCT.LI_CODE LEFT JOIN CMS_LOAN_REPAY CLR ON CLR.LI_CODE = LSOI.BILL_CODE LEFT JOIN BT_CORP BC ON CLI.CORP_ID = BC.ID WHERE CLI.STATUS >= 95 GROUP BY CLI.CORP_ID, BC.CORP_CODE, BC.CORP_NAME, CLI.LOAN_DATE, CLI.STATUS, CLI.LOAN_GENRE;
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 31-Ago-2017 às 19:08 -- Versão do servidor: 10.1.16-MariaDB -- PHP Version: 5.6.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `pcd_db` -- -- -------------------------------------------------------- -- -- Estrutura da tabela `advertencias` -- CREATE TABLE `advertencias` ( `id` int(16) NOT NULL, `data` date NOT NULL, `memberId` int(11) NOT NULL, `reason` varchar(255) NOT NULL, `responsible` varchar(255) NOT NULL, `points` int(16) NOT NULL, `dismissed` tinyint(1) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Extraindo dados da tabela `advertencias` -- INSERT INTO `advertencias` (`id`, `data`, `memberId`, `reason`, `responsible`, `points`, `dismissed`) VALUES (1, '2017-07-28', 5, 'Ausência nas reuniões: faltar alguma reunião que foi marcada com pelo menos 72 horas (3 dias) de antecedência sem nenhuma justificativa plausível. ', 'Kayo Costa', 4, 0), (2, '2017-07-28', 5, 'Ausência de resposta dos comunicados internos: presumem-se lidas as correspondências eletrônicas em um prazo de 48 horas, assim o membro terá até este prazo para resposta de emails (quando necessário). ', 'Kayo Costa', 2, 1), (3, '2017-07-29', 12, 'Ausência nas reuniões: faltar alguma reunião que foi marcada com pelo menos 72 horas (3 dias) de antecedência sem nenhuma justificativa plausível. ', 'Cássio Santos', 4, 1); -- -------------------------------------------------------- -- -- Estrutura da tabela `usuarios` -- CREATE TABLE `usuarios` ( `id` int(16) NOT NULL, `login` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, `name` varchar(255) NOT NULL, `occupation` varchar(255) NOT NULL, `score` int(16) NOT NULL, `history` varchar(255) NOT NULL, `privilege` tinyint(1) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Extraindo dados da tabela `usuarios` -- INSERT INTO `usuarios` (`id`, `login`, `password`, `name`, `occupation`, `score`, `history`, `privilege`) VALUES (5, 'pedrogomes', '8cb2237d0679ca88db6464eac60da96345513964', 'Pedro', 'Trainee', 19, 'Trainee', 0), (6, 'kayocosta', '8cb2237d0679ca88db6464eac60da96345513964', 'Kayo Costa', 'Diretor de Recursos Humanos', 19, '', 1), (7, 'pedroneri', '8cb2237d0679ca88db6464eac60da96345513964', 'Pedro Neri', 'Presidente', 20, '', 1), (8, 'ssscassio', '8cb2237d0679ca88db6464eac60da96345513964', 'Cássio Santos', 'Vice-Presidente', 20, '', 1), (9, 'alissonvilas', '8cb2237d0679ca88db6464eac60da96345513964', 'Alisson Vilas', 'Diretor de Marketing', 18, '', 1), (12, 'bernardorosa', '8cb2237d0679ca88db6464eac60da96345513964', 'Bernardo Rosa', 'Diretor Financeiro', 18, '', 1), (13, 'saulodetarso', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Saulo De Tarso', 'Diretor de Projetos', 17, '', 1), (14, 'thatiannecristiana', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Thatianne Cristina', 'Acessora Financeira', 19, '', 0), (15, 'lucascardoso', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Lucas Cardoso', 'Consultor', 17, '', 0), (16, 'lucasalves', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Lucas Alves', 'Acessor de Vice-Presidência', 18, '', 0), (17, 'marialuisa', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Maria Luísa', 'Consultora', 20, '', 0), (18, 'odiviocaio', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Odivio Caio', 'Consultor', 16, '', 0), (19, 'luanvictor', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Luan Victor', 'Acessor de Recursos Humanos', 20, '', 0), (20, 'nilsonaugusto', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Nilson Augusto', 'Acessor de Vendas', 17, '', 0), (21, 'brunovogel', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Bruno Vogel', 'Acessor de Projetos', 20, '', 0), (22, 'pedrobrandao', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Pedro Brandão', 'Acessor de Marketing', 19, '', 1), (23, 'fabiobarros', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Fábio Barros', 'Conselheiro', 18, '', 1), (24, 'gledsondeoliveira', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Gledson De Oliveira', 'Conselheiro', 20, '', 1), (25, 'henriquebastos', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Henrique Bastos', 'Trainee', 20, '', 0), (26, 'valmiralmeida', '8cb2237d0679ca88db6464eac60da96345513964', 'Valmir Vinícius', 'Trainee', 20, '', 0), (27, 'gustavoboanerges', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Gustavo Boanerges', 'Trainee', 20, '', 0), (28, 'aloisiojunior', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Aloísio Júnior', 'Trainee', 20, '', 0), (29, 'igorgarcia', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Igor Garcia', 'Trainee', 20, '', 0), (30, 'karollima', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Karol Lima', 'Trainee', 20, '', 0), (31, 'marcelomota', '8cb2237d0679ca88db6464eac60da96345513964\r\n', 'Marcelo Mota', 'Trainee', 20, '', 0), (32, 'milenamelo', '8cb2237d0679ca88db6464eac60da9634551', 'Milena Melo', 'Trainee', 20, '', 0), (33, 'douglascerqueira', '8cb2237d0679ca88db6464eac60da9634551', 'Douglas Cerqueira', 'Trainee', 20, '', 0), (34, 'emillesampaio', '8cb2237d0679ca88db6464eac60da9634551', 'Emille Sampaio', 'Trainee', 20, '', 0); -- -- Indexes for dumped tables -- -- -- Indexes for table `advertencias` -- ALTER TABLE `advertencias` ADD PRIMARY KEY (`id`); -- -- Indexes for table `usuarios` -- ALTER TABLE `usuarios` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `advertencias` -- ALTER TABLE `advertencias` MODIFY `id` int(16) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT for table `usuarios` -- ALTER TABLE `usuarios` MODIFY `id` int(16) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=35; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
--ALTER VIEW [BG_ALL] AS select OH.entered_dt, OH.shipping_dt, OH.ord_type, OH.cus_no, OH.ord_no, OL.item_no, OL.item_desc_1, OL.item_desc_2, qty_ordered, unit_price, OL.loc, OH.user_def_fld_5 AS [CS_INITIALS], OH.slspsn_no, OH.bill_to_name from oeordlin_sql OL JOIN OEORDHDR_SQL OH ON OH.ord_no = OL.ord_no WHERE OH.ord_no not in (SELECT ord_no FROM BG_LATE_ORDERS_NONWM) AND item_no NOT like '%TEST%' AND OH.shipping_dt < GETDATE() AND OH.ord_type != 'I'
CREATE TABLE films ( code char(5) CONSTRAINT premierecle PRIMARY KEY, titre varchar(40) NOT NULL, did integer NOT NULL, date_prod date, genre varchar(10), duree interval hour to minute ); CREATE TABLE distributeurs ( did integer PRIMARY KEY DEFAULT nextval('serial'), nom varchar(40) NOT NULL CHECK (nom <> '') );
INSERT INTO `gorent`.`product_reviews`( `reviewer_id`, `reviewer_name`, `product_id`, `body`, `rating`, `created_at`, `updated_at` ) VALUES ( '1', 'john', '1', 'Had good experience with the product', '5', '2021-06-03', '2021-06-03' ),( '1', 'johnny', '1', 'Fantastic shoe, i could even fly with it', '5', '2021-06-03', '2021-06-03' ),( '1', 'john', '2', 'meh', '2.5', '2021-06-03', '2021-06-03' ),( '1', 'joe', '2', 'Had good experience with the product', '5', '2021-06-03', '2021-06-03' ),( '1', 'joe', '3', 'meh', '2.5', '2021-06-03', '2021-06-03' ),( '1', 'sally', '3', 'meh', '2.5', '2021-06-03', '2021-06-03' )
DELETE FROM public.address; DELETE FROM public.person;
/* ARCH_SEARCH view name --- ROLE NAME --- COMMENTS 1. archivedPullSignals archivedpullsignals 'Archived Pull Signals ' 2. archivedPullLines archivedpulllines 'Archived Pull Lines ' 3. archivedDispatches archiveddispatches 'Archived Dispatches ' 4. archivedReceipts archivedreceipts 'Archived Receipts ' */ /************************************** 1. archivedPullSignals archivedpullsignals 'Archived Pull Signals ' '********************************** ************************************************/ CALL "SECURITY"."cdp.security.procedures::createInfoRole" ( 'Archived Pull Signals' ,'Archived Pull Signals' ,'cdp.mxebgvmi.roles.archivedpullsignals::access' ,'archivedpullsignals::access' ,'view role ' ,'MXEBGVMI' ,? ) ; CALL "SECURITY"."cdp.security.procedures::createInfoRole" ( 'Archived Pull Signals' ,'Archived Pull Signals' ,'cdp.mxebgvmi.roles.archivedpullsignals::exportable' ,'archivedpullsignals::exportable' ,'exportable role ' ,'MXEBGVMI' ,? ) ; /* CALL "SECURITY"."cdp.security.procedures::createMapViewRole" ( <module_name> ,<view_name> ,<role_name>, IN aMAP_TYPE NVARCHAR(50),?); */ CALL "SECURITY"."cdp.security.procedures::createMapViewRole" ( 'MXEBGVMI' ,'archivedPullSignals' ,'cdp.mxebgvmi.roles.archivedpullsignals::access', 'view',?); CALL "SECURITY"."cdp.security.procedures::createMapViewRole" ( 'MXEBGVMI' ,'archivedPullSignals' ,'cdp.mxebgvmi.roles.archivedpullsignals::exportable', 'controllor',?); /************************************** 2. archivedPullLines archivedpulllines 'Archived Pull Lines ' ************************************************/ CALL "SECURITY"."cdp.security.procedures::createInfoRole" ( 'Archived Pull Lines' ,'Archived Pull Lines' ,'cdp.mxebgvmi.roles.archivedpulllines::access' ,'archivedpulllines::access' ,'view role ' ,'MXEBGVMI' ,? ) ; CALL "SECURITY"."cdp.security.procedures::createInfoRole" ( 'Archived Pull Lines' ,'Archived Pull Lines' ,'cdp.mxebgvmi.roles.archivedpulllines::exportable' ,'archivedpulllines::exportable' ,'exportable role ' ,'MXEBGVMI' ,? ) ; /* */ CALL "SECURITY"."cdp.security.procedures::createMapViewRole" ( 'MXEBGVMI' ,'archivedPullLines' ,'cdp.mxebgvmi.roles.archivedpulllines::access', 'view',?); CALL "SECURITY"."cdp.security.procedures::createMapViewRole" ( 'MXEBGVMI' ,'archivedPullLines' ,'cdp.mxebgvmi.roles.archivedpulllines::exportable', 'controllor',?); /************************************** 3. archivedDispatches archiveddispatches 'Archived Dispatches ' ************************************************/ CALL "SECURITY"."cdp.security.procedures::createInfoRole" ( 'Archived Dispatches' ,'Archived Dispatches' ,'cdp.mxebgvmi.roles.archiveddispatches::access' ,'confirmdispatches::access' ,'view role ' ,'MXEBGVMI' ,? ) ; CALL "SECURITY"."cdp.security.procedures::createInfoRole" ( 'Archived Dispatches' ,'Archived Dispatches' ,'cdp.mxebgvmi.roles.archiveddispatches::exportable' ,'confirmdispatches::exportable' ,'exportable role ' ,'MXEBGVMI' ,? ) ; /* */ CALL "SECURITY"."cdp.security.procedures::createMapViewRole" ( 'MXEBGVMI' ,'archivedDispatches' ,'cdp.mxebgvmi.roles.archiveddispatches::access', 'view',?); CALL "SECURITY"."cdp.security.procedures::createMapViewRole" ( 'MXEBGVMI' ,'archivedDispatches' ,'cdp.mxebgvmi.roles.archiveddispatches::exportable', 'controllor',?); /************************************** 4. archivedReceipts archivedreceipts 'Archived Receipts ' ************************************************/ CALL "SECURITY"."cdp.security.procedures::createInfoRole" ( 'Archived Receipts' ,'Archived Receipts' ,'cdp.mxebgvmi.roles.archivedreceipts::access' ,'archivedreceipts::access' ,'view role ' ,'MXEBGVMI' ,? ) ; CALL "SECURITY"."cdp.security.procedures::createInfoRole" ( 'Archived Receipts' ,'Archived Receipts' ,'cdp.mxebgvmi.roles.archivedreceipts::exportable' ,'archivedreceipts::exportable' ,'exportable role ' ,'MXEBGVMI' ,? ) ; /* 4*/ CALL "SECURITY"."cdp.security.procedures::createMapViewRole" ( 'MXEBGVMI' ,'archivedReceipts' ,'cdp.mxebgvmi.roles.archivedreceipts::access', 'view',?); CALL "SECURITY"."cdp.security.procedures::createMapViewRole" ( 'MXEBGVMI' ,'archivedReceipts' ,'cdp.mxebgvmi.roles.archivedreceipts::exportable', 'controllor',?);
ALTER TABLE `users` CHANGE COLUMN `txFriend` `txFriend` VARCHAR(3200) NULL DEFAULT NULL AFTER `txBule`;
/* Navicat Premium Data Transfer Source Server : 本地 Source Server Type : MySQL Source Server Version : 80026 Source Host : localhost:3306 Source Schema : stu_info Target Server Type : MySQL Target Server Version : 80026 File Encoding : 65001 Date: 31/08/2021 10:15:18 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for t_achievement -- ---------------------------- DROP TABLE IF EXISTS `t_achievement`; CREATE TABLE `t_achievement` ( `id` int NOT NULL AUTO_INCREMENT COMMENT '编号', `sno` int NOT NULL COMMENT '学号', `semester` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '学期', `Chinese` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '语文', `mathematics` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '数学', `English` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '英语', `physics` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '物理', `chemistry` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '化学', `biology` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '生物', `geography` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '地理', `history` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '历史', `politics` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '政治', `sports` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '体育', `music` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '音乐', `practice` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '实践', `java` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0', `cplus` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0', `python` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0', `c` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0', `html` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0', `css` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0', `javascript` varchar(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_achievement -- ---------------------------- INSERT INTO `t_achievement` VALUES (4, 1005, '大一(上)', '54', '45', '54', '54', '54', '45', '54', '54', '45', '4', '78', '78', '87', '78', '78', '99', '87', '78', '100'); INSERT INTO `t_achievement` VALUES (5, 1003, '大一(上)', '23', '123', '33', '4', '23', '43', '100', '54', '45', '6', '3', '36', '8', '5', '25', '2', '54', '45', '36'); INSERT INTO `t_achievement` VALUES (6, 1005, '大一(下)', '12', '32', '4', '45', '65', '2', '43', '5', '65', '76', '2', '54', '76', '32', '5', '8', '42', '21', '100'); INSERT INTO `t_achievement` VALUES (7, 1005, '大二(上)', '32', '32', '23', '32', '23', '43', '43', '23', '43', '43', '43', '43', '43', '43', '43', '43', '43', '43', '43'); INSERT INTO `t_achievement` VALUES (9, 1003, '大二(下)', '52', '45', '25', '54', '45', '45', '45', '45', '45', '45', '45', '45', '45', '45', '45', '45', '444', '45', '45'); INSERT INTO `t_achievement` VALUES (10, 1005, '大四(上)', '33', '43', '43', '43', '43', '43', '43', '43', '43', '43', '43', '43', '43', '43', '43', '43', '43', '43', '43'); -- ---------------------------- -- Table structure for t_class -- ---------------------------- DROP TABLE IF EXISTS `t_class`; CREATE TABLE `t_class` ( `sclassno` int NOT NULL COMMENT '班级编号', `sclassname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '班级名称', PRIMARY KEY (`sclassno`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_class -- ---------------------------- INSERT INTO `t_class` VALUES (101, '计算机一班'); INSERT INTO `t_class` VALUES (102, '计算机二班'); INSERT INTO `t_class` VALUES (103, '计算机三班'); INSERT INTO `t_class` VALUES (201, '艺术一班'); INSERT INTO `t_class` VALUES (202, '艺术二班'); INSERT INTO `t_class` VALUES (203, '艺术三班'); -- ---------------------------- -- Table structure for t_stu -- ---------------------------- DROP TABLE IF EXISTS `t_stu`; CREATE TABLE `t_stu` ( `sno` int NOT NULL COMMENT '学号', `sname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '姓名', `idno` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '身份证号', `age` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '年龄', `sex` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '性别,‘0’女,‘1’男', `hometown` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '籍贯', `nationality` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '民族', `address` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '家庭住址', `phone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电话号码', `sclassno` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '学生班级编号', PRIMARY KEY (`sno`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_stu -- ---------------------------- INSERT INTO `t_stu` VALUES (1003, '赵六', '6546565456', '26', '0', '中国', '汉族', '的收费收费的', '5646546', '202'); INSERT INTO `t_stu` VALUES (1005, '女孩', '6546565456', '23', '0', '中国', '汉族', '士大夫大师傅', '123156', '202'); INSERT INTO `t_stu` VALUES (1006, '房贷首付', '452', '20', '1', '方', '方法都是', '大师傅似的', '65465', '203'); INSERT INTO `t_stu` VALUES (1007, '李白', '4654651654165', '23', '1', '王者峡谷', '汉', '硒鼓', '135246846', '201'); INSERT INTO `t_stu` VALUES (1008, '韩信', '465465165689', '56', '1', '王者峡谷', '汉', '硒鼓', '13321313', '203'); INSERT INTO `t_stu` VALUES (1009, '貂蝉', '465465156465', '56', '0', '王者峡谷', '汉', '硒鼓', '13321313', '201'); INSERT INTO `t_stu` VALUES (2001, '妲己', '16546465465', '23', '0', '王者峡谷', '汉', '硒鼓', '13658465465', '202'); INSERT INTO `t_stu` VALUES (2002, '额外人发', '75657', '25', '1', '中国', '壮族', '撒犯得上方法', '65654', '102'); INSERT INTO `t_stu` VALUES (2003, '额外人发', NULL, NULL, '1', NULL, NULL, NULL, NULL, '101'); INSERT INTO `t_stu` VALUES (2004, '额外人发', NULL, NULL, '1', NULL, NULL, NULL, NULL, '101'); INSERT INTO `t_stu` VALUES (2005, '额外人发', NULL, NULL, '1', NULL, NULL, NULL, NULL, '101'); INSERT INTO `t_stu` VALUES (2006, '离心', '5546546546', '12', '1', '地方', '胜多负少', '随风倒十分', '6546546546', '103'); INSERT INTO `t_stu` VALUES (2007, '额外人发', NULL, NULL, '1', NULL, NULL, NULL, NULL, '101'); INSERT INTO `t_stu` VALUES (3005, '额外人发', NULL, NULL, '1', NULL, NULL, NULL, NULL, '101'); INSERT INTO `t_stu` VALUES (3006, '额外人发', NULL, NULL, '1', NULL, NULL, NULL, NULL, '101'); INSERT INTO `t_stu` VALUES (30032, '额外人发', NULL, NULL, '1', NULL, NULL, NULL, NULL, '101'); INSERT INTO `t_stu` VALUES (30053, '额外人发', NULL, NULL, '1', NULL, NULL, NULL, NULL, '101'); INSERT INTO `t_stu` VALUES (300322, '额外人发', NULL, NULL, '1', NULL, NULL, NULL, NULL, '101'); INSERT INTO `t_stu` VALUES (300534, '额外人发', NULL, NULL, '1', NULL, NULL, NULL, NULL, '101'); INSERT INTO `t_stu` VALUES (3003222, '额外人发', NULL, NULL, '1', NULL, NULL, NULL, NULL, '101'); -- ---------------------------- -- Table structure for t_teacher -- ---------------------------- DROP TABLE IF EXISTS `t_teacher`; CREATE TABLE `t_teacher` ( `tno` int NOT NULL COMMENT '账号', `tname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '姓名', `tpassword` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码', `phone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电话号码', `email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱地址', `admin` int NULL DEFAULT 0 COMMENT '系统权限', PRIMARY KEY (`tno`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_teacher -- ---------------------------- INSERT INTO `t_teacher` VALUES (101, '李四', '101', '13123', '13251@qq.com', 0); INSERT INTO `t_teacher` VALUES (102, '王老师', '102', '65465', '546@oo.com', 1); SET FOREIGN_KEY_CHECKS = 1;
select * from stock where security='fln'; select sum(`net_proceeds`) from stock -- -- where security = 'fln' ; select security, sum(`net_proceeds`) from stock -- where security='fln' group by security; -- total profit select sum(`net_proceeds`) as total_profit from stock;
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- 主機: 127.0.0.1 -- 產生時間: 2018 年 05 月 28 日 06:18 -- 伺服器版本: 10.1.31-MariaDB -- PHP 版本: 7.2.3 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 */; -- -- 資料庫: `esuns_performance_bonus` -- -- -------------------------------------------------------- -- -- 資料表結構 `employeeinfo` -- CREATE TABLE `employeeinfo` ( `_id` int(11) NOT NULL, `employeeId` varchar(20) COLLATE utf8_unicode_520_ci NOT NULL COMMENT '員工帳號', `employeeName` varchar(20) COLLATE utf8_unicode_520_ci DEFAULT NULL COMMENT '員工姓名', `employeeGroup` varchar(20) COLLATE utf8_unicode_520_ci DEFAULT NULL COMMENT '事業群', `employeeDepartment` varchar(20) COLLATE utf8_unicode_520_ci DEFAULT NULL COMMENT '部門別', `employeeLevel` varchar(20) COLLATE utf8_unicode_520_ci DEFAULT NULL COMMENT '職等職級', `employeeTitle` varchar(20) COLLATE utf8_unicode_520_ci DEFAULT NULL COMMENT '職務名稱', `arriveDate` date DEFAULT NULL COMMENT '到職日期', `regularDate` date DEFAULT NULL COMMENT '轉正日期', `form1Status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '填表狀態1', `form2Status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '填表狀態2' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_520_ci; -- -- 資料表的匯出資料 `employeeinfo` -- INSERT INTO `employeeinfo` (`_id`, `employeeId`, `employeeName`, `employeeGroup`, `employeeDepartment`, `employeeLevel`, `employeeTitle`, `arriveDate`, `regularDate`, `form1Status`, `form2Status`) VALUES (1, 'testProfile_A', '受評人員A', '工程事業群', '宗陽', '2等8級', '工程師', '2017-01-01', '2017-04-01', 0, 0), (2, 'testProfile_B', '受評人員B', '工程事業群', '宗陽', '3等6級', '工程師', '2017-04-01', '2017-07-01', 0, 0), (3, 'testProfile_C', '受評人員C', '工程事業群', '宗陽', '2等5級', '工程師', '2018-02-01', '2018-05-01', 0, 0), (4, 'testProfile_D', '受評人員D', '工程事業群', '宗陽', '3等7級', '工程師', '2017-05-01', '2018-08-01', 0, 0), (5, 'testProfile_X', '受評人員X', '工程事業群', '宗陽', '4等1級', '工程師', '2017-05-01', '2018-08-01', 0, 0); -- -------------------------------------------------------- -- -- 資料表結構 `form1` -- CREATE TABLE `form1` ( `_id` varchar(100) COLLATE utf8_unicode_520_ci NOT NULL COMMENT '員工帳號: 專案名稱:季度', `employeeId` varchar(20) COLLATE utf8_unicode_520_ci NOT NULL COMMENT '員工帳號', `projectName` varchar(50) COLLATE utf8_unicode_520_ci NOT NULL COMMENT '專案名稱', `quarter` varchar(20) COLLATE utf8_unicode_520_ci DEFAULT NULL COMMENT '季度', `reviewDate` date DEFAULT NULL COMMENT '考核日期', `q1Score` int(11) NOT NULL DEFAULT '0', `q2Score` int(11) NOT NULL DEFAULT '0', `q3Score` int(11) NOT NULL DEFAULT '0', `q4Score` int(11) NOT NULL DEFAULT '0', `q5Score` int(11) NOT NULL DEFAULT '0', `q6Score` int(11) NOT NULL DEFAULT '0', `q7Score` int(11) DEFAULT '0', `q8Score` int(11) NOT NULL DEFAULT '0', `q9Score` int(11) NOT NULL DEFAULT '0', `result` int(11) NOT NULL DEFAULT '0' COMMENT '總分', `description` varchar(10) COLLATE utf8_unicode_520_ci NOT NULL COMMENT '評等', `badPerformance` varchar(50) COLLATE utf8_unicode_520_ci NOT NULL COMMENT '考績丙等處置', `note` varchar(300) COLLATE utf8_unicode_520_ci NOT NULL COMMENT '備註' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_520_ci; -- -------------------------------------------------------- -- -- 資料表結構 `form2` -- CREATE TABLE `form2` ( `_id` varchar(100) COLLATE utf8_unicode_520_ci NOT NULL COMMENT ' 員工帳號: 專案名稱:季度 ', `projectName` varchar(50) COLLATE utf8_unicode_520_ci NOT NULL COMMENT '專案名稱', `quarter` varchar(20) COLLATE utf8_unicode_520_ci DEFAULT NULL COMMENT '季度', `reviewDate` date DEFAULT NULL COMMENT '考核日期', `employeeId` varchar(20) COLLATE utf8_unicode_520_ci NOT NULL COMMENT '員工帳號', `orderList` varchar(1000) COLLATE utf8_unicode_520_ci NOT NULL, `scoreList` varchar(1000) COLLATE utf8_unicode_520_ci NOT NULL, `totalList` varchar(1000) COLLATE utf8_unicode_520_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_520_ci; -- -------------------------------------------------------- -- -- 資料表結構 `projectinfo` -- CREATE TABLE `projectinfo` ( `_id` int(11) NOT NULL, `projectName` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_520_ci NOT NULL COMMENT '專案名稱', `exceptValue` int(11) NOT NULL COMMENT '預計發放金額', `quarter` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_520_ci DEFAULT NULL COMMENT '季度', `actualMoney` int(11) NOT NULL DEFAULT '0' COMMENT '實際發放季獎金', `accumulation` int(11) NOT NULL DEFAULT '0' COMMENT '累計發放季獎金', `fillingPerson` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_520_ci DEFAULT NULL COMMENT ' 評核人員', `password` varchar(10) DEFAULT NULL COMMENT '登入密碼', `testList` varchar(2000) CHARACTER SET utf8 COLLATE utf8_unicode_520_ci DEFAULT NULL COMMENT '受評人員名單' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- 資料表的匯出資料 `projectinfo` -- INSERT INTO `projectinfo` (`_id`, `projectName`, `exceptValue`, `quarter`, `actualMoney`, `accumulation`, `fillingPerson`, `password`, `testList`) VALUES (1, '專案一', 10000, 'Q1', 0, 0, '評核人員X1', '1111', 'testProfile_A,testProfile_B,testProfile_X'), (2, '專案二', 20000, 'Q2', 0, 0, '評核人員X2', '2222', 'testProfile_C,testProfile_D'); -- -- 已匯出資料表的索引 -- -- -- 資料表索引 `employeeinfo` -- ALTER TABLE `employeeinfo` ADD PRIMARY KEY (`_id`); -- -- 資料表索引 `form1` -- ALTER TABLE `form1` ADD PRIMARY KEY (`_id`); -- -- 資料表索引 `form2` -- ALTER TABLE `form2` ADD PRIMARY KEY (`_id`); -- -- 資料表索引 `projectinfo` -- ALTER TABLE `projectinfo` ADD PRIMARY KEY (`_id`); -- -- 在匯出的資料表使用 AUTO_INCREMENT -- -- -- 使用資料表 AUTO_INCREMENT `employeeinfo` -- ALTER TABLE `employeeinfo` MODIFY `_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- 使用資料表 AUTO_INCREMENT `projectinfo` -- ALTER TABLE `projectinfo` MODIFY `_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 */;
UPDATE essentialmode.users ALTER TABLE users; ADD password VARCHAR(255) NULL DEFAULT 'password' COLLATE 'utf8mb4_bin' SET password = 'password'; /* This doesnt work bc i dont know how to sql :( */ /* Make sure to change any admin's password to something else manually because if their value is left as password, then if their permission_level is >4 , they have full access.
CREATE TABLE `basic_information` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '唯一主键', `serviceId` int(10) NOT NULL COMMENT '应用标识', `instanceName` varchar(150) DEFAULT NULL COMMENT '实例名称', `appname` varchar(20) DEFAULT NULL COMMENT '应用名称', `address` varchar(30) DEFAULT NULL COMMENT '地址IP', `progress` varchar(10) DEFAULT NULL COMMENT '进程号', `host` varchar(30) DEFAULT NULL COMMENT 'host', `system` varchar(10) DEFAULT NULL COMMENT 'os', `language` varchar(10) DEFAULT NULL COMMENT '语言', `state` varchar(5) DEFAULT NULL COMMENT '状态', `online` varchar(20) DEFAULT NULL COMMENT '在线时长', `lastHeartbeat` datetime DEFAULT NULL COMMENT '最后心跳', `startDate` datetime DEFAULT NULL COMMENT '启动时间', `instanceUUID` varchar(64) DEFAULT NULL COMMENT 'instanceUUID', `version` varchar(20) DEFAULT NULL COMMENT 'agent version', `hostIp` varchar(50) DEFAULT NULL COMMENT '物理机IP', PRIMARY KEY (`id`) ) ;
-- Database: sql-challenge -- DROP DATABASE "sql-challenge"; SELECT employee_no, last_name, first_name, sex, salary FROM "sql-challenge".employees, "sql-challenge".salaries WHERE employee_no=emp_no;
-- Uso de función "TRIM" que elimina los espacios de los string, se calculan metricas de sumas, agrupando por los campos correspondientes: select TIM_DAY,ITE_ITEM_ID,ITE_ITEM_TITLE,sum(si_1a30) as si_1a30,sum(dias_stk_saleable_1a30) as dias_stk_saleable_1a30, sum(A_0a15) as A_0a15,sum(A_16a30) as A_16a30, sum(A_31a45) as A_31a45, sum(A_46a60) as A_46a60, sum(A_61a90) as A_61a90, sum(A_91a180) as A_91a180, sum(A_mas180) as A_mas180, sum(Stock_QTY) as Stock_QTY FROM `dev-mlc-546.1P.BT_STK1P_SKU` where TRIM(SIT_SITE_ID)='MLC' group by 1,2,3;
use db_estoque; #select tb_produtos.nome, tb_produtos.preco, tb_marcas.nome from tb_produtos #inner join tb_marcas on tb_marcas.id = tb_produtos.marca_id #where tb_marcas.nome like "%Nike%" and tb_produtos.preco < 50 #and tb_produtos.nome = "Meias" select tb_produtos.nome, tb_produtos.preco, tb_marcas.nome from tb_produtos inner join tb_marcas on tb_marcas.id = tb_produtos.marca_id where tb_produtos.nome = "Meias" or tb_produtos.nome = "Tenis"
/*CREATE DATABASE tp2;*/ drop table if exists persona; create table persona ( nombre varchar(30), apellido varchar(30), usuario varchar(30), clave varchar(200) ) /* create table IF NOT EXISTS persona ( id SERIAL primary key, nombre varchar(30), apellido varchar(30), usuario varchar(30), clave varchar(200) ); create table IF NOT EXISTS pelis_que_vio ( peliculaID int, usuarioID int ); ALTER TABLE pelis_que_vio add FOREIGN KEY (usuarioID) REFERENCES persona(id); INSERT INTO persona (nombre, apellido, usuario, clave) values ('A', 'a', 'a', '123'); INSERT INTO persona (nombre, apellido, usuario, clave) values ('B', 'b', 'b', '123'); INSERT INTO persona (nombre, apellido, usuario, clave) values ('C', 'c', 'c', '123'); INSERT INTO persona (nombre, apellido, usuario, clave) values ('D', 'd', 'd', '123'); INSERT INTO persona (nombre, apellido, usuario, clave) values ('E', 'e', 'e', '123'); INSERT INTO persona (nombre, apellido, usuario, clave) values ('F', 'f', 'f', '123'); INSERT INTO persona (nombre, apellido, usuario, clave) values ('G', 'g', 'g', '123'); INSERT INTO persona (nombre, apellido, usuario, clave) values ('H', 'h', 'h', '123'); INSERT INTO persona (nombre, apellido, usuario, clave) values ('I', 'i', 'i', '123'); INSERT INTO pelis_que_vio values (1, 1); INSERT INTO pelis_que_vio values (1, 2); INSERT INTO pelis_que_vio values (1, 3); INSERT INTO pelis_que_vio values (2, 4); INSERT INTO pelis_que_vio values (2, 5); INSERT INTO pelis_que_vio values (3, 5); INSERT INTO pelis_que_vio values (3, 6); INSERT INTO pelis_que_vio values (4, 6); INSERT INTO pelis_que_vio values (4, 1); INSERT INTO pelis_que_vio values (1, 6); CREATE OR REPLACE VIEW paresUsuariosVieron as SELECT DISTINCT p.usuarioID as id1, u.usuarioID as id2 from pelis_que_vio p, pelis_que_vio u WHERE p.peliculaID = u.peliculaID and p.usuarioID < u.usuarioID ORDER BY p.usuarioID; CREATE OR REPLACE VIEW usuariosNoVieronPelis as SELECT id from persona where NOT id in(SELECT DISTINCT usuarioID from pelis_que_vio); CREATE OR REPLACE VIEW paresUsuariosNoVieronPelis as SELECT u.id as id1, p.id as id2 from usuariosNoVieronPelis p, usuariosNoVieronPelis u where u.id < p.id; select * from paresUsuariosNoVieronPelis union select * from paresUsuariosVieron order by id1; */
insert into author (id, name) values (1, 'authorTolstoy'), (2, 'authorKing'), (3, 'authorPushkin'); insert into genre (id, name) values (1, 'genreNovel'), (2, 'genreComedy'), (3, 'genreDetective'), (4, 'genreHorror'); insert into book (id, name, author_id, genre_id) values (1, 'Kristina', 2, 4), (2, 'Long walk', 2, 4), (3, 'Romance and the world', 1, 1), (4, 'Tsar Saltan', 3, 2), (5, 'Ruslan and Ludmila', 3, 3);
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: gameware -- ------------------------------------------------------ -- Server version 5.7.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `cliente` -- DROP TABLE IF EXISTS `cliente`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `cliente` ( `id_cliente` int(5) NOT NULL AUTO_INCREMENT, `nome` varchar(30) NOT NULL, `cpf` varchar(14) NOT NULL, `endereco` varchar(40) NOT NULL, `rg` varchar(10) NOT NULL, `telefone` varchar(16) NOT NULL, `senha` varchar(4) NOT NULL, `apt` tinyint(1) NOT NULL, `email` varchar(50) NOT NULL, PRIMARY KEY (`id_cliente`), UNIQUE KEY `cpf` (`cpf`) ) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `cliente` -- LOCK TABLES `cliente` WRITE; /*!40000 ALTER TABLE `cliente` DISABLE KEYS */; INSERT INTO `cliente` VALUES (1,'Willian','134.156.746-15','assdad','12.311.231','(12) 3 1321-3213','0102',0,'asdsadsa'),(2,'Joao','145.752.234-78','Rua das acacias','01.044.022','(31) 9 5582-3646','1234',1,'joao.contato@gmail.com'),(3,'Tiago','222.222.222-22','Citrolandia','56.565.656','(31) 9 9999-9999','0701',1,'tiagotech@gmail.com'),(4,'Jady','789.456.123-45','Rua das gatona','45.678.912','(31) 6 4697-2923','0102',1,'Jadyjady@gmail.com'); /*!40000 ALTER TABLE `cliente` 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 2018-11-17 10:57:08
# --- !Ups alter table tag add column show_in_attendance boolean not null default false; update tag set show_in_attendance=show_in_jc; # --- !Downs alter table tag drop column show_in_attendance;
create table lawyers ( register integer, name varchar(50), customers_number integer ); insert into lawyers(register,name,customers_number) values (1648,'Marty M. Harrison',5), (2427,'Jonathan J. Blevins',15), (3365,'Chelsey D. Sanders',20), (4153,'Dorothy W. Ford',16), (5525,'Penny J. Cormier',6); --search (select lawyers.name,lawyers.customers_number from lawyers where lawyers.customers_number=(select min(customers_number) from lawyers) or lawyers.customers_number=(select max(customers_number) from lawyers) order by customers_number desc ) union all select 'Average'as name,round(avg(lawyers.customers_number),0) from lawyers
SELECT DISTINCT ObjectName, ItemOrdered.ModelID, ItemOrdered.Amount FROM ItemOrdered LEFT OUTER JOIN AddOn ON ItemOrdered.ItemNo = AddOn.ItemNo INNER JOIN Product ON ItemOrdered.ProductID = Product.ProductID AND ItemOrdered.ModelID = Product.ModelID INNER JOIN ProductType ON Product.ProductID = ProductType.ProductID INNER JOIN Object ON ProductType.ProductID = Object.ObjectID INNER JOIN ObjectName ON Object.ObjectID = ObjectName.ObjectID WHERE Language = 'english' AND ItemOrdered.OrderID = '3012' ORDER BY ObjectName;
UPDATE reservations SET end_date = '2019-05-24' WHERE reservations.end_date = '2019-07-05' and owner_id = 1
CREATE TABLE `membres` ( `membre` int(11) NOT NULL auto_increment, `mdp` varchar(40) NOT NULL, `mail` varchar(100) NOT NULL, PRIMARY KEY `mdp`), UNIQUE (`membre`), UNIQUE (`email`), ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci AUTO_INCREMENT=1
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 25-07-2017 a las 18:05:21 -- Versión del servidor: 10.2.6-MariaDB -- Versión de PHP: 7.0.1 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 */; -- -- Base de datos: `mentalcarefinal` -- -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `admisiones` -- CREATE TABLE `admisiones` ( `id` int(10) UNSIGNED NOT NULL, `fecha` date NOT NULL, `facturado` tinyint(4) NOT NULL, `paciente_id` int(10) UNSIGNED DEFAULT NULL, `comprobante_id` int(10) UNSIGNED DEFAULT NULL, `tipopago` tinyint(4) NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `alergias` -- CREATE TABLE `alergias` ( `paciente_id` int(10) UNSIGNED NOT NULL, `componente_id` int(10) UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Volcado de datos para la tabla `alergias` -- INSERT INTO `alergias` (`paciente_id`, `componente_id`) VALUES (1, 3), (1, 5), (1, 7); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `categoria_sintomas` -- CREATE TABLE `categoria_sintomas` ( `id` int(10) UNSIGNED NOT NULL, `nombre` 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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `citas` -- CREATE TABLE `citas` ( `id` int(10) UNSIGNED NOT NULL, `paciente_id` int(10) UNSIGNED NOT NULL, `horario_medico_id` int(10) UNSIGNED NOT NULL, `fecha_de_cita` datetime NOT NULL, `motivo_cita` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `estado_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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `componentes` -- CREATE TABLE `componentes` ( `id` int(10) UNSIGNED NOT NULL, `nombre` 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; -- -- Volcado de datos para la tabla `componentes` -- INSERT INTO `componentes` (`id`, `nombre`, `created_at`, `updated_at`) VALUES (1, 'Isotretinoína', '2017-07-25 19:55:20', '2017-07-25 19:55:20'), (3, 'Acetilcarnitina', '2017-07-25 20:00:36', '2017-07-25 20:00:36'), (4, 'Albúmina Humana', '2017-07-25 20:03:31', '2017-07-25 20:03:31'), (5, 'Minociclina', '2017-07-25 20:06:25', '2017-07-25 20:06:25'), (6, 'Naratriptán', '2017-07-25 20:08:03', '2017-07-25 20:08:03'), (7, 'Retinol', '2017-07-25 20:23:46', '2017-07-25 20:23:46'), (8, 'Carvedilol', '2017-07-25 20:26:09', '2017-07-25 20:26:09'), (9, 'Cafeína', '2017-07-25 20:28:18', '2017-07-25 20:28:18'), (10, 'Dipirona', '2017-07-25 20:28:30', '2017-07-25 20:28:30'), (11, 'Ergotamina', '2017-07-25 20:28:40', '2017-07-25 20:28:40'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `componente_medicamento` -- CREATE TABLE `componente_medicamento` ( `id` int(10) UNSIGNED NOT NULL, `componente_id` int(10) UNSIGNED NOT NULL, `medicamento_id` int(10) UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Volcado de datos para la tabla `componente_medicamento` -- INSERT INTO `componente_medicamento` (`id`, `componente_id`, `medicamento_id`) VALUES (1, 1, 1), (2, 3, 2), (3, 4, 3), (4, 5, 4), (5, 6, 5), (6, 7, 6), (7, 8, 7), (8, 9, 8), (9, 10, 8), (10, 11, 8); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `comprobantes` -- CREATE TABLE `comprobantes` ( `id` int(10) UNSIGNED NOT NULL, `serie` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `numero` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `razonsocial` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `documento` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `direccion` varchar(9) COLLATE utf8mb4_unicode_ci NOT NULL, `fecha` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL, `tipocomprobante_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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `departamentos` -- CREATE TABLE `departamentos` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `abreviatura` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Volcado de datos para la tabla `departamentos` -- INSERT INTO `departamentos` (`id`, `name`, `created_at`, `updated_at`, `abreviatura`) VALUES (1, 'AREQUIPA', '2017-07-25 07:06:01', '2017-07-25 07:06:01', 'AQP'), (2, 'LIMA', '2017-07-25 07:06:01', '2017-07-25 07:06:01', 'LIMA'), (3, 'CUZCO', '2017-07-25 07:06:01', '2017-07-25 07:06:01', 'CUZ'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `diagnosticos` -- CREATE TABLE `diagnosticos` ( `id` int(10) UNSIGNED NOT NULL, `user_id` int(10) UNSIGNED NOT NULL, `paciente_id` int(10) UNSIGNED NOT NULL, `prescription_id` int(10) UNSIGNED NOT NULL, `retorno` date DEFAULT NULL, `recomendacion` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `estado` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `diagnostico_enfermedad` -- CREATE TABLE `diagnostico_enfermedad` ( `id` int(10) UNSIGNED NOT NULL, `enfermedad_id` int(10) UNSIGNED NOT NULL, `diagnostico_id` int(10) UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `diagnostico_sintoma` -- CREATE TABLE `diagnostico_sintoma` ( `id` int(10) UNSIGNED NOT NULL, `sintoma_id` int(10) UNSIGNED NOT NULL, `diagnostico_id` int(10) UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `dias` -- CREATE TABLE `dias` ( `id` int(10) UNSIGNED NOT NULL, `dias` varchar(20) 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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `egresos` -- CREATE TABLE `egresos` ( `id` int(10) UNSIGNED NOT NULL, `fecha` date NOT NULL, `comprobante_id` int(10) UNSIGNED DEFAULT NULL, `paciente_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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `enfermedad` -- CREATE TABLE `enfermedad` ( `id` int(10) UNSIGNED NOT NULL, `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `especialidad_id` int(10) UNSIGNED DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `enfermedad_sintoma` -- CREATE TABLE `enfermedad_sintoma` ( `id` int(10) UNSIGNED NOT NULL, `enfermedad_id` int(10) UNSIGNED NOT NULL, `sintoma_id` int(10) UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `especialidad` -- CREATE TABLE `especialidad` ( `id` int(10) UNSIGNED NOT NULL, `especialidad` varchar(45) 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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `especialidades` -- CREATE TABLE `especialidades` ( `id` int(10) UNSIGNED NOT NULL, `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `descripcion` 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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `especialidades_medicas` -- CREATE TABLE `especialidades_medicas` ( `id` int(10) UNSIGNED NOT NULL, `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `descripcion` 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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `estados` -- CREATE TABLE `estados` ( `id` int(10) UNSIGNED NOT NULL, `estado` varchar(20) 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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `estado_cita` -- CREATE TABLE `estado_cita` ( `id` int(10) UNSIGNED NOT NULL, `estado_cita` varchar(10) 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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `historials` -- CREATE TABLE `historials` ( `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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `horario_medico` -- CREATE TABLE `horario_medico` ( `id` int(10) UNSIGNED NOT NULL, `fecha_hora_inicio` datetime NOT NULL, `fecha_hora_fin` datetime NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `horario_medicos` -- CREATE TABLE `horario_medicos` ( `id` int(10) UNSIGNED NOT NULL, `medicos_id` int(10) UNSIGNED DEFAULT NULL, `dias_id` int(10) UNSIGNED DEFAULT NULL, `slots_id` int(10) UNSIGNED DEFAULT NULL, `estado` varchar(25) 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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `ingresos` -- CREATE TABLE `ingresos` ( `id` int(10) UNSIGNED NOT NULL, `fecha` date NOT NULL, `paciente_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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `medicamentos` -- CREATE TABLE `medicamentos` ( `id` int(10) UNSIGNED NOT NULL, `nombre` varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL, `descripcion` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `efecSecundarios` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `adversos` varchar(255) 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; -- -- Volcado de datos para la tabla `medicamentos` -- INSERT INTO `medicamentos` (`id`, `nombre`, `descripcion`, `efecSecundarios`, `adversos`, `created_at`, `updated_at`) VALUES (1, 'ACNOTIN', 'isotretinoína reduce el tamaño de la glándula sebácea e inhibe su actividad, disminuyendo de este modo la secreción sebácea. Asdemás se ha demostrado que isotretinoína tiene acciones anti-keratinizantes y anti-inflamatorias', 'Síntomas asociados a la hipervitaminosis A: sequedad de la piel y de las mucosas, epistaxis, conjuntivitis, opacidad córnea reversible e intolerancia a los lentes de contacto.', 'isotretinoína es altamente teratogénica.', '2017-07-25 20:00:05', '2017-07-25 20:00:05'), (2, 'ACTIGERON', ': induce un aumento en la síntesis del receptor específico para el factor de crecimiento neuronal en neuronas colinérgicas envejecidas.', ': induce un aumento en la síntesis del receptor específico para el factor de crecimiento neuronal en neuronas colinérgicas envejecidas.', ': induce un aumento en la síntesis del receptor específico para el factor de crecimiento neuronal en neuronas colinérgicas envejecidas.', '2017-07-25 20:03:13', '2017-07-25 20:03:13'), (3, 'ALBUNORM', 'La albúmina humana es cuantitativamente más de la mitad de la proteína total del plasma y representa cerca del 10% de la actividad de síntesis proteica del hígado.', 'La albúmina humana es cuantitativamente más de la mitad de la proteína total del plasma y representa cerca del 10% de la actividad de síntesis proteica del hígado.', 'La albúmina humana es cuantitativamente más de la mitad de la proteína total del plasma y representa cerca del 10% de la actividad de síntesis proteica del hígado.', '2017-07-25 20:06:04', '2017-07-25 20:06:04'), (4, 'BAGOMICINA', 'Tratamiento de infecciones genitourinarias, del tracto respiratorio, de la piel, tejidos blandos, acné vulgaris y otras infecciones ocasionadas por gérmenes sensibles.', 'Tratamiento de infecciones genitourinarias, del tracto respiratorio, de la piel, tejidos blandos, acné vulgaris y otras infecciones ocasionadas por gérmenes sensibles.', 'Tratamiento de infecciones genitourinarias, del tracto respiratorio, de la piel, tejidos blandos, acné vulgaris y otras infecciones ocasionadas por gérmenes sensibles.', '2017-07-25 20:07:37', '2017-07-25 20:07:37'), (5, 'BAGOMIGRAL', 'Es aconsejable administrar Bagomigral inmediatamente, después del comienzo de un ataque de migraña, pero es igualmente eficaz si se administra en una etapa más tardía.', 'Es aconsejable administrar Bagomigral inmediatamente, después del comienzo de un ataque de migraña, pero es igualmente eficaz si se administra en una etapa más tardía.', 'Es aconsejable administrar Bagomigral inmediatamente, después del comienzo de un ataque de migraña, pero es igualmente eficaz si se administra en una etapa más tardía.', '2017-07-25 20:08:50', '2017-07-25 20:08:50'), (6, 'BAGOVIT-A', 'Nutriente e hidratante cutáneo', 'Nutriente e hidratante cutáneo', 'Nutriente e hidratante cutáneo', '2017-07-25 20:25:32', '2017-07-25 20:25:32'), (7, 'BLOCAR', 'Carvedilol no se debe usar en: enfermedad pulmonar obstructiva crónica, asma, bloqueo AV de segundo y tercer grado.', 'Carvedilol no se debe usar en: enfermedad pulmonar obstructiva crónica, asma, bloqueo AV de segundo y tercer grado.', 'Carvedilol no se debe usar en: enfermedad pulmonar obstructiva crónica, asma, bloqueo AV de segundo y tercer grado.', '2017-07-25 20:27:42', '2017-07-25 20:27:42'), (8, 'MIGRANOL', 'El uso de este medicamento está contraindicado en enfermedades coronarias, insuficiencia hepática, hipertensión arterial severa, enfermedades vasculares periféricas, sepsis, insuficiencia renal y úlcera péptica.', 'El uso de este medicamento está contraindicado en enfermedades coronarias, insuficiencia hepática, hipertensión arterial severa, enfermedades vasculares periféricas, sepsis, insuficiencia renal y úlcera péptica.', 'El uso de este medicamento está contraindicado en enfermedades coronarias, insuficiencia hepática, hipertensión arterial severa, enfermedades vasculares periféricas, sepsis, insuficiencia renal y úlcera péptica.', '2017-07-25 20:30:50', '2017-07-25 20:30:50'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `medicinas` -- CREATE TABLE `medicinas` ( `id` int(10) UNSIGNED NOT NULL, `cantidad` int(11) NOT NULL, `presentacion_id` int(10) UNSIGNED NOT NULL, `medicamento_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; -- -- Volcado de datos para la tabla `medicinas` -- INSERT INTO `medicinas` (`id`, `cantidad`, `presentacion_id`, `medicamento_id`, `created_at`, `updated_at`) VALUES (1, 10, 1, 1, '2017-07-25 20:00:05', '2017-07-25 20:00:05'), (2, 500, 1, 2, '2017-07-25 20:03:13', '2017-07-25 20:03:13'), (3, 50, 2, 3, '2017-07-25 20:06:05', '2017-07-25 20:06:05'), (4, 50, 3, 4, '2017-07-25 20:07:37', '2017-07-25 20:07:37'), (5, 50, 3, 5, '2017-07-25 20:08:50', '2017-07-25 20:08:50'), (6, 100, 4, 6, '2017-07-25 20:25:33', '2017-07-25 20:25:33'), (7, 25, 1, 7, '2017-07-25 20:27:42', '2017-07-25 20:27:42'), (8, 5, 1, 8, '2017-07-25 20:30:50', '2017-07-25 20:30:50'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `medicina_prescription` -- CREATE TABLE `medicina_prescription` ( `medicina_id` int(10) UNSIGNED NOT NULL, `prescription_id` int(10) UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Volcado de datos para la tabla `medicina_prescription` -- INSERT INTO `medicina_prescription` (`medicina_id`, `prescription_id`) VALUES (1, 1), (2, 1), (3, 1); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `medicos` -- CREATE TABLE `medicos` ( `id` int(10) UNSIGNED NOT NULL, `personas_id` int(10) UNSIGNED DEFAULT NULL, `especialidad_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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `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; -- -- Volcado de datos para la tabla `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, '2017_02_11_053532_crear_tabla_departamentos', 1), (4, '2017_02_20_001140_create_personas_table', 1), (5, '2017_03_01_045005_actualizar_usuario_010317', 1), (6, '2017_03_01_050537_actualizar_usuario_nullable', 1), (7, '2017_03_14_101621_create_estados_table', 1), (8, '2017_03_16_001145_create_pacientes_estados_table', 1), (9, '2017_04_16_001147_create_pacientes_table', 1), (10, '2017_04_27_044508_actualizar_tabla_departamento', 1), (11, '2017_04_28_033411_crear_especialidades', 1), (12, '2017_04_28_035150_especialidad', 1), (13, '2017_04_28_051253_sintomas', 1), (14, '2017_04_28_052534_enfermedad', 1), (15, '2017_05_02_075736_status', 1), (16, '2017_05_02_082031_crear_tabla_enfermedad_sintoma', 1), (17, '2017_05_08_013232_especialidad_enfermedad', 1), (18, '2017_05_08_090351_turnos', 1), (19, '2017_05_08_160658_doctores', 1), (20, '2017_05_10_112648_create_prescriptions_table', 1), (21, '2017_05_10_112648_diagnostico', 1), (22, '2017_05_10_114820_diagnostico_foreing', 1), (23, '2017_05_10_160932_enfermedades_diagnostico', 1), (24, '2017_05_10_171055_diagnostico_sintomas', 1), (25, '2017_05_20_202928_categoria_sintom', 1), (26, '2017_05_20_222629_sintoma_categoria_foreing', 1), (27, '2017_06_03_031153_create_especialidad_table', 1), (28, '2017_06_03_212215_crear_iniciales', 1), (29, '2017_06_04_030137_create_medicos_table', 1), (30, '2017_06_13_023303_create_medicamentos_table', 1), (31, '2017_06_13_023310_create_presentacions_table', 1), (32, '2017_06_13_023312_create_medicinas_table', 1), (33, '2017_06_13_023338_create_componentes_table', 1), (34, '2017_06_16_001126_create_tiposcomprobantes_table', 1), (35, '2017_06_16_001142_create_historials_table', 1), (36, '2017_06_16_001304_create_comprobantes_table', 1), (37, '2017_06_16_001437_create_ingresos_table', 1), (38, '2017_06_16_001458_create_egresos_table', 1), (39, '2017_06_16_041137_create_admisiones_table', 1), (40, '2017_07_02_145036_create_componente_medicamento_table', 1), (41, '2017_07_14_101622_create_horario_medico_table', 1), (42, '2017_07_14_101623_create_citas_table', 1), (43, '2017_07_14_103852_create_estado_cita_table', 1), (44, '2017_07_14_104807_create_pago_table', 1), (45, '2017_07_15_025843_create_dias_table', 1), (46, '2017_07_15_025850_create_medicina_prescription_table', 1), (47, '2017_07_15_025949_create_slots_table', 1), (48, '2017_07_15_025950_create_horario_medicos_table', 1), (49, '2017_07_15_101120_create_reporte_table', 1), (50, '2017_07_15_171435_create_alergias_table', 1); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pacientes` -- CREATE TABLE `pacientes` ( `id` int(10) UNSIGNED NOT NULL, `persona_id` int(10) UNSIGNED NOT NULL, `estado_id` int(10) UNSIGNED NOT NULL, `departamento_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; -- -- Volcado de datos para la tabla `pacientes` -- INSERT INTO `pacientes` (`id`, `persona_id`, `estado_id`, `departamento_id`, `created_at`, `updated_at`) VALUES (1, 4, 1, 1, NULL, NULL); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pacientes_estados` -- CREATE TABLE `pacientes_estados` ( `id` int(10) UNSIGNED NOT NULL, `nombre` varchar(20) 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; -- -- Volcado de datos para la tabla `pacientes_estados` -- INSERT INTO `pacientes_estados` (`id`, `nombre`, `created_at`, `updated_at`) VALUES (1, 'Internado', '2017-07-25 20:47:35', '2017-07-25 20:47:35'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pago` -- CREATE TABLE `pago` ( `codigo_pago` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL, `tipo_de_pago` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, `descripcion` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, `monto` int(11) NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `password_resets` -- CREATE TABLE `password_resets` ( `email` varchar(30) 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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `personas` -- CREATE TABLE `personas` ( `id` int(10) UNSIGNED NOT NULL, `apellidopaterno` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `apellidomaterno` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `nombres` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `dni` int(10) UNSIGNED NOT NULL, `sexo` varchar(1) COLLATE utf8mb4_unicode_ci NOT NULL, `fechanacimiento` date NOT NULL, `direccion` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL, `telefono` varchar(9) COLLATE utf8mb4_unicode_ci NOT NULL, `email` 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; -- -- Volcado de datos para la tabla `personas` -- INSERT INTO `personas` (`id`, `apellidopaterno`, `apellidomaterno`, `nombres`, `dni`, `sexo`, `fechanacimiento`, `direccion`, `telefono`, `email`, `created_at`, `updated_at`) VALUES (1, 'VIsa', 'FLores', 'Alberto', 10000000, 'M', '1995-08-25', 'QUETI IIII', '999999999', 'admin@sistema.com', '2017-07-25 07:06:01', '2017-07-25 07:06:01'), (2, 'Mendoza', 'Vasdas', 'Alexis', 12345678, 'M', '1997-06-02', 'QUETI I', '451166', 'tex@mail.com', '2017-07-25 07:06:01', '2017-07-25 07:06:01'), (3, 'Apaza', 'Torres', 'Alexander', 77036017, 'M', '1997-06-02', 'QUETI III', '921344415', 'alrus2797@sistema.com', '2017-07-25 07:06:02', '2017-07-25 07:06:02'), (4, 'Bernal', 'Chahuayo', 'Luis', 98765435, 'M', '1998-02-15', 'Av. Las torres', '019283', 'luis@mail.com', '2017-07-25 20:49:02', '2017-07-25 20:50:27'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `prescriptions` -- CREATE TABLE `prescriptions` ( `id` int(10) UNSIGNED NOT NULL, `observacion` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL, `instrucciones` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL, `medico_id` int(10) UNSIGNED NOT NULL, `paciente_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; -- -- Volcado de datos para la tabla `prescriptions` -- INSERT INTO `prescriptions` (`id`, `observacion`, `instrucciones`, `medico_id`, `paciente_id`, `created_at`, `updated_at`) VALUES (1, 'Comportamiento extraño', 'tomar 5 veces al día la pastilla', 2, 1, '2017-07-25 20:52:38', '2017-07-25 20:52:38'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `presentacions` -- CREATE TABLE `presentacions` ( `id` int(10) UNSIGNED NOT NULL, `descripcion` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL, `unidad` varchar(5) 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; -- -- Volcado de datos para la tabla `presentacions` -- INSERT INTO `presentacions` (`id`, `descripcion`, `unidad`, `created_at`, `updated_at`) VALUES (1, 'cápsula', 'mg', '2017-07-25 19:56:42', '2017-07-25 19:56:42'), (2, 'Fasco', 'ml', '2017-07-25 20:04:04', '2017-07-25 20:04:04'), (3, 'Comprimido', 'mg', '2017-07-25 20:06:50', '2017-07-25 20:06:50'), (4, 'Crema', 'gr', '2017-07-25 20:24:23', '2017-07-25 20:24:23'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `reporte` -- CREATE TABLE `reporte` ( `id` int(10) UNSIGNED NOT NULL, `nombre` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, `fecha` date NOT NULL, `tipo` varchar(7) 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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `sintomas` -- CREATE TABLE `sintomas` ( `id` int(10) UNSIGNED NOT NULL, `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `categoria_id` int(10) UNSIGNED DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `slots` -- CREATE TABLE `slots` ( `id` int(10) UNSIGNED NOT NULL, `start_time` datetime NOT NULL, `finish_time` datetime NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `tiposcomprobantes` -- CREATE TABLE `tiposcomprobantes` ( `id` int(10) UNSIGNED NOT NULL, `descripcion` varchar(100) 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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `turnos` -- CREATE TABLE `turnos` ( `id` int(10) UNSIGNED NOT NULL, `nombre` 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; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `users` -- CREATE TABLE `users` ( `id` int(10) UNSIGNED NOT NULL, `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT 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, `departamento_id` int(10) UNSIGNED DEFAULT NULL, `persona_id` int(10) UNSIGNED NOT NULL, `tipo_usuario` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `turno_id` int(10) UNSIGNED DEFAULT NULL, `especialidad_id` int(10) UNSIGNED DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Volcado de datos para la tabla `users` -- INSERT INTO `users` (`id`, `email`, `password`, `remember_token`, `created_at`, `updated_at`, `departamento_id`, `persona_id`, `tipo_usuario`, `turno_id`, `especialidad_id`) VALUES (1, 'admin@sistema.com', '$2y$10$cvwCXRR.MS0o7vgAQ.716.IC30F5f4oo24eHquD2v53.ZbDV9yiue', NULL, '2017-07-25 07:06:01', '2017-07-25 07:06:01', NULL, 1, 'Administrador', NULL, NULL), (2, 'tex@mail.com', '$2y$10$otfHkJH8mcbisjearE2Ss.7tYvGCmzxzEQ2.ck0NM17K/YO1nzrxa', NULL, '2017-07-25 07:06:02', '2017-07-25 07:06:02', NULL, 2, 'Medico', NULL, NULL); -- -- Índices para tablas volcadas -- -- -- Indices de la tabla `admisiones` -- ALTER TABLE `admisiones` ADD PRIMARY KEY (`id`), ADD KEY `admisiones_paciente_id_foreign` (`paciente_id`), ADD KEY `admisiones_comprobante_id_foreign` (`comprobante_id`); -- -- Indices de la tabla `alergias` -- ALTER TABLE `alergias` ADD KEY `alergias_paciente_id_foreign` (`paciente_id`), ADD KEY `alergias_componente_id_foreign` (`componente_id`); -- -- Indices de la tabla `categoria_sintomas` -- ALTER TABLE `categoria_sintomas` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `citas` -- ALTER TABLE `citas` ADD PRIMARY KEY (`id`), ADD KEY `citas_paciente_id_foreign` (`paciente_id`), ADD KEY `citas_horario_medico_id_foreign` (`horario_medico_id`), ADD KEY `citas_estado_id_foreign` (`estado_id`); -- -- Indices de la tabla `componentes` -- ALTER TABLE `componentes` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `componente_medicamento` -- ALTER TABLE `componente_medicamento` ADD PRIMARY KEY (`id`), ADD KEY `componente_medicamento_componente_id_foreign` (`componente_id`), ADD KEY `componente_medicamento_medicamento_id_foreign` (`medicamento_id`); -- -- Indices de la tabla `comprobantes` -- ALTER TABLE `comprobantes` ADD PRIMARY KEY (`id`), ADD KEY `comprobantes_tipocomprobante_id_foreign` (`tipocomprobante_id`); -- -- Indices de la tabla `departamentos` -- ALTER TABLE `departamentos` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `diagnosticos` -- ALTER TABLE `diagnosticos` ADD PRIMARY KEY (`id`), ADD KEY `diagnosticos_user_id_foreign` (`user_id`), ADD KEY `diagnosticos_paciente_id_foreign` (`paciente_id`), ADD KEY `diagnosticos_prescription_id_foreign` (`prescription_id`); -- -- Indices de la tabla `diagnostico_enfermedad` -- ALTER TABLE `diagnostico_enfermedad` ADD PRIMARY KEY (`id`), ADD KEY `diagnostico_enfermedad_enfermedad_id_foreign` (`enfermedad_id`), ADD KEY `diagnostico_enfermedad_diagnostico_id_foreign` (`diagnostico_id`); -- -- Indices de la tabla `diagnostico_sintoma` -- ALTER TABLE `diagnostico_sintoma` ADD PRIMARY KEY (`id`), ADD KEY `diagnostico_sintoma_sintoma_id_foreign` (`sintoma_id`), ADD KEY `diagnostico_sintoma_diagnostico_id_foreign` (`diagnostico_id`); -- -- Indices de la tabla `dias` -- ALTER TABLE `dias` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `egresos` -- ALTER TABLE `egresos` ADD PRIMARY KEY (`id`), ADD KEY `egresos_comprobante_id_foreign` (`comprobante_id`), ADD KEY `egresos_paciente_id_foreign` (`paciente_id`); -- -- Indices de la tabla `enfermedad` -- ALTER TABLE `enfermedad` ADD PRIMARY KEY (`id`), ADD KEY `enfermedad_especialidad_id_foreign` (`especialidad_id`); -- -- Indices de la tabla `enfermedad_sintoma` -- ALTER TABLE `enfermedad_sintoma` ADD PRIMARY KEY (`id`), ADD KEY `enfermedad_sintoma_enfermedad_id_foreign` (`enfermedad_id`), ADD KEY `enfermedad_sintoma_sintoma_id_foreign` (`sintoma_id`); -- -- Indices de la tabla `especialidad` -- ALTER TABLE `especialidad` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `especialidades` -- ALTER TABLE `especialidades` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `especialidades_medicas` -- ALTER TABLE `especialidades_medicas` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `estados` -- ALTER TABLE `estados` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `estado_cita` -- ALTER TABLE `estado_cita` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `historials` -- ALTER TABLE `historials` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `horario_medico` -- ALTER TABLE `horario_medico` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `horario_medicos` -- ALTER TABLE `horario_medicos` ADD PRIMARY KEY (`id`), ADD KEY `horario_medicos_medicos_id_foreign` (`medicos_id`), ADD KEY `horario_medicos_dias_id_foreign` (`dias_id`), ADD KEY `horario_medicos_slots_id_foreign` (`slots_id`); -- -- Indices de la tabla `ingresos` -- ALTER TABLE `ingresos` ADD PRIMARY KEY (`id`), ADD KEY `ingresos_paciente_id_foreign` (`paciente_id`); -- -- Indices de la tabla `medicamentos` -- ALTER TABLE `medicamentos` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `medicinas` -- ALTER TABLE `medicinas` ADD PRIMARY KEY (`id`), ADD KEY `medicinas_presentacion_id_foreign` (`presentacion_id`), ADD KEY `medicinas_medicamento_id_foreign` (`medicamento_id`); -- -- Indices de la tabla `medicina_prescription` -- ALTER TABLE `medicina_prescription` ADD KEY `medicina_prescription_medicina_id_foreign` (`medicina_id`), ADD KEY `medicina_prescription_prescription_id_foreign` (`prescription_id`); -- -- Indices de la tabla `medicos` -- ALTER TABLE `medicos` ADD PRIMARY KEY (`id`), ADD KEY `medicos_personas_id_foreign` (`personas_id`), ADD KEY `medicos_especialidad_id_foreign` (`especialidad_id`); -- -- Indices de la tabla `migrations` -- ALTER TABLE `migrations` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `pacientes` -- ALTER TABLE `pacientes` ADD PRIMARY KEY (`id`), ADD KEY `pacientes_persona_id_foreign` (`persona_id`), ADD KEY `pacientes_estado_id_foreign` (`estado_id`), ADD KEY `pacientes_departamento_id_foreign` (`departamento_id`); -- -- Indices de la tabla `pacientes_estados` -- ALTER TABLE `pacientes_estados` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `pago` -- ALTER TABLE `pago` ADD PRIMARY KEY (`codigo_pago`); -- -- Indices de la tabla `password_resets` -- ALTER TABLE `password_resets` ADD KEY `password_resets_email_index` (`email`); -- -- Indices de la tabla `personas` -- ALTER TABLE `personas` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `prescriptions` -- ALTER TABLE `prescriptions` ADD PRIMARY KEY (`id`), ADD KEY `prescriptions_medico_id_foreign` (`medico_id`), ADD KEY `prescriptions_paciente_id_foreign` (`paciente_id`); -- -- Indices de la tabla `presentacions` -- ALTER TABLE `presentacions` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `reporte` -- ALTER TABLE `reporte` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `sintomas` -- ALTER TABLE `sintomas` ADD PRIMARY KEY (`id`), ADD KEY `sintomas_categoria_id_foreign` (`categoria_id`); -- -- Indices de la tabla `slots` -- ALTER TABLE `slots` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `tiposcomprobantes` -- ALTER TABLE `tiposcomprobantes` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `turnos` -- ALTER TABLE `turnos` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `users_email_unique` (`email`), ADD KEY `users_departamento_id_foreign` (`departamento_id`), ADD KEY `users_persona_id_foreign` (`persona_id`), ADD KEY `users_turno_id_foreign` (`turno_id`), ADD KEY `users_especialidad_id_foreign` (`especialidad_id`); -- -- AUTO_INCREMENT de las tablas volcadas -- -- -- AUTO_INCREMENT de la tabla `admisiones` -- ALTER TABLE `admisiones` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `categoria_sintomas` -- ALTER TABLE `categoria_sintomas` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `citas` -- ALTER TABLE `citas` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `componentes` -- ALTER TABLE `componentes` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; -- -- AUTO_INCREMENT de la tabla `componente_medicamento` -- ALTER TABLE `componente_medicamento` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; -- -- AUTO_INCREMENT de la tabla `comprobantes` -- ALTER TABLE `comprobantes` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `departamentos` -- ALTER TABLE `departamentos` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT de la tabla `diagnosticos` -- ALTER TABLE `diagnosticos` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `diagnostico_enfermedad` -- ALTER TABLE `diagnostico_enfermedad` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `diagnostico_sintoma` -- ALTER TABLE `diagnostico_sintoma` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `dias` -- ALTER TABLE `dias` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `egresos` -- ALTER TABLE `egresos` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `enfermedad` -- ALTER TABLE `enfermedad` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `enfermedad_sintoma` -- ALTER TABLE `enfermedad_sintoma` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `especialidad` -- ALTER TABLE `especialidad` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `especialidades` -- ALTER TABLE `especialidades` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `especialidades_medicas` -- ALTER TABLE `especialidades_medicas` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `estados` -- ALTER TABLE `estados` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `estado_cita` -- ALTER TABLE `estado_cita` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `historials` -- ALTER TABLE `historials` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `horario_medico` -- ALTER TABLE `horario_medico` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `horario_medicos` -- ALTER TABLE `horario_medicos` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `ingresos` -- ALTER TABLE `ingresos` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `medicamentos` -- ALTER TABLE `medicamentos` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT de la tabla `medicinas` -- ALTER TABLE `medicinas` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT de la tabla `medicos` -- ALTER TABLE `medicos` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `migrations` -- ALTER TABLE `migrations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=51; -- -- AUTO_INCREMENT de la tabla `pacientes` -- ALTER TABLE `pacientes` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT de la tabla `pacientes_estados` -- ALTER TABLE `pacientes_estados` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT de la tabla `personas` -- ALTER TABLE `personas` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT de la tabla `prescriptions` -- ALTER TABLE `prescriptions` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT de la tabla `presentacions` -- ALTER TABLE `presentacions` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT de la tabla `reporte` -- ALTER TABLE `reporte` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `sintomas` -- ALTER TABLE `sintomas` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `slots` -- ALTER TABLE `slots` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `tiposcomprobantes` -- ALTER TABLE `tiposcomprobantes` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `turnos` -- ALTER TABLE `turnos` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `users` -- ALTER TABLE `users` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- Restricciones para tablas volcadas -- -- -- Filtros para la tabla `admisiones` -- ALTER TABLE `admisiones` ADD CONSTRAINT `admisiones_comprobante_id_foreign` FOREIGN KEY (`comprobante_id`) REFERENCES `comprobantes` (`id`), ADD CONSTRAINT `admisiones_paciente_id_foreign` FOREIGN KEY (`paciente_id`) REFERENCES `pacientes` (`id`); -- -- Filtros para la tabla `alergias` -- ALTER TABLE `alergias` ADD CONSTRAINT `alergias_componente_id_foreign` FOREIGN KEY (`componente_id`) REFERENCES `componentes` (`id`), ADD CONSTRAINT `alergias_paciente_id_foreign` FOREIGN KEY (`paciente_id`) REFERENCES `pacientes` (`id`); -- -- Filtros para la tabla `citas` -- ALTER TABLE `citas` ADD CONSTRAINT `citas_estado_id_foreign` FOREIGN KEY (`estado_id`) REFERENCES `estados` (`id`), ADD CONSTRAINT `citas_horario_medico_id_foreign` FOREIGN KEY (`horario_medico_id`) REFERENCES `horario_medico` (`id`), ADD CONSTRAINT `citas_paciente_id_foreign` FOREIGN KEY (`paciente_id`) REFERENCES `pacientes` (`id`); -- -- Filtros para la tabla `componente_medicamento` -- ALTER TABLE `componente_medicamento` ADD CONSTRAINT `componente_medicamento_componente_id_foreign` FOREIGN KEY (`componente_id`) REFERENCES `componentes` (`id`), ADD CONSTRAINT `componente_medicamento_medicamento_id_foreign` FOREIGN KEY (`medicamento_id`) REFERENCES `medicamentos` (`id`); -- -- Filtros para la tabla `comprobantes` -- ALTER TABLE `comprobantes` ADD CONSTRAINT `comprobantes_tipocomprobante_id_foreign` FOREIGN KEY (`tipocomprobante_id`) REFERENCES `tiposcomprobantes` (`id`); -- -- Filtros para la tabla `diagnosticos` -- ALTER TABLE `diagnosticos` ADD CONSTRAINT `diagnosticos_paciente_id_foreign` FOREIGN KEY (`paciente_id`) REFERENCES `pacientes` (`id`), ADD CONSTRAINT `diagnosticos_prescription_id_foreign` FOREIGN KEY (`prescription_id`) REFERENCES `prescriptions` (`id`), ADD CONSTRAINT `diagnosticos_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`); -- -- Filtros para la tabla `diagnostico_enfermedad` -- ALTER TABLE `diagnostico_enfermedad` ADD CONSTRAINT `diagnostico_enfermedad_diagnostico_id_foreign` FOREIGN KEY (`diagnostico_id`) REFERENCES `diagnosticos` (`id`), ADD CONSTRAINT `diagnostico_enfermedad_enfermedad_id_foreign` FOREIGN KEY (`enfermedad_id`) REFERENCES `enfermedad` (`id`); -- -- Filtros para la tabla `diagnostico_sintoma` -- ALTER TABLE `diagnostico_sintoma` ADD CONSTRAINT `diagnostico_sintoma_diagnostico_id_foreign` FOREIGN KEY (`diagnostico_id`) REFERENCES `diagnosticos` (`id`), ADD CONSTRAINT `diagnostico_sintoma_sintoma_id_foreign` FOREIGN KEY (`sintoma_id`) REFERENCES `sintomas` (`id`); -- -- Filtros para la tabla `egresos` -- ALTER TABLE `egresos` ADD CONSTRAINT `egresos_comprobante_id_foreign` FOREIGN KEY (`comprobante_id`) REFERENCES `comprobantes` (`id`), ADD CONSTRAINT `egresos_paciente_id_foreign` FOREIGN KEY (`paciente_id`) REFERENCES `pacientes` (`id`); -- -- Filtros para la tabla `enfermedad` -- ALTER TABLE `enfermedad` ADD CONSTRAINT `enfermedad_especialidad_id_foreign` FOREIGN KEY (`especialidad_id`) REFERENCES `especialidades` (`id`); -- -- Filtros para la tabla `enfermedad_sintoma` -- ALTER TABLE `enfermedad_sintoma` ADD CONSTRAINT `enfermedad_sintoma_enfermedad_id_foreign` FOREIGN KEY (`enfermedad_id`) REFERENCES `enfermedad` (`id`), ADD CONSTRAINT `enfermedad_sintoma_sintoma_id_foreign` FOREIGN KEY (`sintoma_id`) REFERENCES `sintomas` (`id`); -- -- Filtros para la tabla `horario_medicos` -- ALTER TABLE `horario_medicos` ADD CONSTRAINT `horario_medicos_dias_id_foreign` FOREIGN KEY (`dias_id`) REFERENCES `dias` (`id`), ADD CONSTRAINT `horario_medicos_medicos_id_foreign` FOREIGN KEY (`medicos_id`) REFERENCES `personas` (`id`), ADD CONSTRAINT `horario_medicos_slots_id_foreign` FOREIGN KEY (`slots_id`) REFERENCES `slots` (`id`); -- -- Filtros para la tabla `ingresos` -- ALTER TABLE `ingresos` ADD CONSTRAINT `ingresos_paciente_id_foreign` FOREIGN KEY (`paciente_id`) REFERENCES `pacientes` (`id`); -- -- Filtros para la tabla `medicinas` -- ALTER TABLE `medicinas` ADD CONSTRAINT `medicinas_medicamento_id_foreign` FOREIGN KEY (`medicamento_id`) REFERENCES `medicamentos` (`id`), ADD CONSTRAINT `medicinas_presentacion_id_foreign` FOREIGN KEY (`presentacion_id`) REFERENCES `presentacions` (`id`); -- -- Filtros para la tabla `medicina_prescription` -- ALTER TABLE `medicina_prescription` ADD CONSTRAINT `medicina_prescription_medicina_id_foreign` FOREIGN KEY (`medicina_id`) REFERENCES `medicinas` (`id`), ADD CONSTRAINT `medicina_prescription_prescription_id_foreign` FOREIGN KEY (`prescription_id`) REFERENCES `prescriptions` (`id`); -- -- Filtros para la tabla `medicos` -- ALTER TABLE `medicos` ADD CONSTRAINT `medicos_especialidad_id_foreign` FOREIGN KEY (`especialidad_id`) REFERENCES `especialidad` (`id`), ADD CONSTRAINT `medicos_personas_id_foreign` FOREIGN KEY (`personas_id`) REFERENCES `personas` (`id`); -- -- Filtros para la tabla `pacientes` -- ALTER TABLE `pacientes` ADD CONSTRAINT `pacientes_departamento_id_foreign` FOREIGN KEY (`departamento_id`) REFERENCES `departamentos` (`id`), ADD CONSTRAINT `pacientes_estado_id_foreign` FOREIGN KEY (`estado_id`) REFERENCES `pacientes_estados` (`id`), ADD CONSTRAINT `pacientes_persona_id_foreign` FOREIGN KEY (`persona_id`) REFERENCES `personas` (`id`); -- -- Filtros para la tabla `prescriptions` -- ALTER TABLE `prescriptions` ADD CONSTRAINT `prescriptions_medico_id_foreign` FOREIGN KEY (`medico_id`) REFERENCES `users` (`id`), ADD CONSTRAINT `prescriptions_paciente_id_foreign` FOREIGN KEY (`paciente_id`) REFERENCES `pacientes` (`id`); -- -- Filtros para la tabla `sintomas` -- ALTER TABLE `sintomas` ADD CONSTRAINT `sintomas_categoria_id_foreign` FOREIGN KEY (`categoria_id`) REFERENCES `categoria_sintomas` (`id`); -- -- Filtros para la tabla `users` -- ALTER TABLE `users` ADD CONSTRAINT `users_departamento_id_foreign` FOREIGN KEY (`departamento_id`) REFERENCES `departamentos` (`id`), ADD CONSTRAINT `users_especialidad_id_foreign` FOREIGN KEY (`especialidad_id`) REFERENCES `especialidades` (`id`), ADD CONSTRAINT `users_persona_id_foreign` FOREIGN KEY (`persona_id`) REFERENCES `personas` (`id`), ADD CONSTRAINT `users_turno_id_foreign` FOREIGN KEY (`turno_id`) REFERENCES `turnos` (`id`); /*!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 */;
-- -- Update sql for MailWizz EMA from version 1.3.4.5 to 1.3.4.6 -- INSERT INTO `tag_registry` (`tag_id`, `tag`, `description`, `date_added`, `last_updated`) VALUES (NULL, '[SUBSCRIBER_DATE_ADDED]', NULL, '2014-06-23 00:00:00', '2014-06-23 00:00:00'), (NULL, '[SUBSCRIBER_DATE_ADDED_LOCALIZED]', NULL, '2014-06-23 00:00:00', '2014-06-23 00:00:00'), (NULL, '[DATE]', NULL, '2014-06-23 00:00:00', '2014-06-23 00:00:00'), (NULL, '[DATETIME]', NULL, '2014-06-23 00:00:00', '2014-06-23 00:00:00'); ALTER TABLE `list_field_value` CHANGE `value` `value` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; ALTER TABLE `list_customer_notification` CHANGE `subscribe_to` `subscribe_to` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; ALTER TABLE `list_customer_notification` CHANGE `unsubscribe_to` `unsubscribe_to` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; ALTER TABLE `list_customer_notification` CHANGE `daily_to` `daily_to` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; ALTER TABLE `campaign_option` CHANGE `email_stats` `email_stats` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; -- -- Table structure for table `tracking_domain` -- CREATE TABLE IF NOT EXISTS `tracking_domain` ( `domain_id` int(11) NOT NULL AUTO_INCREMENT, `customer_id` int(11) DEFAULT NULL, `name` varchar(255) NOT NULL, `date_added` datetime NOT NULL, `last_updated` datetime NOT NULL, PRIMARY KEY (`domain_id`), KEY `fk_tracking_domain_customer1_idx` (`customer_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; -- -- Constraints for table `tracking_domain` -- ALTER TABLE `tracking_domain` ADD CONSTRAINT `fk_tracking_domain_customer1` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON DELETE CASCADE ON UPDATE NO ACTION; -- -- Alter delivery servers table -- ALTER TABLE `delivery_server` ADD `tracking_domain_id` INT(11) NULL AFTER `bounce_server_id`; ALTER TABLE `delivery_server` ADD KEY `fk_delivery_server_tracking_domain1_idx` (`tracking_domain_id`); ALTER TABLE `delivery_server` ADD CONSTRAINT `fk_delivery_server_tracking_domain1` FOREIGN KEY (`tracking_domain_id`) REFERENCES `tracking_domain` (`domain_id`) ON DELETE SET NULL ON UPDATE NO ACTION; ALTER TABLE `delivery_server` ADD `from_email` VARCHAR(150) NOT NULL AFTER `timeout`; ALTER TABLE `delivery_server` ADD `from_name` VARCHAR(150) NOT NULL AFTER `from_email`; -- -- Set the delivery servers as inactive -- UPDATE `delivery_server` SET `status` = 'inactive' WHERE 1; -- -- New indexes, very slow process, even prone to error... -- ALTER TABLE `list_field_value` ADD KEY `field_id_value`(`field_id`,`value`); ALTER TABLE `list_subscriber` ADD KEY `list_id_status`(`list_id`,`status`);
DROP TABLE IF EXISTS `#__mojoom_config`;
/* Formatted on 12/30/2016 11:15:52 AM (QP5 v5.149.1003.31008) */ SELECT NULL "LOS Instance Balance SID", BI_IN.BI_BALAN_IDENT_CONTRACT_ID || BI_IN.BI_BALAN_IDENT_PURCHASE_SEQ_NO "LOS Offering Instance SID", CASE WHEN BI_U.BI_PURPOSE_BI_PURPOSE IS NULL THEN (SELECT DESCRIPTION FROM DATA_DOMAIN WHERE DATA_CLASS_ID = 153 AND DATA_VALUE = BI_IN.BI_PURPOSE_BI_PURPOSE) ELSE (SELECT DESCRIPTION FROM DATA_DOMAIN WHERE DATA_CLASS_ID = 153 AND DATA_VALUE = BI_U.BI_PURPOSE_BI_PURPOSE) END "Activity Type Indicator", BI_IN.BI_AGGR_VOLUME_VOLUME "Initial Feature Quantity", BI_IN.SHDES "Initial Feature UOM Code", NVL (BI_IN.BI_AGGR_VOLUME_VOLUME - BI_U.BI_AGGR_VOLUME_VOLUME, 0) "Feature Used Quantity", NVL (BI_U.SHDES, '-') "Feature Used UOM Code", NVL (BI_IN.BI_AGGR_VOLUME_VOLUME, 0) "Feature Balance Quantity", NVL (BI_U.SHDES, '-') "Feature Balance UOM Code" FROM (SELECT * FROM (SELECT * FROM SYSADM_RX.BI_CRED_ACCOUNTS WHERE BI_BALAN_IDENT_AGGREGATE_MONEY = 0 AND BI_PURPOSE_BI_PURPOSE = 'B' AND BI_BALAN_IDENT_ACC_EPE_NAME IS NULL) BI, --EXCLUDE DATA STASH AND STARTER STASH MPSUMTAB SM WHERE BI.BI_REM_CREDIT_VOL_UMCODE = SM.UMCODE) BI_IN, (SELECT * FROM (SELECT * FROM SYSADM_RX.BI_ACCOUNTS BIU WHERE BI_BALAN_IDENT_AGGREGATE_MONEY = 0 AND BI_PURPOSE_BI_PURPOSE = 'U' AND BI_BALAN_SNAP_DATE_TIMESTAMP + (NVL (BI_BALAN_SNAP_DATE_TIME_OFFSET, 0) / 86400) IN (SELECT MAX (BI_BALAN_SNAP_DATE_TIMESTAMP + (NVL (BI_BALAN_SNAP_DATE_TIME_OFFSET, 0) / 86400 )) FROM SYSADM_RX.BI_ACCOUNTS BIM WHERE BIM.BI_BALAN_IDENT_AGGREGATE_MONEY = 0 AND BIM.BI_PURPOSE_BI_PURPOSE = 'U' AND BIM.BI_BALAN_IDENT_CONTRACT_ID = BIU.BI_BALAN_IDENT_CONTRACT_ID AND BIM.BI_BALAN_IDENT_PURCHASE_SEQ_NO = BIU.BI_BALAN_IDENT_PURCHASE_SEQ_NO AND BIM.BI_BALAN_IDENT_OFFER_SNCODE = BIU.BI_BALAN_IDENT_OFFER_SNCODE)) BI, --MAX SNASHOT SELECTION MPSUMTAB SM WHERE BI.BI_REM_CREDIT_VOL_UMCODE = SM.UMCODE) BI_U WHERE BI_IN.BI_BALAN_IDENT_CONTRACT_ID = BI_U.BI_BALAN_IDENT_CONTRACT_ID(+) AND BI_IN.BI_BALAN_IDENT_PURCHASE_SEQ_NO = BI_U.BI_BALAN_IDENT_PURCHASE_SEQ_NO(+) -- AND BI_IN.BI_BALAN_IDENT_CONTRACT_ID||BI_IN.BI_BALAN_IDENT_PURCHASE_SEQ_NO = <<"LOS Offering Instance SID">> Order by BI_IN.BI_BALAN_SNAP_DATE_TIMESTAMP DESC Select CO_CODE from contract_all where co_id = 1000027451 Select * from BILLING_ACCOUNT Where BILLING_ACCOUNT_ID IN( Select BILLING_ACCOUNT_ID from BILLING_ACCOUNT_ASSIGNMENT Where CONTRACT_ID = 1000027451) SELECT ----BI_BALAN_IDENT_CONTRACT_ID || BI_BALAN_IDENT_PURCHASE_SEQ_NO BI_BALAN_IDENT_CONTRACT_ID,BI_AGGR_VOLUME_VOLUME FROM SYSADM_RX.BI_CRED_ACCOUNTS WHERE BI_BALAN_IDENT_AGGREGATE_MONEY = 0 AND BI_PURPOSE_BI_PURPOSE = 'B' AND BI_BALAN_IDENT_ACCOUNT_TYPE = 'D' AND BI_BALAN_IDENT_ACC_EPE_NAME IS NOT NULL -- AND BI_BALAN_IDENT_SNCODE IN (80,81) -- AND BI_BALAN_IDENT_CONTRACT_ID = 1000019441 order by BI_BALAN_IDENT_CONTRACT_ID DESC Select * from NK_SESSION_PASS_HISTORY Where CO_ID = 1000019441 Select DISTINCT CS_OFFER_ID from NK_SESSION_PASS_HISTORY 100000603023 10000274867 1000027486 select (5368709120 - 5284823040)/1024/1024 from dual SELECT BI_BALAN_IDENT_CONTRACT_ID,BI_BALAN_IDENT_PURCHASE_SEQ_NO, BI.BI_AGGR_VOLUME_VOLUME, BI.BI_REQ_VOLUME_VOLUME,BI.BI_REM_CREDIT_VOL_VOLUME,BI.BI_BALAN_IDENT_ACC_EPE_NAME, BI.BI_BALAN_IDENT_BUNDL_PROD_ID, BI.BI_BALAN_IDENT_COREL_ID, BI.BI_BALAN_IDENT_SNCODE --count(*) FROM SYSADM_RX.BI_ACCOUNTS BI WHERE 1=1 -- AND BI_BALAN_IDENT_AGGREGATE_MONEY > 0 AND BI_PURPOSE_BI_PURPOSE = 'U' -- AND BI.BI_BALAN_IDENT_CONTRACT_ID = 1000019441 --> 1000000000 -- AND BI.BI_AGGR_VOLUME_VOLUME > 0 and BI_BALAN_IDENT_ACC_EPE_NAME is not null --AND BI.BI_BALAN_IDENT_SNCODE = 81 --Order by 3 1000000000 10000031293011 select * from PURCHASED_BUNDLE SELECT BI.BI_REM_CREDIT_VOL_VOLUME, BI.BI_AGGR_VOLUME_VOLUME, --> BI.BI_REQ_VOLUME_VOLUME FROM SYSADM_RX.BI_CRED_ACCOUNTS bi WHERE BI_BALAN_IDENT_AGGREGATE_MONEY = 0 AND BI_PURPOSE_BI_PURPOSE = 'B' AND BI_BALAN_IDENT_CONTRACT_ID = 1000024031 order by BI_BALAN_SNAP_DATE_TIMESTAMP desc SELECT --BI_BALAN_SNAP_DATE_TIMESTAMP,BI_PURPOSE_BI_PURPOSE, --BI.BI_REM_CREDIT_VOL_VOLUME,BI.BI_AGGR_VOLUME_VOLUME,BI.BI_REQ_VOLUME_VOLUME, --BI.BI_REM_CREDIT_CHRG_AMOUNT,BI.BI_AGGR_CHRG_AMOUNT,BI.BI_REQ_AMOUNT_AMOUNT, BI.BI_BALAN_IDENT_ACC_EPE_NAME FROM SYSADM_RX.BI_ACCOUNTS bi WHERE BI_BALAN_IDENT_AGGREGATE_MONEY = 0 AND BI_PURPOSE_BI_PURPOSE = 'U' AND BI_BALAN_IDENT_CONTRACT_ID = 1000024031 order by BI_BALAN_SNAP_DATE_TIMESTAMP desc /* Formatted on 12/28/2016 2:47:55 PM (QP5 v5.149.1003.31008) */ SELECT BI_BALAN_SNAP_DATE_TIMESTAMP + (NVL (BI_BALAN_SNAP_DATE_TIME_OFFSET, 0) / 86400) ,BI_BALAN_IDENT_CONTRACT_ID FROM (SELECT * FROM SYSADM_RX.BI_ACCOUNTS BIU WHERE BI_BALAN_IDENT_AGGREGATE_MONEY = 0 AND BI_PURPOSE_BI_PURPOSE = 'U' AND BI_BALAN_SNAP_DATE_TIMESTAMP + (NVL (BI_BALAN_SNAP_DATE_TIME_OFFSET, 0) / 86400) IN (SELECT MAX (BI_BALAN_SNAP_DATE_TIMESTAMP + (NVL (BI_BALAN_SNAP_DATE_TIME_OFFSET, 0) / 86400)) FROM SYSADM_RX.BI_ACCOUNTS BIM WHERE BIM.BI_BALAN_IDENT_AGGREGATE_MONEY = 0 AND BIM.BI_PURPOSE_BI_PURPOSE = 'U' AND BIM.BI_BALAN_IDENT_CONTRACT_ID = BIU.BI_BALAN_IDENT_CONTRACT_ID AND BIM.BI_BALAN_IDENT_PURCHASE_SEQ_NO = BIU.BI_BALAN_IDENT_PURCHASE_SEQ_NO AND BIM.BI_BALAN_IDENT_OFFER_SNCODE = BIU.BI_BALAN_IDENT_OFFER_SNCODE)) BI, --MAX SNASHOT SELECTION MPSUMTAB SM WHERE BI.BI_REM_CREDIT_VOL_UMCODE = SM.UMCODE
/* Navicat Premium Data Transfer Source Server : mysql Source Server Type : MySQL Source Server Version : 50617 Source Host : localhost:3306 Source Schema : movielens Target Server Type : MySQL Target Server Version : 50617 File Encoding : 65001 Date: 07/06/2019 00:17:13 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for history -- ---------------------------- DROP TABLE IF EXISTS `history`; CREATE TABLE `history` ( `id` int(10) NOT NULL AUTO_INCREMENT, `user_id` int(20) DEFAULT NULL, `movie_id` int(20) DEFAULT NULL, `start_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; -- ---------------------------- -- Table structure for movies -- ---------------------------- DROP TABLE IF EXISTS `movies`; CREATE TABLE `movies` ( `id` int(10) NOT NULL AUTO_INCREMENT, `movie_id` int(10) NOT NULL, `movie_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `movie_label` varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 3885 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; -- ---------------------------- -- Table structure for rating -- ---------------------------- DROP TABLE IF EXISTS `rating`; CREATE TABLE `rating` ( `id` int(10) NOT NULL AUTO_INCREMENT, `user_id` int(10) NOT NULL, `movie_id` int(10) NOT NULL, `rating` int(10) NOT NULL, `start_time` int(30) NOT NULL, PRIMARY KEY (`id`) USING BTREE, INDEX `userId`(`user_id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1397739 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; -- ---------------------------- -- Table structure for user -- ---------------------------- DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int(10) NOT NULL AUTO_INCREMENT, `username` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `password` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `start_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL, `update_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; SET FOREIGN_KEY_CHECKS = 1;
----------留言板问题分类菜单------ insert into sec_resource values('CBDAK2PFUG3J1CUBWPMR5ATE7KI4HJWC','FAQ_TYPE','DP5O3648HGMM53Y5LEXWDUT59GPDILD7','FAQ问题类型','0','0','000000FAQTOP');
drop table if exists Users; drop table if exists Role; create table Role ( id integer primary key, name char(20) unique not null ); insert into Role VALUES (1, "Manager"); insert into Role values (2, "Waiter"); insert into Role values (3, "Kitchen Assistant"); create table Users ( id integer primary key, uname char(12) unique not null, password char(60) not null, role integer not null, foreign key(role) references Role(name) ); insert into Users (uname, password, role) VALUES ('manager', '$2a$12$CyLyLDPA5NFTY48o3fANQOEsni38JgHBk3FNwdUFd1OwYMBZxN146', 1);
CREATE TABLE tbl_SiteConfig ( confName VARCHAR(50) NOT NULL, confValue TEXT NOT NULL, PRIMARY KEY (confName) )
/* Creamos la base de datos */ CREATE DATABASE IF NOT EXISTS laravel_master CHARACTER SET utf8 COLLATE utf8_general_ci; /* Usamos la base de datos */ use laravel_master; /* Creamos la tabla de usuarios */ CREATE TABLE IF NOT EXISTS users( id INT (255) auto_increment NOT NULL, role VARCHAR (20), name VARCHAR (100), surname VARCHAR (200), nick VARCHAR (100), email VARCHAR (255), password VARCHAR (255), image VARCHAR (255), create_at DATETIME, update_at DATETIME, remember_token VARCHAR(255), CONSTRAINT pk_users PRIMARY KEY(id) ) CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDb; /* Volcado de usuarios */ INSERT INTO users VALUES(NULL, 'user', 'Amaury', 'Aparicio', 'Panfilo', 'amaury@krakenwd.com', 'pass', NULL, CURTIME(), CURTIME(), NULL); INSERT INTO users VALUES(NULL, 'user', 'Juan', 'Lopez', 'Juanin', 'juanin@krakenwd.com', 'pass', NULL, CURTIME(), CURTIME(), NULL); INSERT INTO users VALUES(NULL, 'user', 'Jaime', 'Duende', 'Jaimico', 'jaimin@krakenwd.com', 'pass', NULL, CURTIME(), CURTIME(), NULL); /* Creamos la tabla de imagenes */ CREATE TABLE IF NOT EXISTS images( id INT (255) auto_increment NOT NULL, user_id INT (255), image_path VARCHAR (255), description TEXT, create_at DATETIME, update_at DATETIME, CONSTRAINT pk_images PRIMARY KEY(id), CONSTRAINT fk_images_user FOREIGN KEY(user_id) REFERENCES users(id) ) CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDb; /*Volcado de imagenes*/ INSERT INTO images VALUES(NULL, 1, 'test1.jpg', 'descripcion de pueba 1', CURTIME(), CURTIME()); INSERT INTO images VALUES(NULL, 2, 'test2.jpg', 'descripcion de pueba 2', CURTIME(), CURTIME()); INSERT INTO images VALUES(NULL, 3, 'test3.jpg', 'descripcion de pueba 3', CURTIME(), CURTIME()); INSERT INTO images VALUES(NULL, 1, 'test4.jpg', 'descripcion de pueba 4', CURTIME(), CURTIME()); /* Creamos la tabla de comentarios */ CREATE TABLE IF NOT EXISTS comments( id INT (255) auto_increment NOT NULL, user_id INT (255), image_id INT (255), content TEXT, create_at DATETIME, update_at DATETIME, CONSTRAINT pk_comments PRIMARY KEY(id), CONSTRAINT fk_comments_user FOREIGN KEY(user_id) REFERENCES users(id), CONSTRAINT fk_comments_image FOREIGN KEY(image_id) REFERENCES images(id) ) CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDb; /* Volcado de comentarios */ INSERT INTO comments VALUES(NULL, 1, 1, 'comentario de prueba 1', CURTIME(), CURTIME()); INSERT INTO comments VALUES(NULL, 2, 1, 'comentario de prueba 2', CURTIME(), CURTIME()); INSERT INTO comments VALUES(NULL, 3, 1, 'comentario de prueba 3', CURTIME(), CURTIME()); INSERT INTO comments VALUES(NULL, 1, 2, 'comentario de prueba 4', CURTIME(), CURTIME()); INSERT INTO comments VALUES(NULL, 2, 2, 'comentario de prueba 5', CURTIME(), CURTIME()); INSERT INTO comments VALUES(NULL, 3, 2, 'comentario de prueba 6', CURTIME(), CURTIME()); INSERT INTO comments VALUES(NULL, 1, 3, 'comentario de prueba 7', CURTIME(), CURTIME()); INSERT INTO comments VALUES(NULL, 2, 3, 'comentario de prueba 8', CURTIME(), CURTIME()); INSERT INTO comments VALUES(NULL, 3, 3, 'comentario de prueba 9', CURTIME(), CURTIME()); /* Creamos la tabla de likes */ CREATE TABLE IF NOT EXISTS likes( id INT (255) auto_increment NOT NULL, user_id INT (255), image_id INT (255), create_at DATETIME, update_at DATETIME, CONSTRAINT pk_likes PRIMARY KEY(id), CONSTRAINT fk_likes_user FOREIGN KEY(user_id) REFERENCES users(id), CONSTRAINT fk_likes_image FOREIGN KEY(image_id) REFERENCES images(id) ) CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDb; /* Volcado de likes */ INSERT INTO likes VALUES(NULL, 1, 1, CURTIME(), CURTIME()); INSERT INTO likes VALUES(NULL, 2, 1, CURTIME(), CURTIME()); INSERT INTO likes VALUES(NULL, 3, 1, CURTIME(), CURTIME()); INSERT INTO likes VALUES(NULL, 1, 2, CURTIME(), CURTIME()); INSERT INTO likes VALUES(NULL, 2, 2, CURTIME(), CURTIME()); INSERT INTO likes VALUES(NULL, 3, 2, CURTIME(), CURTIME()); INSERT INTO likes VALUES(NULL, 1, 3, CURTIME(), CURTIME()); INSERT INTO likes VALUES(NULL, 2, 3, CURTIME(), CURTIME()); INSERT INTO likes VALUES(NULL, 3, 3, CURTIME(), CURTIME());
ALTER TABLE push_data ADD COLUMN new_channel_id CHAR(36); UPDATE push_data SET new_channel_id = channel_id; ALTER TABLE push_data DROP COLUMN channel_id; ALTER TABLE push_data RENAME COLUMN new_channel_id TO channel_id; ALTER TABLE push_data DROP CONSTRAINT push_data_pkey; ALTER TABLE push_data ADD PRIMARY KEY (channel_id);
2018-10-17 01:00:47 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.270ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.710ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 519.570ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 8.940ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.580ms 2018-10-17 01:01:47 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.230ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 13.670ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 502.640ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 6.900ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 4.000ms 2018-10-17 01:02:47 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.110ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.720ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 375.400ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.730ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.310ms 2018-10-17 01:03:47 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.130ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.640ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 512.560ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 7.010ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.690ms 2018-10-17 01:04:47 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 4.160ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 3.180ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 543.080ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 4.580ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 3.020ms 2018-10-17 01:05:47 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.420ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.890ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 182.280ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.940ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.710ms 2018-10-17 01:06:47 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.530ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 3.380ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 204.560ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.360ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.660ms 2018-10-17 01:07:47 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.340ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.990ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 213.010ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 6.640ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 6.700ms 2018-10-17 01:08:47 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.470ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.340ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 309.870ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.790ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.650ms 2018-10-17 01:09:47 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 2.900ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.830ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 370.150ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 4.410ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 3.070ms 2018-10-17 01:10:47 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.310ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 3.870ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 391.220ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 4.690ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.530ms 2018-10-17 01:11:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.350ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.210ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 721.570ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.330ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 7.380ms 2018-10-17 01:12:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 7.210ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 7.350ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 605.640ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 4.060ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 3.430ms 2018-10-17 01:13:47 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.920ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 3.070ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 186.310ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.560ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.650ms 2018-10-17 01:14:47 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.190ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.600ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 176.510ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.170ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.510ms 2018-10-17 01:15:47 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.080ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 3.030ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 199.080ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 12.010ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.590ms 2018-10-17 01:16:47 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.090ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 1.860ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 181.120ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 8.970ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.990ms 2018-10-17 01:17:47 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.070ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 3.060ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 174.420ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.430ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 3.260ms 2018-10-17 01:18:47 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.250ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.830ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 221.310ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.440ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 5.350ms 2018-10-17 01:19:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.390ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 3.110ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 360.100ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 5.140ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.900ms 2018-10-17 01:20:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.200ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.790ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 338.140ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 7.380ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.820ms 2018-10-17 01:21:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.250ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 3.690ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 483.530ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.580ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.650ms 2018-10-17 01:22:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.310ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.900ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 565.480ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 4.020ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.570ms 2018-10-17 01:23:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.380ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.840ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 498.900ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.540ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.570ms 2018-10-17 01:24:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.280ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.860ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 794.080ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 4.700ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.470ms 2018-10-17 01:25:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.250ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.680ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 506.110ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.310ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.500ms 2018-10-17 01:26:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 8.700ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.400ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 638.120ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 2.850ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.630ms 2018-10-17 01:27:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 5.910ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 3.110ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 544.790ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 11.020ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.430ms 2018-10-17 01:28:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.440ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.600ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 275.870ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.300ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.360ms 2018-10-17 01:29:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.510ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.470ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 292.360ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.210ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.250ms 2018-10-17 01:30:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 10.980ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 4.790ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 411.380ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.440ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.480ms 2018-10-17 01:31:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.080ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.770ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 754.900ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 4.110ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.650ms 2018-10-17 01:32:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.280ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.770ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 399.540ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.700ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 4.680ms 2018-10-17 01:33:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 13.190ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 4.590ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 508.340ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 4.910ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.550ms 2018-10-17 01:34:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.310ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.910ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 221.470ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 12.740ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.570ms 2018-10-17 01:35:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.160ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 3.250ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 515.790ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.510ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.550ms 2018-10-17 01:36:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 8.580ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.580ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 252.490ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 11.470ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.790ms 2018-10-17 01:37:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.080ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.810ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 180.410ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.710ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.740ms 2018-10-17 01:38:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 4.140ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.930ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 290.980ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.600ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.620ms 2018-10-17 01:39:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.040ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.640ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 314.500ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.470ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.540ms 2018-10-17 01:40:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.460ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.760ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 183.180ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 4.220ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.160ms 2018-10-17 01:41:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 12.780ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.670ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 178.400ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.390ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.380ms 2018-10-17 01:42:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.060ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.250ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 176.190ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.180ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.590ms 2018-10-17 01:43:48 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.340ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.870ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 310.760ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 10.060ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.670ms 2018-10-17 01:44:49 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.350ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.750ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 402.130ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.720ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.800ms 2018-10-17 01:45:49 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.070ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.610ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 604.380ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.490ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.440ms 2018-10-17 01:46:49 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.110ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.990ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 455.090ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.920ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.910ms 2018-10-17 01:47:49 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 7.400ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.830ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 551.690ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 4.010ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.530ms 2018-10-17 01:48:49 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.590ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 7.830ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 476.080ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.730ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.420ms 2018-10-17 01:49:49 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 4.900ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 16.130ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 416.920ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.670ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.820ms 2018-10-17 01:50:49 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 7.980ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 13.430ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 460.640ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.670ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.950ms 2018-10-17 01:51:49 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.210ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 8.810ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 513.860ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 7.360ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.380ms 2018-10-17 01:52:49 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.200ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.750ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 285.400ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 9.490ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 3.000ms 2018-10-17 01:53:49 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.290ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 3.150ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 543.840ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.420ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.430ms 2018-10-17 01:54:49 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 10.880ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.680ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 178.590ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.410ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.330ms 2018-10-17 01:55:49 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 7.180ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 3.110ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 357.140ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 15.760ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.660ms 2018-10-17 01:56:49 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.500ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.850ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 416.280ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 2.650ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.380ms 2018-10-17 01:57:49 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.700ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 2.780ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 182.490ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.440ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.330ms 2018-10-17 01:58:49 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.110ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 3.060ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 435.710ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 19.270ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 3.390ms 2018-10-17 01:59:50 controller: AlarmController action: getAlarmData select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc 3.270ms select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0 3.240ms select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id` 618.250ms select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc 3.730ms select * from `admin_users` where `admin_users`.`id` = 6 limit 1 2.660ms
delete from emp where empno=4
SELECT groupp ,ROUND(percent / percent_network, 2) AS indexx FROM ( SELECT groupp ,volume ,((SUM(volume)) / (SUM(SUM(volume)) OVER())) AS percent ,volume_network ,((SUM(volume_network)) / (SUM(SUM(volume_network)) OVER())) AS percent_network FROM ( --gender SELECT c3.sel_profile_value.profile_value_name AS groupp ,COUNT(*) AS volume FROM edb.edb_users JOIN ( SELECT appnexus_user_id FROM edb.edb_keyword WHERE source_id = 4 AND captify_region = 'US' AND search_event_date = 20180501 AND property_id NOT IN (11394, 11643, 11947, 11948, 11843, 11502, 11841, 11504, 11503, 11507, 11505, 11506, 11867, 11868, 11501, 11842,11840, 11946, 11488) AND LENGTH(keywords) >= 1 AND LENGTH(keywords) <= 256 AND LENGTH(keywords) - LENGTH(TRANSLATE(keywords, ' ', '')) + 1 <= 13 AND keywords IS NOT NULL AND keywords NOT ilike '%,%' AND category_id IS NOT NULL AND appnexus_user_id IS NOT NULL AND appnexus_user_id != '' AND appnexus_user_id != '0' AND appnexus_user_id > '1' --Appnexus only AND regexp_like(LOWER(keywords), 'great wolf lodge') GROUP BY appnexus_user_id ) U ON U.appnexus_user_id = edb.edb_users.dsp_user_id LEFT JOIN c3.sel_profile_value ON edb.edb_users.gender = c3.sel_profile_value.profile_value_id WHERE dsp_source_id = 1 AND dsp_user_id IS NOT NULL AND dsp_user_id != '' AND dsp_user_id != '0' AND dsp_user_id > '1' --Appnexus only GROUP BY groupp ORDER BY groupp ASC UNION --age SELECT c3.sel_profile_value.profile_value_name AS groupp ,COUNT(*) AS volume FROM edb.edb_users JOIN ( SELECT appnexus_user_id FROM edb.edb_keyword WHERE source_id = 4 AND captify_region = 'US' AND search_event_date = 20180501 AND property_id NOT IN (11394, 11643, 11947, 11948, 11843, 11502, 11841, 11504, 11503, 11507, 11505, 11506, 11867, 11868, 11501, 11842,11840, 11946, 11488) AND LENGTH(keywords) >= 1 AND LENGTH(keywords) <= 256 AND LENGTH(keywords) - LENGTH(TRANSLATE(keywords, ' ', '')) + 1 <= 13 AND keywords IS NOT NULL AND keywords NOT ilike '%,%' AND category_id IS NOT NULL AND appnexus_user_id IS NOT NULL AND appnexus_user_id != '' AND appnexus_user_id != '0' AND appnexus_user_id > '1' --Appnexus only AND regexp_like(LOWER(keywords), 'great wolf lodge') GROUP BY appnexus_user_id ) U ON U.appnexus_user_id = edb.edb_users.dsp_user_id LEFT JOIN c3.sel_profile_value ON edb.edb_users.age_group = c3.sel_profile_value.profile_value_id WHERE dsp_source_id = 1 AND dsp_user_id IS NOT NULL AND dsp_user_id != '' AND dsp_user_id != '0' AND dsp_user_id > '1' --Appnexus only GROUP BY groupp ORDER BY groupp ASC ) brand JOIN ( --gender SELECT c3.sel_profile_value.profile_value_name AS groupp_network ,COUNT(*) AS volume_network FROM edb.edb_users JOIN ( SELECT appnexus_user_id FROM edb.edb_keyword WHERE source_id = 4 AND captify_region = 'US' AND search_event_date = 20180501 AND property_id NOT IN (11394, 11643, 11947, 11948, 11843, 11502, 11841, 11504, 11503, 11507, 11505, 11506, 11867, 11868, 11501, 11842,11840, 11946, 11488) AND LENGTH(keywords) >= 1 AND LENGTH(keywords) <= 256 AND LENGTH(keywords) - LENGTH(TRANSLATE(keywords, ' ', '')) + 1 <= 13 AND keywords IS NOT NULL AND keywords NOT ilike '%,%' AND category_id IS NOT NULL AND appnexus_user_id IS NOT NULL AND appnexus_user_id != '' AND appnexus_user_id != '0' AND appnexus_user_id > '1' --Appnexus only GROUP BY appnexus_user_id ) U ON U.appnexus_user_id = edb.edb_users.dsp_user_id LEFT JOIN c3.sel_profile_value ON edb.edb_users.gender = c3.sel_profile_value.profile_value_id WHERE dsp_source_id = 1 AND dsp_user_id IS NOT NULL AND dsp_user_id != '' AND dsp_user_id != '0' AND dsp_user_id > '1' --Appnexus only GROUP BY groupp_network ORDER BY groupp_network ASC UNION --age SELECT c3.sel_profile_value.profile_value_name AS groupp_network ,COUNT(*) AS volume_network FROM edb.edb_users JOIN ( SELECT appnexus_user_id FROM edb.edb_keyword WHERE source_id = 4 AND captify_region = 'US' AND search_event_date = 20180501 AND property_id NOT IN (11394, 11643, 11947, 11948, 11843, 11502, 11841, 11504, 11503, 11507, 11505, 11506, 11867, 11868, 11501, 11842,11840, 11946, 11488) AND LENGTH(keywords) >= 1 AND LENGTH(keywords) <= 256 AND LENGTH(keywords) - LENGTH(TRANSLATE(keywords, ' ', '')) + 1 <= 13 AND keywords IS NOT NULL AND keywords NOT ilike '%,%' AND category_id IS NOT NULL AND appnexus_user_id IS NOT NULL AND appnexus_user_id != '' AND appnexus_user_id != '0' AND appnexus_user_id > '1' --Appnexus only GROUP BY appnexus_user_id ) U ON U.appnexus_user_id = edb.edb_users.dsp_user_id LEFT JOIN c3.sel_profile_value ON edb.edb_users.age_group = c3.sel_profile_value.profile_value_id WHERE dsp_source_id = 1 AND dsp_user_id IS NOT NULL AND dsp_user_id != '' AND dsp_user_id != '0' AND dsp_user_id > '1' --Appnexus only GROUP BY groupp_network ORDER BY groupp_network ASC ) network ON brand.groupp = network.groupp_network WHERE groupp IS NOT NULL AND groupp_network IS NOT NULL GROUP BY groupp, volume, volume_network ) finall GROUP BY groupp, indexx ORDER BY groupp
SELECT * FROM dbo.CheckHed SELECT * FROM APtran WHERE APTranNo = 3274 SELECT * FROM dbo.POHeader SELECT * FROM APinvHed SELECT * FROM dbo.POHeader SELECT * FROM dbo.podetail WHERE ponum = 853 SELECT * FROM APInvDtl WHERE ponum = 853 SELECT * FROM APInvHed WHERE ponum = 853
--ALTER VIEW BG_LATE_ORDERS_9999 AS --Created: 06/19/12 By: BG --Last Updated: 06/19/12 By: BG --Purpose: View for Late Order Report for Stock Orders/#9999 --Last Change: SELECT TOP (100) PERCENT CONVERT(varchar, CAST(RTRIM(dbo.oeordhdr_sql.shipping_dt) AS datetime), 101) AS [Shipping Date], CONVERT(varchar, CAST(RTRIM(dbo.oeordhdr_sql.entered_dt) AS datetime), 101) AS Entered_Dt, dbo.oeordhdr_sql.ord_no, dbo.oeordlin_sql.loc AS [Ship From], dbo.oeordhdr_sql.bill_to_name, dbo.oeordhdr_sql.ship_to_name, RTRIM(dbo.oeordhdr_sql.cus_no) AS Cus_No, dbo.oeordlin_sql.line_seq_no, dbo.oeordlin_sql.prod_cat AS [Shop Code], dbo.oeordlin_sql.item_no, oeordlin_sql.item_desc_1, oeordlin_sql.item_desc_2, dbo.oeordlin_sql.qty_ordered, dbo.oeordlin_sql.user_def_fld_1 AS [Late Order Comments 1], dbo.oeordlin_sql.user_def_fld_2 AS [Late Order Comments 2], dbo.oeordhdr_sql.slspsn_no AS [SALES #], dbo.oeordhdr_sql.cus_alt_adr_cd AS [Store #], dbo.imitmidx_sql.item_note_1 AS NOTE1, dbo.Z_IMINVLOC.qty_on_hand AS QOH, dbo.Z_IMINVLOC.qty_on_ord AS QOO, dbo.oeordhdr_sql.user_def_fld_1 AS [Order Note] FROM dbo.oeordlin_sql INNER JOIN dbo.imitmidx_sql ON dbo.oeordlin_sql.item_no = dbo.imitmidx_sql.item_no INNER JOIN dbo.Z_IMINVLOC ON dbo.Z_IMINVLOC.item_no = dbo.imitmidx_sql.item_no INNER JOIN dbo.oeordhdr_sql ON dbo.oeordhdr_sql.ord_type = dbo.oeordlin_sql.ord_type AND dbo.oeordhdr_sql.ord_no = dbo.oeordlin_sql.ord_no WHERE (NOT (dbo.oeordhdr_sql.oe_po_no = 'BRUCE' OR dbo.oeordhdr_sql.oe_po_no = 'WALT')) AND (dbo.oeordhdr_sql.ord_type = 'O') AND (CONVERT(varchar, CAST(RTRIM(dbo.oeordhdr_sql.shipping_dt) AS datetime),101) < DATEADD(day, - 1, GETDATE())) AND (NOT (dbo.oeordlin_sql.user_def_fld_2 LIKE '%SHIPPED%') OR dbo.oeordlin_sql.user_def_fld_2 IS NULL) AND NOT dbo.oeordlin_sql.loc = 'IT' --AND NOT dbo.oeordhdr_sql.user_def_fld_5 IS NULL --AND NOT dbo.oeordlin_sql.user_def_fld_1 LIKE '%PROJECTION%' --AND NOT ((dbo.oeordlin_sql.user_def_fld_1 LIKE '%STOCK%') OR (dbo.oeordlin_sql.user_def_fld_1 IS NULL)) --AND NOT (dbo.oeordhdr_sql.oe_po_no LIKE '%stock%') AND NOT (dbo.oeordlin_sql.item_no LIKE '%TEST%') AND (LTRIM(RTRIM(dbo.oeordhdr_sql.cus_no)) IN ('9999')) AND dbo.oeordlin_sql.shipped_dt IS NULL --Added Back on 4/26/12 by BG: --AND (NOT (dbo.oeordlin_sql.prod_cat IN ('037', '2', '036', '102', '111', '336'))) --Added on 6/5/12: --AND oeordhdr_sql.ord_no NOT IN (SELECT ord_no FROM oeordlin_sql WHERE prod_cat = '551') --UNION ALL --SELECT DISTINCT CONVERT(varchar, CAST(RTRIM(dbo.oeordhdr_sql.shipping_dt) AS datetime), 101) AS [Shipping Date], CONVERT(varchar, -- CAST(RTRIM(dbo.oeordhdr_sql.entered_dt) AS datetime), 101) AS Entered_Dt, dbo.oeordhdr_sql.ord_no, dbo.oeordhdr_sql.mfg_loc AS [Ship From], -- dbo.oeordhdr_sql.bill_to_name, dbo.oeordhdr_sql.ship_to_name, RTRIM(dbo.oeordhdr_sql.cus_no) AS Cus_No, line_seq_no AS line_seq_no, -- oeordlin_sql.prod_Cat AS [Shop Code], oeordlin_sql.item_no AS item_no, qty_to_ship AS QTY, dbo.oeordhdr_sql.user_def_fld_4 AS [Late Order Comments 1], -- dbo.oeordhdr_Sql.user_def_fld_3 AS [Late Order Comments 2], dbo.oeordhdr_sql.slspsn_no AS [SALES #], dbo.oeordhdr_sql.cus_alt_adr_cd AS [Store #], -- dbo.imitmidx_sql.item_note_1 AS NOTE1, dbo.Z_IMINVLOC.qty_on_hand AS QOH, dbo.Z_IMINVLOC.qty_on_ord AS QOO, -- dbo.oeordhdr_sql.user_def_fld_4 AS [WM OrdType] --FROM dbo.oeordlin_sql INNER JOIN -- dbo.imitmidx_sql ON dbo.oeordlin_sql.item_no = dbo.imitmidx_sql.item_no INNER JOIN -- dbo.Z_IMINVLOC ON dbo.Z_IMINVLOC.item_no = dbo.imitmidx_sql.item_no INNER JOIN -- dbo.oeordhdr_sql ON dbo.oeordhdr_sql.ord_type = dbo.oeordlin_sql.ord_type AND dbo.oeordhdr_sql.ord_no = dbo.oeordlin_sql.ord_no --WHERE (NOT (dbo.oeordhdr_sql.oe_po_no = 'BRUCE' OR -- dbo.oeordhdr_sql.oe_po_no = 'STOCK' OR -- dbo.oeordhdr_sql.oe_po_no = 'WALT')) AND (dbo.oeordhdr_sql.ord_type = 'O') AND (CONVERT(varchar, CAST(RTRIM(dbo.oeordhdr_sql.shipping_dt) AS datetime), -- 101) < DATEADD(day, - 1, GETDATE())) -- --Added on 6/5/12: -- AND oeordhdr_sql.ord_no IN (SELECT ord_no FROM oeordlin_sql WHERE prod_cat = '551') -- AND (NOT (LTRIM(RTRIM(dbo.oeordhdr_sql.cus_no)) IN ('11575', '23033'))) AND (dbo.oeordlin_sql.shipped_dt IS NULL) AND -- (dbo.oeordhdr_sql.oe_po_no NOT IN ('31011784', '31011785', '31011786'))
SET FOREIGN_KEY_CHECKS = 0; drop table if exists Participants; SET FOREIGN_KEY_CHECKS = 1; create table if not exists Participants ( ParticipantID varchar(50), primary key (ParticipantID) ); SET FOREIGN_KEY_CHECKS = 0; drop table if exists Sessions; SET FOREIGN_KEY_CHECKS = 1; create table if not exists Sessions ( SessionID char(36), ParticipantID varchar(50), startTime datetime, SessionDURATION int(5), primary key (sessionID), FOREIGN KEY (ParticipantID) REFERENCES Participants (ParticipantID) ON UPDATE CASCADE ON DELETE CASCADE ); SET FOREIGN_KEY_CHECKS = 0; drop table if exists Songs; SET FOREIGN_KEY_CHECKS = 1; create table if not exists Songs ( URI varchar(50), SessionID char(36), Acousticness float(5), AnalysisURL varchar(100), Danceability float(5), DurationMS int(10), Energy float(5), SongID varchar(50), Instrumentalness float(5), SongKey int(1), Liveness float(5), Loudness float(5), SongMode int(1), Speechiness float(5), Tempo float(5), TimeSignature int(5), Trackhref varchar(100), Valence float(5), primary key (URI), foreign key (SessionID) references Sessions (SessionID) ON UPDATE CASCADE ON DELETE CASCADE ); SET FOREIGN_KEY_CHECKS = 0; drop table if exists PainLog; SET FOREIGN_KEY_CHECKS = 1; create table if not exists PainLog ( SessionID char(36), TimeRecorded datetime, PainLVL int(2), FOREIGN KEY (SessionID) REFERENCES Sessions (SessionID) ON UPDATE CASCADE ON DELETE CASCADE ); SET FOREIGN_KEY_CHECKS = 0; drop table if exists MedicationData; SET FOREIGN_KEY_CHECKS = 1; create table if not exists MedicationData ( SessionID char(36), TookMed bool, Name varchar(50), Dosage varchar(100), FOREIGN KEY (SessionID) REFERENCES Sessions (SessionID) ON UPDATE CASCADE ON DELETE CASCADE );
DROP DATABASE IF EXISTS exclusiveSneaksDB; CREATE DATABASE exclusiveSneaksDB; USE exclusiveSneaksDB; CREATE TABLE shoeInventory ( PRIMARY KEY (item_id), item_id INTEGER(11) AUTO_INCREMENT NOT NULL, provider_name VARCHAR (255) NOT NULL, department_name VARCHAR (255) NOT NULL, # mens + womens shoe_name VARCHAR(255) NOT NULL, shoe_color VARCHAR(35) NOT NULL, image_url VARCHAR(255) NOT NULL, price INTEGER(10), stock_quantity INTEGER(10) ); INSERT INTO shoeInventory (provider_name, department_name, shoe_name, shoe_color, image_url, price, stock_quantity) VALUES ("Foot Locker", "Girls", "JORDAN RETRO 11 - GRADE SCHOOL", "Black", "'https:\\www.shoes.com'", 85, 15); INSERT INTO shoeInventory (provider_name, department_name, shoe_name, shoe_color, image_url, price, stock_quantity) VALUES ("Foot Locker", "Girls", "JORDAN RETRO 11 - GRADE SCHOOL", "Black", "www.shoes.com", 85, 15); INSERT INTO shoeInventory (provider_name, department_name, shoe_name, shoe_color, image_url, price, stock_quantity) VALUES ("Foot Locker", "Girls", "JORDAN RETRO 11 - GRADE SCHOOL", "Black", "www.shoes.com", 85, 15); INSERT INTO shoeInventory (provider_name, department_name, shoe_name, shoe_color, image_url, price, stock_quantity) VALUES ("Foot Locker", "Girls", "JORDAN RETRO 11 - GRADE SCHOOL", "Black", "www.shoes.com", 85, 15); INSERT INTO shoeInventory (provider_name, department_name, shoe_name, shoe_color, image_url, price, stock_quantity) VALUES ("Foot Locker", "Girls", "JORDAN RETRO 11 - GRADE SCHOOL", "Black", "www.shoes.com", 85, 15); INSERT INTO shoeInventory (provider_name, department_name, shoe_name, shoe_color, image_url, price, stock_quantity) VALUES ("Foot Locker", "Girls", "JORDAN RETRO 11 - GRADE SCHOOL", "Black", "www.shoes.com", 85, 15); INSERT INTO shoeInventory (provider_name, department_name, shoe_name, shoe_color, image_url, price, stock_quantity) VALUES ("Foot Locker", "Girls", "JORDAN RETRO 11 - GRADE SCHOOL", "Black", "www.shoes.com", 85, 15); INSERT INTO shoeInventory (provider_name, department_name, shoe_name, shoe_color, image_url, price, stock_quantity) VALUES ("Foot Locker", "Girls", "JORDAN RETRO 11 - GRADE SCHOOL", "Black", "www.shoes.com", 85, 15); INSERT INTO shoeInventory (provider_name, department_name, shoe_name, shoe_color, image_url, price, stock_quantity) VALUES ("Foot Locker", "Girls", "JORDAN RETRO 11 - GRADE SCHOOL", "Black", "www.shoes.com", 85, 15); INSERT INTO shoeInventory (provider_name, department_name, shoe_name, shoe_color, image_url, price, stock_quantity) VALUES ("Foot Locker", "Girls", "JORDAN RETRO 11 - GRADE SCHOOL", "Black", "www.shoes.com", 85, 15); USE exclusiveSneaksDB; SELECT * FROM shoeInventory;
CREATE TABLE expenditures ( id BIGINT AUTO_INCREMENT, spending_date DATE, product_or_service VARCHAR(100), cost INT, person_id BIGINT, PRIMARY KEY (id), FOREIGN KEY (person_id) REFERENCES persons (id) );
#create table CREATE TABLE `ips` ( `start` int(11) NOT NULL, `end` int(11) NOT NULL, `startip` varchar(64) NOT NULL, `endip` varchar(64) NOT NULL, `country` varchar(64) NOT NULL, `province` varchar(64) NOT NULL, `city` varchar(64) NOT NULL, `operator` varchar(64) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; #import into table ips from file ip_20171211091025.txt load data infile 'ip_20171211091025.txt' ignore into table ips character set utf8 fields terminated by ',' enclosed by '' lines terminated by '\n' (`start`,`end`,`startip`,`endip`,`country`,`province`,`city`,`operator`);
SET FOREIGN_KEY_CHECKS = 0; DROP TABLE IF EXISTS inv_historicos; DROP TABLE IF EXISTS inv_tipos_productos; DROP TABLE IF EXISTS inv_productos; DROP TABLE IF EXISTS inv_propas; DROP TABLE IF EXISTS inv_categorias; DROP TABLE IF EXISTS inv_catatr; DROP TABLE IF EXISTS inv_atributos; DROP TABLE IF EXISTS inv_valores; DROP TABLE IF EXISTS inv_recepciones; DROP TABLE IF EXISTS inv_estadorecepciones; DROP TABLE IF EXISTS inv_inventarios; DROP TABLE IF EXISTS inv_transferencias; DROP TABLE IF EXISTS inv_estadotransferencias; DROP TABLE IF EXISTS inv_pasillos; DROP TABLE IF EXISTS inv_secciones; DROP TABLE IF EXISTS inv_almacenes; DROP TABLE IF EXISTS inv_almsec; DROP TABLE IF EXISTS inv_secpas; DROP TABLE IF EXISTS inv_invalm; SET FOREIGN_KEY_CHECKS = 1; CREATE TABLE `inv_historicos` ( `id_historico` int(10) AUTO_INCREMENT, `fecha` date NOT NULL, `modulo` varchar(20) NOT NULL, `usuario` varchar(20) NOT NULL, `accion` varchar(140) NOT NULL, PRIMARY KEY (`id_historico`) ); CREATE TABLE inv_tipos_productos( id_tipo_producto INT AUTO_INCREMENT, tipo varchar(50) NOT NULL, descripcion VARCHAR(50), PRIMARY KEY (id_tipo_producto)); CREATE TABLE inv_productos ( id_producto INT(10) AUTO_INCREMENT, nombre VARCHAR(20) NOT NULL, descripcion VARCHAR(100), fecha_alta DATE NOT NULL, fecha_baja DATE, imagen VARCHAR(200), cod_barras VARCHAR(50), precio INT, coste INT, peso INT, volumen INT, id_categoria INT(10), id_tipo_producto INT, PRIMARY KEY (id_producto) ); CREATE TABLE inv_propas( id_propas INT(10) AUTO_INCREMENT, id_producto INT(10), id_pasillo INT(10), cantidad INT, PRIMARY KEY (id_propas) ); CREATE TABLE inv_categorias( id_categoria INT(10) AUTO_INCREMENT, nombre VARCHAR(20) NOT NULL, PRIMARY KEY (id_categoria) ); CREATE TABLE inv_catatr( id_catatr INT(10) AUTO_INCREMENT, id_categoria INT(10), id_atributo INT(10), PRIMARY KEY (id_catatr) ); CREATE TABLE inv_atributos( id_atributo INT(10) AUTO_INCREMENT, nombre VARCHAR(20) NOT NULL, descripcion VARCHAR(50), PRIMARY KEY (id_atributo) ); CREATE TABLE inv_valores( id_valor INT(10) AUTO_INCREMENT, valor VARCHAR(20) NOT NULL, id_producto INT(10), id_atributo INT(10), PRIMARY KEY (id_valor) ); CREATE TABLE inv_recepciones( id_recepcion INT(10) AUTO_INCREMENT, nombre VARCHAR(20) NOT NULL, cantidad INT NOT NULL, fecha_recepcion DATE, id_producto INT(10), id_pasillo INT(10), id_estado INT(10), PRIMARY KEY(id_recepcion) ); CREATE TABLE inv_estadorecepciones( id_estado INT(10) AUTO_INCREMENT, estado VARCHAR(20) NOT NULL, PRIMARY KEY (id_estado) ); CREATE TABLE inv_inventarios( id_inventario INT(10) AUTO_INCREMENT, nombre VARCHAR(20) NOT NULL, PRIMARY KEY(id_inventario) ); CREATE TABLE inv_transferencias( id_transferencia INT(10)AUTO_INCREMENT, nombre VARCHAR(20) NOT NULL, cantidad INT, plazo_entrega INT, id_producto INT(10), id_pasillo_origen INT(10), id_pasillo_destino INT(10), id_estado INT(10), PRIMARY KEY (id_transferencia) ); CREATE TABLE inv_estadotransferencias( id_estado INT(10) AUTO_INCREMENT, estado VARCHAR(20) NOT NULL, PRIMARY KEY (id_estado) ); CREATE TABLE inv_pasillos( id_pasillo INT(10) AUTO_INCREMENT, nombre VARCHAR(20) NOT NULL, cantPro INT, PRIMARY KEY (id_pasillo) ); CREATE TABLE inv_secciones( id_seccion INT(10) AUTO_INCREMENT, nombre VARCHAR(20) NOT NULL, cantProPas INT, PRIMARY KEY (id_seccion) ); CREATE TABLE inv_almacenes( id_almacen INT(10) AUTO_INCREMENT, nombre VARCHAR(20) NOT NULL, cantProSec INT, PRIMARY KEY (id_almacen) ); CREATE TABLE inv_almsec( id_almsec INT(10) AUTO_INCREMENT, id_almacen INT(10), id_seccion INT(10), PRIMARY KEY (id_almsec) ); CREATE TABLE inv_secpas( id_secpas INT(10) AUTO_INCREMENT, id_seccion INT(10), id_pasillo INT(10), PRIMARY KEY (id_secpas) ); CREATE TABLE inv_invalm( id_invalm INT(10) AUTO_INCREMENT, id_inventario INT(10), id_almacen INT(10), PRIMARY KEY (id_invalm) ); ALTER TABLE inv_productos ADD FOREIGN KEY (id_categoria) REFERENCES inv_categorias(id_categoria), ADD FOREIGN KEY (id_tipo_producto) REFERENCES inv_tipos_productos(id_tipo_producto); ALTER TABLE inv_propas ADD FOREIGN KEY (id_producto) REFERENCES inv_productos(id_producto), ADD FOREIGN KEY (id_pasillo) REFERENCES inv_pasillos(id_pasillo); ALTER TABLE inv_almsec ADD FOREIGN KEY (id_almacen) REFERENCES inv_almacenes(id_almacen), ADD FOREIGN KEY (id_seccion) REFERENCES inv_secciones(id_seccion); ALTER TABLE inv_secpas ADD FOREIGN KEY (id_seccion) REFERENCES inv_secciones(id_seccion), ADD FOREIGN KEY (id_pasillo) REFERENCES inv_pasillos(id_pasillo); ALTER TABLE inv_invalm ADD FOREIGN KEY (id_inventario) REFERENCES inv_inventarios(id_inventario), ADD FOREIGN KEY (id_almacen) REFERENCES inv_almacenes(id_almacen); ALTER TABLE inv_catatr ADD FOREIGN KEY (id_categoria) REFERENCES inv_categorias(id_categoria), ADD FOREIGN KEY (id_atributo) REFERENCES inv_atributos(id_atributo); ALTER TABLE inv_valores ADD FOREIGN KEY (id_producto) REFERENCES inv_productos(id_producto), ADD FOREIGN KEY (id_atributo) REFERENCES inv_atributos(id_atributo); ALTER TABLE inv_recepciones ADD FOREIGN KEY (id_producto) REFERENCES inv_productos(id_producto), ADD FOREIGN KEY (id_pasillo) REFERENCES inv_pasillos(id_pasillo), ADD FOREIGN KEY (id_estado) REFERENCES inv_estadorecepciones(id_estado); ALTER TABLE inv_transferencias ADD FOREIGN KEY (id_producto) REFERENCES inv_productos(id_producto), ADD FOREIGN KEY (id_pasillo_origen) REFERENCES inv_pasillos(id_pasillo), ADD FOREIGN KEY (id_pasillo_destino) REFERENCES inv_pasillos(id_pasillo), ADD FOREIGN KEY (id_estado) REFERENCES inv_estadotransferencias(id_estado); -- Secciones DELETE FROM `gen_modulos` WHERE nombre = 'Inventario'; INSERT INTO `gen_modulos` (nombre, descripcion, orden) VALUES ('Inventario', 'Módulo de Inventario.', '2000'); SET @id_modulo = LAST_INSERT_ID(); DELETE FROM `gen_secciones` WHERE nombre = 'Tablero'; INSERT INTO `gen_secciones` (nombre, descripcion, permiso, orden, id_modulo, identificador) VALUES ('Tablero', 'Tablero resumen.', '0', '1', @id_modulo, 'tablero'); DELETE FROM `gen_secciones` WHERE nombre = 'Productos'; INSERT INTO `gen_secciones` (nombre, descripcion, permiso, orden, id_modulo, identificador) VALUES ('Productos', 'Gestión de productos.', '0', '1', @id_modulo, 'productos'); SET @id_sec_pro = LAST_INSERT_ID(); DELETE FROM `gen_secciones` WHERE nombre = 'Categorías'; INSERT INTO `gen_secciones` (nombre, descripcion, permiso, orden, id_modulo, identificador) VALUES ('Categorías', 'Gestión de categorías.', '0', '1', @id_modulo, 'categorias'); SET @id_sec_cat = LAST_INSERT_ID(); DELETE FROM `gen_secciones` WHERE nombre = 'Inventario'; INSERT INTO `gen_secciones` (nombre, descripcion, permiso, orden, id_modulo, identificador) VALUES ('Inventario', 'Gestión de Inventario.', '0', '1', @id_modulo, 'list_inventario'); SET @id_sec_inv = LAST_INSERT_ID(); DELETE FROM `gen_secciones` WHERE nombre = 'Transferencias'; INSERT INTO `gen_secciones` (nombre, descripcion, permiso, orden, id_modulo, identificador) VALUES ('Transferencias', 'Gestión de Transferencias.', '0', '1', @id_modulo, 'transferencias'); SET @id_sec_tra = LAST_INSERT_ID(); DELETE FROM `gen_secciones` WHERE nombre = 'Recepciones'; INSERT INTO `gen_secciones` (nombre, descripcion, permiso, orden, id_modulo, identificador) VALUES ('Recepciones', 'Gestión de recepciones.', '0', '1', @id_modulo, 'recepciones'); SET @id_sec_rec = LAST_INSERT_ID(); DELETE FROM `gen_secciones` WHERE nombre = 'Informes'; INSERT INTO `gen_secciones` (nombre, descripcion, permiso, orden, id_modulo, identificador) VALUES ('Informes', 'Gestión de Informes.', '0', '1',@id_modulo, 'informes'); SET @id_sec_inf = LAST_INSERT_ID(); -- Subsecciones DELETE FROM `gen_subsecciones` WHERE nombre = 'Crear Producto'; INSERT INTO `gen_subsecciones` (nombre, descripcion, permiso, orden, id_seccion, identificador) VALUES ('Crear Producto', 'Formulario para crear un producto.', '0','1', @id_sec_pro,'crearProducto'); DELETE FROM `gen_subsecciones` WHERE nombre = 'Extraer Productos CSV'; INSERT INTO `gen_subsecciones` (nombre, descripcion, permiso, orden, id_seccion, identificador) VALUES ('Extraer Productos CSV', 'Permite la descarga de un fichero CSV con todos los productos.', '0','1', @id_sec_pro,'extraerCsv'); DELETE FROM `gen_subsecciones` WHERE nombre = 'Crear Atributos'; INSERT INTO `gen_subsecciones` (nombre, descripcion, permiso, orden, id_seccion, identificador) VALUES ('Crear Atributos', 'Formulario para crear atributos.', '0','1', @id_sec_cat,'crearAtributos'); DELETE FROM `gen_subsecciones` WHERE nombre = 'Asignar Valores'; INSERT INTO `gen_subsecciones` (nombre, descripcion, permiso, orden, id_seccion, identificador) VALUES ('Asignar Valores', 'Asigna valores a atributos de un producto.', '0','1', @id_sec_cat,'asignarValores'); DELETE FROM `gen_subsecciones` WHERE nombre = 'Almacenes'; INSERT INTO `gen_subsecciones` (nombre, descripcion, permiso, orden, id_seccion, identificador) VALUES ('Almacenes', 'Gestión de Almacenes.', '0', '1', @id_sec_inv, 'mostrarAlmacenes'); DELETE FROM `gen_subsecciones` WHERE nombre = 'Secciones'; INSERT INTO `gen_subsecciones` (nombre, descripcion, permiso, orden, id_seccion, identificador) VALUES ('Secciones', 'Gestión de Secciones.', '0', '1', @id_sec_inv, 'mostrarSecciones'); DELETE FROM `gen_subsecciones` WHERE nombre = 'Pasillos'; INSERT INTO `gen_subsecciones` (nombre, descripcion, permiso, orden, id_seccion, identificador) VALUES ('Pasillos', 'Gestión de Pasillos.', '0', '1', @id_sec_inv, 'mostrarPasillos'); DELETE FROM `gen_subsecciones` WHERE nombre = 'Crear Transferencia'; INSERT INTO `gen_subsecciones` (nombre, descripcion, permiso, orden, id_seccion, identificador) VALUES ('Crear Transferencia', 'Formulario para crear una transferencia.', '0', '1', @id_sec_tra, 'crearTransferencia'); DELETE FROM `gen_subsecciones` WHERE nombre = 'Informe Productos'; INSERT INTO `gen_subsecciones` (nombre, descripcion, permiso, orden, id_seccion, identificador) VALUES ('Informe Productos', 'Muestra un informe de productos', '0', '1', @id_sec_inf, 'informeProductos'); -- Tipos producto INSERT INTO `inv_tipos_productos` ( `tipo`, `descripcion`) VALUES ( 'Comprable', 'Puede ser comprado a proveedores.'); INSERT INTO `inv_tipos_productos` ( `tipo`, `descripcion`) VALUES ('Vendible' , 'El producto puede ser vendido a clientes.'); INSERT INTO `inv_tipos_productos` ( `tipo`, `descripcion`) VALUES ( 'Comprable/Vendible', 'El producto puede ser comprado a proveedores y vendido a clientes.'); INSERT INTO `inv_almacenes` (`id_almacen`, `nombre`, `cantProSec`) VALUES (1, 'Hardware', 0), (2, 'Software', 0); INSERT INTO `inv_almsec` (`id_almsec`, `id_almacen`, `id_seccion`) VALUES (1, 1, 1), (2, 1, 2), (3, 1, 3), (4, 2, 4), (5, 2, 5); INSERT INTO `inv_atributos` (`id_atributo`, `nombre`, `descripcion`) VALUES (1, 'Color', '...'), (2, 'Tamaño', '...'), (3, 'Peso', '...'), (4, 'Altura', '....'); INSERT INTO `inv_catatr` (`id_catatr`, `id_categoria`, `id_atributo`) VALUES (1, 1, 1), (2, 1, 2), (3, 2, 3), (4, 3, 4); INSERT INTO `inv_categorias` (`id_categoria`, `nombre`) VALUES (1, 'categoria1'), (2, 'Categoria2'), (3, 'Categoria3'); INSERT INTO `inv_estadotransferencias` (`id_estado`, `estado`) VALUES (1, 'Solicitud'), (2, 'Preparación'), (3, 'Tramitado'); INSERT INTO `inv_invalm` (`id_invalm`, `id_inventario`, `id_almacen`) VALUES (1, 1, 1), (2, 1, 2); INSERT INTO `inv_inventarios` (`id_inventario`, `nombre`) VALUES (1, 'PCGames'); INSERT INTO `inv_pasillos` (`id_pasillo`, `nombre`, `cantPro`) VALUES (1, 'Pas1', 0), (2, 'Pas2', 0), (3, 'Pas3', 0), (4, 'Pas1', 0), (5, 'Pas2', 0); INSERT INTO `inv_productos` (`id_producto`, `nombre`, `descripcion`, `fecha_alta`, `fecha_baja`, `imagen`, `cod_barras`, `precio`, `coste`, `peso`, `volumen`, `id_categoria`, `id_tipo_producto`) VALUES (1, 'Windows 7', '123', '2018-03-03', '0000-00-00', '', '123', 123, 123, 123, 123, 1, 2), (2, 'BenQ 21.5', '123', '2018-03-03', '0000-00-00', '', '123', 123, 123, 123, 123, 2, 3); INSERT INTO `inv_propas` (`id_propas`, `id_producto`, `id_pasillo`, `cantidad`) VALUES (1, 1, 1, 5), (2, 2, 1, 5); INSERT INTO `inv_secciones` (`id_seccion`, `nombre`, `cantProPas`) VALUES (1, 'Pantalla', 0), (2, 'Teclados', 0), (3, 'Ratones', 0), (4, 'Antivirus', 0), (5, 'Sistema Operativo', 0); INSERT INTO `inv_secpas` (`id_secpas`, `id_seccion`, `id_pasillo`) VALUES (1, 1, 1), (2, 2, 2), (3, 3, 3), (4, 4, 4), (5, 5, 5);
IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Requests') BEGIN CREATE TABLE Requests ( SenderId UNIQUEIDENTIFIER NOT NULL, ReceiverId UNIQUEIDENTIFIER NOT NULL, SentDate DATETIME NOT NULL, RequestTypeId TINYINT NOT NULL, CONSTRAINT PK_Requests PRIMARY KEY (SenderId, ReceiverId, RequestTypeId), CONSTRAINT FK_Requests_RequestTypeId_RequestTypes_Id FOREIGN KEY (RequestTypeId) REFERENCES RequestTypes(Id) ); END
ALTER TABLE `match_recorder`.`matches` ADD COLUMN `match_date_time` DATETIME NOT NULL; ALTER TABLE `match_recorder`.`matches` CHANGE COLUMN `match_date_time` `match_date_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ;
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jul 25, 2018 at 05:38 AM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `db_perpustakaan` -- -- -------------------------------------------------------- -- -- Table structure for table `detil_pinjam` -- CREATE TABLE `detil_pinjam` ( `no_peminjaman` int(15) DEFAULT NULL, `no_copy` int(15) DEFAULT NULL, `jml_pinjam` int(15) DEFAULT NULL, `tgl_kbl` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `tb_anggota` -- CREATE TABLE `tb_anggota` ( `no_anggota` int(15) NOT NULL, `nama_anggota` varchar(30) DEFAULT NULL, `jabatan` varchar(10) DEFAULT NULL, `no_telp` varchar(15) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `tb_buku` -- CREATE TABLE `tb_buku` ( `no_buku` int(15) NOT NULL, `judul_buku` varchar(40) DEFAULT NULL, `pengarang` varchar(40) DEFAULT NULL, `penerbit` varchar(40) DEFAULT NULL, `thn_terbit` char(10) DEFAULT NULL, `thn_beli` char(10) DEFAULT NULL, `asal_buku` varchar(40) DEFAULT NULL, `eks` varchar(10) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `tb_copybuku` -- CREATE TABLE `tb_copybuku` ( `no_copy` int(15) NOT NULL, `no_buku` int(15) DEFAULT NULL, `status` enum('0','1','2') DEFAULT NULL COMMENT '0 ada, 1 dipinjam, 2 hilang' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `tb_ganti` -- CREATE TABLE `tb_ganti` ( `no_ganti` int(15) NOT NULL, `tgl_ganti` date DEFAULT NULL, `no_copy` int(15) DEFAULT NULL, `keterangan` varchar(50) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `tb_kunjungan` -- CREATE TABLE `tb_kunjungan` ( `no_kunjungan` varchar(20) NOT NULL, `no_anggota` int(15) DEFAULT NULL, `ket` varchar(20) DEFAULT NULL, `tanggal` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `tb_peminjaman` -- CREATE TABLE `tb_peminjaman` ( `no_peminjaman` int(15) NOT NULL, `no_anggota` int(15) DEFAULT NULL, `tgl_pinjam` date DEFAULT NULL, `tglhrs_kbl` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Indexes for dumped tables -- -- -- Indexes for table `detil_pinjam` -- ALTER TABLE `detil_pinjam` ADD KEY `no_copy` (`no_copy`), ADD KEY `no_peminjaman` (`no_peminjaman`); -- -- Indexes for table `tb_anggota` -- ALTER TABLE `tb_anggota` ADD PRIMARY KEY (`no_anggota`); -- -- Indexes for table `tb_buku` -- ALTER TABLE `tb_buku` ADD PRIMARY KEY (`no_buku`); -- -- Indexes for table `tb_copybuku` -- ALTER TABLE `tb_copybuku` ADD PRIMARY KEY (`no_copy`), ADD KEY `no_buku` (`no_buku`); -- -- Indexes for table `tb_ganti` -- ALTER TABLE `tb_ganti` ADD PRIMARY KEY (`no_ganti`), ADD KEY `no_copy` (`no_copy`); -- -- Indexes for table `tb_kunjungan` -- ALTER TABLE `tb_kunjungan` ADD PRIMARY KEY (`no_kunjungan`), ADD KEY `no_anggota` (`no_anggota`); -- -- Indexes for table `tb_peminjaman` -- ALTER TABLE `tb_peminjaman` ADD PRIMARY KEY (`no_peminjaman`), ADD KEY `no_anggota` (`no_anggota`); -- -- Constraints for dumped tables -- -- -- Constraints for table `detil_pinjam` -- ALTER TABLE `detil_pinjam` ADD CONSTRAINT `detil_pinjam_ibfk_1` FOREIGN KEY (`no_copy`) REFERENCES `tb_copybuku` (`no_copy`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `detil_pinjam_ibfk_2` FOREIGN KEY (`no_peminjaman`) REFERENCES `tb_peminjaman` (`no_peminjaman`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `tb_copybuku` -- ALTER TABLE `tb_copybuku` ADD CONSTRAINT `tb_copybuku_ibfk_1` FOREIGN KEY (`no_buku`) REFERENCES `tb_buku` (`no_buku`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `tb_ganti` -- ALTER TABLE `tb_ganti` ADD CONSTRAINT `tb_ganti_ibfk_1` FOREIGN KEY (`no_copy`) REFERENCES `tb_copybuku` (`no_copy`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `tb_kunjungan` -- ALTER TABLE `tb_kunjungan` ADD CONSTRAINT `tb_kunjungan_ibfk_1` FOREIGN KEY (`no_anggota`) REFERENCES `tb_anggota` (`no_anggota`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `tb_peminjaman` -- ALTER TABLE `tb_peminjaman` ADD CONSTRAINT `tb_peminjaman_ibfk_1` FOREIGN KEY (`no_anggota`) REFERENCES `tb_anggota` (`no_anggota`) 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 */;
UPDATE titles SET dock = ? WHERE id = ?
--Tarefa1-- create table Governadores( IDGovernador int IDENTITY, Nome varchar(200) NOT NULL, CidadeNatal varchar(50) NOT NULL, DataNascimento datetime NOT NULL, InicioMandato datetime NOT NULL, FimMandato datetime NOT NULL, constraint PK_IDGovernador Primary Key (IDGovernador)); insert into Governadores (Nome, CidadeNatal, DataNascimento, InicioMandato, FimMandato) values ('João Carlos de Saldanha Oliveira e Daun', 'Lisboa', convert(datetime, '17/11/1770', 103), convert(datetime, '22/02/1822', 103), convert(datetime, '29/08/1822', 103)); insert into Governadores (Nome, CidadeNatal, DataNascimento, InicioMandato, FimMandato) values ('João de Deus Mena Barreto, visconde de São Gabriel', 'Rio Pardo', convert(datetime, '02/07/1769', 103), convert(datetime, '29/08/1822', 103), convert(datetime, '29/11/1823', 103)); --data fictícia 07/02/1773-- insert into Governadores (Nome, CidadeNatal, DataNascimento, InicioMandato, FimMandato) values ('José Inácio da Silva', 'Desconhecida', convert(datetime, '07/02/1773', 103), convert(datetime, '29/11/1823', 103), convert(datetime, '08/03/1824', 103)); insert into Governadores (Nome, CidadeNatal, DataNascimento, InicioMandato, FimMandato) values ('José Feliciano Fernandes Pinheiro', 'Santos', convert(datetime, '09/05/1774', 103), convert(datetime, '08/03/1824', 103), convert(datetime, '14/01/1826', 103)); insert into Governadores (Nome, CidadeNatal, DataNascimento, InicioMandato, FimMandato) values ('José Egídio Gordilho de Barbuda', 'Chamusca', convert(datetime, '01/08/1787', 103), convert(datetime, '14/01/1826', 103), convert(datetime, '04/11/1826', 103)); select * from Governadores; select Nome, DATEDIFF(year, DataNascimento, InicioMandato) as Idade_Inicio_Mandato, DATEDIFF(month, InicioMandato, FimMandato) as Tempo_Mandato from Governadores;
SET group_concat_max_len=10240000000; Select startype_1, centile(0.01,GROUP_CONCAT(follower_num ORDER BY follower_num SEPARATOR ',')) as quartile_01, centile(0.05,GROUP_CONCAT(follower_num ORDER BY follower_num SEPARATOR ',')) as quartile_05, centile(0.10,GROUP_CONCAT(follower_num ORDER BY follower_num SEPARATOR ',')) as quartile_10, centile(0.25,GROUP_CONCAT(follower_num ORDER BY follower_num SEPARATOR ',')) as quartile_25, centile(0.50,GROUP_CONCAT(follower_num ORDER BY follower_num SEPARATOR ',')) as quartile_50, centile(0.75,GROUP_CONCAT(follower_num ORDER BY follower_num SEPARATOR ',')) as quartile_75, centile(0.90,GROUP_CONCAT(follower_num ORDER BY follower_num SEPARATOR ',')) as quartile_90, centile(0.95,GROUP_CONCAT(follower_num ORDER BY follower_num SEPARATOR ',')) as quartile_95, centile(0.99,GROUP_CONCAT(follower_num ORDER BY follower_num SEPARATOR ',')) as quartile_99 FROM feature_table where follower_num is not null group by startype_1
DROP TABLE if EXISTS user_lab; CREATE TABLE user_lab ( username VARCHAR (55) PRIMARY KEY, name VARCHAR (255), second_name VARCHAR (255), email VARCHAR (100) );
DROP DATABASE IF EXISTS kriekon; CREATE DATABASE kriekon; USE kriekon; CREATE TABLE users ( user_id INT PRIMARY KEY AUTO_INCREMENT, user_first VARCHAR(45) NULL, user_last VARCHAR(45) NULL, user_email VARCHAR(255) NOT NULL, user_DOB DATE NOT NULL, user_username VARCHAR(45) NOT NULL, user_password VARCHAR(255) NOT NULL, user_regTime DATETIME NOT NULL, user_timezone VARCHAR(120) NULL, user_loginTime DATETIME NULL, user_ip_address VARCHAR(120) NULL, user_avatar VARCHAR(255) NULL, logged_in INT DEFAULT 0 ); CREATE TABLE steamdata ( userid INT PRIMARY KEY NOT NULL, steamid VARCHAR(255) DEFAULT NULL, personaname VARCHAR(255) DEFAULT NULL, profileurl VARCHAR(255) DEFAULT NULL, avatarfull varchar(255) DEFAULT NULL, timecreated VARCHAR(255) DEFAULT NULL, loccountrycode VARCHAR(255) DEFAULT NULL, CONSTRAINT steamdata_userid_fk_user_user_id FOREIGN KEY(userid) REFERENCES users(user_id) ); CREATE TABLE permissions ( permission_id INT PRIMARY KEY AUTO_INCREMENT, permission_name VARCHAR(120) NOT NULL ); CREATE TABLE tags ( tag_id INT PRIMARY KEY AUTO_INCREMENT, tag_name VARCHAR(120) NOT NULL ); CREATE TABLE tag_permissions ( tag_permission_id INT PRIMARY KEY AUTO_INCREMENT, tag_id INT NOT NULL, permission_id INT NOT NULL, CONSTRAINT tag_perm_tag_id_fk FOREIGN KEY (tag_id) REFERENCES tags(tag_id), CONSTRAINT tag_perm_perm_id_fk FOREIGN KEY (permission_id) REFERENCES permissions(permission_id) ); CREATE TABLE tag_user ( tag_user_id INT PRIMARY KEY AUTO_INCREMENT, tag_id INT NOT NULL, user_id INT NOT NULL, CONSTRAINT tag_user_tag_id_fk FOREIGN KEY (tag_id) REFERENCES tags(tag_id), CONSTRAINT tag_user_user_id_fk FOREIGN KEY (user_id) REFERENCES users(user_id) ); CREATE TABLE permission_user ( permission_user_id INT PRIMARY KEY AUTO_INCREMENT, permission_id INT NOT NULL, user_id INT NOT NULL, CONSTRAINT permission_user_perm_id_fk FOREIGN KEY (permission_id) REFERENCES permissions(permission_id), CONSTRAINT permission_user_user_id_fk FOREIGN KEY (user_id) REFERENCES users(user_id) ); CREATE TABLE banned_users ( banned_user_id INT PRIMARY KEY AUTO_INCREMENT, user_id INT NOT NULL, banned_reason VARCHAR(120) NOT NULL, banned_time DATETIME NOT NULL, CONSTRAINT banned_users_fk FOREIGN KEY (user_id) REFERENCES users(user_id) ); CREATE TABLE forum ( forum_id INT PRIMARY KEY AUTO_INCREMENT, forum_name VARCHAR(40) NOT NULL ); CREATE TABLE forum_category ( category_id INT PRIMARY KEY AUTO_INCREMENT, forum_id INT NOT NULL, category_name VARCHAR(120) NOT NULL, category_description VARCHAR(120) NULL, CONSTRAINT forum_category_fk FOREIGN KEY(forum_id) REFERENCES forum(forum_id) ); CREATE TABLE forum_thread ( thread_id INT PRIMARY KEY AUTO_INCREMENT, category_id INT NOT NULL, user_id INT NOT NULL, thread_author VARCHAR(45) NOT NULL, thread_subject VARCHAR(80) NOT NULL, thread_description VARCHAR(120) NULL, thread_content LONGTEXT NOT NULL, thread_date DATETIME NOT NULL, thread_modTime DATETIME NULL, CONSTRAINT forum_thread_user_id_fk FOREIGN KEY(user_id) REFERENCES users(user_id), CONSTRAINT forum_thread_category_fk FOREIGN KEY(category_id) REFERENCES forum_category(category_id) ); CREATE TABLE forum_replies ( reply_id INT PRIMARY KEY AUTO_INCREMENT, thread_id INT NOT NULL, user_id INT NOT NULL, reply_parent_id INT DEFAULT 0, reply_author VARCHAR(45) NOT NULL, reply_content VARCHAR(250) NOT NULL, reply_date DATETIME NOT NULL, reply_modTime DATETIME NULL, reply_upvotes INT DEFAULT 0, reply_downvotes INT DEFAULT 0, CONSTRAINT forum_replies_threads_fk FOREIGN KEY(thread_id) REFERENCES forum_thread(thread_id), CONSTRAINT forum_replies_user_fk FOREIGN KEY(user_id) REFERENCES users(user_id) ); CREATE TABLE forum_upvote_downvote ( upvote_downvote_id INT PRIMARY KEY AUTO_INCREMENT, user_id INT NOT NULL, thread_id INT NULL, reply_id INT NULL, upvote_downvote_time DATETIME NOT NULL, upvoted TINYINT DEFAULT 0, downvoted TINYINT DEFAULT 0, CONSTRAINT like_dislike_user_id_fk FOREIGN KEY(user_id) REFERENCES users(user_id), CONSTRAINT like_dislike_thread_id_fk FOREIGN KEY(thread_id) REFERENCES forum_thread(thread_id), CONSTRAINT like_dislike_reply_id_fk FOREIGN KEY(reply_id) REFERENCES forum_replies(reply_id) ); CREATE TABLE article_system ( article_system_id INT PRIMARY KEY AUTO_INCREMENT, article_system_name VARCHAR(45) UNIQUE KEY NOT NULL ); CREATE TABLE article_supercategory ( article_superCat_id INT PRIMARY KEY AUTO_INCREMENT, article_system_id INT NOT NULL, article_superCat_name VARCHAR(45) NOT NULL, article_superCat_description VARCHAR(80) NOT NULL, CONSTRAINT article_superCategory_article_system_fk FOREIGN KEY(article_system_id) REFERENCES article_system(article_system_id) ); CREATE TABLE article_tags #Creating Tags to Group Articles By. Also has a trending column, front end will be something difficult but if 1 will be considered trending. If 0 Not Trending. Trending Date is there to gauge when it was marked as trending. ( tag_id INT PRIMARY KEY AUTO_INCREMENT, tag_name VARCHAR(45) UNIQUE KEY NOT NULL, trending TINYINT DEFAULT 0, trending_date DATETIME NULL ); CREATE TABLE articles ( article_id INT PRIMARY KEY AUTO_INCREMENT, user_id INT NOT NULL, article_superCat_id INT NOT NULL, article_title VARCHAR(45) NOT NULL, article_date DATETIME NOT NULL, article_author VARCHAR(45) NOT NULL, article_content LONGTEXT NOT NULL, article_modTime DATETIME NULL, article_modName VARCHAR(45) NULL, upvotes SMALLINT DEFAULT 0, downvotes SMALLINT DEFAULT 0, #frequency INT DEFAULT 0, #confidence INT DEFAULT 0, #score INT DEFAULT 0, featured SMALLINT DEFAULT 0, CONSTRAINT article_author_fk FOREIGN KEY(user_id) REFERENCES users(user_id), CONSTRAINT article_superCat_id_fk FOREIGN KEY(article_superCat_id) REFERENCES article_superCategory(article_superCat_id) ); CREATE TABLE article_tag_link ( tag_link_id INT PRIMARY KEY AUTO_INCREMENT, tag_id INT NOT NULL, article_id INT NOT NULL, CONSTRAINT tag_link_tag_id_fk FOREIGN KEY(tag_id) REFERENCES article_tags(tag_id), CONSTRAINT tag_link_article_id_fk FOREIGN KEY(article_id) REFERENCES articles(article_id) ); CREATE TABLE article_comments ( comment_id INT PRIMARY KEY AUTO_INCREMENT, article_id INT NOT NULL, user_id INT NOT NULL, comment_author VARCHAR(45) NOT NULL, comment_date DATETIME NOT NULL, comment_content VARCHAR(200) NOT NULL, comment_modTime DATETIME NULL, comment_modName DATETIME NULL, CONSTRAINT article_comments_fk FOREIGN KEY(article_id) REFERENCES articles(article_id), CONSTRAINT comments_author_fk FOREIGN KEY(user_id) REFERENCES users(user_id) ); CREATE TABLE article_upvote_downvote ( article_upvote_downvote_id INT PRIMARY KEY AUTO_INCREMENT, article_id INT NOT NULL, user_id INT NOT NULL, upvote_downvote_time DATETIME NOT NULL, upvoted TINYINT DEFAULT 0, downvoted TINYINT DEFAULT 0, CONSTRAINT article_trending_system_article_id_fk FOREIGN KEY(article_id) REFERENCES articles(article_id), CONSTRAINT article_trending_system_user_id_fk FOREIGN KEY(user_id) REFERENCES users(user_id) ); CREATE TABLE article_images #Just starting to theorize how we are going to do this with the MVC framework. ( uploads_id INT PRIMARY KEY AUTO_INCREMENT, article_id INT NULL, image_path VARCHAR(255) NULL, image_size VARCHAR(40) NULL, CONSTRAINT article_images_article_id_fk FOREIGN KEY(article_id) REFERENCES articles(article_id) ); CREATE TABLE user_avatars ( user_avatars_id INT PRIMARY KEY AUTO_INCREMENT, user_id INT NULL, avatar_path VARCHAR(255) NULL, image_size VARCHAR(20) NULL, CONSTRAINT user_avatars_user_id_fk FOREIGN KEY(user_id) REFERENCES users(user_id) ); DELIMITER // CREATE FUNCTION getUpvotes(param_thread_id INT) RETURNS INT BEGIN DECLARE upvotes INT; SELECT SUM(upvoted) INTO upvotes FROM forum_upvote_downvote WHERE thread_id = param_thread_id; RETURN upvotes; END // DELIMITER ; DELIMITER // CREATE FUNCTION getDownvotes(param_thread_id INT) RETURNS INT BEGIN DECLARE downvotes INT; SELECT SUM(downvoted) INTO downvotes FROM forum_upvote_downvote WHERE thread_id = param_thread_id; RETURN downvotes; END // DELIMITER ; INSERT INTO article_system(article_system_id, article_system_name) VALUES (1, 'Kriekon'); INSERT INTO forum(forum_id, forum_name) VALUES (1, 'Kriekon'); INSERT INTO permissions (permission_name) VALUES ('can_change_avatar'), ('can_create_forum_thread'), ('can_delete_forum_thread'), ('can_modify_forum_thread'), ('can_reply'), ('can_dislike_forum_thread'), ('can_like_forum_thread'), ('can_delete_own_forum_thread'), ('can_edit_own_reply'), ('can_edit_own_thread'), ('can_view_threads'), ('can_view_dashboard'), ('can_approve_articles'), ('can_approve_article_edits'), ('can_approve_article_deletion'), ('can_submit_article'), ('can_submit_article_edit'), ('can_submit_article_deletion'), ('can_delete_article'), ('can_create_article'), ('can_edit_article'), ('can_upload_article_image'), ('can_comment_articles'), ('can_view_articles'), ('can_edit_own_dev_blog'), ('can_delete_own_dev_blog'), ('can_delete_dev_blog'), ('can_edit_dev_blog'), ('can_submit_new_dev_blog'), ('can_comment_on_dev_blog'), ('can_create_tracker_entry'), ('can_delete_tracker_entry'), ('can_update_tracker_entry'), ('can_view_dev_blog'), ('can_add_new_bbcode'), ('can_modify_bbcode'), ('can_view_bbcode'), ('can_delete_bbcode'), ('can_delete_user'), ('can_modify_user'), ('can_modify_admin'), ('is_super_admin'), ('can_manage_forums'), ('can_manage_articles'), ('can_site_maintenance'); INSERT INTO tags (tag_name) VALUES ('Admin'), ('Web Developer'), ('Developer'), ('Moderator'), ('Editor'), ('Writer'), ('Member'), ('Guest'); INSERT INTO tag_permissions (tag_id, permission_id) VALUES (1,1), (1,2), (1,3), (1,4), (1,5), (1,6), (1,7), (1,8), (1,9), (1,10), (1,11), (1,12), (1,13), (1,14), (1,15), (1,19), (1,20), (1,21), (1,22), (1,23), (1,24), (1,25), (1,26), (1,27), (1,28), (1,29), (1,30), (1,31), (1,32), (1,33), (1,34), (1,35), (1,36), (1,37), (1,38), (1,39), (1,40), (1,41), (1,42), (2,1), (2,2), (2,4), (2,5), (2,6), (2,7), (2,8), (2,9), (2,10), (2,11), (2,12), (2,23), (2,24), (2,25), (2,26), (2,29), (2,30), (2,31), (2,32), (2,33), (2,34), (2,35), (2,36), (2,37), (2,38), (3,1), (3,2), (3,4), (3,5), (3,6), (3,7), (3,8), (3,9), (3,10), (3,11), (3,12), (3,23), (3,24), (3,25), (3,26), (3,29), (3,30), (3,31), (3,32), (3,33), (3,34), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6), (4,7), (4,8), (4,9), (4,10), (4,11), (4,12), (4,23), (4,24), (4,30), (4,34), (5,1), (5,2), (5,4), (5,5), (5,6), (5,7), (5,8), (5,9), (5,10), (5,11), (5,12), (5,13), (5,14), (5,15), (5,19), (5,20), (5,21), (5,22), (5,23), (5,24), (5,30), (5,34), (6,1), (6,2), (6,4), (6,5), (6,6), (6,7), (6,8), (6,9), (6,10), (6,11), (6,12), (6,16), (6,17), (6,18), (6,22), (6,23), (6,24), (6,30), (6,34), (7,1), (7,2), (7,4), (7,5), (7,6), (7,7), (7,8), (7,9), (7,10), (7,11), (7,23), (7,24), (7,30), (7,24), (8,11), (8,24);
/* ** Question: https://leetcode.com/problems/user-activity-for-the-past-30-days-i/ */ -- method 1, MS SQL SELECT a.activity_date AS day, COUNT(DISTINCT a.user_id) AS active_users FROM Activity a WHERE DATEDIFF(dd, a.activity_date, CAST('2019-07-27' AS DATE)) < 30 GROUP BY a.activity_date
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1 -- Время создания: Дек 30 2020 г., 21:01 -- Версия сервера: 10.4.14-MariaDB -- Версия PHP: 7.4.11 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 */; -- -- База данных: `whitelist` -- -- -------------------------------------------------------- -- -- Структура таблицы `books` -- CREATE TABLE `books` ( `BookID` int(11) NOT NULL, `Author` varchar(100) CHARACTER SET utf8 NOT NULL, `Title` varchar(100) CHARACTER SET utf8 NOT NULL, `Genre` varchar(30) CHARACTER SET utf8 NOT NULL, `Amount` int(20) NOT NULL, `Date` date NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Дамп данных таблицы `books` -- INSERT INTO `books` (`BookID`, `Author`, `Title`, `Genre`, `Amount`, `Date`) VALUES (30, 'Александр Пушкин', 'Евгений Онегин', 'Роман', 5, '2020-12-12'), (32, 'Лев Толстой', 'Война и Мир', 'Роман', 3, '2020-12-29'), (39, 'Эрих Ремарк', 'Триумфальная арка', 'Роман', 3, '2020-12-30'), (40, 'Стивен Кинг', 'Оно', 'Ужасы Роман', 2, '2020-12-12'), (41, 'Джек Лондон', 'Морской волк', 'Роман', 3, '2021-02-12'), (42, 'Шарлотта Бронте', 'Джейн Эйр', 'Роман', 2, '2020-12-12'), (43, 'Рэй Брэдбери', 'Вино из одуванчиков', 'Повесть', 1, '2021-02-12'), (44, 'Харуки Мураками', 'Норвежский лес', 'Роман', 2, '2020-12-30'), (45, 'Федор Достоевский', 'Преступление и наказание', 'Роман', 2, '2021-03-18'), (46, 'Маргарет Митчелл', 'Унесенные ветром', 'Роман', 4, '2021-02-23'), (47, 'Павел Санаев', 'Похороните меня за плинтусом', 'Автобиография Повесть', 1, '2020-12-29'), (48, 'Владислав Шпильман', 'Пианист', 'Биография', 1, '2021-02-23'), (49, 'Стивен Кинг', 'Ловец снов', 'Роман Ужасы', 2, '2020-12-30'); -- -------------------------------------------------------- -- -- Структура таблицы `comments` -- CREATE TABLE `comments` ( `id` int(11) NOT NULL, `book_id` int(11) NOT NULL, `body` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Дамп данных таблицы `comments` -- INSERT INTO `comments` (`id`, `book_id`, `body`) VALUES (39, 40, 'Подарочное издание '), (40, 40, 'Журнальные страницы '), (41, 40, 'Твердый переплет'), (42, 40, 'Золотое тиснение '), (43, 40, 'Бархатный форзац '), (44, 40, 'Ширина корешка - 50 см'), (45, 40, 'Формат - 142х90'), (46, 40, 'Наличие иллюстраций'), (47, 40, 'Супер обложка '), (48, 40, 'Оригинальный текст'), (57, 40, 'От издательства Абракадабра'); -- -- Индексы сохранённых таблиц -- -- -- Индексы таблицы `books` -- ALTER TABLE `books` ADD PRIMARY KEY (`BookID`); -- -- Индексы таблицы `comments` -- ALTER TABLE `comments` ADD PRIMARY KEY (`id`), ADD KEY `book_id` (`book_id`); -- -- AUTO_INCREMENT для сохранённых таблиц -- -- -- AUTO_INCREMENT для таблицы `books` -- ALTER TABLE `books` MODIFY `BookID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=50; -- -- AUTO_INCREMENT для таблицы `comments` -- ALTER TABLE `comments` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=58; -- -- Ограничения внешнего ключа сохраненных таблиц -- -- -- Ограничения внешнего ключа таблицы `comments` -- ALTER TABLE `comments` ADD CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`book_id`) REFERENCES `books` (`BookID`) 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 */;
tee all-mysql-db.log clear SOURCE script/common/mysql-functions.sql -- CREATE TABLES SOURCE script/common/mysql-common.sql SOURCE script/parameter/mysql-parameter.sql SOURCE script/security/mysql-security.sql SOURCE script/process/mysql-process.sql SOURCE script/transport/mysql-transport.sql SOURCE script/person/mysql-person.sql -- LOAD INITIAL DATA SOURCE script/common/data-common.sql SOURCE script/common/data-sequence.sql SOURCE script/parameter/data-parameter.sql SOURCE script/parameter/data-response.sql SOURCE script/security/data-security.sql SOURCE script/security/data-component.sql SOURCE script/process/data-process.sql SOURCE script/transport/data-transport.sql SOURCE script/person/data-person.sql -- CREATE PROCESS SOURCE script/common/process-common.sql SOURCE script/parameter/process-parameter.sql SOURCE script/security/process-security.sql SOURCE script/process/process-process.sql SOURCE script/transport/process-transport.sql SOURCE script/person/process-person.sql -- LOAD MODEL DATA SOURCE model/common/model-common.sql SOURCE model/parameter/model-parameter.sql SOURCE model/security/model-security.sql SOURCE model/process/model-process.sql SOURCE model/transport/model-transport.sql SOURCE model/person/model-person.sql -- DEFAULT ROLES SOURCE script/security/data-roles.sql notee
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 80019 Source Host : localhost:3306 Source Schema : hc-laravel-admin Target Server Type : MySQL Target Server Version : 80019 File Encoding : 65001 Date: 15/09/2020 15:37:50 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for admin_menu -- ---------------------------- DROP TABLE IF EXISTS `admin_menu`; CREATE TABLE `admin_menu` ( `id` int(0) UNSIGNED NOT NULL AUTO_INCREMENT, `parent_id` int(0) NOT NULL DEFAULT 0, `order` int(0) NOT NULL DEFAULT 0, `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `icon` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `uri` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, `permission` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, `created_at` timestamp(0) NULL DEFAULT NULL, `updated_at` timestamp(0) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of admin_menu -- ---------------------------- INSERT INTO `admin_menu` VALUES (1, 0, 1, 'Dashboard', 'fa-bar-chart', '/', NULL, NULL, NULL); INSERT INTO `admin_menu` VALUES (2, 0, 2, 'Admin', 'fa-tasks', '', NULL, NULL, NULL); INSERT INTO `admin_menu` VALUES (3, 2, 3, 'Users', 'fa-users', 'auth/users', NULL, NULL, NULL); INSERT INTO `admin_menu` VALUES (4, 2, 4, 'Roles', 'fa-user', 'auth/roles', NULL, NULL, NULL); INSERT INTO `admin_menu` VALUES (5, 2, 5, 'Permission', 'fa-ban', 'auth/permissions', NULL, NULL, NULL); INSERT INTO `admin_menu` VALUES (6, 2, 6, 'Menu', 'fa-bars', 'auth/menu', NULL, NULL, NULL); INSERT INTO `admin_menu` VALUES (7, 2, 7, 'Operation log', 'fa-history', 'auth/logs', NULL, NULL, NULL); -- ---------------------------- -- Table structure for admin_operation_log -- ---------------------------- DROP TABLE IF EXISTS `admin_operation_log`; CREATE TABLE `admin_operation_log` ( `id` int(0) UNSIGNED NOT NULL AUTO_INCREMENT, `user_id` int(0) NOT NULL, `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `input` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp(0) NULL DEFAULT NULL, `updated_at` timestamp(0) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, INDEX `admin_operation_log_user_id_index`(`user_id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 59 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of admin_operation_log -- ---------------------------- INSERT INTO `admin_operation_log` VALUES (1, 1, 'admin', 'GET', '127.0.0.1', '[]', '2020-04-23 10:24:12', '2020-04-23 10:24:12'); INSERT INTO `admin_operation_log` VALUES (2, 1, 'admin', 'GET', '127.0.0.1', '[]', '2020-04-24 01:00:51', '2020-04-24 01:00:51'); INSERT INTO `admin_operation_log` VALUES (3, 1, 'admin/auth/users', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-04-24 01:00:56', '2020-04-24 01:00:56'); INSERT INTO `admin_operation_log` VALUES (4, 1, 'admin', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-04-24 01:01:05', '2020-04-24 01:01:05'); INSERT INTO `admin_operation_log` VALUES (5, 1, 'admin', 'GET', '127.0.0.1', '[]', '2020-04-24 09:35:08', '2020-04-24 09:35:08'); INSERT INTO `admin_operation_log` VALUES (6, 1, 'admin', 'GET', '127.0.0.1', '[]', '2020-04-24 09:35:11', '2020-04-24 09:35:11'); INSERT INTO `admin_operation_log` VALUES (7, 1, 'admin', 'GET', '127.0.0.1', '[]', '2020-04-24 09:36:04', '2020-04-24 09:36:04'); INSERT INTO `admin_operation_log` VALUES (8, 1, 'admin', 'GET', '127.0.0.1', '[]', '2020-04-24 09:36:06', '2020-04-24 09:36:06'); INSERT INTO `admin_operation_log` VALUES (9, 1, 'admin/auth/users', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-04-24 09:36:30', '2020-04-24 09:36:30'); INSERT INTO `admin_operation_log` VALUES (10, 1, 'admin/auth/roles', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-04-24 09:36:30', '2020-04-24 09:36:30'); INSERT INTO `admin_operation_log` VALUES (11, 1, 'admin/auth/permissions', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-04-24 09:36:31', '2020-04-24 09:36:31'); INSERT INTO `admin_operation_log` VALUES (12, 1, 'admin/auth/menu', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-04-24 09:36:33', '2020-04-24 09:36:33'); INSERT INTO `admin_operation_log` VALUES (13, 1, 'admin/auth/permissions', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-04-24 09:36:35', '2020-04-24 09:36:35'); INSERT INTO `admin_operation_log` VALUES (14, 1, 'admin/auth/roles', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-04-24 09:36:36', '2020-04-24 09:36:36'); INSERT INTO `admin_operation_log` VALUES (15, 1, 'admin/auth/users', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-04-24 09:36:36', '2020-04-24 09:36:36'); INSERT INTO `admin_operation_log` VALUES (16, 1, 'admin/auth/users', 'GET', '127.0.0.1', '[]', '2020-04-24 09:37:47', '2020-04-24 09:37:47'); INSERT INTO `admin_operation_log` VALUES (17, 1, 'admin/auth/users', 'GET', '127.0.0.1', '[]', '2020-04-24 09:37:50', '2020-04-24 09:37:50'); INSERT INTO `admin_operation_log` VALUES (18, 1, 'admin', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-04-24 09:37:52', '2020-04-24 09:37:52'); INSERT INTO `admin_operation_log` VALUES (19, 1, 'admin', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-04-24 09:37:53', '2020-04-24 09:37:53'); INSERT INTO `admin_operation_log` VALUES (20, 1, 'admin/auth/menu', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-04-24 09:38:05', '2020-04-24 09:38:05'); INSERT INTO `admin_operation_log` VALUES (21, 1, 'admin', 'GET', '127.0.0.1', '[]', '2020-04-24 09:45:54', '2020-04-24 09:45:54'); INSERT INTO `admin_operation_log` VALUES (22, 1, 'admin', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-04-24 09:45:58', '2020-04-24 09:45:58'); INSERT INTO `admin_operation_log` VALUES (23, 1, 'admin', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-04-24 09:46:02', '2020-04-24 09:46:02'); INSERT INTO `admin_operation_log` VALUES (24, 1, 'admin', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-04-24 09:50:47', '2020-04-24 09:50:47'); INSERT INTO `admin_operation_log` VALUES (25, 1, 'admin/auth/logout', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-04-24 09:51:35', '2020-04-24 09:51:35'); INSERT INTO `admin_operation_log` VALUES (26, 1, 'admin', 'GET', '127.0.0.1', '[]', '2020-04-24 09:51:47', '2020-04-24 09:51:47'); INSERT INTO `admin_operation_log` VALUES (27, 1, 'admin', 'GET', '127.0.0.1', '[]', '2020-05-27 02:13:24', '2020-05-27 02:13:24'); INSERT INTO `admin_operation_log` VALUES (28, 1, 'admin/auth/users', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-05-27 02:13:33', '2020-05-27 02:13:33'); INSERT INTO `admin_operation_log` VALUES (29, 1, 'admin/auth/users', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-05-27 02:13:34', '2020-05-27 02:13:34'); INSERT INTO `admin_operation_log` VALUES (30, 1, 'admin', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-05-27 02:13:39', '2020-05-27 02:13:39'); INSERT INTO `admin_operation_log` VALUES (31, 1, 'admin', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-05-27 02:13:39', '2020-05-27 02:13:39'); INSERT INTO `admin_operation_log` VALUES (32, 1, 'admin', 'GET', '127.0.0.1', '[]', '2020-05-27 02:19:42', '2020-05-27 02:19:42'); INSERT INTO `admin_operation_log` VALUES (33, 1, 'admin', 'GET', '127.0.0.1', '[]', '2020-05-27 02:20:54', '2020-05-27 02:20:54'); INSERT INTO `admin_operation_log` VALUES (34, 1, 'admin', 'GET', '127.0.0.1', '[]', '2020-05-27 03:17:46', '2020-05-27 03:17:46'); INSERT INTO `admin_operation_log` VALUES (35, 1, 'admin', 'GET', '127.0.0.1', '[]', '2020-09-14 02:45:09', '2020-09-14 02:45:09'); INSERT INTO `admin_operation_log` VALUES (36, 1, 'admin', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-09-14 02:45:18', '2020-09-14 02:45:18'); INSERT INTO `admin_operation_log` VALUES (37, 1, 'admin/auth/login', 'GET', '127.0.0.1', '[]', '2020-09-14 06:10:57', '2020-09-14 06:10:57'); INSERT INTO `admin_operation_log` VALUES (38, 1, 'admin', 'GET', '127.0.0.1', '[]', '2020-09-14 06:10:58', '2020-09-14 06:10:58'); INSERT INTO `admin_operation_log` VALUES (39, 1, 'admin', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-09-14 06:11:03', '2020-09-14 06:11:03'); INSERT INTO `admin_operation_log` VALUES (40, 1, 'admin/auth/users', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-09-14 06:11:04', '2020-09-14 06:11:04'); INSERT INTO `admin_operation_log` VALUES (41, 1, 'admin/auth/roles', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-09-14 06:11:04', '2020-09-14 06:11:04'); INSERT INTO `admin_operation_log` VALUES (42, 1, 'admin/auth/roles/1/edit', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-09-14 06:11:11', '2020-09-14 06:11:11'); INSERT INTO `admin_operation_log` VALUES (43, 1, 'admin/auth/users', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-09-14 06:11:31', '2020-09-14 06:11:31'); INSERT INTO `admin_operation_log` VALUES (44, 1, 'admin/auth/roles', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-09-14 06:11:32', '2020-09-14 06:11:32'); INSERT INTO `admin_operation_log` VALUES (45, 1, 'admin/auth/permissions', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-09-14 06:11:32', '2020-09-14 06:11:32'); INSERT INTO `admin_operation_log` VALUES (46, 1, 'admin/auth/menu', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-09-14 06:11:33', '2020-09-14 06:11:33'); INSERT INTO `admin_operation_log` VALUES (47, 1, 'admin/auth/menu', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-09-14 06:11:37', '2020-09-14 06:11:37'); INSERT INTO `admin_operation_log` VALUES (48, 1, 'admin/auth/permissions', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-09-14 06:11:46', '2020-09-14 06:11:46'); INSERT INTO `admin_operation_log` VALUES (49, 1, 'admin/auth/menu', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-09-14 06:11:48', '2020-09-14 06:11:48'); INSERT INTO `admin_operation_log` VALUES (50, 1, 'admin', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-09-14 06:11:49', '2020-09-14 06:11:49'); INSERT INTO `admin_operation_log` VALUES (51, 1, 'admin/auth/users', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-09-14 07:16:51', '2020-09-14 07:16:51'); INSERT INTO `admin_operation_log` VALUES (52, 1, 'admin/auth/users', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-09-14 07:16:52', '2020-09-14 07:16:52'); INSERT INTO `admin_operation_log` VALUES (53, 1, 'admin/auth/roles', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-09-14 07:16:52', '2020-09-14 07:16:52'); INSERT INTO `admin_operation_log` VALUES (54, 1, 'admin/auth/users/create', 'GET', '127.0.0.1', '{\"_pjax\":\"#pjax-container\"}', '2020-09-14 07:16:58', '2020-09-14 07:16:58'); INSERT INTO `admin_operation_log` VALUES (55, 1, 'admin/auth/users/create', 'GET', '127.0.0.1', '[]', '2020-09-14 07:31:58', '2020-09-14 07:31:58'); INSERT INTO `admin_operation_log` VALUES (56, 1, 'admin/auth/users/create', 'GET', '127.0.0.1', '[]', '2020-09-14 07:32:01', '2020-09-14 07:32:01'); INSERT INTO `admin_operation_log` VALUES (57, 1, 'admin/auth/users/create', 'GET', '127.0.0.1', '[]', '2020-09-14 07:32:03', '2020-09-14 07:32:03'); INSERT INTO `admin_operation_log` VALUES (58, 1, 'admin/auth/users', 'POST', '127.0.0.1', '{\"username\":\"1\",\"name\":\"1\",\"password\":\"1\",\"password_confirmation\":\"1\",\"roles\":[null],\"permissions\":[null],\"_token\":\"QRjnPaCpisObTRcP8ud9AzSPM6ETaLa80oQDLqWl\"}', '2020-09-14 07:32:41', '2020-09-14 07:32:41'); INSERT INTO `admin_operation_log` VALUES (59, 1, 'admin/auth/users', 'GET', '127.0.0.1', '[]', '2020-09-14 07:32:41', '2020-09-14 07:32:41'); -- ---------------------------- -- Table structure for admin_permissions -- ---------------------------- DROP TABLE IF EXISTS `admin_permissions`; CREATE TABLE `admin_permissions` ( `id` int(0) UNSIGNED NOT NULL AUTO_INCREMENT, `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `slug` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `http_method` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, `http_path` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL, `created_at` timestamp(0) NULL DEFAULT NULL, `updated_at` timestamp(0) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `admin_permissions_name_unique`(`name`) USING BTREE, UNIQUE INDEX `admin_permissions_slug_unique`(`slug`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of admin_permissions -- ---------------------------- INSERT INTO `admin_permissions` VALUES (1, 'All permission', '*', '', '*', NULL, NULL); INSERT INTO `admin_permissions` VALUES (2, 'Dashboard', 'dashboard', 'GET', '/', NULL, NULL); INSERT INTO `admin_permissions` VALUES (3, 'Login', 'auth.login', '', '/auth/login\r\n/auth/logout', NULL, NULL); INSERT INTO `admin_permissions` VALUES (4, 'User setting', 'auth.setting', 'GET,PUT', '/auth/setting', NULL, NULL); INSERT INTO `admin_permissions` VALUES (5, 'Auth management', 'auth.management', '', '/auth/roles\r\n/auth/permissions\r\n/auth/menu\r\n/auth/logs', NULL, NULL); -- ---------------------------- -- Table structure for admin_role_menu -- ---------------------------- DROP TABLE IF EXISTS `admin_role_menu`; CREATE TABLE `admin_role_menu` ( `role_id` int(0) NOT NULL, `menu_id` int(0) NOT NULL, `created_at` timestamp(0) NULL DEFAULT NULL, `updated_at` timestamp(0) NULL DEFAULT NULL, INDEX `admin_role_menu_role_id_menu_id_index`(`role_id`, `menu_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of admin_role_menu -- ---------------------------- INSERT INTO `admin_role_menu` VALUES (1, 2, NULL, NULL); -- ---------------------------- -- Table structure for admin_role_permissions -- ---------------------------- DROP TABLE IF EXISTS `admin_role_permissions`; CREATE TABLE `admin_role_permissions` ( `role_id` int(0) NOT NULL, `permission_id` int(0) NOT NULL, `created_at` timestamp(0) NULL DEFAULT NULL, `updated_at` timestamp(0) NULL DEFAULT NULL, INDEX `admin_role_permissions_role_id_permission_id_index`(`role_id`, `permission_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of admin_role_permissions -- ---------------------------- INSERT INTO `admin_role_permissions` VALUES (1, 1, NULL, NULL); -- ---------------------------- -- Table structure for admin_role_users -- ---------------------------- DROP TABLE IF EXISTS `admin_role_users`; CREATE TABLE `admin_role_users` ( `role_id` int(0) NOT NULL, `user_id` int(0) NOT NULL, `created_at` timestamp(0) NULL DEFAULT NULL, `updated_at` timestamp(0) NULL DEFAULT NULL, INDEX `admin_role_users_role_id_user_id_index`(`role_id`, `user_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of admin_role_users -- ---------------------------- INSERT INTO `admin_role_users` VALUES (1, 1, NULL, NULL); -- ---------------------------- -- Table structure for admin_roles -- ---------------------------- DROP TABLE IF EXISTS `admin_roles`; CREATE TABLE `admin_roles` ( `id` int(0) UNSIGNED NOT NULL AUTO_INCREMENT, `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `slug` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp(0) NULL DEFAULT NULL, `updated_at` timestamp(0) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `admin_roles_name_unique`(`name`) USING BTREE, UNIQUE INDEX `admin_roles_slug_unique`(`slug`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of admin_roles -- ---------------------------- INSERT INTO `admin_roles` VALUES (1, 'Administrator', 'administrator', '2020-04-23 10:15:26', '2020-04-23 10:15:26'); -- ---------------------------- -- Table structure for admin_user_permissions -- ---------------------------- DROP TABLE IF EXISTS `admin_user_permissions`; CREATE TABLE `admin_user_permissions` ( `user_id` int(0) NOT NULL, `permission_id` int(0) NOT NULL, `created_at` timestamp(0) NULL DEFAULT NULL, `updated_at` timestamp(0) NULL DEFAULT NULL, INDEX `admin_user_permissions_user_id_permission_id_index`(`user_id`, `permission_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for admin_users -- ---------------------------- DROP TABLE IF EXISTS `admin_users`; CREATE TABLE `admin_users` ( `id` int(0) UNSIGNED NOT NULL AUTO_INCREMENT, `username` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `password` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, `remember_token` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, `created_at` timestamp(0) NULL DEFAULT NULL, `updated_at` timestamp(0) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `admin_users_username_unique`(`username`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of admin_users -- ---------------------------- INSERT INTO `admin_users` VALUES (1, 'admin', '$2y$10$SBVpof2a76O.jm5yIIU9tuNYsmr2Pvwz9qcOVzGOc6XbPkVTMRORW', 'Administrator', NULL, '24QAgYoJpOuC4aBZg6UFOJnsVh70SL6pLeGaPr6qAmw3kyfGFo1TrOYTYOQ5', '2020-04-23 10:15:26', '2020-04-23 10:15:26'); INSERT INTO `admin_users` VALUES (2, '1', '$2y$10$SYpve6zH1djIqvzVnLKXPODWat/8yW7aBUn0RrcnQlLS9MdjDIRMa', '1', 'images/220x165_0_2013082200534749738.jpg', NULL, '2020-09-14 07:32:41', '2020-09-14 07:32:41'); -- ---------------------------- -- Table structure for articles -- ---------------------------- DROP TABLE IF EXISTS `articles`; CREATE TABLE `articles` ( `uid` int(0) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户id', `username` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户名称', `email` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户邮箱', `ipAddress` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'ip地址', `created_at` timestamp(0) NULL DEFAULT NULL, `updated_at` timestamp(0) NULL DEFAULT NULL, PRIMARY KEY (`uid`) USING BTREE, UNIQUE INDEX `articles_username_unique`(`username`) USING BTREE, UNIQUE INDEX `articles_email_unique`(`email`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 58 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of articles -- ---------------------------- INSERT INTO `articles` VALUES (1, 'Nolan Schiller4IMel', 'CwwFRIuTuX@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (2, 'Dr. Eveline Steuber Jr.IdKmn', 'zBrX9Qki8b@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (3, 'Virginia Hillbb2pj', 'DmtsSFxGUw@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (4, 'Allen RunteZNpfU', 'Cx5Buk1YmZ@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (5, 'Russell Fahey PhDLaGvK', 'dLk1Cfhbef@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (6, 'Prof. Remington MoorelnWRi', 'WoAUDnk37N@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (7, 'Mrs. Lizeth Auerp2kWJ', '8gDiZhrPB4@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (8, 'Mariah Kuvalisf13vO', 'D7LkubujHl@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (9, 'Dr. Lisa EmardCc5Ba', 'GGuE8FXLJQ@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (10, 'Dr. Salvador DibbertbW2Bk', '7twTicHVgv@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (11, 'Mr. Norris Schmidt Jr.72gps', 'MBG7r8AgqJ@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (12, 'Karina GutmannLIGrV', 'dIxKL2VoIk@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (13, 'Marley Barton6CSqf', 'FEgemz7vtr@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (14, 'Rodolfo GutmanngnZBM', 'rb3MtSHYJ5@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (15, 'Zena Farrell88tKr', 'YfaAp155MJ@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (16, 'Vilma Hettinger4Oq0X', 'jmaHXHX7n8@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (17, 'Nakia KohlerO1F4k', 'E6mcXWGaLK@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (18, 'Miss Esta Friesen PhDmw4Tn', 'xdTD31rba9@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (19, 'Murphy Hartmann DVMcexAE', 'nlPU5WCUWm@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (20, 'Kali DenesikmRVLS', '3Fj1nqmaG8@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (21, 'Dr. Brooke Kunze IIImPVBO', 'F6ie7LJ0MN@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (22, 'Eliza HerzogfQ6Sg', 'djNpjzx5T6@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (23, 'Nat Gloverq0v7y', 'HFFbbBnauF@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (24, 'Keith Reichel1DZ0i', 'RH2YbIo1xs@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (25, 'Mia KesslerqbjOK', 'GJpCLqhrRE@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (26, 'Mia RolfsoncaRMl', 'Mxl8TYyo6X@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (27, 'Juanita O\'ConnerEqEEe', '5a7e4qg03f@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (28, 'Callie Thielx0src', 'RqBCXSkPvp@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (29, 'Avis Jacobs6D3vl', 'LUTdD2DJYN@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (30, 'Emmalee MosciskizFVDV', 'Ci7YYci7QP@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (31, 'Sabryna KesslerKsH3e', 'kKUfnmj1Sp@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (32, 'Arnulfo PollichyR9nd', 'hgh9MdoBeC@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (33, 'Corene Rogahn I4t1Yd', 'JRAHMm8162@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (34, 'Daija Cormier VTGO5q', 'h0wlI9SVtG@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (35, 'Jarrell SchmelerNgIi0', 'zGwnrQBLbE@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (36, 'Dr. Terrance Grimes IIP4vlt', 'NHSD64Kjkq@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (37, 'Orlo RosenbaumIJJrl', 'jYWn15xark@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (38, 'Keyon Cormier IIIKm7Gb', 'zwU1LqQafk@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (39, 'Isaias Rodriguez IIp4v8B', 'fTqFWHTEFV@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (40, 'Salvador MuellerBdPHh', '5SIt8IOzyl@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (41, 'Dameon Breitenberg IVYO4aO', 'VApFbguLrM@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (42, 'Montana RogahnIGqQ6', 'CRVRPDwOsW@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (43, 'Prof. Carolyne Schmidt IIIOnYRa', 'OROL7fB4n4@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (44, 'Earnest WolfflmZgd', 'BV1eXFLMIZ@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (45, 'Eda Kerluke IIIHNTcn', 'x2gW6CKME1@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (46, 'Miss Leila Christiansenm34we', '2NcoTNbUsL@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (47, 'Anibal Mann MD4usON', 'SQa7IwyZAu@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (48, 'Prof. Trevion White46CAo', 'HjI8dMimQQ@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (49, 'Jason Macejkovicf6Dtx', 'T1jocaLrfN@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (50, 'Prof. Rashawn TowneG1k5u', '8B6LZT4bC8@baidu.com', '127.0.0.1', '2020-09-11 06:26:44', '2020-09-11 06:26:44'); INSERT INTO `articles` VALUES (51, 'aaa', 'aaa@baidu.com', '127.0.0.2', '2020-09-11 08:02:04', '2020-09-11 08:02:04'); INSERT INTO `articles` VALUES (54, 'aaa22', 'aaa22@baidu.com', '127.0.0.2', '2020-09-11 08:06:17', '2020-09-11 08:06:17'); INSERT INTO `articles` VALUES (57, 'aaa2231', 'aaa2231@baidu.com', '127.0.0.2', '2020-09-11 08:09:37', '2020-09-11 08:09:37'); INSERT INTO `articles` VALUES (58, 'aaa22311', 'aaa22311@baidu.com', '127.0.0.2', '2020-09-11 08:10:00', '2020-09-11 08:10:00'); -- ---------------------------- -- Table structure for failed_jobs -- ---------------------------- DROP TABLE IF EXISTS `failed_jobs`; CREATE TABLE `failed_jobs` ( `id` bigint(0) UNSIGNED NOT NULL AUTO_INCREMENT, `connection` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `queue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `exception` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `failed_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for migrations -- ---------------------------- DROP TABLE IF EXISTS `migrations`; CREATE TABLE `migrations` ( `id` int(0) UNSIGNED NOT NULL AUTO_INCREMENT, `migration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int(0) NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of migrations -- ---------------------------- INSERT INTO `migrations` VALUES (1, '2014_10_12_000000_create_users_table', 1); INSERT INTO `migrations` VALUES (2, '2014_10_12_100000_create_password_resets_table', 1); INSERT INTO `migrations` VALUES (3, '2016_01_04_173148_create_admin_tables', 1); INSERT INTO `migrations` VALUES (4, '2019_08_19_000000_create_failed_jobs_table', 1); INSERT INTO `migrations` VALUES (5, '2020_09_11_033424_create_articles_table', 2); -- ---------------------------- -- Table structure for password_resets -- ---------------------------- DROP TABLE IF EXISTS `password_resets`; CREATE TABLE `password_resets` ( `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp(0) NULL DEFAULT NULL, INDEX `password_resets_email_index`(`email`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for test -- ---------------------------- DROP TABLE IF EXISTS `test`; CREATE TABLE `test` ( `uid` int(0) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户id', `username` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户名称', `email` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户邮箱', `ipAddress` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'ip地址', `created_at` timestamp(0) NULL DEFAULT NULL, `updated_at` timestamp(0) NULL DEFAULT NULL, PRIMARY KEY (`uid`) USING BTREE, UNIQUE INDEX `articles_username_unique`(`username`) USING BTREE, UNIQUE INDEX `articles_email_unique`(`email`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 59 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for users -- ---------------------------- DROP TABLE IF EXISTS `users`; CREATE TABLE `users` ( `id` bigint(0) UNSIGNED NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `email_verified_at` timestamp(0) NULL DEFAULT NULL, `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `remember_token` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, `created_at` timestamp(0) NULL DEFAULT NULL, `updated_at` timestamp(0) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `users_email_unique`(`email`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; SET FOREIGN_KEY_CHECKS = 1;
CREATE TABLE be_users ( profile_pid int(11) unsigned default NULL, abstract text, abstract_content int(11) unsigned default NULL, KEY profile (profile_pid) ); CREATE TABLE tx_news_domain_model_news ( author_id int(11) unsigned default NULL, KEY author (author_id) );
INSERT INTO quotes (quote, author) VALUES ("RUN FORREST RUN!", "Forrest Gump");
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 08, 2019 at 05:47 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.1.33 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: `votingsystem` -- -- -------------------------------------------------------- -- -- Table structure for table `account` -- CREATE TABLE `account` ( `id` int(11) NOT NULL, `department_id` int(11) NOT NULL, `student_no` int(11) NOT NULL, `fullname` varchar(255) NOT NULL, `username` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, `previleges` enum('USER','ADMIN') NOT NULL DEFAULT 'USER' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `account` -- INSERT INTO `account` (`id`, `department_id`, `student_no`, `fullname`, `username`, `password`, `previleges`) VALUES (1, 1, 12345, 'John Jerome Luciano', 'jjdluciano', 'pogisiako123', 'ADMIN'), (3, 3, 12311, 'Rollaine Castillo', 'rainsky30', 'rainrain', 'USER'); -- -------------------------------------------------------- -- -- Table structure for table `election` -- CREATE TABLE `election` ( `id` int(11) NOT NULL, `department_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `status` enum('ACTIVE','INACTIVE') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `election` -- INSERT INTO `election` (`id`, `department_id`, `name`, `status`) VALUES (14, 3, 'SSC', 'INACTIVE'), (16, 2, 'Justice Organization', 'ACTIVE'), (17, 1, 'Testing', 'ACTIVE'), (18, 3, 'SSGO', 'ACTIVE'); -- -------------------------------------------------------- -- -- Table structure for table `vote` -- CREATE TABLE `vote` ( `id` int(11) NOT NULL, `election_id` int(11) NOT NULL, `account_id` int(11) NOT NULL, `is_voted` bit(1) NOT NULL DEFAULT b'1' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Indexes for dumped tables -- -- -- Indexes for table `account` -- ALTER TABLE `account` ADD PRIMARY KEY (`id`), ADD KEY `department_id` (`department_id`); -- -- Indexes for table `election` -- ALTER TABLE `election` ADD PRIMARY KEY (`id`), ADD KEY `department_id` (`department_id`); -- -- Indexes for table `vote` -- ALTER TABLE `vote` ADD PRIMARY KEY (`id`), ADD KEY `vote_ibfk_1` (`election_id`), ADD KEY `vote_ibfk_2` (`account_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `account` -- ALTER TABLE `account` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `election` -- ALTER TABLE `election` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19; -- -- AUTO_INCREMENT for table `vote` -- ALTER TABLE `vote` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- Constraints for dumped tables -- -- -- Constraints for table `account` -- ALTER TABLE `account` ADD CONSTRAINT `account_ibfk_1` FOREIGN KEY (`department_id`) REFERENCES `department` (`id`) ON DELETE CASCADE; -- -- Constraints for table `election` -- ALTER TABLE `election` ADD CONSTRAINT `election_ibfk_1` FOREIGN KEY (`department_id`) REFERENCES `department` (`id`) ON DELETE CASCADE; -- -- Constraints for table `vote` -- ALTER TABLE `vote` ADD CONSTRAINT `vote_ibfk_1` FOREIGN KEY (`election_id`) REFERENCES `election` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `vote_ibfk_2` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`) ON DELETE 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 */;
/** * * @author Alexey * @name groupsByLS * @public */ Select * From grp_lc_group t1 Where :lc_id = t1.lc_id
CREATE OR REPLACE PUBLIC SYNONYM test_pkg FOR orient.test_pkg;
/* Navicat MySQL Data Transfer Source Server : Proyecto Source Server Version : 50620 Source Host : localhost:3306 Source Database : tesis Target Server Type : MYSQL Target Server Version : 50620 File Encoding : 65001 Date: 2017-05-22 00:28:54 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for juego -- ---------------------------- DROP TABLE IF EXISTS `juego`; CREATE TABLE `juego` ( `id` int(11) NOT NULL AUTO_INCREMENT, `token` varchar(255) NOT NULL, `juego` int(11) NOT NULL, `id_user` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=127 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of juego -- ---------------------------- INSERT INTO `juego` VALUES ('1', '123', '0', '0'); INSERT INTO `juego` VALUES ('2', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('3', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('4', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('5', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('6', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('7', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('8', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('9', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('10', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('11', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('12', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('13', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('14', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('15', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('16', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('17', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('18', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('19', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('20', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('21', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('22', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('23', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('24', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('25', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('26', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('27', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('28', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('29', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('30', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('31', 'tuD4QKNETml8cQ==', '0', '0'); INSERT INTO `juego` VALUES ('32', '', '0', '0'); INSERT INTO `juego` VALUES ('33', '', '0', '0'); INSERT INTO `juego` VALUES ('34', 'pa28Q1HeOt1Ihw==', '0', '0'); INSERT INTO `juego` VALUES ('35', 'pa28Q1HeOt1Ihw==', '0', '0'); INSERT INTO `juego` VALUES ('36', 'pa28Q1HeOt1Ihw==', '0', '0'); INSERT INTO `juego` VALUES ('37', 'pa28Q1HeOt1Ihw==', '0', '0'); INSERT INTO `juego` VALUES ('38', 'pa28Q1HeOt1Ihw==', '0', '0'); INSERT INTO `juego` VALUES ('39', 'pa28Q1HeOt1Ihw==', '0', '0'); INSERT INTO `juego` VALUES ('40', 'pa28Q1HeOt1Ihw==', '0', '0'); INSERT INTO `juego` VALUES ('41', 'pa28Q1HeOt1Ihw==', '0', '0'); INSERT INTO `juego` VALUES ('42', 'pa28Q1HeOt1Ihw==', '0', '0'); INSERT INTO `juego` VALUES ('43', 'pa28Q1HeOt1Ihw==', '0', '0'); INSERT INTO `juego` VALUES ('44', 'pa28Q1HeOt1Ihw==', '0', '0'); INSERT INTO `juego` VALUES ('45', '42BdUyMYYr5h2w==', '0', '0'); INSERT INTO `juego` VALUES ('46', '42BdUyMYYr5h2w==', '0', '0'); INSERT INTO `juego` VALUES ('47', '42BdUyMYYr5h2w==', '0', '0'); INSERT INTO `juego` VALUES ('48', '42BdUyMYYr5h2w==', '0', '0'); INSERT INTO `juego` VALUES ('49', '42BdUyMYYr5h2w==', '0', '0'); INSERT INTO `juego` VALUES ('50', '42BdUyMYYr5h2w==', '0', '0'); INSERT INTO `juego` VALUES ('51', '42BdUyMYYr5h2w==', '0', '0'); INSERT INTO `juego` VALUES ('52', '42BdUyMYYr5h2w==', '0', '0'); INSERT INTO `juego` VALUES ('53', '42BdUyMYYr5h2w==', '3', '0'); INSERT INTO `juego` VALUES ('54', '42BdUyMYYr5h2w==', '0', '0'); INSERT INTO `juego` VALUES ('55', '42BdUyMYYr5h2w==', '0', '0'); INSERT INTO `juego` VALUES ('56', '42BdUyMYYr5h2w==', '3', '0'); INSERT INTO `juego` VALUES ('57', '42BdUyMYYr5h2w==', '3', '0'); INSERT INTO `juego` VALUES ('58', '42BdUyMYYr5h2w==', '3', '0'); INSERT INTO `juego` VALUES ('59', 'JcKacFP4gpim4A==', '1', '0'); INSERT INTO `juego` VALUES ('60', '/fdgN/UHC9f0hQ==', '2', '0'); INSERT INTO `juego` VALUES ('61', '', '2', '0'); INSERT INTO `juego` VALUES ('62', '', '3', '0'); INSERT INTO `juego` VALUES ('63', 'qB9R0fRZ7OUZ2A==', '1', '0'); INSERT INTO `juego` VALUES ('64', 'qB9R0fRZ7OUZ2A==', '2', '0'); INSERT INTO `juego` VALUES ('65', 'exuZKDvhlYDinQ==', '1', '0'); INSERT INTO `juego` VALUES ('66', 'exuZKDvhlYDinQ==', '2', '0'); INSERT INTO `juego` VALUES ('67', 'exuZKDvhlYDinQ==', '2', '0'); INSERT INTO `juego` VALUES ('68', '1y7yg4JJ3QKyaQ==', '2', '0'); INSERT INTO `juego` VALUES ('69', '1y7yg4JJ3QKyaQ==', '3', '0'); INSERT INTO `juego` VALUES ('70', '1y7yg4JJ3QKyaQ==', '3', '0'); INSERT INTO `juego` VALUES ('71', '1y7yg4JJ3QKyaQ==', '3', '0'); INSERT INTO `juego` VALUES ('72', '1y7yg4JJ3QKyaQ==', '3', '0'); INSERT INTO `juego` VALUES ('73', 'H7CYQHEVzq0S3Q==', '1', '0'); INSERT INTO `juego` VALUES ('74', 'H7CYQHEVzq0S3Q==', '2', '0'); INSERT INTO `juego` VALUES ('75', 'H7CYQHEVzq0S3Q==', '3', '0'); INSERT INTO `juego` VALUES ('76', 'WkDyRI3epA9soQ==', '1', '0'); INSERT INTO `juego` VALUES ('77', 'HhoISCr+9R9zUw==', '2', '0'); INSERT INTO `juego` VALUES ('78', '6b01XeZkGApr+Q==', '1', '0'); INSERT INTO `juego` VALUES ('79', 'HhoISCr+9R9zUw==', '2', '0'); INSERT INTO `juego` VALUES ('80', 'HhoISCr+9R9zUw==', '1', '0'); INSERT INTO `juego` VALUES ('81', 'HhoISCr+9R9zUw==', '3', '0'); INSERT INTO `juego` VALUES ('82', '6b01XeZkGApr+Q==', '2', '0'); INSERT INTO `juego` VALUES ('83', 'HhoISCr+9R9zUw==', '2', '0'); INSERT INTO `juego` VALUES ('84', 'HhoISCr+9R9zUw==', '2', '0'); INSERT INTO `juego` VALUES ('85', '6b01XeZkGApr+Q==', '3', '0'); INSERT INTO `juego` VALUES ('86', 'HhoISCr+9R9zUw==', '3', '0'); INSERT INTO `juego` VALUES ('87', 'WkDyRI3epA9soQ==', '2', '0'); INSERT INTO `juego` VALUES ('88', 'OAbOKuhy4sD/gQ==', '1', '0'); INSERT INTO `juego` VALUES ('89', 'OAbOKuhy4sD/gQ==', '2', '0'); INSERT INTO `juego` VALUES ('90', 'OAbOKuhy4sD/gQ==', '3', '0'); INSERT INTO `juego` VALUES ('91', 'OAbOKuhy4sD/gQ==', '3', '0'); INSERT INTO `juego` VALUES ('92', 'OAbOKuhy4sD/gQ==', '2', '0'); INSERT INTO `juego` VALUES ('93', 'OAbOKuhy4sD/gQ==', '1', '0'); INSERT INTO `juego` VALUES ('94', 'tLn7ur4QkwJWew==', '1', '0'); INSERT INTO `juego` VALUES ('95', 'tLn7ur4QkwJWew==', '2', '0'); INSERT INTO `juego` VALUES ('96', 'tLn7ur4QkwJWew==', '3', '0'); INSERT INTO `juego` VALUES ('97', '4oS/YZSGFvzl+g==', '2', '0'); INSERT INTO `juego` VALUES ('98', 'Oi5kBeXYqkZ3pw==', '1', '0'); INSERT INTO `juego` VALUES ('99', 'n17T1kWQjlgp6Q==', '2', '0'); INSERT INTO `juego` VALUES ('100', 'n17T1kWQjlgp6Q==', '3', '0'); INSERT INTO `juego` VALUES ('101', 'n17T1kWQjlgp6Q==', '1', '0'); INSERT INTO `juego` VALUES ('102', '4fjyKsnWVzdWWg==', '1', '0'); INSERT INTO `juego` VALUES ('103', '4fjyKsnWVzdWWg==', '1', '0'); INSERT INTO `juego` VALUES ('104', '4fjyKsnWVzdWWg==', '2', '0'); INSERT INTO `juego` VALUES ('105', '4fjyKsnWVzdWWg==', '2', '0'); INSERT INTO `juego` VALUES ('106', '4fjyKsnWVzdWWg==', '2', '0'); INSERT INTO `juego` VALUES ('107', '4fjyKsnWVzdWWg==', '3', '0'); INSERT INTO `juego` VALUES ('108', 'jZZ+vexsDgnJuA==', '1', '0'); INSERT INTO `juego` VALUES ('109', 'jZZ+vexsDgnJuA==', '2', '0'); INSERT INTO `juego` VALUES ('110', 'jZZ+vexsDgnJuA==', '3', '0'); INSERT INTO `juego` VALUES ('111', 'KZoIPY56eqrR/Q==', '1', '18'); INSERT INTO `juego` VALUES ('112', 'KZoIPY56eqrR/Q==', '2', '18'); INSERT INTO `juego` VALUES ('113', 'KZoIPY56eqrR/Q==', '2', '18'); INSERT INTO `juego` VALUES ('114', 'KZoIPY56eqrR/Q==', '3', '18'); INSERT INTO `juego` VALUES ('115', 'pNd8uSbgAI/MOw==', '2', '2'); INSERT INTO `juego` VALUES ('116', 'K0e6G4YHY95/Ew==', '1', '18'); INSERT INTO `juego` VALUES ('117', 'KZ39bFayGqadtw==', '2', '18'); INSERT INTO `juego` VALUES ('118', 'KZ39bFayGqadtw==', '1', '18'); INSERT INTO `juego` VALUES ('119', 'TGCNja35CDxP3Q==', '1', '2'); INSERT INTO `juego` VALUES ('120', 'TGCNja35CDxP3Q==', '2', '2'); INSERT INTO `juego` VALUES ('121', 'd3ZC1a8HcZILTg==', '1', '18'); INSERT INTO `juego` VALUES ('122', 'g+1iYmyWU5ZA/Q==', '3', '2'); INSERT INTO `juego` VALUES ('123', 'WWr6mFeKAgxlKA==', '1', '18'); INSERT INTO `juego` VALUES ('124', 'EmBlSh5YJ5FmSQ==', '1', '18'); INSERT INTO `juego` VALUES ('125', 'EmBlSh5YJ5FmSQ==', '1', '18'); INSERT INTO `juego` VALUES ('126', 'kj33oNt6wgESvQ==', '1', '18'); -- ---------------------------- -- Table structure for jugadas -- ---------------------------- DROP TABLE IF EXISTS `jugadas`; CREATE TABLE `jugadas` ( `id` int(11) NOT NULL AUTO_INCREMENT, `id_juego` int(11) NOT NULL, `juego` int(11) NOT NULL, `nivel` int(11) NOT NULL, `punto` int(1) NOT NULL, `token` varchar(255) NOT NULL, PRIMARY KEY (`id`), KEY `indeice` (`id_juego`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=815 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of jugadas -- ---------------------------- INSERT INTO `jugadas` VALUES ('1', '0', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('2', '28', '1', '1', '0', ''); INSERT INTO `jugadas` VALUES ('4', '28', '1', '1', '0', ''); INSERT INTO `jugadas` VALUES ('5', '28', '1', '1', '0', ''); INSERT INTO `jugadas` VALUES ('6', '29', '1', '1', '0', ''); INSERT INTO `jugadas` VALUES ('7', '30', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('8', '30', '1', '1', '0', ''); INSERT INTO `jugadas` VALUES ('9', '30', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('10', '30', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('11', '30', '1', '1', '0', ''); INSERT INTO `jugadas` VALUES ('12', '31', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('13', '31', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('14', '31', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('15', '31', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('16', '31', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('17', '32', '1', '1', '0', ''); INSERT INTO `jugadas` VALUES ('18', '32', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('19', '32', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('20', '32', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('21', '32', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('22', '0', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('23', '0', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('24', '0', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('25', '0', '1', '2', '0', ''); INSERT INTO `jugadas` VALUES ('26', '0', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('27', '34', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('28', '34', '1', '1', '0', ''); INSERT INTO `jugadas` VALUES ('29', '34', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('30', '34', '1', '1', '0', ''); INSERT INTO `jugadas` VALUES ('31', '34', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('32', '0', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('33', '0', '1', '2', '0', ''); INSERT INTO `jugadas` VALUES ('34', '0', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('35', '0', '1', '2', '0', ''); INSERT INTO `jugadas` VALUES ('36', '0', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('37', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('38', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('39', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('40', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('41', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('42', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('43', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('44', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('45', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('46', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('47', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('48', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('49', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('50', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('51', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('52', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('53', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('54', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('55', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('56', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('57', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('58', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('59', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('60', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('61', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('62', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('63', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('64', '35', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('65', '35', '1', '1', '0', ''); INSERT INTO `jugadas` VALUES ('66', '35', '1', '1', '0', ''); INSERT INTO `jugadas` VALUES ('67', '35', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('68', '35', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('69', '0', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('70', '0', '1', '2', '0', ''); INSERT INTO `jugadas` VALUES ('71', '0', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('72', '0', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('73', '0', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('74', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('75', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('76', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('77', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('78', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('79', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('80', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('81', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('82', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('83', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('84', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('85', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('86', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('87', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('88', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('89', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('90', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('91', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('92', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('93', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('94', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('95', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('96', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('97', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('98', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('99', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('100', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('101', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('102', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('103', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('104', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('105', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('106', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('107', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('108', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('109', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('110', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('111', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('112', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('113', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('114', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('115', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('116', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('117', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('118', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('119', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('120', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('121', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('122', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('123', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('124', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('125', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('126', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('127', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('128', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('129', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('130', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('131', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('132', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('133', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('134', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('135', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('136', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('137', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('138', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('139', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('140', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('141', '0', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('142', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('143', '0', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('144', '43', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('145', '43', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('146', '43', '1', '1', '0', ''); INSERT INTO `jugadas` VALUES ('147', '43', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('148', '43', '1', '1', '0', ''); INSERT INTO `jugadas` VALUES ('149', '43', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('150', '0', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('151', '44', '1', '1', '1', ''); INSERT INTO `jugadas` VALUES ('152', '44', '1', '1', '0', ''); INSERT INTO `jugadas` VALUES ('153', '44', '1', '1', '0', ''); INSERT INTO `jugadas` VALUES ('154', '44', '1', '1', '0', ''); INSERT INTO `jugadas` VALUES ('155', '44', '1', '1', '0', ''); INSERT INTO `jugadas` VALUES ('156', '44', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('157', '44', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('158', '44', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('159', '44', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('160', '44', '1', '2', '0', ''); INSERT INTO `jugadas` VALUES ('161', '44', '1', '2', '1', ''); INSERT INTO `jugadas` VALUES ('162', '44', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('163', '44', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('164', '44', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('165', '44', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('166', '44', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('167', '44', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('168', '44', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('169', '44', '1', '3', '1', ''); INSERT INTO `jugadas` VALUES ('170', '44', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('171', '44', '1', '3', '0', ''); INSERT INTO `jugadas` VALUES ('172', '44', '1', '3', '1', 'pa28Q1HeOt1Ihw=='); INSERT INTO `jugadas` VALUES ('173', '44', '1', '3', '0', 'pa28Q1HeOt1Ihw=='); INSERT INTO `jugadas` VALUES ('174', '44', '1', '3', '0', 'pa28Q1HeOt1Ihw=='); INSERT INTO `jugadas` VALUES ('175', '44', '1', '3', '0', 'pa28Q1HeOt1Ihw=='); INSERT INTO `jugadas` VALUES ('176', '44', '1', '3', '1', 'pa28Q1HeOt1Ihw=='); INSERT INTO `jugadas` VALUES ('177', '44', '1', '3', '1', 'pa28Q1HeOt1Ihw=='); INSERT INTO `jugadas` VALUES ('178', '44', '1', '3', '1', 'pa28Q1HeOt1Ihw=='); INSERT INTO `jugadas` VALUES ('179', '44', '1', '3', '1', 'pa28Q1HeOt1Ihw=='); INSERT INTO `jugadas` VALUES ('180', '44', '1', '3', '1', 'pa28Q1HeOt1Ihw=='); INSERT INTO `jugadas` VALUES ('181', '44', '1', '3', '1', 'pa28Q1HeOt1Ihw=='); INSERT INTO `jugadas` VALUES ('182', '63', '63', '1', '1', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('183', '63', '63', '1', '1', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('184', '63', '63', '1', '1', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('185', '63', '63', '1', '1', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('186', '63', '63', '1', '1', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('187', '63', '63', '1', '1', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('188', '63', '63', '1', '1', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('189', '63', '63', '1', '0', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('190', '63', '63', '1', '1', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('191', '63', '63', '1', '1', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('192', '63', '63', '1', '1', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('193', '63', '63', '1', '1', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('194', '63', '63', '1', '1', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('195', '63', '63', '1', '0', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('196', '63', '63', '1', '1', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('197', '63', '63', '1', '1', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('198', '63', '63', '1', '1', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('199', '63', '63', '1', '0', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('200', '63', '63', '1', '1', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('201', '63', '63', '1', '1', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('202', '64', '64', '1', '0', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('203', '64', '64', '1', '0', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('204', '64', '64', '1', '0', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('205', '64', '64', '1', '0', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('206', '64', '64', '1', '0', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('207', '64', '64', '1', '0', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('208', '64', '64', '1', '0', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('209', '64', '64', '1', '0', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('210', '64', '64', '1', '0', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('211', '64', '64', '1', '0', 'qB9R0fRZ7OUZ2A=='); INSERT INTO `jugadas` VALUES ('212', '64', '64', '1', '0', 'exuZKDvhlYDinQ=='); INSERT INTO `jugadas` VALUES ('213', '64', '64', '1', '0', 'exuZKDvhlYDinQ=='); INSERT INTO `jugadas` VALUES ('214', '64', '64', '1', '0', 'exuZKDvhlYDinQ=='); INSERT INTO `jugadas` VALUES ('215', '64', '64', '1', '0', 'exuZKDvhlYDinQ=='); INSERT INTO `jugadas` VALUES ('216', '64', '64', '1', '0', 'exuZKDvhlYDinQ=='); INSERT INTO `jugadas` VALUES ('217', '65', '65', '1', '1', 'exuZKDvhlYDinQ=='); INSERT INTO `jugadas` VALUES ('218', '66', '66', '1', '0', 'exuZKDvhlYDinQ=='); INSERT INTO `jugadas` VALUES ('219', '66', '66', '1', '0', 'exuZKDvhlYDinQ=='); INSERT INTO `jugadas` VALUES ('220', '66', '66', '1', '0', 'exuZKDvhlYDinQ=='); INSERT INTO `jugadas` VALUES ('221', '66', '66', '1', '0', 'exuZKDvhlYDinQ=='); INSERT INTO `jugadas` VALUES ('222', '66', '66', '1', '0', 'exuZKDvhlYDinQ=='); INSERT INTO `jugadas` VALUES ('223', '67', '67', '1', '0', 'exuZKDvhlYDinQ=='); INSERT INTO `jugadas` VALUES ('224', '67', '67', '1', '0', 'exuZKDvhlYDinQ=='); INSERT INTO `jugadas` VALUES ('225', '67', '67', '1', '0', 'exuZKDvhlYDinQ=='); INSERT INTO `jugadas` VALUES ('226', '67', '67', '1', '0', 'exuZKDvhlYDinQ=='); INSERT INTO `jugadas` VALUES ('227', '67', '67', '1', '0', 'exuZKDvhlYDinQ=='); INSERT INTO `jugadas` VALUES ('228', '68', '68', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('229', '68', '68', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('230', '68', '68', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('231', '68', '68', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('232', '68', '68', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('233', '68', '68', '2', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('234', '68', '68', '2', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('235', '68', '68', '2', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('236', '68', '68', '2', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('237', '68', '68', '2', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('238', '68', '68', '2', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('239', '68', '68', '2', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('240', '68', '68', '2', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('241', '68', '68', '2', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('242', '68', '68', '2', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('243', '68', '68', '3', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('244', '68', '68', '3', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('245', '68', '68', '3', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('246', '68', '68', '3', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('247', '68', '68', '3', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('248', '70', '70', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('249', '71', '71', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('250', '71', '71', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('251', '71', '71', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('252', '71', '71', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('253', '71', '71', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('254', '71', '71', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('255', '71', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('256', '71', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('257', '71', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('258', '71', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('259', '71', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('260', '71', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('261', '71', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('262', '71', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('263', '71', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('264', '71', '3', '2', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('265', '71', '3', '2', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('266', '71', '3', '2', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('267', '71', '3', '2', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('268', '71', '3', '2', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('269', '71', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('270', '71', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('271', '71', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('272', '71', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('273', '71', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('274', '71', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('275', '71', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('276', '71', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('277', '71', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('278', '71', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('279', '71', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('280', '71', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('281', '71', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('282', '71', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('283', '71', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('284', '71', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('285', '71', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('286', '71', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('287', '71', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('288', '71', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('289', '71', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('290', '71', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('291', '71', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('292', '71', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('293', '71', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('294', '72', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('295', '72', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('296', '72', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('297', '72', '3', '1', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('298', '72', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('299', '72', '3', '1', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('300', '72', '3', '2', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('301', '72', '3', '2', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('302', '72', '3', '2', '0', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('303', '72', '3', '2', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('304', '72', '3', '2', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('305', '72', '3', '2', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('306', '72', '3', '2', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('307', '72', '3', '3', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('308', '72', '3', '3', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('309', '72', '3', '3', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('310', '72', '3', '3', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('311', '72', '3', '3', '1', '1y7yg4JJ3QKyaQ=='); INSERT INTO `jugadas` VALUES ('312', '73', '1', '1', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('313', '73', '1', '1', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('314', '73', '1', '1', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('315', '73', '1', '1', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('316', '73', '1', '1', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('317', '73', '1', '1', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('318', '73', '1', '1', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('319', '73', '1', '1', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('320', '73', '1', '1', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('321', '73', '1', '1', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('322', '74', '2', '1', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('323', '74', '2', '1', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('324', '74', '2', '1', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('325', '74', '2', '1', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('326', '74', '2', '1', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('327', '74', '2', '1', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('328', '74', '2', '1', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('329', '74', '2', '1', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('330', '74', '2', '1', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('331', '74', '2', '1', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('332', '74', '2', '2', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('333', '74', '2', '2', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('334', '74', '2', '2', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('335', '74', '2', '2', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('336', '74', '2', '2', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('337', '74', '2', '3', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('338', '74', '2', '3', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('339', '74', '2', '3', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('340', '74', '2', '3', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('341', '74', '2', '3', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('342', '75', '3', '1', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('343', '75', '3', '1', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('344', '75', '3', '1', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('345', '75', '3', '1', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('346', '75', '3', '1', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('347', '75', '3', '2', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('348', '75', '3', '2', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('349', '75', '3', '2', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('350', '75', '3', '2', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('351', '75', '3', '2', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('352', '75', '3', '3', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('353', '75', '3', '3', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('354', '75', '3', '3', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('355', '75', '3', '3', '0', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('356', '75', '3', '3', '1', 'H7CYQHEVzq0S3Q=='); INSERT INTO `jugadas` VALUES ('357', '76', '1', '1', '1', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('358', '76', '1', '1', '0', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('359', '76', '1', '1', '1', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('360', '76', '1', '1', '1', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('361', '76', '1', '1', '0', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('362', '77', '2', '1', '0', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('363', '77', '2', '1', '0', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('364', '77', '2', '1', '0', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('365', '77', '2', '1', '0', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('366', '77', '2', '1', '0', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('367', '78', '1', '1', '1', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('368', '78', '1', '1', '1', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('369', '78', '1', '1', '1', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('370', '78', '1', '1', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('371', '78', '1', '1', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('372', '80', '1', '1', '1', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('373', '80', '1', '1', '0', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('374', '80', '1', '1', '1', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('375', '80', '1', '1', '1', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('376', '80', '1', '1', '0', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('377', '81', '3', '1', '1', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('378', '81', '3', '1', '1', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('379', '82', '2', '1', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('380', '81', '3', '1', '1', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('381', '82', '2', '1', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('382', '82', '2', '1', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('383', '81', '3', '1', '1', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('384', '82', '2', '1', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('385', '82', '2', '1', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('386', '81', '3', '1', '0', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('387', '82', '2', '1', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('388', '82', '2', '1', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('389', '82', '2', '1', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('390', '82', '2', '1', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('391', '82', '2', '1', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('392', '83', '2', '1', '0', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('393', '83', '2', '1', '0', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('394', '83', '2', '1', '0', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('395', '83', '2', '1', '0', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('396', '83', '2', '1', '0', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('397', '83', '2', '2', '0', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('398', '82', '2', '2', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('399', '82', '2', '2', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('400', '82', '2', '2', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('401', '82', '2', '2', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('402', '82', '2', '2', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('403', '82', '2', '3', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('404', '82', '2', '3', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('405', '82', '2', '3', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('406', '82', '2', '3', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('407', '82', '2', '3', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('408', '85', '3', '1', '1', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('409', '85', '3', '1', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('410', '85', '3', '1', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('411', '85', '3', '1', '1', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('412', '85', '3', '1', '1', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('413', '85', '3', '2', '1', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('414', '86', '3', '1', '1', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('415', '85', '3', '2', '1', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('416', '85', '3', '2', '1', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('417', '86', '3', '1', '0', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('418', '85', '3', '2', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('419', '86', '3', '1', '0', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('420', '85', '3', '2', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('421', '86', '3', '1', '0', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('422', '86', '3', '1', '1', 'HhoISCr+9R9zUw=='); INSERT INTO `jugadas` VALUES ('423', '85', '3', '3', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('424', '85', '3', '3', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('425', '85', '3', '3', '1', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('426', '85', '3', '3', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('427', '85', '3', '3', '0', '6b01XeZkGApr+Q=='); INSERT INTO `jugadas` VALUES ('428', '76', '1', '2', '0', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('429', '76', '1', '2', '0', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('430', '76', '1', '2', '1', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('431', '76', '1', '2', '1', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('432', '76', '1', '2', '1', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('433', '76', '1', '3', '1', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('434', '76', '1', '3', '0', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('435', '76', '1', '3', '0', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('436', '76', '1', '3', '0', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('437', '76', '1', '3', '1', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('438', '76', '1', '3', '1', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('439', '76', '1', '3', '1', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('440', '76', '1', '3', '0', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('441', '76', '1', '3', '0', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('442', '76', '1', '3', '0', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('443', '76', '1', '3', '0', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('444', '87', '2', '1', '0', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('445', '87', '2', '1', '0', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('446', '87', '2', '1', '1', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('447', '87', '2', '2', '0', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('448', '87', '2', '2', '0', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('449', '87', '2', '2', '0', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('450', '87', '2', '2', '0', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('451', '87', '2', '2', '1', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('452', '87', '2', '3', '1', 'WkDyRI3epA9soQ=='); INSERT INTO `jugadas` VALUES ('453', '88', '1', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('454', '88', '1', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('455', '88', '1', '1', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('456', '88', '1', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('457', '88', '1', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('458', '88', '1', '2', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('459', '88', '1', '2', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('460', '88', '1', '2', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('461', '88', '1', '2', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('462', '88', '1', '2', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('463', '88', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('464', '88', '1', '3', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('465', '88', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('466', '88', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('467', '88', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('468', '88', '1', '3', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('469', '88', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('470', '88', '1', '3', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('471', '88', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('472', '88', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('473', '89', '2', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('474', '89', '2', '2', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('475', '89', '2', '2', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('476', '89', '2', '3', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('477', '89', '2', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('478', '90', '3', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('479', '90', '3', '1', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('480', '90', '3', '1', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('481', '90', '3', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('482', '90', '3', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('483', '90', '3', '2', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('484', '90', '3', '2', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('485', '90', '3', '2', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('486', '90', '3', '2', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('487', '90', '3', '2', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('488', '90', '3', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('489', '90', '3', '3', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('490', '90', '3', '3', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('491', '90', '3', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('492', '90', '3', '3', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('493', '91', '3', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('494', '91', '3', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('495', '91', '3', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('496', '91', '3', '1', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('497', '91', '3', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('498', '91', '3', '2', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('499', '91', '3', '2', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('500', '91', '3', '2', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('501', '91', '3', '2', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('502', '91', '3', '2', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('503', '91', '3', '3', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('504', '91', '3', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('505', '91', '3', '3', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('506', '91', '3', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('507', '91', '3', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('508', '92', '2', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('509', '92', '2', '2', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('510', '92', '2', '3', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('511', '92', '2', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('512', '93', '1', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('513', '93', '1', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('514', '93', '1', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('515', '93', '1', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('516', '93', '1', '1', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('517', '93', '1', '2', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('518', '93', '1', '2', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('519', '93', '1', '2', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('520', '93', '1', '2', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('521', '93', '1', '2', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('522', '93', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('523', '93', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('524', '93', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('525', '93', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('526', '93', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('527', '93', '1', '3', '0', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('528', '93', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('529', '93', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('530', '93', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('531', '93', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('532', '93', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('533', '93', '1', '3', '1', 'OAbOKuhy4sD/gQ=='); INSERT INTO `jugadas` VALUES ('534', '94', '1', '1', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('535', '94', '1', '1', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('536', '94', '1', '1', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('537', '94', '1', '1', '0', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('538', '94', '1', '1', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('539', '94', '1', '2', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('540', '94', '1', '2', '0', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('541', '94', '1', '2', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('542', '94', '1', '2', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('543', '94', '1', '2', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('544', '95', '2', '1', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('545', '95', '2', '2', '0', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('546', '95', '2', '2', '0', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('547', '95', '2', '2', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('548', '95', '2', '3', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('549', '96', '3', '1', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('550', '96', '3', '1', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('551', '96', '3', '1', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('552', '96', '3', '1', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('553', '96', '3', '1', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('554', '96', '3', '2', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('555', '96', '3', '2', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('556', '96', '3', '2', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('557', '96', '3', '2', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('558', '96', '3', '2', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('559', '96', '3', '3', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('560', '96', '3', '3', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('561', '96', '3', '3', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('562', '96', '3', '3', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('563', '96', '3', '3', '1', 'tLn7ur4QkwJWew=='); INSERT INTO `jugadas` VALUES ('564', '99', '2', '1', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('565', '99', '2', '2', '0', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('566', '99', '2', '2', '0', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('567', '99', '2', '2', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('568', '99', '2', '3', '0', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('569', '99', '2', '3', '0', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('570', '99', '2', '3', '0', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('571', '99', '2', '3', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('572', '100', '3', '1', '0', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('573', '100', '3', '1', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('574', '100', '3', '1', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('575', '100', '3', '1', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('576', '100', '3', '1', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('577', '100', '3', '2', '0', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('578', '100', '3', '2', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('579', '100', '3', '2', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('580', '100', '3', '2', '0', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('581', '100', '3', '2', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('582', '100', '3', '3', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('583', '100', '3', '3', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('584', '100', '3', '3', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('585', '100', '3', '3', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('586', '100', '3', '3', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('587', '101', '1', '1', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('588', '101', '1', '1', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('589', '101', '1', '1', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('590', '101', '1', '1', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('591', '101', '1', '1', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('592', '101', '1', '2', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('593', '101', '1', '2', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('594', '101', '1', '2', '0', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('595', '101', '1', '2', '0', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('596', '101', '1', '2', '1', 'n17T1kWQjlgp6Q=='); INSERT INTO `jugadas` VALUES ('597', '102', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('598', '102', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('599', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('600', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('601', '102', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('602', '102', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('603', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('604', '102', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('605', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('606', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('607', '102', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('608', '102', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('609', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('610', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('611', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('612', '102', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('613', '102', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('614', '102', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('615', '102', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('616', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('617', '102', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('618', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('619', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('620', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('621', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('622', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('623', '102', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('624', '102', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('625', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('626', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('627', '102', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('628', '102', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('629', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('630', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('631', '102', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('632', '103', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('633', '103', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('634', '103', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('635', '103', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('636', '103', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('637', '103', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('638', '103', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('639', '103', '1', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('640', '103', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('641', '103', '1', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('642', '103', '1', '2', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('643', '103', '1', '2', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('644', '103', '1', '2', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('645', '103', '1', '2', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('646', '103', '1', '2', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('647', '103', '1', '2', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('648', '103', '1', '2', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('649', '103', '1', '2', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('650', '103', '1', '2', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('651', '103', '1', '2', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('652', '103', '1', '2', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('653', '103', '1', '2', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('654', '103', '1', '2', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('655', '103', '1', '2', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('656', '103', '1', '2', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('657', '104', '2', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('658', '104', '2', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('659', '104', '2', '1', '0', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('660', '106', '2', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('661', '106', '2', '1', '1', '4fjyKsnWVzdWWg=='); INSERT INTO `jugadas` VALUES ('662', '108', '1', '1', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('663', '108', '1', '1', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('664', '108', '1', '1', '0', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('665', '108', '1', '1', '0', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('666', '108', '1', '1', '0', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('667', '108', '1', '2', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('668', '108', '1', '2', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('669', '108', '1', '2', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('670', '108', '1', '2', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('671', '108', '1', '2', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('672', '108', '1', '3', '0', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('673', '108', '1', '3', '0', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('674', '108', '1', '3', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('675', '108', '1', '3', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('676', '108', '1', '3', '0', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('677', '108', '1', '3', '0', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('678', '108', '1', '3', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('679', '108', '1', '3', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('680', '108', '1', '3', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('681', '108', '1', '3', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('682', '109', '2', '1', '0', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('683', '109', '2', '1', '0', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('684', '109', '2', '1', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('685', '109', '2', '2', '0', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('686', '109', '2', '2', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('687', '109', '2', '3', '0', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('688', '109', '2', '3', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('689', '110', '3', '1', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('690', '110', '3', '1', '0', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('691', '110', '3', '1', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('692', '110', '3', '1', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('693', '110', '3', '1', '0', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('694', '110', '3', '2', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('695', '110', '3', '2', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('696', '110', '3', '2', '0', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('697', '110', '3', '2', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('698', '110', '3', '2', '0', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('699', '110', '3', '3', '0', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('700', '110', '3', '3', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('701', '110', '3', '3', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('702', '110', '3', '3', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('703', '110', '3', '3', '1', 'jZZ+vexsDgnJuA=='); INSERT INTO `jugadas` VALUES ('704', '111', '1', '1', '0', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('705', '111', '1', '1', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('706', '111', '1', '1', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('707', '111', '1', '1', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('708', '111', '1', '1', '0', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('709', '111', '1', '2', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('710', '111', '1', '2', '0', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('711', '111', '1', '2', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('712', '111', '1', '2', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('713', '111', '1', '2', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('714', '111', '1', '3', '0', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('715', '111', '1', '3', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('716', '111', '1', '3', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('717', '111', '1', '3', '0', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('718', '111', '1', '3', '0', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('719', '111', '1', '3', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('720', '111', '1', '3', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('721', '111', '1', '3', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('722', '111', '1', '3', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('723', '111', '1', '3', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('724', '112', '2', '1', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('725', '112', '2', '2', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('726', '112', '2', '3', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('727', '113', '2', '1', '0', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('728', '113', '2', '1', '0', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('729', '113', '2', '1', '0', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('730', '113', '2', '1', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('731', '113', '2', '2', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('732', '113', '2', '3', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('733', '114', '3', '1', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('734', '114', '3', '1', '0', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('735', '114', '3', '1', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('736', '114', '3', '1', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('737', '114', '3', '1', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('738', '114', '3', '2', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('739', '114', '3', '2', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('740', '114', '3', '2', '0', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('741', '114', '3', '2', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('742', '114', '3', '2', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('743', '114', '3', '3', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('744', '114', '3', '3', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('745', '114', '3', '3', '0', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('746', '114', '3', '3', '0', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('747', '114', '3', '3', '1', 'KZoIPY56eqrR/Q=='); INSERT INTO `jugadas` VALUES ('748', '117', '2', '1', '0', 'KZ39bFayGqadtw=='); INSERT INTO `jugadas` VALUES ('749', '117', '2', '1', '0', 'KZ39bFayGqadtw=='); INSERT INTO `jugadas` VALUES ('750', '117', '2', '1', '0', 'KZ39bFayGqadtw=='); INSERT INTO `jugadas` VALUES ('751', '117', '2', '1', '0', 'KZ39bFayGqadtw=='); INSERT INTO `jugadas` VALUES ('752', '117', '2', '1', '0', 'KZ39bFayGqadtw=='); INSERT INTO `jugadas` VALUES ('753', '118', '1', '1', '1', 'KZ39bFayGqadtw=='); INSERT INTO `jugadas` VALUES ('754', '118', '1', '1', '1', 'KZ39bFayGqadtw=='); INSERT INTO `jugadas` VALUES ('755', '118', '1', '1', '1', 'KZ39bFayGqadtw=='); INSERT INTO `jugadas` VALUES ('756', '118', '1', '1', '1', 'KZ39bFayGqadtw=='); INSERT INTO `jugadas` VALUES ('757', '118', '1', '1', '1', 'KZ39bFayGqadtw=='); INSERT INTO `jugadas` VALUES ('758', '118', '1', '2', '1', 'KZ39bFayGqadtw=='); INSERT INTO `jugadas` VALUES ('759', '118', '1', '2', '1', 'KZ39bFayGqadtw=='); INSERT INTO `jugadas` VALUES ('760', '118', '1', '2', '1', 'KZ39bFayGqadtw=='); INSERT INTO `jugadas` VALUES ('761', '118', '1', '2', '1', 'KZ39bFayGqadtw=='); INSERT INTO `jugadas` VALUES ('762', '118', '1', '2', '1', 'KZ39bFayGqadtw=='); INSERT INTO `jugadas` VALUES ('763', '119', '1', '1', '1', 'TGCNja35CDxP3Q=='); INSERT INTO `jugadas` VALUES ('764', '119', '1', '1', '1', 'TGCNja35CDxP3Q=='); INSERT INTO `jugadas` VALUES ('765', '119', '1', '1', '1', 'TGCNja35CDxP3Q=='); INSERT INTO `jugadas` VALUES ('766', '119', '1', '1', '1', 'TGCNja35CDxP3Q=='); INSERT INTO `jugadas` VALUES ('767', '119', '1', '1', '1', 'TGCNja35CDxP3Q=='); INSERT INTO `jugadas` VALUES ('768', '120', '2', '1', '1', 'TGCNja35CDxP3Q=='); INSERT INTO `jugadas` VALUES ('769', '121', '1', '1', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('770', '121', '1', '1', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('771', '121', '1', '1', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('772', '121', '1', '1', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('773', '121', '1', '1', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('774', '121', '1', '2', '0', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('775', '121', '1', '2', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('776', '121', '1', '2', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('777', '121', '1', '2', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('778', '121', '1', '2', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('779', '121', '1', '3', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('780', '121', '1', '3', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('781', '121', '1', '3', '0', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('782', '121', '1', '3', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('783', '121', '1', '3', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('784', '121', '1', '3', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('785', '121', '1', '3', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('786', '121', '1', '3', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('787', '121', '1', '3', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('788', '121', '1', '3', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('789', '121', '1', '3', '1', 'd3ZC1a8HcZILTg=='); INSERT INTO `jugadas` VALUES ('790', '122', '3', '1', '1', 'g+1iYmyWU5ZA/Q=='); INSERT INTO `jugadas` VALUES ('791', '122', '3', '1', '1', 'g+1iYmyWU5ZA/Q=='); INSERT INTO `jugadas` VALUES ('792', '122', '3', '1', '1', 'g+1iYmyWU5ZA/Q=='); INSERT INTO `jugadas` VALUES ('793', '122', '3', '1', '1', 'g+1iYmyWU5ZA/Q=='); INSERT INTO `jugadas` VALUES ('794', '122', '3', '1', '1', 'g+1iYmyWU5ZA/Q=='); INSERT INTO `jugadas` VALUES ('795', '123', '1', '1', '1', 'WWr6mFeKAgxlKA=='); INSERT INTO `jugadas` VALUES ('796', '123', '1', '1', '1', 'WWr6mFeKAgxlKA=='); INSERT INTO `jugadas` VALUES ('797', '123', '1', '1', '1', 'WWr6mFeKAgxlKA=='); INSERT INTO `jugadas` VALUES ('798', '123', '1', '1', '0', 'WWr6mFeKAgxlKA=='); INSERT INTO `jugadas` VALUES ('799', '123', '1', '1', '1', 'WWr6mFeKAgxlKA=='); INSERT INTO `jugadas` VALUES ('800', '124', '1', '1', '1', 'EmBlSh5YJ5FmSQ=='); INSERT INTO `jugadas` VALUES ('801', '124', '1', '1', '1', 'EmBlSh5YJ5FmSQ=='); INSERT INTO `jugadas` VALUES ('802', '124', '1', '1', '1', 'EmBlSh5YJ5FmSQ=='); INSERT INTO `jugadas` VALUES ('803', '125', '1', '1', '1', 'EmBlSh5YJ5FmSQ=='); INSERT INTO `jugadas` VALUES ('804', '125', '1', '1', '1', 'EmBlSh5YJ5FmSQ=='); INSERT INTO `jugadas` VALUES ('805', '125', '1', '1', '1', 'EmBlSh5YJ5FmSQ=='); INSERT INTO `jugadas` VALUES ('806', '125', '1', '1', '1', 'EmBlSh5YJ5FmSQ=='); INSERT INTO `jugadas` VALUES ('807', '125', '1', '1', '0', 'EmBlSh5YJ5FmSQ=='); INSERT INTO `jugadas` VALUES ('808', '125', '1', '2', '1', 'EmBlSh5YJ5FmSQ=='); INSERT INTO `jugadas` VALUES ('809', '125', '1', '2', '1', 'EmBlSh5YJ5FmSQ=='); INSERT INTO `jugadas` VALUES ('810', '125', '1', '2', '0', 'EmBlSh5YJ5FmSQ=='); INSERT INTO `jugadas` VALUES ('811', '125', '1', '2', '1', 'EmBlSh5YJ5FmSQ=='); INSERT INTO `jugadas` VALUES ('812', '125', '1', '2', '1', 'EmBlSh5YJ5FmSQ=='); INSERT INTO `jugadas` VALUES ('813', '125', '1', '3', '0', 'EmBlSh5YJ5FmSQ=='); INSERT INTO `jugadas` VALUES ('814', '125', '1', '3', '1', 'EmBlSh5YJ5FmSQ=='); -- ---------------------------- -- Table structure for resultado-juego -- ---------------------------- DROP TABLE IF EXISTS `resultado-juego`; CREATE TABLE `resultado-juego` ( `id` int(11) NOT NULL AUTO_INCREMENT, `id_juego` int(11) NOT NULL, `resultado` tinyint(1) NOT NULL, `nivel` tinyint(1) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=165 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of resultado-juego -- ---------------------------- INSERT INTO `resultado-juego` VALUES ('1', '1', '1', '1'); INSERT INTO `resultado-juego` VALUES ('2', '31', '1', '1'); INSERT INTO `resultado-juego` VALUES ('3', '32', '1', '1'); INSERT INTO `resultado-juego` VALUES ('4', '0', '1', '1'); INSERT INTO `resultado-juego` VALUES ('5', '0', '0', '1'); INSERT INTO `resultado-juego` VALUES ('6', '0', '1', '1'); INSERT INTO `resultado-juego` VALUES ('7', '34', '1', '1'); INSERT INTO `resultado-juego` VALUES ('8', '0', '1', '1'); INSERT INTO `resultado-juego` VALUES ('9', '0', '1', '1'); INSERT INTO `resultado-juego` VALUES ('10', '0', '0', '1'); INSERT INTO `resultado-juego` VALUES ('11', '0', '1', '1'); INSERT INTO `resultado-juego` VALUES ('12', '0', '1', '1'); INSERT INTO `resultado-juego` VALUES ('13', '0', '1', '1'); INSERT INTO `resultado-juego` VALUES ('14', '0', '1', '1'); INSERT INTO `resultado-juego` VALUES ('15', '35', '1', '1'); INSERT INTO `resultado-juego` VALUES ('16', '0', '1', '1'); INSERT INTO `resultado-juego` VALUES ('17', '0', '0', '1'); INSERT INTO `resultado-juego` VALUES ('18', '0', '0', '1'); INSERT INTO `resultado-juego` VALUES ('19', '0', '0', '1'); INSERT INTO `resultado-juego` VALUES ('20', '43', '1', '1'); INSERT INTO `resultado-juego` VALUES ('21', '44', '0', '1'); INSERT INTO `resultado-juego` VALUES ('22', '44', '1', '1'); INSERT INTO `resultado-juego` VALUES ('23', '44', '1', '1'); INSERT INTO `resultado-juego` VALUES ('24', '63', '1', '1'); INSERT INTO `resultado-juego` VALUES ('25', '63', '1', '1'); INSERT INTO `resultado-juego` VALUES ('26', '64', '0', '1'); INSERT INTO `resultado-juego` VALUES ('27', '64', '0', '1'); INSERT INTO `resultado-juego` VALUES ('28', '66', '0', '1'); INSERT INTO `resultado-juego` VALUES ('29', '67', '0', '1'); INSERT INTO `resultado-juego` VALUES ('30', '68', '0', '1'); INSERT INTO `resultado-juego` VALUES ('31', '68', '0', '1'); INSERT INTO `resultado-juego` VALUES ('32', '68', '0', '1'); INSERT INTO `resultado-juego` VALUES ('33', '68', '0', '1'); INSERT INTO `resultado-juego` VALUES ('34', '71', '1', '1'); INSERT INTO `resultado-juego` VALUES ('35', '71', '0', '1'); INSERT INTO `resultado-juego` VALUES ('36', '71', '1', '1'); INSERT INTO `resultado-juego` VALUES ('37', '71', '1', '1'); INSERT INTO `resultado-juego` VALUES ('38', '71', '0', '1'); INSERT INTO `resultado-juego` VALUES ('39', '71', '1', '1'); INSERT INTO `resultado-juego` VALUES ('40', '71', '0', '1'); INSERT INTO `resultado-juego` VALUES ('41', '71', '0', '1'); INSERT INTO `resultado-juego` VALUES ('42', '71', '1', '1'); INSERT INTO `resultado-juego` VALUES ('43', '71', '0', '1'); INSERT INTO `resultado-juego` VALUES ('44', '71', '0', '1'); INSERT INTO `resultado-juego` VALUES ('45', '71', '0', '1'); INSERT INTO `resultado-juego` VALUES ('46', '71', '0', '1'); INSERT INTO `resultado-juego` VALUES ('47', '71', '1', '1'); INSERT INTO `resultado-juego` VALUES ('48', '71', '0', '1'); INSERT INTO `resultado-juego` VALUES ('49', '71', '1', '1'); INSERT INTO `resultado-juego` VALUES ('50', '71', '1', '1'); INSERT INTO `resultado-juego` VALUES ('51', '71', '1', '1'); INSERT INTO `resultado-juego` VALUES ('52', '71', '1', '1'); INSERT INTO `resultado-juego` VALUES ('53', '72', '1', '1'); INSERT INTO `resultado-juego` VALUES ('54', '72', '1', '1'); INSERT INTO `resultado-juego` VALUES ('55', '72', '1', '1'); INSERT INTO `resultado-juego` VALUES ('56', '72', '1', '1'); INSERT INTO `resultado-juego` VALUES ('57', '73', '0', '1'); INSERT INTO `resultado-juego` VALUES ('58', '73', '1', '1'); INSERT INTO `resultado-juego` VALUES ('59', '74', '0', '1'); INSERT INTO `resultado-juego` VALUES ('60', '74', '0', '1'); INSERT INTO `resultado-juego` VALUES ('61', '74', '0', '1'); INSERT INTO `resultado-juego` VALUES ('62', '74', '0', '1'); INSERT INTO `resultado-juego` VALUES ('63', '75', '1', '1'); INSERT INTO `resultado-juego` VALUES ('64', '75', '1', '1'); INSERT INTO `resultado-juego` VALUES ('65', '75', '1', '1'); INSERT INTO `resultado-juego` VALUES ('66', '76', '1', '1'); INSERT INTO `resultado-juego` VALUES ('67', '77', '0', '1'); INSERT INTO `resultado-juego` VALUES ('68', '78', '1', '1'); INSERT INTO `resultado-juego` VALUES ('69', '80', '1', '1'); INSERT INTO `resultado-juego` VALUES ('70', '82', '0', '1'); INSERT INTO `resultado-juego` VALUES ('71', '81', '1', '1'); INSERT INTO `resultado-juego` VALUES ('72', '82', '0', '1'); INSERT INTO `resultado-juego` VALUES ('73', '83', '0', '1'); INSERT INTO `resultado-juego` VALUES ('74', '82', '0', '1'); INSERT INTO `resultado-juego` VALUES ('75', '82', '0', '1'); INSERT INTO `resultado-juego` VALUES ('76', '85', '1', '1'); INSERT INTO `resultado-juego` VALUES ('77', '85', '1', '1'); INSERT INTO `resultado-juego` VALUES ('78', '86', '0', '1'); INSERT INTO `resultado-juego` VALUES ('79', '85', '0', '1'); INSERT INTO `resultado-juego` VALUES ('80', '76', '1', '1'); INSERT INTO `resultado-juego` VALUES ('81', '76', '0', '1'); INSERT INTO `resultado-juego` VALUES ('82', '87', '1', '1'); INSERT INTO `resultado-juego` VALUES ('83', '87', '1', '1'); INSERT INTO `resultado-juego` VALUES ('84', '87', '1', '1'); INSERT INTO `resultado-juego` VALUES ('85', '88', '1', '1'); INSERT INTO `resultado-juego` VALUES ('86', '88', '1', '1'); INSERT INTO `resultado-juego` VALUES ('87', '88', '1', '1'); INSERT INTO `resultado-juego` VALUES ('88', '89', '1', '1'); INSERT INTO `resultado-juego` VALUES ('89', '89', '1', '1'); INSERT INTO `resultado-juego` VALUES ('90', '89', '1', '1'); INSERT INTO `resultado-juego` VALUES ('91', '90', '1', '1'); INSERT INTO `resultado-juego` VALUES ('92', '90', '1', '1'); INSERT INTO `resultado-juego` VALUES ('93', '90', '0', '1'); INSERT INTO `resultado-juego` VALUES ('94', '91', '1', '1'); INSERT INTO `resultado-juego` VALUES ('95', '91', '1', '1'); INSERT INTO `resultado-juego` VALUES ('96', '91', '1', '1'); INSERT INTO `resultado-juego` VALUES ('97', '92', '1', '1'); INSERT INTO `resultado-juego` VALUES ('98', '92', '1', '1'); INSERT INTO `resultado-juego` VALUES ('99', '92', '1', '1'); INSERT INTO `resultado-juego` VALUES ('100', '93', '1', '1'); INSERT INTO `resultado-juego` VALUES ('101', '93', '1', '1'); INSERT INTO `resultado-juego` VALUES ('102', '93', '1', '1'); INSERT INTO `resultado-juego` VALUES ('103', '94', '1', '1'); INSERT INTO `resultado-juego` VALUES ('104', '94', '1', '1'); INSERT INTO `resultado-juego` VALUES ('105', '95', '1', '1'); INSERT INTO `resultado-juego` VALUES ('106', '95', '1', '1'); INSERT INTO `resultado-juego` VALUES ('107', '95', '1', '1'); INSERT INTO `resultado-juego` VALUES ('108', '96', '1', '1'); INSERT INTO `resultado-juego` VALUES ('109', '96', '1', '1'); INSERT INTO `resultado-juego` VALUES ('110', '96', '1', '1'); INSERT INTO `resultado-juego` VALUES ('111', '99', '1', '1'); INSERT INTO `resultado-juego` VALUES ('112', '99', '1', '1'); INSERT INTO `resultado-juego` VALUES ('113', '99', '1', '1'); INSERT INTO `resultado-juego` VALUES ('114', '100', '1', '1'); INSERT INTO `resultado-juego` VALUES ('115', '100', '1', '1'); INSERT INTO `resultado-juego` VALUES ('116', '100', '1', '1'); INSERT INTO `resultado-juego` VALUES ('117', '101', '1', '1'); INSERT INTO `resultado-juego` VALUES ('118', '101', '1', '1'); INSERT INTO `resultado-juego` VALUES ('119', '102', '1', '1'); INSERT INTO `resultado-juego` VALUES ('120', '102', '0', '1'); INSERT INTO `resultado-juego` VALUES ('121', '102', '0', '1'); INSERT INTO `resultado-juego` VALUES ('122', '102', '1', '1'); INSERT INTO `resultado-juego` VALUES ('123', '102', '0', '1'); INSERT INTO `resultado-juego` VALUES ('124', '102', '0', '1'); INSERT INTO `resultado-juego` VALUES ('125', '102', '0', '1'); INSERT INTO `resultado-juego` VALUES ('126', '103', '0', '1'); INSERT INTO `resultado-juego` VALUES ('127', '103', '1', '1'); INSERT INTO `resultado-juego` VALUES ('128', '103', '1', '1'); INSERT INTO `resultado-juego` VALUES ('129', '103', '0', '1'); INSERT INTO `resultado-juego` VALUES ('130', '106', '1', '1'); INSERT INTO `resultado-juego` VALUES ('131', '106', '1', '1'); INSERT INTO `resultado-juego` VALUES ('132', '108', '0', '1'); INSERT INTO `resultado-juego` VALUES ('133', '108', '1', '1'); INSERT INTO `resultado-juego` VALUES ('134', '108', '0', '1'); INSERT INTO `resultado-juego` VALUES ('135', '109', '1', '1'); INSERT INTO `resultado-juego` VALUES ('136', '109', '1', '1'); INSERT INTO `resultado-juego` VALUES ('137', '109', '1', '1'); INSERT INTO `resultado-juego` VALUES ('138', '110', '1', '1'); INSERT INTO `resultado-juego` VALUES ('139', '110', '1', '1'); INSERT INTO `resultado-juego` VALUES ('140', '110', '1', '1'); INSERT INTO `resultado-juego` VALUES ('141', '111', '1', '1'); INSERT INTO `resultado-juego` VALUES ('142', '111', '1', '1'); INSERT INTO `resultado-juego` VALUES ('143', '111', '1', '1'); INSERT INTO `resultado-juego` VALUES ('144', '112', '1', '1'); INSERT INTO `resultado-juego` VALUES ('145', '112', '1', '1'); INSERT INTO `resultado-juego` VALUES ('146', '112', '1', '1'); INSERT INTO `resultado-juego` VALUES ('147', '113', '1', '1'); INSERT INTO `resultado-juego` VALUES ('148', '113', '1', '2'); INSERT INTO `resultado-juego` VALUES ('149', '113', '1', '3'); INSERT INTO `resultado-juego` VALUES ('150', '114', '1', '1'); INSERT INTO `resultado-juego` VALUES ('151', '114', '1', '2'); INSERT INTO `resultado-juego` VALUES ('152', '114', '1', '3'); INSERT INTO `resultado-juego` VALUES ('153', '117', '0', '1'); INSERT INTO `resultado-juego` VALUES ('154', '118', '1', '1'); INSERT INTO `resultado-juego` VALUES ('155', '118', '1', '2'); INSERT INTO `resultado-juego` VALUES ('156', '119', '1', '1'); INSERT INTO `resultado-juego` VALUES ('157', '120', '0', '1'); INSERT INTO `resultado-juego` VALUES ('158', '121', '1', '1'); INSERT INTO `resultado-juego` VALUES ('159', '121', '1', '2'); INSERT INTO `resultado-juego` VALUES ('160', '121', '0', '3'); INSERT INTO `resultado-juego` VALUES ('161', '122', '1', '1'); INSERT INTO `resultado-juego` VALUES ('162', '123', '1', '1'); INSERT INTO `resultado-juego` VALUES ('163', '125', '1', '1'); INSERT INTO `resultado-juego` VALUES ('164', '125', '1', '2'); -- ---------------------------- -- Table structure for users -- ---------------------------- DROP TABLE IF EXISTS `users`; CREATE TABLE `users` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `Nombres` varchar(50) NOT NULL, `Apellidos` varchar(50) NOT NULL, `permisos_json` varchar(5000) NOT NULL, `admin` tinyint(1) unsigned DEFAULT '0', `activo` tinyint(1) NOT NULL DEFAULT '1', `password` varchar(5000) NOT NULL DEFAULT '123456', `usuario` varchar(25) NOT NULL, `mail` varchar(50) NOT NULL, `sexo` varchar(10) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of users -- ---------------------------- INSERT INTO `users` VALUES ('1', 'Pepito', 'Perez', '', '1', '1', 'MTIz', 'pepito', 'marku993@gmail.com', 'male'); INSERT INTO `users` VALUES ('2', 'Maria', 'Lopez', '', '0', '1', 'MTIz', 'maria', 'marku993@gmail.com', 'female'); INSERT INTO `users` VALUES ('18', 'Sandra', 'Cano', '', '0', '1', 'MTIz', 'sandra', '', 'female'); INSERT INTO `users` VALUES ('19', 'Test', 'test', '', '0', '1', 'MTIz', 'test', 'test@m.com', 'female');
Create Procedure Sp_GetRecdGGDR As Begin Select ID From Recd_GGDR Where IsNull(Status,0) = 0 Order By ID Asc End
create table weather ( zone int, supplier varchar, run_at timestamp, forecast_for timestamp, lat float, lon float, tmp float, rh float, precip float, uwind float, vwind float, primary key ((zone),supplier,run_at,forecast_for,lat,lon) ); create table runs ( supplier varchar, run_at timestamp, analyzed_at timestamp, primary key ((supplier), run_at) ) with clustering order by (run_at desc); create table cities ( id int, name text, alt_names set<text>, lat float, lon float, zones set<int>, primary key (id) ); create index on weazr.cities (name);
-- -- PostgreSQL database dump -- -- Dumped from database version 10.1 -- Dumped by pg_dump version 10.1 -- Started on 2018-05-02 18:43:24 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; DROP DATABASE mob_geodb; -- -- TOC entry 5049 (class 1262 OID 16393) -- Name: mob_geodb; Type: DATABASE; Schema: -; Owner: postgres -- CREATE DATABASE mob_geodb WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'English_United States.1252' LC_CTYPE = 'English_United States.1252'; ALTER DATABASE mob_geodb OWNER TO postgres; \connect mob_geodb SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; -- -- TOC entry 19 (class 2615 OID 18371) -- Name: tiger; Type: SCHEMA; Schema: -; Owner: postgres -- CREATE SCHEMA tiger; ALTER SCHEMA tiger OWNER TO postgres; -- -- TOC entry 20 (class 2615 OID 18641) -- Name: tiger_data; Type: SCHEMA; Schema: -; Owner: postgres -- CREATE SCHEMA tiger_data; ALTER SCHEMA tiger_data OWNER TO postgres; -- -- TOC entry 18 (class 2615 OID 18089) -- Name: topology; Type: SCHEMA; Schema: -; Owner: postgres -- CREATE SCHEMA topology; ALTER SCHEMA topology OWNER TO postgres; -- -- TOC entry 5052 (class 0 OID 0) -- Dependencies: 18 -- Name: SCHEMA topology; Type: COMMENT; Schema: -; Owner: postgres -- COMMENT ON SCHEMA topology IS 'PostGIS Topology schema'; -- -- TOC entry 1 (class 3079 OID 12924) -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; -- -- TOC entry 5053 (class 0 OID 0) -- Dependencies: 1 -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; -- -- TOC entry 7 (class 3079 OID 18231) -- Name: address_standardizer; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS address_standardizer WITH SCHEMA public; -- -- TOC entry 5054 (class 0 OID 0) -- Dependencies: 7 -- Name: EXTENSION address_standardizer; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION address_standardizer IS 'Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.'; -- -- TOC entry 2 (class 3079 OID 18360) -- Name: fuzzystrmatch; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS fuzzystrmatch WITH SCHEMA public; -- -- TOC entry 5055 (class 0 OID 0) -- Dependencies: 2 -- Name: EXTENSION fuzzystrmatch; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION fuzzystrmatch IS 'determine similarities and distance between strings'; -- -- TOC entry 3 (class 3079 OID 18356) -- Name: ogr_fdw; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS ogr_fdw WITH SCHEMA public; -- -- TOC entry 5056 (class 0 OID 0) -- Dependencies: 3 -- Name: EXTENSION ogr_fdw; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION ogr_fdw IS 'foreign-data wrapper for GIS data access'; -- -- TOC entry 9 (class 3079 OID 16394) -- Name: postgis; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public; -- -- TOC entry 5057 (class 0 OID 0) -- Dependencies: 9 -- Name: EXTENSION postgis; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION postgis IS 'PostGIS geometry, geography, and raster spatial types and functions'; -- -- TOC entry 8 (class 3079 OID 17893) -- Name: pgrouting; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS pgrouting WITH SCHEMA public; -- -- TOC entry 5058 (class 0 OID 0) -- Dependencies: 8 -- Name: EXTENSION pgrouting; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION pgrouting IS 'pgRouting Extension'; -- -- TOC entry 5 (class 3079 OID 18256) -- Name: pointcloud; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS pointcloud WITH SCHEMA public; -- -- TOC entry 5059 (class 0 OID 0) -- Dependencies: 5 -- Name: EXTENSION pointcloud; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION pointcloud IS 'data type for lidar point clouds'; -- -- TOC entry 4 (class 3079 OID 18346) -- Name: pointcloud_postgis; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS pointcloud_postgis WITH SCHEMA public; -- -- TOC entry 5060 (class 0 OID 0) -- Dependencies: 4 -- Name: EXTENSION pointcloud_postgis; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION pointcloud_postgis IS 'integration for pointcloud LIDAR data and PostGIS geometry data'; -- -- TOC entry 6 (class 3079 OID 18238) -- Name: postgis_sfcgal; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS postgis_sfcgal WITH SCHEMA public; -- -- TOC entry 5061 (class 0 OID 0) -- Dependencies: 6 -- Name: EXTENSION postgis_sfcgal; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION postgis_sfcgal IS 'PostGIS SFCGAL functions'; -- -- TOC entry 11 (class 3079 OID 18372) -- Name: postgis_tiger_geocoder; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder WITH SCHEMA tiger; -- -- TOC entry 5062 (class 0 OID 0) -- Dependencies: 11 -- Name: EXTENSION postgis_tiger_geocoder; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION postgis_tiger_geocoder IS 'PostGIS tiger geocoder and reverse geocoder'; -- -- TOC entry 10 (class 3079 OID 18090) -- Name: postgis_topology; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS postgis_topology WITH SCHEMA topology; -- -- TOC entry 5063 (class 0 OID 0) -- Dependencies: 10 -- Name: EXTENSION postgis_topology; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION postgis_topology IS 'PostGIS topology spatial types and functions'; SET search_path = public, pg_catalog; SET default_tablespace = ''; SET default_with_oids = false; -- -- TOC entry 287 (class 1259 OID 18816) -- Name: general_users; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE general_users ( id_user integer NOT NULL, username character varying(20) NOT NULL, password character varying NOT NULL, name character varying(20), lastname character varying(20), email character varying(30) NOT NULL, active integer DEFAULT 0, rol integer DEFAULT 0 ); ALTER TABLE general_users OWNER TO postgres; -- -- TOC entry 296 (class 1259 OID 32770) -- Name: general_users_activation; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE general_users_activation ( id_activation integer NOT NULL, id_user integer, hash uuid ); ALTER TABLE general_users_activation OWNER TO postgres; -- -- TOC entry 298 (class 1259 OID 40977) -- Name: general_users_rols; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE general_users_rols ( id_user_rol integer NOT NULL, name character varying NOT NULL, description character varying ); ALTER TABLE general_users_rols OWNER TO postgres; -- -- TOC entry 297 (class 1259 OID 40975) -- Name: general_users_rols_id_user_rol_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE general_users_rols_id_user_rol_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE general_users_rols_id_user_rol_seq OWNER TO postgres; -- -- TOC entry 5064 (class 0 OID 0) -- Dependencies: 297 -- Name: general_users_rols_id_user_rol_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE general_users_rols_id_user_rol_seq OWNED BY general_users_rols.id_user_rol; -- -- TOC entry 302 (class 1259 OID 41002) -- Name: mob_collections; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE mob_collections ( id_collection integer NOT NULL, name character varying, categories text ); ALTER TABLE mob_collections OWNER TO postgres; -- -- TOC entry 301 (class 1259 OID 41000) -- Name: mob_collections_id_collection_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE mob_collections_id_collection_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE mob_collections_id_collection_seq OWNER TO postgres; -- -- TOC entry 5065 (class 0 OID 0) -- Dependencies: 301 -- Name: mob_collections_id_collection_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE mob_collections_id_collection_seq OWNED BY mob_collections.id_collection; -- -- TOC entry 291 (class 1259 OID 24599) -- Name: mob_segmentation_details; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE mob_segmentation_details ( id_details integer NOT NULL, mob_score integer, mob_blocks json, mob_html text, mob_date character varying, mob_browser character varying, mob_gran integer, id_web_page integer, id_user integer, seg_type character varying, mob_status character varying DEFAULT 'scoring'::character varying ); ALTER TABLE mob_segmentation_details OWNER TO postgres; -- -- TOC entry 294 (class 1259 OID 24613) -- Name: mob_segmentation_geo; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE mob_segmentation_geo ( id_geo integer NOT NULL, id_details integer NOT NULL, tag character varying, block geometry(LineString), block_id character varying, words integer, elems integer, score_geo integer, score_sem integer, identifier integer, dom json, gran integer ); ALTER TABLE mob_segmentation_geo OWNER TO postgres; -- -- TOC entry 300 (class 1259 OID 40991) -- Name: mob_tags; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE mob_tags ( id_tag integer NOT NULL, name character varying, desc_esp text, desc_eng text, desc_fra text ); ALTER TABLE mob_tags OWNER TO postgres; -- -- TOC entry 299 (class 1259 OID 40989) -- Name: mob_tags_id_tag_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE mob_tags_id_tag_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE mob_tags_id_tag_seq OWNER TO postgres; -- -- TOC entry 5066 (class 0 OID 0) -- Dependencies: 299 -- Name: mob_tags_id_tag_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE mob_tags_id_tag_seq OWNED BY mob_tags.id_tag; -- -- TOC entry 295 (class 1259 OID 32768) -- Name: mob_user_activation_id_activation_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE mob_user_activation_id_activation_seq AS integer START WITH 1 INCREMENT BY 3 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE mob_user_activation_id_activation_seq OWNER TO postgres; -- -- TOC entry 5067 (class 0 OID 0) -- Dependencies: 295 -- Name: mob_user_activation_id_activation_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE mob_user_activation_id_activation_seq OWNED BY general_users_activation.id_activation; -- -- TOC entry 289 (class 1259 OID 18825) -- Name: mob_web_page; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE mob_web_page ( id_web_page integer NOT NULL, title character varying, url character varying, collection character varying, category character varying, width integer, height integer, capture text ); ALTER TABLE mob_web_page OWNER TO postgres; -- -- TOC entry 290 (class 1259 OID 24595) -- Name: segmentation_details_id_details_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE segmentation_details_id_details_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE segmentation_details_id_details_seq OWNER TO postgres; -- -- TOC entry 5068 (class 0 OID 0) -- Dependencies: 290 -- Name: segmentation_details_id_details_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE segmentation_details_id_details_seq OWNED BY mob_segmentation_details.id_details; -- -- TOC entry 293 (class 1259 OID 24611) -- Name: segmentation_geo_id_details_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE segmentation_geo_id_details_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE segmentation_geo_id_details_seq OWNER TO postgres; -- -- TOC entry 5069 (class 0 OID 0) -- Dependencies: 293 -- Name: segmentation_geo_id_details_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE segmentation_geo_id_details_seq OWNED BY mob_segmentation_geo.id_details; -- -- TOC entry 292 (class 1259 OID 24609) -- Name: segmentation_geo_id_geo_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE segmentation_geo_id_geo_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE segmentation_geo_id_geo_seq OWNER TO postgres; -- -- TOC entry 5070 (class 0 OID 0) -- Dependencies: 292 -- Name: segmentation_geo_id_geo_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE segmentation_geo_id_geo_seq OWNED BY mob_segmentation_geo.id_geo; -- -- TOC entry 286 (class 1259 OID 18814) -- Name: user_id_user_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE user_id_user_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE user_id_user_seq OWNER TO postgres; -- -- TOC entry 5071 (class 0 OID 0) -- Dependencies: 286 -- Name: user_id_user_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE user_id_user_seq OWNED BY general_users.id_user; -- -- TOC entry 288 (class 1259 OID 18823) -- Name: web_page_id_web_page_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE web_page_id_web_page_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE web_page_id_web_page_seq OWNER TO postgres; -- -- TOC entry 5072 (class 0 OID 0) -- Dependencies: 288 -- Name: web_page_id_web_page_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE web_page_id_web_page_seq OWNED BY mob_web_page.id_web_page; -- -- TOC entry 4887 (class 2604 OID 18819) -- Name: general_users id_user; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY general_users ALTER COLUMN id_user SET DEFAULT nextval('user_id_user_seq'::regclass); -- -- TOC entry 4895 (class 2604 OID 32773) -- Name: general_users_activation id_activation; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY general_users_activation ALTER COLUMN id_activation SET DEFAULT nextval('mob_user_activation_id_activation_seq'::regclass); -- -- TOC entry 4896 (class 2604 OID 40980) -- Name: general_users_rols id_user_rol; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY general_users_rols ALTER COLUMN id_user_rol SET DEFAULT nextval('general_users_rols_id_user_rol_seq'::regclass); -- -- TOC entry 4898 (class 2604 OID 41005) -- Name: mob_collections id_collection; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY mob_collections ALTER COLUMN id_collection SET DEFAULT nextval('mob_collections_id_collection_seq'::regclass); -- -- TOC entry 4891 (class 2604 OID 24602) -- Name: mob_segmentation_details id_details; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY mob_segmentation_details ALTER COLUMN id_details SET DEFAULT nextval('segmentation_details_id_details_seq'::regclass); -- -- TOC entry 4893 (class 2604 OID 24616) -- Name: mob_segmentation_geo id_geo; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY mob_segmentation_geo ALTER COLUMN id_geo SET DEFAULT nextval('segmentation_geo_id_geo_seq'::regclass); -- -- TOC entry 4894 (class 2604 OID 24617) -- Name: mob_segmentation_geo id_details; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY mob_segmentation_geo ALTER COLUMN id_details SET DEFAULT nextval('segmentation_geo_id_details_seq'::regclass); -- -- TOC entry 4897 (class 2604 OID 40994) -- Name: mob_tags id_tag; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY mob_tags ALTER COLUMN id_tag SET DEFAULT nextval('mob_tags_id_tag_seq'::regclass); -- -- TOC entry 4890 (class 2604 OID 18828) -- Name: mob_web_page id_web_page; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY mob_web_page ALTER COLUMN id_web_page SET DEFAULT nextval('web_page_id_web_page_seq'::regclass); -- -- TOC entry 4910 (class 2606 OID 40985) -- Name: general_users_rols general_users_rols_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY general_users_rols ADD CONSTRAINT general_users_rols_pkey PRIMARY KEY (id_user_rol); -- -- TOC entry 4914 (class 2606 OID 41010) -- Name: mob_collections mob_collections_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY mob_collections ADD CONSTRAINT mob_collections_pkey PRIMARY KEY (id_collection); -- -- TOC entry 4912 (class 2606 OID 40999) -- Name: mob_tags mob_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY mob_tags ADD CONSTRAINT mob_tags_pkey PRIMARY KEY (id_tag); -- -- TOC entry 4908 (class 2606 OID 32775) -- Name: general_users_activation mob_user_activation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY general_users_activation ADD CONSTRAINT mob_user_activation_pkey PRIMARY KEY (id_activation); -- -- TOC entry 4904 (class 2606 OID 24608) -- Name: mob_segmentation_details segmentation_details_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY mob_segmentation_details ADD CONSTRAINT segmentation_details_pkey PRIMARY KEY (id_details); -- -- TOC entry 4906 (class 2606 OID 24622) -- Name: mob_segmentation_geo segmentation_geo_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY mob_segmentation_geo ADD CONSTRAINT segmentation_geo_pkey PRIMARY KEY (id_geo); -- -- TOC entry 4900 (class 2606 OID 18822) -- Name: general_users user_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY general_users ADD CONSTRAINT user_pkey PRIMARY KEY (id_user); -- -- TOC entry 4902 (class 2606 OID 18833) -- Name: mob_web_page web_page_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY mob_web_page ADD CONSTRAINT web_page_pkey PRIMARY KEY (id_web_page); -- -- TOC entry 4915 (class 2606 OID 24628) -- Name: mob_segmentation_geo segmentation_geo_id_details_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY mob_segmentation_geo ADD CONSTRAINT segmentation_geo_id_details_fkey FOREIGN KEY (id_details) REFERENCES mob_segmentation_details(id_details) ON DELETE CASCADE; -- -- TOC entry 5051 (class 0 OID 0) -- Dependencies: 16 -- Name: public; Type: ACL; Schema: -; Owner: postgres -- GRANT ALL ON SCHEMA public TO PUBLIC; -- Completed on 2018-05-02 18:43:26 -- -- PostgreSQL database dump complete --
-- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: tattooliste -- ------------------------------------------------------ -- Server version 5.5.5-10.0.17-MariaDB-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `person_types` -- DROP TABLE IF EXISTS `person_types`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `person_types` ( `id` int(11) NOT NULL AUTO_INCREMENT, `parent` int(11) DEFAULT NULL, `person_name` varchar(50) NOT NULL, `description` mediumtext, `do_not_leak` tinyint(1) DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `parent_id_idx` (`parent`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `person_types` -- LOCK TABLES `person_types` WRITE; /*!40000 ALTER TABLE `person_types` DISABLE KEYS */; INSERT INTO `person_types` VALUES (1,NULL,'User','Regular user.',0),(2,1,'Private Person','Private Person - NEVER show his personal data',1),(3,1,'Studio Owner','The studio owner can modify his own (and only his own) studio information. He add other accounts as staff, which are able to modify the same data.',0),(4,3,'Studio Staff','The studio staff can do the same as the owner, besides deleting the studio entirely.',0),(5,NULL,'Tattooliste','Website staff.',0); /*!40000 ALTER TABLE `person_types` 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 2015-12-15 12:22:32
DROP DATABASE `my_database`;
DELETE FROM tbl_NotaItem DELETE FROM tbl_NotaFiscal DELETE FROM tbl_EntradaItens WHERE CodEntrada IN (SELECT CodEntrada FROM tbl_Entrada WHERE FlgTipoEntrada IN ('T', 'E')) DELETE FROM tbl_Entrada WHERE FlgTipoEntrada in ('T', 'E') DELETE FROM tbl_LocacaoEstornoItens DELETE FROM tbl_LocacaoEstorno DELETE FROM tbl_LocacaoItens DELETE FROM tbl_Locacao --delete from tbl_Estoque DELETE FROM tbl_Recibo DELETE FROM tbl_ReciboEstorno DBCC CHECKIDENT ('tbl_locacao', RESEED, 0) --DBCC CHECKIDENT ('tbl_entrada', RESEED, 0) --DBCC CHECKIDENT ('tbl_entrada', RESEED, 52) update tbl_Parametros set SisNumNotaRem = 0, SisNumNotaRet=0, SisNumRecibo = 0 --SELECT * UPDATE A SET QtdEstoque = Quantidade FROM tbl_Estoque A INNER JOIN (select CodProduto, Quantidade = SUM(Quantidade) from tbl_EntradaItens group by CodProduto) B ON B.CodProduto = A.CodProduto
SELECT d.driver_id, SUM(CASE WHEN b.state='COMPLETED' THEN 1 ELSE 0 END) AS number_of_completed_rides, SUM(CASE WHEN (b.state='CANCELLED_PASSENGER' OR b.state='CANCELLED_DRIVER') THEN 1 ELSE 0 END) AS number_of_cancelled_rides, COUNT(DISTINCT CASE WHEN b.state='COMPLETED' THEN b.passenger_id END) AS number_of_unique_passengers, ROUND( SUM(CASE WHEN b.state='COMPLETED' THEN b.fare ELSE 0 END), 2 ) AS total_fare, ROUND( SUM(CASE WHEN b.state='COMPLETED' THEN b.fare ELSE 0 END) * 0.2, 2 ) AS total_commission FROM drivers d JOIN bookings b ON (b.driver_id=d.driver_id) WHERE d.email LIKE '%fvtaxi%' OR d.email LIKE '%fvdrive%'; GROUP BY driver_id HAVING number_of_completed_rides > 10 AND number_of_unique_passengers < 5 ORDER BY number_of_completed_rides DESC;
insert into role (role_name) value ('ordinary'), ('vip'), ('wx_user');
/** * @package Joomla.Component * @copyright (c) 2017-2019 Libor Gabaj * @license GNU General Public License version 2 or later; see LICENSE.txt * @since 3.8 */ /** * Remove agenda tables */ DROP TABLE IF EXISTS `#__gbjfamily_events`; DROP TABLE IF EXISTS `#__gbjfamily_devices`; DROP TABLE IF EXISTS `#__gbjfamily_vacations`; DROP TABLE IF EXISTS `#__gbjfamily_projects`; DROP TABLE IF EXISTS `#__gbjfamily_incomes`; DROP TABLE IF EXISTS `#__gbjfamily_assets`; DROP TABLE IF EXISTS `#__gbjfamily_facts`; DROP TABLE IF EXISTS `#__gbjfamily_expenses`; DROP TABLE IF EXISTS `#__gbjfamily_fuels`; DROP TABLE IF EXISTS `#__gbjfamily_cashflows`;
ALTER TABLE proveedor ADD informacion_actualizada boolean DEFAULT false;
set my.pluginname to 'newrecordv100_inner_home_crm_trainers_new'; delete from core_plugin_param_value where mykatastima=:mykatastima and fkplugin in (select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))); -- DLS20161014 INSERT INTO core_plugin_param_value( mykatastima,fkplugin, paramname, paramvalue) VALUES (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+formrows','3'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+title+title','addnewcustomertitle'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+portlet+attributes+class','col-md-12 col-sm-12'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+portlet+attributes+id','NewRecord'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+portlet+attributes+data-writetbl','corecrmtrainer'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+portlet+attributes+data-writetblpk','id'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+portlet+attributes+data-extra','0'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+portlet+attributes+style','padding: 10px; margin-bottom: 5px;'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+10+type','input'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+10+permissions+r','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+10+permissions+w','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+10+label+trans_text','epwnimotitle'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+10+label+required','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+10+label+attributes+class','control-label'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+10+attributes+class','form-control text-center new-record-field new-record-field-validation'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+10+attributes+type','text'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+10+attributes+name','clname_new_record'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+10+attributes+data-name','lname'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+10+attributes+data-type','simpletext'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+10+attributes+data-title','lastnameerrortitle'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+10+attributes+data-validation-required','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+20+type','input'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+20+permissions+r','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+20+permissions+w','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+20+label+trans_text','onomatitle'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+20+label+required','0'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+20+label+attributes+class','control-label'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+20+attributes+class','form-control text-center new-record-field'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+20+attributes+type','text'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+20+attributes+name','cfname_new_record'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+20+attributes+data-name','fname'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+20+attributes+data-type','simpletext'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+20+attributes+data-title','firstnameerrortitle'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+20+attributes+data-validation-required','0'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+type','input'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+permissions+r','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+permissions+w','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+label+trans_text','kinitotitle'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+label+required','0'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+label+attributes+class','control-label'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+attributes+class','form-control text-center new-record-field'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+attributes+type','text'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+attributes+name','cmobile_new_record'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+attributes+value',''), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+attributes+maxlength','10'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+attributes+data-name','telmobile'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+attributes+data-type','integer'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+attributes+data-title','mobileerrortitle'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+attributes+data-validation-required','0'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+attributes+data-validation-number','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+attributes+data-validation-min','0'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+attributes+data-validation-max','nolimit'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+icon+static','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+icon+placement','R'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+icon+type','fa'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+40+icon+class','fa-mobile'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+type','input'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+permissions+r','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+permissions+w','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+label+trans_text','statherotitle'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+label+required','0'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+label+attributes+class','control-label'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+attributes+class','form-control text-center new-record-field'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+attributes+type','text'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+attributes+name','clandline_new_record'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+attributes+value',''), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+attributes+maxlength','10'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+attributes+data-name','telland'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+attributes+data-type','integer'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+attributes+data-title','statheroerrortitle'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+attributes+data-validation-required','0'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+attributes+data-validation-number','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+attributes+data-validation-min','0'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+attributes+data-validation-max','nolimit'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+icon+static','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+icon+placement','R'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+icon+type','fa'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+50+icon+class','fa-phone'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+60+type','input'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+60+permissions+r','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+60+permissions+w','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+60+label+trans_text','genethliatitle'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+60+label+required','0'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+60+label+attributes+class','control-label'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+60+attributes+class','form-control text-center new-record-field'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+60+attributes+type','text'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+60+attributes+name','cbirthday_new_record'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+60+attributes+data-name','birthday'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+60+attributes+data-type','datepicker'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+60+attributes+data-title','genethliaerrortitle'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+60+attributes+data-validation-required','0'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+60+icon+static','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+60+icon+placement','R'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+60+icon+type','fa'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+60+icon+class','fa-calendar'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+70+type','input'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+70+permissions+r','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+70+permissions+w','1'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+70+label+trans_text','Email'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+70+label+required','0'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+70+label+attributes+class','control-label'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+70+attributes+class','form-control text-center new-record-field'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+70+attributes+type','text'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+70+attributes+name','codarth_new_record'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+70+attributes+data-name','email'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+70+attributes+data-type','simpletext'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+70+attributes+data-title','Emailerrortitle'), (:mykatastima,(select id from core_plugin where mykatastima=:mykatastima and pluginname=(SELECT current_setting('my.pluginname'))), 'newrecord+fields+70+attributes+data-validation-required','0');
/* Name : spActionOnEnd Object Type: STORED PROCEDURE Dependency : TABLE: - DEBUG_LOG FUNCTION : - saynull - statuscode STORED PROCEDURE : - spDebugLogger */ use BIGGYM; drop procedure if exists spActionOnEnd; delimiter $$ create procedure spActionOnEnd(in ObjectName varchar(128), in SprocName varchar(128), in ObjectId mediumint unsigned, in FinalStatus varchar(64), in FinalComment varchar(1024), in ReturnCode int, in ErrorCode int, in ErrorState int, in ErrorMsg varchar(512)) begin -- Initialise .. declare delim char(3) default '-:-'; set FinalComment = concat(FinalComment, delim, 'OBJECT ID = <', saynull(ObjectId), '>'); set FinalComment = concat(FinalComment, delim, statuscode(FinalStatus)); -- Action .. call spDebugLogger (database(), ObjectName, SprocName, FinalComment, ReturnCode, ErrorCode, ErrorState, ErrorMsg); end$$ delimiter ; /* Sample Usage: */
-- begin SEC_USER alter table SEC_USER add column DTYPE varchar(100) ^ update SEC_USER set DTYPE = 'webdavdemo$ContractUser' where DTYPE is null ^ -- end SEC_USER -- begin WEBDAV_DEMO_CONTRACT_WD_WITH_ENABLED_VERSIONING create table WEBDAV_DEMO_CONTRACT_WD_WITH_ENABLED_VERSIONING ( ID uuid, VERSION integer not null, CREATE_TS timestamp, CREATED_BY varchar(50), UPDATE_TS timestamp, UPDATED_BY varchar(50), DELETE_TS timestamp, DELETED_BY varchar(50), -- NUMBER_ varchar(255) not null, CONTRACTOR_ID uuid not null, DOCUMENT_ID uuid not null, -- primary key (ID) )^ -- end WEBDAV_DEMO_CONTRACT_WD_WITH_ENABLED_VERSIONING -- begin WEBDAV_DEMO_CONTRACT_FD_WITH_ENABLED_WEBDAV_ENABLED_VERSIONING create table WEBDAV_DEMO_CONTRACT_FD_WITH_ENABLED_WEBDAV_ENABLED_VERSIONING ( ID uuid, VERSION integer not null, CREATE_TS timestamp, CREATED_BY varchar(50), UPDATE_TS timestamp, UPDATED_BY varchar(50), DELETE_TS timestamp, DELETED_BY varchar(50), -- NUMBER_ varchar(255) not null, CONTRACTOR_ID uuid not null, DOCUMENT_ID uuid, -- primary key (ID) )^ -- end WEBDAV_DEMO_CONTRACT_FD_WITH_ENABLED_WEBDAV_ENABLED_VERSIONING -- begin WEBDAV_DEMO_CONTRACT_FD_WITH_DEFAULT_BEHAVIOUR create table WEBDAV_DEMO_CONTRACT_FD_WITH_DEFAULT_BEHAVIOUR ( ID uuid, VERSION integer not null, CREATE_TS timestamp, CREATED_BY varchar(50), UPDATE_TS timestamp, UPDATED_BY varchar(50), DELETE_TS timestamp, DELETED_BY varchar(50), -- NUMBER_ varchar(255) not null, CONTRACTOR_ID uuid not null, DOCUMENT_ID uuid not null, -- primary key (ID) )^ -- end WEBDAV_DEMO_CONTRACT_FD_WITH_DEFAULT_BEHAVIOUR -- begin WEBDAV_DEMO_CONTRACT_WD_WITH_DISABLED_VERSIONING create table WEBDAV_DEMO_CONTRACT_WD_WITH_DISABLED_VERSIONING ( ID uuid, VERSION integer not null, CREATE_TS timestamp, CREATED_BY varchar(50), UPDATE_TS timestamp, UPDATED_BY varchar(50), DELETE_TS timestamp, DELETED_BY varchar(50), -- NUMBER_ varchar(255) not null, CONTRACTOR_ID uuid not null, DOCUMENT_ID uuid not null, -- primary key (ID) )^ -- end WEBDAV_DEMO_CONTRACT_WD_WITH_DISABLED_VERSIONING -- begin WEBDAV_DEMO_CONTRACT_FD_WITH_ENABLED_WEBDAV_DISABLED_VERSIONING create table WEBDAV_DEMO_CONTRACT_FD_WITH_ENABLED_WEBDAV_DISABLED_VERSIONING ( ID uuid, VERSION integer not null, CREATE_TS timestamp, CREATED_BY varchar(50), UPDATE_TS timestamp, UPDATED_BY varchar(50), DELETE_TS timestamp, DELETED_BY varchar(50), -- NUMBER_ varchar(255) not null, CONTRACTOR_ID uuid not null, DOCUMENT_ID uuid not null, -- primary key (ID) )^ -- end WEBDAV_DEMO_CONTRACT_FD_WITH_ENABLED_WEBDAV_DISABLED_VERSIONING -- begin WEBDAV_DEMO_CONTRACT_FD_WITH_DISABLED_WEBDAV create table WEBDAV_DEMO_CONTRACT_FD_WITH_DISABLED_WEBDAV ( ID uuid, VERSION integer not null, CREATE_TS timestamp, CREATED_BY varchar(50), UPDATE_TS timestamp, UPDATED_BY varchar(50), DELETE_TS timestamp, DELETED_BY varchar(50), -- NUMBER_ varchar(255) not null, CONTRACTOR_ID uuid not null, DOCUMENT_ID uuid not null, -- primary key (ID) )^ -- end WEBDAV_DEMO_CONTRACT_FD_WITH_DISABLED_WEBDAV -- begin WEBDAV_DEMO_CONTRACT_WD_WITH_DEFAULT_BEHAVIOUR create table WEBDAV_DEMO_CONTRACT_WD_WITH_DEFAULT_BEHAVIOUR ( ID uuid, VERSION integer not null, CREATE_TS timestamp, CREATED_BY varchar(50), UPDATE_TS timestamp, UPDATED_BY varchar(50), DELETE_TS timestamp, DELETED_BY varchar(50), -- NUMBER_ varchar(255) not null, CONTRACTOR_ID uuid not null, DOCUMENT_ID uuid not null, -- primary key (ID) )^ -- end WEBDAV_DEMO_CONTRACT_WD_WITH_DEFAULT_BEHAVIOUR
--liquibase formatted sql --changeset hanuska1:items-1 CREATE TABLE ITEM_TYPE( ID_ITEM_TYPE BIGINT(19) NOT NULL AUTO_INCREMENT, NAME VARCHAR(255), ACTIVITY VARCHAR(255), ID_MATERIAL BIGINT(19), PRIMARY KEY (ID_ITEM_TYPE), CONSTRAINT FK_ITEMTYPE_MATERIAL FOREIGN KEY (ID_MATERIAL) REFERENCES MATERIAL(ID_MATERIAL) ); CREATE TABLE ITEM( ID_ITEM BIGINT(19) NOT NULL AUTO_INCREMENT, NAME VARCHAR(255), ID_ITEM_TYPE BIGINT(19), LEVEL INT, IMG_URL VARCHAR(255), PRIMARY KEY (ID_ITEM), CONSTRAINT FK_ITEM_ITEMTYPE FOREIGN KEY (ID_ITEM_TYPE) REFERENCES ITEM_TYPE(ID_ITEM_TYPE) ); CREATE TABLE USER_ITEM( ID_USER_ITEM BIGINT(19) NOT NULL AUTO_INCREMENT, ID_APP_USER BIGINT(19), ID_ITEM BIGINT(19), PRIMARY KEY (ID_USER_ITEM), CONSTRAINT FK_USERITEM_USER FOREIGN KEY (ID_APP_USER) REFERENCES APP_USER(ID_APP_USER), CONSTRAINT FK_USERITEM_ITEM FOREIGN KEY (ID_ITEM) REFERENCES ITEM(ID_ITEM) ); --changeset hanuska1:items-2 insert into item_type (name, activity, id_material) values ("AXE", "MINE", 3), ("PICKAXE", "MINE", 4), ("LADDER", "MINE", 2); insert into item(name, id_item_type, level, img_url) values ("Sekera", 1, 1, "axe.jpg"), ("Bronzová sekera", 1, 2, "bronze_axe.jpg"), ("Stříbrná sekera", 1, 3, "siver_axe.jpg"), ("Zlatá sekyra", 1, 4, "gold_axe.jpg"), ("Krumpáč", 2, 1, "pickaxe.jpg"), ("Bronzový krumpáč", 2, 2, "bronze_pickaxe.jpg"), ("Stříbrný krumpáč", 2, 3, "silver_pickaxe.jpg"), ("Zlatý krumpáč", 2, 4, "gold_pickaxe.jpg"), ("Žebřík", 3, 1, "ladder.jpg"), ("Bronzový žebřík", 3, 2, "bronze_ladder.jpg"), ("Stříbrný žebřík", 3, 3, "silver_ladder.jpg"), ("Zlatý žebřík", 3, 4, "gold_ladder.jpg"); --changeset hanuska1:items-3 alter table item_type add PRICE bigint(19) default 100;
CREATE DATABASE [Cedar] ON PRIMARY ( NAME = N'Cedar1', FILENAME = N'@DatabasePath\Cedar.mdf' , SIZE = 2304KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ), FILEGROUP [CedarFileStreamGroup] CONTAINS FILESTREAM DEFAULT ( NAME = N'Cedar2', FILENAME = N'@DatabasePath\Cedar_filestream' ) LOG ON ( NAME = N'Cedarlog1', FILENAME = N'@DatabasePath\Cedar_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) ALTER DATABASE [Cedar] SET COMPATIBILITY_LEVEL = 100;
# --- !Ups ALTER TABLE person add column display_name varchar(255) not null default ''; # --- !Downs ALTER TABLE person drop column display_name;
insert into Clientes values ('APampin', 'Alberto Pampin', 'ap', 'Bar de Arriba', 'alberto.pampin@rai.usc.es', '678 98 09 12'); insert into Clientes values ('ASande', 'Antonio Sande', 'as' ,'Avda de Villagarcia', 'antonio.sande@rai.usc.es', '671 23 45'); insert into Clientes values ('FSaa', 'Francisco Saa','fs', 'Monte da Condesa', 'fran.saa@rai.usc.es', '654 34 23 12'); insert into Clientes values ('DSoler', 'David Soler', 'ds', 'Rua da Rosa', 'david.soler@rai.usc.es', '673 45 67 98'); insert into Clientes values ('MVentoso','Miguel Ventoso', 'mv', 'Ruta', 'miguel.ventoso@rai.usc.es', '689 93 45 12'); insert into Clientes values ('GVilarino', 'Gabriel Vilarino', 'gv', 'Rua de San Clemente', 'gv69@actimel.com', '689 90 67 12'); insert into Empleados values ('46092244Z', 'Alberto Pampin', 'ap', 'Bar de Arriba', 'alberto.pampin@rai.usc.es', '678 98 09 12', '2000', 'FALSE', 'FALSE', 'TRUE'); insert into Empleados values ('1234568X', 'Antonio Sande', 'as' ,'Avda de Villagarcia', 'antonio.sande@rai.usc.es', '671 23 45', '2000', 'TRUE', 'TRUE', 'FALSE'); insert into Empleados values ('98765432Y', 'Francisco Saa','fs', 'Monte da Condesa', 'fran.saa@rai.usc.es', '654 34 23 12', '2000', 'TRUE', 'TRUE', 'FALSE'); insert into Empleados values ('45362789W', 'David Soler', 'ds', 'Rua da Rosa', 'david.soler@rai.usc.es', '673 45 67 98', '2000', 'TRUE', 'TRUE', 'FALSE'); insert into Empleados values ('09890981V','Miguel Ventoso', 'mv', 'Rua de Alfredo', 'miguel.ventoso@rai.usc.es', '689 93 45 12', '2000', 'TRUE', 'TRUE', 'FALSE'); insert into Empleados values ('19827364T', 'Gabriel Vilarino', 'gv', 'Rua de San Clemente', 'gv69@actimel.com', '689 90 67 12', '2000', 'TRUE', 'FALSE', 'FALSE'); insert into PCs(id) values (DEFAULT); insert into PCs(id) values (DEFAULT); insert into PCs(id) values (DEFAULT); insert into PCs(id) values (DEFAULT); insert into PCs(id) values (DEFAULT); insert into PCs(id) values (DEFAULT); insert into PCs(id) values (DEFAULT); insert into EjemplaresVenta (pc, nombre, precio, fechaCreacion, cliente, empleado, fechaCompraPc) values ('1', 'XiaomiPro', '1500', '2018-11-11', 'ASande', '19827364T', '2018-11-12'); insert into EjemplaresVenta (pc, nombre, precio, fechaCreacion, cliente, empleado, fechaCompraPc) values ('2', 'MacPro', '9500', '2018-11-21', 'GVilarino', '45362789W', '2018-11-22'); insert into EjemplaresVenta (pc, nombre, precio, fechaCreacion) values ('3', 'HPPerron', '2500', '2018-11-21'); insert into AReparar (pc, descripcion, cliente, fechaIngreso, empleadoIngreso) values ('4','MorteDePC', 'MVentoso', '2018-11-21', '19827364T'); insert into AReparar (pc, descripcion, cliente, fechaIngreso, fechaRetirada, empleadoIngreso, empleadoRetirada) values ('5','MorteDePC', 'DSoler', '2019-01-21', '2019-02-21', '45362789W', '1234568X'); insert into AReparar (pc, descripcion, cliente, fechaIngreso, empleadoIngreso) values ('7','Funciona mal', 'DSoler', '2019-01-21', '45362789W'); --GPUs insert into Componentes values ('GTX_2080', 'ASUS', '1200', 'GPU ideal para el Fornite'); insert into Componentes values ('GTX_2070', 'MSI', '1000', 'GPU ideal para el Minecraft'); insert into Componentes values ('GTX_1080', 'NVIDIA', '800', 'GPU ideal para COGA'); insert into GPUs values ('GTX_2080', '88', '1200', '12'); insert into GPUs values ('GTX_2070', '68', '900', '12'); insert into GPUs values ('GTX_1080', '18', '100', '12'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('GTX_2080', '2019-01-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('GTX_2080', '2019-01-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('GTX_2080', '2019-01-11'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('GTX_2070', '2019-01-11'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('GTX_2070', '2019-01-13'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('GTX_1080', '2019-01-11'); insert into EjemplaresComponente (componente, cliente, empleado, fechaTiendaCompraEjemplar, fechaClienteCompraEjemplar) values ( 'GTX_2080', 'ASande', '1234568X', '2019-01-21', '2019-02-21'); insert into EjemplaresComponente (componente, cliente, empleado, fechaTiendaCompraEjemplar, fechaClienteCompraEjemplar) values ( 'GTX_2070', 'FSaa', '45362789W', '2019-01-11', '2019-02-01'); --CPUs insert into Componentes values ('i3-8100', 'Intel', '119.99', 'CPU versatil, calidad-precio optimos'); insert into CPUs values ('i3-8100', '1150', '4', '8', '2.3','65.2', 'Coffee Lake'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('i3-8100', '2018-10-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('i3-8100', '2018-01-23'); insert into Componentes values ('i5-8400', 'Intel', '193.99', 'CPU versatil, calidad-precio optimos'); insert into CPUs values ('i5-8400', '1151', '6', '12', '2.8','85.2', 'Coffee Lake'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('i5-8400', '2018-01-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('i5-8400', '2018-11-23'); insert into Componentes values ('i7-7700K', 'Intel', '385.99', 'CPU de maxima velocidad'); insert into CPUs values ('i7-7700K', '1151', '6', '12', '4.2','91', 'Kaby Lake'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('i7-7700K', '2018-04-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('i7-7700K', '2018-05-13'); insert into Componentes values ('Extreme i9-9980XE', 'Intel', '2099', 'CPU con el mayor rendimiento del mercado'); insert into CPUs values ('Extreme i9-9980XE', '2066', '18', '36', '3.0','170', 'Kaby Lake'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Extreme i9-9980XE', '2019-01-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Extreme i9-9980XE', '2019-04-13'); insert into Componentes values ('Ryzen5 2600', 'AMD', '185.99', 'CPU de alto rendimiento'); insert into CPUs values ('Ryzen5 2600', 'AM3', '4', '8', '3.4','61', 'Zen'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Ryzen5 2600', '2019-07-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Ryzen5 2600', '2019-02-13'); insert into Componentes values ('Ryzen7 1800X', 'AMD', '385.99', 'CPU de alto rendimiento'); insert into CPUs values ('Ryzen7 1800X', 'FM2', '8', '16', '3.6','81', 'Zen'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Ryzen7 1800X', '2019-04-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Ryzen7 1800X', '2019-05-13'); insert into Componentes values ('Threadripper 2990WX', 'AMD', '1850.99', 'CPU mas potente del mercado'); insert into CPUs values ('Threadripper 2990WX', 'AMTR4', '32', '64', '3.2','250', 'Zen'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Threadripper 2990WX', '2019-01-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Threadripper 2990WX', '2019-04-13'); --Placas Base insert into Componentes values ('GA-B360M DS3H', 'Gigabyte', '75.96', 'Placa base con gran relacion calidad-precio'); insert into PlacasBase values ('GA-B360M DS3H', 'Intel B360', '12.23'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('GA-B360M DS3H', '2018-07-03'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('GA-B360M DS3H', '2019-01-13'); insert into Componentes values ('Z370-A Pro', 'MSI', '105.96', 'Placa base con luces LED en color blanco.'); insert into PlacasBase values ('Z370-A Pro', 'Intel Z370 Chipset', '12.23'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Z370-A Pro', '2019-06-11'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Z370-A Pro', '2019-03-13'); insert into Componentes values ('X399 AORUS Pro', 'Gigabyte', '304.56', 'Placa base para productividad del mundo real o entretenimiento de VR'); insert into PlacasBase values ('X399 AORUS Pro', 'AMD X399', '10.23'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('X399 AORUS Pro', '2018-02-14'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('X399 AORUS Pro', '2019-04-13'); insert into Componentes values ('Z10PE-D16 WS', 'ASUS', '494.56', 'Placa base con potencia gráfica suprema con IPMI 2.0'); insert into PlacasBase values ('Z10PE-D16 WS', 'Intel C612 PCH', '12.36'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Z10PE-D16 WS', '2019-01-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Z10PE-D16 WS', '2017-01-13'); insert into Componentes values ('Z390 AORUS Xtreme', 'Gigabyte', '1147.99', 'La nueva definición de placa base'); insert into PlacasBase values ('Z390 AORUS Xtreme', 'Intel Z390 Express', '16.33'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Z390 AORUS Xtreme', '2019-01-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Z390 AORUS Xtreme', '2017-11-23'); --RAMs insert into Componentes values ('Crucial 2400', 'Crucial', '52.99', 'RAM optimizada para la siguiente gen de procesadores'); insert into RAMs values ('Crucial 2400', 'DDR4', '8', '2400', 'Sobremesa'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Crucial 2400', '2019-01-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Crucial 2400', '2017-01-13'); insert into Componentes values ('G.Skill Trident Z', 'G.Skill', '149.99', 'RAM que ofrece soluciones para un rendimiento increíble'); insert into RAMs values ('G.Skill Trident Z', 'DDR4', '16', '3200', 'Sobremesa'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('G.Skill Trident Z', '2018-12-29'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('G.Skill Trident Z', '2018-01-03'); insert into Componentes values ('Vengeance LPX', 'Corsair', '95.99', 'RAM diseñada para overclocking de alto rendimiento'); insert into RAMs values ('Vengeance LPX', 'DDR4', '16', '2400', 'Sobremesa'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Vengeance LPX', '2019-01-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Vengeance LPX', '2017-11-23'); insert into Componentes values ('Predator RGB', 'HyperX', '389.99', 'RAM diseñada para overclocking de alto rendimiento'); insert into RAMs values ('Predator RGB', 'DDR4', '32', '2400', 'Sobremesa'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Predator RGB', '2019-01-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Predator RGB', '2018-01-13'); insert into Componentes values ('Vengeance RGB PRO', 'Corsair', '959.89', 'La memoria overclockeada de la serie DDR4 ilumina su PC con una fascinante iluminación RGB '); insert into RAMs values ('Vengeance RGB PRO', 'DDR4', '64', '3600', 'Sobremesa'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Vengeance RGB PRO', '2019-03-02'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('Vengeance RGB PRO', '2018-11-23'); --Discos Duros insert into Componentes values ('A400', 'Kingston', '30.45', 'SSD de maxima velocidad'); insert into DiscosDuros values ('A400', 'SSD', '120', '500'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('A400', '2019-03-19'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('A400', '2019-01-13'); insert into Componentes values ('MG07ACA14TE', 'Toshiba', '669.69', 'HDD de gran capacidad'); insert into DiscosDuros values ('MG07ACA14TE', 'HDD', '14000', '220'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('MG07ACA14TE', '2019-01-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('MG07ACA14TE', '2018-01-13'); insert into Componentes values ('860 EVO Basic', 'Samsung', '85.88', 'SSD de maxima velocidad'); insert into DiscosDuros values ('860 EVO Basic', 'SSD', '500', '550'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('860 EVO Basic', '2019-01-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('860 EVO Basic', '2018-01-13'); insert into Componentes values ('BarraCuda', 'Seagate', '65.70', 'HDD Impresionante versatilidad. Fiabilidad inigualable'); insert into DiscosDuros values ('BarraCuda', 'HDD', '2000', '195'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('BarraCuda', '2019-02-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('BarraCuda', '2018-05-16'); insert into Componentes values ('3D Nand', 'WD Blue', '78.90', 'SSD preparada para sus necesidades informáticas de alto rendimiento,'); insert into DiscosDuros values ('3D Nand', 'SSD', '500', '550'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('3D Nand', '2019-03-15'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('3D Nand', '2019-01-03'); insert into Componentes values ('P300', 'Toshiba', '45.80', 'HDD de maxima calidad'); insert into DiscosDuros values ('P300', 'HDD', '1000', '200'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('P300', '2019-01-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('P300', '2018-01-13'); insert into Componentes values ('PlusV3', 'SanDisk', '194.90', 'SSD de maxima velocidad'); insert into DiscosDuros values ('PlusV3', 'SSD', '1000', '620'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('PlusV3', '2019-02-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('PlusV3', '2018-09-17'); --Alimentacion insert into Componentes values ('VS650', 'Corsair', '50.80', 'Cuenta con la compatibilidad y la fiabilidad que han hecho célebres a CORSAIR'); insert into Alimentacion values ('VS650','650', 'TRUE'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('VS650', '2019-03-03'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('VS650', '2017-01-08'); insert into Componentes values ('RM750X V2', 'Corsair', '120.90', 'Cuenta con la compatibilidad y la fiabilidad que han hecho célebres a CORSAIR'); insert into Alimentacion values ('RM750X V2','750', 'TRUE'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('RM750X V2', '2019-03-11'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('RM750X V2', '2018-06-03'); insert into Componentes values ('MasterWatt 750 V2', 'Cooler Master', '80.90', 'Experimente un funcionamiento sin ruido en las cargas normales de PC con una producción de 15%'); insert into Alimentacion values ('MasterWatt 750 V2','750', 'TRUE'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('MasterWatt 750 V2', '2019-03-21'); insert into EjemplaresComponente (componente, fechaTiendaCompraEjemplar) values ('MasterWatt 750 V2', '2018-05-19'); --Refrigeracion insert into Componentes values ('AndresFrioniesta', 'Kalise', '50', 'Refrigeracion de maxima calidad'); insert into Refrigeracion values ('AndresFrioniesta','CPU', '70'); insert into Componentes values ('XMouseKiller300', 'Razer', '50', 'Raton ultra gaming'); insert into Perifericos values ('XMouseKiller300','Raton'); insert into Componentes values ('MaxiKeyboard', 'Razer', '150', 'Teclado ultra gaming'); insert into Perifericos values ('MaxiKeyboard','Teclado'); insert into Componentes values ('MaxiKeyboardPro', 'Razer', '350', 'Teclado ultra gaming'); insert into Perifericos values ('MaxiKeyboardPro','Teclado'); insert into Componentes values ('AlfombraLolitoFDEZ', 'Razer', '350', 'Alfombrilla ultra gaming'); insert into Perifericos values ('AlfombraLolitoFDEZ','Alfombrilla'); insert into Personalizados (pc, nombre, cliente, placaBase, cpu, gpu, numGPUs, ram, numRAMs, discoDuro1, numDiscoDuro1, alimentacion, refrigeracion1, periferico1, periferico2, periferico3) values ('6','BeastModeUltraPC', 'APampin', 'Z390 AORUS Xtreme','Threadripper 2990WX','GTX_2080','4','Vengeance RGB PRO', '4','PlusV3', '4','MasterWatt 750 V2','AndresFrioniesta', 'XMouseKiller300', 'MaxiKeyboardPro', 'AlfombraLolitoFDEZ'); insert into Reparar values ('5', '98765432Y', 'GTX_2070', '2019-03-21', '2350'); insert into Reparar values ('4', '09890981V', 'GTX_2070', '2019-03-21', '2350');
CREATE TABLE `/*databasename*/`.`toolTable` ( `id` iNT NOT NULL AUTO_INCREMENT , `oracle` INT NOT NULL , `css` INT NOT NULL , `libx` INT NOT NULL , `googledrive` INT NOT NULL , `notepadplus` INT NOT NULL , `html` INT NOT NULL , `filezilla` INT NOT NULL , `javascript` INT NOT NULL , `php` INT NOT NULL , `mysql` INT NOT NULL , PRIMARY KEY (`id`) );
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Servidor: db -- Tiempo de generación: 23-11-2020 a las 09:56:34 -- Versión del servidor: 10.5.6-MariaDB-1:10.5.6+maria~focal -- Versión de PHP: 7.4.11 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 */; -- -- Base de datos: `biblioteca` -- -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `copia_libros` -- CREATE TABLE `copia_libros` ( `id` int(11) NOT NULL, `isbn_libro` varchar(100) NOT NULL, `deteriodado` varchar(2) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `copia_libros` -- INSERT INTO `copia_libros` (`id`, `isbn_libro`, `deteriodado`) VALUES (1, '1232', 'no'), (2, '4565', 'si'), (3, '1232', 'si'), (4, '4565', 'no'), (5, '7898', 'no'), (6, '7898', 'si'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `editorial` -- CREATE TABLE `editorial` ( `id` int(11) NOT NULL, `nombre` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `editorial` -- INSERT INTO `editorial` (`id`, `nombre`) VALUES (1, 'Alianza'), (2, 'Ariel'), (3, 'Catedra'), (4, 'Tecnos'), (5, 'plesa'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `libros` -- CREATE TABLE `libros` ( `ISBN` varchar(100) NOT NULL, `titulo` varchar(100) NOT NULL, `editorial` int(11) NOT NULL, `anio_creacion` date NOT NULL, `autor` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `libros` -- INSERT INTO `libros` (`ISBN`, `titulo`, `editorial`, `anio_creacion`, `autor`) VALUES ('1232', 'Rey blanco', 3, '2019-11-12', 'Juan Gomez Jurado'), ('4565', 'Aquitania', 5, '2020-05-05', 'Eva Garcia Saenz de urturi'), ('7898', 'La ciudad de vapor', 5, '2020-11-08', 'Carlos Ruiz Zafon'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `prestamos` -- CREATE TABLE `prestamos` ( `id_copia_libro` int(11) NOT NULL, `codigo_socio` varchar(100) NOT NULL, `fecha_prestamo` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fecha_devolucion` date NOT NULL, `fecha_real_devolucion` date NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `prestamos` -- INSERT INTO `prestamos` (`id_copia_libro`, `codigo_socio`, `fecha_prestamo`, `fecha_devolucion`, `fecha_real_devolucion`) VALUES (1, '4565', '2020-11-23 09:38:43', '2020-10-14', '2020-11-25'), (1, '7898', '2020-11-23 09:38:43', '2020-10-13', '2020-10-29'), (5, '8525', '2020-11-23 09:39:04', '2020-10-12', '2020-11-12'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `socio` -- CREATE TABLE `socio` ( `codigo` varchar(100) NOT NULL, `dni` varchar(9) NOT NULL, `direccion` varchar(100) NOT NULL, `telefono` varchar(9) NOT NULL, `fecha_alta` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `nombre` varchar(100) NOT NULL, `apellidos` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `socio` -- INSERT INTO `socio` (`codigo`, `dni`, `direccion`, `telefono`, `fecha_alta`, `nombre`, `apellidos`) VALUES ('1232', 'a', 'barcelona', '789456123', '2020-11-23 09:28:38', 'Abraham', 'Chasing Luzón'), ('4565', 'b', 'hospitalet', '789456123', '2020-11-23 09:28:38', 'Jorge', 'Miralles'), ('7898', 'c', 'Santa Coloma', '456789123', '2020-11-23 09:29:18', 'Bryan', 'Chalan'), ('8525', 'd', 'Roma', '852741963', '2020-11-23 09:30:00', 'Ronald', 'Sotelo'); -- -- Índices para tablas volcadas -- -- -- Indices de la tabla `copia_libros` -- ALTER TABLE `copia_libros` ADD PRIMARY KEY (`id`), ADD KEY `fk_isbn_copia_libros` (`isbn_libro`); -- -- Indices de la tabla `editorial` -- ALTER TABLE `editorial` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `libros` -- ALTER TABLE `libros` ADD PRIMARY KEY (`ISBN`), ADD KEY `fk_editorial_libros` (`editorial`); -- -- Indices de la tabla `prestamos` -- ALTER TABLE `prestamos` ADD PRIMARY KEY (`id_copia_libro`,`codigo_socio`), ADD KEY `fk_codigo_socio_prestamos` (`codigo_socio`); -- -- Indices de la tabla `socio` -- ALTER TABLE `socio` ADD PRIMARY KEY (`codigo`); -- -- AUTO_INCREMENT de las tablas volcadas -- -- -- AUTO_INCREMENT de la tabla `copia_libros` -- ALTER TABLE `copia_libros` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT de la tabla `editorial` -- ALTER TABLE `editorial` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- Restricciones para tablas volcadas -- -- -- Filtros para la tabla `copia_libros` -- ALTER TABLE `copia_libros` ADD CONSTRAINT `fk_isbn_copia_libros` FOREIGN KEY (`isbn_libro`) REFERENCES `libros` (`ISBN`); -- -- Filtros para la tabla `libros` -- ALTER TABLE `libros` ADD CONSTRAINT `fk_editorial_libros` FOREIGN KEY (`editorial`) REFERENCES `editorial` (`id`); -- -- Filtros para la tabla `prestamos` -- ALTER TABLE `prestamos` ADD CONSTRAINT `fk_codigo_socio_prestamos` FOREIGN KEY (`codigo_socio`) REFERENCES `socio` (`codigo`), ADD CONSTRAINT `fk_copia_libro_prestamo` FOREIGN KEY (`id_copia_libro`) REFERENCES `copia_libros` (`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 */;
-- 从student表查询所有学生的学号(id)、姓名(name)和院系(department)的信息 SELECT id,name,department FROM student;
DELIMITER // DROP PROCEDURE IF EXISTS mybatis2.read_recordById // CREATE PROCEDURE mybatis2.read_recordById (IN emp_id INT) BEGIN SELECT * FROM student WHERE ID = emp_id; END// DELIMITER ;
-- MySQL dump 10.13 Distrib 5.6.30-76.3, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: ccontroller -- ------------------------------------------------------ -- Server version 5.6.30-76.3-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `ping_batch` -- DROP TABLE IF EXISTS `ping_batch`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ping_batch` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(10) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=69 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `ping_batch_ping` -- DROP TABLE IF EXISTS `ping_batch_ping`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ping_batch_ping` ( `batch_id` int(10) unsigned NOT NULL, `ping_id` int(10) unsigned NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `ping_responses` -- DROP TABLE IF EXISTS `ping_responses`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ping_responses` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `ping_id` bigint(20) NOT NULL, `from` int(10) unsigned NOT NULL, `seq` int(10) unsigned NOT NULL, `reply_size` int(10) unsigned NOT NULL, `reply_ttl` int(10) unsigned NOT NULL, `reply_proto` varchar(45) COLLATE utf8_unicode_ci NOT NULL, `rtt` int(10) unsigned NOT NULL, `probe_ipid` int(10) unsigned NOT NULL, `reply_ipid` int(10) unsigned NOT NULL, `icmp_type` int(10) unsigned NOT NULL, `icmp_code` int(10) unsigned NOT NULL, `tx` bigint(20) NOT NULL, `rx` bigint(20) NOT NULL, PRIMARY KEY (`id`), KEY `fk_ping_responses_1_idx` (`ping_id`), CONSTRAINT `pr_ping` FOREIGN KEY (`ping_id`) REFERENCES `pings` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=67779045 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `ping_stats` -- DROP TABLE IF EXISTS `ping_stats`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ping_stats` ( `ping_id` bigint(20) NOT NULL, `loss` float NOT NULL, `min` float NOT NULL, `max` float NOT NULL, `avg` float NOT NULL, `std_dev` float NOT NULL, KEY `fk_ping_stats_1_idx` (`ping_id`), CONSTRAINT `ps_ping` FOREIGN KEY (`ping_id`) REFERENCES `pings` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `pings` -- DROP TABLE IF EXISTS `pings`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `pings` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `src` int(10) unsigned NOT NULL, `dst` int(10) unsigned NOT NULL, `start` bigint(20) DEFAULT NULL, `ping_sent` int(10) unsigned DEFAULT NULL, `probe_size` int(10) unsigned DEFAULT NULL, `user_id` int(10) unsigned DEFAULT NULL, `ttl` int(10) unsigned DEFAULT NULL, `wait` int(10) unsigned DEFAULT NULL, `spoofed_from` int(10) unsigned DEFAULT NULL, `version` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL, `spoofed` tinyint(1) unsigned NOT NULL, `record_route` tinyint(1) unsigned NOT NULL, `payload` tinyint(1) unsigned NOT NULL, `tsonly` tinyint(1) unsigned NOT NULL, `tsandaddr` tinyint(3) unsigned NOT NULL, `icmptimestamp` tinyint(1) unsigned NOT NULL, `icmpsum` tinyint(1) unsigned NOT NULL, `dl` tinyint(1) unsigned NOT NULL, `8` tinyint(1) unsigned NOT NULL, `created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `label` varchar(100) NOT NULL, PRIMARY KEY (`id`), KEY `src_dst` (`src`,`dst`) USING BTREE, KEY `record_route` (`record_route`), KEY `label_created` (`label`,`created`), KEY `label` (`label`), KEY `created` (`created`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=118871350 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `record_routes` -- DROP TABLE IF EXISTS `record_routes`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `record_routes` ( `response_id` bigint(20) NOT NULL, `hop` tinyint(3) unsigned NOT NULL, `ip` int(10) unsigned NOT NULL, KEY `fk_record_routes_1_idx` (`response_id`), CONSTRAINT `rr_ping_responses` FOREIGN KEY (`response_id`) REFERENCES `ping_responses` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `timestamp_addrs` -- DROP TABLE IF EXISTS `timestamp_addrs`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `timestamp_addrs` ( `response_id` bigint(20) NOT NULL, `order` tinyint(3) unsigned NOT NULL, `ip` int(10) unsigned NOT NULL, `ts` int(10) unsigned DEFAULT NULL, KEY `fk_timestamp_addrs_1_idx` (`response_id`), CONSTRAINT `tsa_ping_responses` FOREIGN KEY (`response_id`) REFERENCES `ping_responses` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `timestamps` -- DROP TABLE IF EXISTS `timestamps`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `timestamps` ( `response_id` bigint(20) NOT NULL, `order` tinyint(3) unsigned NOT NULL, `ts` int(10) unsigned NOT NULL, KEY `fk_timestamps_1_idx` (`response_id`), CONSTRAINT `ts_ping_responses` FOREIGN KEY (`response_id`) REFERENCES `ping_responses` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `icmp_timestamps` -- DROP TABLE IF EXISTS `icmp_timestamps`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; origin_ts, receive_ts, transmit_ts CREATE TABLE `icmp_timestamps` ( `response_id` bigint(20) NOT NULL, `origin_ts` int(10) unsigned NOT NULL, `receive_ts` int(10) unsigned NOT NULL, `transmit_ts` int(10) unsigned NOT NULL, KEY `fk_icmp_timestamps_1_idx` (`response_id`), CONSTRAINT `icmp_ts_ping_responses` FOREIGN KEY (`response_id`) REFERENCES `ping_responses` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION ) ; -- -- Table structure for table `trace_batch` -- DROP TABLE IF EXISTS `trace_batch`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `trace_batch` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(10) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `trace_batch_trace` -- DROP TABLE IF EXISTS `trace_batch_trace`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `trace_batch_trace` ( `batch_id` int(10) unsigned NOT NULL, `trace_id` int(10) unsigned NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `traceroute_hops` -- DROP TABLE IF EXISTS `traceroute_hops`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `traceroute_hops` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `traceroute_id` bigint(20) NOT NULL, `hop` int(10) unsigned NOT NULL, `addr` int(10) unsigned NOT NULL, `probe_ttl` int(10) unsigned NOT NULL, `probe_id` int(10) unsigned NOT NULL, `probe_size` int(10) unsigned NOT NULL, `rtt` int(10) unsigned NOT NULL, `reply_ttl` int(10) unsigned NOT NULL, `reply_tos` int(10) unsigned DEFAULT NULL, `reply_size` int(10) unsigned DEFAULT NULL, `reply_ipid` int(10) unsigned DEFAULT NULL, `icmp_type` int(10) unsigned DEFAULT NULL, `icmp_code` int(10) unsigned DEFAULT NULL, `icmp_q_ttl` int(10) unsigned DEFAULT NULL, `icmp_q_ipl` int(10) unsigned DEFAULT NULL, `icmp_q_tos` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_traceroute_hops_1_idx` (`traceroute_id`), KEY `traceroute_id` (`traceroute_id`), CONSTRAINT `traceroute` FOREIGN KEY (`traceroute_id`) REFERENCES `traceroutes` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=81005906 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `traceroutes` -- DROP TABLE IF EXISTS `traceroutes`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `traceroutes` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `src` int(10) unsigned NOT NULL, `dst` int(10) unsigned NOT NULL, `type` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL, `user_id` int(10) unsigned NOT NULL, `method` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL, `sport` int(10) unsigned NOT NULL, `dport` int(10) unsigned NOT NULL, `stop_reason` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL, `stop_data` int(10) unsigned NOT NULL, `start` datetime NOT NULL, `version` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL, `hop_count` int(10) unsigned NOT NULL, `attempts` int(10) unsigned NOT NULL, `hop_limit` int(10) unsigned NOT NULL, `first_hop` int(10) unsigned NOT NULL, `wait` int(10) unsigned NOT NULL, `wait_probe` int(10) unsigned NOT NULL, `tos` int(10) unsigned NOT NULL, `probe_size` int(10) unsigned NOT NULL, `created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `label` varchar(100) NOT NULL, PRIMARY KEY (`id`), KEY `src_dst` (`src`,`dst`) USING BTREE, KEY `label` (`label`), KEY `start` (`start`), KEY `created` (`created`) ) ENGINE=InnoDB AUTO_INCREMENT=34137068 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `users` -- DROP TABLE IF EXISTS `users`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `max` int(10) unsigned NOT NULL DEFAULT '0', `delay` int(10) unsigned NOT NULL DEFAULT '0', `key` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', PRIMARY KEY (`id`), KEY `index2` (`key`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!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 2016-07-19 9:20:04
-- John Gnanasekaran -- Lab2 -- Query 5 SELECT DISTINCT u.userId, u.userName FROM chirpUsers u, chirpReads r, chirpFollowers f WHERE r.posterId = f.followerId AND f.userId = u.userId AND f.userId = r.postReader AND r.timesRead > 1;
SELECT properties.city as city, count(reservations) as total_reservations FROM properties JOIN reservations ON properties.id = property_id GROUP BY city ORDER BY total_reservations DESC;
ALTER TABLE tf_comment add ct_visible TINYINT(1) NULL default 0 COMMENT '是否不可见,0为可见1为不可见';
/* Formatted on 10/4/2016 11:28:44 AM (QP5 v5.149.1003.31008) */ SELECT 'ERC' || DN.DN_NUM "Access Method SID", NULL "Access Method Type SID", DN.DN_NUM "Access Method Value", DN.DN_STATUS "Access Method Status Type SID", DN.DN_STATUS_MOD_DATE "Status Start DateTime", DN.DN_STATUS_MOD_DATE "Status End DateTime" FROM DIRECTORY_NUMBER DN
DROP procedure IF EXISTS `bsp_dame_nombres_categorias`; DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `bsp_dame_nombres_categorias`() BEGIN /* Permite listar los nombres categorias dados de alta ordenadas por nombre. */ -- Control de el parametro 'pDesde' por si viene igualado a cero SELECT categoria FROM categorias WHERE EstadoCat = 'A' ORDER BY Categoria asc; END ;; DELIMITER ;
# ************************************************************ # MySQL: 5.7 # Database: mysql # Generation Time: 2019-04-13 11:24:33 +0000 # ************************************************************ # 这里引号有区别。一个是``反引号,一个是''引号 # /**/结尾都要以分号结尾 # Dump of table article # ------------------------------------------------------------ DROP TABLE IF EXISTS `article`; CREATE TABLE `article` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `author_id` int(11) NOT NULL, `title` varchar(32) DEFAULT NULL, `type` tinyint(4) DEFAULT NULL, `author` varchar(32) DEFAULT NULL, `content` text, `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY(`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; LOCK TABLES `article` WRITE; /*!40000 ALTER TABLE `article` DISABLE KEYS */; INSERT INTO `article` (`id`, `author_id`, `title`, `type`, `author`, `content`, `create_time`) VALUES (1,1,'MyBatis 源码分析系列文章导读',8,'coolblog','MyBatis 源码分析系列文章导读','2018-07-15 15:30:09'), (2,2,'HashMap 源码详细分析(JDK1.8)',1,'coolblog','HashMap 源码详细分析(JDK1.8)','2018-01-18 15:29:13'), (3,1,'Java CAS 原理分析',1,'coolblog','Java CAS 原理分析','2018-05-15 15:28:33'), (4,1,'Spring IOC 容器源码分析 - 获取单例 bean',4,'coolblog','Spring IOC 容器源码分析 - 获取单例 bean','2018-06-01 00:00:00'), (5,1,'Spring IOC 容器源码分析 - 循环依赖的解决办法',4,'coolblog','Spring IOC 容器源码分析 - 循环依赖的解决办法','2018-06-08 00:00:00'), (6,2,'Spring AOP 源码分析系列文章导读',4,'coolblog','Spring AOP 源码分析系列文章导读','2018-06-17 00:00:00'), (7,2,'Spring AOP 源码分析 - 创建代理对象',4,'coolblog','Spring AOP 源码分析 - 创建代理对象','2018-06-20 00:00:00'), (8,1,'Spring MVC 原理探秘 - 一个请求的旅行过程',4,'coolblog','Spring MVC 原理探秘 - 一个请求的旅行过程','2018-06-29 00:00:00'), (9,2,'Spring MVC 原理探秘 - 容器的创建过程',4,'coolblog','Spring MVC 原理探秘 - 容器的创建过程','2018-06-30 00:00:00'), (10,2,'Spring IOC 容器源码分析系列文章导读',4,'coolblog','Spring IOC 容器源码分析系列文章导读','2018-05-30 00:00:00'); /*!40000 ALTER TABLE `article` ENABLE KEYS */; UNLOCK TABLES; # Dump of table author #------------------------------------------------------------ DROP TABLE IF EXISTS `author`; CREATE TABLE `author` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(32) DEFAULT NULL, `age` tinyint(4) DEFAULT NULL, `sex` tinyint(4) DEFAULT NULL, `email` varchar(64) DEFAULT NULL, PRIMARY KEY(`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; LOCK TABLES `author` WRITE; /*!40000 ALTER TABLE `author` DISABLE KEYS */; INSERT INTO `author` (`id`, `name`, `age`, `sex`, `email`) VALUES (1,'icomac',25,0,'icomac@163.com'), (2,'coolblog',28,0,'coolblog.xyz@outlook.com'); /*!40000 ALTER TABLE `author` DISABLE KEYS */; UNLOCK TABLES;
/* Navicat Premium Data Transfer Source Server : localhost_3306 Source Server Type : MySQL Source Server Version : 50721 Source Host : localhost:3306 Source Schema : db_news Target Server Type : MySQL Target Server Version : 50721 File Encoding : 65001 Date: 01/07/2018 09:59:22 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for t_comment -- ---------------------------- DROP TABLE IF EXISTS `t_comment`; CREATE TABLE `t_comment` ( `commentId` int(11) NOT NULL AUTO_INCREMENT, `newsId` int(11) NULL DEFAULT NULL, `content` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `userIP` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `commentDate` datetime(0) NULL DEFAULT NULL, PRIMARY KEY (`commentId`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_comment -- ---------------------------- INSERT INTO `t_comment` VALUES (1, 2, 'fuck', '127.0.0.1', '2017-04-09 14:32:40'); INSERT INTO `t_comment` VALUES (2, 3, 'shit', '127.0.0.1', '2017-04-09 14:33:06'); INSERT INTO `t_comment` VALUES (3, 1, '算法', '0:0:0:0:0:0:0:1', '2017-04-15 18:23:17'); INSERT INTO `t_comment` VALUES (7, 1, '递归', '0:0:0:0:0:0:0:1', '2017-04-15 18:26:05'); INSERT INTO `t_comment` VALUES (9, 2, '阿斯顿', '0:0:0:0:0:0:0:1', '2017-04-15 18:32:57'); INSERT INTO `t_comment` VALUES (10, 3, '刚刚收到个', '0:0:0:0:0:0:0:1', '2017-04-20 18:21:53'); INSERT INTO `t_comment` VALUES (12, 3, '阿哥啊', '0:0:0:0:0:0:0:1', '2017-04-20 18:21:59'); INSERT INTO `t_comment` VALUES (17, 8, '的v', '0:0:0:0:0:0:0:1', '2017-04-21 12:37:22'); INSERT INTO `t_comment` VALUES (18, 1, '是个 ', '0:0:0:0:0:0:0:1', '2017-04-27 19:54:14'); INSERT INTO `t_comment` VALUES (19, 8, '', '0:0:0:0:0:0:0:1', '2018-07-01 09:38:34'); INSERT INTO `t_comment` VALUES (20, 8, 'a', '0:0:0:0:0:0:0:1', '2018-07-01 09:38:38'); -- ---------------------------- -- Table structure for t_link -- ---------------------------- DROP TABLE IF EXISTS `t_link`; CREATE TABLE `t_link` ( `linkId` int(11) NOT NULL AUTO_INCREMENT, `linkName` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `linkUrl` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `linkEmail` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `orderNum` int(11) NULL DEFAULT NULL, PRIMARY KEY (`linkId`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_link -- ---------------------------- INSERT INTO `t_link` VALUES (1, 'google', 'https://www.google.com', 'null', 1); INSERT INTO `t_link` VALUES (2, '百度', 'http://www.baidu.com', 'null', 3); INSERT INTO `t_link` VALUES (3, 'Diary', 'http://182.254.208.159:8080/Diary', '1054390839@qq.com', 2); INSERT INTO `t_link` VALUES (4, '开源中国', 'http://www.oschina.net', 'freedomfanye@gmail.com', 6); -- ---------------------------- -- Table structure for t_news -- ---------------------------- DROP TABLE IF EXISTS `t_news`; CREATE TABLE `t_news` ( `newsId` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, `publishDate` datetime(0) NULL DEFAULT NULL, `author` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `typeId` int(11) NOT NULL, `click` int(11) NULL DEFAULT NULL, `isHead` tinyint(4) NULL DEFAULT NULL, `isImage` tinyint(4) NULL DEFAULT NULL, `imageName` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `isHot` tinyint(4) NULL DEFAULT NULL, PRIMARY KEY (`newsId`) USING BTREE, INDEX `typeId`(`typeId`) USING BTREE, CONSTRAINT `t_news_ibfk_1` FOREIGN KEY (`typeId`) REFERENCES `t_newstype` (`newsTypeId`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_news -- ---------------------------- INSERT INTO `t_news` VALUES (1, '今天真高兴啊', '打击感的感觉是你当啊离开电脑发空间你g', '2017-04-10 13:14:09', '爸爸', 1, 33, 0, 1, '70jiyi.jpg', 0); INSERT INTO `t_news` VALUES (2, '发', '发射点说的格式', '2017-04-10 13:15:19', '十多个', 2, 15, 0, 1, 'beipiao.jpg', 0); INSERT INTO `t_news` VALUES (3, '冯绍峰', '方式格式十多年送搞点你手动哦啊的哦啊法莫丝佛啊', '2017-04-10 13:15:43', '感受到', 3, 16, 1, 1, 'shaolingsi.jpg', 0); INSERT INTO `t_news` VALUES (4, '三国杀', '是公司打工什么的公司没毛i到底狗i是狗i是dog i山东i那时士大夫 是打工i', '2017-04-10 13:16:14', '水泥地', 4, 7, 0, 1, 'tiaoweishi.jpg', 0); INSERT INTO `t_news` VALUES (5, '弄死', '搞i哦那个i能够i死难过哦i速度', '2017-04-10 13:16:36', '士大夫', 5, 10, 0, 1, 'yesong.jpg', 0); INSERT INTO `t_news` VALUES (6, '烦恼', '附属公司棍isidro您死覅是地闹id发', '2017-04-10 13:16:59', '算法', 6, 5, 0, 0, 'null', 1); INSERT INTO `t_news` VALUES (7, '十多个', '<p>摄氏度华氏度还是</p>\r\n', '2017-04-21 12:31:36', NULL, 2, 2, 0, 0, NULL, 0); INSERT INTO `t_news` VALUES (8, '法饿饭', '<p><img alt=\"\" src=\"userImage/20170421123511.jpg\" /></p>\r\n\r\n<p>gaf adg a a功能的烦恼id能够i啊</p>\r\n', '2017-04-21 12:35:26', NULL, 5, 10, 1, 1, '20170421123526.jpg', 3); INSERT INTO `t_news` VALUES (9, '个', '<p>公司公司分公司的公司公司的公司</p>\r\n', '2017-04-21 16:11:52', '说的格式的', 2, 1, 0, 0, NULL, 0); INSERT INTO `t_news` VALUES (10, '都是高手s', '<p>公司公司打工十多个十多个十多个是</p>\r\n', '2017-04-21 16:12:34', '公司公司的', 5, 1, 0, 0, NULL, 0); INSERT INTO `t_news` VALUES (12, '是', '<p>阿斯弗</p>\r\n', '2017-04-21 17:03:53', '算法', 3, 0, 0, 0, NULL, 0); INSERT INTO `t_news` VALUES (13, '是', '<p>阿斯弗</p>\r\n', '2017-04-21 17:05:00', '算法', 3, 0, 0, 0, NULL, 0); -- ---------------------------- -- Table structure for t_newstype -- ---------------------------- DROP TABLE IF EXISTS `t_newstype`; CREATE TABLE `t_newstype` ( `newsTypeId` int(11) NOT NULL AUTO_INCREMENT, `typeName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`newsTypeId`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_newstype -- ---------------------------- INSERT INTO `t_newstype` VALUES (1, '时政新闻'); INSERT INTO `t_newstype` VALUES (2, '科教文卫'); INSERT INTO `t_newstype` VALUES (3, '政法新闻'); INSERT INTO `t_newstype` VALUES (4, '娱乐新闻'); INSERT INTO `t_newstype` VALUES (5, '体育新闻'); INSERT INTO `t_newstype` VALUES (6, '军事新闻'); -- ---------------------------- -- Table structure for t_user -- ---------------------------- DROP TABLE IF EXISTS `t_user`; CREATE TABLE `t_user` ( `userId` int(11) NOT NULL AUTO_INCREMENT, `userName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `password` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`userId`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_user -- ---------------------------- INSERT INTO `t_user` VALUES (1, 'admin', '123456'); SET FOREIGN_KEY_CHECKS = 1;
DROP TABLE IF EXISTS company_companies CASCADE; -- CASCADE will drop all references to this table CREATE TABLE company_companies ( id bigserial PRIMARY KEY, creation timestamp WITH TIME ZONE NOT NULL DEFAULT now(), profile_id bigint NOT NULL REFERENCES profile_profiles (id) ON DELETE CASCADE ON UPDATE CASCADE, -- If profile id gets deleted set to DEFAULT; if updated, cascade name varchar(256) NOT NULL, sector_id bigint REFERENCES company_sectors (id) ON DELETE CASCADE ON UPDATE CASCADE, website varchar(256), summary text, total_locations_count bigint DEFAULT 0 CHECK (total_locations_count >= 0), orderby real, search tsvector, updated timestamp WITH TIME ZONE NOT NULL DEFAULT now(), active bool DEFAULT 't' -- NULL=created but not yet active and not deactivated ); -- Index on ID is automatically created by PRIMARY KEY --CREATE UNIQUE INDEX company_companies_company_x ON company_companies (name); --CREATE INDEX company_companies_id_code_x ON company_companies (id, company); ALTER TABLE public.company_companies OWNER TO vmdbuser; ALTER TABLE public.company_companies_id_seq OWNER TO vmdbuser; --Update the updated field on updates CREATE TRIGGER "company_companies_updated_trigger" BEFORE UPDATE ON "company_companies" FOR EACH ROW EXECUTE PROCEDURE "current_updated" (); -- Update the search field CREATE TRIGGER "company_companies_update_search_trigger" BEFORE INSERT OR UPDATE ON "company_companies" FOR EACH ROW EXECUTE PROCEDURE "update_search" ('search', 'summary', 'A', 'name', 'B'); ----------------------------------------------------------------------------------------------------
CREATE TABLE sdbase.charge_crimetype ( charge_id int4 NOT NULL DEFAULT 0, crimetype_id int4 NOT NULL DEFAULT 0, modified_date date NOT NULL DEFAULT 'now'::text::date, CONSTRAINT no_dup_chargecrime PRIMARY KEY (charge_id,crimetype_id), CONSTRAINT charge_crimetype_charge_id_fkey FOREIGN KEY (charge_id) REFERENCES sdbase.arjis_charge(charge_id), CONSTRAINT charge_crimetype_crimetype_id_fkey FOREIGN KEY (crimetype_id) REFERENCES sdbase.arjis_crimetype(crimetype_id) ) WITH ( OIDS=FALSE ) ;
create table categoria ( id_categoria serial NOT NULL, nome varchar(255) NOT NULL, CONSTRAINT pk_categoria PRIMARY KEY (id_categoria), UNIQUE(nome) );
--- URI Online Judge SQL --- Copyright URI Online Judge --- www.urionlinejudge.com.br --- Problem 2740 (SELECT 'Podium: ' || league.team As name FROM league WHERE league.position = 1 OR league.position = 2 OR league.position = 3) UNION ALL (SELECT 'Demoted: ' || league.team AS name FROM league WHERE league.position = 14 OR league.position = 15);
--Affected libraries results after applying priority (MANUAL->AST_EQUALITY(and other patch eval results)) for libraries without GAV (only sha1 known) create or replace view v_affected_library_digest as select lid.lib,lid.bug_id,lid.affected from (select distinct bug_id,lib,affected from bug_affected_library where source='MANUAL' and library_id is null UNION select distinct al1.bug_id,al1.lib,al1.affected from bug_affected_library as al1 where al1.library_id is null and (al1.source='AST_EQUALITY' OR al1.source='MINOR_EQUALITY'OR al1.source='MAJOR_EQUALITY' OR al1.source='GREATER_RELEASE' OR al1.source='INTERSECTION' OR al1.source='PROPAGATE_MANUAL') and not exists (select 1 from bug_affected_library as al2 where al2.source='MANUAL' and al1.bug_id=al2.bug_id and al1.lib=al2.lib)) as lid ; drop view v_affected_library_sha1;