sql stringlengths 6 1.05M |
|---|
-- ======================================== sa-plus 系统库 ====================================
-- 系统角色表
drop table if exists sp_role;
CREATE TABLE `sp_role` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '角色id,--主键、自增',
`name` varchar(20) NOT NULL COMMENT '角色名称, 唯一约束',
`info` varchar(200) DEFAULT NULL COMMENT '角色详细描述',
`is_lock` int(11) NOT NULL DEFAULT '1' COMMENT '是否锁定(1=是,2=否), 锁定之后不可随意删除, 防止用户误操作',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统角色表';
INSERT INTO `sp_role`(`id`, `name`, `info`, `is_lock`) VALUES (1, '超级管理员', '最高权限', 1);
INSERT INTO `sp_role`(`id`, `name`, `info`, `is_lock`) VALUES (2, '二级管理员', '二级管理员', 2);
INSERT INTO `sp_role`(`id`, `name`, `info`, `is_lock`) VALUES (11, '普通账号', '普通账号', 1);
INSERT INTO `sp_role`(`id`, `name`, `info`, `is_lock`) VALUES (12, '测试角色', '测试角色', 2);
-- 角色权限对应表
drop table if exists sp_role_permission;
CREATE TABLE `sp_role_permission` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id号',
`role_id` bigint(20) DEFAULT NULL COMMENT '角色ID ',
`permission_code` varchar(50) DEFAULT NULL COMMENT '菜单项ID',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='角色权限中间表';
insert into sp_role_permission() values (0, '1', 'bas', now());
insert into sp_role_permission() values (0, '1', '1', now());
insert into sp_role_permission() values (0, '1', '11', now());
insert into sp_role_permission() values (0, '1', '99', now());
insert into sp_role_permission() values (0, '1', 'console', now());
insert into sp_role_permission() values (0, '1', 'sql-console', now());
insert into sp_role_permission() values (0, '1', 'redis-console', now());
insert into sp_role_permission() values (0, '1', 'apilog-list', now());
insert into sp_role_permission() values (0, '1', 'form-generator', now());
insert into sp_role_permission() values (0, '1', 'auth', now());
insert into sp_role_permission() values (0, '1', 'role-list', now());
insert into sp_role_permission() values (0, '1', 'menu-list', now());
insert into sp_role_permission() values (0, '1', 'admin-list', now());
insert into sp_role_permission() values (0, '1', 'admin-add', now());
insert into sp_role_permission() values (0, '1', 'sp-cfg', now());
insert into sp_role_permission() values (0, '1', 'sp-cfg-app', now());
insert into sp_role_permission() values (0, '1', 'sp-cfg-server', now());
-- 系统管理员表
drop table if exists sp_admin;
CREATE TABLE `sp_admin` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id,--主键、自增',
`name` varchar(100) NOT NULL COMMENT 'admin名称',
`avatar` varchar(500) DEFAULT NULL COMMENT '头像地址',
`password` varchar(100) DEFAULT NULL COMMENT '密码',
`pw` varchar(50) DEFAULT NULL COMMENT '明文密码',
`phone` varchar(20) DEFAULT NULL COMMENT '手机号',
`role_id` int(11) DEFAULT '11' COMMENT '所属角色id',
`status` int(11) DEFAULT '1' COMMENT '账号状态(1=正常, 2=禁用)',
`create_by_aid` bigint(20) DEFAULT '-1' COMMENT '创建自哪个管理员',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`login_time` datetime DEFAULT NULL COMMENT '上次登陆时间',
`login_ip` varchar(50) DEFAULT NULL COMMENT '上次登陆IP',
`login_count` int(11) DEFAULT '0' COMMENT '登陆次数',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统管理员表';
INSERT INTO `sp_admin`(`id`, `name`, `avatar`, `password`, `pw`, `role_id`, create_time)
VALUES (10001, 'sa', 'http://demo-jj.dev33.cn/spdj-admin/sa-resources/admin-logo.png', '<PASSWORD>', '123456', 1, now());
INSERT INTO `sp_admin`(`id`, `name`, `avatar`, `password`, `pw`, `role_id`, create_time)
VALUES (10002, 'admin', 'http://demo-jj.dev33.cn/spdj-admin/sa-resources/admin-logo.png', '<PASSWORD>', '<PASSWORD>', 1, now());
-- 配置信息表
drop table if exists sp_cfg;
CREATE TABLE `sp_cfg` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id号',
`cfg_name` varchar(50) NOT NULL COMMENT '配置名',
`cfg_value` text COMMENT '配置值',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `cfg_name` (`cfg_name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='配置信息表';
INSERT INTO `sp_cfg`(`id`, `cfg_name`, `cfg_value`, `remarks`) VALUES (1, 'app_cfg', '{}', '应用配置信息,对外公开');
INSERT INTO `sp_cfg`(`id`, `cfg_name`, `cfg_value`, `remarks`) VALUES (2, 'server_cfg', '{}', '服务器私有配置');
-- 系统api请求记录表
-- 如果此段脚本执行报错,请将 datetime(3) 改为 datetime 再次执行
drop table if exists sp_apilog;
CREATE TABLE `sp_apilog` (
`id` bigint(50) NOT NULL AUTO_INCREMENT COMMENT '请求id',
`req_ip` varchar(100) DEFAULT NULL COMMENT '客户端ip',
`req_api` varchar(512) DEFAULT NULL COMMENT '请求api',
`req_parame` text COMMENT '请求参数',
`req_type` varchar(50) DEFAULT NULL COMMENT '请求类型(GET、POST...)',
`req_token` varchar(50) DEFAULT NULL COMMENT '请求token',
`req_header` text DEFAULT NULL COMMENT '请求header',
`res_code` varchar(50) DEFAULT NULL COMMENT '返回-状态码',
`res_msg` text COMMENT '返回-信息描述',
`res_string` text COMMENT '返回-整个信息字符串形式',
`user_id` bigint(20) DEFAULT NULL COMMENT 'user_id',
`admin_id` bigint(20) DEFAULT NULL COMMENT 'admin_id',
`start_time` datetime(3) DEFAULT NULL COMMENT '请求开始时间',
`end_time` datetime(3) DEFAULT NULL COMMENT '请求结束时间',
`cost_time` bigint(20) DEFAULT NULL COMMENT '花费时间,单位ms',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='api请求记录表';
|
-- CreateTable
CREATE TABLE "TeamManager" (
"id" TEXT NOT NULL,
"teamId" TEXT,
"name" TEXT NOT NULL,
"country" TEXT NOT NULL,
"formation" TEXT NOT NULL,
"skill" INTEGER NOT NULL,
"birthYear" INTEGER NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "TeamManager_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "TeamPlayer" (
"id" TEXT NOT NULL,
"transactionId" TEXT,
"teamId" TEXT,
"name" TEXT NOT NULL,
"country" TEXT NOT NULL,
"position" TEXT NOT NULL,
"skill" INTEGER NOT NULL,
"birthYear" INTEGER NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "TeamPlayer_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Item" (
"id" TEXT NOT NULL,
"type" TEXT NOT NULL,
"name" TEXT NOT NULL,
"value" DOUBLE PRECISION NOT NULL,
"quantity" INTEGER DEFAULT 5,
"price" DOUBLE PRECISION NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "Item_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "ItemOwned" (
"id" TEXT NOT NULL,
"transactionId" TEXT NOT NULL,
"itemId" TEXT NOT NULL,
"userId" TEXT NOT NULL,
"used" BOOLEAN NOT NULL DEFAULT false,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "ItemOwned_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Team" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"publicKey" TEXT NOT NULL,
"privateKey" TEXT NOT NULL,
"chemistry" INTEGER NOT NULL DEFAULT 10,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "Team_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "BotTeam" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL DEFAULT E'Bot FC',
"chemistry" INTEGER NOT NULL DEFAULT 15,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "BotTeam_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "BotManager" (
"id" TEXT NOT NULL,
"botId" TEXT,
"name" TEXT NOT NULL,
"country" TEXT NOT NULL,
"formation" TEXT NOT NULL,
"skill" INTEGER NOT NULL DEFAULT 6,
"birthYear" INTEGER NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "BotManager_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "BotPlayer" (
"id" TEXT NOT NULL,
"botId" TEXT,
"name" TEXT NOT NULL,
"country" TEXT NOT NULL,
"position" TEXT NOT NULL,
"skill" INTEGER NOT NULL,
"birthYear" INTEGER NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "BotPlayer_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Game" (
"id" TEXT NOT NULL,
"teamId" TEXT NOT NULL,
"botTeamId" TEXT NOT NULL,
"winner" TEXT,
"score" TEXT,
"finished" BOOLEAN NOT NULL DEFAULT false,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "Game_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "GameStats" (
"id" TEXT NOT NULL,
"gameId" TEXT NOT NULL,
"botScore" INTEGER NOT NULL DEFAULT 0,
"teamScore" INTEGER NOT NULL DEFAULT 0,
"hit" INTEGER NOT NULL DEFAULT 0,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "GameStats_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "GameReward" (
"id" TEXT NOT NULL,
"gameId" TEXT NOT NULL,
"transactionId" TEXT,
"teamId" TEXT NOT NULL,
"type" TEXT NOT NULL,
"name" TEXT NOT NULL,
"value" DOUBLE PRECISION NOT NULL,
"cliamed" BOOLEAN NOT NULL DEFAULT false,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "GameReward_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "Team_publicKey_key" ON "Team"("publicKey");
-- CreateIndex
CREATE UNIQUE INDEX "GameStats_gameId_key" ON "GameStats"("gameId");
-- AddForeignKey
ALTER TABLE "TeamManager" ADD CONSTRAINT "TeamManager_teamId_fkey" FOREIGN KEY ("teamId") REFERENCES "Team"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "TeamPlayer" ADD CONSTRAINT "TeamPlayer_teamId_fkey" FOREIGN KEY ("teamId") REFERENCES "Team"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "ItemOwned" ADD CONSTRAINT "ItemOwned_itemId_fkey" FOREIGN KEY ("itemId") REFERENCES "Item"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "ItemOwned" ADD CONSTRAINT "ItemOwned_userId_fkey" FOREIGN KEY ("userId") REFERENCES "Team"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "BotManager" ADD CONSTRAINT "BotManager_botId_fkey" FOREIGN KEY ("botId") REFERENCES "BotTeam"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "BotPlayer" ADD CONSTRAINT "BotPlayer_botId_fkey" FOREIGN KEY ("botId") REFERENCES "BotTeam"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Game" ADD CONSTRAINT "Game_teamId_fkey" FOREIGN KEY ("teamId") REFERENCES "Team"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Game" ADD CONSTRAINT "Game_botTeamId_fkey" FOREIGN KEY ("botTeamId") REFERENCES "BotTeam"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "GameStats" ADD CONSTRAINT "GameStats_gameId_fkey" FOREIGN KEY ("gameId") REFERENCES "Game"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "GameReward" ADD CONSTRAINT "GameReward_gameId_fkey" FOREIGN KEY ("gameId") REFERENCES "Game"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "GameReward" ADD CONSTRAINT "GameReward_teamId_fkey" FOREIGN KEY ("teamId") REFERENCES "Team"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
--
-- packages/acs-content-repository/sql/oracle/upgrade/upgrade-5.3.0d3-5.3.0d4.sql
--
-- @author <NAME> (<EMAIL>)
-- @creation-date 2006-12-15
-- @arch-tag: a67a9b16-d809-4da4-a47a-62f96f7e8d1e
-- @cvs-id $Id: upgrade-5.3.0d3-5.3.0d4.sql,v 1.4 2015/12/04 13:49:58 cvs Exp $
--
create or replace procedure update_mime_types (
v_mime_type in cr_mime_types.mime_type%TYPE,
v_file_extension in cr_mime_types.file_extension%TYPE,
v_label in cr_mime_types.label%TYPE
) is
v_count integer;
begin
select count(*) into v_count from cr_mime_types where file_extension = v_file_extension;
if v_count = 0 then
insert into cr_mime_types (mime_type, file_extension, label) values (v_mime_type, v_file_extension, v_label);
else
update cr_mime_types set mime_type=v_mime_type, label=v_label where file_extension=v_file_extension;
end if;
select count(*) into v_count from cr_extension_mime_type_map where extension=v_file_extension;
if v_count = 0 then
insert into cr_extension_mime_type_map (mime_type, extension) values (v_mime_type, v_file_extension);
else
update cr_extension_mime_type_map set mime_type=v_mime_type where extension=v_file_extension;
end if;
end update_mime_types;
/
show errors;
begin
update_mime_types('application/vnd.oasis.opendocument.text', 'odt', 'OpenDocument Text');
update_mime_types('application/vnd.oasis.opendocument.text-template', 'ott','OpenDocument Text Template');
update_mime_types('application/vnd.oasis.opendocument.text-web', 'oth', 'HTML Document Template');
update_mime_types('application/vnd.oasis.opendocument.text-master', 'odm', 'OpenDocument Master Document');
update_mime_types('application/vnd.oasis.opendocument.graphics', 'odg', 'OpenDocument Drawing');
update_mime_types('application/vnd.oasis.opendocument.graphics-template', 'otg', 'OpenDocument Drawing Template');
update_mime_types('application/vnd.oasis.opendocument.presentation', 'odp', 'OpenDocument Presentation');
update_mime_types('application/vnd.oasis.opendocument.presentation-template', 'otp', 'OpenDocument Presentation Template');
update_mime_types('application/vnd.oasis.opendocument.spreadsheet', 'ods', 'OpenDocument Spreadsheet');
update_mime_types('application/vnd.oasis.opendocument.spreadsheet-template', 'ots', 'OpenDocument Spreadsheet Template');
update_mime_types('application/vnd.oasis.opendocument.chart', 'odc', 'OpenDocument Chart');
update_mime_types('application/vnd.oasis.opendocument.formula', 'odf', 'OpenDocument Formula');
update_mime_types('application/vnd.oasis.opendocument.database', 'odb', 'OpenDocument Database');
update_mime_types('application/vnd.oasis.opendocument.image', 'odi', 'OpenDocument Image');
end;
/
show errors;
drop procedure update_mime_types;
|
<reponame>ESPORTMOH/PROYECTO_ESPORT_G6
(codJugador, dni, nombre, apellido, nickname, sueldo, fechaNacimiento, nacionalidad, posicion)
INSERT INTO jugador VALUES (DEFAULT, '', '12345678A', 'nombre', 'apellido', 'nickname', 40000, to_date('10/10/1000', 'dd/mm/YYYY'), 'nacionalidad', 'j')
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Houston','6-8',250,'F','Cavaliers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Spain','7-0',250,'F-C','Lakers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Spain','7-0',250,'F-C','Lakers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Florida','6-9',185,'F-G','Timberwolves');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Clemson','6-4',210,'G-F','Timberwolves');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Utah','6-11',262,'C','Timberwolves');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Villanova','6-4',213,'G','Timberwolves');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Providence','6-7',250,'F','Timberwolves');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Serbia','6-7',224,'G','Timberwolves');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','<NAME>','6-10',265,'C-F','Timberwolves');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Stanford','6-9',250,'C-F','Timberwolves');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','North Carolina','6-4',21,'G','Timberwolves');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME> ','Florida','6-9',270,'F','Timberwolves');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Boston College','6-8',250,'F-C','Timberwolves');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Nevada-Reno','6-6',225,'G','Timberwolves');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','<NAME> HS','6-0',175,'G','Timberwolves');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Kentucky','6-9',245,'F','Timberwolves');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','duke','6-8',254,'F','Clippers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Michigan','6-11',270,'c','Clippers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Gonzaga','6-0',180,'G','Clippers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Nevada-Reno','6-11',235,'F','Clippers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Central Michigan','7-0',265,'C','Clippers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Stanford','5-10',170,'G','Clippers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Peoria Central','6-7',182,'G','Clippers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','duke','6-6',225,'F','Clippers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Rhode Island','6-4',215,'G','Clippers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Fordham','6-4',190,'G','Clippers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','North Carolina State','6-9',240,'C-F','Clippers');
INSERT INTO jugador VALUES (DEFAULT, '', 'Qu<NAME>','Southern Methodist','6-6',193,'G-F','Clippers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Villanova','6-10',240,'F','Clippers');
INSERT INTO jugador VALUES (DEFAULT, '', 'al thornton','Florida State','6-8',220,'F','Clippers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Arizona','6-7',207,'F','Clippers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','<NAME>','6-9',245,'F','Grizzlies');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Glynn Academy','6-11',270,'C','Grizzlies');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Purdue','6-8',245,'F','Grizzlies');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Stanford','7-0',255,'C-F','Grizzlies');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Ohio State','6-1',180,'G','Grizzlies');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Georgia Tech','6-5',200,'G','Grizzlies');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Connecticut','6-8',222,'F','Grizzlies');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Stanford','6-6',215,'g','Grizzlies');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Villanova','6-0',175,'G','Grizzlies');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Temple','6-5',209,'G','Grizzlies');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','<NAME>','7-0',275,'C-F','Grizzlies');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Florida','6-8',218,'G-F','Grizzlies');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Spain','6-3',170,'G','Grizzlies');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Syracuse','6-9',215,'F','Grizzlies');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','UCLA','6-8',210,'F','Lakers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Lower Merion HS (PA)','6-6',205,'G','Lakers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','St. Joseph HS (NJ)','7-0',285,'C','Lakers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','UCLA','6-2',180,'G','Lakers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Arkansas-Little Rock','6-1',210,'G','Lakers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Congo','7-0',255,'C','Lakers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Boise State','6-5',215,'G','Lakers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Texas','7-0',265,'C','Lakers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Miami(Ohia)','6-7',220,'G-F','Lakers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Rhode Island','6-10',230,'F','Lakers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','<NAME>','6-10',235,'F','Lakers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Gonzaga','6-10',250,'F-C','Lakers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Slovenia','6-7',205,'G','Lakers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Arizona','6-8',235,'F','Lakers');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Italy','7-0',250,'C-F','Raptors');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Michigan','6-10',230,'C-F','Raptors');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Slovenia','7-1',255,'C','Raptors');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Spain','6-3',210,'G','Raptors');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Argentina','6-6',230,'G','Raptors');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Texas','6-0',165,'G','Raptors');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Spain','6-9',245,'F','Raptors');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Oklahoma State','6-7',225,'F','Raptors');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Minnesota','6-9',235,'F','Raptors');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Tulane','6-8',205,'F','Raptors');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','UCLA','6-8',215,'F','Raptors');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Merdian CC (MS)','6-8',205,'F','Raptors');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Slovenia','7-0',255,'C','Raptors');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','Bradley','6-6',215,'G-F','Raptors');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','South Carolina','6-8',202,'F','Knicks');
INSERT INTO jugador VALUES (DEFAULT, '', '<NAME>','DePaul','6-8',220,'F','Knicks');
INSERT INTO jugador VALUES (102,'<NAME>','Temple','6-6',220,'G','Knicks');
INSERT INTO jugador VALUES (103,'<NAME>','Michigan','6-5',220,'G','Knicks');
INSERT INTO jugador VALUES (104,'<NAME>','Thornwood HS','6-11',285,'C','Knicks');
INSERT INTO jugador VALUES (105,'<NAME>','Florida AM','7-1',285,'C','Knicks');
INSERT INTO jugador VALUES (106,'<NAME>','Indiana','6-11',240,'F','Knicks');
INSERT INTO jugador VALUES (107,'<NAME>','Oregon','6-2',225,'G','Knicks');
INSERT INTO jugador VALUES (108,'<NAME>','Florida','6-9',240,'F','Knicks');
INSERT INTO jugador VALUES (109,'<NAME>','Georgia Tech','6-2',205,'G','Knicks');
INSERT INTO jugador VALUES (110,'<NAME>','Kentucky','6-11',260,'C','Knicks');
INSERT INTO jugador VALUES (111,'<NAME>','Michigan State','6-9',260,'F','Knicks');
INSERT INTO jugador VALUES (112,'<NAME>','DePaul','6-6',235,'F-G','Knicks');
INSERT INTO jugador VALUES (113,'<NAME>','Washington','5-9',180,'G','Knicks');
INSERT INTO jugador VALUES (114,'<NAME>','Drexel','6-7',255,'F','Knicks');
INSERT INTO jugador VALUES (120,'<NAME>',' Nevada-Las Vegas',' 6-9',225,'F','76ers');
INSERT INTO jugador VALUES (121,'<NAME>','Penn State','6-11',250,'C','76ers');
INSERT INTO jugador VALUES (122,'<NAME>','Memphis','6-7',204,'F','76ers');
INSERT INTO jugador VALUES (123,'<NAME>','Seton Hall','6-11',250,'C','76ers');
INSERT INTO jugador VALUES (124,'<NAME>','Iowa','6-8',245,'F','76ers');
INSERT INTO jugador VALUES (125,'<NAME>','<NAME>','6-3',201,'G','76ers');
INSERT INTO jugador VALUES (126,'<NAME>','Providence','6-10',240,'F-C','76ers');
INSERT INTO jugador VALUES (127,'<NAME>','Arizona','6-6',207,'F-G','76ers');
INSERT INTO jugador VALUES (128,'<NAME>','Utah','6-2',200,'G','76ers');
INSERT INTO jugador VALUES (129,'<NAME>','Connecticut','6-2',195,'G','76ers');
INSERT INTO jugador VALUES (130,'<NAME>','Duke','6-10',240,'F','76ers');
INSERT INTO jugador VALUES (131,'<NAME>','Colorado Sate','7-0',240,'F','76ers');
INSERT INTO jugador VALUES (132,'<NAME>','South Gwinnett HS','6-2',175,'G','76ers');
INSERT INTO jugador VALUES (133,'<NAME>','Georgio Tech','6-8',220,'F','76ers');
INSERT INTO jugador VALUES (150,'<NAME>','Weber State','6-11',250,'C','Cavaliers');
INSERT INTO jugador VALUES (151,'<NAME>','Texas-San Antonio','6-5',210,'G','Cavaliers');
INSERT INTO jugador VALUES (152,'<NAME>','Texas','6-2',194,'G','Cavaliers');
INSERT INTO jugador VALUES (153,'<NAME>','St. Vincent-St. Mary','7-3',260,'C','Cavaliers');
INSERT INTO jugador VALUES (155,'<NAME>','Saint Joseph''s','6-3',195,'G','Cavaliers');
INSERT INTO jugador VALUES (156,'<NAME>','Serbia','6-11',251,'C-F','Cavaliers');
INSERT INTO jugador VALUES (157,'<NAME>','Maryland','6-7',239,'G-F','Cavaliers');
INSERT INTO jugador VALUES (158,'<NAME>','Michigan State','6-10',225,'F-C','Cavaliers');
INSERT INTO jugador VALUES (159,'<NAME>','Miami ','6-3',205,'G','Cavaliers');
INSERT INTO jugador VALUES (160,'<NAME>','Brazil','6-7',245,'F','Cavaliers');
INSERT INTO jugador VALUES (161,'<NAME>','Merdian CC (MS)','6-10',240,'C-F','Cavaliers');
INSERT INTO jugador VALUES (162,'<NAME>','Virginia Union','6-9',240,'C-F','Cavaliers');
INSERT INTO jugador VALUES (163,'Delonte West','Saint Joseph''s','6-3',180,'G','Cavaliers');
INSERT INTO jugador VALUES (181,'<NAME>','Kentucky','6-5',195,'G','Bobcats');
INSERT INTO jugador VALUES (182,'<NAME>','Eastern michigan','5-5',133,'G','Bobcats');
INSERT INTO jugador VALUES (183,'<NAME>','<NAME>','6-6',212,'G','Bobcats');
INSERT INTO jugador VALUES (184,'<NAME>','Alabama','6-10',230,'F','Bobcats');
INSERT INTO jugador VALUES (185,'<NAME>','Boston College','6-7',225,'F','Bobcats');
INSERT INTO jugador VALUES (186,'<NAME>','North Carolina','6-1',198,'G','Bobcats');
INSERT INTO jugador VALUES (187,'<NAME>','Georgetown','6-9',235,'F-C','Bobcats');
INSERT INTO jugador VALUES (188,'<NAME>','Ucla','7-0',230,'C','Bobcats');
INSERT INTO jugador VALUES (189,'<NAME>','North Carolina','6-9',266,'F-C','Bobcats');
INSERT INTO jugador VALUES (190,'<NAME>','Kentucky','6-10',250,'C','Bobcats');
INSERT INTO jugador VALUES (191,'<NAME>','Gonzaga','6-8',205,'F','Bobcats');
INSERT INTO jugador VALUES (192,'<NAME>','Connecticut','6-10',255,'F-C','Bobcats');
INSERT INTO jugador VALUES (193,'<NAME>','Michigan State','6-6',225,'G-F','Bobcats');
INSERT INTO jugador VALUES (194,'<NAME>','Alabama','6-7',220,'F','Bobcats');
INSERT INTO jugador VALUES (201,'<NAME>','Michigan State','6-3',200,'G','Bucks');
INSERT INTO jugador VALUES (202,'<NAME>','Utah','7-0',260,'C','Bucks');
INSERT INTO jugador VALUES (203,'<NAME>','Ucla','6-11',245,'C','Bucks');
INSERT INTO jugador VALUES (204,'<NAME>','Texas','6-4',215,'G','Bucks');
INSERT INTO jugador VALUES (205,'<NAME>','Oklahoma State','6-5',222,'F','Bucks');
INSERT INTO jugador VALUES (206,'<NAME>','Ohio State','6-6',215,'G','Bucks');
INSERT INTO jugador VALUES (207,'<NAME>','Tulsa','6-8',248,'F-C','Bucks');
INSERT INTO jugador VALUES (208,'<NAME>','Nevava-Reno','6-3',190,'G','Bucks');
INSERT INTO jugador VALUES (209,'<NAME>','DePaul','6-6',230,'F','Bucks');
INSERT INTO jugador VALUES (210,'Awvee Store','Arizona State','6-6',225,'F-G','Bucks');
INSERT INTO jugador VALUES (211,'<NAME>','Connecticut','6-11',232,'F','Bucks');
INSERT INTO jugador VALUES (212,'<NAME>','Connecticut','6-11',255,'C','Bucks');
INSERT INTO jugador VALUES (213,'<NAME>','Alabama','6-1',185,'G','Bucks');
INSERT INTO jugador VALUES (214,'<NAME>','Connecticut','7-0',238,'F','Bucks');
INSERT INTO jugador VALUES (220,'<NAME>','Michigan State','6-4',211,'G','Bulls');
INSERT INTO jugador VALUES (221,'<NAME>','Oklahoma Stare','6-3',190,'G','Bulls');
INSERT INTO jugador VALUES (222,'<NAME>','Duke','6-9',220,'F','Bulls');
INSERT INTO jugador VALUES (223,'<NAME>','Duke','6-1',185,'G','Bulls');
INSERT INTO jugador VALUES (224,'<NAME>','Kansas','6-10',250,'F','Bulls');
INSERT INTO jugador VALUES (225,'<NAME>','Connecticut','6-3',200,'G','Bulls');
INSERT INTO jugador VALUES (226,'<NAME>','Pittsburgh','7-0',270,'C','Bulls');
INSERT INTO jugador VALUES (227,'<NAME>','Kansas','6-3',190,'G','Bulls');
INSERT INTO jugador VALUES (228,'<NAME>','St.Luis','6-5',185,'G','Bulls');
INSERT INTO jugador VALUES (229,'<NAME>','Syracuse','6-8',216,'F','Bulls');
INSERT INTO jugador VALUES (230,'<NAME>','Florida','6-11',232,'C-F','Bulls');
INSERT INTO jugador VALUES (231,'<NAME>','Argentina','6-7',225,'F','Bulls');
INSERT INTO jugador VALUES (232,'<NAME>','Switzerland','6-7',215,'G','Bulls');
INSERT INTO jugador VALUES (233,'<NAME>','North Carolina State','6-9',235,'F','Bulls');
INSERT INTO jugador VALUES (234,'<NAME>','Louisiana State','6-9',215,'F','Bulls');
INSERT INTO jugador VALUES (240,'<NAME>','Connecticut','6-5',205,'G','Celtics');
INSERT INTO jugador VALUES (241,'<NAME>','Oklahoma State','6-4',213,'G','Celtics');
INSERT INTO jugador VALUES (242,'P.J.Brown','Louisiana State','6-11',239,'F-C','Celtics');
INSERT INTO jugador VALUES (243,'<NAME>','Florida State','6-3',185,'G','Celtics');
INSERT INTO jugador VALUES (244,'<NAME>','Louisiana State','6-9',289,'F','Celtics');
INSERT INTO jugador VALUES (245,'<NAME>','Farragut Academy','6-11',220,'F','Celtics');
INSERT INTO jugador VALUES (246,'Eddie House','Arizona State','6-1',175,'G','Celtics');
INSERT INTO jugador VALUES (247,'<NAME>','<NAME>.Ozen HS','6-10',264,'C','Celtics');
INSERT INTO jugador VALUES (248,'<NAME>','Kansas','6-7',230,'F','Celtics');
INSERT INTO jugador VALUES (249,'<NAME>','Kansas','6-11',278,'C-F','Celtics');
INSERT INTO jugador VALUES (250,'<NAME>','Xavier','6-8',217,'F','Celtics');
INSERT INTO jugador VALUES (251,'<NAME>','California','6-8',240,'F','Celtics');
INSERT INTO jugador VALUES (252,'<NAME>','USC','6-4',170,'G','Celtics');
INSERT INTO jugador VALUES (253,'<NAME>','Kentucky','6-1',171,'G','Celtics');
INSERT INTO jugador VALUES (254,'<NAME>','USC','6-9',235,'F-C','Celtics');
INSERT INTO jugador VALUES (261,'<NAME>','Arizona','6-1',190,'G','Hawks');
INSERT INTO jugador VALUES (262,'<NAME>','Stanford','6-8',210,'G-F','Hawks');
INSERT INTO jugador VALUES (263,'<NAME>','Hofstra','6-1',170,'G','Hawks');
INSERT INTO jugador VALUES (264,'<NAME>','Florida','6-10',245,'C-F','Hawks');
INSERT INTO jugador VALUES (265,'<NAME>','Arkansas','6-7',235,'G','Hawks');
INSERT INTO jugador VALUES (266,'<NAME>','South Florida','6-10',230,'F','Hawks');
INSERT INTO jugador VALUES (267,'<NAME>','Texas AM','6-3',195,'G','Hawks');
INSERT INTO jugador VALUES (268,'<NAME>','Georgia','6-11',280,'C','Hawks');
INSERT INTO jugador VALUES (269,'<NAME>','Delta State','6-7',195,'G-F','Hawks');
INSERT INTO jugador VALUES (270,'<NAME>','Oak Hill Academy','6-9',235,'F','Hawks');
INSERT INTO jugador VALUES (271,'<NAME>','Arizona','6-1',175,'G','Hawks');
INSERT INTO jugador VALUES (272,'<NAME>','Georgia Tech','6-5',210,'G','Hawks');
INSERT INTO jugador VALUES (273,'<NAME>','North Carolina','6-9',230,'F','Hawks');
INSERT INTO jugador VALUES (281,'<NAME>','Missouri State','6-2',190,'G','Heat');
INSERT INTO jugador VALUES (282,'<NAME>','Nevada-Las vegas','6-9',245,'C','Heat');
INSERT INTO jugador VALUES (283,'<NAME>','Nevada-Las vegas','6-2',212,'G','Heat');
INSERT INTO jugador VALUES (284,'<NAME>','Memphis','7-0',245,'C-F','Heat');
INSERT INTO jugador VALUES (285,'<NAME>','Pittsburgh','7-0',250,'C-F','Heat');
INSERT INTO jugador VALUES (286,'<NAME>','Ohio State','6-5',205,'G','Heat');
INSERT INTO jugador VALUES (287,'<NAME>','lowa','6-7',250,'F-G','Heat');
INSERT INTO jugador VALUES (288,'<NAME>','Florida','6-8',235,'F','Heat');
INSERT INTO jugador VALUES (289,'<NAME>','Florida State','6-9',230,'F','Heat');
INSERT INTO jugador VALUES (290,'<NAME>','Massachusetts','6-8',215,'F','Heat');
INSERT INTO jugador VALUES (291,'<NAME>','UNLV','6-7',230,'F','Heat');
INSERT INTO jugador VALUES (292,'<NAME>','Georgetown','6-10',261,'C','Heat');
INSERT INTO jugador VALUES (293,'<NAME>','Not<NAME>','6-2',175,'G','Heat');
INSERT INTO jugador VALUES (294,'<NAME>','Marquette','6-4',216,'G','Heat');
INSERT INTO jugador VALUES (295,'<NAME>','Florida','6-1',180,'G','Heat');
INSERT INTO jugador VALUES (296,'<NAME>','South Kent','6-9',210,'F','Heat');
INSERT INTO jugador VALUES (300,'<NAME>',' California',' 6-9',245,'F','Kings');
INSERT INTO jugador VALUES (301,'<NAME>','St.Johns','6-7',248,'F','Kings');
INSERT INTO jugador VALUES (302,'<NAME>','Rutgers','6-3',175,'G','Kings');
INSERT INTO jugador VALUES (303,'<NAME>','Lousiville','6-7',195,'F-G','Kings');
INSERT INTO jugador VALUES (304,'<NAME>','Washingtong','7-0',245,'C','Kings');
INSERT INTO jugador VALUES (305,'<NAME>','Charleston','6-3',195,'G','Kings');
INSERT INTO jugador VALUES (306,'<NAME>','Western Carolina','6-7',185,'G','Kings');
INSERT INTO jugador VALUES (307,'<NAME>','Purdue','7-0',261,'C','Kings');
INSERT INTO jugador VALUES (308,'<NAME>','Nebraska','7-0',225,'F-C','Kings');
INSERT INTO jugador VALUES (309,'<NAME>','Miami','6-6',207,'G-F','Kings');
INSERT INTO jugador VALUES (310,'<NAME>','New Mexico','6-7',245,'F','Kings');
INSERT INTO jugador VALUES (311,'<NAME>','Slovenia','6-3',205,'G','Kings');
INSERT INTO jugador VALUES (312,'<NAME>','Duke','6-9',250,'F-C','Kings');
INSERT INTO jugador VALUES (313,'<NAME>','Memphis','6-11',255,'C','Kings');
INSERT INTO jugador VALUES (314,'<NAME>','USC','6-9',235,'F-C','Kings');
INSERT INTO jugador VALUES (320,'<NAME>','<NAME>','6-10',228,'F-C','Hornets');
INSERT INTO jugador VALUES (321,'<NAME>','Connecticut','6-11',235,'C-F','Hornets');
INSERT INTO jugador VALUES (322,'<NAME>','Iowa','6-10',218,'F','Hornets');
INSERT INTO jugador VALUES (323,'<NAME>','La Salle','6-7',205,'F-G','Hornets');
INSERT INTO jugador VALUES (324,'<NAME>','Dominguez HS','7-1',235,'C','Hornets');
INSERT INTO jugador VALUES (325,'<NAME>','Fresno State','6-10',261,'C-F','Hornets');
INSERT INTO jugador VALUES (326,'<NAME>','Duquesne','6-2',188,'G','Hornets');
INSERT INTO jugador VALUES (327,'<NAME>','Arkansas','6-1',175,'G','Hornets');
INSERT INTO jugador VALUES (328,'<NAME>','Wake Forest','6-0',175,'G','Hornets');
INSERT INTO jugador VALUES (329,'<NAME>','Michigan State','6-7',220,'G','Hornets');
INSERT INTO jugador VALUES (330,'<NAME>','Serbia','6-10',229,'F','Hornets');
INSERT INTO jugador VALUES (331,'<NAME>','Ball State','6-5',210,'G-F','Hornets');
INSERT INTO jugador VALUES (332,'<NAME>','Xavier','6-9',240,'F','Hornets');
INSERT INTO jugador VALUES (333,'<NAME>','Kansas','6-8',225,'F','Hornets');
INSERT INTO jugador VALUES (340,'<NAME>','Fresno State','6-2',175,'G','Rockets');
INSERT INTO jugador VALUES (341,'<NAME>','Duke','6-8',220,'F','Rockets');
INSERT INTO jugador VALUES (342,'<NAME>','Oregon','6-0',161,'G','Rockets');
INSERT INTO jugador VALUES (343,'<NAME>','Maryland','6-3',210,'G','Rockets');
INSERT INTO jugador VALUES (344,'<NAME>','Rice','6-6',240,'F','Rockets');
INSERT INTO jugador VALUES (345,'<NAME>','Kentucky','6-6',238,'F','Rockets');
INSERT INTO jugador VALUES (346,'Luther Head','Illinois','6-3',185,'G','Rockets');
INSERT INTO jugador VALUES (347,'<NAME>','Minnesota','6-1',185,'G','Rockets');
INSERT INTO jugador VALUES (348,'<NAME>','Purdue','6-9',248,'F','Rockets');
INSERT INTO jugador VALUES (349,'<NAME>','Mount Zion Christian','6-8',223,'G','Rockets');
INSERT INTO jugador VALUES (350,'<NAME>','Georgetown','7-2',260,'C','Rockets');
INSERT INTO jugador VALUES (351,'<NAME>','Marquette','6-10',220,'F','Rockets');
INSERT INTO jugador VALUES (352,'<NAME>','Argentina','6-9',245,'F-C','Rockets');
INSERT INTO jugador VALUES (353,'<NAME>','Arizona','7-2',260,'C','Rockets');
INSERT INTO jugador VALUES (354,'<NAME>','China','7-6',310,'C','Rockets');
INSERT INTO jugador VALUES (361,'<NAME>','Oregon State','6-7',210,'G','Spurs');
INSERT INTO jugador VALUES (362,'<NAME>','Florida','6-10',240,'C-F','Spurs');
INSERT INTO jugador VALUES (363,'<NAME>','Cal State Fullerton','6-7',200,'F','Spurs');
INSERT INTO jugador VALUES (364,'<NAME>','Wake Forest','6-11',260,'F-C','Spurs');
INSERT INTO jugador VALUES (365,'<NAME>','Wisconsin','6-7',225,'G-F','Spurs');
INSERT INTO jugador VALUES (366,'<NAME>','Argentina','6-6',205,'G','Spurs');
INSERT INTO jugador VALUES (367,'<NAME>','Alabama','6-10',240,'F-C','Spurs');
INSERT INTO jugador VALUES (368,'<NAME>','Washington','6-7',215,'F','Spurs');
INSERT INTO jugador VALUES (369,'<NAME>','Frande','6-11',230,'C','Spurs');
INSERT INTO jugador VALUES (370,'<NAME>','Argentina','6-10',245,'C','Spurs');
INSERT INTO jugador VALUES (371,'<NAME>','France','6-2',180,'G','Spurs');
INSERT INTO jugador VALUES (372,'<NAME>','Arizona','5-10',171,'G','Spurs');
INSERT INTO jugador VALUES (373,'<NAME>','Texas Christian','6-9',235,'C-F','Spurs');
INSERT INTO jugador VALUES (374,'<NAME>','Portland State','6-5',220,'F','Spurs');
INSERT INTO jugador VALUES (375,'<NAME>','Kansas','6-1',190,'G','Spurs');
INSERT INTO jugador VALUES (381,'<NAME>','Texas','6-11',245,'F-C','Trail Blazers');
INSERT INTO jugador VALUES (382,'<NAME>','Maryland','6-3',172,'G','Trail Blazers');
INSERT INTO jugador VALUES (383,'<NAME>','Arizona','6-11',248,'C','Trail Blazers');
INSERT INTO jugador VALUES (384,'<NAME>','Georgia Tech','6-3',197,'G','Trail Blazers');
INSERT INTO jugador VALUES (385,'<NAME>','Miami (Fla)','6-8',220,'F','Trail Blazers');
INSERT INTO jugador VALUES (386,'<NAME>','Kansas','6-11',245,'F','Trail Blazers');
INSERT INTO jugador VALUES (387,'<NAME>','Duke','6-10',240,'F','Trail Blazers');
INSERT INTO jugador VALUES (388,'<NAME>','East St.Louis','6-9',222,'F','Trail Blazers');
INSERT INTO jugador VALUES (389,'<NAME>','Ohio State','7-0',250,'C','Trail Blazers');
INSERT INTO jugador VALUES (390,'Travis Outlaw','Starville HS','6-9',215,'F','Trail Blazers');
INSERT INTO jugador VALUES (391,'<NAME>','Minnesota','7-1',255,'C','Trail Blazers');
INSERT INTO jugador VALUES (392,'<NAME>','Spain','6-3',168,'G','Trail Blazers');
INSERT INTO jugador VALUES (393,'<NAME>','Washington','6-6',229,'G-F','Trail Blazers');
INSERT INTO jugador VALUES (394,'<NAME>','Florida State','6-5',210,'G','Trail Blazers');
INSERT INTO jugador VALUES (395,'<NAME>ster','Seattle Prep HS','6-7',229,'F-G','Trail Blazers');
INSERT INTO jugador VALUES (400,'<NAME>','Arizona','6-4',215,'G','Wizards');
INSERT INTO jugador VALUES (401,'<NAME>','South Kent Prep','6-11',248,'F','Wizards');
INSERT INTO jugador VALUES (402,'<NAME>','Connecticut','6-7',228,'F','Wizards');
INSERT INTO jugador VALUES (403,'<NAME>','<NAME>','6-4',205,'G','Wizards');
INSERT INTO jugador VALUES (404,'<NAME>','North Carolina','7-0',263,'C','Wizards');
INSERT INTO jugador VALUES (405,'<NAME>','North Carolina','6-9',235,'F','Wizards');
INSERT INTO jugador VALUES (406,'<NAME>','Virginia','6-5',212,'G','Wizards');
INSERT INTO jugador VALUES (407,'<NAME>','Fresno State','6-9',220,'F','Wizards');
INSERT INTO jugador VALUES (408,'<NAME>','Donetsk','7-0',234,'C-F','Wizards');
INSERT INTO jugador VALUES (409,'<NAME>','Wake Forest','6-9',248,'F','Wizards');
INSERT INTO jugador VALUES (410,'<NAME>','Washington Union HS','6-5',218,'G','Wizards');
INSERT INTO jugador VALUES (411,'<NAME>','Syracuse','6-10',260,'C','Wizards');
INSERT INTO jugador VALUES (412,'<NAME>','USC','6-6',200,'G','Wizards');
INSERT INTO jugador VALUES (420,'<NAME>','Florida Internationa',' 6-2',202,'G','Magic');
INSERT INTO jugador VALUES (421,'<NAME>','Illinois','6-10',235,'F','Magic');
INSERT INTO jugador VALUES (422,'<NAME>','Texas Tech','6-11',240,'F-C','Magic');
INSERT INTO jugador VALUES (423,'<NAME>','Kentucky','6-5',215,'G-F','Magic');
INSERT INTO jugador VALUES (424,'<NAME>','Illinois','6-9',250,'F','Magic');
INSERT INTO jugador VALUES (425,'<NAME>','Missouri','6-3',195,'G','Magic');
INSERT INTO jugador VALUES (426,'<NAME>','Texas','6-5',220,'G','Magic');
INSERT INTO jugador VALUES (427,'<NAME>','Colgate','6-10',270,'C','Magic');
INSERT INTO jugador VALUES (428,'<NAME>','<NAME>','6-9',238,'F','Magic');
INSERT INTO jugador VALUES (429,'<NAME>','Poland','7-0',240,'F-C','Magic');
INSERT INTO jugador VALUES (430,'<NAME>','SW Atlanta Crhistian','6-11',265,'F-C','Magic');
INSERT INTO jugador VALUES (431,'<NAME>','None','6-10',230,'F','Magic');
INSERT INTO jugador VALUES (432,'<NAME>','<NAME>','6-0',190,'G','Magic');
INSERT INTO jugador VALUES (433,'J.J.Redick','Duke','6-4',190,'G','Magic');
INSERT INTO jugador VALUES (434,'<NAME>','Turkey','6-10',220,'F','Magic');
INSERT INTO jugador VALUES (440,'<NAME>','Villanova','6-10',255,'F','Mavericks');
INSERT INTO jugador VALUES (441,'<NAME>','Northeastern','6-0',175,'G','Mavericks');
INSERT INTO jugador VALUES (442,'<NAME>','Louisiana State','6-8',240,'F','Mavericks');
INSERT INTO jugador VALUES (443,'<NAME>','Mississippi','6-11',265,'C','Mavericks');
INSERT INTO jugador VALUES (444,'<NAME>','Wake Forest','6-5',210,'F-G','Mavericks');
INSERT INTO jugador VALUES (445,'<NAME>','Michigan','6-9',253,'F','Mavericks');
INSERT INTO jugador VALUES (446,'<NAME>','Temple','6-6',200,'G-F','Mavericks');
INSERT INTO jugador VALUES (447,'<NAME>','California','6-4',210,'G','Mavericks');
INSERT INTO jugador VALUES (448,'<NAME>','Nebraska','6-0',175,'G','Mavericks');
INSERT INTO jugador VALUES (449,'<NAME>','Kentucky','6-11',265,'C','Mavericks');
INSERT INTO jugador VALUES (450,'<NAME>','Germany','7-0',245,'F','Mavericks');
INSERT INTO jugador VALUES (451,'<NAME>','North Carolina','6-6',218,'G-F','Mavericks');
INSERT INTO jugador VALUES (452,'<NAME>','Arizona','6-2',180,'G','Mavericks');
INSERT INTO jugador VALUES (453,'<NAME>','Texas','6-7',215,'G-F','Mavericks');
INSERT INTO jugador VALUES (454,'<NAME>','Augsburg','6-8',235,'F-G','Mavericks');
INSERT INTO jugador VALUES (461,'<NAME>','Michigan State','6-5',202,'F-G','Nets');
INSERT INTO jugador VALUES (462,'<NAME>','Fayetteville State','6-1',180,'G','Nets');
INSERT INTO jugador VALUES (463,'<NAME>','Connecticut','6-10',237,'C','Nets');
INSERT INTO jugador VALUES (464,'<NAME>','North Carolina','6-6',220,'G','Nets');
INSERT INTO jugador VALUES (465,'<NAME>','Oak Hill Academy HS','7-0',280,'C','Nets');
INSERT INTO jugador VALUES (466,'<NAME>','Wisconsin','6-3',185,'G','Nets');
INSERT INTO jugador VALUES (467,'<NAME>','<NAME>','6-5',233,'F','Nets');
INSERT INTO jugador VALUES (468,'<NAME>','Arizona','6-7',225,'F','Nets');
INSERT INTO jugador VALUES (469,'<NAME>','Serbia Montenegro','7-0',240,'F-C','Nets');
INSERT INTO jugador VALUES (470,'<NAME>','Slovenia','6-9',221,'F','Nets');
INSERT INTO jugador VALUES (471,'<NAME>','Louisiana State','6-10',220,'F-C','Nets');
INSERT INTO jugador VALUES (472,'<NAME>','Utah','6-10',245,'F','Nets');
INSERT INTO jugador VALUES (473,'<NAME>','Connecticut','6-3',205,'G','Nets');
INSERT INTO jugador VALUES (474,'<NAME>','Boston College','6-10',235,'F-C','Nets');
INSERT INTO jugador VALUES (481,'<NAME>','Syracuse','6-8',230,'F','Nuggets');
INSERT INTO jugador VALUES (482,'<NAME>','South Florida','5-11',185,'G','Nuggets');
INSERT INTO jugador VALUES (483,'<NAME>','Massachuhsetts','6-11',235,'C','Nuggets');
INSERT INTO jugador VALUES (484,'<NAME>','Peppedirne','6-7',225,'G-F','Nuggets');
INSERT INTO jugador VALUES (485,'<NAME>','Pepperdine','6-7',225,'G-F','Nuggets');
INSERT INTO jugador VALUES (486,'<NAME>','Florida','6-0',177,'G','Nuggets');
INSERT INTO jugador VALUES (487,'<NAME>','DePaul','7-0',240,'F-C','Nuggets');
INSERT INTO jugador VALUES (488,'<NAME>','Georgetown','6-0',180,'G','Nuggets');
INSERT INTO jugador VALUES (489,'<NAME>','Missouri','6-8',245,'F-G','Nuggets');
INSERT INTO jugador VALUES (490,'<NAME>','Cincinnati','6-9',240,'F','Nuggets');
INSERT INTO jugador VALUES (491,'<NAME>','Oklahoma','6-8',235,'F','Nuggets');
INSERT INTO jugador VALUES (492,'Nene','Brazil','6-11',250,'F-C','Nuggets');
INSERT INTO jugador VALUES (493,'<NAME>','St.Benedits','6-6',220,'G','Nuggets');
INSERT INTO jugador VALUES (500,'<NAME>','Rice','6-6',225,'G','Jazz');
INSERT INTO jugador VALUES (501,'<NAME>','Duke','6-9',266,'F','Jazz');
INSERT INTO jugador VALUES (502,'<NAME>','Arkansas','6-7',223,'G','Jazz');
INSERT INTO jugador VALUES (503,'<NAME>','Stanfor','6-11',239,'C','Jazz');
INSERT INTO jugador VALUES (504,'<NAME>','Ukranie','7-1',288,'C','Jazz');
INSERT INTO jugador VALUES (505,'<NAME>','Gerogia Tech','6-7',230,'F','Jazz');
INSERT INTO jugador VALUES (506,'<NAME>','Syracuse','6-3',180,'G','Jazz');
INSERT INTO jugador VALUES (507,'<NAME>','Russia','6-9',223,'F','Jazz');
INSERT INTO jugador VALUES (508,'<NAME>','Creighton','6-6',211,'F-G','Jazz');
INSERT INTO jugador VALUES (509,'<NAME>','Skyline HS','6-6',220,'F-G','Jazz');
INSERT INTO jugador VALUES (510,'<NAME>','Loisiana Tech','6-8',258,'F-C','Jazz');
INSERT INTO jugador VALUES (511,'<NAME>','Turkey','6-11',263,'C','Jazz');
INSERT INTO jugador VALUES (512,'<NAME>','Utah Valley State','6-2',190,'G','Jazz');
INSERT INTO jugador VALUES (513,'<NAME>','Illions','6-3',205,'G','Jazz');
INSERT INTO jugador VALUES (520,'<NAME>','Auburn','6-6',200,'G','Pacers');
INSERT INTO jugador VALUES (521,'<NAME>','Marquette','6-1',175,'G','Pacers');
INSERT INTO jugador VALUES (522,'<NAME>','Arizona State','6-8',255,'F','Pacers');
INSERT INTO jugador VALUES (523,'<NAME>','Duke','6-9',230,'F-G','Pacers');
INSERT INTO jugador VALUES (524,'<NAME>','Texas State','6-11',250,'C','Pacers');
INSERT INTO jugador VALUES (525,'<NAME>','Oklahoma State','6-6',215,'G','Pacers');
INSERT INTO jugador VALUES (526,'<NAME>','New Mexico','6-8',228,'F-G','Pacers');
INSERT INTO jugador VALUES (527,'<NAME>','Colorado','7-0',280,'C','Pacers');
INSERT INTO jugador VALUES (528,'<NAME>','<NAME>','6-11',245,'C-F','Pacers');
INSERT INTO jugador VALUES (529,'<NAME>','Shaw','6-3',197,'G','Pacers');
INSERT INTO jugador VALUES (530,'<NAME>','au Claire HS (SC)','6-11',260,'F-C','Pacers');
INSERT INTO jugador VALUES (531,'<NAME>','Houston','6-4',200,'G','Pacers');
INSERT INTO jugador VALUES (532,'<NAME>','Missouri','6-6',215,'G','Pacers');
INSERT INTO jugador VALUES (533,'<NAME>','Iowa State','6-3',185,'G','Pacers');
INSERT INTO jugador VALUES (534,'<NAME>','Memphis','6-9',225,'F','Pacers');
INSERT INTO jugador VALUES (540,'<NAME>','UCLA','6-5',215,'G','Pistons');
INSERT INTO jugador VALUES (541,'<NAME>','Colorado','6-3',202,'G','Pistons');
INSERT INTO jugador VALUES (542,'<NAME>','Maryland','6-3',165,'G','Pistons');
INSERT INTO jugador VALUES (543,'<NAME>','Connecticut','6-7',193,'G','Pistons');
INSERT INTO jugador VALUES (544,'<NAME>','Georgia','6-8',228,'F','Pistons');
INSERT INTO jugador VALUES (545,'<NAME>','Argentina','6-9',225,'F','Pistons');
INSERT INTO jugador VALUES (546,'<NAME>','Jackson State','6-2',195,'G','Pistons');
INSERT INTO jugador VALUES (547,'<NAME>','Westchester HS','6-9',210,'F','Pistons');
INSERT INTO jugador VALUES (548,'<NAME>','Cincinnati','6-7',260,'F','Pistons');
INSERT INTO jugador VALUES (549,'<NAME>','Alabama','6-9',245,'F','Pistons');
INSERT INTO jugador VALUES (550,'<NAME>','Kentucky','6-9',215,'F','Pistons');
INSERT INTO jugador VALUES (551,'<NAME>','Wyoming','6-10',235,'C','Pistons');
INSERT INTO jugador VALUES (552,'<NAME>','Senegal','7-1',245,'C','Pistons');
INSERT INTO jugador VALUES (553,'<NAME>','Eastern Washington','6-5',205,'G','Pistons');
INSERT INTO jugador VALUES (554,'<NAME>','North Carolina','6-11',230,'C-F','Pistons');
INSERT INTO jugador VALUES (560,'<NAME>','Kansas','6-10',255,'F-C','Supersonics');
INSERT INTO jugador VALUES (561,'<NAME>','Louisiana State','6-7',209,'F','Supersonics');
INSERT INTO jugador VALUES (562,'<NAME>','Texas','6-9',215,'G','Supersonics');
INSERT INTO jugador VALUES (563,'<NAME>','California','7-0',235,'C','Supersonics');
INSERT INTO jugador VALUES (564,'<NAME>','France','6-7',215,'F','Supersonics');
INSERT INTO jugador VALUES (565,'<NAME>','Georgetown','6-9',235,'F','Supersonics');
INSERT INTO jugador VALUES (566,'<NAME>','Seton Hall','6-5',230,'G-F','Supersonics');
INSERT INTO jugador VALUES (567,'<NAME>','Connecticut','6-9',245,'F','Supersonics');
INSERT INTO jugador VALUES (568,'<NAME>','France','7-0',247,'C','Supersonics');
INSERT INTO jugador VALUES (569,'<NAME>','Oregon','6-2',175,'G','Supersonics');
INSERT INTO jugador VALUES (570,'<NAME>','Senegal','6-11',230,'C','Supersonics');
INSERT INTO jugador VALUES (571,'<NAME>','Bakersfield HS','7-1',245,'C','Supersonics');
INSERT INTO jugador VALUES (572,'<NAME>','UCLA','6-1',185,'G','Supersonics');
INSERT INTO jugador VALUES (573,'<NAME>','Maryland','6-10',235,'F','Supersonics');
INSERT INTO jugador VALUES (574,'<NAME>','Georgia','6-6',225,'F-G','Supersonics');
INSERT INTO jugador VALUES (580,'<NAME>','Brazil','6-3',202,'G','Suns');
INSERT INTO jugador VALUES (581,'<NAME>','Florida Internationa','6-5',215,'G','Suns');
INSERT INTO jugador VALUES (582,'<NAME>','France','6-8',235,'F-C','Suns');
INSERT INTO jugador VALUES (583,'<NAME>','Croatia','6-6',220,'G','Suns');
INSERT INTO jugador VALUES (584,'<NAME>','Duke','6-8',225,'F-G','Suns');
INSERT INTO jugador VALUES (585,'<NAME>','California','6-10',250,'F-C','Suns');
INSERT INTO jugador VALUES (586,'<NAME> - C','Santa Clara','6-3',178,'G','Suns');
INSERT INTO jugador VALUES (587,'<NAME>','Louisiana State','7-1',325,'C','Suns');
INSERT INTO jugador VALUES (588,'<NAME>','Nebraska','6-7',215,'G-F','Suns');
INSERT INTO jugador VALUES (589,'<NAME>','Baylor','6-9',255,'G-F','Suns');
INSERT INTO jugador VALUES (590,'<NAME>','Cypress Creek (Orlan','6-10',249,'C-F','Suns');
INSERT INTO jugador VALUES (591,'<NAME>','Maryland','6-10',201,'G','Suns');
INSERT INTO jugador VALUES (592,'<NAME>','Wisconsin','6-6',205,'F','Suns');
INSERT INTO jugador VALUES (600,'<NAME>',NULL,'6-5',220,'G-F','Warriors');
INSERT INTO jugador VALUES (601,'<NAME>',NULL,'6-7',226,'F','Warriors');
INSERT INTO jugador VALUES (602,'<NAME>',NULL,'6-5',192,'G','Warriors');
INSERT INTO jugador VALUES (603,'<NAME>',NULL,'6-11',230,'C','Warriors');
INSERT INTO jugador VALUES (604,'<NAME>',NULL,'6-10',235,'F','Warriors');
INSERT INTO jugador VALUES (605,'<NAME>',NULL,'6-3',215,'G','Warriors');
INSERT INTO jugador VALUES (606,'<NAME>',NULL,'6-3',177,'G','Warriors');
INSERT INTO jugador VALUES (607,'<NAME>',NULL,'6-9',250,'F-C','Warriors');
INSERT INTO jugador VALUES (608,'<NAME>',NULL,'6-8',218,'F','Warriors');
INSERT INTO jugador VALUES (609,'<NAME>',NULL,'7-0',250,'C','Warriors');
INSERT INTO jugador VALUES (610,'<NAME>',NULL,'7-2',240,'C','Warriors');
INSERT INTO jugador VALUES (611,'<NAME>',NULL,'6-6',215,'F','Warriors');
INSERT INTO jugador VALUES (612,'<NAME>',NULL,'6-2',180,'G','Warriors');
INSERT INTO jugador VALUES (613,'<NAME>',NULL,'6-9',205,'F','Warriors'); |
-- MySQL Script generated by MySQL Workbench
-- Mon 17 Jul 2017 03:48:39 PM PKT
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema mydb
-- -----------------------------------------------------
SHOW WARNINGS;
-- -----------------------------------------------------
-- Schema gameplan2
-- -----------------------------------------------------
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `PortfolioType`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `PortfolioType` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `PortfolioType` (
`portfolioTypeid` INT NOT NULL AUTO_INCREMENT,
`title` VARCHAR(100) NOT NULL,
PRIMARY KEY (`portfolioTypeid`))
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `PortfolioStatus`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `PortfolioStatus` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `PortfolioStatus` (
`portfoliostatusid` INT NOT NULL AUTO_INCREMENT,
`title` VARCHAR(100) NULL,
PRIMARY KEY (`portfoliostatusid`))
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `Team`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `Team` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `Team` (
`teamid` INT NOT NULL AUTO_INCREMENT,
`title` VARCHAR(100) NOT NULL,
PRIMARY KEY (`teamid`))
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `ResourceType`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `ResourceType` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `ResourceType` (
`resourceTypeid` INT NOT NULL AUTO_INCREMENT,
`description` VARCHAR(100) NULL,
PRIMARY KEY (`resourceTypeid`))
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `Resource`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `Resource` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `Resource` (
`resourceid` VARCHAR(100) NOT NULL,
`name` VARCHAR(100) NOT NULL,
`active` TINYINT NOT NULL DEFAULT 1,
`teamid` INT NOT NULL,
`resourceTypeid` INT NOT NULL,
PRIMARY KEY (`resourceid`),
CONSTRAINT `fk_Resource_Team1`
FOREIGN KEY (`teamid`)
REFERENCES `Team` (`teamid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_Resource_ResourceType1`
FOREIGN KEY (`resourceTypeid`)
REFERENCES `ResourceType` (`resourceTypeid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `Portfolio`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `Portfolio` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `Portfolio` (
`portfolioid` INT NOT NULL AUTO_INCREMENT,
`title` VARCHAR(100) NOT NULL COMMENT ' ',
`portfolioTypeid` INT NOT NULL,
`details` TEXT NULL,
`rank` BIGINT NOT NULL DEFAULT 1,
`portfoliostatusid` INT NOT NULL,
`owner` VARCHAR(100) NOT NULL,
`createDate` DATE NULL,
`createby` VARCHAR(100) NULL,
`updatedate` DATE NULL,
`updateby` VARCHAR(100) NULL,
PRIMARY KEY (`portfolioid`, `owner`),
CONSTRAINT `fk_portfolios_portfolioType`
FOREIGN KEY (`portfolioTypeid`)
REFERENCES `PortfolioType` (`portfolioTypeid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_Portfolio_PortfolioStatus1`
FOREIGN KEY (`portfoliostatusid`)
REFERENCES `PortfolioStatus` (`portfoliostatusid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_Portfolio_Resource1`
FOREIGN KEY (`owner`)
REFERENCES `Resource` (`resourceid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `ReleaseStatus`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `ReleaseStatus` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `ReleaseStatus` (
`releasestatusid` INT NOT NULL,
`title` VARCHAR(100) NULL,
PRIMARY KEY (`releasestatusid`))
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `portfolioReleases`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `portfolioReleases` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `portfolioReleases` (
`portfolioid` INT NOT NULL,
`releaseid` INT NOT NULL AUTO_INCREMENT,
`planStartDate` DATE NULL,
`actualStartDate` DATE NULL,
`teamid` INT NOT NULL,
`planEndDate` DATE NULL,
`actualEndDate` DATE NULL,
`details` VARCHAR(100) NULL DEFAULT ' ',
`releasestatusid` INT NOT NULL,
`createDate` DATE NULL,
`createby` VARCHAR(100) NULL,
`updatedate` DATE NULL,
`updateby` VARCHAR(100) NULL,
PRIMARY KEY (`releaseid`),
CONSTRAINT `fk_portfoliReleases_Team1`
FOREIGN KEY (`teamid`)
REFERENCES `Team` (`teamid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_portfolioReleases_ReleaseStatus1`
FOREIGN KEY (`releasestatusid`)
REFERENCES `ReleaseStatus` (`releasestatusid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `sprint`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `sprint` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `sprint` (
`sprintid` INT NOT NULL AUTO_INCREMENT,
`details` VARCHAR(100) NULL,
`startDate` DATE NULL,
`End` DATE NULL,
`releaseId` INT NOT NULL,
`createDate` DATE NULL,
`createby` VARCHAR(100) NULL,
`updateby` VARCHAR(100) NULL,
`updatedate` DATE NULL,
PRIMARY KEY (`sprintid`),
CONSTRAINT `fk_Sprint_portfolioReleases1`
FOREIGN KEY (`releaseId`)
REFERENCES `portfolioReleases` (`releaseid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `UserStory`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `UserStory` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `UserStory` (
`userStoryid` INT NOT NULL AUTO_INCREMENT,
`details` VARCHAR(100) NULL,
`sprintid` INT NULL,
`releaseId` INT NOT NULL,
`createby` VARCHAR(100) NULL,
`createDate` DATE NULL,
`updateby` VARCHAR(100) NULL,
`updatedate` DATE NULL,
PRIMARY KEY (`userStoryid`),
CONSTRAINT `fk_UserStory_Sprint1`
FOREIGN KEY (`sprintid`)
REFERENCES `sprint` (`sprintid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_UserStory_portfolioReleases1`
FOREIGN KEY (`releaseId`)
REFERENCES `portfolioReleases` (`releaseid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `TaskStatus`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `TaskStatus` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `TaskStatus` (
`taskStatusid` INT NOT NULL AUTO_INCREMENT,
`title` VARCHAR(100) NULL,
PRIMARY KEY (`taskStatusid`))
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `ProgressRatio`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `ProgressRatio` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `ProgressRatio` (
`progressRatioid` INT NOT NULL AUTO_INCREMENT,
`descriptions` VARCHAR(100) NULL,
PRIMARY KEY (`progressRatioid`))
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `Task`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `Task` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `Task` (
`taskid` BIGINT NOT NULL AUTO_INCREMENT,
`userStoryid` INT NULL,
`details` VARCHAR(100) NULL,
`estmatedStart` DATE NULL,
`estimatedDuration` INT NULL,
`actualStart` DATE NULL,
`actualDuration` INT NULL,
`taskStatusid` INT NULL,
`progressRatioid` INT NOT NULL DEFAULT 0,
`nextTaskId` BIGINT NULL,
`previousTaskId` BIGINT NULL,
`resourceid` VARCHAR(100) NOT NULL,
PRIMARY KEY (`taskid`),
CONSTRAINT `fk_Task_UserStory1`
FOREIGN KEY (`userStoryid`)
REFERENCES `UserStory` (`userStoryid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_Task_TaskStatus1`
FOREIGN KEY (`taskStatusid`)
REFERENCES `TaskStatus` (`taskStatusid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_Task_ProgressRatio1`
FOREIGN KEY (`progressRatioid`)
REFERENCES `ProgressRatio` (`progressRatioid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_Task_Resource1`
FOREIGN KEY (`resourceid`)
REFERENCES `Resource` (`resourceid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `WorkLog`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `WorkLog` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `WorkLog` (
`workLogid` INT NOT NULL AUTO_INCREMENT,
`startTime` VARCHAR(100) NULL,
`endTime` VARCHAR(100) NULL,
`Duration` VARCHAR(100) NULL,
`taskid` BIGINT NOT NULL,
PRIMARY KEY (`workLogid`),
CONSTRAINT `fk_WorkLog_Task1`
FOREIGN KEY (`taskid`)
REFERENCES `Task` (`taskid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `Dictionary`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `Dictionary` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `Dictionary` (
`Key` VARCHAR(100) NOT NULL,
`shortTitle` VARCHAR(100) NULL,
`LongTitle` VARCHAR(100) NULL,
`ContextHelp` VARCHAR(100) NULL,
PRIMARY KEY (`Key`))
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `auth_group`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `auth_group` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `auth_group` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(80) NOT NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
CREATE UNIQUE INDEX `name` ON `auth_group` (`name` ASC);
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `django_content_type`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `django_content_type` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `django_content_type` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`app_label` VARCHAR(100) NOT NULL,
`model` VARCHAR(100) NOT NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 42
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
CREATE UNIQUE INDEX `django_content_type_app_label_6a46e76723f2a523_uniq` ON `django_content_type` (`app_label` ASC, `model` ASC);
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `auth_permission`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `auth_permission` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `auth_permission` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`content_type_id` INT(11) NOT NULL,
`codename` VARCHAR(100) NOT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `auth__content_type_id_68a76d522108c380_fk_django_content_type_id`
FOREIGN KEY (`content_type_id`)
REFERENCES `django_content_type` (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 124
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `auth_group_permissions`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `auth_group_permissions` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `auth_group_permissions` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`group_id` INT(11) NOT NULL,
`permission_id` INT(11) NOT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `auth_group_p_permission_id_bb6bfa952406395_fk_auth_permission_id`
FOREIGN KEY (`permission_id`)
REFERENCES `auth_permission` (`id`),
CONSTRAINT `auth_group_permissions_group_id_b6891699b9e7a7f_fk_auth_group_id`
FOREIGN KEY (`group_id`)
REFERENCES `auth_group` (`id`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `auth_user`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `auth_user` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `auth_user` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`password` VARCHAR(128) NOT NULL,
`last_login` DATETIME(6) NULL DEFAULT NULL,
`is_superuser` TINYINT(1) NOT NULL,
`username` VARCHAR(150) NOT NULL,
`first_name` VARCHAR(30) NOT NULL,
`last_name` VARCHAR(30) NOT NULL,
`email` VARCHAR(254) NOT NULL,
`is_staff` TINYINT(1) NOT NULL,
`is_active` TINYINT(1) NOT NULL,
`date_joined` DATETIME(6) NOT NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 3
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
CREATE UNIQUE INDEX `username` ON `auth_user` (`username` ASC);
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `auth_user_groups`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `auth_user_groups` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `auth_user_groups` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`user_id` INT(11) NOT NULL,
`group_id` INT(11) NOT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `auth_user_groups_group_id_3ede0f9832725b08_fk_auth_group_id`
FOREIGN KEY (`group_id`)
REFERENCES `auth_group` (`id`),
CONSTRAINT `auth_user_groups_user_id_655dbca2ecd17c76_fk_auth_user_id`
FOREIGN KEY (`user_id`)
REFERENCES `auth_user` (`id`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `auth_user_user_permissions`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `auth_user_user_permissions` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `auth_user_user_permissions` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`user_id` INT(11) NOT NULL,
`permission_id` INT(11) NOT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `auth_user_u_permission_id_1e5a97a696f6d4e2_fk_auth_permission_id`
FOREIGN KEY (`permission_id`)
REFERENCES `auth_permission` (`id`),
CONSTRAINT `auth_user_user_permissi_user_id_67f1081c74f8067a_fk_auth_user_id`
FOREIGN KEY (`user_id`)
REFERENCES `auth_user` (`id`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `dictionary`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `dictionary` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `dictionary` (
`Key` VARCHAR(100) NOT NULL,
`shortTitle` VARCHAR(100) NULL DEFAULT NULL,
`LongTitle` VARCHAR(100) NULL DEFAULT NULL,
`ContextHelp` VARCHAR(100) NULL DEFAULT NULL,
PRIMARY KEY (`Key`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `django_admin_log`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `django_admin_log` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `django_admin_log` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`action_time` DATETIME(6) NOT NULL,
`object_id` LONGTEXT NULL DEFAULT NULL,
`object_repr` VARCHAR(200) NOT NULL,
`action_flag` SMALLINT(5) UNSIGNED NOT NULL,
`change_message` LONGTEXT NOT NULL,
`content_type_id` INT(11) NULL DEFAULT NULL,
`user_id` INT(11) NOT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `django_admin_log_user_id_77279d384b22150a_fk_auth_user_id`
FOREIGN KEY (`user_id`)
REFERENCES `auth_user` (`id`),
CONSTRAINT `django_content_type_id_71a9cf6830b9f3b_fk_django_content_type_id`
FOREIGN KEY (`content_type_id`)
REFERENCES `django_content_type` (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 33
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `django_migrations`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `django_migrations` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `django_migrations` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`app` VARCHAR(255) NOT NULL,
`name` VARCHAR(255) NOT NULL,
`applied` DATETIME(6) NOT NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 25
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `django_session`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `django_session` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `django_session` (
`session_key` VARCHAR(40) NOT NULL,
`session_data` LONGTEXT NOT NULL,
`expire_date` DATETIME(6) NOT NULL,
PRIMARY KEY (`session_key`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
CREATE INDEX `django_session_de54fa62` ON `django_session` (`expire_date` ASC);
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `tasklinkslabel`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `tasklinkslabel` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `tasklinkslabel` (
`taskLinksLabelid` INT(11) NOT NULL AUTO_INCREMENT,
`label` VARCHAR(100) NULL DEFAULT NULL,
PRIMARY KEY (`taskLinksLabelid`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `progressratio`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `progressratio` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `progressratio` (
`progressRatioid` INT(11) NOT NULL AUTO_INCREMENT,
`descriptions` VARCHAR(100) NULL DEFAULT NULL,
PRIMARY KEY (`progressRatioid`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `resourcetype`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `resourcetype` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `resourcetype` (
`resourceTypeid` INT(11) NOT NULL AUTO_INCREMENT,
`description` VARCHAR(100) NULL DEFAULT NULL,
PRIMARY KEY (`resourceTypeid`))
ENGINE = InnoDB
AUTO_INCREMENT = 3
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `team`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `team` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `team` (
`teamid` INT(11) NOT NULL AUTO_INCREMENT,
`title` VARCHAR(100) NOT NULL,
PRIMARY KEY (`teamid`))
ENGINE = InnoDB
AUTO_INCREMENT = 3
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `resource`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `resource` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `resource` (
`resourceid` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(100) NOT NULL,
`active` TINYINT(4) NOT NULL DEFAULT '1',
`teamid` INT(11) NOT NULL,
`resourceTypeid` INT(11) NOT NULL,
PRIMARY KEY (`resourceid`),
CONSTRAINT `fk_Resource_ResourceType1`
FOREIGN KEY (`resourceTypeid`)
REFERENCES `resourcetype` (`resourceTypeid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_Resource_Team1`
FOREIGN KEY (`teamid`)
REFERENCES `team` (`teamid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
AUTO_INCREMENT = 2
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `taskstatus`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `taskstatus` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `taskstatus` (
`taskStatusid` INT(11) NOT NULL AUTO_INCREMENT,
`title` VARCHAR(100) NULL DEFAULT NULL,
PRIMARY KEY (`taskStatusid`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `task`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `task` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `task` (
`taskid` BIGINT(20) NOT NULL AUTO_INCREMENT,
`userStoryid` INT(11) NULL DEFAULT NULL,
`estmatedStart` DATE NULL DEFAULT NULL,
`estimatedDuration` INT(11) NULL DEFAULT NULL,
`actualStart` DATE NULL DEFAULT NULL,
`actualDuration` INT(11) NULL DEFAULT NULL,
`taskStatusid` INT(11) NULL DEFAULT NULL,
`progressRatioid` INT(11) NOT NULL DEFAULT '0',
`nextTaskId` BIGINT(20) NULL DEFAULT NULL,
`previousTaskId` BIGINT(20) NULL DEFAULT NULL,
`resourceid` INT(11) NOT NULL,
PRIMARY KEY (`taskid`),
CONSTRAINT `fk_Task_ProgressRatio1`
FOREIGN KEY (`progressRatioid`)
REFERENCES `progressratio` (`progressRatioid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_Task_Resource1`
FOREIGN KEY (`resourceid`)
REFERENCES `resource` (`resourceid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_Task_TaskStatus1`
FOREIGN KEY (`taskStatusid`)
REFERENCES `taskstatus` (`taskStatusid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_Task_UserStory1`
FOREIGN KEY (`userStoryid`)
REFERENCES `userstory` (`userStoryid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `externallinks`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `externallinks` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `externallinks` (
`externalLInksid` INT(11) NOT NULL AUTO_INCREMENT,
`url` VARCHAR(100) NULL DEFAULT NULL,
`taskid` BIGINT(20) NOT NULL,
`linksLabelid` INT(11) NOT NULL,
PRIMARY KEY (`externalLInksid`),
CONSTRAINT `fk_externalLInks_LinksLabel1`
FOREIGN KEY (`linksLabelid`)
REFERENCES `tasklinkslabel` (`taskLinksLabelid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_externalLInks_Task1`
FOREIGN KEY (`taskid`)
REFERENCES `task` (`taskid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `portfolilables`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `portfolilables` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `portfolilables` (
`portFoliLablesid` INT(11) NOT NULL AUTO_INCREMENT,
`label` VARCHAR(100) NULL DEFAULT NULL,
`portfolioid` INT(11) NOT NULL,
PRIMARY KEY (`portFoliLablesid`),
CONSTRAINT `fk_PortFoliLables_Portfolio1`
FOREIGN KEY (`portfolioid`)
REFERENCES `portfolio` (`portfolioid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `portfolilinkslabel`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `portfolilinkslabel` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `portfolilinkslabel` (
`portFoliLinksLabelid` INT(11) NOT NULL AUTO_INCREMENT,
`label` VARCHAR(100) NULL DEFAULT NULL,
`Url` VARCHAR(100) NULL DEFAULT NULL,
PRIMARY KEY (`portFoliLinksLabelid`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `portfoliolinks`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `portfoliolinks` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `portfoliolinks` (
`portFoliLinksid` INT(11) NOT NULL AUTO_INCREMENT,
`portfolioid` INT(11) NOT NULL,
`portFoliLinksLabelid` INT(11) NOT NULL,
PRIMARY KEY (`portFoliLinksid`),
CONSTRAINT `fk_PortfolioLInks_PortFoliLinksLabel1`
FOREIGN KEY (`portFoliLinksLabelid`)
REFERENCES `portfolilinkslabel` (`portFoliLinksLabelid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_PortfolioLInks_Portfolio1`
FOREIGN KEY (`portfolioid`)
REFERENCES `portfolio` (`portfolioid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `portfoliostatus`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `portfoliostatus` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `portfoliostatus` (
`portfoliostatusid` INT(11) NOT NULL AUTO_INCREMENT,
`title` VARCHAR(100) NULL DEFAULT NULL,
PRIMARY KEY (`portfoliostatusid`))
ENGINE = InnoDB
AUTO_INCREMENT = 6
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `portfoliotype`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `portfoliotype` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `portfoliotype` (
`portfolioTypeid` INT(11) NOT NULL AUTO_INCREMENT,
`title` VARCHAR(100) NOT NULL,
PRIMARY KEY (`portfolioTypeid`))
ENGINE = InnoDB
AUTO_INCREMENT = 5
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `releasestatus`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `releasestatus` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `releasestatus` (
`releasestatusid` INT(11) NOT NULL,
`title` VARCHAR(100) NULL DEFAULT NULL,
PRIMARY KEY (`releasestatusid`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `scrum_sprint`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `scrum_sprint` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `scrum_sprint` (
`sprintid` INT(11) NOT NULL AUTO_INCREMENT,
`details` VARCHAR(100) NULL DEFAULT NULL,
`startDate` DATE NULL DEFAULT NULL,
`End` DATE NULL DEFAULT NULL,
`releaseid` INT(11) NOT NULL,
PRIMARY KEY (`sprintid`),
CONSTRAINT `scrum_sprint_releaseid_ed650e2a_fk_portfolioReleases_releaseid`
FOREIGN KEY (`releaseid`)
REFERENCES `portfolioreleases` (`releaseId`))
ENGINE = InnoDB
AUTO_INCREMENT = 3
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `sprint`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `sprint` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `sprint` (
`sprintid` INT(11) NOT NULL AUTO_INCREMENT,
`details` VARCHAR(100) NULL DEFAULT NULL,
`startDate` DATE NULL DEFAULT NULL,
`End` DATE NULL DEFAULT NULL,
`releaseId` INT(11) NOT NULL,
`updateby` VARCHAR(100) NULL DEFAULT NULL,
`updatedate` DATE NULL DEFAULT NULL,
`createdate` DATE NULL DEFAULT NULL,
`createby` VARCHAR(100) NULL DEFAULT NULL,
PRIMARY KEY (`sprintid`),
CONSTRAINT `fk_Sprint_portfolioReleases1`
FOREIGN KEY (`releaseId`)
REFERENCES `portfolioreleases` (`releaseId`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
AUTO_INCREMENT = 3
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `teamresource`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `teamresource` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `teamresource` (
`resourceid` INT(11) NOT NULL,
`teamid` INT(11) NOT NULL,
PRIMARY KEY (`resourceid`),
CONSTRAINT `fk_TeamResource_Team1`
FOREIGN KEY (`teamid`)
REFERENCES `team` (`teamid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_teamResources_Resources1`
FOREIGN KEY (`resourceid`)
REFERENCES `resource` (`resourceid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `worklog`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `worklog` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `worklog` (
`workLogid` INT(11) NOT NULL AUTO_INCREMENT,
`startTime` VARCHAR(100) NULL DEFAULT NULL,
`endTime` VARCHAR(100) NULL DEFAULT NULL,
`Duration` VARCHAR(100) NULL DEFAULT NULL,
`taskid` BIGINT(20) NOT NULL,
PRIMARY KEY (`workLogid`),
CONSTRAINT `fk_WorkLog_Task1`
FOREIGN KEY (`taskid`)
REFERENCES `task` (`taskid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;
SHOW WARNINGS;
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
|
<filename>roc-user-center/src/main/resources/sql/schema.sql<gh_stars>0
DROP TABLE IF EXISTS t_roc_user;
CREATE TABLE t_roc_user
(
id BIGINT PRIMARY KEY NOT NULL COMMENT 'ID',
created_time TIMESTAMP NOT NULL COMMENT '创建时间',
updated_time TIMESTAMP NOT NULL COMMENT '更新时间',
deleted_time TIMESTAMP COMMENT '删除时间',
nick_name VARCHAR(128) COMMENT '昵称',
username VARCHAR(128) NOT NULL COMMENT '用户名',
password VARCHAR(255) NOT NULL COMMENT '密码',
phone VARCHAR(128) COMMENT '手机号',
email VARCHAR(128) COMMENT '邮箱',
avatar VARCHAR(256) COMMENT '头像地址',
login_ip VARCHAR(128) COMMENT '登录IP',
status TINYINT(1) NOT NULL COMMENT '用户状态',
remark TEXT COMMENT '备注'
) COMMENT '用户表';
DROP TABLE IF EXISTS t_roc_user_role;
CREATE TABLE t_roc_user_role
(
id BIGINT PRIMARY KEY NOT NULL COMMENT 'ID',
created_time TIMESTAMP NOT NULL COMMENT '创建时间',
updated_time TIMESTAMP NOT NULL COMMENT '更新时间',
deleted_time TIMESTAMP COMMENT '删除时间',
user_id BIGINT NOT NULL COMMENT '用户ID',
role_id BIGINT NOT NULL COMMENT '角色ID'
) COMMENT '用户角色表';
DROP TABLE IF EXISTS t_roc_role;
CREATE TABLE t_roc_role
(
id BIGINT PRIMARY KEY NOT NULL COMMENT 'ID',
created_time TIMESTAMP NOT NULL COMMENT '创建时间',
updated_time TIMESTAMP NOT NULL COMMENT '更新时间',
deleted_time TIMESTAMP COMMENT '删除时间',
name VARCHAR(128) NOT NULL COMMENT '角色名称'
) COMMENT '角色表';
DROP TABLE IF EXISTS t_roc_role_permission;
CREATE TABLE t_roc_role_permission
(
id BIGINT PRIMARY KEY NOT NULL COMMENT 'ID',
created_time TIMESTAMP NOT NULL COMMENT '创建时间',
updated_time TIMESTAMP NOT NULL COMMENT '更新时间',
deleted_time TIMESTAMP COMMENT '删除时间',
role_id BIGINT NOT NULL COMMENT '角色ID',
permission_id BIGINT NOT NULL COMMENT '权限ID'
) COMMENT '角色权限表';
DROP TABLE IF EXISTS t_roc_permission;
CREATE TABLE t_roc_permission
(
id BIGINT PRIMARY KEY NOT NULL COMMENT 'ID',
created_time TIMESTAMP NOT NULL COMMENT '创建时间',
updated_time TIMESTAMP NOT NULL COMMENT '更新时间',
deleted_time TIMESTAMP COMMENT '删除时间',
name VARCHAR(128) NOT NULL COMMENT '权限名称'
) COMMENT '权限表'; |
# --- Ups!
insert into solar_info (id, monitoring_time, irradiance, panel_temp, ambient_temp, wind_speed, wind_dir, sum_energy) values (uuid_generate_v4(), timestamp '2014-01-01 04:00' , 0, 19.6, 19.6, 0, 5.5, 0);
# --- Downs!
delete from solar_info where monitoring_time = timestamp '2014-01-01 04:00'; |
------------------------------------------------------------------------TABLE DEFINITION:START------------------------------------------------------------------------
CREATE TABLE alert (
alert_id bigint NOT NULL,
patient_uuid character varying(100) NOT NULL,
alert_time timestamp without time zone NOT NULL,
alert_text character varying(5000) NOT NULL,
data_id bigint NOT NULL,
transmit_success_date timestamp without time zone,
retry_attempts integer NOT NULL
);
CREATE SEQUENCE alert_alert_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
CREATE TABLE attribute_threshold (
attribute_threshold_id integer NOT NULL,
attribute_id integer NOT NULL,
patient_uuid character varying(100) NOT NULL,
threshold_type character varying(100) NOT NULL,
threshold_low_value character varying(100) NOT NULL,
threshold_high_value character varying(100) NOT NULL,
effective_date timestamp without time zone NOT NULL
);
CREATE SEQUENCE attribute_threshold_attribute_threshold_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
CREATE TABLE patient (
patient_uuid character varying(100) NOT NULL,
patient_group_uuid character varying(100)
);
CREATE TABLE patient_details (
patient_uuid character varying(100) NOT NULL,
nhs_number character varying(100) NOT NULL,
first_name character varying(100) NOT NULL,
last_name character varying(100) NOT NULL,
dob timestamp without time zone NOT NULL
);
CREATE TABLE patient_group (
patient_group_uuid character varying(100) NOT NULL,
patient_group_name character varying(100)
);
CREATE TABLE recording_device_attribute (
attribute_id integer NOT NULL,
attribute_name character varying(100) NOT NULL,
type_id integer NOT NULL,
attribute_units character varying(100),
attribute_type character varying(100) NOT NULL
);
CREATE SEQUENCE recording_device_attribute_attribute_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
CREATE TABLE recording_device_data (
data_id bigint NOT NULL,
attribute_id integer NOT NULL,
data_value character varying(1000) NOT NULL,
patient_uuid character varying(100) NOT NULL,
data_value_time timestamp without time zone NOT NULL,
downloaded_time timestamp without time zone NOT NULL,
schedule_effective_time timestamp without time zone,
schedule_expiry_time timestamp without time zone,
alert_status character varying(100)
);
CREATE SEQUENCE recording_device_data_data_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
CREATE TABLE recording_device_type (
type_id integer NOT NULL,
type character varying(100) NOT NULL,
make character varying(100),
model character varying(100),
display_name character varying(100) NOT NULL
);
CREATE SEQUENCE recording_device_type_type_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
CREATE TABLE clinician_details (
clinician_uuid VARCHAR(100) NOT NULL,
clinician_username VARCHAR(100) NOT NULL,
password VARCHAR(100) NOT NULL,
first_name VARCHAR(100) NOT NULL,
last_name VARCHAR(100) NOT NULL,
patient_group_uuid VARCHAR(100) NOT NULL,
CONSTRAINT "clinician_details_pk" PRIMARY KEY ("clinician_uuid")
);
CREATE TABLE clinician_role (
clinician_role_id SERIAL,
clinician_uuid varchar(100) NOT NULL,
role varchar(45) NOT NULL,
PRIMARY KEY (clinician_role_id),
CONSTRAINT unique_clinician_uuid_role UNIQUE (role,clinician_uuid),
CONSTRAINT fk_clinician_id FOREIGN KEY (clinician_uuid) REFERENCES clinician_details (clinician_uuid));
CREATE INDEX fk_clinician_details_idx ON clinician_role(clinician_uuid);
------------------------------------------------------------------------TABLE DEFINITION:END------------------------------------------------------------------------
------------------------------------------------------------------------SEQUNCES LINK:START------------------------------------------------------------------------
ALTER TABLE ONLY alert ALTER COLUMN alert_id SET DEFAULT nextval('alert_alert_id_seq'::regclass);
ALTER TABLE ONLY attribute_threshold ALTER COLUMN attribute_threshold_id SET DEFAULT nextval('attribute_threshold_attribute_threshold_id_seq'::regclass);
ALTER TABLE ONLY recording_device_attribute ALTER COLUMN attribute_id SET DEFAULT nextval('recording_device_attribute_attribute_id_seq'::regclass);
ALTER TABLE ONLY recording_device_data ALTER COLUMN data_id SET DEFAULT nextval('recording_device_data_data_id_seq'::regclass);
ALTER TABLE ONLY recording_device_type ALTER COLUMN type_id SET DEFAULT nextval('recording_device_type_type_id_seq'::regclass);
SELECT pg_catalog.setval('alert_alert_id_seq', 1, false);
SELECT pg_catalog.setval('attribute_threshold_attribute_threshold_id_seq', 1, false);
SELECT pg_catalog.setval('recording_device_attribute_attribute_id_seq', 1, false);
SELECT pg_catalog.setval('recording_device_data_data_id_seq', 1, false);
SELECT pg_catalog.setval('recording_device_type_type_id_seq', 1, false);
------------------------------------------------------------------------SEQUNCES LINK:END------------------------------------------------------------------------
------------------------------------------------------------------------CONSTRAINT:START------------------------------------------------------------------------
ALTER TABLE ONLY alert ADD CONSTRAINT alert_id PRIMARY KEY (alert_id);
ALTER TABLE ONLY recording_device_attribute ADD CONSTRAINT attribute_id PRIMARY KEY (attribute_id);
ALTER TABLE ONLY attribute_threshold ADD CONSTRAINT attribute_threshold_id PRIMARY KEY (attribute_threshold_id);
ALTER TABLE ONLY recording_device_data ADD CONSTRAINT data_id PRIMARY KEY (data_id);
ALTER TABLE ONLY patient_details ADD CONSTRAINT patient_details_pk PRIMARY KEY (patient_uuid);
ALTER TABLE ONLY patient_group ADD CONSTRAINT patient_group_pk PRIMARY KEY (patient_group_uuid);
ALTER TABLE ONLY patient ADD CONSTRAINT patient_id PRIMARY KEY (patient_uuid);
ALTER TABLE ONLY recording_device_type ADD CONSTRAINT type_id PRIMARY KEY (type_id);
ALTER TABLE ONLY alert ADD CONSTRAINT patient_alert_fk FOREIGN KEY (patient_uuid) REFERENCES patient(patient_uuid);
ALTER TABLE ONLY attribute_threshold ADD CONSTRAINT patient_attribute_threshold_fk FOREIGN KEY (patient_uuid) REFERENCES patient(patient_uuid);
ALTER TABLE ONLY patient ADD CONSTRAINT patient_group_patient_fk FOREIGN KEY (patient_group_uuid) REFERENCES patient_group(patient_group_uuid);
ALTER TABLE ONLY patient_details ADD CONSTRAINT patient_patient_details_fk FOREIGN KEY (patient_uuid) REFERENCES patient(patient_uuid);
ALTER TABLE ONLY recording_device_data ADD CONSTRAINT patient_recording_device_data_fk FOREIGN KEY (patient_uuid) REFERENCES patient(patient_uuid);
ALTER TABLE ONLY attribute_threshold ADD CONSTRAINT recording_device_attribute_attribute_threshold_fk FOREIGN KEY (attribute_id) REFERENCES recording_device_attribute(attribute_id);
ALTER TABLE ONLY recording_device_data ADD CONSTRAINT recording_device_attribute_recording_device_data_fk FOREIGN KEY (attribute_id) REFERENCES recording_device_attribute(attribute_id);
ALTER TABLE ONLY alert ADD CONSTRAINT recording_device_data_alert_fk FOREIGN KEY (data_id) REFERENCES recording_device_data(data_id);
ALTER TABLE ONLY recording_device_attribute ADD CONSTRAINT recording_device_type_recording_device_attribute_fk FOREIGN KEY (type_id) REFERENCES recording_device_type(type_id);
ALTER TABLE ONLY clinician_details ADD CONSTRAINT "patient_group_clinician_details_fk" FOREIGN KEY ("patient_group_uuid") REFERENCES patient_group ("patient_group_uuid");
------------------------------------------------------------------------CONSTRAINT:END------------------------------------------------------------------------ |
<reponame>mtulio/kb
INSERT INTO empregado VALUES (005,'<NAME>','18/08/1972',02,02)
INSERT INTO empregado VALUES (006,'<NAME>','25/03/1960',01,01)
INSERT INTO empregado VALUES (007,'<NAME>','27/12/1955',03,03)
INSERT INTO empregado VALUES (008,'<NAME>','03/02/1951',02,01)
INSERT INTO empregado VALUES (009,'<NAME>','14/11/1955',01,02)
|
ALTER TABLE users
ADD COLUMN stihi_user BOOLEAN default 'f';
CREATE INDEX idx_users_parial_stihi_user_id ON users (id) WHERE stihi_user;
|
<reponame>ancoron/pg-uuid-v1<gh_stars>1-10
SET timezone TO 'Africa/Nairobi';
-- extract timestamp
WITH test_data (uuid, ts) AS (
SELECT t.uuid::uuid_v1, uuid_v1_get_timestamp(t.uuid::uuid_v1)
FROM (
VALUES
('edb4d8f0-1a80-11e8-98d9-e03f49f7f8f3'),
('4938f30e-8449-11e9-ae2b-e03f49467033')
) AS t (uuid)
)
SELECT
to_char(ts, 'IYYY-MM-DD"T"HH24:MI:SS.USOF') AS "iso_timestamp",
extract(epoch from ts) AS "epoch",
ts AS "timestamp"
FROM test_data;
-- extract clock sequence
WITH test_data (uuid, clock_seq) AS (
SELECT t.uuid::uuid_v1, uuid_v1_get_clockseq(t.uuid::uuid_v1)
FROM (
VALUES
('edb4d8f0-1a80-11e8-98d9-e03f49f7f8f3'),
('4938f30e-8449-11e9-ae2b-e03f49467033'),
('e856f430-f950-11eb-adf0-e03f49f7f8f3'),
('e856f430-f950-11eb-bfff-e03f49f7f8f3'),
('e856f430-f950-11eb-8000-e03f49f7f8f3')
) AS t (uuid)
)
SELECT uuid, to_hex(clock_seq::integer) AS "hex", clock_seq
FROM test_data;
-- extract node
WITH test_data (uuid, node) AS (
SELECT t.uuid::uuid_v1, uuid_v1_get_node(t.uuid::uuid_v1)
FROM (
VALUES
('edb4d8f0-1a80-11e8-98d9-e03f49f7f8f3'),
('4938f30e-8449-11e9-ae2b-e03f49467033'),
('e856f430-f950-11eb-adf0-652aab8c3fac'),
('e856f430-f950-11eb-adf0-dc399a95ccb0'),
('e856f430-f950-11eb-adf0-8992b529b4ab')
) AS t (uuid)
)
SELECT uuid, pg_typeof(node) AS "data type", encode(node, 'hex') AS "node (hex)"
FROM test_data;
|
<filename>models/staging/stg_dbt__node_executions.sql
with base as (
select *
from {{ ref('stg_dbt__artifacts') }}
),
base_nodes as (
select *
from {{ ref('stg_dbt__nodes') }}
),
base_v2 as (
select *
from {{ source('dbt_artifacts', 'dbt_run_results_nodes') }}
),
run_results as (
select *
from base
where artifact_type = 'run_results.json'
),
fields as (
-- V1 uploads
{{ flatten_results("run_results") }}
union all
-- V2 uploads
-- NB: We can safely select * because we know the schemas are the same
-- as they're made by the same macro.
select * from base_v2
),
surrogate_key as (
select
{{ dbt_utils.surrogate_key(['fields.command_invocation_id', 'fields.node_id']) }} as node_execution_id,
fields.command_invocation_id,
fields.dbt_cloud_run_id,
fields.artifact_run_id,
fields.artifact_generated_at,
fields.was_full_refresh,
fields.node_id,
base_nodes.resource_type,
split(fields.result_json:thread_id::string, '-')[1]::integer as thread_id,
fields.status,
fields.result_json:message::string as message,
fields.compile_started_at,
fields.query_completed_at,
fields.total_node_runtime,
fields.result_json:adapter_response:rows_affected::int as rows_affected,
fields.result_json
from fields
-- Inner join so that we only represent results for nodes which definitely have a manifest
-- and visa versa.
inner join base_nodes on (
fields.artifact_run_id = base_nodes.artifact_run_id
and fields.node_id = base_nodes.node_id)
)
select * from surrogate_key
|
<reponame>nikolaslada/sakura-dibi<gh_stars>0
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
INSERT INTO `traversal` (`id`, `left`, `right`, `parent`, `name`) VALUES
(1, 1, 26, NULL, 'Root'),
(2, 2, 3, 1, 'BranchA'),
(3, 4, 9, 1, 'BranchB'),
(4, 10, 23, 1, 'BranchC'),
(5, 24, 25, 1, 'BranchD'),
(6, 5, 8, 3, 'BranchBA'),
(7, 6, 7, 6, 'BranchBAA'),
(8, 11, 16, 4, 'BranchCA'),
(9, 17, 22, 4, 'BranchCB'),
(10, 12, 13, 8, 'BranchCAA'),
(11, 14, 15, 8, 'BranchCAB'),
(12, 18, 19, 9, 'BranchCBA'),
(13, 20, 21, 9, 'BranchCBB');
|
<filename>am-lib/src/main/resources/db/migration/V1__Create_initial_table.sql
create table ACCESS_CONTROL (
access_control_id BIGSERIAL primary key
) |
CREATE TABLE [dbo].[Vote]
(
[VoteId] INT IDENTITY (1, 1) NOT NULL,
[AppUserId] INT NOT NULL,
[UpPostId] INT NOT NULL,
[DownPostId] INT NOT NULL,
CONSTRAINT [FK_Vote_AppUser] FOREIGN KEY ([AppUserId]) REFERENCES [AppUser]([AppUserId]),
CONSTRAINT [FK_Vote_Post_Up] FOREIGN KEY ([UpPostId]) REFERENCES [Post]([PostId]),
CONSTRAINT [FK_Vote_Post_Down] FOREIGN KEY ([DownPostId]) REFERENCES [Post]([PostId]),
CONSTRAINT [PK_Vote] PRIMARY KEY CLUSTERED ([VoteId] ASC)
)
|
insert into city values
(4539140,"Hughes County","US",-96.266953,35.06675),
(4556125,"Yeager","US",-96.339447,35.157581),
(123256,"<NAME>","IR",59.136929,35.195129),
(4538431,"Haskell County","US",-95.133568,35.216759),
(4540465,"Lafayette","US",-95.103569,35.173988),
(6698269,"owariasahi","JP",137.029999,35.208),
(1864263,"Echigawa","JP",136.199997,35.166672),
(1857672,"Manzawa","JP",138.516663,35.216671),
(5352950,"Goldstone","US",-116.913933,35.297192),
(4533690,"Cleveland County","US",-97.300308,35.200069),
(4541152,"Little Axe","US",-97.212532,35.232571),
(4490053,"Sampson County","US",-78.399719,34.966839),
(4489019,"<NAME>","US",-78.414169,35.2085),
(1850177,"Tokuda","JP",136.583328,35.23333),
(2490095,"<NAME>","DZ",0.16667,35.416672),
(2499248,"<NAME>","DZ",-0.07908,35.259411),
(116401,"<NAME>","IR",55,35.5),
(4626743,"Grundy County","US",-85.833313,35.26675),
(4635518,"Lankford Town","US",-85.73719,35.249519),
(4479988,"Montgomery County","US",-79.899773,35.35014),
(4465305,"Emerald Shores","US",-80.080612,35.25042),
(110791,"<NAME>","IR",51.416672,35.666672),
(120219,"Qal‘eh-ye Moḩammad ‘<NAME>","IR",50.981098,35.2528),
(1861602,"Inazawa","JP",136.783325,35.25),
(4537854,"Grady County","US",-97.900322,35.033401),
(4542876,"Minco","US",-97.944489,35.31284),
(98410,"Muḩāfaz̧<NAME>","IQ",44.166672,35.25),
(96165,"Hamādīyah","IQ",44.21352,35.277569),
(5362932,"Kern County","US",-118.667587,35.29607),
(5405867,"Venola","US",-119.054268,35.310791),
(1855380,"Ninomiya","JP",139.253326,35.303329),
(8133750,"<NAME>","GR",24.194099,35.369801),
(260979,"Karés","GR",24.1,35.383331),
(8133920,"<NAME>","GR",25.092939,35.24445),
(252952,"Thérissos","GR",25.116671,35.333328),
(5293685,"East Flagstaff","US",-111.61322,35.211399),
(7330083,"<NAME>","IQ",45.24926,35.315411),
(94930,"<NAME>","IQ",45.202579,35.334702),
(1860380,"Kami-yamasa","JP",133.116669,35.316669),
(1907243,"Takata","JP",139.423065,35.33889),
(1860244,"Kanazawa","JP",139.633331,35.349998),
(4470002,"Harnett County","US",-78.849739,35.383492),
(4453706,"Barbecue","US",-79.038643,35.335991),
(4621908,"Fayette County","US",-89.41674,35.200089),
(4669365,"Y<NAME>","US",-89.36396,35.34536),
(1147707,"<NAME>","AF",63.75,35),
(1849423,"Ueki","JP",139.516663,35.349998),
(5309082,"<NAME>","US",-112.066002,35.241959),
(1849897,"Totsukachō","JP",139.533325,35.400002),
(4116263,"Jackson County","US",-91.200127,35.600079),
(4121026,"McFadden","US",-91.092072,35.406471),
(5489818,"San Miguel County","US",-104.883881,35.483379),
(5474889,"La Liendre","US",-105.05056,35.422272),
(1835841,"Republic of Korea","KR",127.5,37),
(1902028,"Kyŏngsang-namdo","KR",128.25,35.25),
(1846430,"Changp’o","KR",128.435013,35.381691),
(5397976,"Spangler","US",-117.451439,35.548851),
(2473451,"Gouver<NAME>","TN",9.83333,35.583328),
(2465108,"<NAME>","TN",10.0477,35.397419),
(2473574,"Gouvernorat de Mahdia","TN",10.58333,35.333328),
(2464020,"Z<NAME>","TN",10.54745,35.34325),
(1861449,"Isehara","JP",139.307785,35.39056),
(5305206,"Mohave County","US",-113.767448,36.083321),
(4551046,"Seminole County","US",-96.600288,35.150082),
(6837283,"Q<NAME>","IQ",43.098122,35.452641),
(4493238,"Stanly County","US",-80.249779,35.333481),
(4472818,"Isenhour","US",-80.156441,35.44986),
(5490135,"Sandoval County","US",-106.850594,35.650028),
(5460650,"<NAME>","US",-107.11615,35.483372),
(124763,"<NAME>","IR",49.833328,34.333328),
(6419789,"Kitasode","JP",140.008331,35.458328),
(1907225,"Kawara","JP",139.272781,35.47361),
(1859479,"Kikuna","JP",139.633331,35.5),
(6901961,"Chidong-gol","KR",128.338211,35.515518),
(1855114,"Nishizu","JP",135.752304,35.516472),
(1861864,"Iida","JP",137.82074,35.51965),
(6901967,"Ugok","KR",128.36235,35.520199),
(1147537,"<NAME>","AF",69,35.75),
(1147586,"<NAME>","AF",68.524544,35.54295),
(1907190,"Minawa","JP",139.319443,35.522781),
(4614466,"Coffee County","US",-86.06665,35.48341),
(4604388,"Baucom","US",-86.222214,35.535069),
(4494189,"Swain County","US",-83.483223,35.466759),
(4492435,"Solola Valley","US",-83.500717,35.49704),
(1142226,"Faryab Province","AF",64.833328,36.25),
(4457102,"Brickhaven","US",-79.028908,35.574879),
(1859642,"Kawasaki","JP",139.717224,35.520561),
(4099141,"Airport Village","US",-91.195129,35.637859),
(1858480,"Kugayama","JP",139.600006,35.683331),
(1862599,"Hino","JP",139.400284,35.673061),
(1855730,"Nakayama","JP",139.949997,35.716671),
(1855503,"Nerima","JP",139.649994,35.73333),
(1852502,"Shiki","JP",139.583328,35.833328),
(1851604,"Soka","JP",139.804443,35.820278),
(1907125,"Kamifukuoka","JP",139.50972,35.872501),
(6822108,"Inashiki","JP",140.323563,35.956329),
(4667226,"White County","US",-85.466637,35.950062),
(4622946,"Foot (historical)","US",-85.318298,36.025059),
(4611490,"Carroll County","US",-88.466721,35.966728),
(4630114,"Hollow Rock","US",-88.273659,36.03812),
(2464912,"Gouvernorat de Sousse","TN",10.41667,35.916672),
(2586401,"<NAME>","TN",10.25944,36.07056),
(1841597,"Kyŏngsang-bukto","KR",128.75,36.333328),
(6890843,"Chogok","KR",128.177094,36.0541),
(5305191,"Moenkopi","US",-111.222359,36.111099),
(92877,"Muḩ<NAME>","IQ",42.583328,36.166672),
(6860746,"Qaryat al Muftiyāt","IQ",43.333359,36.077229),
(5296391,"Grand Canyon","US",-112.139343,36.054428),
(6822099,"Tsuchiura","JP",140.210464,36.090469),
(4542291,"Mayes County","US",-95.26667,36.299999),
(4542361,"Mazie","US",-95.363297,36.107601),
(2501296,"<NAME>","DZ",1.25,36.25),
(2484907,"<NAME>","DZ",1.16904,36.109261),
(95445,"Mu<NAME>","IQ",44,36.166672),
(7018408,"Ghaitli","IQ",43.578098,36.145378),
(98299,"<NAME>","IQ",43.070259,36.125061),
(126584,"Ostān-<NAME>","IR",47,35.666672),
(3530,"Qabāghlū","IR",46.168499,36.173302),
(6786700,"<NAME>","IQ",42.240959,36.138069),
(1845105,"Ch’ungch’ŏng-namdo","KR",127,36.5),
(1846589,"Chang-gol","KR",127.238403,36.174702),
(4535845,"Ellis County","US",-99.767059,36.133381),
(4538320,"Harmon","US",-99.560387,36.14476),
(98756,"<NAME> ‘Arbīd","IQ",43.08062,36.198238),
(5403789,"Tulare County","US",-118.800926,36.266609),
(5331919,"Burling (historical)","US",-119.34317,36.183842),
(7315551,"Matheny","US",-119.351578,36.170658),
(1856435,"Muraimachi","JP",137.966675,36.166672),
(1860239,"Kanazu","JP",136.230804,36.213261),
(2111846,"Momiyama","JP",140.550003,36.183331),
(6697808,"South Aegean","GR",25.6311,36.686039),
(263021,"<NAME>","GR",27.08333,36.833328),
(8133781,"<NAME>","GR",27.95249,36.184799),
(6621623,"Archipolis","GR",28.069981,36.2001),
(298795,"Republic of Turkey","TR",34.911549,39.05901),
(312394,"Hatay","TR",36.25,36.5),
(438057,"Alvan","TR",36.172459,36.220901),
(6887688,"Kuŏng-mal","KR",127.292198,36.226898),
(4458740,"Camden County","US",-76.182991,36.366821),
(4483390,"Old Trap","US",-76.026871,36.240711),
(6891973,"P’yŏngsŏng","KR",128.084595,36.2323),
(5525131,"Lipscomb County","US",-100.286201,36.252899),
(5516705,"Barton Corners","US",-100.458191,36.201981),
(1837660,"Sang-ni","KR",128.106201,36.251099),
(2111756,"Nagasu","JP",140.516663,36.283329),
(4499127,"Wilkes County","US",-80.999802,36.216801),
(4499012,"Wilbar","US",-81.298149,36.244572),
(4459547,"Caswell County","US",-79.349739,36.400139),
(4478310,"Matkins","US",-79.518913,36.254581),
(4611599,"Carter County","US",-82.133179,36.30011),
(4604644,"Bear Stand","US",-82.088181,36.278728),
(2470085,"Gouvernorat de Jendouba","TN",8.75,36.666672),
(2584973,"<NAME>","TN",8.45083,36.278889),
(5462567,"Colfax County","US",-105.126106,36.87558),
(5493903,"T<NAME>ings","US",-104.49221,36.327251),
(1852347,"Shimodate","JP",139.983337,36.299999),
(5509151,"Nevada","US",-116.75119,39.25021),
(5501879,"Clark County","US",-114.876099,36.000259),
(5502229,"Corn Creek (historical)","US",-115.381683,36.420799),
(1844088,"Hŭngjŏn","KR",128.416672,36.333328),
(2112176,"Koibuchi","JP",140.366669,36.349998),
(324140,"Alâzı","TR",36.116669,36.349998),
(4661017,"Sumner County","US",-86.449989,36.499771),
(4629106,"H<NAME>","US",-86.29277,36.38644),
(1786184,"Youfencun","CN",109.26667,36.349998),
(1147288,"<NAME>","AF",67,36.75),
(1129733,"Qamishlī","AF",66.574287,36.428902),
(4475047,"Lambs Corner","US",-76.221878,36.379879),
(1129676,"<NAME>","AF",68.65226,36.509819),
(1139049,"<NAME>","AF",65.833328,36.833328),
(1139362,"<NAME>","AF",65.484169,36.30389),
(1796328,"<NAME>","CN",119,36),
(1790098,"Xiaolipu","CN",116.584717,36.400829),
(2110964,"Sugisaki","JP",140.350006,36.383331),
(4497598,"Warren County","US",-78.099709,36.38348),
(4496605,"Vaughan","US",-78.003601,36.42654),
(4462764,"Currituck County","US",-75.937141,36.31266),
(4481967,"New Providence","US",-76.093536,36.413212),
(1122943,"Tandōrak","AF",67.100883,36.432789),
(1147745,"<NAME>","AF",72,36.75),
(1131059,"Parūkh","AF",71.309097,36.436069),
(4537472,"Garfield County","US",-98.062843,36.187538),
(4540495,"Lahoma","US",-98.08979,36.387531),
(4111857,"Fulton County","US",-91.833481,36.36673),
(4125694,"Peach (historical)","US",-91.52375,36.477009),
(4105899,"Clay County","US",-90.383438,36.36673),
(4132639,"Styra (historical)","US",-90.305382,36.458389),
(2593109,"Andalucía","ES",-4.5,37.599998),
(2514254,"Provincia de Málaga","ES",-4.75,36.799999),
(6359456,"Estepona","ES",-5.12739,36.445431),
(6544403,"Bel-Air","ES",-5.0475,36.472401),
(4494476,"Tar Corner","US",-76.286049,36.4771),
(6359474,"Marbella","ES",-4.88421,36.499771),
(7534562,"Artola","ES",-4.75562,36.494041),
(2111862,"Mizuki","JP",140.633331,36.51667),
(1123230,"<NAME>","AF",69.75,36.666672),
(1136560,"Khurmāb","AF",69.995079,36.580929),
(5342512,"Delft Colony","US",-119.445961,36.511902),
(2111594,"Noguchi","JP",140.333328,36.549999),
(4101244,"Benton County","US",-94.333542,36.333408),
(4119025,"Line Store (historical)","US",-94.024368,36.497849),
(2110944,"Suwa","JP",140.633331,36.566669),
(5509519,"Nye County","US",-116.501167,38.00021),
(5501198,"Camp Desert Rock","US",-116.020027,36.627178),
(1886748,"Unam-ni","KR",127.018333,36.561668),
(6895286,"Utt’ŏ-gol","KR",129.239395,36.594501),
(1848211,"Yoshida","JP",138.216675,36.666672),
(1856845,"Miwa","JP",138.199997,36.666672),
(1850837,"Takenouchi","JP",137.300003,36.700001),
(2112216,"Kitakubo","JP",140.716675,36.73333),
(2112232,"Kitaibaraki","JP",140.75,36.783329),
(2521883,"Provincia de Almería","ES",-2.33333,37.166672),
(5515937,"Texas County","US",-101.517097,36.766689),
(5515766,"Hough","US",-101.577103,36.870861),
(325361,"Adana","TR",35.28809,36.985001),
(6812754,"Angol","KR",127.521004,37.005699),
(2112922,"Fukushima-ken","JP",140.221985,37.38158),
(2110661,"Tsuzura","JP",140.850006,37.033329),
(6812988,"Anteo","KR",127.524002,37.046101),
(5372259,"Merced County","US",-120.751579,37.166611),
(5393244,"Santa Nella Village","US",-121.016869,37.097721),
(6794644,"Kŏmusil","KR",128.540604,37.064999),
(1850310,"Tochigi-ken","JP",139.816132,36.692589),
(1851951,"Shiozawa","JP",139.933334,37.066669),
(2517115,"Provincia de Granada","ES",-3.25,37.25),
(6544329,"Sierra Nevada","ES",-3.3969,37.095001),
(1467940,"<NAME>","AF",70.344139,37.051189),
(2510910,"Provincia de Sevilla","ES",-5.5,37.5),
(6361020,"Mor<NAME>","ES",-5.40797,37.103748),
(2513509,"<NAME>","ES",-5.45403,37.120838),
(4245592,"New Liberty","US",-88.447823,37.122002),
(1139976,"Ḩaīratān","AF",67.424103,37.221401),
(2472699,"Gouvernorat de Bizerte","TN",9.58333,37.083328),
(2586106,"<NAME>","TN",9.52016,37.129189),
(5417618,"Colorado","US",-105.500832,39.000271),
(5428059,"Las Animas County","US",-104.001083,37.416679),
(5427336,"Kim","US",-103.352158,37.246689),
(6357709,"Granada","ES",-3.59078,37.188629),
(2519077,"<NAME>","ES",-3.6,37.150002),
(5412453,"Baca County","US",-102.550468,37.333351),
(5431144,"Midway","US",-102.186012,37.149189),
(4273857,"Kansas","US",-98.500633,38.50029),
(4272662,"Harper County","US",-98.083672,37.20002),
(4270124,"Crisfield","US",-98.311462,37.172249),
(4280143,"Sumner County","US",-97.483658,37.23336),
(4267387,"Adamsville","US",-97.17643,37.173359),
(1841610,"Gyeonggi-do","KR",127.25,37.599998),
(1844106,"Kulgwan-dong","KR",126.553062,37.209721),
(6575822,"Sangdeok","KR",127.17028,37.212219),
(6360993,"Dos Hermanas","ES",-5.95985,37.252171),
(2516188,"La Atalaya","ES",-6.00936,37.239422),
(3175395,"Italian Republic","IT",12.83333,42.833328),
(2523119,"Regione Autonoma Siciliana","IT",14.25,37.75),
(2525065,"Provincia di Catania","IT",14.66667,37.383331),
(6541967,"Caltagirone","IT",14.5126,37.23682),
(2523322,"Santa Maria di Gesù","IT",14.51667,37.23333),
(6575866,"Samga-dong","KR",127.159439,37.238892),
(1843880,"Hwapyeongri","KR",127.569901,37.24754),
(6575891,"Yeongtongi-dong","KR",127.06472,37.251389),
(6398879,"Anbaeteo","KR",127.37278,37.249722),
(298332,"Şanlıurfa","TR",38.781738,37.21283),
(6254928,"Virginia","US",-77.446747,37.548119),
(4755865,"Dickenson County","US",-82.349869,37.133438),
(7525482,"Kākul","AF",69.4571,37.279079),
(2110959,"Sukagawa","JP",140.383331,37.283329),
(6357641,"Albolote","ES",-3.65562,37.293442),
(2518567,"El Chaparral de Cartuja","ES",-3.6563,37.25568),
(5392427,"San Mateo County","US",-122.351082,37.44994),
(5386938,"Redwood Terrace","US",-122.294968,37.314659),
(5425737,"Huerfano County","US",-104.950546,37.683338),
(5418756,"Cuchara","US",-105.100281,37.379181),
(5549030,"Utah","US",-111.75103,39.25024),
(5546337,"San Juan County","US",-109.501228,37.750549),
(5537013,"Clay Hills Crossing","US",-110.404846,37.294441),
(1843125,"Kangwŏn-do","KR",128.25,37.75),
(6808346,"Chaen-mal","KR",129.0746,37.2981),
(6697807,"Peloponnese","GR",22.439581,37.627281),
(264644,"<NAME>","GR",22.25,37.583328),
(8133802,"<NAME>","GR",22.116249,37.358959),
(261912,"Graikós","GR",22.23333,37.316669),
(443183,"Osmaniye","TR",36.24596,37.235249),
(297098,"Yenifarsak","TR",36.583328,37.316669),
(2524818,"Provincia di Enna","IT",14.43333,37.583328),
(6540848,"Barrafranca","IT",14.20107,37.379139),
(2525593,"Barrafranca","IT",14.20107,37.379139),
(6254925,"Kentucky","US",-84.877617,38.20042),
(4303951,"Perry County","US",-83.199898,37.250648),
(7248920,"Rock Fork","US",-83.190666,37.355808),
(1845275,"Chuja-ri","KR",127.213058,37.361938),
(2113136,"Akanuma","JP",140.433334,37.366669),
(5509558,"Oak Springs (historical)","US",-116.057823,37.219398),
(5507189,"Lincoln County","US",-114.876122,38.00024),
(5514410,"Viola (historical)","US",-114.385536,37.2658),
(2111302,"Ōtsuki","JP",140.316666,37.383331),
(6795956,"Pŏdŭlbat","KR",128.451202,37.396999),
(6576320,"Subu-mal","KR",127.53167,37.40139),
(4763688,"Henrico County","US",-77.366371,37.550152),
(4754164,"Cotman (historical)","US",-77.301369,37.42598),
(2525763,"Provincia di Agrigento","IT",13.5,37.450001),
(6539174,"Ribera","IT",13.26415,37.49844),
(2523619,"Ribera","IT",13.26415,37.49844),
(1835847,"Seoul-teukbyeolsi","KR",127,37.583328),
(6573457,"Wonteo","KR",127.056107,37.443329),
(320390,"Burdur","TR",30,37.5),
(310479,"Kapaklı","TR",30.29056,37.46389),
(6795865,"Panghak-tong","KR",128.404694,37.452099),
(4295247,"Hopkins County","US",-87.550003,37.333382),
(4311983,"Vandetta","US",-87.425278,37.451431),
(6541468,"Catania","IT",15.07339,37.500252),
(2524993,"Cibali","IT",15.06667,37.51667),
(304183,"Muğla","TR",28.355709,37.230331),
(6803229,"Misa-ch’on","KR",127.429077,37.515759),
(2111540,"Odaka","JP",140.983337,37.566669),
(6800516,"Kŭmhosamga-dong","KR",127.019409,37.550072),
(2513413,"Región de Murcia","ES",-1.5,38),
(6355234,"Murcia","ES",-1.14146,37.986622),
(6201376,"Ostān-e Khorāsān-e Shomālī","IR",57,37.5),
(129406,"Kalāteh-ye Bālī","IR",58.198681,37.573441),
(4302277,"Nelson County","US",-85.466629,37.80006),
(4295443,"Howardstown","US",-85.591911,37.572281),
(5322745,"Alameda County","US",-121.884399,37.59993),
(6537780,"Menfi","IT",12.96784,37.60664),
(2524179,"Menfi","IT",12.96784,37.60664),
(2523850,"Pedara","IT",15.05669,37.616852),
(259819,"<NAME>","GR",24.91667,37.416672),
(8133928,"<NAME>","GR",25.132521,37.603931),
(261723,"Istérnia","GR",25.053301,37.621799),
(2522875,"Provincia di Trapani","IT",12.66667,37.833328),
(6541759,"Mazara del Vallo","IT",12.58804,37.664139),
(2524205,"Mazara del Vallo","IT",12.58804,37.664139),
(3411865,"Região Autónoma dos Açores","PT",-28,38.5),
(8010687,"Ponta Delgada","PT",-25.71563,37.811329),
(8013442,"Ponta Delgada (São Pedro)","PT",-25.656,37.75116),
(3373305,"Belém","PT",-25.65,37.75),
(6697805,"Ionian Islands","GR",20.37277,38.97649),
(251276,"<NAME>","GR",20.75,37.75),
(8133854,"<NAME>","GR",20.77527,37.78331),
(251280,"Zakynthos","GR",20.895281,37.791389),
(2516547,"Provincia de Huelva","ES",-7,37.666672),
(6358183,"Aracena","ES",-6.57306,37.856091),
(2521694,"Aracena","ES",-6.56116,37.893959),
(6692632,"Attica","GR",23.9035,37.920368),
(445406,"Nomarchía Anatolikís Attikís","GR",23.799999,38.049999),
(8133947,"<NAME>","GR",23.97636,37.889519),
(251667,"Vravrona","GR",24.01259,37.920158),
(2593113,"Comunitat Valenciana","ES",-0.75,39.5),
(2521976,"Provincia de Alicante","ES",-0.5,38.5),
(6355506,"Torrevieja","ES",-0.67491,37.989559),
(7115249,"Residencia los Altos","ES",-0.72119,37.955231),
(8133830,"<NAME>","GR",24.848141,37.858009),
(261490,"Kalivárion","GR",24.75,37.966671),
(4398678,"Missouri","US",-92.500458,38.250309),
(4407295,"Sainte Genevieve County","US",-90.200119,37.883389),
(4399166,"Mosher","US",-90.076782,37.971161),
(5445733,"Kearny County","US",-101.317108,37.983349),
(5446607,"Sutton","US",-101.465446,37.905849),
(5503780,"Esmeralda County","US",-117.626198,37.75021),
(5501205,"Camp Harding (historical)","US",-117.487038,37.952991),
(4392394,"<NAME>","US",-90.583458,38.26672),
(4397988,"Melzo","US",-90.569572,38.010052),
(445408,"<NAME>","GR",23.75,37.966671),
(8133842,"<NAME>","GR",23.80941,38.022259),
(260172,"Khalandrion","GR",23.79793,38.030579),
(262135,"Galatsi","GR",23.75,38.01667),
(2525468,"<NAME>","IT",16.5,39),
(2523629,"Provincia di Reggio di Calabria","IT",16.08333,38.316669),
(6542287,"Reggio di Calabria","IT",15.66129,38.11047),
(2523845,"Pellaro","IT",15.65,38.01667),
(445407,"<NAME>","GR",23.39333,38.06485),
(8133885,"<NAME>","GR",23.2749,38.027241),
(257365,"Megara","GR",23.34556,38),
(5285334,"Koen","US",-102.346863,38.0714),
(4252955,"White County","US",-88.166702,38.083382),
(4234576,"Brownsport (historical)","US",-88.042526,38.05616),
(6367745,"Ot’ani-ri","KR",127.594719,38.055279),
(8133883,"<NAME>","GR",23.533199,38.08073),
(262752,"Elefsina","GR",23.54295,38.041351),
(257302,"Melissia","GR",23.83333,38.049999),
(2525729,"Altofonte","IT",13.29624,38.042049),
(257811,"Mandra","GR",23.5,38.066669),
(6540824,"Montelepre","IT",13.17434,38.09045),
(2524070,"Montelepre","IT",13.17434,38.09045),
(2523630,"<NAME>","IT",15.66129,38.11047),
(6537754,"<NAME>o di Gotto","IT",15.21048,38.14756),
(2525597,"Barcellona-Pozzo di Gotto","IT",15.21048,38.14756),
(6541758,"<NAME> in Aspromonte","IT",15.7892,38.16917),
(4267572,"Anderson County","US",-95.283592,38.20002),
(4281621,"Westphalia","US",-95.490257,38.181969),
(4826850,"West Virginia","US",-80.500092,38.500381),
(4810630,"Kanawha County","US",-81.566513,38.333431),
(4803404,"Crown Hill","US",-81.413727,38.2001),
(262609,"Erythres","GR",23.316669,38.216671),
(6541859,"Messina","IT",15.54969,38.193272),
(2524170,"Messina","IT",15.54969,38.193272),
(4376578,"Benton County","US",-93.300201,38.300018),
(5548429,"Three Forks","US",-110.49514,37.991379),
(6355495,"Santa Pola","ES",-0.53869,38.186359),
(2511102,"Santa Pola","ES",-0.5658,38.19165),
(5422448,"Fremont County","US",-105.400551,38.48333),
(5438691,"Sikes","US",-105.074707,38.258339),
(6355441,"Elche","ES",-0.70797,38.269051),
(2518559,"Elche","ES",-0.70107,38.26218),
(5424092,"Gunnison County","US",-107.067268,38.699989),
(5435240,"Powderhorn","US",-107.095879,38.276939),
(5446780,"Wichita County","US",-101.350441,38.46669),
(5445392,"Finney County","US",-100.667099,38.016689),
(1883978,"Puyŏn-dong","KR",128.256943,38.299999),
(5323622,"Amador County","US",-120.651039,38.449909),
(5333177,"Camanche Village","US",-120.973267,38.26992),
(5437350,"Saguache County","US",-106.251137,38.083328),
(5438194,"Sedgewick (historical)","US",-106.147797,38.279171),
(5389519,"Sacramento County","US",-121.317734,38.466579),
(5331154,"Bruceville","US",-121.417168,38.335751),
(2519239,"Province of Córdoba","ES",-4.83333,38),
(5419932,"Doyleville","US",-106.609482,38.45166),
(4921868,"Indiana","US",-86.250267,40.00032),
(4257948,"Gibson County","US",-87.56752,38.35532),
(4257682,"Francisco","US",-87.445297,38.332272),
(4252607,"Wayne County","US",-88.41671,38.43338),
(4251347,"<NAME>","US",-88.258652,38.407829),
(6541315,"Polistena","IT",16.08,38.405979),
(2523738,"Polistena","IT",16.08,38.405979),
(4826636,"Webster County","US",-80.416473,38.516769),
(4799763,"Bolair","US",-80.44397,38.437611),
(262564,"<NAME>","GR",24,38.5),
(8133729,"<NAME>","GR",23.563061,38.450649),
(252190,"Vasilikon","GR",23.66667,38.433331),
(308463,"Kayseri","TR",35.49683,38.73695),
(5414591,"Boone","US",-104.256912,38.248611),
(122721,"Namīn","IR",48.483898,38.426899),
(324594,"Akmezar","TR",34.310989,38.462059),
(6355442,"Elda","ES",-0.79645,38.475761),
(2518505,"Elda","ES",-0.79157,38.477829),
(4142224,"Delaware","US",-75.499924,39.000389),
(1512440,"Republic of Uzbekistan","UZ",63.84911,41.707539),
(265560,"Agrinio","GR",21.40778,38.621391),
(6359527,"Jumilla","ES",-1.27513,38.468819),
(2512024,"Rasillo","ES",-1.13553,38.61824),
(263854,"<NAME>","GR",21.4,38.633331),
(8010691,"<NAME>","PT",-27.24913,38.695259),
(8013468,"Angra (São Pedro)","PT",-27.24008,38.662029),
(3373120,"Espigão","PT",-27.23333,38.666672),
(2593111,"<NAME>","ES",-3,39.5),
(2519401,"Provincia de Ciudad Real","ES",-4,39),
(2267056,"Distrito de Lisboa","PT",-9.13333,39),
(8010564,"Oeiras","PT",-9.26832,38.713711),
(8012538,"Barcarena","PT",-9.28279,38.733261),
(2271140,"Barcarena","PT",-9.28,38.732449),
(5441188,"Teller County","US",-105.167213,38.866661),
(5431129,"Midland","US",-105.161652,38.858318),
(4281087,"Wabaunsee County","US",-95.996101,39.129169),
(4277071,"Paxico","US",-96.166382,39.069439),
(4825733,"Upshur County","US",-80.250359,38.88343),
(4810850,"<NAME>","US",-80.142303,39.005379),
(4270937,"Ellis County","US",-99.317047,38.916679),
(4270936,"Ellis","US",-99.560669,38.938068),
(1217561,"Chiljuvut","UZ",66.46479,39.03426),
(5372163,"Mendocino County","US",-123.417793,39.41655),
(5365089,"Largo","US",-123.129997,39.021561),
(5433959,"Park County","US",-105.767227,39.14999),
(5434851,"Platte Springs","US",-105.358612,39.063599),
(2521383,"Comunitat Autònoma de les Illes Balears","ES",2.90314,39.58876),
(6424360,"Illes Balears","ES",3.02948,39.609921),
(4361885,"Maryland","US",-76.749969,39.000389),
(5421941,"Flagler","US",-103.067162,39.293049),
(4392183,"Jackson County","US",-94.350227,39.01667),
(4405766,"River Bend","US",-94.394951,39.17889),
(5443572,"West Burlington","US",-102.309639,39.303329),
(2263478,"Distrito de Santarém","PT",-8.58333,39.25),
(8010609,"Santarém","PT",-8.71313,39.321308),
(8014206,"Vale de Santarém","PT",-8.74346,39.19244),
(2262092,"V<NAME>","PT",-8.72735,39.190521),
(2524906,"Provincia di Cosenza","IT",16.41667,39.466671),
(6541297,"Paterno Calabro","IT",16.264891,39.228489),
(2525381,"Capora-Merendi","IT",16.25,39.216671),
(142550,"Ostān-e Āz̄arbāyjān-e Gharbī","IR",45,37.666672),
(14177,"Āqdūz","IR",44.26556,39.197498),
(5428203,"Leavick (historical)","US",-106.13752,39.194988),
(6697809,"Thessaly","GR",21.983641,39.402241),
(258013,"<NAME>","GR",22.75,39.25),
(8133791,"<NAME>","GR",22.74229,39.116581),
(262687,"Enipiás","GR",22.566669,39.216671),
(2523228,"Regione Autonoma della Sardegna","IT",9,40),
(2525471,"Provincia di Cagliari","IT",9.09119,39.245022),
(6540125,"Cagliari","IT",9.13033,39.213299),
(2525473,"Cagliari","IT",9.13462,39.207378),
(2263598,"Salvador","PT",-8.40506,39.211182),
(4514204,"Highland County","US",-83.616592,39.183399),
(4525666,"Stringtown","US",-83.488251,39.234791),
(305267,"Kütahya","TR",29.5,39.25),
(2524084,"Monserrato","IT",9.13972,39.256111),
(8010594,"Abrantes","PT",-8.17533,39.471649),
(8012958,"Bemposta","PT",-8.1649,39.321301),
(2262651,"Tojeiras de Cima","PT",-8.23736,39.279812),
(2522257,"Provincia de Albacete","ES",-2,38.833328),
(2519880,"<NAME>","ES",-1.46667,39.283329),
(4255843,"Clay County","US",-87.07724,39.416988),
(4255841,"Clay City","US",-87.112793,39.276711),
(5411026,"Yuba County","US",-121.40107,39.283218),
(5386002,"Rancho Loma Rica","US",-121.354134,39.308781),
(5506935,"Lander County","US",-116.876198,39.875198),
(5514709,"Watertown (historical)","US",-117.128418,39.341042),
(6539309,"Sinnai","IT",9.20355,39.304241),
(2592662,"<NAME>","IT",9.36556,39.30056),
(2264507,"Distrito de Portalegre","PT",-7.58333,39.25),
(6930638,"Portalegre","PT",-7.41538,39.297401),
(6930660,"<NAME>","PT",-7.43751,39.292439),
(2270968,"<NAME>","PT",-7.42363,39.312531),
(6533976,"<NAME>","ES",3.05158,39.33699),
(2519340,"<NAME>","ES",2.99197,39.3181),
(2523024,"<NAME>","IT",16.35,39.299999),
(2525319,"<NAME>","IT",16.466669,39.333328),
(4815060,"Mineral County","US",-78.949753,39.400101),
(4807058,"Gleason (historical)","US",-79.217262,39.362881),
(8012991,"Chamusca","PT",-8.4675,39.33366),
(2269336,"Chamusca","PT",-8.48151,39.35722),
(2593112,"Extremadura","ES",-6,39),
(2521419,"Provincia de Badajoz","ES",-6.16667,38.666672),
(2511033,"San Vicente de Alcantara","ES",-7.13766,39.36132),
(4350461,"Carroll County","US",-77.016373,39.550098),
(4355837,"Gaither","US",-76.993027,39.361488),
(5703766,"Eureka County","US",-116.126183,40.000198),
(6537895,"Dolianova","IT",9.17864,39.378239),
(2524844,"Dolianova","IT",9.17583,39.377781),
(5445194,"Colby","US",-101.052383,39.39584),
(8012996,"Carregueira","PT",-8.36416,39.400871),
(2268750,"<NAME>","PT",-8.36667,39.416672),
(325163,"Ağrı","TR",43.166672,39.666672),
(4259727,"Johnson County","US",-86.054993,39.48061),
(4255151,"Bud","US",-86.175819,39.446991),
(2524352,"Luzzi","IT",16.28829,39.446098),
(4514358,"Hocking County","US",-82.466537,39.516731),
(4511219,"Ewing","US",-82.433212,39.472569),
(4276786,"Osborne County","US",-98.783691,39.35001),
(4270472,"Downs","US",-98.542007,39.498619),
(4380138,"Carroll County","US",-93.516876,39.45002),
(4377999,"Bosworth","US",-93.334648,39.469742),
(321590,"Belce","TR",30.34444,39.490002),
(4263408,"Providence","US",-86.176659,39.490879),
(5445268,"Decatur County","US",-100.467087,39.800011),
(5444964,"Allison","US",-100.264297,39.575001),
(2509951,"Província de València","ES",-0.83333,39.333328),
(5445815,"Leoville","US",-100.460983,39.581669),
(323784,"Ankara","TR",32.833328,39.916672),
(316085,"Durutlar","TR",32.447269,39.538361),
(6537887,"Armungia","IT",9.38185,39.52174),
(2525667,"Armungia","IT",9.38083,39.523331),
(322164,"Balıkesir","TR",28,39.75),
(8133786,"<NAME>","GR",22.33606,39.621719),
(252989,"Terpsithea","GR",22.366671,39.616669),
(6533979,"<NAME>","ES",3.35877,39.62014),
(2520570,"<NAME>","ES",3.38671,39.604961),
(6697804,"Epirus","GR",20.71472,39.236511),
(261777,"<NAME>","GR",20.66667,39.75),
(7303595,"<NAME>","GR",20.846821,39.668751),
(263544,"Báfra","GR",20.87833,39.599998),
(2111834,"Morioka-shi","JP",141.152496,39.703609),
(2111154,"Sembokuchō","JP",141.149994,39.683331),
(256574,"<NAME>","GR",22.433331,39.650002),
(258576,"Larisa","GR",22.42028,39.637218),
(2038349,"Beijing Shi","CN",116.397057,39.916908),
(1813226,"Dayangfang","CN",116.503059,39.819172),
(1785941,"Yuegezhuang","CN",116.26667,39.883331),
(6697811,"West Macedonia","GR",21.324459,40.266949),
(736149,"<NAME>","GR",21.41667,40.083328),
(8133858,"<NAME>","GR",21.731091,39.935009),
(260705,"Katákali","GR",21.67861,39.901112),
(5184079,"Chester County","US",-75.874939,40.125381),
(4561484,"Steelville","US",-75.993561,39.904831),
(5574999,"Boulder County","US",-105.350548,40.083321),
(5416138,"Caribou City","US",-105.512779,39.98999),
(5101760,"New Jersey","US",-74.49987,40.167061),
(5073708,"Nebraska","US",-99.750671,41.500278),
(5694963,"Dundy County","US",-101.667122,40.16666),
(5843946,"Max","US",-101.402657,40.11388),
(5055521,"Holt County","US",-95.216919,40.099998),
(5055046,"Fortescue","US",-95.318314,40.052219),
(3182306,"<NAME>","IT",16.5,40.5),
(5436472,"<NAME> County","US",-108.200638,39.94997),
(5574298,"Angora","US",-108.575661,40.17664),
(3169778,"<NAME>","IT",16.25,41.25),
(3174952,"Provincia di Lecce","IT",18.16667,40.216671),
(6541941,"Botrugno","IT",18.32443,40.06472),
(3181670,"Botrugno","IT",18.32443,40.06472),
(6541369,"Tiana","IT",9.14733,40.068451),
(3165692,"Tiana","IT",9.14733,40.068451),
(174982,"Republic of Armenia","AM",45,40),
(3167696,"Santa Caterina","IT",8.49243,40.10355),
(3117732,"Comunidad de Madrid","ES",-3.69063,40.425259),
(6355233,"Provincia de Madrid","ES",-3.71029,40.402248),
(6359278,"Chinchón","ES",-3.48813,40.15498),
(3125144,"Chinchon","ES",-3.42267,40.140202),
(4887163,"Champaign County","US",-88.20005,40.133369),
(4911041,"Sellers","US",-88.104759,40.18642),
(2740636,"Distrito de Coimbra","PT",-8.41667,40.200001),
(8011822,"Brenha","PT",-8.83169,40.187641),
(2741908,"Cabanas","PT",-8.83184,40.197479),
(5443305,"Washington County","US",-103.2005,39.966648),
(5580914,"Pinneo","US",-103.438553,40.209419),
(6359315,"<NAME>","ES",-3.45405,40.233719),
(3116157,"<NAME>","ES",-3.43269,40.226799),
(1527747,"Kyrgyz Republic","KG",75,41),
(5574267,"Alvin","US",-102.075737,40.30777),
(5056253,"Mercer County","US",-93.566887,40.433338),
(5056943,"Princeton","US",-93.580498,40.400841),
(5702984,"Crescent Valley","US",-116.576469,40.416031),
(3181042,"Regione Campania","IT",14.5,41),
(3168670,"Provincia di Salerno","IT",15.26667,40.450001),
(6537421,"Teggiano","IT",15.54046,40.379211),
(3165851,"Teggiano","IT",15.54046,40.379211),
(3118155,"Loeches","ES",-3.4,40.383331),
(6359304,"Madrid","ES",-3.68275,40.489349),
(3117735,"Madrid","ES",-3.70256,40.4165),
(5057186,"Schuyler County","US",-92.533524,40.466702),
(5056965,"Queen City","US",-92.567688,40.409199),
(4921670,"Howard County","US",-86.133598,40.486431),
(4928084,"West Middleton","US",-86.21611,40.43948),
(5783699,"Tooele County","US",-113.125259,40.375488),
(321122,"Bilecik","TR",30.16667,40),
(1346798,"Osh Oblasty","KG",73,40),
(5578418,"Jackson County","US",-106.333923,40.666641),
(5580548,"Old Homestead","US",-106.143631,40.440262),
(5053940,"Atchison County","US",-95.400261,40.433331),
(5056033,"London","US",-95.234978,40.445),
(743942,"Kars","TR",43.083328,40.416672),
(742580,"Köseler","TR",43.509102,40.456219),
(6539026,"Pomarico","IT",16.547279,40.517818),
(3170350,"Pomarico","IT",16.547279,40.517818),
(3113943,"<NAME>","ES",-3.71667,40.48333),
(6697801,"Central Macedonia","GR",22.84058,40.913509),
(734075,"<NAME>","GR",23,40.666672),
(8133917,"<NAME>","GR",22.924339,40.435089),
(736638,"<NAME>","GR",22.87611,40.499439),
(5069211,"Gosper County","US",-99.833733,40.53334),
(5066953,"Dev<NAME>","US",-99.87207,40.579449),
(5703673,"Elko County","US",-115.501167,41.000198),
(5707899,"Rock House","US",-115.410881,40.42215),
(3336899,"Comunidad Autónoma de Aragón","ES",-1,41),
(3108125,"Provincia de Teruel","ES",-0.66667,40.666672),
(3125493,"Celadas","ES",-1.15013,40.475422),
(5065828,"Clay County","US",-98.050331,40.53334),
(4892729,"Ford County","US",-88.25061,40.58337),
(4893446,"Garber","US",-88.381721,40.515869),
(8133774,"<NAME>","GR",23.05625,40.614689),
(6295624,"<NAME>","GR",23.0068,40.593311),
(8133959,"<NAME>","GR",22.957239,40.578758),
(736083,"Kalamaria","GR",22.950279,40.5825),
(1484846,"Andijan","UZ",72.333328,40.75),
(8133841,"<NAME>","GR",22.95369,40.623341),
(734077,"Thessaloniki","GR",22.94389,40.640282),
(8133918,"<NAME>-Evosmos","GR",22.903259,40.67609),
(736291,"Evosmos","GR",22.908331,40.670559),
(736336,"Elefthérion","GR",22.89472,40.66806),
(8133916,"<NAME>","GR",22.74551,40.621239),
(736450,"<NAME>","GR",22.856939,40.688889),
(2129211,"Misawa","JP",141.359726,40.683609),
(6697803,"East Macedonia and Thrace","GR",25.334471,40.946709),
(735857,"<NAME>","GR",24.5,41),
(8133898,"<NAME>","GR",24.653231,40.68531),
(736067,"Kalívai","GR",24.58333,40.75),
(4917010,"Woodford County","US",-89.233421,40.766701),
(4902065,"Metamora","US",-89.360641,40.790588),
(734329,"<NAME>","GR",23.5,41.166672),
(8133863,"<NAME>","GR",23.566771,40.89312),
(734924,"Nigrita","GR",23.499439,40.905281),
(733797,"Yeorgoulás","GR",23.566669,40.916672),
(8133899,"<NAME>","GR",24.4046,41.013069),
(735861,"Kavala","GR",24.401939,40.93972),
(3111107,"Provincia de Salamanca","ES",-6,40.833328),
(3108214,"Tejares","ES",-5.69754,40.954498),
(736466,"Dháton","GR",24.33333,40.966671),
(4862182,"Iowa","US",-93.500488,42.000271),
(6541900,"<NAME>","IT",14.08052,41.009911),
(3164219,"<NAME>","IT",14.08052,41.009911),
(6538798,"Sturno","IT",15.11025,41.020119),
(3166056,"Sturno","IT",15.11025,41.020119),
(5184546,"Clearfield County","US",-78.750031,41.12534),
(5189122,"Fairview","US",-78.231956,41.0345),
(5771875,"Box Elder County","US",-112.876373,41.500481),
(5776997,"Lakeside","US",-112.865532,41.222431),
(5102445,"Passaic County","US",-74.3657,41.066799),
(5106014,"Wanaque","US",-74.294037,41.038151),
(2735941,"Distrito do Porto","PT",-8.33333,41.25),
(8010592,"<NAME>","PT",-8.58795,41.078732),
(8012930,"Arcozelo","PT",-8.63952,41.05547),
(4867477,"Mills County","US",-95.616951,41.033329),
(4860019,"Hastings","US",-95.499161,41.022781),
(783754,"Republic of Albania","AL",20,41),
(733840,"Xanthi","GR",24.88361,41.141392),
(4860353,"Henry County","US",-91.550163,40.98336),
(4882211,"Winfield","US",-91.441269,41.123081),
(5784440,"Weber County","US",-111.751328,41.2505),
(5777451,"Little Mountain","US",-112.254662,41.244389),
(740263,"Samsun","TR",36.333328,41.25),
(4866274,"Marion County","US",-93.100197,41.333328),
(8133864,"<NAME>","GR",23.287161,41.122711),
(735751,"Khrisokhorafa","GR",23.23333,41.183331),
(5571369,"Siskiyou County","US",-122.517799,41.583199),
(7236207,"Warmcastle Mobile Home Park","US",-122.148331,41.21806),
(1484839,"<NAME>","UZ",69.25,41.333328),
(1513229,"Mayli-Tepe","UZ",69.183327,41.166672),
(1514257,"Sergeli","UZ",69.222221,41.19833),
(3344951,"<NAME>","AL",19.89167,41.299999),
(3184285,"Rrakull","AL",19.53194,41.192501),
(4923252,"Marshall County","US",-86.309731,41.343658),
(4923322,"Maxinkuckee","US",-86.381393,41.208382),
(5160041,"Lagrange","US",-82.119873,41.237282),
(4928215,"Whitley County","US",-85.488312,41.157269),
(4927309,"Tri-Lakes","US",-85.441917,41.24588),
(743881,"Kastamonu","TR",33.666672,41.5),
(5072973,"Merrick County","US",-98.083672,41.150009),
(5074769,"Palmer","US",-98.257294,41.22224),
(3108287,"Província de Tarragona","ES",1.24901,41.129021),
(3106492,"Valls","ES",1.24993,41.286121),
(3126484,"Canyelles","ES",1.73333,41.283329),
(5205310,"<NAME>","US",-75.092117,41.28315),
(5568120,"Modoc County","US",-120.734413,41.566559),
(5560368,"<NAME>","US",-120.310783,41.279339),
(6356195,"el Prat de Llobregat","ES",2.09609,41.31781),
(6544426,"<NAME>","ES",2.0737,41.317699),
(3176884,"Provincia di Foggia","IT",15.53333,41.450001),
(6537541,"<NAME>","IT",15.26445,41.281631),
(3176140,"Giardinetto","IT",15.4,41.316669),
(6537309,"San Potito Sannitico","IT",14.39213,41.33852),
(3167796,"San Potito Sannitico","IT",14.39213,41.33852),
(4850583,"Cass County","US",-94.933601,41.333321),
(5843591,"Wyoming","US",-107.5009,43.00024),
(5840426,"Sweetwater County","US",-108.917343,41.66663),
(5838969,"South Baxter","US",-109.121788,41.368019),
(6542350,"Piedimonte Matese","IT",14.36803,41.350819),
(6534279,"Piedimonte Matese","IT",14.36803,41.350819),
(5816904,"Albany County","US",-105.700546,41.666641),
(5820898,"Centennial","US",-106.141678,41.298309),
(5070443,"Howard County","US",-98.517021,41.216679),
(5066227,"Cotesfield","US",-98.632584,41.357231),
(3174976,"Regione Lazio","IT",12.5,42),
(3175057,"Provincia di Latina","IT",13.1,41.450001),
(6541618,"Pontinia","IT",13.0441,41.410912),
(3173539,"Mesa","IT",13.11667,41.383331),
(6356055,"Barcelona","ES",2.12804,41.399422),
(3120619,"LHospitalet de Llobregat","ES",2.10028,41.359669),
(3104323,"Provincia de Zaragoza","ES",-1,41.583328),
(6362718,"Almonacid de la Sierra","ES",-1.32846,41.411388),
(3130285,"Almonacid de la Sierra","ES",-1.32394,41.397541),
(5706523,"Morton (historical)","US",-115.211723,41.569908),
(6362976,"<NAME>","ES",-1.03891,41.367378),
(3105224,"<NAME>","ES",-1.0365,41.353249),
(612974,"Migirlo","GE",44.578491,41.40992),
(3128760,"Barcelona","ES",2.15899,41.38879),
(5073611,"Nance County","US",-98.000893,41.400009),
(5063781,"Belgrade","US",-98.06839,41.473068),
(2036115,"<NAME>","CN",123,41),
(7397708,"Menghutun","CN",123.312859,41.466862),
(736287,"<NAME>","GR",26,41),
(8133900,"<NAME>restiada","GR",26.346939,41.591099),
(734880,"Orestiada","GR",26.52972,41.503059),
(4898878,"LaSalle County","US",-88.883408,41.266701),
(4914065,"Triumph","US",-89.022034,41.499481),
(6356108,"Esparreguera","ES",1.86843,41.546982),
(3122912,"Esparreguera","ES",1.86667,41.533329),
(5176872,"Williams County","US",-84.583282,41.550049),
(5161096,"Lock Port","US",-84.389954,41.54977),
(614778,"Jigrasheni","GE",44.35107,41.549179),
(6362917,"<NAME>","ES",-1.32163,41.561829),
(3111030,"<NAME>","ES",-1.32344,41.56789),
(5697135,"Logan County","US",-100.483749,41.566662),
(5696208,"Hoagland","US",-100.371246,41.508331),
(5703133,"Deep Creek","US",-116.148697,41.567131),
(5830051,"Laramie County","US",-104.667191,41.349979),
(5832096,"Meriden","US",-104.31913,41.543591),
(6356298,"Terrassa","ES",2.01818,41.558762),
(3108286,"Terrassa","ES",2.01667,41.566669),
(5703178,"Delano (historical)","US",-114.273628,41.667702),
(6355231,"Província de Lleida","ES",0.57472,41.618778),
(6358863,"Lleida","ES",0.59561,41.630772),
(3105880,"Vilanoveta","ES",0.64308,41.603989),
(3118514,"Lleida","ES",0.61667,41.616669),
(3108680,"Provincia de Soria","ES",-2.66667,41.666672),
(3108681,"Soria","ES",-2.46883,41.764011),
(3128978,"Balaguer","ES",0.81094,41.791168),
(3169069,"Provincia di Roma","IT",12.66667,41.966671),
(6536956,"<NAME>","IT",13.03309,41.860619),
(3172074,"<NAME>","IT",13.03309,41.860619),
(6359868,"Monterrei","ES",-7.52296,41.950211),
(3122410,"Flariz","ES",-7.55842,41.927441),
(3124248,"Cruilles","ES",3.01667,41.950001),
(6534118,"Salt","ES",2.784,41.97261),
(3110983,"Salt","ES",2.79281,41.974892),
(3114530,"Provincia de Palencia","ES",-4.5,42.416672),
(3114531,"Palencia","ES",-4.53333,42.01667),
(5566285,"Khoonkhwuttunne (historical)","US",-124.20314,41.948448),
(5585000,"Bear Lake County","US",-111.313538,42.312431),
(5585010,"Bear Lake Sands","US",-111.253532,42.051601),
(6358762,"Àger","ES",0.76296,42.011688),
(3130920,"Ager","ES",0.76667,42),
(6539757,"Bracciano","IT",12.16617,42.100422),
(3179676,"<NAME>","IT",12.11667,42.049999),
(4888671,"Cook County","US",-87.85006,41.833359),
(4896555,"Howard District","US",-87.66922,42.020859),
(4884951,"Birchwood","US",-87.665337,42.016701),
(5884472,"Amherstburg","CA",-83.099854,42.10009),
(6362788,"<NAME>","ES",-1.15371,42.159679),
(3123688,"<NAME>","ES",-1.13716,42.12632),
(6358352,"Huesca","ES",-0.41253,42.14838),
(3128908,"Banariés","ES",-0.46942,42.136181),
(4997389,"<NAME>","US",-84.416618,42.250591),
(4996543,"Horton","US",-84.517181,42.150318),
(6538684,"Nerola","IT",12.78488,42.160931),
(3172303,"Nerola","IT",12.78488,42.160931),
(728379,"<NAME>","BG",24.16667,42.083328),
(728376,"<NAME>","BG",24.33333,42.200001),
(6461171,"Ognjanovo","BG",24.41667,42.150002),
(728660,"Ognyanovo","BG",24.41667,42.150002),
(789830,"Jažince","MK",21.176109,42.16444),
(5114810,"Delaware County","US",-74.96627,42.200089),
(1529047,"<NAME>","CN",85.456108,42.569172),
(1529109,"Tuyao","CN",92.23333,42.033329),
(6534105,"Pontós","ES",2.9176,42.185829),
(3113192,"Pontos","ES",2.91706,42.186649),
(3127460,"Provincia de Burgos","ES",-3.70789,42.33939),
(6356669,"Villamiel de la Sierra","ES",-3.41016,42.200729),
(3105366,"Villamiel de la Sierra","ES",-3.41771,42.191238),
(3194884,"Montenegro","ME",19.299999,42.5),
(5139656,"Steuben County","US",-77.333038,42.266739),
(4864924,"Linn County","US",-91.600182,42.066662),
(4852165,"Coggon","US",-91.530441,42.280819),
(5835308,"Platte County","US",-104.967194,42.133301),
(3183560,"<NAME>","IT",13.75,42.25),
(3175120,"Provincia di L’Aquila","IT",13.66667,42.083328),
(6542801,"Lucoli","IT",13.33799,42.290932),
(6360230,"Moaña","ES",-8.71009,42.28574),
(3108234,"Teis","ES",-8.66667,42.26667),
(6536921,"Forano","IT",12.58977,42.301231),
(3176772,"Forano","IT",12.58977,42.301231),
(5603018,"Owyhee County","US",-116.061768,42.55962),
(6359872,"Ourense","ES",-7.90211,42.35088),
(3109221,"Sejalvo","ES",-7.85657,42.303822),
(5820552,"Carbon County","US",-106.833931,41.66663),
(5838261,"Shirley (historical)","US",-106.481972,42.18885),
(831053,"Republic of Kosovo","XK",21,42.583328),
(784758,"<NAME>","XK",21.133329,42.366669),
(830382,"Mačitevo","XK",21.014721,42.346111),
(784371,"<NAME>","XK",21.366671,42.333328),
(858978,"Muadžeri","XK",21.328609,42.35944),
(732771,"<NAME>","BG",27.299999,42.599998),
(727797,"<NAME>","BG",27.32597,42.29969),
(4916845,"Winnebago County","US",-89.183441,42.350021),
(4905572,"Pecatonica","US",-89.359283,42.313911),
(6166510,"Tilbury","CA",-82.433113,42.266788),
(5137368,"Schuyler County","US",-76.883011,42.41674),
(5141775,"Tyrone","US",-77.058296,42.408131),
(5106997,"Allegany County","US",-78.033058,42.250622),
(5121382,"Houghton","US",-78.157227,42.423401),
(4898998,"Lake County","US",-88.000633,42.333359),
(4900541,"<NAME>s","US",-88.173141,42.421959),
(6254926,"Massachusetts","US",-71.108322,42.36565),
(5136495,"Schoharie County","US",-74.466248,42.566738),
(6359837,"Carballiño (O)","ES",-8.08081,42.442139),
(3126373,"<NAME>","ES",-8.07899,42.431629),
(6537438,"Pizzoli","IT",13.31169,42.43214),
(3170590,"Pizzoli","IT",13.31169,42.43214),
(4873899,"Sac County","US",-95.116943,42.38332),
(4875666,"Schaller","US",-95.293053,42.499699),
(5610815,"<NAME> County","US",-114.644493,42.35046),
(5605582,"Rock Creek","US",-114.305588,42.43214),
(5113366,"Columbia County","US",-73.649559,42.250641),
(5128474,"New Britain (historical)","US",-73.48983,42.4548),
(5821791,"Converse County","US",-105.533882,42.966629),
(5824768,"Esterbrook","US",-105.360817,42.41164),
(4930215,"Beechwood Estates","US",-73.111214,42.475639),
(3118528,"Provincia de León","ES",-6,42.666672),
(5744337,"Oregon","US",-120.501389,44.00013),
(5279468,"Wisconsin","US",-90.000412,44.50024),
(5259061,"Lafayette County","US",-90.133461,42.666672),
(5251010,"Dunbarton","US",-90.133179,42.561668),
(3165361,"<NAME>","IT",11,43.416672),
(3175784,"Provincia di Grosseto","IT",11.25,42.833328),
(6536859,"Manciano","IT",11.51625,42.587921),
(3175350,"La Capriola","IT",11.46667,42.51667),
(2128852,"Nubinai","JP",143.149994,42.51667),
(5133098,"Pulteney","US",-77.167198,42.52507),
(6358656,"Ponferrada","ES",-6.57195,42.502529),
(3113236,"Ponferrada","ES",-6.59619,42.546638),
(3017382,"Republic of France","FR",2,46),
(2993955,"Région Midi-Pyrénées","FR",1.33333,43.5),
(3018172,"<NAME>","FR",1.58333,42.833328),
(4871708,"Plymouth County","US",-96.233643,42.733318),
(4863535,"Kingsley","US",-95.967522,42.588322),
(3165802,"<NAME>","IT",13.68333,42.650002),
(6536352,"Crognaleto","IT",13.48959,42.58794),
(3168316,"<NAME>","IT",13.51667,42.583328),
(6358723,"<NAME>","ES",-5.68255,42.564072),
(3118664,"<NAME>","ES",-5.64108,42.580582),
(2128922,"Nishikioka","JP",141.483337,42.599998),
(6362996,"León","ES",-5.56716,42.57357),
(3118532,"Leon","ES",-5.56667,42.599998),
(6358750,"Villaquilambre","ES",-5.52674,42.658619),
(3115574,"Navatejera","ES",-5.56435,42.628422),
(6358623,"Gradefes","ES",-5.28208,42.653709),
(3107024,"Valdealiso","ES",-5.2843,42.630299),
(6360219,"Estrada (A)","ES",-8.46022,42.707729),
(3115149,"Olives","ES",-8.38333,42.683331),
(6358784,"<NAME>","ES",0.90603,42.686169),
(3106380,"Vaqueira-Beret","ES",0.93333,42.683331),
(6358728,"<NAME>","ES",-6.73593,42.771561),
(3106313,"Vega de Espinareda","ES",-6.65439,42.725368),
(3023519,"<NAME>","FR",9,42),
(3013793,"Département de la Haute-Corse","FR",9.16667,42.416672),
(3016687,"Garanou","FR",1.74987,42.767651),
(3119840,"Provincia da Coruña","ES",-8.41667,43.166672),
(6357311,"Lousame","ES",-8.82996,42.768631),
(3115331,"Noia","ES",-8.88734,42.785831),
(6541868,"Grosseto","IT",11.10794,42.77142),
(3182493,"<NAME>","IT",11.13859,42.811138),
(3128658,"Barquiña","ES",-8.89823,42.800739),
(2130452,"Chitose","JP",141.652222,42.819439),
(6358571,"Boñar","ES",-5.28092,42.90168),
(3127850,"Bonar","ES",-5.32386,42.866798),
(6357346,"<NAME>","ES",-8.54736,42.880241),
(3109642,"Santiago de Compostela","ES",-8.54569,42.88052),
(2129365,"Kutchan","JP",140.740555,42.901112),
(3165048,"Regione Umbria","IT",12.5,43),
(3171179,"Provincia di Perugia","IT",12.55,43.049999),
(3171434,"Pasciana","IT",12.68333,42.966671),
(2128690,"Ōmagari","JP",141.473892,42.968891),
(2979655,"Arrondissement de Saint-Girons","FR",1.16667,42.916672),
(6426285,"Rimont","FR",1.28333,43),
(2983510,"Rimont","FR",1.28255,42.995178),
(2129176,"Moiwashita","JP",141.350006,43),
(6446899,"Cazavet","FR",1.05,43),
(3028060,"Cazavet","FR",1.0442,43.0028),
(1528913,"Ak-Su","KG",74.166672,43.01667),
(5840177,"Sublette County","US",-109.867371,42.69994),
(5819656,"Bronx","US",-110.115723,42.992722),
(5243051,"Windham County","US",-72.732872,42.98341),
(5242810,"Westminster","US",-72.458702,43.06786),
(5833224,"Natrona County","US",-106.783943,42.966629),
(5817269,"<NAME>","US",-106.324188,43.081631),
(3202326,"Republic of Croatia","HR",15.5,45.166672),
(3337513,"Dubrovačko-<NAME>","HR",18.094721,42.65361),
(3288289,"Pijavice","HR",17.424999,43.073891),
(6542125,"Perugia","IT",12.38286,43.096741),
(7290471,"Ellera","IT",12.3216,43.08873),
(3336903,"Euskal Autonomia Erkidegoa / Comunidad Autónoma Vasca","ES",-2.75,43),
(3120935,"Gipuzkoa","ES",-2.16667,43.166672),
(6358162,"Bergara","ES",-2.41484,43.122009),
(3106090,"Bergara","ES",-2.4175,43.115101),
(3114690,"Ozaeta","ES",-2.41964,43.107422),
(6357357,"Vilasantar","ES",-8.10451,43.063808),
(3117926,"Lourdes","ES",-8.15,43.116669),
(3104469,"Provincia de Vizcaya","ES",-2.91667,43.25),
(3130717,"Provincia de Álava","ES",-2.75,42.833328),
(6355269,"Laudio/Llodio","ES",-2.9739,43.143909),
(3118228,"Llodio","ES",-2.96204,43.143219),
(5008112,"Saint Clair County","US",-82.666588,42.833359),
(2999891,"<NAME>","FR",6.06667,43.150002),
(3166546,"Provincia di Siena","IT",11.4,43.216671),
(6538605,"Trequanda","IT",11.66754,43.18774),
(3172660,"Montisi","IT",11.66667,43.150002),
(5769223,"South Dakota","US",-100.250687,44.500259),
(5764690,"Fall River County","US",-103.550468,43.26664),
(5765513,"Heppner","US",-103.549919,43.246922),
(6540486,"Torrita di Siena","IT",11.77944,43.170238),
(3165381,"Torrita di Siena","IT",11.77944,43.170238),
(6453642,"Narbonne","FR",3,43.183331),
(2990919,"Narbonne","FR",3,43.183331),
(3229999,"Federation of Bosnia and Herzegovina","BA",17.58333,44),
(6324992,"Etxeberrieta","ES",-2.029,43.210491),
(5003136,"Muskegon County","US",-86.133392,43.300018),
(7121451,"<NAME>","US",-85.987778,43.235279),
(5012748,"Tuscola County","US",-83.449951,43.46669),
(5002100,"Millington","US",-83.529678,43.28141),
(3028640,"<NAME>","FR",2.16667,43.25),
(6426912,"Villegailhenc","FR",2.36667,43.26667),
(2968739,"Villegailhenc","FR",2.3547,43.268669),
(2130209,"Hachimanchō","JP",141.366669,43.25),
(5119847,"Hamilton County","US",-74.50016,43.666729),
(5141978,"<NAME>","US",-74.33625,43.249241),
(3013767,"<NAME>","FR",1.5,43.416672),
(2991152,"<NAME>","FR",1.25,43.333328),
(6431835,"Salles-sur-Garonne","FR",1.18333,43.26667),
(2976360,"Salles-sur-Garonne","FR",1.17805,43.27438),
(3174004,"<NAME>","IT",13.25,43.5),
(3174379,"Provincia di Macerata","IT",13.16667,43.200001),
(6541845,"Morrovalle","IT",13.58848,43.31646),
(7535964,"Trodica","IT",13.59369,43.274578),
(5129832,"Oneida County","US",-75.466293,43.200069),
(5115844,"East Floyd","US",-75.26767,43.273129),
(5825643,"Fremont County","US",-108.667343,42.91663),
(5838312,"Shoshoni","US",-108.110367,43.23579),
(6541647,"Asciano","IT",11.57634,43.235142),
(3164494,"Vescona","IT",11.5,43.26667),
(3128842,"Barakaldo","ES",-2.98622,43.297531),
(3109453,"Barakaldo","ES",-2.99729,43.295639),
(3336898,"Comunidad Autónoma de Cantabria","ES",-4,43.333328),
(3109716,"Provincia de Cantabria","ES",-4,43.166672),
(3127224,"<NAME>","ES",-4.23571,43.308239),
(3109041,"Sestao","ES",-3.00716,43.30975),
(4861232,"How<NAME>","US",-92.316841,43.349972); |
<gh_stars>0
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.6.38)
# Database: ci-template
# Generation Time: 2019-06-24 10:00:51 AM +0000
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
# Dump of table users
# ------------------------------------------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(128) DEFAULT NULL,
`username` varchar(64) DEFAULT NULL,
`email` varchar(64) DEFAULT NULL,
`password` varchar(40) DEFAULT NULL,
`level` varchar(3) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` (`id`, `name`, `username`, `email`, `password`, `level`)
VALUES
(1,'I\'m Admin','admin','<EMAIL>','<PASSWORD>','1'),
(2,'I\'m Staff','staff','<EMAIL>','<PASSWORD>','2'),
(3,'I\'m User','user','<EMAIL>','ee11cbb19052e40b07aac0ca060c23ee','3');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
<filename>Eva Version 1/01 - Planilla Quincenal/03 - Factores/28 - EvoData - SegEducativo.sql
/* Script Generado por Evolution - Editor de Formulación de Planillas. 16-01-2017 11:49 AM */
begin transaction
delete from [sal].[fac_factores] where [fac_codigo] = '3a659999-3b6a-4906-845c-8ac750e90c8a';
insert into [sal].[fac_factores] ([fac_codigo],[fac_id],[fac_descripcion],[fac_vbscript],[fac_codfld],[fac_codpai],[fac_size]) values ('3a659999-3b6a-4906-845c-8ac750e90c8a','SegEducativo','Valor del Descuento de Seguro Educativo','Function SegEducativo()
patAnterior = 0
afectoAnterior = 0
descAnterior = 0
cuota = 0
patronal = 0
if Emp_InfoSalario.Fields("dpl_seguro_educativo").Value = "N" then
SegEducativo = cuota
Exit Function
end if
if Factores("SegEducativoBase").Value >= 0.01 then
por_cuota = cDbl(ParametrosSeguroEducativo.Fields("PGE_SEG_EDUCATIVO_POR_DESC").Value)
pat_cuota = cDbl(ParametrosSeguroEducativo.Fields("PGE_SEG_EDUCATIVO_POR_PAT").Value)
afectoAnterior = cDbl(Factores("SegEducativoBase").Value)
cuota = round(por_cuota / 100.0 * afectoAnterior, 4) - descAnterior
if cuota < 0 then cuota = 0
patronal = round(pat_cuota / 100.0 * afectoAnterior, 4) - patAnterior
if patronal < 0 then patronal = 0
end if
''cuota = round(cuota*100.00 + 0.100)/100
cuota = round(cuota, 2)
'' Inserta el registro en la tabla de descuentos
if cuota > 0 and not isnull(Factores("SegEducativo").CodTipoDescuento) then
agrega_descuentos_historial Agrupadores, _
DescuentosEstaPlanilla, _
Emp_InfoSalario.Fields("EMP_CODIGO").Value, _
Pla_Periodo.Fields("PPL_CODPPL").Value, _
Factores("SegEducativo").CodTipoDescuento, _
cuota, patronal, Factores("SegEducativoBase").Value, _
"PAB", 0, ""
end if
Factores("SegEducativoPatronal").Value = patronal
'' Almacena en las reservas el aporte patronal de seguro educativo
if not isnull(Factores("SegEducativoPatronal").CodTipoReserva) then
agrega_reservas_historial Agrupadores, _
ReservasEstaPlanilla, _
Emp_InfoSalario.Fields("EMP_CODIGO").Value, _
Pla_Periodo.Fields("PPL_CODPPL").Value, _
Factores("SegEducativoPatronal").CodTipoReserva, _
patronal, "PAB", 0 , ""
end if
SegEducativo = cuota
End Function','double','pa',0);
commit transaction;
|
<filename>5.2.3/Database/Constraints/AFW_12_GROUP_STAT_FK2.sql<gh_stars>1-10
SET DEFINE OFF;
ALTER TABLE AFW_12_GROUP_STAT ADD (
CONSTRAINT AFW_12_GROUP_STAT_FK2
FOREIGN KEY (REF_DOMN)
REFERENCES AFW_12_DOMN (SEQNC)
ON DELETE CASCADE
ENABLE VALIDATE)
/
|
DELIMITER $$
USE 'report'$$
DROP PROCEDURE IF EXISTS get_sellers$$
CREATE PROCEDURE get_sellers
(
OUT error_code INT,
IN from_date DATE,
IN to_date DATE
)
/*
Report Name:
Seller Report.
Input:
from_date - the start date of the period
to_date - the end date of the period
Output:
error_code - Error Code: 0 - OK;
-2 - error.
Usage:
CALL report.get_sellers(@err, '2010-08-01', '2010-09-15');
Result:
+--------------------+----------------------+-------------------+
| seller_duns_number | seller_name | seller_start_date |
+--------------------+----------------------+-------------------+
| 000301812 | Ates LMP | 04/21/2010 |
| 000316075 | Charly | 06/28/2010 |
| 000320721 | <NAME> | 08/10/2010 |
| 000329722 | <NAME> | 08/25/2010 |
| 000316752 | <NAME> | 06/30/2010 |
| 000302075 | FBS 04 28 | 04/23/2010 |
| 000323766 | FBS PATCH 8/17/2010 | 08/16/2010 |
| 000300673 | FBSqe | 04/15/2010 |
+--------------------+----------------------+-------------------+
Notes:
1. Possible checks:
JOIN account.account_status ast
ON (act.account_status = ast.account_status
AND LOWER(ast.description) = 'active')
JOIN account.account_store acs
ON (acs.account_id = act.account_id
AND acs.account_store_status = 1) -- const now?
JOIN account.store sto
ON acs.store_id = sto.store_id
JOIN account.store_type stt
ON (sto.store_type_id = stt.store_type_id
AND stt.store_type_name = 'WAREHOUSE')
*/
BEGIN
DECLARE t_from_date DATE DEFAULT IFNULL(from_date, SUBDATE(CURRENT_DATE(), INTERVAL 1 DAY));
DECLARE t_to_date DATE DEFAULT IFNULL(to_date, CURRENT_DATE());
SET error_code = -2;
SET @sql_stmt = CONCAT('
SELECT act.duns AS seller_duns_number,
act.account_name AS seller_name,
DATE_FORMAT(act.created_dtm, "%m/%d/%Y") AS seller_start_date
FROM account.web_account act
WHERE act.duns IS NOT NULL
AND act.created_dtm BETWEEN ''', t_from_date, ''' AND ''', t_to_date, '''
ORDER BY act.account_name
');
-- SELECT @sql_stmt;
PREPARE query FROM @sql_stmt;
EXECUTE query;
DEALLOCATE PREPARE query;
SET error_code = 0;
END$$
DELIMITER ;
|
<reponame>navikt/tiltaksgjennomforing-backend<filename>src/main/resources/db/migration/V7__oppdatere_godkjent_av_dato.sql
update avtale set godkjent_av_deltaker = '2019-01-01T00:00:00.000' where gammel_godkjent_av_deltaker is true;
update avtale set godkjent_av_arbeidsgiver = '2019-01-01T00:00:00.000' where gammel_godkjent_av_arbeidsgiver is true;
update avtale set godkjent_av_veileder = '2019-01-01T00:00:00.000' where gammel_godkjent_av_veileder is true; |
<reponame>felipeschneider88/miPrimerFullStackApp
CREATE TABLE [dbo].[clientes]
(
[Id] UNIQUEIDENTIFIER NOT NULL PRIMARY KEY,
[last_longitude ] FLOAT NULL,
[last_latitude ] FLOAT NULL,
[battery] INT NULL,
[last_checkin] DATETIME NULL,
[in_use] BIT NULL,
[vehicle_type] NVARCHAR(50) NOT NULL
)
|
<gh_stars>1-10
USE employee_trackerDB;
----- DEPARTMENT SEEDS -----
INSERT INTO department (id, department_name)
VALUES (1, 'Operations');
INSERT INTO department (id, department_name)
VALUES (2, 'Finance & Administration');
INSERT INTO department (id, department_name)
VALUES (3, 'Development');
----- ROLE SEEDS -----
INSERT INTO role (id, title, salary, department_id)
VALUES (1, 'Executive Director', 200000, 3);
INSERT INTO role (id, title, salary, department_id)
VALUES (2, 'Director of Operations', 150000, 1);
INSERT INTO role (id, title, salary, department_id)
VALUES (3, 'Director of F&A', 150000, 2);
INSERT INTO role (id, title, salary, department_id)
VALUES (4, 'Director of Development', 150000, 3);
INSERT INTO role (id, title, salary, department_id)
VALUES (5, 'Programming Manager', 100000, 1);
INSERT INTO role (id, title, salary, department_id)
VALUES (6, 'IT Manager', 100000, 2);
INSERT INTO role (id, title, salary, department_id)
VALUES (7, 'Finance Manager', 100000, 2);
INSERT INTO role (id, title, salary, department_id)
VALUES (8, 'Volunteer Manager', 100000, 3);
INSERT INTO role (id, title, salary, department_id)
VALUES (9, 'Grants Manager', 60000, 3);
INSERT INTO role (id, title, salary, department_id)
VALUES (10, 'Individual Giving Manager', 100000, 3);
INSERT INTO role (id, title, salary, department_id)
VALUES (11, 'Corporate Gifts Manager', 100000, 3);
----- EMPLOYEE SEEDS -----
INSERT INTO employee (id, first_name, last_name, role_id, manager_id)
VALUES (1, 'Imani', 'Williams', 1, null);
INSERT INTO employee (id, first_name, last_name, role_id, manager_id)
VALUES (2, 'Darius', 'Hernandez', 2, 1);
INSERT INTO employee (id, first_name, last_name, role_id, manager_id)
VALUES (3, 'Amy', 'Choi', 3, 1);
INSERT INTO employee (id, first_name, last_name, role_id, manager_id)
VALUES (4, 'Dara', 'Sok', 4, 1);
INSERT INTO employee (id, first_name, last_name, role_id, manager_id)
VALUES (5, 'Melissa', 'Brown', 5, 2);
INSERT INTO employee (id, first_name, last_name, role_id, manager_id)
VALUES (6, 'Amira', 'Ali', 6, 3);
INSERT INTO employee (id, first_name, last_name, role_id, manager_id)
VALUES (7, 'Alexus', 'Cole', 7, 3);
INSERT INTO employee (id, first_name, last_name, role_id, manager_id)
VALUES (8, 'Lianne', 'Soon', 8, 4);
INSERT INTO employee (id, first_name, last_name, role_id, manager_id)
VALUES (9, 'Jamal', 'Jones', 9, 4);
INSERT INTO employee (id, first_name, last_name, role_id, manager_id)
VALUES (10, 'Pedro', 'Rodriguez',10, 4);
|
CREATE TABLE IF NOT EXISTS test2 (
id serial NOT NULL
);
|
<filename>src/test/resources/alter4.test_10.sql
-- alter4.test
--
-- execsql {
-- DROP TABLE abc;
-- DROP TABLE t1;
-- DROP TABLE t3;
-- }
DROP TABLE abc;
DROP TABLE t1;
DROP TABLE t3; |
<filename>Hadith/Database/setup-search.sql
CREATE TABLE "Keyword" (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`text` VARCHAR(100) NOT NULL
);
CREATE UNIQUE INDEX `keyword_basic_idx` ON `Keyword` (`text` ); |
<reponame>VoDangVinh2000/Efruit-Web-Internship<filename>happyfruits/pixeladmin/updates/9.1.sql
-- 27/08/2018 - New Order ID
INSERT INTO `settings`(`id`,`option_name`,`option_value`,`name`,`is_hide`,`created_dtm`,`modified_dtm`)
VALUES (NULL,'stt','0','Mã đơn hàng hiện tại',0,CURRENT_TIMESTAMP,CURRENT_TIMESTAMP); |
<reponame>openhousedev/OpenHouse.Core.Web
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS propertyCharge;
SET FOREIGN_KEY_CHECKS = 1;
CREATE TABLE `propertyCharge` (
`propertyChargeId` INT NOT NULL AUTO_INCREMENT,
`propertyId` INT NOT NULL,
`rentAccountId` INT NOT NULL,
`charge` FLOAT,
`startDT` DATETIME NOT NULL,
`endDT` DATETIME NULL,
`updatedByUserID` VARCHAR(255) NOT NULL,
`updatedDT` DATETIME NOT NULL,
`createdByUserID` VARCHAR(255) NOT NULL,
`createdDT` DATETIME NOT NULL,
PRIMARY KEY(`propertyChargeId`),
FOREIGN KEY(`propertyId`) REFERENCES property(`propertyId`),
FOREIGN KEY (`rentAccountId`) REFERENCES rentAccount(`rentAccountId`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;
SET @currDate = CURDATE();
INSERT INTO propertyCharge VALUES(NULL,1,1,85.72,'2020-04-01',NULL,'611a361a-bce9-4783-b715-da82528a5988',CURDATE(),'611a361a-bce9-4783-b715-da82528a5988',CURDATE());
|
<filename>framework/resources/Functional/window_functions/multiple_partitions/q18.sql
-- 3 windows with different default defintions
-- all windows have only order by clause
-- mix of aggregate and ranking functions
select
max(c_bigint) over(order by c_varchar, c_date) as max_value,
min(c_bigint) over(order by c_date, c_varchar) as min_value,
row_number() over(order by c_integer + 1) as row_num
from
j4
order by
row_number() over(order by c_integer + 1) desc nulls first;
|
<filename>Public/Admin/css/fullcalendar_opt/calendar.sql
--
-- 表的结构 `calendar`
--
CREATE TABLE `calendar` (
`id` int(11) NOT NULL auto_increment,
`title` varchar(100) NOT NULL,
`starttime` int(11) NOT NULL,
`endtime` int(11) default NULL,
`allday` tinyint(1) NOT NULL default '0',
`color` varchar(20) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
INSERT INTO scm_secondary_repos (SELECT o.group_id, p.plugin_id, o.repo_name, o.clone_url, o.description, o.next_action FROM plugin_scmgit_secondary_repos o, plugins p WHERE p.plugin_name='scmgit');
INSERT INTO scm_personal_repos (SELECT o.group_id, p.plugin_id, o.user_id, 0 FROM plugin_scmgit_personal_repos o, plugins p WHERE p.plugin_name='scmgit');
|
<gh_stars>0
--------------------------------------------------------------------------------
-- AddEventLog -----------------------------------------------------------------
--------------------------------------------------------------------------------
CREATE OR REPLACE FUNCTION AddEventLog (
pType char,
pCode integer,
pEvent text,
pText text,
pCategory text DEFAULT null,
pObject uuid DEFAULT null
) RETURNS bigint
AS $$
DECLARE
nId bigint;
BEGIN
INSERT INTO db.log (type, code, event, text, category, object)
VALUES (pType, pCode, pEvent, pText, pCategory, pObject)
RETURNING id INTO nId;
RETURN nId;
END;
$$ LANGUAGE plpgsql
SECURITY DEFINER
SET search_path = kernel, pg_temp;
--------------------------------------------------------------------------------
-- NewEventLog -----------------------------------------------------------------
--------------------------------------------------------------------------------
CREATE OR REPLACE FUNCTION NewEventLog (
pType char,
pCode integer,
pEvent text,
pText text,
pCategory text DEFAULT null,
pObject uuid DEFAULT null
) RETURNS void
AS $$
DECLARE
nId bigint;
BEGIN
nId := AddEventLog(pType, pCode, pEvent, pText, pCategory, pObject);
END;
$$ LANGUAGE plpgsql
SECURITY DEFINER
SET search_path = kernel, pg_temp;
--------------------------------------------------------------------------------
-- WriteToEventLog -------------------------------------------------------------
--------------------------------------------------------------------------------
CREATE OR REPLACE FUNCTION WriteToEventLog (
pType char,
pCode integer,
pEvent text,
pText text,
pObject uuid DEFAULT null
) RETURNS void
AS $$
DECLARE
vCategory text;
BEGIN
IF pType IN ('M', 'W', 'E', 'D') AND GetLogMode() THEN
IF pObject IS NOT NULL THEN
SELECT GetClassCode(class) INTO vCategory FROM db.object WHERE id = pObject;
END IF;
PERFORM NewEventLog(pType, pCode, pEvent, pText, vCategory, pObject);
END IF;
IF pType = 'D' AND GetDebugMode() THEN
pType := 'N';
END IF;
IF pType = 'N' THEN
RAISE NOTICE '[%] [%] [%] [%] %', pType, pCode, pEvent, pObject, pText;
END IF;
END;
$$ LANGUAGE plpgsql
SECURITY DEFINER
SET search_path = kernel, pg_temp;
--------------------------------------------------------------------------------
-- WriteToEventLog -------------------------------------------------------------
--------------------------------------------------------------------------------
CREATE OR REPLACE FUNCTION WriteToEventLog (
pType char,
pCode integer,
pText text,
pObject uuid DEFAULT null
) RETURNS void
AS $$
BEGIN
PERFORM WriteToEventLog(pType, pCode, 'log', pText, pObject);
END;
$$ LANGUAGE plpgsql
SECURITY DEFINER
SET search_path = kernel, pg_temp;
--------------------------------------------------------------------------------
-- DeleteEventLog --------------------------------------------------------------
--------------------------------------------------------------------------------
CREATE OR REPLACE FUNCTION DeleteEventLog (
pId bigint
) RETURNS void
AS $$
BEGIN
DELETE FROM db.log WHERE id = pId;
END;
$$ LANGUAGE plpgsql
SECURITY DEFINER
SET search_path = kernel, pg_temp;
--------------------------------------------------------------------------------
-- WriteDiagnostics ------------------------------------------------------------
--------------------------------------------------------------------------------
CREATE OR REPLACE FUNCTION WriteDiagnostics (
pMessage text,
pContext text default null
) RETURNS void
AS $$
DECLARE
ErrorCode int;
ErrorMessage text;
BEGIN
PERFORM SetErrorMessage(pMessage);
SELECT * INTO ErrorCode, ErrorMessage FROM ParseMessage(pMessage);
PERFORM WriteToEventLog('E', ErrorCode, ErrorMessage);
IF pContext IS NOT NULL THEN
PERFORM WriteToEventLog('D', ErrorCode, pContext);
END IF;
END;
$$ LANGUAGE plpgsql
SECURITY DEFINER
SET search_path = kernel, pg_temp;
|
<gh_stars>0
-- item_and_item_kit_info_popup --
ALTER TABLE `phppos_items` ADD COLUMN `info_popup` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;
ALTER TABLE `phppos_item_kits` ADD COLUMN `info_popup` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;
|
CREATE ROLE metabase WITH LOGIN CREATEDB PASSWORD 'password';
CREATE DATABASE metabase WITH OWNER metabase;
CREATE ROLE sirene WITH LOGIN CREATEDB PASSWORD 'password';
CREATE DATABASE stats_sirene WITH OWNER sirene;
\c stats_sirene;
CREATE EXTENSION pg_trgm;
\c metabase;
CREATE EXTENSION pg_trgm;
|
<filename>basic_select/japanese_cities_names.sql
-- Query the names of all the Japanese cities in the CITY table.
-- The COUNTRYCODE for Japan is JPN.
SELECT NAME
FROM CITY
WHERE COUNTRYCODE = "JPN";
|
<filename>testout/pivot_vtab-test-out.sql
.load dist/pivot_vtab
-- https://github.com/jakethaw/pivot_vtab/
-- Rows
CREATE TABLE r AS SELECT 1 id UNION SELECT 2 UNION SELECT 3;
-- Columns
CREATE TABLE c( id INTEGER PRIMARY KEY, name TEXT);
INSERT INTO c (name) VALUES ('a'),('b'),('c'),('d');
CREATE TABLE x( r_id INT, c_id INT, val TEXT);
INSERT INTO x (r_id, c_id, val) SELECT r.id, c.id, c.name || r.id FROM c, r;
SELECT * FROM x;
[{"r_id":1,"c_id":1,"val":"a1"},
{"r_id":2,"c_id":1,"val":"a2"},
{"r_id":3,"c_id":1,"val":"a3"},
{"r_id":1,"c_id":2,"val":"b1"},
{"r_id":2,"c_id":2,"val":"b2"},
{"r_id":3,"c_id":2,"val":"b3"},
{"r_id":1,"c_id":3,"val":"c1"},
{"r_id":2,"c_id":3,"val":"c2"},
{"r_id":3,"c_id":3,"val":"c3"},
{"r_id":1,"c_id":4,"val":"d1"},
{"r_id":2,"c_id":4,"val":"d2"},
{"r_id":3,"c_id":4,"val":"d3"}]
CREATE VIRTUAL TABLE pivot USING pivot_vtab(
--
-- Pivot table row key query
--
-- Defines first column of the pivot table
--
-- Required to perform a full table scan of the pivot table. This is run when
-- not joining or filtering by the pivot table key.
--
-- The first column name in this query will become the name of the pivot table key column.
-- The value of the pivot table key column is provided to the pivot query as ?1.
--
(SELECT id r_id -- pivot table key
FROM r),
--
-- Pivot table column definition query
--
-- Defines second+ column(s) of the pivot table
--
-- This query should return pivot table column key/name pairs.
-- It is run during vtab creation to define the pivot table column names.
--
-- The first column of this query is the pivot column key, and is provided
-- to the pivot query as ?2
--
-- The second column of this query is used to name the pivot table columns.
-- This column is required to return unique values.
--
-- Changes to this query can only be propagated by dropping and
-- re-creating the virtual table
--
(SELECT id c_id, -- pivot column key - can be referenced in pivot query as ?2
name -- pivot column name
FROM c),
--
-- Pivot query
--
-- This query should define a single value in the pivot table when
-- filtered by the pivot table row key (1?) and a column key (2?)
--
(SELECT val
FROM x
WHERE r_id = ?1
AND c_id = ?2)
);
SELECT *
FROM pivot;
[{"r_id":1,"a":"a1","b":"b1","c":"c1","d":"d1"},
{"r_id":2,"a":"a2","b":"b2","c":"c2","d":"d2"},
{"r_id":3,"a":"a3","b":"b3","c":"c3","d":"d3"}]
UPDATE x
SET val = 'hello'
WHERE c_id = 3
AND r_id = 2;
UPDATE x
SET val = 'world'
WHERE c_id = 4
AND r_id = 2;
DELETE
FROM x
WHERE c_id = 2
AND r_id = 3;
SELECT *
FROM pivot;
[{"r_id":1,"a":"a1","b":"b1","c":"c1","d":"d1"},
{"r_id":2,"a":"a2","b":"b2","c":"hello","d":"world"},
{"r_id":3,"a":"a3","b":null,"c":"c3","d":"d3"}]
|
<filename>demo.sql
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 20, 2019 at 12:17 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `demo`
--
DELIMITER $$
--
-- Procedures
--
CREATE DEFINER=`root`@`localhost` PROCEDURE `before_offence` (IN `username` VARCHAR(50), IN `licno` VARCHAR(50), IN `vhno` VARCHAR(50)) MODIFIES SQL DATA
IF ((SELECT COUNT(*) FROM users WHERE name = username) = 0) THEN
INSERT INTO users(name,vehicleno,licenseno) VALUES (username,vhno,licno) ;
END IF$$
DELIMITER ;
-- --------------------------------------------------------
--
-- Table structure for table `admin`
--
CREATE TABLE `admin` (
`username` varchar(250) NOT NULL,
`password` varchar(250) NOT NULL,
`OfficialAdded` varchar(20) NOT NULL,
`DateTimeAdded` date NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `admin`
--
INSERT INTO `admin` (`username`, `password`, `OfficialAdded`, `DateTimeAdded`) VALUES
('admin12', '$2y$10$VZzIZJGI8jzyoO5A.xIeuOD2jdKPFzuzueckn.cnvuwMdyCzr27QW', '', '0000-00-00'),
('joe', '$2y$10$REsb4pxNFSwBm1o/F4a62uvzP06vztWPK68YVdZpBpAJVSAFuW1lW', '', '0000-00-00'),
('atul', '$2y$10$1oW/.aW.JjKdX96.lCEPQOq0HMQHMecqu/SFlJZ6Pd1AhU5mmOlza', '', '0000-00-00'),
('passwordispassword', <PASSWORD>.', '', '0000-00-00');
-- --------------------------------------------------------
--
-- Table structure for table `policerecord`
--
CREATE TABLE `policerecord` (
`PSID` varchar(250) NOT NULL,
`OfficialUsername` varchar(20) NOT NULL,
`Password` varchar(250) NOT NULL,
`CopName` varchar(50) NOT NULL,
`Designation` varchar(30) NOT NULL,
`PhoneNo` varchar(20) NOT NULL,
`Address` varchar(30) NOT NULL,
`EmailID` varchar(20) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `policerecord`
--
INSERT INTO `policerecord` (`PSID`, `OfficialUsername`, `Password`, `CopName`, `Designation`, `PhoneNo`, `Address`, `EmailID`) VALUES
('2', 'cop', <PASSWORD>', 'XYZ', 'police', '97827541', 'Ullal Main Road', '<EMAIL>'),
('1', 'police', '$2y$10$HjTtA2.IycomH5hYzC5Q8eaplcuSVWJkKm9scCVLNpTSvxKI1lHla', 'Sachin', 'police', '555555', 'Bangalore', '<EMAIL>'),
('3', 'efgh', '$2y$10$r5JBCksbXOn8vaRkyPvnke5N6pBBoJYciYhMHqZM/gGccehMYDmCm', 'efgh', 'police', '555555', 'Bangalore', '<EMAIL>'),
('3', '<PASSWORD>', <PASSWORD>', 'password', 'police', '987654', 'Bangalore', '<EMAIL>');
-- --------------------------------------------------------
--
-- Table structure for table `station`
--
CREATE TABLE `station` (
`PSName` varchar(20) NOT NULL,
`PSID` int(11) NOT NULL,
`PSAddress` varchar(50) NOT NULL,
`PSPhoneNo` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `station`
--
INSERT INTO `station` (`PSName`, `PSID`, `PSAddress`, `PSPhoneNo`) VALUES
('Kengeri PS', 1, 'Kengeri', 988877665),
('Jnanabharati PS', 2, 'Ullal', 99998877),
('RR PS', 3, 'RRNagar', 88899976),
('Jayanagar PS', 4, 'Jayanagar', 77788898);
-- --------------------------------------------------------
--
-- Table structure for table `useroffence`
--
CREATE TABLE `useroffence` (
`Offence` varchar(30) NOT NULL,
`Fine` int(50) NOT NULL,
`VehicleNo` varchar(16) NOT NULL,
`Place` varchar(30) NOT NULL,
`DateTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`OfficialUsername` varchar(30) NOT NULL,
`LicenseNo` varchar(20) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `useroffence`
--
INSERT INTO `useroffence` (`Offence`, `Fine`, `VehicleNo`, `Place`, `DateTime`, `OfficialUsername`, `LicenseNo`) VALUES
('No helmet', 2000, '1918', 'Kengeri', '2019-11-14 00:03:20', 'police', '414'),
('Drunk driving', 2000, '9999', 'Jnanabharati', '2019-11-14 00:28:30', 'cop', '8987'),
('Extra pillion', 3000, '1915', 'Jayanagar', '2019-11-14 00:29:24', 'police', '777'),
('No helmet', 1000, '1915', 'Jayanagar', '2019-11-14 00:29:55', 'cop', '777'),
('No seetbelt', 500, '1915', 'Jayanagar', '2019-11-14 00:30:52', 'cop', '777'),
('No helmet', 1212, '6666', 'Jnanabharati', '2019-11-14 10:04:59', 'police', '6666'),
('Drunk', 1500, '7777', 'Jayanagar', '2019-11-14 10:33:58', 'police', '7777'),
('Exceeding permissable weight', 1000, '6543', 'Kengeri', '2019-11-14 10:44:53', 'police', '6543');
--
-- Triggers `useroffence`
--
DELIMITER $$
CREATE TRIGGER `trig1` BEFORE INSERT ON `useroffence` FOR EACH ROW CALL before_offence('',new.vehicleno,new.licenseno)
$$
DELIMITER ;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`name` varchar(50) NOT NULL,
`phno` int(50) NOT NULL,
`vehicleno` varchar(16) NOT NULL,
`licenseno` varchar(30) NOT NULL,
`emailid` varchar(50) NOT NULL,
`password` varchar(250) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`name`, `phno`, `vehicleno`, `licenseno`, `emailid`, `password`) VALUES
('Vineela', 99988765, '1918', '<PASSWORD>', '<EMAIL>', <PASSWORD>'),
('Atul', 98765, '1915', '777', '<EMAIL>', '$2y$10$/x973HA/0hYEqBPVW2kw/e5edI8f.pxZ4IiHIXeF20jK18RcivmZe'),
('Abbas', 6665432, '9999', '8987', '<EMAIL>', <PASSWORD>'),
('Deeksha', 675432, '6543', '6543', '<EMAIL>', <PASSWORD>');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `admin`
--
ALTER TABLE `admin`
ADD PRIMARY KEY (`username`);
--
-- Indexes for table `policerecord`
--
ALTER TABLE `policerecord`
ADD PRIMARY KEY (`OfficialUsername`);
--
-- Indexes for table `station`
--
ALTER TABLE `station`
ADD PRIMARY KEY (`PSID`);
--
-- Indexes for table `useroffence`
--
ALTER TABLE `useroffence`
ADD KEY `VehicleNo` (`VehicleNo`,`LicenseNo`) USING BTREE;
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`licenseno`,`vehicleno`) USING BTREE;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 26, 2017 at 09:00 PM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
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: `db_usama`
--
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2016_09_13_070520_add_verification_to_user_table', 2);
-- --------------------------------------------------------
--
-- Table structure for table `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `products`
--
CREATE TABLE `products` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`price` varchar(30) NOT NULL,
`image` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `products`
--
INSERT INTO `products` (`id`, `user_id`, `title`, `description`, `price`, `image`) VALUES
(1, 1, 'test', 'asd', '123', '220_itm_facebook-photo-comments2013-08-23_04-15-37_2.jpg'),
(2, 1, 'asd', 'asdasdasd', '123', '1001733_677962325565939_1479641572_n.jpg'),
(3, 1, 'front corner', 'asd', '123', '1069306_474155086009259_12472674_n.jpg'),
(4, 1, 'asdsd', 'asdasdasd', '123', '1184972_719633918053207_1198401412_n.jpg');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`verified` tinyint(1) NOT NULL DEFAULT '0',
`verification_token` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `name`, `email`, `password`, `remember_token`, `created_at`, `updated_at`, `verified`, `verification_token`) VALUES
(1, 'ib<PASSWORD>', '<EMAIL>', <PASSWORD>.', 'OGFe4Piliyl8RbYB<PASSWORD>iAL5NMi8gDWkhupp2yEuU<PASSWORD>HGtjVJ<PASSWORD>', '2017-12-11 13:07:46', '2017-12-11 13:07:46', 1, NULL);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`);
--
-- Indexes for table `products`
--
ALTER TABLE `products`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
---------------------------------------------------------------
-- table: vendor. indexes
---------------------------------------------------------------
-- index: cuix_vendor_key
-- drop index cuix_vendor_key;
create unique index cuix_vendor_key on vendor using btree (key);
alter table vendor cluster on cuix_vendor_key; |
<reponame>johnreybacal/OLAS<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 07, 2019 at 06:18 AM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
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: `olas`
--
-- --------------------------------------------------------
--
-- Table structure for table `admission`
--
CREATE TABLE `admission` (
`AdmissionId` int(11) NOT NULL,
`PatronId` int(11) NOT NULL,
`DateTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `admission`
--
INSERT INTO `admission` (`AdmissionId`, `PatronId`, `DateTime`) VALUES
(1, 1, '2019-04-07 12:56:03'),
(2, 2, '2019-04-07 12:57:39'),
(3, 2, '2019-04-07 12:58:13'),
(4, 4, '2019-04-07 12:59:02'),
(5, 4, '2019-04-07 13:04:05'),
(6, 4, '2019-04-07 13:05:48'),
(7, 3, '2019-04-07 13:46:54'),
(8, 3, '2019-04-07 13:47:16');
-- --------------------------------------------------------
--
-- Table structure for table `author`
--
CREATE TABLE `author` (
`AuthorId` int(11) NOT NULL,
`Name` varchar(255) NOT NULL,
`IsActive` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `author`
--
INSERT INTO `author` (`AuthorId`, `Name`, `IsActive`) VALUES
(1, '<NAME>', 1),
(2, '<NAME>', 1),
(3, '<NAME>', 1),
(4, '<NAME>.', 1),
(5, '<NAME>', 1),
(6, '<NAME>.', 1),
(7, '<NAME>', 1),
(8, '<NAME>', 1),
(9, '<NAME>', 1),
(10, '<NAME>', 1),
(11, '<NAME>', 1),
(12, '<NAME>', 1),
(13, '<NAME>', 1),
(14, '<NAME>', 1),
(15, '<NAME>', 1),
(16, '<NAME>.', 1),
(17, '<NAME>', 1),
(18, '<NAME>', 1),
(19, 'Trontz, <NAME>', 1),
(20, '<NAME>', 1),
(21, '<NAME>', 1),
(22, '<NAME>', 1),
(23, '<NAME>.', 1),
(24, '<NAME>', 1),
(25, '<NAME>.', 1),
(26, '<NAME>.', 1),
(27, '<NAME>.', 1),
(28, '<NAME>.', 1),
(29, '<NAME>', 1),
(30, '<NAME>. ., et al', 1),
(31, '<NAME>.', 1),
(32, '<NAME>.', 1),
(33, '<NAME>.', 1),
(34, '<NAME>', 1),
(35, '<NAME>', 1),
(36, '<NAME>', 1),
(37, '<NAME>.', 1),
(38, '<NAME>, <NAME>.', 1),
(39, '<NAME>., <NAME>., <NAME>', 1),
(40, '<NAME>', 1),
(41, '<NAME>, <NAME>', 1),
(42, '<NAME>.', 1),
(43, '<NAME>.', 1),
(44, '<NAME>', 1),
(45, '<NAME>. <NAME>', 1),
(46, '<NAME>', 1),
(47, '<NAME>, <NAME>.', 1),
(48, '<NAME>', 1),
(49, '<NAME>', 1),
(50, '<NAME>', 1),
(51, '<NAME>', 1),
(52, '<NAME>', 1),
(53, '<NAME>.', 1),
(54, '<NAME>', 1),
(55, '<NAME>.', 1),
(56, '<NAME>, <NAME>, <NAME>', 1),
(57, '<NAME>', 1),
(58, '<NAME>', 1),
(59, '<NAME>.', 1),
(60, '<NAME>', 1),
(61, '<NAME>.', 1),
(62, '<NAME>., <NAME>.', 1),
(63, '<NAME>.', 1),
(64, '<NAME>', 1),
(65, '<NAME>.', 1),
(66, '<NAME>', 1),
(67, '<NAME>', 1),
(68, '<NAME>.', 1),
(69, '<NAME>', 1),
(70, '<NAME>', 1),
(71, '<NAME>.', 1),
(72, '<NAME>', 1),
(73, '<NAME>', 1),
(74, '<NAME>, <NAME>', 1),
(75, '<NAME>, <NAME>', 1),
(76, 'Althouse, <NAME>.', 1),
(77, '<NAME>', 1),
(78, '<NAME>', 1),
(79, '<NAME>, <NAME>', 1),
(80, '<NAME>', 1),
(81, '<NAME>', 1),
(82, '<NAME>', 1),
(83, '<NAME>', 1),
(84, '<NAME>, <NAME>', 1),
(85, '<NAME>', 1),
(86, '<NAME>., <NAME>, HanmiGlobal', 1),
(87, '<NAME>.', 1),
(88, '<NAME>, <NAME>', 1),
(89, '<NAME>, <NAME>', 1),
(90, '<NAME>', 1),
(91, '<NAME>', 1),
(92, '<NAME>,', 1),
(94, '<NAME>.', 1),
(95, '<NAME>.', 1),
(96, '<NAME>, <NAME>', 1),
(97, '<NAME>, <NAME>.', 1),
(98, 'Astakhov, <NAME>.', 1),
(99, '<NAME>.', 1),
(100, '<NAME>, <NAME>, <NAME>, <NAME>', 1),
(101, '<NAME>, <NAME>', 1),
(102, '<NAME>, <NAME>', 1),
(103, '<NAME>.', 1),
(104, '<NAME>.', 1),
(105, '<NAME>., <NAME>.', 1),
(106, '<NAME>.', 1),
(107, '<NAME>.', 1),
(108, '<NAME>.', 1),
(109, '<NAME>', 1),
(110, '<NAME>., et al', 1),
(111, '<NAME>', 1),
(112, '<NAME>', 1),
(113, '<NAME>.', 1),
(114, '<NAME>.', 1),
(115, '<NAME>., et al', 1),
(116, '<NAME>., et al', 1),
(117, 'Dr. <NAME>', 1),
(118, '<NAME>.', 1),
(119, '<NAME>, <NAME>', 1),
(120, '<NAME>, et al', 1),
(121, '<NAME>, Resenblum <NAME>.', 1),
(122, '<NAME>, <NAME>, <NAME>', 1),
(123, '<NAME>, et al ', 1),
(124, '<NAME>', 1),
(125, '<NAME>.', 1),
(126, '<NAME>.', 1),
(127, '<NAME>', 1),
(128, '<NAME>., <NAME>.', 1),
(129, '<NAME>.', 1),
(130, '<NAME>, et al', 1),
(131, '<NAME>., <NAME>.', 1),
(132, '<NAME>, <NAME>', 1),
(133, '<NAME>, <NAME>.', 1),
(134, 'Kiessling, Puschmann, Schmieder, Schneider', 1),
(135, '<NAME>', 1),
(136, '<NAME>.', 1),
(137, '<NAME>.', 1),
(138, '<NAME>, et al', 1),
(139, 'National Association of City Transportation Officials', 1),
(140, '<NAME> ', 1),
(141, '<NAME>., <NAME>.', 1),
(142, '<NAME>', 1),
(143, '<NAME>', 1),
(144, '<NAME>., <NAME>', 1),
(145, '<NAME>., et al', 1),
(146, '<NAME>', 1),
(147, '<NAME>', 1),
(148, '<NAME>.', 1),
(149, '<NAME>., <NAME>.', 1);
-- --------------------------------------------------------
--
-- Table structure for table `book`
--
CREATE TABLE `book` (
`ISBN` varchar(13) NOT NULL,
`CallNumber` varchar(20) NOT NULL,
`Title` varchar(100) NOT NULL,
`PublisherId` int(11) NOT NULL,
`SectionId` int(11) NOT NULL,
`SeriesId` int(11) DEFAULT NULL,
`Edition` varchar(30) DEFAULT NULL,
`DatePublished` date NOT NULL,
`PlacePublished` varchar(100) NOT NULL,
`Summary` text NOT NULL,
`Extent` varchar(20) NOT NULL,
`OtherDetails` varchar(20) NOT NULL,
`Size` varchar(20) NOT NULL,
`Image` varchar(255) NOT NULL DEFAULT 'default.png'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `book`
--
INSERT INTO `book` (`ISBN`, `CallNumber`, `Title`, `PublisherId`, `SectionId`, `SeriesId`, `Edition`, `DatePublished`, `PlacePublished`, `Summary`, `Extent`, `OtherDetails`, `Size`, `Image`) VALUES
('0684152967', 'TT 751 W53 1977', 'Ask Erica', 1, 11, 0, '', '1977-01-01', 'New York', 'About the ABCs of needlework...', 'Good', '', '1 inch', 'ask.jpg'),
('1305263642', 'Z 253.532 A34 R92 20', 'Exploring Adobe InDesign Creative Cloud', 2, 14, 0, '', '2015-01-01', 'Canada', '', 'New', '', '2 inch', 'adobecreativecloud.jpg'),
('9780415661775', 'Z 253.532 A34 R83 20', 'Interactive Indesign CC', 3, 14, 0, '', '2014-01-01', 'Burlington, MA', '', 'New', '', '2.5 inch', 'inindcc.jpg'),
('1591581141', 'Z 692 C65 C67 2004', 'Collaborative Electronic Resource Management', 4, 14, 0, '', '2004-01-01', 'Westport, Conn', '', 'New', '', '1 inch', 'collab.jpg'),
('9782888931638', 'Z 252.5 R4 J87 2011', 'Letterpress: The Allure of the Handmade', 8, 14, 0, 'Second Edition', '2011-01-01', 'Mies, Switzerland', '', 'New', '', '1 inch', 'lph2.jpg'),
('9781454703297', 'Z 252.5 L48 W48 2013', 'Letterpress now: A DIY Guide to New & Old Printing Methods', 7, 14, 0, 'First Edtion', '2013-01-01', 'Asheville', '', 'New', '', '1 inch', '51HSo-eLYYL.jpg'),
('9782940496532', 'Z 246 A55 2014', 'Print and Finish', 9, 14, 2, 'Second Edition', '2014-01-01', 'USA', '', 'New', '', '1 inch', 'pf.jpg'),
('9788183569248', 'TX 911.3 T46 B76 201', 'The Growth Strategies of Hotel Industry', 10, 14, 0, 'First Edtion', '2011-01-01', 'New Delhi', '', 'New', '', '1 inch', 'default.png'),
('1418049652', 'TX 725 A1 N46 2009', 'International Cuisine', 11, 14, 0, 'First Edtion', '2009-01-01', 'Clifton Park, NY', '', 'New', '', '2 inch', 'ic.jpg'),
('9780123820860', 'TX 546 S76 2012', 'Sensory Evaluation Practices', 12, 14, 3, 'Fourth Edition', '2012-01-01', 'USA', '', 'New', '', '2 inch', 'SEP.jpg'),
('9781441914774', 'TX 545 F54 2014', 'Food Analysis', 13, 14, 4, 'Fourth Edition', '2014-01-01', 'New York', '', 'New', '', '2.5 inch', 'fa.jpg'),
('97811842973', 'TX 353 D78 2014', 'Nutrition for Foodservice and Culinary Professionals', 14, 14, 0, 'Eighth Edition', '2014-01-01', 'New Jersey', '', 'New', '', '1 inch', 'lemon.jpg'),
('9789351118442', 'TX 301 R36 2016', 'Housing and Home Management', 15, 14, 0, 'First Edition', '2016-01-01', 'New Delhi', '', 'New', '', '1.5 inch', 'hahm.jpg'),
('978159474617', 'TX 145 T76 2010', 'Home Economics Vintage Advice and Practical Science for the 21st-Century Household', 16, 14, 0, '', '2010-01-01', 'Philadelphia', '', 'New', '', '1 inch', 'he21.jpg'),
('9781466561557', 'TS 183 F67 2014', 'Formal Methods in Manufacturing', 17, 14, 0, 'First Edition', '2014-01-01', 'Boca Raton, FL', '', 'New', '', '1 inch', '9781466561557.jpg'),
('9781498732895', 'TS 177 H47 2016', 'Facilities Desgin', 17, 14, 0, 'Fourth Edition', '2016-01-01', 'Boca Raton, FL', '', 'New', '', '3 inch', 'facdesign.jpg'),
('9781466257993', 'TS 177 G74 2011', 'Plant Design, Facility Layout, Floor Planning', 19, 14, 0, 'First Edtion', '2011-01-01', 'Charleston, SC', '', 'New', '', '1 inch', 'greene.jpg'),
('9780470444047', 'TS 177 F32 2010', 'Facilities Planning', 20, 14, 0, 'Fourth Edition', '2010-01-01', 'Hoboken,NJ', '', 'New', '', '2 inch', 'facplan.jpg'),
('0849327229', 'TS 171.4 G48 2006', 'Product Design for the Environment: A Life Cycle Approach', 17, 14, 0, 'First Edition', '2006-01-01', 'Boca Raton, FL', '', 'New', '', '2 inch', 'proddd.jpg'),
('9781439808320', 'TS 170 M84 2013', 'Methods and Product Desig: New Strategies in Reengineering', 17, 14, 5, 'First Edition', '2013-01-01', 'Boca Raton, FL', '', 'New', '', '1 inch', '9781439808320.jpg'),
('9781848212121', 'TS 155.7 S85 2010', 'Sustainable Manufacturing', 20, 14, 7, 'First Edition', '2010-01-01', 'Hoboken,NJ', '', 'New', '', '1 inch', 'sus.jpg'),
('9781472533890', 'TR 660 A54 2015', 'Perspectives on Place', 9, 14, 0, 'First Edtion', '2015-01-01', ' USA', '', 'New', '', '1 inch', 'jap.jpg'),
('9780831134921', 'TS 250 B81 2014', 'Sheet Metal Forming Processes and Die Design', 21, 14, 0, 'Second Edition', '2014-01-01', 'South Norwalk', '', 'New', '', '1.5 inch', 'SHEEEEET.jpg'),
('9780750645676', 'TS 230 B44 2001', 'Foundry Technology', 22, 14, 0, 'Second Edition', '2001-01-01', 'Woburn', '', 'New', '', '3 inch', 'foundry.jpg'),
('9780831110217', 'TS 227 M56 1983', 'Practical Welding Technology', 21, 14, 0, 'First Edition', '1983-01-01', 'New York', '', 'New', '', '1 inch', 'pwt.jpg'),
('9780968686027', 'TS 211 S56 2008', 'Introduction to Robotics', 24, 14, 0, 'First Edition', '2008-01-01', 'London', '', 'New', '', '2 inch', 'rob.jpg'),
('9781118134153', 'TS 195.4 R68 2012', 'The Packaging: Designers Book of Patterns', 20, 14, 0, 'Fourth Edition', '2012-01-01', 'Hoboken,NJ', '', 'New', '', '2 inch', 'pattern.jpg'),
('0831130504', 'TS 183 T58 1994', 'Fundamental Principles of Manufacturing Processes', 21, 14, 0, 'First Edition', '1994-01-01', 'New York', '', 'New', '', '1 inch', 'fun.jpg'),
('9781609012403', 'TT 520 A73 2013', 'Draping for Apparel Design', 9, 14, 0, 'Third Edition', '2013-01-01', 'USA', '', 'New', '', '3 inch', 'draping.jpg'),
('9781609019259', 'TT 515 C65 2014', 'Professional Sewing Techniques for Designers', 9, 14, 0, '', '2014-01-01', 'New York', '', 'New', '', '2 inch', 'professional_sewing_tech_for_designers.jpg'),
('9780857857675', 'Z 246 B83 2015', 'Transforming Type: New Direction in Kinetic Typography', 9, 14, 0, 'First Edition', '2015-01-01', 'New York', '', 'New', '', '1 inch', 'tt.jpg'),
('2940361207', 'Z 244 J87 2006', 'Letterpress: New Applications for Traditional Skills', 5, 14, 0, 'First Edition', '2006-01-01', 'Switzerland', '', 'New', '', '1.5 inch', 'lpsssdsds.jpg'),
('1111569010', 'TT 163.12 J67 2013', 'Fundamentals of Mechatronics', 2, 14, 0, 'First Edition', '2013-01-01', 'Stanfford', '', 'New', '', '1.5 inch', 'MECH.jpg'),
('9781466566491', 'TS 1770 153 K86 2014', 'Textiles for Industrial Applications', 17, 14, 0, 'First Edition', '2014-01-01', 'Boca Raton, FL', '', 'New', '', '1.5 inch', 'fab.jpg'),
('9780857851789', 'N 6494 V53 M44 2015', 'A History of Video Art', 9, 14, 0, 'Second Edition', '2015-01-01', 'New York', '', 'New', '', '1 inch', 'va.jpg'),
('9781408171790', 'NC 997 B62 2014', 'Understanding Illustration', 9, 14, 0, 'First Edition', '2014-01-01', 'New York', '', 'New', '', '1 inch', 'ui.jpg'),
('9782940496112', 'NK 1520 S74 2014', 'The Principles & Processes of Interactive Design', 9, 14, 0, 'First Edition', '2014-01-01', 'New York', '', 'New', '', '1 inch', 'principles_int_design.jpg'),
('9781563678592', 'N 7432.7 D67 2011 ', 'Designing with Color: Concepts and Applications', 25, 14, 0, 'First Edition', '2011-01-01', 'New York', '', 'New', '', '2 inch', 'designing_color.jpg'),
('9781472521903', 'TR 897.6 P87 2014', 'Stop-motion Animation: Frame by Frame Film-making with Puppets and Models', 9, 14, 0, 'Second Edition', '2014-01-01', 'New York', '', 'New', '', '1 inch', 'stop_motion.jpg'),
('9780240525914', 'TR 897.72 F53 G36 20', 'How To Cheat in Adobe Flash CC', 3, 14, 0, 'First Edtion', '2014-01-01', 'New York', '', 'New', '', '2 inch', 'cheat_AdobeFCC.jpg'),
('9781408173794', 'TS 171.8 H67 2013 c.', '3D Printing for Artists, Designers and Makers', 9, 14, 0, 'First Edition', '2013-01-01', 'New York', '', 'New', '', '1 inch', '3D_printing.jpg'),
('9781589236080', 'TT 520 V43 2012', 'The Complete Photo Guide to Perfect Fitting', 26, 14, 0, 'First Edition', '2012-01-01', 'Minneapolis', '', 'New', '', '1 inch', 'perfect_fit.jpg'),
('9781845205928', 'TT 820 T92 2009', 'The Culture of Knitting', 27, 14, 0, 'First Edition', '2009-01-01', 'New York', '', 'New', '', '1 inch', 'culture_knitting.jpg'),
('9781845204396', 'TT 849.5 M85 2009', 'Felt', 28, 14, 0, '', '2009-01-01', 'New York', '', 'New', '', '1 inch', 'FELT.jpg'),
('9780071770187', 'TK 7018 K56 2013', 'Troubleshooting and Repairing Major Appliances', 29, 14, 0, 'Third Edition', '2013-01-01', 'USA', '', 'New', '', '4 inch', 'major.jpg'),
('9781439834534', 'TK 5105.8813 C492 20', 'Cloud Computing Strategies', 17, 14, 0, 'First Edition', '2011-01-01', 'Boca Raton, FL', '', 'New', '', '1.5 inch', 'cloud.jpg'),
('0782129587', 'TK 5103.12 G76 2001', 'Cabling: The Complete Guide to Network Wiring', 30, 14, 0, 'Second Edition', '2001-01-01', 'San Francisco', '', 'New', '', '3 inch', 'cabling.jpg'),
('9780124076822', 'TK 5103.7 G73 2015', 'Introduction to Digital Communications', 31, 14, 0, 'First Edition', '2015-01-01', 'New York', '', 'New', '', '2.5 inch', 'ali.jpg'),
('9780857094254', 'TK 7871.89 L53 2013', 'Organic Light Emitting Diode (OLEDs): Materials, Devices and Applications', 32, 14, 8, 'First Edition', '2013-01-01', 'Cambridge', '', 'New', '', '3 inch', 'oled.jpg'),
('9781466596771', 'TK 7870 N66 2014', 'Introduction to Instrumentation and Measurements', 17, 14, 0, 'Third Edition', '2014-01-01', 'Boca Raton, FL', '', 'New', '', '3 inch', 'robert.jpg'),
('9780071827782', 'TK 7866 G53 2014', 'Beginners Guide to Reading Schematics', 29, 14, 0, 'Third Edition', '2014-01-01', 'New York', '', 'New', '', '1 inch', 'schematics.jpg'),
('9781259215986', 'TK 7816 G75 2016', 'Grobs Basic Electronics', 29, 14, 0, 'Twelfth Edition', '2016-01-01', 'New York', '', 'New', '', '2.5 inch', 'mych.jpg'),
('9780123850157', 'TP 248.2 C52 2016', 'Biotechnology', 31, 14, 0, 'Second Edition', '2016-01-01', 'New York', '', 'New', '', '3 inch', 'bio.jpg'),
('9780071831314', 'TP 155 T52 2014', 'Chemical Engineering: The Essential Reference', 29, 14, 0, 'First Edition', '2014-01-01', 'USA', '', 'New', '', '1 inch', 'chem.jpg'),
('9781862392915', 'TN 950 N28 2010', 'Natural Stone Resources for Historical Monuments', 33, 14, 9, 'First Edition', '2010-01-01', 'London', '', 'New', '', '1 inch', 'rocks.jpg'),
('9788189922658', 'TN 870.5 S53 2014', 'Petroleum Science and Engineering', 34, 14, 0, 'First Edition', '2014-01-01', 'New Delhi', '', 'New', '', '1 inch', 'pet.jpg'),
('9878143989425', 'TL 250 A98 2013', 'Automotive Ergonomics: Driver-Vehicle Interaction', 17, 14, 0, 'First Edition', '2013-01-01', 'Boca Raton, FL', '', 'New', '', '1 inch', 'default.png'),
('9780081000366', 'TL 243 P39 2015 ', 'Essentials of Vehicle Dynamics', 35, 14, 0, 'First Edition', '2015-01-01', 'New York', '', 'New', '', '1 inch', 'vec.jpg'),
('9781608456376', 'TK 7895 M5 R43 2013', 'Resilient Architecture Design for Voltage Variation', 36, 14, 10, 'First Edition', '2013-01-01', 'California', '', 'New', '', '1 inch', 'vijay.jpg'),
('9781118659182', 'TK 7885.7 J46 2014', 'Architectures for Computer Vision: From Algorithm to Chip with Verilog', 20, 14, 0, 'First Edition', '2014-01-01', 'Singapore', '', 'New', '', '1 inch', 'arccyhy.jpg'),
('9780071289306', 'TK 7881.15 H35 2011', 'Power Electronics', 29, 14, 0, 'First Edition', '2011-01-01', 'New York', '', 'New', '', '1 inch', 'powerrr.jpg'),
('1446302637', 'TR 179 W67 2013', 'The Complete Guide to Photographic Composition', 37, 14, 0, 'First Edition', '2013-01-01', 'UK', '', 'New', '', '1 inch', 'phh.jpg'),
('9782940373857', 'TR 146 P73 2009', 'Working in Black and White', 38, 14, 11, 'First Edition', '2009-01-01', 'Lausanne', '', 'New', '', '1 inch', 'bnw.jpg'),
('9782940411665', 'TR 15 F69 2012', 'Behind the Image: Research in Photography', 9, 14, 12, 'First Edition', '2019-01-01', 'New York', '', 'New', '', '1 inch', 'behinds.jpg'),
('1133597106', 'TR 267.5 A3 T65 2013', 'Exploring Adobe Photoshop CS6', 11, 14, 0, '', '2013-01-01', 'New York', '', 'New', '', '1 inch', 'cs6.jpg'),
('9781619601994', 'TP 492 A43 2014', 'Modern Refrigeration and Airconditioning', 39, 14, 0, '19th Edition', '2014-01-01', 'USA', '', 'New', '', '3 inch', 'ref.jpg'),
('9780124114791', 'TP 370 E44 2014', 'Emerging Technologies for Food Processing', 35, 14, 13, 'First Edition', '2014-01-01', 'Amsterdam', '', 'New', '', '2 inch', 'dawen.jpg'),
('9782940411054', 'TR 591 P73 2009', 'Exposure', 40, 14, 0, 'First Edition', '2009-01-01', 'Switzerland', '', 'New', '', '1 inch', 'expo.jpg'),
('9782940411955', 'TR 590 P73 2013', 'Lighting', 40, 14, 14, 'First Edition', '2013-01-01', 'Switzerland', '', 'New', '', '1 inch', 'light.jpg'),
('0789723182', 'TR 310 E35 2001', 'Photoshop: Restoration and Retouching', 41, 14, 0, 'First Edition', '2001-01-01', 'Indianapolis', '', 'New', '', '1.5 inch', 'restoration.jpg'),
('9781133693253', 'TR 267 A3 T65 2013', 'Exploring Adobe Illustrator CS6', 11, 14, 0, 'First Edition', '2013-01-01', 'New York', '', 'New', '', '1 inch', 'illust_cs6.jpg'),
('9782940411894', 'TR 187 S35 2014', 'reading Photographs: An Introduction to the Theory and Meaning of Images', 9, 14, 16, 'First Edition', '2014-01-01', 'New York', '', 'New', '', '1 inch', 'rreading_photo.jpg'),
('9782940411405', 'TR 183 S56 2011', 'Context and Narrative', 40, 14, 17, 'First Edition', '2011-01-01', 'Switzerland', '', 'New', '', '1 inch', 'context.jpg'),
('9780415615280', 'TH 4860 D47 2013', 'Design and Construction of High-Performance Homes: Building Envelopes, Renewable Energies and Integr', 42, 14, 0, 'First Edition', '2013-01-01', 'New York', '', 'New', '', '1.5 inch', 'design_and_construction.jpg'),
('9780415526777', 'TH 4860 R62 2013', 'Ecohouse: A Design Guide', 42, 14, 0, 'Fourth Edition', '2013-01-01', 'New York', '', 'New', '', '2 inch', 'ecohouse.jpg'),
('9781848062344', 'TH 1092 C65 2013', 'Fire Performance of External Thermal Insulation for Walls of Multistorey Buildings', 43, 14, 0, 'Third Edition', '2013-01-01', '<NAME>', '', 'New', '', '1 inch', 'fire_prevention.jpg'),
('9780071546010', 'TH 880 Y635 2009', 'Green Building Through Integrated Design', 29, 14, 18, 'First Edition', '2009-01-01', 'New York', '', 'New', '', '1 inch', 'download.jpg'),
('9780415690911', 'TH 880 P43 2012', 'Sustainable Buildings and Infrastructure: Paths to Future', 42, 14, 0, 'First Edition', '2012-01-01', 'New York', '', 'New', '', '2 inch', 'sustainable_building.jpg'),
('9780470114216', 'TH 880 K53 2008', 'Sustainable Construction: Green Building Design and Delivery', 20, 14, 19, 'Second Edition', '2008-01-01', 'Hoboken,NJ', '', 'New', '', '2 inch', 'sustainable_construction.jpg'),
('9781119055570', 'TH 2401 G74 2016', 'Green Roof Retrofit: Building Urban Resilience', 14, 14, 20, 'First Edition', '2016-01-01', 'UK', '', 'New', '', '1 inch', 'green_roof.jpg'),
('9780415684064', 'TH 880 E48 2012', 'Carbon Management in the Built Environment', 42, 14, 0, 'First Edition', '2012-01-01', 'New York', '', 'New', '', '1 inch', 'carbon_management.jpg'),
('9780071625012', 'TH 880 A88 2010', 'Green Architecture: Advanced Technologies and Materials', 29, 14, 18, 'First Edition', '2010-01-01', 'New York', '', 'New', '', '2 inch', 'green_archi.jpg'),
('1595540059', 'PS3554.E43', 'Showdown /', 47, 3, 0, '', '0000-00-00', 'Nashville, Tenn. :', '', 'x, 366 p. ;', '', '24 cm.', 'default.png'),
('9780073380193', 'TJ 254.5 T88 2012', 'An Introduction to Combustion: Concepts and Applications', 29, 14, 0, 'Third Edition', '2012-01-01', 'New York', '', 'New', '', '2 inch', 'combustion.jpg'),
('9780615654386', 'TJ 223 P76 A37 2012', 'Introduction to PLCs: A Beginner\'s Guide to Programmable Logic Controllers', 44, 14, 0, 'First Edition', '2012-01-01', 'California', '', 'New', '', '1 inch', 'intro_plc.jpg'),
('9781627051378', 'TJ 223 P76 B34 2013', 'Bad to the Bone: Crafting Electronic Systems with BeagleBone and BeagleBone Black', 49, 14, 21, 'First Edition', '2013-01-01', 'San Rafael, California', '', 'New', '', '1.5 inch', 'badtothebone.jpg'),
('0849307759', 'TJ 163.12 M41 2008 c', 'Mechatronic Systems: Devices, Design, Control, Operation and Monitoring', 50, 14, 22, 'First Edition', '2008-01-01', 'Boca Raton, FL', '', 'New', '', '2 inch', 'mechatronic_systems.jpg'),
('9781420082111', 'TJ 163.12 D44 2010', 'Mechatronics: A Foundation Course ', 50, 14, 0, 'First Edition', '2010-01-01', 'Boca Raton, FL', '', 'New', '', '2 inch', 'mechatronics_a_foundation_course.jpg'),
('9781466584341', 'TJ 1260 A87 2014', 'Drills: Science and Technology of Advanced Operations', 50, 14, 23, 'First Edition', '2014-01-01', 'Boca Raton, FL', '', 'New', '', '2 inch', 'drills.jpg'),
('0872632075', 'TJ 1187 L69 1986', 'Low-cost Jigs, Fixtures and Gages for Limited Production', 51, 14, 0, 'First Edition', '1986-01-01', 'Dearborn, Michigan', '', 'New', '', '1 inch', 'low_cost_jigs.jpg'),
('9780831131340', 'TJ 1185 G49 2002', 'Machine Tool Technology Basics', 21, 14, 0, 'First Edition', '2002-01-01', 'New York', '', 'New', '', '1 inch', 'machine_tool_basics.jpg'),
('9781482222166', 'TH 7692 L64 2014', 'Industrial Air Quality and Ventilation: Controlling Dust Emissions', 50, 14, 0, 'First Edition', '2014-01-01', 'Boca Raton, FL', '', 'New', '', '1 inch', 'controlling_dust_emissions.jpg'),
('9789814253338', 'TK 454.2 Z48 2011', 'Advanced Electric Power Network Analysis', 2, 14, 0, 'First Edition', '2011-01-01', 'Singapore', '', 'New', '', '1 inch', 'power_net_analysis.jpg'),
('9789350141427', 'TK 454.2 S66 2015', 'Circuit Analysis and Synthesis', 52, 14, 0, 'First Edition', '2015-01-01', 'New Delhi', '', 'New', '', '1 inch', 'circ_analysis.jpg'),
('0130431346', 'TK 454 D42 1995', 'Linear Circuit Analysis: A Time Domain and Phasor Approach', 53, 14, 0, 'First Edition', '1995-01-01', 'New Jersey', '', 'New', '', '1 inch', 'linear_circ_analysis.jpg'),
('9780078028229', 'TK 454 A45 2017', 'Fundamentals of Electric Circuits', 29, 14, 0, 'Sixth Edition', '2017-01-01', 'New York', '', 'New', '', '1.5 inch', 'fundamentals.jpg'),
('9782940411771', 'TK 179 P73 2012', 'Composition', 40, 14, 24, 'Second Edition', '2012-01-01', 'Switzerland', '', 'New', '', '1 inch', 'composition.jpg'),
('9780080242125', 'TK 153 K8 1984', 'High Voltage Engineering: Fundamentals', 54, 14, 25, 'First Edition', '1984-01-01', 'New York', '', 'New', '', '1.5 inch', 'high_voltage.jpg'),
('9781259060779', 'TK 146 P44 2014', 'Electricity for the Trades', 29, 14, 0, 'Second Edition', '2014-01-01', 'New York', '', 'New', '', '1 inch', 'electricity4traDES.jpg'),
('9781305958531', 'TK 5103.2 O44 2014', 'Guide to Wireless Communication', 2, 14, 0, 'Fourth Edition', '2014-01-01', 'Singapore', '', 'New', '', '1.5 inch', 'sirkit.jpg'),
('9780071763950', 'TK 2514 H25 2011', 'Electric Motor Maintenance and Troubleshooting', 29, 14, 0, 'Second Edition', '2011-01-01', 'New York', '', 'New', '', '1 inch', 'ee.jpg'),
('9780849370274', 'TK 2313 E44 2013', 'Electric Machines: Modeling, Condition Monitoring, and Fault Diagnosis', 50, 14, 0, 'First Edition', '2013-01-01', 'Boca Raton, FL', '', '', '', '', 'em.jpg'),
('9781133628514', 'TK 2000 Z67 2015', 'Electric Machines: Principles, Applications, and Control Schematics', 2, 14, 0, 'Second Edition', '2015-01-01', 'Singapore', '', 'New', '', '1 inch', 'machineeeee.jpg'),
('8123905580', 'TK 1191 P64 2005', 'Power Plant Engineering', 55, 14, 0, 'First Edition', '2005-01-01', 'New Delhi', '', 'New', '', '2 inch', 'ppe.jpg'),
('9781292075983', 'TK 786.8 D5 F53 2015', 'Digital Fundamentals', 56, 14, 0, '11th Edition', '2015-01-01', 'New York', '', 'New', '', '1.5 inch', 'per.jpg'),
('9781498781633', 'TA 168 D52 2017', 'Engineering Systems Reliability, Safety and Maintenance: An Integrated Approach', 50, 14, 0, 'First Edition', '2017-01-01', 'Boca Raton, FL', '', 'New', '', '1 inch', 'Dhillon.jpg'),
('9780826934307', 'TA 165 K5 2010', 'Instrumentation', 57, 14, 0, 'Fifth Edition', '2010-01-01', 'Illinois', '', 'New', '', '2 inch', 'INSSS.jpg'),
('9781938549304', 'T 59.5 G87 2017', 'Industrial Automation and Robotics', 58, 14, 0, 'First Edition', '2017-01-01', 'Virginia', '', 'New', '', '2 inch', 'gupoo.jpg'),
('9382226659', 'S 21 H37 2013 ', 'Energy, Irrigation and Water Supply ', 59, 14, 0, 'First Edition', '2013-01-01', 'New Delhi', '', 'New', '', '1 inch', 'eene.jpg'),
('9781133960508', 'RM 216 T68 2014', 'Nutrition and Diet Therapy', 2, 14, 0, '11th Edition', '2014-01-01', 'Singapore', '', 'New', '', '1 inch', 'dieta.jpg'),
('9781118859094', 'RC 454 A24 2016', 'Abnormal Psychology: The Science and Treatment of Psychological Disorders', 20, 14, 0, '13th Edition', '2014-01-01', 'USA', '', 'New', '', '1 inch', 'ABNOY.jpg'),
('0387231803', 'QR 115 J3 2005', 'Modern Food Microbiology', 13, 14, 4, '7th Edition', '2005-01-01', 'USA', '', 'New', '', '2 inch', 'ff.jpg'),
('9789832559431', 'QC 355.2 B53 2016', 'Optics: An Introduction for Students of Engineering', 56, 14, 0, 'First Edition', '2016-01-01', 'India', '', 'New', '', '', 'op.jpg'),
('9780415714594', 'TA 654.5 178 2013', 'Wind Tunnel Testing of High-Rise Buildings: An Output of CTBUH Wind Engineering Working Group', 50, 14, 0, 'First Edition', '2013-01-01', 'New York', '', 'New', '', '0.5 inches', 'wind_tunnel.jpg'),
('9780470496619', 'TA 545 M17 2013', 'Surveying', 20, 14, 0, 'Sixth Edition', '2013-01-01', 'USA', '', 'New', '', '1 inch', 'surveying.jpg'),
('9781848212244', 'TA 455 P58 O65 2011', 'Organic Materials for Sustainable Construction', 20, 14, 0, 'First Edition', '2011-01-01', 'USA', '', 'New', '', '1.5 inch', 'organic_mats.jpg'),
('9781111988609', 'TA 403 J52 2015', 'Materials Science and Engineering Properties', 2, 14, 0, 'First Edition', '2015-01-01', 'Singapore', '', 'New', '', '1 inch', 'materials_science.jpg'),
('9780073398273', 'TA 357 W48 2016', 'Fluid Mechanics', 29, 14, 0, 'Eighth Edition', '2016-01-01', 'New York', '', 'New', '', '1.5 inch', 'fluid_mech.jpg'),
('9781482208795', 'TA 345 S31 2015', 'Computer Aided Design: A Conceptual Approach', 50, 14, 0, 'First Edition', '2015-01-01', 'Boca Raton, FL', '', 'New', '', '2 inch', 'comp_design.jpg'),
('9781133605157', 'TE 145 G35 2015', 'Traffic and Highway Engineering', 2, 14, 0, 'Fifth Edition', '2015-01-01', 'SIngapore', '', 'New', '', '2.5 inches', 'highway_engineeriong.jpg'),
('978140175173', 'TD 791 S65 2011 vol.', 'Solid Waste Technology and Management', 20, 14, 0, 'First Edition', '2011-01-01', 'New York', '', 'New', '', '1 inch', 'solid_waste_tech.jpg'),
('9781133593607', 'TA 1637 S66 2015', 'Image Processing, Analysis, and Machine Vision', 60, 14, 0, 'Fourth Edition', '2015-01-01', 'Toronto', '', 'New', '', '1.5 inch', 'image_process.jpg'),
('9780132859295', 'TA 83.2 L44 2014', 'Reinforced Concrete Design', 56, 14, 0, 'Eighth Edition', '2014-01-01', 'London', '', 'New', '', '0.5 inches', 'concrete_design.jpg'),
('9780415629126', 'TA 682.26 T68 2013', 'Construction Cost Management: Learning from Case Studies', 50, 14, 0, 'Second Edition', '2013-01-01', 'New York', '', 'New', '', '1 inch', 'construction_cost.jpg'),
('9780071432061', 'TH 151 T55 2005 c. 4', 'Time Saver Standards for Architectural Design: Technical Data for Professional Practice', 29, 14, 0, 'Eighth Edition', '2005-01-01', 'New York', '', 'New', '', '1.5 inch', 'acrshi_design.jpg'),
('9783895783227', 'TF 857 K54 2009', 'Contact Lines for Electric Railways: Planning, Design, Implementation, Maintenance', 61, 14, 0, 'Second Edition', '2009-01-01', 'Germany', '', 'New', '', '2 inch', 'contact_lines.jpg'),
('48540856R0028', 'TF 200 W4 1900', 'Railroad Construction - Theory and Practice - A Textbook for the Use of Students in Colleges and Tec', 20, 14, 0, 'First Edition', '2013-01-01', 'London', '', 'New', '', '1.5 inch', 'default.png'),
('9781409464631', 'TF 145 P76 2014', 'Railway Management and Engineering', 50, 14, 0, 'Fourth Edition', '2014-01-01', 'London', '', 'New', '', '1 inch', 'railway_managemnt.jpg'),
('9781860945151', 'TF 145 B66 2005', 'Practical Railway Engineering ', 62, 14, 0, 'Second Edition', '2005-01-01', 'London', '', 'New', '', '1 inch', 'practical_railway.jpg'),
('9781848062733', 'TD 899 C5885 A33 201', 'Dealing with Difficult Demolition Wastes: A Guide', 43, 14, 0, 'First Edition', '2013-01-01', 'Berkshire', '', 'New', '', '0.25 inches', 'demolition_waste.jpg'),
('9781610915656', 'TE 301 N38 2014', 'Urban Bikeway Design Guide/National Association of City Transportation Officials', 63, 14, 0, 'Second Edition', '2014-01-01', 'Washington', '', 'New', '', '0.5 inches', 'bikeway_design.jpg'),
('9781466575042', 'TH 483 D33 2014', 'Construction Program Management', 50, 14, 26, 'First Edition', '2014-01-01', 'New York', '', 'New', '', '0.5 inches', 'construction_management.jpg'),
('9780071801379', 'TH 438 R54 2013', 'Total Construction: Project Management', 29, 14, 0, 'Second Edition', '2013-01-01', 'USA', '', 'New', '', '1 inch', 'total_const.jpg'),
('9780415509862', 'TH 435 G66 2013', 'Introduction to Estimating for Construction', 50, 14, 0, 'First Edition', '2013-01-01', 'New York', '', 'New', '', '0.5 inches', 'estimating_const.jpg'),
('9782940496068', 'TH 267 D35 2014', 'The Fundamentals of Digital Photography', 9, 14, 27, 'First Edition', '2014-01-01', 'New York', '', 'New', '', '0.5 inches', 'digital_photo.jpg'),
('9781118090718', 'NA 2850 C45 2012', 'Interior Design Illustrated', 20, 14, 0, 'Third Edition', '2012-01-01', 'London', '', 'New', '', '1 inch', 'int_design_illust.jpg'),
('9780470402573', 'NA 200 C49 2011', 'A Global History of Architecture', 20, 14, 0, 'Second Edition', '2011-01-01', 'London', '', 'New', '', '2 inch', 'archi_history.jpg'),
('9783433031193', 'N 68 A43 2015', 'Analogous and Digital', 64, 14, 0, 'Second Edition', '2015-01-01', 'Berlin', '', 'New', '', '0.5 inches', 'analogius_and_digital.jpg'),
('9780132540742', 'LB 14.7 O96 2012', 'Philosophical Foundations of Education', 56, 14, 0, 'Ninth Edition', '2012-01-01', 'Indianapolis', '', 'New', '', '1 inch', 'foundations_of_educ.jpg'),
('9780128014776', 'HV 553 C69 2015', 'Introduction to International Disaster Management', 22, 14, 0, 'Third Edition', '2015-01-01', 'London', '', 'New', '', '1.5 inch', 'int_disaster_managemnt.jpg'),
('9781259251139', 'HM 251 M89 2017', 'Social Psychology', 29, 14, 0, 'Twelfth Edition', '2017-01-01', 'New York', '', 'New', '', '1.5 inch', 'social_psych.jpg');
-- --------------------------------------------------------
--
-- Table structure for table `bookauthor`
--
CREATE TABLE `bookauthor` (
`ISBN` varchar(13) NOT NULL,
`AuthorId` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bookauthor`
--
INSERT INTO `bookauthor` (`ISBN`, `AuthorId`) VALUES
('0684152967', 1),
('1305263642', 2),
('9780415661775', 3),
('1591581141', 4),
('9782888931638', 5),
('9781454703297', 8),
('9782940496532', 12),
('9782940496532', 11),
('9788183569248', 13),
('1418049652', 14),
('9780123820860', 15),
('9781441914774', 16),
('97811842973', 17),
('9789351118442', 18),
('978159474617', 19),
('9781466561557', 22),
('9781466561557', 21),
('9781466561557', 20),
('9781498732895', 23),
('9781466257993', 24),
('9780470444047', 28),
('9780470444047', 27),
('9780470444047', 26),
('9780470444047', 25),
('0849327229', 29),
('9781439808320', 30),
('9781848212121', 31),
('9781472533890', 32),
('9780831134921', 33),
('9780750645676', 34),
('9780831110217', 36),
('9780831110217', 35),
('9780968686027', 37),
('9781118134153', 38),
('0831130504', 39),
('9781609012403', 40),
('9781609019259', 41),
('9780857857675', 7),
('2940361207', 5),
('1111569010', 42),
('9781466566491', 43),
('9780857851789', 44),
('9781408171790', 45),
('9782940496112', 46),
('9781563678592', 47),
('9781472521903', 48),
('9780240525914', 49),
('9781408173794', 50),
('9781589236080', 51),
('9781845205928', 52),
('9781845204396', 53),
('9780071770187', 54),
('9781439834534', 55),
('0782129587', 56),
('9780124076822', 57),
('9780857094254', 58),
('9781466596771', 59),
('9780071827782', 60),
('9781259215986', 61),
('9780123850157', 63),
('9780071831314', 64),
('9781862392915', 65),
('9788189922658', 66),
('9878143989425', 67),
('9780081000366', 68),
('9781608456376', 69),
('9781118659182', 70),
('9780071289306', 71),
('1446302637', 72),
('9782940373857', 73),
('9782940411665', 74),
('1133597106', 75),
('9781619601994', 76),
('9780124114791', 77),
('9782940411054', 73),
('9782940411955', 73),
('0789723182', 78),
('9781133693253', 79),
('9782940411894', 80),
('9782940411405', 81),
('9780415615280', 82),
('9780415526777', 83),
('9781848062344', 84),
('9780071546010', 85),
('9780415690911', 86),
('9780470114216', 87),
('9781119055570', 88),
('9780415684064', 89),
('9780071625012', 90),
('1595540059', 92),
('9780073380193', 95),
('9780615654386', 91),
('9781627051378', 96),
('0849307759', 97),
('9781420082111', 97),
('9781466584341', 98),
('0872632075', 99),
('9780831131340', 100),
('9781482222166', 101),
('9789814253338', 102),
('9789350141427', 103),
('0130431346', 104),
('9780078028229', 105),
('9782940411771', 73),
('9780080242125', 106),
('9781259060779', 107),
('9781305958531', 108),
('9780071763950', 109),
('9780849370274', 110),
('9781133628514', 111),
('8123905580', 112),
('9781292075983', 113),
('9781498781633', 114),
('9780826934307', 115),
('9781938549304', 116),
('9382226659', 117),
('9781133960508', 118),
('9781118859094', 119),
('0387231803', 120),
('9789832559431', 121),
('9780415714594', 122),
('9780470496619', 123),
('9781848212244', 124),
('9781111988609', 125),
('9780073398273', 126),
('9781482208795', 127),
('9781133605157', 128),
('978140175173', 129),
('9781133593607', 130),
('9780132859295', 131),
('9780415629126', 132),
('9780071432061', 133),
('9783895783227', 134),
('48540856R0028', 135),
('9781409464631', 136),
('9781860945151', 137),
('9781848062733', 138),
('9781610915656', 139),
('9781466575042', 140),
('9780071801379', 141),
('9780415509862', 142),
('9782940496068', 143),
('9781118090718', 144),
('9780470402573', 145),
('9783433031193', 146),
('9780132540742', 147),
('9780128014776', 148),
('9781259251139', 149);
-- --------------------------------------------------------
--
-- Table structure for table `bookcatalogue`
--
CREATE TABLE `bookcatalogue` (
`AccessionNumber` varchar(7) NOT NULL,
`ISBN` varchar(13) NOT NULL,
`DateAcquired` date NOT NULL,
`AcquiredFrom` varchar(100) NOT NULL,
`Price` int(11) NOT NULL,
`Notes` text NOT NULL,
`IsRoomUseOnly` tinyint(1) NOT NULL,
`IsAvailable` tinyint(1) NOT NULL DEFAULT '1',
`IsActive` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bookcatalogue`
--
INSERT INTO `bookcatalogue` (`AccessionNumber`, `ISBN`, `DateAcquired`, `AcquiredFrom`, `Price`, `Notes`, `IsRoomUseOnly`, `IsAvailable`, `IsActive`) VALUES
('0000001', '0684152967', '2019-03-05', 'TUP Library', 0, '', 1, 1, 1),
('0000002', '1305263642', '2017-07-14', 'Sew Enterprises', 7000, '', 1, 1, 1),
('0000003', '9780415661775', '2016-09-27', 'New Century Books and General Mrchandise', 2750, '', 1, 1, 1),
('0000004', '1591581141', '2017-09-25', 'Sew Enterprises', 3250, '', 1, 1, 1),
('0000005', '9782888931638', '2017-09-25', 'Sew Enterprises', 4995, '', 1, 1, 1),
('0000006', '9781454703297', '2019-03-05', 'TUP Library', 0, '', 1, 1, 1),
('0000007', '9782940496532', '2017-07-14', 'Sew Enterprises', 4298, '', 1, 1, 1),
('0000008', '9788183569248', '2017-09-25', 'Sew Enterprises', 1800, '', 1, 1, 1),
('0000009', '1418049652', '2014-08-19', 'SERV Enterprises', 8349, '', 1, 1, 1),
('0000010', '9780123820860', '2016-09-27', 'New Century Books and General Merchandise', 5100, '', 1, 1, 1),
('0000011', '9781441914774', '2015-04-21', 'SERV Enterprises', 4500, '', 1, 1, 1),
('0000012', '97811842973', '2015-04-21', 'SERV Enterprises', 4125, '', 1, 1, 1),
('0000013', '9789351118442', '2017-09-25', 'Sew Enterprises', 3900, '', 1, 1, 1),
('0000014', '978159474617', '2017-07-14', 'Sew Enterprises', 1906, '', 1, 1, 1),
('0000015', '9781466561557', '2017-07-14', 'Sew Enterprises', 18413, '', 1, 1, 1),
('0000016', '9781498732895', '2017-07-14', 'Sew Enterprises', 12783, '', 1, 1, 1),
('0000017', '9781466257993', '2017-07-14', 'Sew Enterprises', 3678, '', 1, 1, 1),
('0000018', '9780470444047', '2017-07-14', 'Sew Enterprises', 18413, '', 1, 1, 1),
('0000019', '0849327229', '2006-09-19', '<NAME>', 0, '', 1, 1, 1),
('0000020', '9781439808320', '2017-07-14', 'Sew Enterprises', 4627, '', 1, 1, 1),
('0000021', '9781848212121', '2017-07-14', 'Sew Enterprises', 11052, '', 1, 1, 1),
('0000022', '9781472533890', '2017-07-14', 'Sew Enterprises', 5405, '', 1, 1, 1),
('0000023', '9780831134921', '2017-07-14', 'Sew Enterprises', 6110, '', 1, 1, 1),
('0000024', '9780750645676', '2017-07-14', 'Sew Enterprises', 13502, '', 1, 1, 1),
('0000025', '9780831110217', '2017-07-14', 'Sew Enterprises', 4421, '', 1, 1, 1),
('0000026', '9780968686027', '2017-07-14', 'Sew Enterprises', 13999, '', 1, 1, 1),
('0000027', '9781118134153', '2017-07-14', 'Sew Enterprises', 8484, '', 1, 1, 1),
('0000028', '0831130504', '2017-07-14', 'Sew Enterprises', 4231, '', 1, 1, 1),
('0000029', '9781609012403', '2017-07-14', 'Sew Enterprises', 7988, '', 1, 1, 1),
('0000030', '9781609019259', '2017-07-14', 'Sew Enterprises', 5155, '', 1, 1, 1),
('0000031', '9780857857675', '2019-03-06', 'Sew Enterprises', 8590, '', 1, 1, 1),
('0000032', '2940361207', '2017-07-14', 'Sew Enterprises', 5771, '', 1, 1, 1),
('0000033', '1111569010', '2019-03-06', 'Sew Enterprises', 19280, '', 1, 1, 1),
('0000034', '9781466566491', '2017-07-14', 'Sew Enterprises', 8590, '', 1, 1, 1),
('0000035', '9780857851789', '2017-07-14', 'Sew Enterprises', 4906, '', 1, 1, 1),
('0000036', '9781408171790', '2019-03-05', 'TUP Library', 0, '', 1, 1, 1),
('0000037', '9782940496112', '2019-03-06', 'TUP Library', 0, '', 1, 1, 1),
('0000038', '9781563678592', '2019-03-06', 'TUP Library', 0, '', 1, 1, 1),
('0000039', '9781472521903', '2017-07-14', 'Sew Enterprises', 4624, '', 1, 1, 1),
('0000040', '9780240525914', '2016-09-27', 'New Century General Merchandise', 2750, '', 1, 1, 1),
('0000041', '9781408173794', '2016-09-27', 'New Century Books and General Merchandise', 2990, '', 1, 1, 1),
('0000042', '9781589236080', '2017-07-14', 'Sew Enterprises', 5167, '', 1, 1, 1),
('0000043', '9781845205928', '2017-09-25', 'SERV Enterprises', 2900, '', 1, 1, 1),
('0000044', '9781845204396', '2017-09-25', 'SERV Enterprises', 3124, '', 1, 1, 1),
('0000045', '9780071770187', '2017-07-14', 'Sew Enterprises', 6115, '', 1, 1, 1),
('0000046', '9781439834534', '2011-12-14', 'SERV Enterprises', 4450, '', 1, 1, 1),
('0000047', '0782129587', '2017-07-14', 'Sew Enterprises', 7883, '', 1, 1, 1),
('0000048', '9780124076822', '2017-07-14', 'Sew Enterprises', 12228, '', 1, 1, 1),
('0000049', '9780857094254', '2017-07-14', 'Sew Enterprises', 30702, '', 1, 1, 1),
('0000050', '9781466596771', '2017-07-14', 'Sew Enterprises', 12610, '', 1, 1, 1),
('0000051', '9780071827782', '2017-07-14', 'Sew Enterprises', 2356, '', 1, 1, 1),
('0000052', '9781259215986', '2017-07-14', 'Sew Enterprises', 19150, '', 1, 1, 1),
('0000053', '9780123850157', '2017-07-14', 'Sew Enterprises', 11667, '', 1, 1, 1),
('0000054', '9780071831314', '2017-09-25', 'Sew Enterprises', 8665, '', 1, 1, 1),
('0000055', '9781862392915', '2017-07-14', 'Sew Enterprises', 7074, '', 1, 1, 1),
('0000056', '9788189922658', '2017-07-14', 'Sew Enterprises', 2495, '', 1, 1, 1),
('0000057', '9878143989425', '2017-07-14', 'Sew Enterprises', 13114, '', 1, 1, 1),
('0000058', '9780081000366', '2017-07-14', 'Sew Enterprises', 9211, '', 1, 1, 1),
('0000059', '9781608456376', '2017-09-25', 'Sew Enterprises', 3800, '', 1, 1, 1),
('0000060', '9781118659182', '2017-09-25', 'Sew Enterprises', 8230, '', 1, 1, 1),
('0000061', '9780071289306', '2017-07-14', 'Sew Enterprises', 4545, '', 1, 1, 1),
('0000062', '1446302637', '2017-07-14', 'Sew Enterprises', 0, '', 1, 1, 1),
('0000063', '9782940373857', '2017-07-14', 'TUP Library', 0, '', 1, 1, 1),
('0000064', '9782940411665', '2017-07-14', 'Sew Enterprises', 3377, '', 1, 1, 1),
('0000065', '1133597106', '2017-07-14', 'Sew Enterprises', 8264, '', 1, 1, 1),
('0000066', '9781619601994', '2017-07-14', 'Sew Enterprises', 15960, '', 1, 1, 1),
('0000067', '9780124114791', '2017-07-14', 'Sew Enterprises', 16452, '', 1, 1, 1),
('0000068', '9782940411054', '2019-03-07', 'TUP Library', 0, '', 1, 1, 1),
('0000069', '9782940411955', '2019-03-07', 'TUP Library', 0, '', 1, 1, 1),
('0000070', '0789723182', '2017-07-14', 'Sew Enterprises', 4295, '', 1, 1, 1),
('0000071', '9781133693253', '2017-07-14', 'Sew Enterprises', 7153, '', 1, 1, 1),
('0000072', '9782940411894', '2019-03-07', 'TUP Library', 0, '', 1, 1, 1),
('0000073', '9782940411405', '2019-03-07', 'TUP Library', 0, '', 1, 1, 1),
('0000074', '9780415615280', '2017-07-14', 'Sew Enterprises', 14157, '', 1, 1, 1),
('0000075', '9780415526777', '2017-07-14', 'Sew Enterprises', 5834, '', 1, 1, 1),
('0000076', '9781848062344', '2017-07-14', 'Sew Enterprises', 5551, '', 1, 1, 1),
('0000077', '9780071546010', '2011-02-14', 'SERV Enterprises', 4550, '', 1, 1, 1),
('0000078', '9780415690911', '2017-07-14', 'Sew Enterprises', 7976, '', 1, 1, 1),
('0000079', '9780470114216', '2009-09-09', 'A-Z Direct Marketing Incorporated', 4392, '', 1, 1, 1),
('0000080', '9781119055570', '2017-07-14', 'Sew Enterprises', 8590, '', 1, 1, 1),
('0000081', '9780415684064', '2017-07-14', 'Sew Enterprises', 9709, '', 1, 1, 1),
('0000082', '9780071625012', '2012-05-14', 'Emerald Headway Distributors, Incorporated', 4130, '', 1, 1, 1),
('0000083', '1595540059', '2019-03-09', 'TUP Library', 0, '', 1, 1, 1),
('0000084', '9780073380193', '2017-07-14', 'Sew Enterprises', 27011, '', 1, 1, 1),
('0000085', '9780073380193', '2017-07-14', 'Sew Enterprises', 2450, '', 1, 1, 1),
('0000086', '9780615654386', '2017-07-14', 'Sew Enterprises', 2450, '', 1, 1, 1),
('0000087', '9781627051378', '2017-07-25', 'Sew Enterprises', 4525, '', 1, 1, 1),
('0000088', '0849307759', '2016-09-27', 'New Century Books and General Merchandise', 9350, '', 1, 1, 1),
('0000089', '9781420082111', '2017-07-14', 'Sew Enterprises', 12274, '', 1, 1, 1),
('0000090', '9781466584341', '2017-07-14', 'Sew Enterprises', 18236, '', 1, 1, 1),
('0000091', '0872632075', '2017-07-14', 'Sew Enterprises', 6016, '', 1, 1, 1),
('0000092', '0872632075', '2015-04-21', 'SERV Enterprises', 3120, '', 1, 1, 1),
('`000009', '9780831131340', '2017-07-14', 'Sew Enterprises', 6392, '', 1, 1, 1),
('0000093', '9781482222166', '2017-07-14', 'Sew Enterprises', 18643, '', 1, 1, 1),
('0000094', '9789814253338', '2017-07-14', 'Sew Enterprises', 9576, '', 1, 1, 1),
('0000095', '9789350141427', '2017-09-25', 'Sew Enterprises', 1750, '', 1, 1, 1),
('0000096', '0130431346', '2017-07-14', 'Sew Enterprises', 12275, '', 1, 1, 1),
('0000097', '9780078028229', '2017-07-14', 'Sew Enterprises', 19641, '', 1, 1, 1),
('0000098', '9782940411771', '2019-03-18', 'TUP Library', 0, '', 1, 1, 1),
('0000099', '9780080242125', '2016-09-27', 'New Century Books and General Merchandise', 1790, '', 1, 1, 1),
('0000100', '9781259060779', '2017-07-14', 'Sew Enterprises', 15934, '', 1, 1, 1),
('0000101', '9781305958531', '2017-07-14', 'Sew Enterprises', 16860, '', 1, 1, 1),
('0000102', '9780071763950', '2017-07-14', 'Sew Enterprises', 4906, '', 1, 1, 1),
('0000103', '9780849370274', '2017-07-14', 'Sew Enterprises', 17584, '', 1, 1, 1),
('0000104', '9781133628514', '2017-07-14', 'Sew Enterprises', 11669, '', 1, 1, 1),
('0000105', '8123905580', '2016-09-27', 'New Century Books and General Merchandise', 2990, '', 1, 1, 1),
('0000106', '9781292075983', '2017-07-14', 'Sew Enterprises', 4421, '', 1, 1, 1),
('0000107', '9781498781633', '2017-07-14', 'Sew Enterprises', 15105, '', 1, 1, 1),
('0000108', '9780826934307', '2017-07-14', 'Sew Enterprises', 23026, '', 1, 1, 1),
('0000109', '9781938549304', '2017-07-14', 'Sew Enterprises', 12044, '', 1, 1, 1),
('0000110', '9382226659', '2016-09-27', 'New Century Books and General Merchandise', 4990, '', 1, 1, 1),
('0000111', '9781133960508', '2017-09-27', 'New Century Books and General Merchandise', 6990, '', 1, 1, 1),
('0000112', '9781118859094', '2017-07-14', 'Sew Enterprises', 12069, '', 1, 1, 1),
('0000113', '0387231803', '2016-09-27', 'New Century Books and General Merchandise', 6790, '', 1, 1, 1),
('0000114', '9789832559431', '2017-07-14', 'Sew Enterprises', 14002, '', 1, 1, 1),
('0000115', '9780415714594', '2017-07-14', 'Sew Enterprises', 3560, '', 1, 1, 1),
('0000116', '9780470496619', '2017-07-14', 'Sew Enterprises', 15961, '', 1, 1, 1),
('0000117', '9781848212244', '2019-03-18', 'New Century Books and General Merchandise', 13650, '', 1, 1, 1),
('0000118', '9781111988609', '2017-07-14', 'Sew Enterprises', 16985, '', 1, 1, 1),
('0000119', '9780073398273', '2017-07-14', 'Sew Enterprises', 6245, '', 1, 1, 1),
('0000120', '9781482208795', '2017-07-14', 'Sew Enterprises', 14480, '', 1, 1, 1),
('0000121', '9781133605157', '2017-07-14', 'Sew Enterprises', 20752, '', 1, 1, 1),
('0000122', '978140175173', '2016-09-27', 'New Century Books and General Merchandise', 17640, '', 1, 1, 1),
('0000123', '9781133593607', '2017-07-14', 'Sew Enterprises', 18413, '', 1, 1, 1),
('0000124', '9780132859295', '2016-09-27', 'New Century Books and General Merchandise', 14990, '', 1, 1, 1),
('0000125', '9780415629126', '2017-07-14', 'Sew Enterprises', 10929, '', 1, 1, 1),
('0000126', '9780071432061', '2016-09-27', 'New Century Books and General Merchandise', 8590, '', 1, 1, 1),
('0000127', '9783895783227', '2017-07-14', 'Sew Enterprises', 8483, '', 1, 1, 1),
('0000128', '48540856R0028', '2017-07-14', 'Sew Enterprises', 2449, '', 1, 1, 1),
('0000129', '9781409464631', '2017-07-14', 'Sew Enterprises', 15354, '', 1, 1, 1),
('0000130', '9781860945151', '2017-07-14', 'Sew Enterprises', 7982, '', 1, 1, 1),
('0000131', '9781848062733', '2017-07-14', 'Sew Enterprises', 6014, '', 1, 1, 1),
('0000132', '9781610915656', '2017-07-14', 'Sew Enterprises', 4703, '', 1, 1, 1),
('0000133', '9781466575042', '2017-07-14', 'Sew Enterprises', 7901, '', 1, 1, 1),
('0000134', '9780071801379', '2017-07-14', 'Sew Enterprises', 9209, '', 1, 1, 1),
('0000135', '9780415509862', '2017-07-14', 'Sew Enterprises', 17067, '', 1, 1, 1),
('0000136', '9782940496068', '2017-07-14', 'Sew Enterprises', 8709, '', 1, 1, 1),
('0000137', '9781118090718', '2017-07-14', 'Sew Enterprises', 5173, '', 1, 1, 1),
('0000138', '9780470402573', '2013-01-18', 'Emerald Headway Distributors Incorporated', 3950, '', 1, 1, 1),
('0000139', '9783433031193', '2017-09-25', 'Sew Enterprises', 2900, '', 1, 1, 1),
('0000140', '9780132540742', '2017-07-14', 'Sew Enterprises', 10836, '', 1, 1, 1),
('0000141', '9780128014776', '2017-07-14', 'Sew Enterprises', 9457, '', 1, 1, 1),
('0000142', '9781259251139', '2017-07-14', 'Sew Enterprises', 8436, '', 1, 1, 1);
-- --------------------------------------------------------
--
-- Table structure for table `bookstatus`
--
CREATE TABLE `bookstatus` (
`BookStatusId` int(11) NOT NULL,
`Name` varchar(30) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bookstatus`
--
INSERT INTO `bookstatus` (`BookStatusId`, `Name`) VALUES
(1, 'Issued'),
(2, 'Returned'),
(3, 'Damaged'),
(4, 'Lost');
-- --------------------------------------------------------
--
-- Table structure for table `booksubject`
--
CREATE TABLE `booksubject` (
`ISBN` varchar(13) NOT NULL,
`SubjectId` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `booksubject`
--
INSERT INTO `booksubject` (`ISBN`, `SubjectId`) VALUES
('0684152967', 19),
('1305263642', 32),
('9780415661775', 33),
('1591581141', 31),
('9782888931638', 29),
('9781454703297', 26),
('9781454703297', 25),
('9781454703297', 24),
('9782888931638', 28),
('9782888931638', 27),
('1591581141', 30),
('9780415661775', 32),
('9782940496532', 27),
('9788183569248', 34),
('1418049652', 35),
('9780123820860', 36),
('9781441914774', 37),
('97811842973', 38),
('9789351118442', 39),
('978159474617', 39),
('9781466561557', 40),
('9781498732895', 41),
('9781466257993', 42),
('9780470444047', 43),
('0849327229', 44),
('9781439808320', 45),
('9781848212121', 46),
('9781472533890', 47),
('9780831134921', 48),
('9780750645676', 49),
('9780831110217', 50),
('9780968686027', 51),
('9781118134153', 52),
('0831130504', 53),
('9781609012403', 54),
('9781609019259', 55),
('9780857857675', 56),
('2940361207', 57),
('1111569010', 58),
('9781466566491', 59),
('9780857851789', 60),
('9781408171790', 61),
('9782940496112', 62),
('9781563678592', 63),
('9781472521903', 64),
('9780240525914', 65),
('9781408173794', 66),
('9781589236080', 67),
('9781845205928', 68),
('9781845204396', 69),
('9780071770187', 70),
('9781439834534', 71),
('0782129587', 72),
('9780124076822', 73),
('9780857094254', 74),
('9781466596771', 75),
('9780071827782', 76),
('9781259215986', 22),
('9780123850157', 77),
('9780071831314', 78),
('9781862392915', 79),
('9788189922658', 80),
('9878143989425', 81),
('9780081000366', 82),
('9781608456376', 83),
('9781118659182', 84),
('9780071289306', 85),
('1446302637', 86),
('9782940373857', 87),
('9782940411665', 88),
('1133597106', 89),
('9781619601994', 90),
('9780124114791', 91),
('9782940411054', 92),
('9782940411955', 92),
('9782940411955', 93),
('0789723182', 89),
('0789723182', 94),
('9781133693253', 95),
('9782940411894', 96),
('9782940411405', 92),
('9782940411405', 97),
('9780415615280', 98),
('9780415526777', 98),
('9781848062344', 99),
('9780071546010', 100),
('9780415690911', 101),
('9780470114216', 102),
('9781119055570', 103),
('9780415684064', 101),
('9780415684064', 104),
('9780071625012', 101),
('1595540059', 61),
('9780073380193', 106),
('9780615654386', 105),
('9781627051378', 107),
('9781627051378', 108),
('0849307759', 58),
('9781420082111', 58),
('9781466584341', 109),
('0872632075', 111),
('0872632075', 110),
('9780831131340', 112),
('9781482222166', 113),
('9781482222166', 114),
('9789814253338', 115),
('9789350141427', 116),
('0130431346', 116),
('9780078028229', 116),
('9782940411771', 86),
('9780080242125', 117),
('9781259060779', 117),
('9781305958531', 118),
('9780071763950', 119),
('9780849370274', 120),
('9781133628514', 120),
('8123905580', 121),
('9781292075983', 122),
('9781498781633', 123),
('9780826934307', 124),
('9781938549304', 125),
('9382226659', 126),
('9781133960508', 127),
('9781118859094', 128),
('0387231803', 129),
('9789832559431', 130),
('9780415714594', 131),
('9780470496619', 132),
('9781848212244', 133),
('9781111988609', 134),
('9780073398273', 135),
('9781482208795', 136),
('9781133605157', 137),
('978140175173', 138),
('9781133593607', 139),
('9780132859295', 140),
('9780415629126', 141),
('9780071432061', 142),
('9783895783227', 143),
('48540856R0028', 144),
('9781409464631', 145),
('9781860945151', 145),
('9781848062733', 146),
('9781610915656', 147),
('9781466575042', 148),
('9780071801379', 149),
('9780415509862', 150),
('9782940496068', 92),
('9781118090718', 151),
('9780470402573', 152),
('9783433031193', 153),
('9780132540742', 154),
('9780128014776', 155),
('9781259251139', 156);
-- --------------------------------------------------------
--
-- Table structure for table `college`
--
CREATE TABLE `college` (
`CollegeId` int(11) NOT NULL,
`Name` varchar(20) NOT NULL,
`IsActive` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `college`
--
INSERT INTO `college` (`CollegeId`, `Name`, `IsActive`) VALUES
(1, 'COS', 1),
(2, 'CIT', 1),
(3, 'CAFA', 1),
(4, 'CLA', 1),
(5, 'CIE', 1),
(6, 'COE', 1);
-- --------------------------------------------------------
--
-- Table structure for table `course`
--
CREATE TABLE `course` (
`CourseId` int(11) NOT NULL,
`CollegeId` int(11) NOT NULL,
`Name` varchar(255) NOT NULL,
`IsActive` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `course`
--
INSERT INTO `course` (`CourseId`, `CollegeId`, `Name`, `IsActive`) VALUES
(1, 1, 'BS-IT', 1),
(2, 1, 'BS-CS', 1),
(5, 3, 'BT-IT', 1),
(6, 4, 'BS-IE', 1),
(7, 4, 'BS-ABM', 1),
(8, 3, 'BT-GAPT', 1),
(9, 2, 'BT-NFT', 1),
(10, 2, 'BS-HRM', 1),
(11, 2, 'BS-FT', 1),
(12, 2, 'BT-Mechatronics', 1),
(13, 2, 'BT-AFT', 1),
(14, 2, 'BT-AET', 1),
(15, 2, 'BT-CET', 1),
(16, 2, 'BT- CoET', 1),
(17, 2, 'BT- EET', 1),
(18, 2, 'BT-ECET', 1),
(19, 2, 'BT-EsET', 1),
(20, 2, 'BT-FET', 1),
(21, 2, 'BT-ICET', 1),
(22, 2, 'BT-MET', 1),
(23, 2, 'BT-PPET', 1),
(24, 2, 'BT-RACET', 1),
(25, 2, 'BT-TDET', 1),
(26, 2, 'BT-WET', 1),
(27, 2, 'BT-RET', 1),
(28, 6, 'BS-CE', 1),
(29, 6, 'BS-ECE', 1),
(30, 6, 'BS-EE', 1),
(31, 6, 'BS-ME', 1),
(32, 1, 'BS-IS', 1),
(33, 1, 'BAS-LT', 1),
(34, 1, 'BS-ES', 1),
(35, 3, 'GT/MT/MDT', 1),
(36, 3, 'PDDT', 1),
(37, 3, 'BFA', 1),
(38, 3, 'BSA', 1),
(39, 5, 'BSIE', 1);
-- --------------------------------------------------------
--
-- Table structure for table `librarian`
--
CREATE TABLE `librarian` (
`LibrarianId` int(11) NOT NULL,
`FirstName` varchar(50) NOT NULL,
`LastName` varchar(50) NOT NULL,
`Username` varchar(50) NOT NULL,
`Password` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `librarian`
--
INSERT INTO `librarian` (`LibrarianId`, `FirstName`, `LastName`, `Username`, `Password`) VALUES
(1, 'Johnrey', 'Bacal', 'admin', '<PASSWORD>'),
(2, '<NAME>', 'Sena', 'sena', 'sena'),
(3, 'Nathaniel', 'Piquero', 'nath', 'nath'),
(4, 'Circu', 'Lation', 'circu', 'circulation'),
(5, 'Tao', 'Manager', 'hr', 'hrhrhrhr');
-- --------------------------------------------------------
--
-- Table structure for table `librarianaccess`
--
CREATE TABLE `librarianaccess` (
`LibrarianId` int(11) NOT NULL,
`LibrarianRoleId` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `librarianaccess`
--
INSERT INTO `librarianaccess` (`LibrarianId`, `LibrarianRoleId`) VALUES
(1, 2),
(1, 1),
(1, 3),
(1, 4),
(1, 5),
(1, 6),
(4, 2),
(4, 1),
(4, 5),
(5, 6),
(5, 4),
(5, 3);
-- --------------------------------------------------------
--
-- Table structure for table `librarianrole`
--
CREATE TABLE `librarianrole` (
`LibrarianRoleId` int(11) NOT NULL,
`Name` varchar(50) NOT NULL,
`Description` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `librarianrole`
--
INSERT INTO `librarianrole` (`LibrarianRoleId`, `Name`, `Description`) VALUES
(1, 'Library', 'Access to library content'),
(2, 'Circulation', 'Access to library circulation'),
(3, 'Patron Management', 'Access to patron management'),
(4, 'Outside Researcher', 'Access to outside researcher'),
(5, 'University', 'Access to university'),
(6, 'Staff Management', 'Access to staff management');
-- --------------------------------------------------------
--
-- Table structure for table `loan`
--
CREATE TABLE `loan` (
`LoanId` int(11) NOT NULL,
`PatronId` int(11) NOT NULL,
`AccessionNumber` int(11) NOT NULL,
`DateBorrowed` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`DateDue` datetime NOT NULL,
`DateReturned` datetime DEFAULT NULL,
`AmountPayed` int(11) DEFAULT NULL,
`BookStatusId` int(11) NOT NULL,
`IsRecalled` tinyint(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `marcimport`
--
CREATE TABLE `marcimport` (
`MarcImportId` int(11) NOT NULL,
`ISBN` varchar(13) NOT NULL,
`Title` varchar(255) NOT NULL,
`CallNumber` varchar(50) NOT NULL,
`Author` varchar(100) NOT NULL,
`Series` varchar(100) NOT NULL,
`Publisher` varchar(100) NOT NULL,
`YearPublished` varchar(10) NOT NULL,
`PlaceOfPublication` varchar(100) NOT NULL,
`Extent` varchar(100) NOT NULL,
`Other` varchar(100) NOT NULL,
`Size` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `marcimport`
--
INSERT INTO `marcimport` (`MarcImportId`, `ISBN`, `Title`, `CallNumber`, `Author`, `Series`, `Publisher`, `YearPublished`, `PlaceOfPublication`, `Extent`, `Other`, `Size`) VALUES
(157, '0439139597', '<NAME> and the goblet of fire /', 'PZ7.R79835', '<NAME>.', '', 'Arthur A. Levine Books,', 'c2000.', 'New York :', 'xi, 734 p. :', 'ill. ;', '24 cm.');
-- --------------------------------------------------------
--
-- Table structure for table `message`
--
CREATE TABLE `message` (
`MessageId` int(11) NOT NULL,
`PatronId` int(11) NOT NULL,
`Title` varchar(50) NOT NULL,
`Message` text NOT NULL,
`DateTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `outsideresearcher`
--
CREATE TABLE `outsideresearcher` (
`OutsideResearcherId` int(11) NOT NULL,
`Name` varchar(100) NOT NULL,
`DateTime` datetime NOT NULL,
`AmountPayed` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `outsideresearchersubject`
--
CREATE TABLE `outsideresearchersubject` (
`OutsideResearcherId` int(11) NOT NULL,
`SubjectId` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `patron`
--
CREATE TABLE `patron` (
`PatronId` int(11) NOT NULL,
`PatronTypeId` int(11) NOT NULL,
`FirstName` varchar(50) NOT NULL,
`MiddleName` varchar(50) NOT NULL,
`LastName` varchar(50) NOT NULL,
`ExtensionName` varchar(20) DEFAULT NULL,
`IdNumber` varchar(50) NOT NULL,
`RFIDNo` int(11) NOT NULL,
`Password` varchar(50) NOT NULL,
`ContactNumber` varchar(20) NOT NULL,
`Email` varchar(50) NOT NULL,
`DateCreated` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `patron`
--
INSERT INTO `patron` (`PatronId`, `PatronTypeId`, `FirstName`, `MiddleName`, `LastName`, `ExtensionName`, `IdNumber`, `RFIDNo`, `Password`, `ContactNumber`, `Email`, `DateCreated`) VALUES
(1, 1, 'Johnrey', 'Cumayas', 'Bacal', 'PhD', '15-037-017', 1, '12345678', '+639977011062', '<EMAIL>', '2018-11-08'),
(2, 1, '<NAME>', 'Lumbria', 'Sena', '', '15-037-027', 12123123, '12345678', '+639966367165', '<EMAIL>', '2018-11-09'),
(3, 1, '<NAME>', 'Alano', 'Piquero', '', '15-037-032', 15037032, '12345678', '+639925847682', '<EMAIL>', '2018-11-09'),
(4, 1, '<NAME>', 'Requina', 'Laconico', '', '16-211-067', 16211067, '12345678', '+639277706965', '<EMAIL>', '2019-03-05'),
(5, 1, '<NAME>', 'Lainez', 'Danganan', '', '16-211-149', 16211149, '12345678', '+639667128527', '<EMAIL>', '2019-03-05');
-- --------------------------------------------------------
--
-- Table structure for table `patrontype`
--
CREATE TABLE `patrontype` (
`PatronTypeId` int(11) NOT NULL,
`Name` varchar(50) NOT NULL,
`NumberOfBooks` int(11) NOT NULL,
`NumberOfDays` int(11) NOT NULL,
`IsActive` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `patrontype`
--
INSERT INTO `patrontype` (`PatronTypeId`, `Name`, `NumberOfBooks`, `NumberOfDays`, `IsActive`) VALUES
(1, 'Student', 1, 1, 1),
(2, 'Faculty Employee', 10, 7, 1),
(3, 'Admin', 20, 7, 1);
-- --------------------------------------------------------
--
-- Table structure for table `penalty`
--
CREATE TABLE `penalty` (
`PenaltyId` int(11) NOT NULL,
`PatronId` int(11) NOT NULL,
`LoanId` int(11) NOT NULL,
`Status` tinyint(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `publisher`
--
CREATE TABLE `publisher` (
`PublisherId` int(11) NOT NULL,
`Name` varchar(255) NOT NULL,
`IsActive` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `publisher`
--
INSERT INTO `publisher` (`PublisherId`, `Name`, `IsActive`) VALUES
(1, '<NAME>', 1),
(2, 'Cengage Learning', 1),
(3, 'Focal Press', 1),
(4, 'Libraries Unlimited', 1),
(5, 'Rotovision', 1),
(6, 'Lark', 1),
(7, 'Lark Crafts', 1),
(8, 'Roto Vision', 1),
(9, 'Bloomsbury', 1),
(10, 'Discovery Publication House', 1),
(11, 'Delmar, Cengage Learning', 1),
(12, 'Academic Press', 1),
(13, 'Springer', 1),
(14, 'Wiley', 1),
(15, 'Random Publications', 1),
(16, 'Quirck Books', 1),
(17, 'CRC Press', 1),
(18, 'Charlestone', 1),
(19, 'CreateSpace Independent Publishing Platform', 1),
(20, 'John Wiley&Sons Inc.', 1),
(21, 'Industrial Press', 1),
(22, '<NAME>', 1),
(23, 'London Logic Design Publishing', 1),
(24, 'Logic Design Publishing', 1),
(25, 'Fairchild Books', 1),
(26, 'Creative Publishing International', 1),
(27, '<NAME>', 1),
(28, 'Berg', 1),
(29, 'The McGraw-Hill Companies', 1),
(30, 'SYBEX', 1),
(31, 'Elsivier', 0),
(32, 'Woodhead Publishing Limited', 1),
(33, 'The Geological Society', 1),
(34, 'Venus Books', 1),
(35, 'Elsevier', 1),
(36, 'Morgan & Claypool Publishers ', 1),
(37, '<NAME>', 1),
(38, 'ABA Publication', 1),
(39, 'The Goodheart-Wilcox Company Inc.', 1),
(40, 'AVA Publishing', 1),
(41, 'Que Publishing', 1),
(42, 'Routledge', 1),
(43, 'IHS BRE Publications', 1),
(44, '<NAME>', 1),
(45, 'WestBow Press,', 1),
(46, 'WestBow Press,', 1),
(47, 'WestBow Press,', 1),
(48, '<NAME>,', 1),
(49, '<NAME>', 1),
(50, 'Taylor&Francis Group', 1),
(51, 'Society of Manufacturing Engineers', 1),
(52, '<NAME>', 1),
(53, 'Prentice Hall', 1),
(54, 'Pergamon Press', 1),
(55, 'CBS Publishers ', 1),
(56, 'Pearson', 1),
(57, 'American Technical Publishers', 1),
(58, 'Mercury Learning and Information', 1),
(59, 'Random Exports ', 1),
(60, 'Thompson Learning', 1),
(61, 'Publicis Publishing', 1),
(62, 'Imperial College Press', 1),
(63, 'Island Press', 1),
(64, 'Ernst & Sohn', 1);
-- --------------------------------------------------------
--
-- Table structure for table `reservation`
--
CREATE TABLE `reservation` (
`ReservationId` int(11) NOT NULL,
`PatronId` int(11) NOT NULL,
`AccessionNumber` int(11) NOT NULL,
`DateReserved` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`Expiration` varchar(30) NOT NULL,
`IsDiscarded` tinyint(1) NOT NULL,
`IsActive` tinyint(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `reservation`
--
INSERT INTO `reservation` (`ReservationId`, `PatronId`, `AccessionNumber`, `DateReserved`, `Expiration`, `IsDiscarded`, `IsActive`) VALUES
(1, 1, 1, '2019-03-06 00:34:42', '2019-03-05 05:34:42pm', 1, 0),
(2, 1, 2, '2019-03-06 00:40:11', '2019-03-05 17:40:11', 1, 0),
(3, 1, 3, '2019-03-06 00:56:53', '2019-03-06 00:56:53', 1, 0),
(4, 1, 4, '2019-03-06 01:03:40', '2019-03-07 01:03:40', 0, 0),
(5, 1, 5, '2019-03-06 01:25:20', '2019-03-07 01:25:20', 1, 0),
(6, 1, 6, '2019-03-06 01:39:40', '2019-03-07 01:39:40', 0, 0),
(7, 1, 7, '2019-03-06 02:18:48', '2019-03-07 02:18:48', 0, 0),
(8, 1, 8, '2019-03-06 03:41:18', '2019-03-07 03:41:18', 0, 0),
(9, 1, 9, '2019-03-06 04:22:28', '2019-03-06 05:49:11', 1, 0),
(10, 3, 10, '2019-03-06 05:13:03', '2019-03-07 05:13:03', 1, 0);
-- --------------------------------------------------------
--
-- Table structure for table `section`
--
CREATE TABLE `section` (
`SectionId` int(11) NOT NULL,
`Name` varchar(255) NOT NULL,
`IsActive` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `section`
--
INSERT INTO `section` (`SectionId`, `Name`, `IsActive`) VALUES
(1, 'Filipinana', 1),
(2, 'Thesis', 1),
(3, 'Fiction', 1),
(10, 'Section', 0),
(11, 'Handcrafts', 1),
(12, 'Multimedia', 1),
(13, 'Electronics', 1),
(14, 'New Arrival', 1);
-- --------------------------------------------------------
--
-- Table structure for table `series`
--
CREATE TABLE `series` (
`SeriesId` int(11) NOT NULL,
`Name` varchar(255) NOT NULL,
`IsActive` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `series`
--
INSERT INTO `series` (`SeriesId`, `Name`, `IsActive`) VALUES
(1, 'Typography', 1),
(2, 'Basics design', 1),
(3, 'Food Science and Technology, International Series', 1),
(4, 'Food Science Text Series', 1),
(5, 'Engineering and Management Innovation', 1),
(6, 'Control Systems, Roboptics and Manufacturing Series', 1),
(7, 'Control Systems, Robotics and Manufacturing Series', 1),
(8, 'Woodhead Publishing Series in Electronic and Optical Materials: No.36', 1),
(9, 'Geological Society Special Publication: No.333', 1),
(10, 'Synthesis Lectures in Computer Architecture: #22', 1),
(11, 'Basics Photography: 06', 1),
(12, 'Basics Creative Photography: 03', 1),
(13, 'Food Science and Technology International Series', 1),
(14, 'Basics Photography: 02', 1),
(15, 'basics Photography: 07', 1),
(16, 'Basics Creative Photography', 1),
(17, 'Basics Creative Photography: 02', 1),
(18, 'McGraw Hills GreenSource Series', 1),
(19, 'Wiley Book of Sustainable Design', 1),
(20, 'Innovation in the Built Environment', 1),
(21, 'Synthesis Lectures on Digital Circuits and Systems', 1),
(22, 'Mechanical Engineering Series', 1),
(23, 'Manufacturing Design and Technology', 1),
(24, 'Basics Photography 01', 1),
(25, 'Applied Electricity and Electronics', 1),
(26, 'Best Practices and Advances in Program Management Series ', 1),
(27, 'Fundamentals of Educational Planning', 1);
-- --------------------------------------------------------
--
-- Table structure for table `studentcourse`
--
CREATE TABLE `studentcourse` (
`PatronId` int(11) NOT NULL,
`CourseId` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `studentcourse`
--
INSERT INTO `studentcourse` (`PatronId`, `CourseId`) VALUES
(1, 1),
(2, 1),
(3, 36),
(4, 1),
(5, 1);
-- --------------------------------------------------------
--
-- Table structure for table `subject`
--
CREATE TABLE `subject` (
`SubjectId` int(11) NOT NULL,
`Name` varchar(255) NOT NULL,
`IsActive` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `subject`
--
INSERT INTO `subject` (`SubjectId`, `Name`, `IsActive`) VALUES
(1, 'Web Development', 1),
(11, 'Mathematics', 1),
(14, 'Economics: Land Reform', 1),
(15, 'Retorika', 1),
(16, 'C++', 1),
(17, 'C#', 1),
(18, 'Anime', 1),
(19, 'Economics', 1),
(20, 'Multimedia', 1),
(21, 'Web Design', 1),
(22, 'Electronics', 1),
(23, 'Printing', 1),
(24, 'Printmaking', 1),
(25, 'CRAFTS & HOBBIES', 1),
(26, 'Letterpress printing', 1),
(27, 'Graphic Design-Typography', 1),
(28, 'Letterpress Printing-Specimens', 1),
(29, 'Printing-Style Manual', 1),
(30, 'Electronic Information resources-management', 1),
(31, 'Libraries-Special collections-Electronic information resources', 1),
(32, 'Adobe inDesign (Electronic resource)', 1),
(33, 'Desktop Publishing', 1),
(34, 'Hotels-Planning', 1),
(35, 'International Cooking', 1),
(36, 'Food-Sensory Evaluation', 1),
(37, 'Food Analysis', 1),
(38, 'Food Service', 1),
(39, 'Home Economics', 1),
(40, 'Manufacturing Processes-Mathematical Models', 1),
(41, 'Plant Layout', 1),
(42, 'Floor Plan', 1),
(43, 'Factories-Design and Construction', 1),
(44, 'Environmental Engineering', 1),
(45, 'Business and Economics', 1),
(46, 'Production Management-Environmental Aspects', 1),
(47, 'Landscape Photography', 1),
(48, 'Sheet-Metal Work', 1),
(49, 'Founding', 1),
(50, 'Welding', 1),
(51, 'Robotics', 1),
(52, 'Packaging Design', 1),
(53, 'Manufacturing Processes', 1),
(54, 'Dressmaking-Pattern Design', 1),
(55, 'Dressmaking', 1),
(56, 'Typography', 1),
(57, 'Letterpress-Printing', 1),
(58, 'Mechatronics', 1),
(59, 'Industrial Fabrics', 1),
(60, 'Video Art-History', 1),
(61, 'Graphic Arts', 1),
(62, 'Commercial Art-Data Processing', 1),
(63, 'Color in Design', 1),
(64, 'Stop-motion Animation Films', 1),
(65, 'Adobe Flash CC', 1),
(66, 'Three-dimensional printing', 1),
(67, 'Dressmaking-Pattern Design-Pictorial Works', 1),
(68, 'Knitting', 1),
(69, 'Felt Work', 1),
(70, 'Troubleshooting and Repairs', 1),
(71, 'Web Services', 1),
(72, 'Networking-Cabling', 1),
(73, 'Digital Communications', 1),
(74, 'Operational Amplifiers', 1),
(75, 'Electronic Measurements', 1),
(76, 'Electronics-Charts Diagrams etc.', 1),
(77, 'Biotechnology', 1),
(78, 'Chemical Engineering', 1),
(79, 'Historical Monuments', 1),
(80, 'Petroleum Engineering', 1),
(81, 'Automobiles-Design and Construction', 1),
(82, 'Automobile-Dynamics', 1),
(83, 'Electric Power System Stability', 1),
(84, 'Verilog (Computer Hardware Description Language)', 1),
(85, 'Power Electronics', 1),
(86, 'Composition (Photography)', 1),
(87, 'Black and White Photography', 1),
(88, 'Photography Digital Techniques', 1),
(89, 'Adobe Photoshop', 1),
(90, 'Refrigeration and Airconditioning', 1),
(91, 'Food Industry and Trade-Technological innovations', 1),
(92, 'Photography', 1),
(93, 'Photography-Lighting', 1),
(94, 'Photography-Retouching', 1),
(95, 'Adobe Illustrator', 1),
(96, 'Photographic Criticism', 1),
(97, 'Photography-Philosophy', 1),
(98, 'Ecological Houses-Design and Construction', 1),
(99, 'Exterior Insulation and Finish System, Fire Prevention', 1),
(100, 'Sustainable Buildings-Design and Constuction', 1),
(101, 'Sustainable Construction ', 1),
(102, 'Sustainable Buildings-Design and Construction', 1),
(103, 'Roofs, Sustainable Construction', 1),
(104, 'Sustainable Buildings', 1),
(105, 'Programmable Controllers', 1),
(106, 'Combustion Engineering', 1),
(107, 'BeagleBone (Computer)', 1),
(108, 'Microcontroller', 1),
(109, 'Drilling and Boring Machinery', 1),
(110, 'Jigs and Fixtures', 1),
(111, 'Gages', 1),
(112, 'Machine Tools', 1),
(113, 'Factories Heating and Ventilation', 1),
(114, 'Dust Control', 1),
(115, 'Electric Network', 1),
(116, 'Electric Circuit Analysis', 1),
(117, 'Electrical Engineering', 1),
(118, 'wireless communication systems', 1),
(119, 'Electric motors-Maintenance and Repair', 1),
(120, 'Electric Machinery-Reliability', 1),
(121, 'Electric power-plants-Design and Constructuion', 1),
(122, 'Digital Electronics', 1),
(123, 'Engineering Systems', 1),
(124, 'Engineering Instruments', 1),
(125, 'Robotics, Industrial', 1),
(126, 'Irrigation-Management', 1),
(127, 'Diet Therapy', 1),
(128, 'Psychology', 1),
(129, 'Food Microbiology', 1),
(130, 'optics ', 1),
(131, 'Tall Buildings Aerodynamics', 1),
(132, 'Surveying', 1),
(133, 'Building Materials', 1),
(134, 'Materials Science-Textbooks', 1),
(135, 'Fluid Mechanics', 1),
(136, 'Computer Aided Design', 1),
(137, 'Highway Engineering', 1),
(138, 'Refuse and Refuse Disposal', 1),
(139, 'Image Processing', 1),
(140, 'Reinforced Concrete', 1),
(141, 'Construction Industry Costs', 1),
(142, 'Architectural Design-Handbooks', 1),
(143, 'Electric Railroads-Design and Construction', 1),
(144, 'Railroads-Design and Construction', 1),
(145, 'Railroad Engineering', 1),
(146, 'Demolition Wastes', 1),
(147, 'Traffic Engineering - United States', 1),
(148, 'Construction Industry Management', 1),
(149, 'Construction Projects-Management', 1),
(150, 'Building Estimates', 1),
(151, 'Interior Architecture', 1),
(152, 'Architecture-History', 1),
(153, 'Art-Philosophy', 1),
(154, 'Education-Philosophy-History', 1),
(155, 'Disaster Relief-International Cooperation', 1),
(156, 'Social Psychology', 1);
-- --------------------------------------------------------
--
-- Table structure for table `subjectcourse`
--
CREATE TABLE `subjectcourse` (
`SubjectId` int(11) NOT NULL,
`CourseId` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `subjectcourse`
--
INSERT INTO `subjectcourse` (`SubjectId`, `CourseId`) VALUES
(1, 1),
(1, 2),
(15, 6),
(14, 2),
(11, 5),
(16, 1),
(17, 1),
(18, 1),
(19, 6),
(20, 1),
(21, 1),
(22, 5),
(23, 8),
(24, 8),
(25, 8),
(26, 8),
(27, 8),
(28, 8),
(29, 8),
(30, 5),
(31, 5),
(32, 1),
(33, 1),
(34, 10),
(35, 9),
(35, 10),
(35, 11),
(36, 9),
(36, 10),
(36, 11),
(37, 9),
(37, 10),
(37, 11),
(38, 9),
(38, 10),
(38, 11),
(39, 9),
(39, 10),
(39, 11),
(40, 20),
(40, 21),
(41, 38),
(42, 38),
(43, 15),
(44, 34),
(45, 14),
(45, 22),
(46, 34),
(47, 35),
(47, 36),
(47, 37),
(48, 12),
(48, 22),
(48, 26),
(48, 31),
(49, 12),
(49, 22),
(49, 26),
(50, 26),
(51, 1),
(51, 2),
(51, 5),
(51, 12),
(52, 38),
(53, 22),
(53, 31),
(54, 13),
(55, 13),
(56, 8),
(57, 8),
(57, 37),
(58, 12),
(58, 22),
(58, 31),
(59, 13),
(60, 8),
(60, 37),
(61, 8),
(61, 37),
(62, 8),
(62, 37),
(63, 8),
(63, 37),
(64, 8),
(64, 37),
(65, 8),
(65, 35),
(65, 37),
(66, 5),
(66, 8),
(67, 13),
(68, 13),
(69, 13),
(70, 5),
(70, 17),
(70, 18),
(70, 19),
(71, 1),
(71, 2),
(71, 5),
(71, 29),
(72, 1),
(72, 2),
(72, 5),
(72, 18),
(72, 19),
(73, 1),
(73, 2),
(73, 5),
(73, 16),
(73, 18),
(73, 19),
(74, 1),
(74, 2),
(74, 5),
(74, 16),
(74, 18),
(74, 19),
(75, 1),
(75, 2),
(75, 5),
(75, 12),
(75, 16),
(75, 17),
(75, 18),
(75, 19),
(75, 21),
(76, 1),
(76, 2),
(76, 5),
(76, 12),
(76, 16),
(76, 18),
(76, 19),
(77, 34),
(78, 33),
(78, 34),
(79, 33),
(79, 34),
(80, 33),
(80, 34),
(81, 14),
(82, 14),
(83, 1),
(83, 5),
(83, 16),
(83, 18),
(83, 19),
(83, 21),
(83, 29),
(84, 1),
(84, 5),
(84, 16),
(84, 17),
(84, 18),
(84, 19),
(85, 1),
(85, 2),
(85, 5),
(85, 16),
(85, 18),
(85, 19),
(86, 8),
(86, 35),
(86, 37),
(87, 8),
(87, 35),
(87, 37),
(88, 8),
(88, 35),
(88, 37),
(89, 1),
(89, 2),
(89, 8),
(89, 35),
(89, 37),
(90, 24),
(91, 9),
(91, 11),
(91, 13),
(92, 8),
(92, 35),
(92, 37),
(93, 8),
(93, 35),
(93, 37),
(94, 8),
(94, 35),
(94, 37),
(95, 8),
(95, 35),
(95, 37),
(96, 8),
(96, 35),
(96, 37),
(97, 8),
(97, 35),
(97, 37),
(98, 38),
(99, 34),
(99, 38),
(100, 15),
(100, 28),
(100, 34),
(101, 15),
(101, 28),
(101, 38),
(102, 15),
(102, 16),
(102, 28),
(102, 38),
(103, 15),
(103, 28),
(103, 38),
(104, 15),
(104, 28),
(104, 34),
(104, 38),
(105, 1),
(105, 2),
(105, 5),
(105, 12),
(105, 16),
(105, 18),
(105, 19),
(105, 29),
(106, 34),
(107, 1),
(107, 2),
(107, 5),
(107, 16),
(107, 17),
(107, 18),
(107, 19),
(108, 1),
(108, 2),
(108, 5),
(108, 12),
(108, 16),
(108, 28),
(108, 29),
(108, 30),
(109, 22),
(109, 26),
(110, 22),
(111, 22),
(111, 31),
(112, 22),
(112, 31),
(113, 15),
(113, 34),
(114, 15),
(114, 21),
(114, 33),
(114, 34),
(115, 5),
(115, 15),
(115, 16),
(115, 17),
(115, 18),
(115, 19),
(115, 29),
(116, 5),
(116, 16),
(116, 17),
(116, 18),
(116, 19),
(116, 29),
(116, 30),
(117, 5),
(117, 16),
(117, 17),
(117, 18),
(117, 19),
(117, 29),
(117, 30),
(118, 1),
(118, 2),
(118, 5),
(118, 16),
(118, 17),
(118, 18),
(118, 19),
(118, 29),
(118, 30),
(119, 17),
(119, 30),
(120, 12),
(120, 14),
(120, 22),
(120, 23),
(121, 23),
(122, 1),
(122, 2),
(122, 5),
(122, 16),
(122, 17),
(122, 18),
(122, 19),
(122, 29),
(122, 30),
(123, 28),
(123, 29),
(123, 30),
(123, 31),
(124, 28),
(124, 29),
(124, 30),
(124, 31),
(125, 5),
(125, 12),
(125, 16),
(125, 18),
(125, 19),
(126, 33),
(126, 34),
(127, 9),
(127, 10),
(128, 6),
(128, 39),
(129, 9),
(129, 10),
(130, 14),
(130, 15),
(130, 16),
(130, 17),
(130, 18),
(130, 19),
(130, 20),
(130, 21),
(130, 22),
(130, 23),
(130, 24),
(130, 25),
(130, 26),
(130, 27),
(130, 28),
(130, 29),
(130, 30),
(130, 31),
(131, 15),
(131, 28),
(131, 38),
(132, 15),
(132, 28),
(133, 15),
(133, 28),
(134, 15),
(134, 28),
(135, 22),
(135, 31),
(136, 1),
(136, 2),
(136, 5),
(136, 16),
(136, 19),
(136, 32),
(137, 27),
(138, 33),
(138, 34),
(139, 8),
(139, 35),
(139, 37),
(140, 15),
(140, 28),
(141, 15),
(141, 28),
(142, 38),
(143, 27),
(144, 27),
(145, 27),
(146, 15),
(146, 28),
(147, 27),
(148, 15),
(148, 28),
(149, 15),
(149, 28),
(150, 15),
(150, 28),
(151, 38),
(152, 38),
(153, 8),
(153, 35),
(153, 37),
(153, 38),
(154, 6),
(154, 39),
(155, 34),
(156, 6),
(156, 39);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `admission`
--
ALTER TABLE `admission`
ADD PRIMARY KEY (`AdmissionId`);
--
-- Indexes for table `author`
--
ALTER TABLE `author`
ADD PRIMARY KEY (`AuthorId`);
--
-- Indexes for table `book`
--
ALTER TABLE `book`
ADD PRIMARY KEY (`ISBN`);
--
-- Indexes for table `bookcatalogue`
--
ALTER TABLE `bookcatalogue`
ADD PRIMARY KEY (`AccessionNumber`);
--
-- Indexes for table `bookstatus`
--
ALTER TABLE `bookstatus`
ADD PRIMARY KEY (`BookStatusId`);
--
-- Indexes for table `college`
--
ALTER TABLE `college`
ADD PRIMARY KEY (`CollegeId`);
--
-- Indexes for table `course`
--
ALTER TABLE `course`
ADD PRIMARY KEY (`CourseId`);
--
-- Indexes for table `librarian`
--
ALTER TABLE `librarian`
ADD PRIMARY KEY (`LibrarianId`);
--
-- Indexes for table `librarianrole`
--
ALTER TABLE `librarianrole`
ADD PRIMARY KEY (`LibrarianRoleId`);
--
-- Indexes for table `loan`
--
ALTER TABLE `loan`
ADD PRIMARY KEY (`LoanId`);
--
-- Indexes for table `marcimport`
--
ALTER TABLE `marcimport`
ADD PRIMARY KEY (`MarcImportId`);
--
-- Indexes for table `message`
--
ALTER TABLE `message`
ADD PRIMARY KEY (`MessageId`);
--
-- Indexes for table `outsideresearcher`
--
ALTER TABLE `outsideresearcher`
ADD PRIMARY KEY (`OutsideResearcherId`);
--
-- Indexes for table `patron`
--
ALTER TABLE `patron`
ADD PRIMARY KEY (`PatronId`);
--
-- Indexes for table `patrontype`
--
ALTER TABLE `patrontype`
ADD PRIMARY KEY (`PatronTypeId`);
--
-- Indexes for table `penalty`
--
ALTER TABLE `penalty`
ADD PRIMARY KEY (`PenaltyId`);
--
-- Indexes for table `publisher`
--
ALTER TABLE `publisher`
ADD PRIMARY KEY (`PublisherId`);
--
-- Indexes for table `reservation`
--
ALTER TABLE `reservation`
ADD PRIMARY KEY (`ReservationId`);
--
-- Indexes for table `section`
--
ALTER TABLE `section`
ADD PRIMARY KEY (`SectionId`);
--
-- Indexes for table `series`
--
ALTER TABLE `series`
ADD PRIMARY KEY (`SeriesId`);
--
-- Indexes for table `subject`
--
ALTER TABLE `subject`
ADD PRIMARY KEY (`SubjectId`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `admission`
--
ALTER TABLE `admission`
MODIFY `AdmissionId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `author`
--
ALTER TABLE `author`
MODIFY `AuthorId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=95;
--
-- AUTO_INCREMENT for table `bookstatus`
--
ALTER TABLE `bookstatus`
MODIFY `BookStatusId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `college`
--
ALTER TABLE `college`
MODIFY `CollegeId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `course`
--
ALTER TABLE `course`
MODIFY `CourseId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=40;
--
-- AUTO_INCREMENT for table `librarian`
--
ALTER TABLE `librarian`
MODIFY `LibrarianId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `librarianrole`
--
ALTER TABLE `librarianrole`
MODIFY `LibrarianRoleId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `loan`
--
ALTER TABLE `loan`
MODIFY `LoanId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;
--
-- AUTO_INCREMENT for table `marcimport`
--
ALTER TABLE `marcimport`
MODIFY `MarcImportId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=158;
--
-- AUTO_INCREMENT for table `message`
--
ALTER TABLE `message`
MODIFY `MessageId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;
--
-- AUTO_INCREMENT for table `outsideresearcher`
--
ALTER TABLE `outsideresearcher`
MODIFY `OutsideResearcherId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `patron`
--
ALTER TABLE `patron`
MODIFY `PatronId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `patrontype`
--
ALTER TABLE `patrontype`
MODIFY `PatronTypeId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `penalty`
--
ALTER TABLE `penalty`
MODIFY `PenaltyId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `publisher`
--
ALTER TABLE `publisher`
MODIFY `PublisherId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=48;
--
-- AUTO_INCREMENT for table `reservation`
--
ALTER TABLE `reservation`
MODIFY `ReservationId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=44;
--
-- AUTO_INCREMENT for table `section`
--
ALTER TABLE `section`
MODIFY `SectionId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
--
-- AUTO_INCREMENT for table `series`
--
ALTER TABLE `series`
MODIFY `SeriesId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;
--
-- AUTO_INCREMENT for table `subject`
--
ALTER TABLE `subject`
MODIFY `SubjectId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=106;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
<filename>content/berkas/sql/3404_1477244496.sql
INSERT INTO tweb_apbd(`rangkuman`,`berkas_id`,`lembaga_id`, `lembaga_kode`,`pemda_kode`, `wilayah_kode`,`tahun`, `rekening_kode`,`rekening`, `uraian`, `nominal`,`nominal_sebelum`, `nominal_sesudah`, `nominal_perubahan`, `nominal_persen`, `keterangan`, `created_by`, `updated_by`) VALUES
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.5.','','Badan Perencanaan Pembangunan Daerah','13083830564','0','13083830564','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.5.1.','001.','Belanja Tidak Langsung','4093805000','0','4093805000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.5.2.','002.','Belanja Langsung','8990025564','0','8990025564','0','0','','2','2'),
('0','365','167','1.06.01.00','1.1','3404','2014','1.1.06.01.','','Urusan Wajib','8990025564','0','8990025564','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.','','Perencanaan Pembangunan','8990025564','0','8990025564','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.01.','','Program Pelayanan Administrasi Perkantoran','976698189','0','976698189','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.02.','','Program Peningkatan Sarana dan Prasarana Aparatur','662176000','0','662176000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.05.','','Program Peningkatan Kapasitas Sumber Daya Aparatur','50216000','0','50216000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.06.','','Program Peningkatan Pengembangan Sistem Pelaporan Capaian Kinerja dan Keuangan','267936400','0','267936400','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.15.','','Program Pengembangan Data/Informasi','368651000','0','368651000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.15.02.','002.','Penyusunan dan pengumpulan data informasi kebutuhan penyusunan doukumen perencanaan','162827000','0','162827000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.15.09.','009.','Penyusunan indikator kerja','2015824000','0','2015824000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.16.','','Program Kerjasama Pembangunan','350302500','0','350302500','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.16.01.','001.','Koordinasi kerjasama pembangunan antar daerah','350302500','0','350302500','0','0','Fasilitasi kegiatan kerjasama pengelolaan dan pembangunan sarpras perkotaan','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.21.','','Program Perencanaan Pembangunan Daerah','2354095100','0','2354095100','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.21.05.','005.','Penyusunan rancangan RPJMD','255402925','0','255402925','0','0','Dokumen rancangan RPJMD 2016-2020 (dilengkapi dok. KLHS)','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.21.06.','006.','Penyelenggaraan musrenbang RPJMD','128534850','0','128534850','0','0','Dok. Rancangan RPJMD 2016-2020 yang telah disesuaikan dengan hasil musrenbang','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.21.08.','008.','Penyusunan RKPD','249420500','0','249420500','0','0','Dok. RKPD 2016','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.21.09.','009.','Penyelenggaraan musrenbang RKPD','368283000','0','368283000','0','0','Dok. Hasil musrenbang kecamatan','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.21.14.','014.','Monitoring, evaluasi dan pelaporan capaian sasaran program','76579750','0','76579750','0','0','Dok. Lporan sesuai form permendagri 54/2010 tentang pengendalian dan evaluasi terhadap hasil RKPD Kab. Sleman','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.21.15.','015.','Penyusunan KUA dan PPAS','566630600','0','566630600','0','0','Dok. KUA PPAS APBD 2016','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.21.16.','016.','Perencanaan dan monitoring DAK','110119500','0','110119500','0','0','Dok. Laporan akhir DAK 2014','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.21.17.','017.','Perencanaan dan monitoring data tugas pembantuan dan dekonsentrasi','85850000','0','85850000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.21.18.','018.','Penyusunan renstra SKPD','67858000','0','67858000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.21.33.','033.','Analisis dan evaluasi pelaporan pelaksanaan pembangunan','140856000','0','140856000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.21.36.','036.','Evaluasi millenium development goals','114884000','0','114884000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.21.39.','039.','Penyusunan rencana pembangunan wilayah terpadu','189675975','0','189675975','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.22.','','Program perencanaan pembangunan bidang ekonomi','986414000','0','986414000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.22.04.','004.','Koordinasi perencanaan pembangunan bidang ekonomi','267561000','0','267561000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.22.06.','006.','Penyusunan masterplan penanggulangan kemiskinan','162699000','0','162699000','0','0','Dok. RAD dan SKPD 2016-2020','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.22.22.','022.','Perencanaan pembangunan pariwisata','118612000','0','118612000','0','0','Dok. RAD pengembangan pariwisata Kab. Selman','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.22.23.','023.','Perencanaan pengembangan perindustrian, perdagangan, dan koperasi','83014000','0','83014000','0','0','Dok. Kajian strategi pengembangan sub terminal agribisnis','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.22.24.','024.','Perencanaan pengembangan pertanian','109202000','0','109202000','0','0','Dok. Kajian strategi pengembangan pertanian organik','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.22.25.','025.','Perencanaan pengembangan investasi','128149000','0','128149000','0','0','Dok. Pengembangan investasi inklusif berbasis sektor ekonomi prioritas','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.22.26.','026.','Perencanaan pengembangan tenaga kerja','117177000','0','117177000','0','0','Dok. Strategi penanggulangan pengangguran (RAD penanggulangan pengangguran)','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.23.','','Program Perencanaan Sosial Budaya','340405000','0','340405000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.23.06.','006.','Perencanaan pengembangan pendidikan','103230500','0','103230500','0','0','Dok. Masterpaln peningkatan kualitas pendidikan menengah di Kab. Sleman tahun 2016-2020','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.23.08.','008.','Perencanaan pengembangan sosial','96768500','0','96768500','0','0','Dok. Draft Perbup pemberdayaan perempuan dan perlindungan anak','2','2'),
('0','365','167','1.06.01.00','1.06','3404','2014','1.06.01.06.01.23.10.','010.','Perencanaan kependudukan','140406000','0','140406000','0','0','Dok. Grand design kependudukan tahun 2016-2020','2','2'),
('0','365','167','1.06.01.00','1.03','3404','2014','1.03.01.06.01.','','Pekerjaan Umum','259855750','0','259855750','0','0','','2','2'),
('0','365','167','1.06.01.00','1.03','3404','2014','1.03.01.06.01.24.','','Program Pengembangan dan Pengelolaan Jaringan Irigasi, Rawa, dan Jaringan Pengairan Lainnya','259855750','0','259855750','0','0','','2','2'),
('0','365','167','1.06.01.00','1.03','3404','2014','1.03.01.06.01.24.23.','023.','Peningkatan kelembagaan kebijakan pengelolaan irigasi','108625500','0','108625500','0','0','','2','2'),
('0','365','167','1.06.01.00','1.04','3404','2014','1.04.01.06.01.','','Penataan Ruang','150352500','0','150352500','0','0','','2','2'),
('0','365','167','1.06.01.00','1.04','3404','2014','1.04.01.06.01.15.','','Program Perencanaan Tata Ruang','150352500','0','150352500','0','0','','2','2'),
('0','365','167','1.06.01.00','1.04','3404','2014','1.04.01.06.01.15.24.','024.','Pembinaan penataan ruang daerah','150352500','0','150352500','0','0','Ketersediaan peta rencana tata ruang sesuai SPM','2','2'),
('0','365','167','1.06.01.00','1.08','3404','2014','1.08.01.06.01.','','Lingkungan Hidup','241704500','0','241704500','0','0','','2','2'),
('0','365','167','1.06.01.00','1.08','3404','2014','1.08.01.06.01.15.','','Program Pengembangan Kinerja Pengelolaan Persampahan','45430000','0','45430000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.08','3404','2014','1.08.01.06.01.15.08.','008.','Kerjasama pengelolaan persampahan','27630000','0','27630000','0','0','Dok. Laporan kerjasama pengelolaan persampahan','2','2'),
('0','365','167','1.06.01.00','1.08','3404','2014','1.08.01.06.01.16.','','Program Pengendalian Pencemaran dan Perusakan Lingkungan Hidup','124799500','0','124799500','0','0','','2','2'),
('0','365','167','1.06.01.00','1.08','3404','2014','1.08.01.06.01.16.25.','025.','Penyusunan strategi sanitasi permukiman','124799500','0','124799500','0','0','Dok. Review strategi sanitasi Kab. Sleman','2','2'),
('0','365','167','1.06.01.00','1.08','3404','2014','1.08.01.06.01.17.','','Program Perlindungan dan Konservasi Sumber Daya Alam','71475000','0','71475000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.08','3404','2014','1.08.01.06.01.17.09.','009.','Koordinasi pengelolaan konservasi SDA','71475000','0','71475000','0','0','Rekomendasi kebijakan Gerakan Nasional Kemitraan Penyelamatan Air','2','2'),
('0','365','167','1.06.01.00','1.13','3404','2014','1.13.01.06.01.','','Sosial','69736000','0','69736000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.13','3404','2014','1.13.01.06.01.22.','','Program Penanggulangan Kemiskinan','69736000','0','69736000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.13','3404','2014','1.13.01.06.01.22.03.','003.','Monitoring dan evaluasi program penanggulangan kemiskinan','69736000','0','69736000','0','0','Dok. Laporan evaluasi program penanggulangan kemiskinan','2','2'),
('0','365','167','1.06.01.00','1.20','3404','2014','1.20.01.06.01.','','Pemerintahan Umum, Administrasi Keuangan Daerah, Kepegawaian, dan Persandian','751133950','0','751133950','0','0','','2','2'),
('0','365','167','1.06.01.00','1.20','3404','2014','1.20.01.06.01.20.','','Program Peningkatan Sistem Pengawasan Internal dan Pengendalian Pelaksanaan Kebijakan KDH','227572950','0','227572950','0','0','','2','2'),
('0','365','167','1.06.01.00','1.20','3404','2014','1.20.01.06.01.20.12.','012.','Monitoring dan evaluasi percepatan pemberantasan korupsi','175117500','0','175117500','0','0','Dok. Monev renaksi percepatan pemberantasan korupsi (PPK)','2','2'),
('0','365','167','1.06.01.00','1.20','3404','2014','1.20.01.06.01.20.16.','016.','Implementasi SPIP','52455450','0','52455450','0','0','','2','2'),
('0','365','167','1.06.01.00','1.20','3404','2014','1.20.01.06.01.33.','','Program Peningkatan Kualitas Pelayanan Publik','71576500','0','71576500','0','0','','2','2'),
('0','365','167','1.06.01.00','1.20','3404','2014','1.20.01.06.01.33.67.','067.','Pelayanan perijinan penelitian, PKL, dan KKN serta pendampingan KKN','71576500','0','71576500','0','0','','2','2'),
('0','365','167','1.06.01.00','1.20','3404','2014','1.20.01.06.01.35.','','Program Pengkajian dan Penelitian Bidang IPTEK','451984500','0','451984500','0','0','','2','2'),
('0','365','167','1.06.01.00','1.20','3404','2014','1.20.01.06.01.35.01.','001.','Pengembangan invensi dan inovasi teknologi','271394500','0','271394500','0','0','Kajian agricultural lan banking','2','2'),
('0','365','167','1.06.01.00','1.20','3404','2014','1.20.01.06.01.35.03.','003.','Penguatan kelembagaan litbang daerah','180590000','0','180590000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.23','3404','2014','1.23.01.06.01.','','Statistik','905347975','0','905347975','0','0','','2','2'),
('0','365','167','1.06.01.00','1.23','3404','2014','1.23.01.06.01.15.','','Program Pengembangan Data/Informasi/Statistik Daerah','905347975','0','905347975','0','0','','2','2'),
('0','365','167','1.06.01.00','1.23','3404','2014','1.23.01.06.01.15.04.','004.','Pengolahan, updating dan analisa data PDRB','95179000','0','95179000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.23','3404','2014','1.23.01.06.01.15.05.','005.','Penyusunan buku PDRB kecamatan','84617000','0','84617000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.23','3404','2014','1.23.01.06.01.15.07.','007.','Penyusunan buku inflasi','66044000','0','66044000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.23','3404','2014','1.23.01.06.01.15.08.','008.','Penyusunan buku statistik industri','46518000','0','46518000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.23','3404','2014','1.23.01.06.01.15.09.','009.','Penyusunan buku IPM','75242000','0','75242000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.23','3404','2014','1.23.01.06.01.15.11.','011.','Penyusunan buku kabupaten dan kecamatan dalam angka','158756000','0','158756000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.23','3404','2014','1.23.01.06.01.15.12.','012.','Penyusunan buku indikator kesejahteraan rakyat','53970500','0','53970500','0','0','','2','2'),
('0','365','167','1.06.01.00','1.23','3404','2014','1.23.01.06.01.15.31.','031.','Penyusunan indek pembangunan gender','61824000','0','61824000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.23','3404','2014','1.23.01.06.01.15.32.','032.','Penyusunan buku indeks Gini','21800000','0','21800000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.23','3404','2014','1.23.01.06.01.15.35.','035.','Penyusunan buku ICOR','68522000','0','68522000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.23','3404','2014','1.23.01.06.01.15.36.','036.','Penyusunan indeks nilai tukar petani','126840475','0','126840475','0','0','','2','2'),
('0','365','167','1.06.01.00','1.24','3404','2014','1.24.01.06.01.','','Kearsipan','91481200','0','91481200','0','0','','2','2'),
('0','365','167','1.06.01.00','1.24','3404','2014','1.24.01.06.01.01.','','Program Penyelamatan dan Pelestarian Dokumen/Arsip Daerah','91481200','0','91481200','0','0','','2','2'),
('0','365','167','1.06.01.00','1.25','3404','2014','1.25.01.06.01.','','Komunikasi dan Informatika','163519000','0','163519000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.25','3404','2014','1.25.01.06.01.15.','','Program Pengembangan Komunikasi, Imformasi dan Media Massa','163519000','0','163519000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.25','3404','2014','1.25.01.06.01.15.06.','006.','Pengkajian dan pengembangan sistem informasi','89769000','0','89769000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.25','3404','2014','1.25.01.06.01.15.08.','008.','Penyusunan buku informasi pembangunan','45309000','0','45309000','0','0','','2','2'),
('0','365','167','1.06.01.00','1.25','3404','2014','1.25.01.06.01.15.09.','009.','Pengelolaan website','28441000','0','28441000','0','0','','2','2'),
|
<filename>server/db/updates/db_20210116_to_20210121.sql
CREATE PROCEDURE `getClassesOf`(IN `dci` VARCHAR(256)) NOT DETERMINISTIC NO SQL SQL SECURITY DEFINER
WITH RECURSIVE classification AS (
SELECT cl_id ,cl_name ,cl_higher ,cl_level
FROM class JOIN molecule ON mo_class = cl_id
WHERE molecule.mo_dci = dci
UNION ALL
SELECT C.cl_id ,C.cl_name ,C.cl_higher ,C.cl_level
FROM class C JOIN classification child ON C.cl_id = child.cl_higher
)
SELECT *
FROM classification
ORDER BY cl_level DESC;
CREATE PROCEDURE `getSystemsOf`(IN `dci` VARCHAR(256)) NOT DETERMINISTIC NO SQL SQL SECURITY DEFINER
WITH RECURSIVE classification AS (
SELECT sy_id ,sy_name ,sy_higher ,sy_level
FROM system JOIN molecule ON mo_system = sy_id
WHERE molecule.mo_dci = dci
UNION ALL
SELECT S.sy_id ,S.sy_name ,S.sy_higher ,S.sy_level
FROM system S JOIN classification child ON S.sy_id = child.sy_higher
)
SELECT *
FROM classification
ORDER BY sy_level DESC;
CREATE PROCEDURE `getPropertyValuesOf`(IN `dci` VARCHAR(256), IN `propertyName` VARCHAR(256)) NOT DETERMINISTIC NO SQL SQL SECURITY DEFINER
SELECT mo_dci as molecule, pv_name as value
FROM molecule NATURAL JOIN molecule_property NATURAL JOIN property_value JOIN property ON pv_property = pr_id
WHERE mo_dci = dci
AND pr_name = propertyName;
UPDATE `server_informations`
SET `value` = "2021-01-21" WHERE `key` = "api_version";
|
CREATE OR
ALTER PROCEDURE usp_DeleteEmployeesFromDepartment(@departmentId int)
AS
DELETE
FROM EmployeesProjects
WHERE EmployeeID IN (SELECT EmployeeID
FROM Employees
WHERE DepartmentID = @departmentId)
UPDATE Employees
SET ManagerID=NULL
WHERE ManagerID IN (SELECT EmployeeID
FROM Employees
WHERE DepartmentID = @departmentId)
ALTER TABLE Departments
ALTER COLUMN ManagerID int
UPDATE Departments
SET ManagerID=NULL
WHERE ManagerID IN (SELECT EmployeeID
FROM Employees
WHERE Employees.DepartmentID = @departmentId)
DELETE
FROM Employees
WHERE DepartmentID = @departmentId
DELETE
FROM Departments
WHERE DepartmentID = @departmentId
SELECT COUNT(*)
FROM Employees
WHERE DepartmentID = @departmentId
GO
usp_DeleteEmployeesFromDepartment 5 |
<reponame>vinayakkumargupta/webapp<gh_stars>10-100
# 2.0.85
ALTER TABLE StoryBook_paragraphs MODIFY paragraphs VARCHAR(1000);
|
<reponame>uk-gov-mirror/hmcts.rd-judicial-api
delete from judicial_role_type where role_id = '1'; |
DO $$
BEGIN
DROP OPERATOR CLASS json_ops using hash;
RAISE LOG 'Dropped JSON hash operator class';
EXCEPTION WHEN undefined_object THEN
RAISE NOTICE 'JSON hash operator class does not exist, skipping';
END;
$$ LANGUAGE plpgsql;
DO $$
BEGIN
DROP OPERATOR = ( json, json );
RAISE LOG 'Dropped JSON equality operator';
EXCEPTION WHEN undefined_function THEN
RAISE NOTICE 'JSON equality operator does not exist, skipping';
END;
$$ LANGUAGE plpgsql;
DROP FUNCTION IF EXISTS json_eq( json, json );
DROP FUNCTION IF EXISTS json_hash ( json );
|
<reponame>lechatthecat/JavaChatSPA<gh_stars>1-10
DROP TABLE IF EXISTS board_response_users;
DROP TABLE IF EXISTS board_responses;
DROP TABLE IF EXISTS board_users;
DROP TABLE IF EXISTS board_categories;
DROP TABLE IF EXISTS user_images;
DROP TABLE IF EXISTS user_confirmations;
DROP TABLE IF EXISTS user_forgotemails;
DROP TABLE IF EXISTS boards;
DROP TABLE IF EXISTS categories;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS roles;
DROP TABLE IF EXISTS ip_strings;
CREATE TABLE roles (
id BIGSERIAL NOT NULL ,
is_admin BOOLEAN NOT NULL DEFAULT false,
power_level INT NOT NULL,
name VARCHAR(10) NOT NULL,
is_deleted BOOLEAN NOT NULL DEFAULT false,
PRIMARY KEY (id)
);
INSERT INTO roles (is_admin, power_level, name)
VALUES (true, 1, 'ADMIN');
INSERT INTO roles (is_admin, power_level, name)
VALUES (false, 0, 'USER');
CREATE TABLE users (
id BIGSERIAL NOT NULL UNIQUE ,
name VARCHAR(50) NOT NULL UNIQUE,
password VARCHAR(128),
role_id BIGINT ,
email VARCHAR(255) NOT NULL UNIQUE,
fail_times INT NOT NULL DEFAULT 0,
is_deleted BOOLEAN NOT NULL DEFAULT false,
is_verified BOOLEAN NOT NULL DEFAULT false,
is_banned BOOLEAN NOT NULL DEFAULT false,
updated TIMESTAMP WITH TIME ZONE,
created TIMESTAMP WITH TIME ZONE,
PRIMARY KEY (id),
FOREIGN KEY (role_id) REFERENCES roles(id)
);
CREATE INDEX idx_users_role_id ON users (role_id);
CREATE INDEX idx_users_email ON users (email);
CREATE INDEX idx_users_is_deleted ON users (is_deleted);
CREATE INDEX idx_created ON users (created);
CREATE TABLE user_confirmations (
confirmation_token CHAR(73) NOT NULL UNIQUE,
user_id BIGINT NOT NULL,
is_verified BOOLEAN NOT NULL DEFAULT false,
updated TIMESTAMP WITH TIME ZONE,
created TIMESTAMP WITH TIME ZONE,
PRIMARY KEY (confirmation_token)
);
CREATE INDEX idx_user_confirmations_user_id ON user_confirmations (user_id);
CREATE INDEX idx_user_confirmations_confirmation_token ON user_confirmations (confirmation_token);
CREATE INDEX idx_user_confirmations_created ON user_confirmations (created);
CREATE TABLE user_forgotemails (
confirmation_token CHAR(73) NOT NULL UNIQUE,
user_id BIGINT NOT NULL,
is_used BOOLEAN NOT NULL DEFAULT false,
updated TIMESTAMP WITH TIME ZONE,
created TIMESTAMP WITH TIME ZONE,
PRIMARY KEY (confirmation_token)
);
CREATE INDEX idx_user_forgotemails_user_id ON user_forgotemails (user_id);
CREATE INDEX idx_user_forgotemails_confirmation_token ON user_forgotemails (confirmation_token);
CREATE INDEX idx_user_forgotemails_created ON user_forgotemails (created);
CREATE TABLE user_images (
id BIGSERIAL NOT NULL ,
user_id BIGINT NOT NULL,
name VARCHAR NOT NULL,
path VARCHAR(500),
detail VARCHAR(300),
is_main BOOLEAN NOT NULL DEFAULT false,
is_deleted BOOLEAN NOT NULL DEFAULT false,
updated TIMESTAMP WITH TIME ZONE,
created TIMESTAMP WITH TIME ZONE,
PRIMARY KEY (id),
FOREIGN KEY (user_id) REFERENCES users(id)
);
CREATE INDEX idx_user_images_user_id ON user_images (user_id);
CREATE TABLE boards (
id BIGSERIAL NOT NULL,
user_id BIGINT NOT NULL,
name VARCHAR(150) NOT NULL,
table_url_name CHAR(73) NOT NULL UNIQUE,
detail VARCHAR(700),
is_private BOOLEAN NOT NULL DEFAULT false,
is_deleted BOOLEAN NOT NULL DEFAULT false,
is_deleted_by_admin BOOLEAN NOT NULL DEFAULT false,
updated TIMESTAMP WITH TIME ZONE,
created TIMESTAMP WITH TIME ZONE,
PRIMARY KEY (id),
FOREIGN KEY (user_id) REFERENCES users(id)
);
CREATE INDEX idx_boards_url_name ON boards (table_url_name);
CREATE INDEX idx_boards_is_deleted ON boards (is_deleted);
CREATE INDEX idx_user_id ON boards (user_id);
CREATE TABLE categories (
id BIGSERIAL NOT NULL,
url_name VARCHAR(50) NOT NULL UNIQUE,
name VARCHAR(50) NOT NULL,
icon VARCHAR(50) NOT NULL,
detail VARCHAR(500),
is_deleted BOOLEAN NOT NULL DEFAULT false,
updated TIMESTAMP WITH TIME ZONE,
created TIMESTAMP WITH TIME ZONE,
PRIMARY KEY (id)
);
INSERT INTO categories (url_name, name, icon, detail, is_deleted, updated, created)
VALUES ('free', 'Free', 'cil-chat-bubble', 'This a category where you can talk about anything.', false, NOW(), NOW());
INSERT INTO categories (url_name, name, icon, detail, is_deleted, updated, created)
VALUES ('hobby', 'Hobby', 'cil-bike','This a category where you can talk about hobbies like games, cinemas...', false, NOW(), NOW());
INSERT INTO categories (url_name, name, icon, detail, is_deleted, updated, created)
VALUES ('science', 'Science', 'cil-balance-scale', 'This a category where you can talk about science: math, propgramming, etc.', false, NOW(), NOW());
INSERT INTO categories (url_name, name, icon, detail, is_deleted, updated, created)
VALUES ('other', 'Other', 'cil-asterisk-circle', 'This a category where you can talk about anything that does not belong to other categories.', false, NOW(), NOW());
CREATE INDEX idx_categories_is_deleted ON categories (is_deleted);
CREATE INDEX idx_categories_url_name ON categories (url_name);
CREATE TABLE board_categories (
id BIGSERIAL NOT NULL,
board_id BIGINT NOT NULL,
category_id BIGINT NOT NULL,
is_deleted BOOLEAN NOT NULL DEFAULT false,
updated TIMESTAMP WITH TIME ZONE,
created TIMESTAMP WITH TIME ZONE,
FOREIGN KEY (board_id) REFERENCES boards(id),
FOREIGN KEY (category_id) REFERENCES categories(id),
PRIMARY KEY (id)
);
CREATE INDEX idx_board_categories_board_id ON board_categories (board_id);
CREATE INDEX idx_board_categories_category_id ON board_categories (category_id);
CREATE INDEX idx_board_categories_is_deleted ON board_categories (is_deleted);
CREATE TABLE board_users (
id BIGSERIAL NOT NULL ,
user_id BIGINT NOT NULL,
board_id BIGINT NOT NULL,
is_deleted BOOLEAN NOT NULL DEFAULT false,
updated TIMESTAMP WITH TIME ZONE,
created TIMESTAMP WITH TIME ZONE,
FOREIGN KEY (user_id) REFERENCES users(id),
FOREIGN KEY (board_id) REFERENCES boards(id),
PRIMARY KEY (id)
);
DROP TYPE IF EXISTS validMsgType;
CREATE TYPE validMsgType AS ENUM ('CHAT', 'JOIN', 'LEAVE', 'ERROR');
CREATE INDEX idx_board_users_user_id ON board_users (user_id);
CREATE INDEX idx_board_users_board_id ON board_users (board_id);
CREATE INDEX idx_board_users_is_deleted ON board_users (is_deleted);
CREATE TABLE board_responses (
id BIGSERIAL NOT NULL,
response VARCHAR(700),
msg_type validMsgType,
board_id BIGINT NOT NULL,
user_id BIGINT NOT NULL,
ip_address VARCHAR(45) NOT NULL,
is_first BOOLEAN NOT NULL DEFAULT false,
res_number INT NOT NULL,
is_deleted BOOLEAN NOT NULL DEFAULT false,
is_deleted_by_admin BOOLEAN NOT NULL DEFAULT false,
updated TIMESTAMP WITH TIME ZONE,
created TIMESTAMP WITH TIME ZONE,
FOREIGN KEY (board_id) REFERENCES boards(id),
FOREIGN KEY (user_id) REFERENCES users(id),
PRIMARY KEY (id)
);
CREATE INDEX idx_board_responses_board_id ON board_responses (board_id);
CREATE INDEX idx_board_responses_user_id ON board_responses (user_id);
CREATE INDEX idx_board_responses_updated ON board_responses (updated);
CREATE INDEX idx_board_responses_created ON board_responses (created);
INSERT INTO users(name, password, role_id, email, is_verified, updated, created)
VALUES ('Anonymous guest', 'Anonymous guest', 2, 'Anonymous guest', true, Now(), Now());
DROP TABLE IF EXISTS ip_strings;
CREATE TABLE ip_strings (
id BIGSERIAL NOT NULL,
ip_address VARCHAR(45) NOT NULL UNIQUE,
string_id CHAR(8) NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX idx_ip_string_ids_ip_address ON ip_strings (ip_address);
ALTER TABLE board_responses ADD COLUMN ip_string_id BIGINT;
ALTER TABLE board_responses ADD COLUMN string_id CHAR(8);
INSERT INTO categories (url_name, name, icon, detail, is_deleted, updated, created)
VALUES ('news', 'News', 'cil-book', 'This a category for news.', false, NOW(), NOW());
INSERT INTO categories (url_name, name, icon, detail, is_deleted, updated, created)
VALUES ('economy', 'Finance/Economy', 'cil-bank', 'This a category for Economy/Finance.', false, NOW(), NOW());
INSERT INTO categories (url_name, name, icon, detail, is_deleted, updated, created)
VALUES ('anime', 'Anime/Manga', 'cil-face', 'This a category for Anime.', false, NOW(), NOW());
INSERT INTO categories (url_name, name, icon, detail, is_deleted, updated, created)
VALUES ('game', 'Video Games', 'cil-gamepad', 'This a category for Video Games.', false, NOW(), NOW());
UPDATE categories SET url_name = 'lounge', name = 'Lounge' WHERE url_name = 'free';
ALTER TABLE categories ADD COLUMN display_order INT;
UPDATE categories SET display_order = 1 WHERE url_name = 'lounge';
UPDATE categories SET display_order = 2 WHERE url_name = 'hobby';
UPDATE categories SET display_order = 3 WHERE url_name = 'science';
UPDATE categories SET display_order = 4 WHERE url_name = 'news';
UPDATE categories SET display_order = 5 WHERE url_name = 'economy';
UPDATE categories SET display_order = 6 WHERE url_name = 'anime';
UPDATE categories SET display_order = 7 WHERE url_name = 'game';
UPDATE categories SET display_order = 8 WHERE url_name = 'other';
|
<filename>use-cases/binary-classification/data_preparation.sql
/* DISCLAIMER: Please replace <your-amazon-redshift-sagemaker-iam-role-arn> with the IAM role ARN of your Amazon Redshift cluster in the SQL scripts below
/* Data Preparation */
CREATE TABLE customer_activity (
state varchar(2),
account_length int,
area_code int,
phone varchar(8),
intl_plan varchar(3),
vMail_plan varchar(3),
vMail_message int,
day_mins float,
day_calls int,
day_charge float,
total_charge float,
eve_mins float,
eve_calls int,
eve_charge float,
night_mins float,
night_calls int,
night_charge float,
intl_mins float,
intl_calls int,
intl_charge float,
cust_serv_calls int,
churn varchar(6),
record_date date);
COPY customer_activity
FROM 's3://redshift-downloads/redshift-ml/customer_activity/'
IAM_ROLE '<your-amazon-redshift-sagemaker-iam-role-arn>' delimiter ',' IGNOREHEADER 1
region 'us-east-1';
|
ALTER TABLE "LTHUSER".posts ADD CONSTRAINT test_check_constraint CHECK (id > 0)
ALTER TABLE "LTHUSER".posts DROP CONSTRAINT test_check_constraint |
<gh_stars>0
-- !Ups
CREATE TABLE currency_prices(
currency CURRENCY_TYPE NOT NULL,
btc_price DECIMAL NOT NULL,
usd_price DECIMAL NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT (CURRENT_TIMESTAMP)
);
CREATE INDEX currency_prices_currency_created_at_index ON currency_prices(currency, created_at);
-- !Downs
DROP TABLE currency_prices;
|
<filename>sql/02-create-database.sql
create table if not exists invoice_role_type
(
id uuid DEFAULT uuid_generate_v4(),
description text not null
CONSTRAINT invoice_role_type_description_not_empty CHECK (description <> ''),
parent_id UUID REFERENCES invoice_role_type (id),
CONSTRAINT invoice_role_type_pk PRIMARY key (id)
);
create table if not exists billing_account_role_type
(
id uuid DEFAULT uuid_generate_v4(),
description text not null
CONSTRAINT billing_account_role_type_description_not_empty CHECK (description <> ''),
parent_id UUID REFERENCES billing_account_role_type (id),
CONSTRAINT billing_account_role_type_pk PRIMARY key (id)
);
create table if not exists billing_account
(
id uuid DEFAULT uuid_generate_v4(),
from_date date not null default current_date,
thru_date date,
description text,
CONSTRAINT billing_account_pk PRIMARY key (id)
);
create table if not exists invoice
(
id uuid DEFAULT uuid_generate_v4(),
invoice_date date not null,
message text,
description text,
of_party_id uuid not null,
billed_to_party_role_id uuid not null,
billed_from_party_role_id uuid not null,
addressed_to_contact_mechanism_id uuid not null,
sent_from_contact_mechanism_id uuid not null,
billing_account_id uuid not null references billing_account (id),
CONSTRAINT invoice_pk PRIMARY key (id)
);
create table if not exists invoice_role
(
id uuid DEFAULT uuid_generate_v4(),
invoice_id uuid not null references invoice (id),
datetime timestamp not null default current_timestamp,
percentage numeric(5, 2),
invoice_role_type_id uuid not null references invoice_role_type (id),
CONSTRAINT invoice_role_pk PRIMARY key (id)
);
create table if not exists invoice_item_type
(
id uuid DEFAULT uuid_generate_v4(),
description text not null
CONSTRAINT invoice_item_type_description_not_empty CHECK (description <> ''),
parent_id UUID REFERENCES invoice_item_type (id),
CONSTRAINT invoice_item_type_pk PRIMARY key (id)
);
create table if not exists billing_account_role
(
id uuid DEFAULT uuid_generate_v4(),
from_date date not null default current_date,
thru_date date,
account_for_party_id uuid not null,
billing_account_role_type_id uuid not null references billing_account_role_type (id),
billing_account_id uuid not null references billing_account (id),
CONSTRAINT billing_account_role_pk PRIMARY key (id)
);
create table if not exists adjustment_type
(
id uuid DEFAULT uuid_generate_v4(),
description text not null
CONSTRAINT adjustment_type_description_not_empty CHECK (description <> ''),
parent_id UUID REFERENCES adjustment_type (id),
CONSTRAINT adjustment_type_pk PRIMARY key (id)
);
create table if not exists invoice_item
(
id uuid DEFAULT uuid_generate_v4(),
sequence numeric(3),
taxable_flag boolean not null default true,
quantity numeric(5),
amount numeric(12, 3),
description text,
adjustment_for_id uuid references invoice_item (id),
sold_for_id uuid references invoice_item (id),
invoice_id uuid references invoice (id),
type_id uuid not null references invoice_item_type (id),
inventory_item_id uuid,
product_feature_id uuid,
product_id uuid,
CONSTRAINT invoice_item_pk PRIMARY key (id)
);
create table if not exists invoice_status_type
(
id uuid DEFAULT uuid_generate_v4(),
description text not null
CONSTRAINT invoice_status_type_description_not_empty CHECK (description <> ''),
parent_id UUID REFERENCES invoice_status_type (id),
CONSTRAINT _type_pk PRIMARY key (id)
);
create table if not exists invoice_status
(
id uuid DEFAULT uuid_generate_v4(),
status_date date not null default current_date,
invoice_id uuid not null references invoice (id),
invoice_status_type_id uuid not null references invoice_status_type (id),
CONSTRAINT invoice_status_pk PRIMARY key (id)
);
create table if not exists term_type
(
id uuid DEFAULT uuid_generate_v4(),
description text not null
CONSTRAINT term_type_description_not_empty CHECK (description <> ''),
parent_id UUID REFERENCES term_type (id),
CONSTRAINT term_type_pk PRIMARY key (id)
);
create table if not exists term
(
id uuid DEFAULT uuid_generate_v4(),
term_value numeric(15, 2) not null,
invoice_item_id uuid not null references invoice_item (id),
invoice_id uuid not null references invoice (id),
term_type_id uuid not null references term_type (id),
CONSTRAINT term_pk PRIMARY key (id)
);
create table if not exists shipment_item_billing
(
id uuid DEFAULT uuid_generate_v4(),
shipment_item_id uuid not null,
invoice_item_id uuid not null references invoice_item (id),
CONSTRAINT shipment_item_billing_pk PRIMARY key (id)
);
create table if not exists order_item_billing
(
id uuid DEFAULT uuid_generate_v4(),
quantity bigint not null default 1,
amount numeric(12, 3) not null,
order_item_id uuid not null,
invoice_item_id uuid not null references invoice_item (id),
CONSTRAINT order_item_billing_pk PRIMARY key (id)
);
create table if not exists payment_method_type
(
id uuid DEFAULT uuid_generate_v4(),
description text not null
CONSTRAINT payment_method_type_description_not_empty CHECK (description <> ''),
parent_id UUID REFERENCES payment_method_type (id),
CONSTRAINT payment_method_type_pk PRIMARY key (id)
);
create table if not exists payment_type
(
id uuid DEFAULT uuid_generate_v4(),
description text not null
CONSTRAINT payment_type_description_not_empty CHECK (description <> ''),
parent_id UUID REFERENCES payment_type (id),
CONSTRAINT payment_type_pk PRIMARY key (id)
);
create table if not exists payment
(
id uuid DEFAULT uuid_generate_v4(),
effective_date date not null default current_date,
payment_ref_num text,
amount numeric(12, 3),
comment text,
payment_method_type_id uuid not null references payment_method_type (id),
from_party_id uuid not null,
to_party_id uuid not null,
CONSTRAINT payment_pk PRIMARY key (id)
);
create table if not exists payment_application
(
id uuid DEFAULT uuid_generate_v4(),
amount_applied numeric(12, 3),
invoice_id uuid not null references invoice (id),
invoice_item_id uuid not null references invoice_item (id),
payment_id uuid not null references payment (id),
billing_account_id uuid not null references billing_account (id),
CONSTRAINT payment_application_pk PRIMARY key (id)
);
create table if not exists financial_account_type
(
id uuid DEFAULT uuid_generate_v4(),
description text not null
CONSTRAINT financial_account_type_description_not_empty CHECK (description <> ''),
parent_id UUID REFERENCES financial_account_type (id),
CONSTRAINT financial_account_type_pk PRIMARY key (id)
);
create table if not exists financial_account
(
id uuid DEFAULT uuid_generate_v4(),
name text not null
constraint financial_account_name_not_empty check (name <> ''),
financial_account_type_id uuid not null references financial_account_type (id),
CONSTRAINT financial_account_pk PRIMARY key (id)
);
create table if not exists financial_account_transaction_type
(
id uuid DEFAULT uuid_generate_v4(),
description text not null
CONSTRAINT financial_account_transaction_type_description_not_empty CHECK (description <> ''),
parent_id UUID REFERENCES financial_account_transaction_type (id),
CONSTRAINT financial_account_transaction_type_pk PRIMARY key (id)
);
create table if not exists financial_account_transaction
(
id uuid DEFAULT uuid_generate_v4(),
transaction_date date not null,
entry_date date not null default current_date,
financial_account_id uuid not null references financial_account (id),
payment_id uuid not null references payment (id),
CONSTRAINT financial_account_transaction_pk PRIMARY key (id)
);
create table if not exists financial_account_role_type
(
id uuid DEFAULT uuid_generate_v4(),
description text not null
CONSTRAINT financial_account_role_type_description_not_empty CHECK (description <> ''),
parent_id UUID REFERENCES financial_account_transaction_type (id),
CONSTRAINT financial_account_role_type_pk PRIMARY key (id)
);
create table if not exists financial_account_role
(
id uuid DEFAULT uuid_generate_v4(),
from_date date not null default current_date,
thru_date date,
financial_account_id uuid not null references financial_account (id),
financial_account_role_type_id uuid not null references financial_account_role_type (id),
party_id uuid not null,
CONSTRAINT _pk PRIMARY key (id)
);
create table if not exists work_effort_billing
(
id uuid DEFAULT uuid_generate_v4(),
invoice_item_id uuid not null references invoice_item (id),
percentage numeric(15, 3),
work_effort_id uuid not null,
CONSTRAINT work_effort_billing_pk PRIMARY key (id)
);
create table if not exists time_entry_billing
(
id uuid DEFAULT uuid_generate_v4(),
invoice_item_id uuid not null references invoice_item (id),
time_entry_id uuid not null,
CONSTRAINT time_entry_billing_pk PRIMARY key (id)
);
|
--liquibase formatted sql
--changeset hvillaizan:create-category context:dev
create table category (
category_id int primary key identity(1,1),
name varchar(50) not null,
description varchar(50) not null,
);
--rollback drop table category |
<filename>tools/scripts/tests/cpp/sql/q1/load_k3_results.sql
CREATE TABLE k3_result (
pageURL text,
pageRank int
);
COPY k3_result FROM '/results/q1_1.csv' WITH DELIMITER '|';
COPY k3_result FROM '/results/q1_2.csv' WITH DELIMITER '|';
|
drop database if exists ProyectoIN5BM;
create database ProyectoIN5BM;
use ProyectoIN5BM;
create table Persona(
codigoPersona int not null auto_increment primary key,
DPI varchar(15) not null,
NombrePersona varchar(200) not null
);
insert into persona(DPI, NombrePersona) values (2018325,'<NAME>');
insert into persona(DPI, NombrePersona) values (2016228,'<NAME>');
insert into persona(DPI, NombrePersona) values (2019038,'<NAME>');
insert into persona(DPI, NombrePersona) values (2019017,'<NAME>');
insert into persona(DPI, NombrePersona) values (2016262,'<NAME>');
insert into persona(DPI, NombrePersona) values (2016243,'<NAME>');
insert into persona(DPI, NombrePersona) values (2019041,'<NAME>');
insert into persona(DPI, NombrePersona) values (2019047,'<NAME>');
insert into persona(DPI, NombrePersona) values (2016497,'<NAME>');
insert into persona(DPI, NombrePersona) values (2019035,'<NAME>'); |
<reponame>julianladisch/raml-module-builder<gh_stars>10-100
DELETE FROM groups;
INSERT INTO groups VALUES
('77777777-7777-7777-7777-777777777777','{"id":"77777777-7777-7777-7777-777777777777"}'),
('88888888-8888-8888-8888-888888888888','{"id":"88888888-8888-8888-8888-888888888888"}'),
('99999999-9999-9999-9999-999999999999','{"id":"99999999-9999-9999-9999-999999999999"}');
DELETE FROM users;
INSERT INTO users (id,user_data,groupId) VALUES
('11111111-1111-1111-1111-111111111111','{"id":"11111111-1111-1111-1111-111111111111",
"name": "<NAME>", "status": "Active - Ready", "email": "<EMAIL>",
"alternateEmail": "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffgffffffff<EMAIL>",
"address": {"city": "Sydhavn", "zip": 2450}, "lang": ["en", "pl"], "number": 4}', '77777777-7777-7777-7777-777777777777'),
('22222222-2222-2222-2222-222222222222','{"id":"22222222-2222-2222-2222-222222222222",
"name": "<NAME>", "status": "Inactive", "email": "<EMAIL>",
"alternateEmail": "<EMAIL>ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff<EMAIL>",
"address": {"city": "Fred", "zip": 1900}, "lang": ["en", "dk", "fi"]}', '88888888-8888-8888-8888-888888888888'),
('33333333-3333-3333-3333-33333333333a','{"id":"33333333-3333-3333-3333-333333333333",
"name": "<NAME>", "status": "Active - Not Yet", "email": "<EMAIL>",
"alternateEmail": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff<EMAIL>ffffffffffffffffffffffffffffffff<EMAIL>",
"address": {"city": "Søvang", "zip": 2791}, "lang": ["en", "dk"]}', '99999999-9999-9999-9999-999999999999');
|
with events as (
select *
from {{ ref('klaviyo__events') }}
), pivot_out_events as (
select
cast( {{ dbt_utils.date_trunc('day', 'occurred_at') }} as date) as date_day,
person_email as email,
last_touch_campaign_id,
last_touch_flow_id,
campaign_name,
flow_name,
variation_id,
campaign_subject_line,
campaign_type,
source_relation,
min(occurred_at) as first_event_at,
max(occurred_at) as last_event_at
-- sum up the numeric value associated with events (most likely will mean revenue)
{% for rm in var('klaviyo__sum_revenue_metrics') %}
, sum(case when lower(type) = '{{ rm | lower }}' then
coalesce({{ fivetran_utils.try_cast("numeric_value", "numeric") }}, 0)
else 0 end)
as {{ 'sum_revenue_' ~ rm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events
{% endfor %}
-- count up the number of instances of each metric
{% for cm in var('klaviyo__count_metrics') %}
, sum(case when lower(type) = '{{ cm | lower }}' then 1 else 0 end)
as {{ 'count_' ~ cm | replace(' ', '_') | replace('(', '') | replace(')', '') | lower }} -- removing special characters that I have seen in different integration events
{% endfor %}
from events
{{ dbt_utils.group_by(n=10) }}
)
-- the grain will be person-flow-campaign-variation-day
select *
from pivot_out_events
|
CREATE EXTERNAL TABLE IF NOT EXISTS [your database].speccpu2006_1_2 (
benchmark_400_perlbench FLOAT,
benchmark_400_perlbench_max FLOAT,
benchmark_400_perlbench_min FLOAT,
benchmark_400_perlbench_reftime FLOAT,
benchmark_400_perlbench_runtime FLOAT,
benchmark_400_perlbench_stdev FLOAT,
benchmark_401_bzip2 FLOAT,
benchmark_401_bzip2_max FLOAT,
benchmark_401_bzip2_min FLOAT,
benchmark_401_bzip2_reftime FLOAT,
benchmark_401_bzip2_runtime FLOAT,
benchmark_401_bzip2_stdev FLOAT,
benchmark_403_gcc FLOAT,
benchmark_403_gcc_max FLOAT,
benchmark_403_gcc_min FLOAT,
benchmark_403_gcc_reftime FLOAT,
benchmark_403_gcc_runtime FLOAT,
benchmark_403_gcc_stdev FLOAT,
benchmark_410_bwaves FLOAT,
benchmark_410_bwaves_max FLOAT,
benchmark_410_bwaves_min FLOAT,
benchmark_410_bwaves_reftime FLOAT,
benchmark_410_bwaves_runtime FLOAT,
benchmark_410_bwaves_stdev FLOAT,
benchmark_416_gamess FLOAT,
benchmark_416_gamess_max FLOAT,
benchmark_416_gamess_min FLOAT,
benchmark_416_gamess_reftime FLOAT,
benchmark_416_gamess_runtime FLOAT,
benchmark_416_gamess_stdev FLOAT,
benchmark_429_mcf FLOAT,
benchmark_429_mcf_max FLOAT,
benchmark_429_mcf_min FLOAT,
benchmark_429_mcf_reftime FLOAT,
benchmark_429_mcf_runtime FLOAT,
benchmark_429_mcf_stdev FLOAT,
benchmark_433_milc FLOAT,
benchmark_433_milc_max FLOAT,
benchmark_433_milc_min FLOAT,
benchmark_433_milc_reftime FLOAT,
benchmark_433_milc_runtime FLOAT,
benchmark_433_milc_stdev FLOAT,
benchmark_434_zeusmp FLOAT,
benchmark_434_zeusmp_max FLOAT,
benchmark_434_zeusmp_min FLOAT,
benchmark_434_zeusmp_reftime FLOAT,
benchmark_434_zeusmp_runtime FLOAT,
benchmark_434_zeusmp_stdev FLOAT,
benchmark_435_gromacs FLOAT,
benchmark_435_gromacs_max FLOAT,
benchmark_435_gromacs_min FLOAT,
benchmark_435_gromacs_reftime FLOAT,
benchmark_435_gromacs_runtime FLOAT,
benchmark_435_gromacs_stdev FLOAT,
benchmark_436_cactusadm FLOAT,
benchmark_436_cactusadm_max FLOAT,
benchmark_436_cactusadm_min FLOAT,
benchmark_436_cactusadm_reftime FLOAT,
benchmark_436_cactusadm_runtime FLOAT,
benchmark_436_cactusadm_stdev FLOAT,
benchmark_437_leslie3d FLOAT,
benchmark_437_leslie3d_max FLOAT,
benchmark_437_leslie3d_min FLOAT,
benchmark_437_leslie3d_reftime FLOAT,
benchmark_437_leslie3d_runtime FLOAT,
benchmark_437_leslie3d_stdev FLOAT,
benchmark_444_namd FLOAT,
benchmark_444_namd_max FLOAT,
benchmark_444_namd_min FLOAT,
benchmark_444_namd_reftime FLOAT,
benchmark_444_namd_runtime FLOAT,
benchmark_444_namd_stdev FLOAT,
benchmark_445_gobmk FLOAT,
benchmark_445_gobmk_max FLOAT,
benchmark_445_gobmk_min FLOAT,
benchmark_445_gobmk_reftime FLOAT,
benchmark_445_gobmk_runtime FLOAT,
benchmark_445_gobmk_stdev FLOAT,
benchmark_447_dealii FLOAT,
benchmark_447_dealii_max FLOAT,
benchmark_447_dealii_min FLOAT,
benchmark_447_dealii_reftime FLOAT,
benchmark_447_dealii_runtime FLOAT,
benchmark_447_dealii_stdev FLOAT,
benchmark_450_soplex FLOAT,
benchmark_450_soplex_max FLOAT,
benchmark_450_soplex_min FLOAT,
benchmark_450_soplex_reftime FLOAT,
benchmark_450_soplex_runtime FLOAT,
benchmark_450_soplex_stdev FLOAT,
benchmark_453_povray FLOAT,
benchmark_453_povray_max FLOAT,
benchmark_453_povray_min FLOAT,
benchmark_453_povray_reftime FLOAT,
benchmark_453_povray_runtime FLOAT,
benchmark_453_povray_stdev FLOAT,
benchmark_454_calculix FLOAT,
benchmark_454_calculix_max FLOAT,
benchmark_454_calculix_min FLOAT,
benchmark_454_calculix_reftime FLOAT,
benchmark_454_calculix_runtime FLOAT,
benchmark_454_calculix_stdev FLOAT,
benchmark_456_hmmer FLOAT,
benchmark_456_hmmer_max FLOAT,
benchmark_456_hmmer_min FLOAT,
benchmark_456_hmmer_reftime FLOAT,
benchmark_456_hmmer_runtime FLOAT,
benchmark_456_hmmer_stdev FLOAT,
benchmark_458_sjeng FLOAT,
benchmark_458_sjeng_max FLOAT,
benchmark_458_sjeng_min FLOAT,
benchmark_458_sjeng_reftime FLOAT,
benchmark_458_sjeng_runtime FLOAT,
benchmark_458_sjeng_stdev FLOAT,
benchmark_459_gemsfdtd FLOAT,
benchmark_459_gemsfdtd_max FLOAT,
benchmark_459_gemsfdtd_min FLOAT,
benchmark_459_gemsfdtd_reftime FLOAT,
benchmark_459_gemsfdtd_runtime FLOAT,
benchmark_459_gemsfdtd_stdev FLOAT,
benchmark_462_libquantum FLOAT,
benchmark_462_libquantum_max FLOAT,
benchmark_462_libquantum_min FLOAT,
benchmark_462_libquantum_reftime FLOAT,
benchmark_462_libquantum_runtime FLOAT,
benchmark_462_libquantum_stdev FLOAT,
benchmark_464_h264ref FLOAT,
benchmark_464_h264ref_max FLOAT,
benchmark_464_h264ref_min FLOAT,
benchmark_464_h264ref_reftime FLOAT,
benchmark_464_h264ref_runtime FLOAT,
benchmark_464_h264ref_stdev FLOAT,
benchmark_465_tonto FLOAT,
benchmark_465_tonto_max FLOAT,
benchmark_465_tonto_min FLOAT,
benchmark_465_tonto_reftime FLOAT,
benchmark_465_tonto_runtime FLOAT,
benchmark_465_tonto_stdev FLOAT,
benchmark_470_lbm FLOAT,
benchmark_470_lbm_max FLOAT,
benchmark_470_lbm_min FLOAT,
benchmark_470_lbm_reftime FLOAT,
benchmark_470_lbm_runtime FLOAT,
benchmark_470_lbm_stdev FLOAT,
benchmark_471_omnetpp FLOAT,
benchmark_471_omnetpp_max FLOAT,
benchmark_471_omnetpp_min FLOAT,
benchmark_471_omnetpp_reftime FLOAT,
benchmark_471_omnetpp_runtime FLOAT,
benchmark_471_omnetpp_stdev FLOAT,
benchmark_473_astar FLOAT,
benchmark_473_astar_max FLOAT,
benchmark_473_astar_min FLOAT,
benchmark_473_astar_reftime FLOAT,
benchmark_473_astar_runtime FLOAT,
benchmark_473_astar_stdev FLOAT,
benchmark_481_wrf FLOAT,
benchmark_481_wrf_max FLOAT,
benchmark_481_wrf_min FLOAT,
benchmark_481_wrf_reftime FLOAT,
benchmark_481_wrf_runtime FLOAT,
benchmark_481_wrf_stdev FLOAT,
benchmark_482_sphinx3 FLOAT,
benchmark_482_sphinx3_max FLOAT,
benchmark_482_sphinx3_min FLOAT,
benchmark_482_sphinx3_reftime FLOAT,
benchmark_482_sphinx3_runtime FLOAT,
benchmark_482_sphinx3_stdev FLOAT,
benchmark_483_xalancbmk FLOAT,
benchmark_483_xalancbmk_max FLOAT,
benchmark_483_xalancbmk_min FLOAT,
benchmark_483_xalancbmk_reftime FLOAT,
benchmark_483_xalancbmk_runtime FLOAT,
benchmark_483_xalancbmk_stdev FLOAT,
benchmark_version VARCHAR(8),
benchmarks VARCHAR(96),
collectd_rrd VARCHAR(255),
comment VARCHAR(255),
config VARCHAR(64),
copies TINYINT,
delay INT,
failover_no_sse TINYINT,
flagsurl VARCHAR(128),
huge_pages TINYINT,
ignore_errors TINYINT,
iteration TINYINT,
iterations TINYINT,
max_copies TINYINT,
meta_burst TINYINT,
meta_compiler VARCHAR(32),
meta_compute_service VARCHAR(32),
meta_compute_service_id VARCHAR(24),
meta_cpu VARCHAR(32),
meta_cpu_cache VARCHAR(32),
meta_cpu_cores TINYINT,
meta_cpu_speed FLOAT,
meta_hostname VARCHAR(64),
meta_hw_avail DATE,
meta_hw_fpu VARCHAR(32),
meta_hw_ncpuorder VARCHAR(16),
meta_hw_nthreadspercore INT,
meta_hw_ocache VARCHAR(64),
meta_hw_other VARCHAR(64),
meta_hw_pcache VARCHAR(64),
meta_hw_tcache VARCHAR(64),
meta_instance_id VARCHAR(96),
meta_license_num VARCHAR(16),
meta_memory VARCHAR(32),
meta_memory_gb SMALLINT,
meta_memory_mb INT,
meta_notes VARCHAR(255),
meta_notes_base VARCHAR(255),
meta_notes_comp VARCHAR(255),
meta_notes_os VARCHAR(255),
meta_notes_part VARCHAR(255),
meta_notes_peak VARCHAR(255),
meta_notes_plat VARCHAR(255),
meta_notes_submit VARCHAR(255),
meta_os_info VARCHAR(32),
meta_provider VARCHAR(32),
meta_provider_id VARCHAR(24),
meta_region VARCHAR(32),
meta_resource_id VARCHAR(32),
meta_run_id VARCHAR(32),
meta_storage_config VARCHAR(32),
meta_sw_avail DATE,
meta_sw_other VARCHAR(64),
meta_test_id VARCHAR(64),
nobuild TINYINT,
nonuma TINYINT,
num_benchmarks TINYINT,
numa TINYINT,
peak TINYINT,
purge_output TINYINT,
rate TINYINT,
reportable TINYINT,
review TINYINT,
size VARCHAR(8),
spec_dir VARCHAR(255),
specfp2006 FLOAT,
specfp_base2006 FLOAT,
specfp_csv VARCHAR(255),
specfp_gif VARCHAR(255),
specfp_html VARCHAR(255),
specfp_pdf VARCHAR(255),
specfp_rate2006 FLOAT,
specfp_rate_base2006 FLOAT,
specfp_text VARCHAR(255),
specint2006 FLOAT,
specint_base2006 FLOAT,
specint_csv VARCHAR(255),
specint_gif VARCHAR(255),
specint_html VARCHAR(255),
specint_pdf VARCHAR(255),
specint_rate2006 FLOAT,
specint_rate_base2006 FLOAT,
specint_text VARCHAR(255),
sse VARCHAR(8),
sse_max VARCHAR(8),
sse_min VARCHAR(8),
test_started TIMESTAMP,
test_stopped TIMESTAMP,
tune VARCHAR(8),
valid TINYINT,
validate_disk_space TINYINT,
x64 TINYINT,
x64_failover TINYINT
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
ESCAPED BY '\\'
LINES TERMINATED BY '\n'
LOCATION 's3://[your S3 bucket]/path/to/csv/files/'
TBLPROPERTIES (
'skip.header.line.count'='1'
); |
CREATE TABLE IF NOT EXISTS SCHEMA_CATALOG.metadata
(
last_seen TIMESTAMPTZ NOT NULL,
metric_family TEXT NOT NULL,
type TEXT DEFAULT NULL,
unit TEXT DEFAULT NULL,
help TEXT DEFAULT NULL,
PRIMARY KEY (metric_family, type, unit, help)
);
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE SCHEMA_CATALOG.metadata TO prom_writer;
GRANT SELECT ON TABLE SCHEMA_CATALOG.metadata TO prom_reader;
CREATE INDEX IF NOT EXISTS metadata_index ON SCHEMA_CATALOG.metadata
(
metric_family, last_seen
);
|
<gh_stars>1-10
-- MODULE YTS793
-- SQL Test Suite, V6.0, Interactive SQL, yts793.sql
-- 59-byte ID
-- TEd Version #
-- AUTHORIZATION CTS1
SELECT USER FROM HU.ECCO;
-- RERUN if USER value does not match preceding AUTHORIZATION comment
ROLLBACK WORK;
-- date_time print
-- TEST:7527 GRANT USAGE on character set, no WGO!
DROP CHARACTER SET CS2;
-- PASS:7527 If DROP completed successfully?
COMMIT WORK;
CREATE CHARACTER SET CS2 GET LATIN1;
-- PASS:7527 If CREATE completed successfully?
COMMIT WORK;
GRANT USAGE ON CHARACTER SET CS2
TO CTS2;
-- PASS:7527 If GRANT completed successfully?
COMMIT WORK;
-- END TEST >>> 7527 <<< END TEST
-- *********************************************
-- *************************************************////END-OF-MODULE
|
--- Case Type: Deallocate
--- Case Name: 删除多个预备语句,参数all
--前置条件,创建表
drop table if exists deallocate_test;
create table deallocate_test(id int,name varchar(10));
--创建insert预备语句
prepare insert_sql(int,varchar(10)) as insert into deallocate_test values($1,$2);
--创建update预备语句
prepare update_sql(int,varchar(10)) as update deallocate_test set id=$1 where name=$2;
--创建delete预备语句
prepare delete_sql(int,varchar(10)) as delete from deallocate_test where id < $1;
--删除预备语句
deallocate all;
--执行任意预备语句,已不存在
execute update_sql(1,'a');
--清理环境
drop table deallocate_test;
|
SELECT DepartmentID, Salary AS [ThirdHighestSalary] FROM (SELECT DISTINCT DepartmentID, Salary ,DENSE_RANK() OVER
(PARTITION BY DepartmentID ORDER BY Salary DESC) AS [Rank] FROM Employees ) AS R
WHERE [Rank] = 3 |
<gh_stars>0
CREATE SCHEMA my_schema ;
CREATE TABLE my_schema.tabela_1 (a INTEGER, b CHAR(5));
ALTER TABLE my_schema.tabela_1 rename my_schema.pais;
ALTER TABLE my_schema.pais CHANGE COLUMN a id INTEGER ;
ALTER TABLE my_schema.pais MODIFY b VARCHAR(100);
ALTER TABLE my_schema.pais MODIFY id INTEGER NOT NULL, CHANGE b nome_ptbr VARCHAR(100) NOT NULL;
ALTER TABLE my_schema.pais ADD nome_eng VARCHAR(100) NOT NULL;
ALTER TABLE my_schema.pais ADD nome_rus VARCHAR(100) NOT NULL AFTER nome_eng , ADD continente VARCHAR(100) NULL, ADD capital VARCHAR(100) NULL;
ALTER TABLE my_schema.pais DROP COLUMN nome_rus;
DESCRIBE my_schema.pais;
|
Use `RMBilling3`;
DROP PROCEDURE IF EXISTS `prc_GetCDR`;
DELIMITER //
CREATE PROCEDURE `prc_GetCDR`(
IN `p_company_id` INT,
IN `p_CompanyGatewayID` INT,
IN `p_start_date` DATETIME,
IN `p_end_date` DATETIME,
IN `p_AccountID` INT ,
IN `p_ResellerID` INT,
IN `p_CDRType` VARCHAR(50),
IN `p_CLI` VARCHAR(50),
IN `p_CLD` VARCHAR(50),
IN `p_zerovaluecost` INT,
IN `p_CurrencyID` INT,
IN `p_area_prefix` VARCHAR(50),
IN `p_trunk` VARCHAR(50),
IN `p_PageNumber` INT,
IN `p_RowspPage` INT,
IN `p_lSortCol` VARCHAR(50),
IN `p_SortOrder` VARCHAR(5),
IN `p_isExport` INT,
IN `p_tag` VARCHAR(100),
IN `p_extension` VARCHAR(50)
)
BEGIN
DECLARE v_OffSet_ INT;
DECLARE v_BillingTime_ INT;
DECLARE v_Round_ INT;
DECLARE v_raccountids TEXT;
DECLARE v_CurrencyCode_ VARCHAR(50);
SET v_raccountids = '';
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
SET v_OffSet_ = (p_PageNumber * p_RowspPage) - p_RowspPage;
SELECT fnGetRoundingPoint(p_company_id) INTO v_Round_;
SELECT cr.Symbol INTO v_CurrencyCode_ FROM Ratemanagement3.tblCurrency cr WHERE cr.CurrencyId =p_CurrencyID;
SELECT fnGetBillingTime(p_CompanyGatewayID,p_AccountID) INTO v_BillingTime_;
Call fnUsageDetail(p_company_id,p_AccountID,p_CompanyGatewayID,p_start_date,p_end_date,0,1,v_BillingTime_,p_CDRType,p_CLI,p_CLD,p_zerovaluecost);
IF p_ResellerID > 0
THEN
DROP TEMPORARY TABLE IF EXISTS tmp_reselleraccounts_;
CREATE TEMPORARY TABLE IF NOT EXISTS tmp_reselleraccounts_(
AccountID int
);
INSERT INTO tmp_reselleraccounts_
SELECT AccountID FROM Ratemanagement3.tblAccountDetails WHERE ResellerOwner=p_ResellerID
UNION
SELECT AccountID FROM Ratemanagement3.tblReseller WHERE ResellerID=p_ResellerID;
SELECT IFNULL(GROUP_CONCAT(AccountID),'') INTO v_raccountids FROM tmp_reselleraccounts_;
END IF;
IF p_isExport = 0
THEN
SELECT
uh.UsageDetailID,
uh.AccountName,
uh.connect_time,
uh.disconnect_time,
uh.billed_duration,
CONCAT(IFNULL(v_CurrencyCode_,''),TRIM(uh.cost)+0) AS cost,
CONCAT(IFNULL(v_CurrencyCode_,''),TRIM(ROUND((uh.cost/uh.billed_duration)*60.0,6))+0) AS rate,
uh.cli,
uh.cld,
uh.area_prefix,
uh.trunk,
s.ServiceName,
uh.AccountID,
p_CompanyGatewayID AS CompanyGatewayID,
p_start_date AS StartDate,
p_end_date AS EndDate,
uh.is_inbound AS CDRType,
uh.extension
FROM tmp_tblUsageDetails_ uh
INNER JOIN Ratemanagement3.tblAccount a
ON uh.AccountID = a.AccountID
LEFT JOIN Ratemanagement3.tblService s
ON uh.ServiceID = s.ServiceID
WHERE (p_CurrencyID = 0 OR a.CurrencyId = p_CurrencyID)
AND (p_area_prefix = '' OR area_prefix LIKE REPLACE(p_area_prefix, '*', '%'))
AND (p_trunk = '' OR trunk = p_trunk )
AND (p_ResellerID = 0 OR FIND_IN_SET(uh.AccountID, v_raccountids) != 0)
AND (p_tag = '' OR (a.tags like Concat(p_tag,'%')))
AND (p_extension = '' OR extension = p_extension)
LIMIT p_RowspPage OFFSET v_OffSet_;
SELECT
COUNT(*) AS totalcount,
fnFormateDuration(sum(billed_duration)) AS total_duration,
sum(cost) AS total_cost,
v_CurrencyCode_ AS CurrencyCode
FROM tmp_tblUsageDetails_ uh
INNER JOIN Ratemanagement3.tblAccount a
ON uh.AccountID = a.AccountID
WHERE (p_CurrencyID = 0 OR a.CurrencyId = p_CurrencyID)
AND (p_area_prefix = '' OR area_prefix LIKE REPLACE(p_area_prefix, '*', '%'))
AND (p_trunk = '' OR trunk = p_trunk )
AND (p_ResellerID = 0 OR FIND_IN_SET(uh.AccountID, v_raccountids) != 0)
AND (p_tag = '' OR (a.tags like Concat(p_tag,'%')))
AND (p_extension = '' OR extension = p_extension);
END IF;
IF p_isExport = 1
THEN
SELECT
uh.AccountName AS 'Account Name',
uh.connect_time AS 'Connect Time',
uh.disconnect_time AS 'Disconnect Time',
uh.billed_duration AS 'Billed Duration (sec)' ,
CONCAT(IFNULL(v_CurrencyCode_,''),TRIM(uh.cost)+0) AS 'Cost',
CONCAT(IFNULL(v_CurrencyCode_,''),TRIM(ROUND((uh.cost/uh.billed_duration)*60.0,6))+0) AS 'Avg. Rate/Min',
uh.cli AS 'CLI',
uh.cld AS 'CLD',
uh.area_prefix AS 'Prefix',
uh.trunk AS 'Trunk',
IF(uh.is_inbound = 0 , 'OutBound','InBound') AS 'Type',
uh.extension AS 'Extension'
FROM tmp_tblUsageDetails_ uh
INNER JOIN Ratemanagement3.tblAccount a
ON uh.AccountID = a.AccountID
WHERE (p_CurrencyID = 0 OR a.CurrencyId = p_CurrencyID)
AND (p_area_prefix = '' OR area_prefix LIKE REPLACE(p_area_prefix, '*', '%'))
AND (p_trunk = '' OR trunk = p_trunk )
AND (p_ResellerID = 0 OR FIND_IN_SET(uh.AccountID, v_raccountids) != 0)
AND (p_tag = '' OR (a.tags like Concat(p_tag,'%')))
AND (p_extension = '' OR extension = p_extension);
END IF;
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
END//
DELIMITER ;
DROP PROCEDURE IF EXISTS `prc_CreateInvoiceFromRecurringInvoice`;
DELIMITER //
CREATE PROCEDURE `prc_CreateInvoiceFromRecurringInvoice`(
IN `p_CompanyID` INT,
IN `p_InvoiceIDs` VARCHAR(200),
IN `p_ModifiedBy` VARCHAR(50),
IN `p_LogStatus` INT,
IN `p_ProsessID` VARCHAR(50),
IN `p_CurrentDate` DATETIME
)
COMMENT 'test'
BEGIN
DECLARE v_Note VARCHAR(100);
DECLARE v_Check int;
DECLARE v_SkippedWIthDate VARCHAR(200);
DECLARE v_SkippedWIthOccurence VARCHAR(200);
DECLARE v_Message VARCHAR(200);
DECLARE v_InvoiceID int;
DECLARE cnt_stock int;
DECLARE v_StockErrorMessage VARCHAR(200);
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
SET v_Note = CONCAT('Recurring Invoice Generated by ',p_ModifiedBy,' ');
SET v_StockErrorMessage = '';
DROP TEMPORARY TABLE IF EXISTS tmp_Invoices_;
CREATE TEMPORARY TABLE IF NOT EXISTS tmp_Invoices_(
CompanyID int,
Title varchar(50),
AccountID int,
Address varchar(500),
InvoiceNumber varchar(30),
IssueDate datetime,
CurrencyID int,
PONumber varchar(30),
InvoiceType int,
SubTotal decimal(18,6),
TotalDiscount decimal(18,6),
TaxRateID int,
TotalTax decimal(18,6),
RecurringInvoiceTotal decimal(18,6),
GrandTotal decimal(18,6),
Description varchar(100),
Attachment varchar(200),
Note longtext,
Terms longtext,
InvoiceStatus varchar(50),
PDF varchar(500),
UsagePath varchar(500),
PreviousBalance decimal(18,6),
TotalDue decimal(18,6),
Payment decimal(18,6),
CreatedBy varchar(50),
ModifiedBy varchar(50),
created_at datetime,
updated_at datetime,
ItemInvoice tinyint(3),
FooterTerm longtext,
RecurringInvoiceID int,
ProsessID varchar(50),
NextInvoiceDate datetime,
Occurrence int,
BillingClassID int
);
INSERT INTO tmp_Invoices_
SELECT rinv.CompanyID,
rinv.Title,
rinv.AccountID,
rinv.Address,
null as InvoiceNumber,
DATE(p_CurrentDate) as IssueDate,
rinv.CurrencyID,
'' as PONumber,
1 as InvoiceType,
rinv.SubTotal,
rinv.TotalDiscount,
rinv.TaxRateID,
rinv.TotalTax,
rinv.RecurringInvoiceTotal,
rinv.GrandTotal,
rinv.Description,
rinv.Attachment,
rinv.Note,
rinv.Terms,
'awaiting' as InvoiceStatus,
rinv.PDF,
'' as UsagePath,
0 as PreviousBalance,
0 as TotalDue,
0 as Payment,
rinv.CreatedBy,
'' as ModifiedBy,
p_CurrentDate as created_at,
p_CurrentDate as updated_at,
1 as ItemInvoice,
rinv.FooterTerm,
rinv.RecurringInvoiceID,
p_ProsessID,
rinv.NextInvoiceDate,
rinv.Occurrence,
rinv.BillingClassID
FROM tblRecurringInvoice rinv
WHERE rinv.CompanyID = p_CompanyID
AND rinv.RecurringInvoiceID=p_InvoiceIDs;
SELECT GROUP_CONCAT(CONCAT(temp.Title,': Skipped with INVOICE DATE ',DATE(temp.NextInvoiceDate)) separator '\n\r') INTO v_SkippedWIthDate
FROM tmp_Invoices_ temp
WHERE (DATE(temp.NextInvoiceDate) > DATE(p_CurrentDate));
SELECT GROUP_CONCAT(CONCAT(temp.Title,': Skipped with exceding limit Occurrence ',(SELECT COUNT(InvoiceID) FROM tblInvoice WHERE InvoiceStatus!='cancel' AND RecurringInvoiceID=temp.RecurringInvoiceID)) separator '\n\r') INTO v_SkippedWIthOccurence
FROM tmp_Invoices_ temp
WHERE (temp.Occurrence > 0
AND (SELECT COUNT(InvoiceID) FROM tblInvoice WHERE InvoiceStatus!='cancel' AND RecurringInvoiceID=temp.RecurringInvoiceID) >= temp.Occurrence);
SELECT CASE
WHEN ((v_SkippedWIthDate IS NOT NULL) OR (v_SkippedWIthOccurence IS NOT NULL))
THEN CONCAT(IFNULL(v_SkippedWIthDate,''),'\n\r',IFNULL(v_SkippedWIthOccurence,''))
ELSE ''
END as message INTO v_Message;
IF(v_Message="") THEN
INSERT INTO tblInvoice (`CompanyID`, `AccountID`, `Address`, `InvoiceNumber`, `IssueDate`, `CurrencyID`, `PONumber`, `InvoiceType`, `SubTotal`, `TotalDiscount`, `TaxRateID`, `TotalTax`, `InvoiceTotal`, `GrandTotal`, `Description`, `Attachment`, `Note`, `Terms`, `InvoiceStatus`, `PDF`, `UsagePath`, `PreviousBalance`, `TotalDue`, `Payment`, `CreatedBy`, `ModifiedBy`, `created_at`, `updated_at`, `ItemInvoice`, `FooterTerm`,`RecurringInvoiceID`,`ProcessID`,`BillingClassID`)
SELECT
rinv.CompanyID,
rinv.AccountID,
rinv.Address,
FNGetInvoiceNumber(p_CompanyID,rinv.AccountID,rinv.BillingClassID) as InvoiceNumber,
DATE(p_CurrentDate) as IssueDate,
rinv.CurrencyID,
'' as PONumber,
1 as InvoiceType,
rinv.SubTotal,
rinv.TotalDiscount,
rinv.TaxRateID,
rinv.TotalTax,
rinv.RecurringInvoiceTotal,
rinv.GrandTotal,
rinv.Description,
rinv.Attachment,
rinv.Note,
rinv.Terms,
'awaiting' as InvoiceStatus,
rinv.PDF,
'' as UsagePath,
0 as PreviousBalance,
0 as TotalDue,
0 as Payment,
rinv.CreatedBy,
'' as ModifiedBy,
p_CurrentDate as created_at,
p_CurrentDate as updated_at,
1 as ItemInvoice,
rinv.FooterTerm,
rinv.RecurringInvoiceID,
p_ProsessID,
rinv.BillingClassID
FROM tmp_Invoices_ rinv;
SET v_InvoiceID = LAST_INSERT_ID();
INSERT INTO tblInvoiceDetail ( `InvoiceID`, `ProductID`, `Description`, `StartDate`, `EndDate`, `Price`, `Qty`, `Discount`, `TaxRateID`,`TaxRateID2`, `TaxAmount`, `LineTotal`, `CreatedBy`, `ModifiedBy`, `created_at`, `updated_at`, `ProductType`,`DiscountAmount`,`DiscountType`,`DiscountLineAmount`)
SELECT
inv.InvoiceID,
rinvd.ProductID,
rinvd.Description,
null as StartDate,
null as EndDate,
rinvd.Price,
rinvd.Qty,
rinvd.Discount,
rinvd.TaxRateID,
rinvd.TaxRateID2,
rinvd.TaxAmount,
rinvd.LineTotal,
rinvd.CreatedBy,
rinvd.ModifiedBy,
rinvd.created_at,
p_CurrentDate as updated_at,
rinvd.ProductType,
rinvd.DiscountAmount,
rinvd.DiscountType,
rinvd.DiscountLineAmount
FROM tblRecurringInvoiceDetail rinvd
INNER JOIN tblInvoice inv ON inv.RecurringInvoiceID = rinvd.RecurringInvoiceID
INNER JOIN tblRecurringInvoice rinv ON rinv.RecurringInvoiceID = rinvd.RecurringInvoiceID
WHERE rinv.CompanyID = p_CompanyID
AND inv.InvoiceID = v_InvoiceID;
INSERT INTO tblInvoiceTaxRate ( `InvoiceID`,`InvoiceDetailID`, `TaxRateID`, `TaxAmount`,`InvoiceTaxType`,`Title`, `CreatedBy`,`ModifiedBy`)
SELECT
inv.InvoiceID,
rinvt.RecurringInvoiceDetailID,
rinvt.TaxRateID,
rinvt.TaxAmount,
rinvt.RecurringInvoiceTaxType,
rinvt.Title,
rinvt.CreatedBy,
rinvt.ModifiedBy
FROM tblRecurringInvoiceTaxRate rinvt
INNER JOIN tblInvoice inv ON inv.RecurringInvoiceID = rinvt.RecurringInvoiceID
INNER JOIN tblRecurringInvoice rinv ON rinv.RecurringInvoiceID = rinvt.RecurringInvoiceID
WHERE rinv.CompanyID = p_CompanyID
AND inv.InvoiceID = v_InvoiceID;
INSERT INTO tblInvoiceLog (InvoiceID,Note,InvoiceLogStatus,created_at)
SELECT inv.InvoiceID,CONCAT(v_Note, CONCAT(LTRIM(RTRIM(IFNULL(tblInvoiceTemplate.InvoiceNumberPrefix,''))), LTRIM(RTRIM(inv.InvoiceNumber)))) as Note,1 as InvoiceLogStatus,p_CurrentDate as created_at
FROM tblInvoice inv
INNER JOIN tblRecurringInvoice rinv ON inv.RecurringInvoiceID = rinv.RecurringInvoiceID
INNER JOIN Ratemanagement3.tblBillingClass b ON rinv.BillingClassID = b.BillingClassID
INNER JOIN tblInvoiceTemplate ON b.InvoiceTemplateID = tblInvoiceTemplate.InvoiceTemplateID
WHERE rinv.CompanyID = p_CompanyID
AND inv.InvoiceID = v_InvoiceID;
INSERT INTO tblRecurringInvoiceLog (RecurringInvoiceID,Note,RecurringInvoiceLogStatus,created_at)
SELECT inv.RecurringInvoiceID,CONCAT(v_Note, CONCAT(LTRIM(RTRIM(IFNULL(tblInvoiceTemplate.InvoiceNumberPrefix,''))), LTRIM(RTRIM(inv.InvoiceNumber)))) as Note,p_LogStatus as InvoiceLogStatus,p_CurrentDate as created_at
FROM tblInvoice inv
INNER JOIN tblRecurringInvoice rinv ON inv.RecurringInvoiceID = rinv.RecurringInvoiceID
INNER JOIN Ratemanagement3.tblBillingClass b ON rinv.BillingClassID = b.BillingClassID
INNER JOIN tblInvoiceTemplate ON b.InvoiceTemplateID = tblInvoiceTemplate.InvoiceTemplateID
WHERE rinv.CompanyID = p_CompanyID
AND inv.InvoiceID = v_InvoiceID;
UPDATE tblInvoice inv
INNER JOIN tblRecurringInvoice rinv ON inv.RecurringInvoiceID = rinv.RecurringInvoiceID
INNER JOIN Ratemanagement3.tblBillingClass b ON rinv.BillingClassID = b.BillingClassID
INNER JOIN tblInvoiceTemplate ON b.InvoiceTemplateID = tblInvoiceTemplate.InvoiceTemplateID
SET FullInvoiceNumber = IF(inv.InvoiceType=1,CONCAT(ltrim(rtrim(IFNULL(tblInvoiceTemplate.InvoiceNumberPrefix,''))), ltrim(rtrim(inv.InvoiceNumber))),ltrim(rtrim(inv.InvoiceNumber)))
WHERE inv.CompanyID = p_CompanyID
AND inv.InvoiceID = v_InvoiceID;
DROP TEMPORARY TABLE IF EXISTS tmp_TaxRateDetail_;
CREATE TEMPORARY TABLE IF NOT EXISTS tmp_TaxRateDetail_(
InvoiceTaxRateID int,
InvoiceDetailID int
);
INSERT INTO tmp_TaxRateDetail_
SELECT
tblInvoiceTaxRate.InvoiceTaxRateID,
tblInvoiceDetail.InvoiceDetailID
FROM tblInvoiceTaxRate
JOIN tblRecurringInvoiceDetail on tblRecurringInvoiceDetail.RecurringInvoiceDetailID=tblInvoiceTaxRate.InvoiceDetailID
JOIN tblInvoiceDetail on tblInvoiceDetail.InvoiceID=v_InvoiceID AND tblInvoiceDetail.ProductID=tblRecurringInvoiceDetail.ProductID AND tblInvoiceDetail.Price=tblRecurringInvoiceDetail.Price
WHERE tblInvoiceTaxRate.InvoiceID = v_InvoiceID AND tblInvoiceTaxRate.InvoiceDetailID !=0
GROUP BY tblInvoiceTaxRate.InvoiceTaxRateID,tblInvoiceDetail.InvoiceDetailID
;
UPDATE tblInvoiceTaxRate a
INNER JOIN tmp_TaxRateDetail_ b ON a.InvoiceTaxRateID=b.InvoiceTaxRateID
SET a.InvoiceDetailID=b.InvoiceDetailID
WHERE a.InvoiceTaxRateID=b.InvoiceTaxRateID;
CALL prc_StockManageRecurringInvoice(p_CompanyID,p_InvoiceIDs,v_InvoiceID,p_ModifiedBy);
END IF;
SELECT v_Message as Message, IFNULL(v_InvoiceID,0) as InvoiceID;
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
END//
DELIMITER ; |
-- TODO: Update account name in line 24.
select b.TRANSAMOUNT, b.REPEATS, b.NUMOCCURRENCES, b.NEXTOCCURRENCEDATE, c.PFX_SYMBOL, c.SFX_SYMBOL,
(select a.INITIALBAL + total(t.TRANSAMOUNT)
from
(select ACCOUNTID, STATUS,
(case when TRANSCODE = 'Deposit' then TRANSAMOUNT else -TRANSAMOUNT end) as TRANSAMOUNT
from CHECKINGACCOUNT_V1
union all
select TOACCOUNTID, STATUS, TOTRANSAMOUNT
from CHECKINGACCOUNT_V1
where TRANSCODE = 'Transfer') as t
where t.ACCOUNTID = a.ACCOUNTID
and t.STATUS <> 'V') as Balance
from
(select ACCOUNTID, STATUS, REPEATS, NUMOCCURRENCES, NEXTOCCURRENCEDATE,
(case when TRANSCODE = 'Deposit' then TRANSAMOUNT else -TRANSAMOUNT end) as TRANSAMOUNT
from BILLSDEPOSITS_V1
union all
select TOACCOUNTID, STATUS, REPEATS, NUMOCCURRENCES, NEXTOCCURRENCEDATE, TOTRANSAMOUNT
from BILLSDEPOSITS_V1
where TRANSCODE = 'Transfer') as b
inner join ACCOUNTLIST_V1 as a on b.ACCOUNTID = a.ACCOUNTID
inner join CURRENCYFORMATS_V1 as c on c.CURRENCYID = a.CURRENCYID
where a.ACCOUNTNAME = 'Account1'
and b.STATUS <> 'V';
|
<gh_stars>0
DROP TABLE IF EXISTS flights;
CREATE TABLE flights (
link TEXT NOT NULL DEFAULT '',
visible BOOLEAN NOT NULL DEFAULT FALSE
);
|
<filename>server_database/winter.sql
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 29, 2020 at 11:47 PM
-- Server version: 10.4.16-MariaDB
-- PHP Version: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `winter`
--
-- --------------------------------------------------------
--
-- Table structure for table `categories`
--
CREATE TABLE `categories` (
`id` bigint(20) UNSIGNED NOT NULL,
`category_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`added_by` 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;
--
-- Dumping data for table `categories`
--
INSERT INTO `categories` (`id`, `category_name`, `added_by`, `created_at`, `updated_at`) VALUES
(50, 'dddddd', 20, '2020-12-28 08:36:00', NULL),
(51, 'ctg cox', 20, '2020-12-28 08:36:04', NULL),
(52, 'ctg coxlll', 25, '2020-12-29 07:09:19', NULL),
(53, 'Abdull<NAME>', 25, '2020-12-29 07:46:42', NULL),
(54, 'ctg coxfffff', 25, '2020-12-29 08:10:14', NULL),
(55, 'ddddddgggggggg', 25, '2020-12-29 08:10:21', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `failed_jobs`
--
CREATE TABLE `failed_jobs` (
`id` bigint(20) UNSIGNED NOT NULL,
`uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
`queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2020_12_13_122713_create_categories_table', 2),
(5, '2020_12_23_151225_create_subcategories_table', 3);
-- --------------------------------------------------------
--
-- Table structure for table `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `password_resets`
--
INSERT INTO `password_resets` (`email`, `token`, `created_at`) VALUES
('<EMAIL>', <PASSWORD>', '2020-12-09 04:03:09');
-- --------------------------------------------------------
--
-- Table structure for table `subcategories`
--
CREATE TABLE `subcategories` (
`id` bigint(20) UNSIGNED NOT NULL,
`category_id` int(11) NOT NULL,
`subcategory_name` 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;
--
-- Dumping data for table `subcategories`
--
INSERT INTO `subcategories` (`id`, `category_id`, `subcategory_name`, `created_at`, `updated_at`) VALUES
(27, 51, 'fff', '2020-12-28 08:36:13', NULL),
(28, 51, 'fffccccccc', '2020-12-28 08:55:07', NULL),
(29, 51, 'fffff', '2020-12-28 08:56:05', NULL),
(30, 50, 'fffccccccc', '2020-12-28 08:56:10', NULL),
(31, 49, 'fffccccccc', '2020-12-28 09:01:37', NULL),
(32, 51, 'eeeeeeee', '2020-12-28 09:09:00', NULL),
(33, 51, 'nomanaaaa', '2020-12-28 09:09:13', NULL),
(34, 52, 'kkkkkk', '2020-12-29 07:42:37', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
(11, '<NAME>', '<EMAIL>', NULL, '$2y$10$igL8WsBzwLuR4v54vqKC.OuK/GMlyJLpK7SJBvExH.xli4Znx1flq', NULL, '2020-12-13 14:18:44', '2020-12-13 14:18:44'),
(12, '<NAME>', '<EMAIL>', NULL, '$2y$10$xY8TOoAbPnIBsQbbmiBfc.YzHVq3D9XIkRkLzGIqEFRyCvIo4g/B.', NULL, '2020-12-20 17:53:43', '2020-12-20 17:53:43'),
(13, 'MD ABDULL', 'aa@aa.aaa1', NULL, '$2y$10$2VGNSoOBd9vQvKLoWzziKuVSZlEwvXTfMlqn8QziEIRTFAgch/z1a', NULL, '2020-12-21 04:45:39', '2020-12-21 04:45:39'),
(14, 'coxs bazar', '<EMAIL>', NULL, '$2y$10$ZBNcZBzfKp1eOGynnWEyxu6XGcuaXGmRHtob4bn1FYAjfhGy4fl0e', NULL, '2020-12-21 06:46:48', '2020-12-21 06:46:48'),
(15, 'MD ABDULLAHxxxx', '<EMAIL>', NULL, '$2y$10$dmrQ11cvX4RU3Q2WAKijkumfRENTJwpGXmONlELElnNbFaH0pmFWW', NULL, '2020-12-21 09:13:38', '2020-12-21 09:13:38'),
(16, '<NAME>', '<EMAIL>', NULL, '$2y$10$0dd3Ra7MYn9PQ0C5ESAFq.xcbEaM5tS00pu9bG2OgaKFfVDs4mMcu', 'q4XyhVIGIe2DoJg37Q7FkXCEVssQqTs5gMUJyH4rHVP7nkKrkQsUbwmtO64Y', '2020-12-21 09:33:30', '2020-12-21 09:33:30'),
(17, 'MD ABDULL', '<EMAIL>2', NULL, '$2y$10$pE8vUj1q7RZp4d/tXjkHpuSzDwfiDH5tukQsft9wO/H1yCRd1rstC', NULL, '2020-12-23 07:05:14', '2020-12-23 07:05:14'),
(18, 'coxs bazar', '<EMAIL>qwq', NULL, '$2y$10$aCYKa1cc13eWS/B0B5zGPuOCpC6LHIK/cBOreVQ07CiadUj/3C.f6', NULL, '2020-12-23 19:43:17', '2020-12-23 19:43:17'),
(19, '<NAME>', '<EMAIL>33', NULL, '$2y$10$bDwHVErFQ.ac660GrjtSGevps4mWA1MGSl5fUqGGj85NR1/Q1qz7.', NULL, '2020-12-28 04:44:36', '2020-12-28 04:44:36'),
(20, 'Ab<NAME>', '<EMAIL>', NULL, '$2y$10$cVhSK67PPlVCXhui9X1ZaOsQdwmbD1smWUh..RARLK8WdjfRbKLFy', NULL, '2020-12-28 08:15:33', '2020-12-28 08:15:33'),
(21, '<NAME>', '<EMAIL>', NULL, '$2y$10$Zh9RsspvqMV/zOppIOdk3OZueR7T3z6NwEGXDu5Mzi1p9e4jbCwO6', NULL, '2020-12-28 15:31:23', '2020-12-28 15:31:23'),
(22, '<NAME>', '<EMAIL>asss', NULL, '$2y$10$aOURtN/kQna0..Ts1/uip..w/OHNtrHNa2Y7YWa9mYgEWUuJisvJe', NULL, '2020-12-28 15:34:05', '2020-12-28 15:34:05'),
(23, '<NAME>', '<EMAIL>', NULL, '$2y$10$HHSzdqogAoQ6wXon/oShdebmu/Q0it1n9ukJ3VQ1Wj0R2.Y5ezKha', NULL, '2020-12-28 16:05:22', '2020-12-28 16:05:22'),
(24, '<NAME>', 'aa@aa.<EMAIL>aaa', NULL, '$2y$10$EHBx2pnSIxunojENxHFe8.34/5NYrRYnUq2f/RgVSansEwnPWv5w.', NULL, '2020-12-28 16:30:58', '2020-12-28 16:30:58'),
(25, '<NAME>', '<EMAIL>', NULL, '$2y$10$Cu5nxdiLfjmLZ5d77GUHe.t1yPIMhf17EPekWJPOEm3uoxb3OwNE2', NULL, '2020-12-29 06:54:53', '2020-12-29 06:54:53'),
(26, '<NAME>', '<EMAIL>', NULL, '$2y$10$uuYqjE9db3cyyXOKQt3epu4SRSoAWqe1O4qEQ6XzBtWB2XNcGAEii', NULL, '2020-12-29 20:56:46', '2020-12-29 20:56:46');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);
--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`);
--
-- Indexes for table `subcategories`
--
ALTER TABLE `subcategories`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=56;
--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `subcategories`
--
ALTER TABLE `subcategories`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=35;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
<filename>template/roles.sql
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 16, 2018 at 01:24 PM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `realestate`
--
-- --------------------------------------------------------
--
-- Table structure for table `roles`
--
CREATE TABLE `roles` (
`id` int(10) UNSIGNED NOT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `roles`
--
INSERT INTO `roles` (`id`, `title`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 0, NULL, NULL),
(2, 'Basic', 0, NULL, NULL),
(3, 'Premium', 0, NULL, NULL),
(4, 'User', 0, NULL, NULL);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
<gh_stars>0
-- This is a little fragile and doesn't play well with heroku
COPY network(networkid,networkname)
FROM '/home/cwebber/spider-network/data/network.csv'
DELIMITER ','
CSV HEADER;
COPY edge(networkid,edgename,frombusnum,tobusnum,ckt)
FROM '/home/cwebber/spider-network/data/edge_test.csv'
DELIMITER ','
CSV HEADER;
COPY node(networkid,nodename,kv,busnum)
FROM '/home/cwebber/spider-network/data/node_test.csv'
DELIMITER ','
CSV HEADER; |
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost:80
-- Generation Time: 26 Apr 2018 pada 23.41
-- Versi Server: 5.7.21-0ubuntu0.16.04.1
-- PHP Version: 5.6.35-1+ubuntu16.04.1+deb.sury.org+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 */;
--
-- Database: `users`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `users_table`
--
CREATE TABLE `users_table` (
`id` int(11) NOT NULL,
`name` varchar(30) NOT NULL,
`email` varchar(50) NOT NULL,
`password` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `users_table`
--
INSERT INTO `users_table` (`id`, `name`, `email`, `password`) VALUES
(3, 'haerul', '<EMAIL>', <PASSWORD>'),
(4, 'new user', '<EMAIL>', <PASSWORD>'),
(5, '<NAME>', '<EMAIL>', '$<KEY>');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `users_table`
--
ALTER TABLE `users_table`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `users_table`
--
ALTER TABLE `users_table`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
/*!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 */;
|
TRUNCATE TABLE scene_search;
INSERT INTO scene_search
SELECT
S.id as scene_id,
REGEXP_REPLACE(S.title, '[^a-zA-Z0-9 ]+', '', 'g') AS scene_title,
S.date::TEXT AS scene_date,
T.name || ' ' || REGEXP_REPLACE(T.name, '[^a-zA-Z0-9]', '', 'g') || ' ' || CASE WHEN TP.name IS NOT NULL THEN (TP.name || ' ' || REGEXP_REPLACE(TP.name, '[^a-zA-Z0-9]', '', 'g') ) ELSE '' END AS studio_name,
ARRAY_TO_STRING(ARRAY_CAT(ARRAY_AGG(P.name), ARRAY_AGG(PS.as)), ' ', '') AS performer_names
FROM scenes S
LEFT JOIN scene_performers PS ON PS.scene_id = S.id
LEFT JOIN performers P ON PS.performer_id = P.id
LEFT JOIN studios T ON T.id = S.studio_id
LEFT JOIN studios TP ON T.parent_studio_id = TP.id
GROUP BY S.id, S.title, T.name, TP.name;
CREATE OR REPLACE FUNCTION update_scene() RETURNS TRIGGER AS $$
BEGIN
IF (NEW.title != OLD.title OR New.date != OLD.date OR New.studio_id != OLD.studio_id) THEN
UPDATE scene_search
SET
scene_title = REGEXP_REPLACE(NEW.title, '[^a-zA-Z0-9 ]+', '', 'g'),
scene_date = NEW.date,
studio_name = SUBQUERY.studio_name
FROM (
SELECT S.id as sid, T.name || ' ' || REGEXP_REPLACE(T.name, '[^a-zA-Z0-9]', '', 'g') || ' ' || CASE WHEN TP.name IS NOT NULL THEN (TP.name || ' ' || REGEXP_REPLACE(TP.name, '[^a-zA-Z0-9]', '', 'g') ) ELSE '' END AS studio_name
FROM scenes S
JOIN studios T ON S.studio_id = T.id
LEFT JOIN studios TP ON T.parent_studio_id = TP.id
) SUBQUERY
WHERE scene_id = NEW.id
AND scene_id = SUBQUERY.sid;
END IF;
RETURN NULL;
END;
$$ LANGUAGE plpgsql; --The trigger used to update a table.
|
<filename>exercicio-funcionario/tbfuncionario.sql
USE bdSorveteria
SELECT * FROM tbfuncionario
UPDATE tbfuncionario SET nomefuncionario = '<NAME>', datanascfuncionario = '16/12/1990' WHERE codfuncionario = 1
UPDATE tbfuncionario SET nomefuncionario = '<NAME>', datanascfuncionario = '11/05/1990' WHERE codfuncionario = 2 |
<reponame>lgcarrier/AFW
SET DEFINE OFF;
CREATE UNIQUE INDEX AFW_01_CONFG_EVENM_NOTFB_LA_PK ON AFW_01_CONFG_EVENM_NOTFB_LANG
(SEQNC)
LOGGING
/
|
<filename>EntangloWebService/EntangloDbScripts (Identity)/getuser.sql
/*#######################################################################################################
# TYPE: Stored Procedure #
# NAME: getuser #
# SUMMARY: Retrieves a specified users information. #
# PARAMETERS: user name, requesting user name #
# RETURNS: query (json) #
# CREATED BY: <NAME> and <NAME> #
#######################################################################################################*/
-- Function: getuser(text, text)
-- DROP FUNCTION getuser(text, text);
CREATE OR REPLACE FUNCTION getuser(
--integer,
text,
text
)
RETURNS json /*(userid integer, userkey integer, username character varying (50), userpassword character varying (50),
databasename character varying (50), useremail character varying (50), usernote character varying (200),
usercreated timestamp without time zone, usermodified timestamp without time zone,
userremoved timestamp without time zone)*/
as
$BODY$
DECLARE
--_userKey ALIAS FOR $1; -- Unique user identifier
_userName ALIAS FOR $1; -- Users name
_reqUser ALIAS FOR $2; -- Requesting User
_req_user_id text; -- Requesting users id
_req_user_access boolean := false; -- Requesting users create access rights
begin
/* Check that the requesting user is not null or blank */
if _reqUser is null or _reqUser = '' then
raise exception 'getuser: ERROR RETRIEVING USER AS REQUESTING USER "%" IS NULL OR BLANK', _reqUser;
end if;
/* Check that the requesting user exists */
if (select exists(select 1 from "AspNetUsers" where upper("UserName") = upper(_reqUser))) is true then
select "Id" from "AspNetUsers" into _req_user_id where upper("UserName") = upper(_reqUser);
if _req_user_id is null then
raise exception 'getuser: ERROR RETRIEVING USER AS REQUESTING USER "%" DOES NOT EXIST!', _reqUser;
end if;
end if;
/* Check that the requesting user has access to read another users information */
select checkaccess(_reqUser, 'getuser') into _req_user_access;
if _req_user_access is false then
raise exception 'getuser: ERROR RETRIEVING USER AS REQUESTING USER "%" DOES NOT HAVE ACCESS TO "READ USER"!', _reqUser;
end if;
/* Check that the user name is not null or blank */
if _userName is null OR _userName = '' then
raise exception 'getuser: ERROR RETRIEVING USER AS USER NAME IS NULL OR BLANK';
end if;
/* Verify that the users name doesn't exist */
if (select exists(select 1 from "AspNetUsers" where upper("UserName") = upper(_userName))) is false then
raise exception 'getuser: ERROR RETRIEVING USER AS USER NAME "%" DOES NOT EXIST!', _userName;
end if;
-- /* Check if the user key was given and is not null or blank */
-- if _userKey is null or _userKey = 0 then
-- raise exception 'getuser ERROR RETRIEVING USER AS THE USER KEY IS NULL!';
-- END IF;
--
-- /* Verify that the users unique user name and user key doesn't already exist */
-- if (select exists(select 1 from "user" where "UserKey" = _userKey)) is FALSE then
-- raise exception 'getuser: ERROR RETRIEVING USER AS UNIQUE USER KEY "%" DOES NOT EXIST!', _userKey;
-- end if;
/* Query User */
--return QUERY
return
array_to_json(array_agg(row_to_json(r))) from ( select "Id", "Email", "UserName", "PhoneNumber", "NormalizedUserName"
from "AspNetUsers" WHERE lower("UserName") = lower(_userName)) r;
--from "AspNetUsers" WHERE lower("UserName") = lower(_userName) and "UserKey" = _userKey;
-- return _response; -- Return user created response message
end;
$BODY$
language plpgsql volatile
cost 100;
alter function getuser(text, text)
owner to ggil;
COMMENT ON function getuser(text, text)
IS '[*New* --Marcus--] Returns a specified users information'; |
SELECT count(distinct ws_order_number) as order_count,
sum(ws_ext_ship_cost) as total_shipping_cost,
sum(ws_net_profit) as total_net_profit
FROM web_sales ws1
JOIN customer_address ca ON (ws1.ws_ship_addr_sk = ca.ca_address_sk)
JOIN web_site s ON (ws1.ws_web_site_sk = s.web_site_sk)
JOIN date_dim d ON (ws1.ws_ship_date_sk = d.d_date_sk)
LEFT SEMI JOIN (SELECT ws2.ws_order_number as ws_order_number
FROM web_sales ws2 JOIN web_sales ws3
ON (ws2.ws_order_number = ws3.ws_order_number)
WHERE ws2.ws_warehouse_sk <> ws3.ws_warehouse_sk) ws_wh1
ON (ws1.ws_order_number = ws_wh1.ws_order_number)
LEFT OUTER JOIN web_returns wr1 ON (ws1.ws_order_number = wr1.wr_order_number)
WHERE d.d_date between '2001-05-01' and date_add('2001-05-01',60) and
ca.ca_state = 'PA' and
s.web_company_name = 'pri' and
wr1.wr_order_number is null
limit 100;
|
CREATE TABLE `hDatabaseStructure` (
`hDatabaseTable` varchar(50) NOT NULL,
`hDatabaseVersion` int(5) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
<reponame>HostVanyaD/SoftUni<filename>MS SQL/Exams/Exam Preparation 2/06.StudentsTeachers.sql
SELECT
s.FirstName
,s.LastName
,COUNT(st.TeacherId) AS TeachersCount
FROM Students AS s
JOIN StudentsTeachers AS st ON s.Id = st.StudentId
GROUP BY s.Id, s.FirstName, s.LastName
ORDER BY s.LastName
|
CREATE TABLE [dwh].[DimDate] (
[DateSK] INT NOT NULL,
[DateBK] DATE NULL,
[CalendarMonth] SMALLINT NULL,
[CalendarMonthLongName] NVARCHAR(9) NULL,
[CalendarMonthShortName] NVARCHAR(3) NULL,
[CalendarQuarter] SMALLINT NULL,
[CalendarQuarterShortName] NVARCHAR(2) NULL,
[CalendarYear] NVARCHAR(4) NULL,
[CalendarYearMonth] NVARCHAR(7) NULL,
[CalendarYearQuarter] NVARCHAR(10) NULL,
[DayLongName] NVARCHAR(9) NULL,
[DayShortName] NVARCHAR(3) NULL,
[DayWeekNumber] SMALLINT NULL,
[sysCreatedAt] DATETIME DEFAULT GETUTCDATE(),
[sysChangedAt] DATETIME DEFAULT GETUTCDATE(),
[sysChangedBy] INT NOT NULL DEFAULT -1,
[sysCreatedBy] INT NOT NULL DEFAULT -1,
CONSTRAINT [PK_DimDate] PRIMARY KEY CLUSTERED
(
[DateSK] ASC
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) |
create or replace package flow_api_pkg
as
/********************************************************************************
**
** FLOW INSTANCE OPERATIONS (Create, Start, Reset, Terminate, Delete)
** STEP OPERATIONS (Reserve, Release, Complete)
**
********************************************************************************/
/***
Function flow_create
creates a new process instance based on a diagram name and version (process specification)
If the version is not specified,
first lookup is to use dgrm_status = 'released'
second lookup is to use dgrm_version = '0' and dgrm_status = 'draft'
If nothing is found based on above rules an exception will be raised.
For accuracy, it's recommended that you specify a version or use the form of flow_create specifying dgrm_id directly.
Returns: Process ID of the newly created process
*/
function flow_create
(
pi_dgrm_name in flow_diagrams.dgrm_name%type
, pi_dgrm_version in flow_diagrams.dgrm_version%type default null
, pi_prcs_name in flow_processes.prcs_name%type
) return flow_processes.prcs_id%type;
/***
Function flow_create
creates a new process instance based on a diagram id and version (process specification)
Returns: Process ID of the newly created process
*/
function flow_create
(
pi_dgrm_id in flow_diagrams.dgrm_id%type
, pi_prcs_name in flow_processes.prcs_name%type
) return flow_processes.prcs_id%type;
/***
Procedure flow_create
creates a new process instance based on a diagram name and version (process specification)
if the version is not specified, it looks for a copy of the diagram having dgrm_status = 'released'
For accuracy, it's recommended that you specify a version or use the form of flow_create specifying dgrm_id directly.
*/
procedure flow_create
(
pi_dgrm_name in flow_diagrams.dgrm_name%type
, pi_dgrm_version in flow_diagrams.dgrm_version%type default null
, pi_prcs_name in flow_processes.prcs_name%type
);
/***
Procedure flow_create
creates a new process instance based on a diagram id and version (process specification)
*/
procedure flow_create
(
pi_dgrm_id in flow_diagrams.dgrm_id%type
, pi_prcs_name in flow_processes.prcs_name%type
);
/***
Procedure flow_start
Starts a process that was previously created by flow_create.
Flow_start will create the initial subflow, set the current event to the diagram's start event,
then step on to the next object in the process diagram
*/
procedure flow_start
(
p_process_id in flow_processes.prcs_id%type
);
/***
Procedure flow_reserve_step
Reservation is a light-weight process for a user to indicate to other users that he/she intends to work on
the current task in order to prevent multiple users working on the same task at the same time.
A reservation is typically made by supplying the reserving user's username as the p_reservation parameter
(although an application could come up with some other scheme for the reservation parameter, and so it is not
restricted to being a userid). Other users will be able to see that a reservation has been placed on a step.
Reservations are purely a signalling mechanism; no enforcement is taken in the engine
to restrict other users from undertaking a task reserved by somebody.
A reservation can be released using the flow_release_step procedure.
A reservation applies only to the current task waiting to be completed. Once the task is completed, there is
no reservation carried forward onto future tasks in the process.
Reservation is not an authorization control, and is not security relevant / enforcing in the engine.
*/
procedure flow_reserve_step
(
p_process_id in flow_processes.prcs_id%type
, p_subflow_id in flow_subflows.sbfl_id%type
, p_reservation in flow_subflows.sbfl_reservation%type
);
/***
Procedure flow_release_step
Release step is part of the reservation process. See documentation for flow_reserve_step.
Flow_release_step releases a previously made reservation.
*/
procedure flow_release_step
(
p_process_id in flow_processes.prcs_id%type
, p_subflow_id in flow_subflows.sbfl_id%type
);
/***
Procedure flow_start_step
flow_start_step can optionally be called when a user is about to start working on a task. flow_start_step records the start time for
work on the task, which is used to distinguish betweeen time waiting for the task to get worked on and the time that it is actually
being worked on. Flow_start_step does not perform any functional role in processing a flow instance, and is optional - but it
just helps gather process performance statistics that distinguish queing time from processing time.
Despite being optional, a well formed, best-practice application will use this call so that process statistics can be captured.
*/
procedure flow_start_step
(
p_process_id in flow_processes.prcs_id%type
, p_subflow_id in flow_subflows.sbfl_id%type
);
/*** Procedure flow_restart_step
flow_restart_step is procedure that is designed to be called by an administrator to restart a scriptTask or serviceTask that has
failed due to an error. The intended usage is that the adminstrator can fix the script or edit the process data that caused the
task to fail, and then restart the task using this call.
A comment can optionally be provided, which will be added to the task event log entry.
It should only be used on a subflow having a status of 'error'
*/
procedure flow_restart_step
(
p_process_id in flow_processes.prcs_id%type
, p_subflow_id in flow_subflows.sbfl_id%type
, p_comment in flow_instance_event_log.lgpr_comment%type default null
);
/***
Procedure flow_complete_step
Flow_complete_step is called when a process step has been completed. Calling flow_complete_step moves the process
forward to the next object(s) in the process diagram, in acordance with the behaviour rules for the objects.
History: Flow_complete_step replaces the flow_next_step call in versions prior to V5. Unlike flow_next_step, flow_complete_step
is used to move a process forward, regardless of the object type.
*/
procedure flow_complete_step
(
p_process_id in flow_processes.prcs_id%type
, p_subflow_id in flow_subflows.sbfl_id%type
);
/***
Procedure flow_reset
flow_reset aborts all processing on a process instance, and returns it to the state when it was
initially created. After a reset, you then need to call flow_start to re-start the process instance.
flow_reset is only provided for debug and test usage; for production usage, always delete and start a new process
After a reset:
- process instance status is reset to created.
- process instance progress is deleted.
- process variables are LEFT untouched.
This is not meant for use in Production Systems.
*/
procedure flow_reset
(
p_process_id in flow_processes.prcs_id%type
, p_comment in flow_instance_event_log.lgpr_comment%type default null
);
/***
Procedure flow_terminate
flow_delete ends all processing of a process instance, and has the same effect as processing a Terminating End Event inside a Flow Diagram.
It ends all subflows, but retains the process definition and the subflow logs for the process.
*/
procedure flow_terminate
(
p_process_id in flow_processes.prcs_id%type
, p_comment in flow_instance_event_log.lgpr_comment%type default null
);
/***
Procedure flow_delete
flow_delete ends all processing of a process instance. It removes all subflows and subflow logs of the process.
*/
procedure flow_delete
(
p_process_id in flow_processes.prcs_id%type
, p_comment in flow_instance_event_log.lgpr_comment%type default null
);
/********************************************************************************
**
** APPLICATION HELPERS (URL Builder, etc.)
**
********************************************************************************/
-- get_current_usertask_url
-- used to build a URL for the current task on the specified subflow
-- this is used in, for example, task inboxes to create link to the APEX page that
-- should be called by the user to perform the current userTask object
function get_current_usertask_url
(
p_process_id in flow_processes.prcs_id%type
, p_subflow_id in flow_subflows.sbfl_id%type
) return varchar2;
-- message
-- returns a Flows for APEX error message with p0...p9 substitutions in p_lang
function message
( p_message_key in varchar2
, p_lang in varchar2 default 'en'
, p0 in varchar2 default null
, p1 in varchar2 default null
, p2 in varchar2 default null
, p3 in varchar2 default null
, p4 in varchar2 default null
, p5 in varchar2 default null
, p6 in varchar2 default null
, p7 in varchar2 default null
, p8 in varchar2 default null
, p9 in varchar2 default null
) return varchar2;
end flow_api_pkg;
/
|
<gh_stars>100-1000
-- randexpr1.test
--
-- db eval {SELECT case when case ~( -t1.e)-a when coalesce((select max(case +t1.e when t1.b*~19 | t1.a*case when c-c<>19 then 13 else c end*d+t1.c then f else 17 end) from t1 where d<=e), -d) then 19 else 17 end in (t1.b,19,c) then 19 when t1.a in (select a from t1 union select 13 from t1) then t1.d else t1.d end FROM t1 WHERE NOT ((select abs(cast(avg(t1.d*t1.f) AS integer))-cast(avg(b) AS integer) from t1)-~coalesce((select max(t1.a+t1.d-coalesce((select max(a*case when t1.e<=e then f when t1.d<>a then 11 else 11 end*t1.a*11) from t1 where t1.d>=d),t1.f)) from t1 where 11 not between (13) and 17),f)*t1.b+17-e not in (t1.d,t1.f,t1.f))}
SELECT case when case ~( -t1.e)-a when coalesce((select max(case +t1.e when t1.b*~19 | t1.a*case when c-c<>19 then 13 else c end*d+t1.c then f else 17 end) from t1 where d<=e), -d) then 19 else 17 end in (t1.b,19,c) then 19 when t1.a in (select a from t1 union select 13 from t1) then t1.d else t1.d end FROM t1 WHERE NOT ((select abs(cast(avg(t1.d*t1.f) AS integer))-cast(avg(b) AS integer) from t1)-~coalesce((select max(t1.a+t1.d-coalesce((select max(a*case when t1.e<=e then f when t1.d<>a then 11 else 11 end*t1.a*11) from t1 where t1.d>=d),t1.f)) from t1 where 11 not between (13) and 17),f)*t1.b+17-e not in (t1.d,t1.f,t1.f)) |
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100
-- file:inherit.sql ln:718 expect:true
create table pp_recpart_23 partition of pp_recpart for values in ('(2,3)')
|
<reponame>kanhiyaa/leetcode-js
# Write your MySQL query statement below
select
extra as report_reason
,count(distinct post_id) as report_count
from Actions
where action_date = '2019-07-04'
and action = 'report'
group by extra;
|
<filename>utils/db-schema-update/0.61.1-0.62.0.sql
ALTER TABLE `poll` ADD COLUMN `total_voter_count` int UNSIGNED COMMENT 'Total number of users that voted in the poll' AFTER `options`;
ALTER TABLE `poll` ADD COLUMN `is_anonymous` tinyint(1) DEFAULT 1 COMMENT 'True, if the poll is anonymous' AFTER `is_closed`;
ALTER TABLE `poll` ADD COLUMN `type` char(255) COMMENT 'Poll type, currently can be “regular” or “quiz”' AFTER `is_anonymous`;
ALTER TABLE `poll` ADD COLUMN `allows_multiple_answers` tinyint(1) DEFAULT 0 COMMENT 'True, if the poll allows multiple answers' AFTER `type`;
ALTER TABLE `poll` ADD COLUMN `correct_option_id` int UNSIGNED COMMENT '0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.' AFTER `allows_multiple_answers`;
ALTER TABLE `message` ADD COLUMN `dice` TEXT COMMENT 'Message is a dice with random value from 1 to 6' AFTER `poll`;
CREATE TABLE IF NOT EXISTS `poll_answer` (
`poll_id` bigint UNSIGNED COMMENT 'Unique poll identifier',
`user_id` bigint NOT NULL COMMENT 'The user, who changed the answer to the poll',
`option_ids` text NOT NULL COMMENT '0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.',
`created_at` timestamp NULL DEFAULT NULL COMMENT 'Entry date creation',
PRIMARY KEY (`poll_id`),
FOREIGN KEY (`poll_id`) REFERENCES `poll` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
ALTER TABLE `telegram_update` ADD COLUMN `poll_answer_poll_id` bigint UNSIGNED DEFAULT NULL COMMENT 'A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.' AFTER `poll_id`;
ALTER TABLE `telegram_update` ADD KEY `poll_answer_poll_id` (`poll_answer_poll_id`);
ALTER TABLE `telegram_update` ADD FOREIGN KEY (`poll_answer_poll_id`) REFERENCES `poll_answer` (`poll_id`);
|
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.31.10
-- Generation Time: Dec 19, 2020 at 05:44 AM
-- Server version: 10.4.16-MariaDB
-- PHP Version: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `report_sy`
--
-- --------------------------------------------------------
--
-- Table structure for table `sy_brand`
--
CREATE TABLE `sy_brand` (
`b_id` varchar(20) CHARACTER SET utf8 NOT NULL,
`b_name` varchar(50) CHARACTER SET utf8 NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `sy_brand`
--
INSERT INTO `sy_brand` (`b_id`, `b_name`) VALUES
('b001', 'LG inverter'),
('b002', 'Mitsubishi Electric Mr.Slim'),
('b003', 'Samsung'),
('b004', 'Daikin'),
('b005', 'Carrier'),
('b006', 'CENTRAL AIR'),
('b007', 'Saijo Denki'),
('b008', 'Panasonic'),
('b009', 'EMINENT'),
('b010', 'Misubishi Heavy Duty'),
('b011', 'York');
-- --------------------------------------------------------
--
-- Table structure for table `sy_check`
--
CREATE TABLE `sy_check` (
`c_id` varchar(20) NOT NULL,
`c_list` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `sy_check`
--
INSERT INTO `sy_check` (`c_id`, `c_list`) VALUES
('c001', 'ตรวจสอบอุณหภูมิหน้าเครื่อง (°C)'),
('c002', 'ตรวจสอบแรงลมหน้าเครื่อง (เมตร/วินาที)'),
('c003', 'ตรวจสอบแรงดันน้ำยาแอร์ (PSI.)'),
('c004', 'ตรวจสอบกระแสไฟของคอมเพรสเซอร์.');
-- --------------------------------------------------------
--
-- Table structure for table `sy_overview`
--
CREATE TABLE `sy_overview` (
`v_id` varchar(20) NOT NULL,
`v_list` varchar(200) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `sy_overview`
--
INSERT INTO `sy_overview` (`v_id`, `v_list`) VALUES
('v002', '• ผลการตรวจสอบก่อนการล้าง สภาพทางกายภาพของเครื่องปรับอากาศ คอยล์ร้อน/เย็น อยู่ในเกณฑ์'),
('v001', '• ผลการตรวจสอบก่อนการล้าง ปริมาณฝุ่นที่สะสมอยู่ในคอยล์เย็น อยู่ในเกณฑ์'),
('v003', '• ผลการตรวจสอบ สภาพการทำงานของคอยล์เย็น หลังล้าง อยู่ในเกณฑ์'),
('v004', '• ผลการตรวจสอบ สภาพการทำงานของคอยล์ร้อน หลังล้าง อยู่ในเกณฑ์'),
('v005', '• ผลการตรวจสอบ การทำอุณหภูมิ หลังล้าง ทำอุณหภูมิได้ อยู่ในเกณฑ์'),
('v006', '• ผลการตรวจสอบ แรงลมของพัดลมที่คอยล์เย็น หลังล้าง อยู่ในเกณฑ์'),
('v007', '• ผลการตรวจสอบ แรงดันน้ำยาทำความเย็น หลังล้าง อยู่ในเกณฑ์');
-- --------------------------------------------------------
--
-- Table structure for table `sy_refrig`
--
CREATE TABLE `sy_refrig` (
`r_id` varchar(20) CHARACTER SET utf8 NOT NULL,
`r_name` varchar(50) CHARACTER SET utf8 NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `sy_refrig`
--
INSERT INTO `sy_refrig` (`r_id`, `r_name`) VALUES
('r001', 'R410A'),
('r002', 'R22'),
('r003', 'R32');
-- --------------------------------------------------------
--
-- Table structure for table `sy_status`
--
CREATE TABLE `sy_status` (
`s_id` varchar(20) CHARACTER SET utf8 NOT NULL,
`s_name` varchar(50) CHARACTER SET utf8 NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `sy_status`
--
INSERT INTO `sy_status` (`s_id`, `s_name`) VALUES
('s001', 'ปกติ'),
('s002', 'ไม่ปกติ'),
('s003', 'ยังไม่ได้รับการตรวจสอบ'),
('s004', 'ตรวจสอบไม่ได้');
-- --------------------------------------------------------
--
-- Table structure for table `sy_team`
--
CREATE TABLE `sy_team` (
`t_id` varchar(20) CHARACTER SET utf8 NOT NULL,
`t_head` varchar(70) CHARACTER SET utf8 NOT NULL,
`t_number` varchar(10) CHARACTER SET utf8 NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `sy_team`
--
INSERT INTO `sy_team` (`t_id`, `t_head`, `t_number`) VALUES
('t001', 'ณัตพงษ์ แก้วทา', '1'),
('t002', 'วิทูร พลทวี', '2'),
('t003', 'ลิขิต กอนมนตร', '3'),
('t004', 'ณัฐิวุฒิ กลีบบัวทอง', '4'),
('t005', 'กรกฏ เรืองฤทธิ์', '5'),
('t006', 'ศราวุธ ส่วยรัก', '6');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `sy_brand`
--
ALTER TABLE `sy_brand`
ADD PRIMARY KEY (`b_id`);
--
-- Indexes for table `sy_check`
--
ALTER TABLE `sy_check`
ADD PRIMARY KEY (`c_id`);
--
-- Indexes for table `sy_overview`
--
ALTER TABLE `sy_overview`
ADD PRIMARY KEY (`v_id`);
--
-- Indexes for table `sy_refrig`
--
ALTER TABLE `sy_refrig`
ADD PRIMARY KEY (`r_id`);
--
-- Indexes for table `sy_status`
--
ALTER TABLE `sy_status`
ADD PRIMARY KEY (`s_id`);
--
-- Indexes for table `sy_team`
--
ALTER TABLE `sy_team`
ADD PRIMARY KEY (`t_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 */;
|
-- 12.02.2017 15:42
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-02-12 15:42:02','YYYY-MM-DD HH24:MI:SS'),Name='Organisation',Description='Organisational entity within client',Help='An organisation is a unit of your client or legal entity - examples are store, department. You can share data between organisations.' WHERE AD_Field_ID=3155 AND AD_Language='en_US'
;
-- 12.02.2017 15:42
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-02-12 15:42:46','YYYY-MM-DD HH24:MI:SS'),Name='Letter Salutation' WHERE AD_Field_ID=551741 AND AD_Language='en_US'
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Section (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,282,540052,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Y','main',10,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Column (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy) VALUES (0,0,540074,540052,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Y',10,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Column (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy) VALUES (0,0,540075,540052,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Y',20,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,UIStyle,Updated,UpdatedBy) VALUES (0,0,540074,540102,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Y','default',10,'primary',TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,3154,0,282,540102,541473,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Mandant für diese Installation.','Ein Mandant ist eine Firma oder eine juristische Person. Sie können keine Daten über Mandanten hinweg verwenden. .','Y','N','Y','Y','N','Mandant',10,10,0,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,3155,0,282,540102,541474,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Organisatorische Einheit des Mandanten','Eine Organisation ist ein Bereich ihres Mandanten - z.B. Laden oder Abteilung. Sie können Daten über Organisationen hinweg gemeinsam verwenden.','Y','N','Y','Y','N','Sektion',20,20,0,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,3162,0,282,540102,541475,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','N','Y','Y','N','Name',30,30,0,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,3159,0,282,540102,541476,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Der Eintrag ist im System aktiv','Es gibt zwei Möglichkeiten, einen Datensatz nicht mehr verfügbar zu machen: einer ist, ihn zu löschen; der andere, ihn zu deaktivieren. Ein deaktivierter Eintrag ist nicht mehr für eine Auswahl verfügbar, aber verfügbar für die Verwendung in Berichten. Es gibt zwei Gründe, Datensätze zu deaktivieren und nicht zu löschen: (1) Das System braucht den Datensatz für Revisionszwecke. (2) Der Datensatz wird von anderen Datensätzen referenziert. Z.B. können Sie keinen Geschäftspartner löschen, wenn es Rechnungen für diesen Geschäftspartner gibt. Sie deaktivieren den Geschäftspartner und verhindern, dass dieser Eintrag in zukünftigen Vorgängen verwendet wird.','Y','N','Y','Y','N','Aktiv',40,40,0,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,3158,0,282,540102,541477,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Für Briefe - z.B. "Sehr geehrter {0}" oder "Sehr geehrter Herr {0}" - Zur Laufzeit wird "{0}" durch den Namen ersetzt','Anrede definiert, was auf einem Brief an einen Geschäftspartner gedruckt wird.','Y','N','Y','Y','N','Anrede',50,50,0,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,3161,0,282,540102,541478,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Nur den ersten Namen bei Anreden drucken','Das Selektionsfeld "Nur erster Name" zeigt an, dass nur der erste Name dieses Kontaktes bei der Anrede gedruckt weren soll.','Y','N','Y','Y','N','Nur erster Name',60,60,0,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,3160,0,282,540102,541479,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Default value','The Default Checkbox indicates if this record will be used as a default value.','Y','N','Y','Y','N','Standard',70,70,0,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,551741,0,282,540102,541480,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','Y','N','Briefanrede',80,80,0,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Section (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,283,540053,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Y','main',10,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Column (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy) VALUES (0,0,540076,540053,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Y',10,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,UIStyle,Updated,UpdatedBy) VALUES (0,0,540076,540103,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Y','default',10,'primary',TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,3163,0,283,540103,541481,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Mandant für diese Installation.','Ein Mandant ist eine Firma oder eine juristische Person. Sie können keine Daten über Mandanten hinweg verwenden. .','Y','N','N','Y','N','Mandant',0,10,0,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,3165,0,283,540103,541482,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Organisatorische Einheit des Mandanten','Eine Organisation ist ein Bereich ihres Mandanten - z.B. Laden oder Abteilung. Sie können Daten über Organisationen hinweg gemeinsam verwenden.','Y','N','N','Y','N','Sektion',0,20,0,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,3166,0,283,540103,541483,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Anrede zum Druck auf Korrespondenz','Anrede, die beim Druck auf Korrespondenz verwendet werden soll.','Y','N','N','Y','N','Anrede',0,30,0,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,3164,0,283,540103,541484,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Sprache für diesen Eintrag','Definiert die Sprache für Anzeige und Aufbereitung','Y','N','N','Y','N','Sprache',0,40,0,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,3168,0,283,540103,541485,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Der Eintrag ist im System aktiv','Es gibt zwei Möglichkeiten, einen Datensatz nicht mehr verfügbar zu machen: einer ist, ihn zu löschen; der andere, ihn zu deaktivieren. Ein deaktivierter Eintrag ist nicht mehr für eine Auswahl verfügbar, aber verfügbar für die Verwendung in Berichten. Es gibt zwei Gründe, Datensätze zu deaktivieren und nicht zu löschen: (1) Das System braucht den Datensatz für Revisionszwecke. (2) Der Datensatz wird von anderen Datensätzen referenziert. Z.B. können Sie keinen Geschäftspartner löschen, wenn es Rechnungen für diesen Geschäftspartner gibt. Sie deaktivieren den Geschäftspartner und verhindern, dass dieser Eintrag in zukünftigen Vorgängen verwendet wird.','Y','N','N','Y','N','Aktiv',0,50,0,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,3169,0,283,540103,541486,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Diese Spalte ist übersetzt','Das Selektionsfeld "Übersetzt" zeigt an, dass diese Spalte übersetzt ist','Y','N','N','Y','N','Übersetzt',0,60,0,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,3170,0,283,540103,541487,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','N','N','Y','N','Name',0,70,0,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,3167,0,283,540103,541488,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Für Briefe - z.B. "Sehr geehrter {0}" oder "Sehr geehrter Herr {0}" - Zur Laufzeit wird "{0}" durch den Namen ersetzt','Anrede definiert, was auf einem Brief an einen Geschäftspartner gedruckt wird.','Y','N','N','Y','N','Anrede',0,80,0,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,551757,0,283,540103,541489,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N','Y','N','Briefanrede',0,90,0,TO_TIMESTAMP('2017-02-12 15:46:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 12.02.2017 15:46
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET SeqNo=10,Updated=TO_TIMESTAMP('2017-02-12 15:46:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541475
;
-- 12.02.2017 15:47
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET SeqNo=90,Updated=TO_TIMESTAMP('2017-02-12 15:47:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541473
;
-- 12.02.2017 15:47
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET SeqNo=85,Updated=TO_TIMESTAMP('2017-02-12 15:47:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541474
;
-- 12.02.2017 15:47
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET SeqNo=75,Updated=TO_TIMESTAMP('2017-02-12 15:47:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541476
;
-- 12.02.2017 15:48
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-02-12 15:48:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541473
;
-- 12.02.2017 15:48
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=10,Updated=TO_TIMESTAMP('2017-02-12 15:48:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541475
;
-- 12.02.2017 15:48
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=20,Updated=TO_TIMESTAMP('2017-02-12 15:48:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541477
;
-- 12.02.2017 15:48
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=30,Updated=TO_TIMESTAMP('2017-02-12 15:48:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541480
;
-- 12.02.2017 15:48
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=40,Updated=TO_TIMESTAMP('2017-02-12 15:48:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541478
;
-- 12.02.2017 15:48
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=50,Updated=TO_TIMESTAMP('2017-02-12 15:48:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541479
;
-- 12.02.2017 15:48
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=60,Updated=TO_TIMESTAMP('2017-02-12 15:48:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541476
;
-- 12.02.2017 15:48
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=70,Updated=TO_TIMESTAMP('2017-02-12 15:48:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541474
;
-- 12.02.2017 15:48
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=10,Updated=TO_TIMESTAMP('2017-02-12 15:48:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541477
;
-- 12.02.2017 15:48
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=20,Updated=TO_TIMESTAMP('2017-02-12 15:48:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541480
;
-- 12.02.2017 15:48
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=30,Updated=TO_TIMESTAMP('2017-02-12 15:48:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541478
;
-- 12.02.2017 15:48
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=40,Updated=TO_TIMESTAMP('2017-02-12 15:48:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541479
;
-- 12.02.2017 15:48
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=50,Updated=TO_TIMESTAMP('2017-02-12 15:48:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541474
;
|
/* Dungeon Normal for 5 people */
/* Trash Mobs & Bosses*/
-- Jammal'an the Prophet
SET @ENTRY := 5710;
SET @ENTRYTOTEM := 6066;
SET @TOTEMSPELL := 8377;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
UPDATE `creature_template` SET `AIName`='0' WHERE `entry`=@ENTRYTOTEM;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRYTOTEM;
UPDATE `creature_template` SET `spell1`=@TOTEMSPELL WHERE `entry`=@ENTRYTOTEM;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,4,0,100,3,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Say Text on Aggro'),
(@ENTRY,0,1,0,0,0,100,2,0,0,31000,33000,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Say Text'),
(@ENTRY,0,2,0,0,0,100,2,8000,35000,20000,52000,11,12468,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Flamestrike'),
(@ENTRY,0,3,0,0,0,100,2,6000,16000,26000,36000,11,8376,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Earthgrab Totem'),
(@ENTRY,0,4,5,0,0,100,2,16000,19000,31000,53000,11,12480,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Hex of Jammal\'an'),
(@ENTRY,0,5,0,61,0,100,3,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Say Text'),
(@ENTRY,0,6,0,0,0,100,2,1000,1000,5000,7000,11,12492,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Healing Wave'),
(@ENTRY,0,7,8,6,0,100,3,0,0,0,0,32,5721,0,0,0,0,0,1,0,0,0,0,0,0,0,'Summon on Death'),
(@ENTRY,0,8,0,61,0,100,3,0,0,0,0,32,5720,0,0,0,0,0,1,0,0,0,0,0,0,0,'Summon on Death');
-- NPC talk text insert
SET @ENTRY := 5710;
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(@ENTRY,0,0, 'The shield be down! Rise up Atal\'ai! Rise up!',1,0,100,0,0,5861, 'combat Say'),
(@ENTRY,1,0, 'The Soulflayer comes!',1,0,100,0,0,5862, 'combat Say'),
(@ENTRY,2,0, 'Join us!',1,0,100,0,0,5864, 'combat Say');
-- Weaver
SET @ENTRY := 5720;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,3000,6000,6000,21000,11,12884,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Acid Breath'),
(@ENTRY,0,1,0,0,0,100,2,9000,14000,19000,34000,11,12882,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Wing Flap');
-- Shade of Eranikus
SET @ENTRY := 5709;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,2000,3000,8000,12000,11,3391,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Thrash'),
(@ENTRY,0,1,0,4,0,100,3,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Say Text on Aggro'),
(@ENTRY,0,2,0,0,0,100,2,7000,13000,16000,32000,11,12891,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Acid Breath'),
(@ENTRY,0,3,0,0,0,100,2,14000,18000,28000,39000,11,12890,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Deep Slumber'),
(@ENTRY,0,4,0,0,0,100,2,17000,20000,18000,22000,11,11876,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast War Stomp');
-- NPC talk text insert
SET @ENTRY := 5709;
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(@ENTRY,0,0, 'This evil cannot be allowed to enter this world! Come my children!',1,0,100,0,0,0, 'combat Say');
-- Ogom the Wretched
SET @ENTRY := 5711;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,4,0,100,3,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 1 on Aggro'),
(@ENTRY,0,1,0,4,1,100,3,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving on Aggro'),
(@ENTRY,0,2,0,4,1,100,3,0,0,0,0,11,12471,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast bolt on Aggro'),
(@ENTRY,0,3,0,9,1,100,2,0,40,3400,4700,11,12471,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast bolt'),
(@ENTRY,0,4,0,9,1,100,2,40,100,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Start Moving when not in bolt Range'),
(@ENTRY,0,5,0,9,1,100,2,10,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving at 15 Yards'),
(@ENTRY,0,6,0,9,1,100,2,0,40,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving when in bolt Range'),
(@ENTRY,0,7,0,3,1,100,2,0,15,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 2 at 15% Mana'),
(@ENTRY,0,8,0,3,2,100,2,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Start Moving at 15% Mana'),
(@ENTRY,0,9,0,3,2,100,2,30,100,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 1 When Mana is above 30%'),
(@ENTRY,0,10,0,0,1,100,2,9000,15000,37000,57000,11,11639,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Shadow Word: Pain'),
(@ENTRY,0,11,0,0,1,100,2,5400,5400,20000,26000,11,12493,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Curse of Weakness');
-- Atal'ai Deathwalker
SET @ENTRY := 5271;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,7000,14000,15000,32000,11,14032,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Shadow Word: Pain'),
(@ENTRY,0,1,0,0,0,100,2,9000,13000,13000,18000,11,34259,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Fear'),
(@ENTRY,0,2,0,6,0,100,3,0,0,0,0,11,12095,3,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Summon Atal\'ai Deathwalker\'s Spirit on Death');
-- Morphaz
SET @ENTRY := 5719;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,2000,6000,8000,17000,11,12884,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Acid Breath'),
(@ENTRY,0,1,0,0,0,100,2,8000,13000,18000,24000,11,12882,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Wing Flap');
-- Hazzas
SET @ENTRY := 5722;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,2000,6000,8000,17000,11,12884,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Acid Breath'),
(@ENTRY,0,1,0,0,0,100,2,8000,13000,18000,24000,11,12882,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Wing Flap');
-- Dreamscythe
SET @ENTRY := 5721;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,2000,6000,8000,17000,11,12884,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Acid Breath'),
(@ENTRY,0,1,0,0,0,100,2,8000,13000,18000,24000,11,12882,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Wing Flap');
-- Bloodworm
SET @ENTRY := 42850;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,2,0,100,3,0,50,0,0,11,81277,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Blood Gorged at 50% HP');
-- Capt<NAME> <Victim of the Nightmare>
SET @ENTRY := 14445;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,9000,12000,9000,12000,11,12533,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Acid Breath'),
(@ENTRY,0,1,0,9,0,100,2,0,5,5000,8000,11,15496,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Cleave on Close');
-- Atal'ai Priest
SET @ENTRY := 5269;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,4,0,100,3,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 1 on Aggro'),
(@ENTRY,0,1,0,4,1,100,3,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving on Aggro'),
(@ENTRY,0,2,0,4,1,100,3,0,0,0,0,11,9613,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast bolt on Aggro'),
(@ENTRY,0,3,0,9,1,100,2,0,40,3400,4700,11,9613,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast bolt'),
(@ENTRY,0,4,0,9,1,100,2,40,100,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Start Moving when not in bolt Range'),
(@ENTRY,0,5,0,9,1,100,2,10,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving at 15 Yards'),
(@ENTRY,0,6,0,9,1,100,2,0,40,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving when in bolt Range'),
(@ENTRY,0,7,0,3,1,100,2,0,15,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 2 at 15% Mana'),
(@ENTRY,0,8,0,3,2,100,2,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Start Moving at 15% Mana'),
(@ENTRY,0,9,0,3,2,100,2,30,100,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 1 When Mana is above 30%'),
(@ENTRY,0,10,0,2,2,100,3,0,15,0,0,22,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 3 at 15% HP'),
(@ENTRY,0,11,0,2,3,100,3,0,15,0,0,25,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Flee at 15% HP'),
(@ENTRY,0,12,0,7,3,100,3,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Reset on Evade'),
(@ENTRY,0,13,0,2,3,100,3,0,15,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Say Text at 15% HP'),
(@ENTRY,0,14,0,14,1,100,3,1000,30,0,0,11,11642,0,0,0,0,0,7,0,0,0,0,0,0,0,'Cast Heal on Friendlies');
-- NPC talk text insert
SET @ENTRY := 5269;
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(@ENTRY,0,0, '%s attempts to run away in fear!',2,0,100,0,0,0, 'combat Flee');
-- Atal'ai High Priest
SET @ENTRY := 5273;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,4,0,100,3,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 1 on Aggro'),
(@ENTRY,0,1,0,4,1,100,3,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving on Aggro'),
(@ENTRY,0,2,0,4,1,100,3,0,0,0,0,11,12471,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast bolt on Aggro'),
(@ENTRY,0,3,0,9,1,100,2,0,40,3400,4700,11,12471,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast bolt'),
(@ENTRY,0,4,0,9,1,100,2,40,100,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Start Moving when not in bolt Range'),
(@ENTRY,0,5,0,9,1,100,2,10,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving at 15 Yards'),
(@ENTRY,0,6,0,9,1,100,2,0,40,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving when in bolt Range'),
(@ENTRY,0,7,0,3,1,100,2,0,15,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 2 at 15% Mana'),
(@ENTRY,0,8,0,3,2,100,2,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Start Moving at 15% Mana'),
(@ENTRY,0,9,0,3,2,100,2,30,100,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 1 When Mana is above 30%'),
(@ENTRY,0,10,0,2,2,100,3,0,15,0,0,22,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 3 at 15% HP'),
(@ENTRY,0,11,0,2,3,100,3,0,15,0,0,25,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Flee at 15% HP'),
(@ENTRY,0,12,0,7,3,100,3,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Reset on Evade'),
(@ENTRY,0,13,0,2,3,100,3,0,15,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Say Text at 15% HP'),
(@ENTRY,0,14,0,14,1,100,2,2500,40,20000,30000,11,12039,0,0,0,0,0,7,0,0,0,0,0,0,0,'Cast Heal on Friendlies'),
(@ENTRY,0,15,0,2,1,100,3,0,30,0,0,11,12040,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Shadow Shield at 30% HP'),
(@ENTRY,0,16,0,0,1,100,2,10000,20000,60000,75000,11,12151,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Summon Atal\'ai Skeleton'),
(@ENTRY,0,17,0,2,1,100,3,0,40,0,0,11,8362,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Renew at 40% HP');
-- NPC talk text insert
SET @ENTRY := 5273;
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(@ENTRY,0,0, '%s attempts to run away in fear!',2,0,100,0,0,0, 'combat Flee');
-- Corrupted Guardian
SET @ENTRY := 46068;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,4,0,100,3,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 1 on Aggro'),
(@ENTRY,0,1,0,4,1,100,3,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving on Aggro'),
(@ENTRY,0,2,0,4,1,100,3,0,0,0,0,11,81109,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Poison Bolt on Aggro'),
(@ENTRY,0,3,0,9,1,100,2,5,30,3500,4100,11,81109,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Poison Bolt'),
(@ENTRY,0,4,0,9,1,100,2,30,100,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Start Moving when not in Poison Bolt Range'),
(@ENTRY,0,5,0,9,1,100,2,9,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving at 15 Yards'),
(@ENTRY,0,6,0,9,1,100,2,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Start Moving when not in Poison Bolt Range'),
(@ENTRY,0,7,0,9,1,100,2,5,30,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving when in Poison Bolt Range'),
(@ENTRY,0,8,0,0,1,100,2,2000,3000,18000,21000,11,11639,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Shadow Word: Pain');
-- Cursed Atal'ai
SET @ENTRY := 5243;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,2,0,100,3,0,15,0,0,11,12020,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Call of the Grave at 15% HP'),
(@ENTRY,0,1,0,0,0,100,2,3000,4000,12000,14000,11,75015,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Curse of Shadows'),
(@ENTRY,0,2,0,9,0,100,2,0,20,8000,10000,11,16583,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Shadow Shock on Close');
-- Enthralled Atal'ai
SET @ENTRY := 5261;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,5000,12000,18000,25000,11,12021,0,0,0,0,0,2,1,0,0,0,0,0,0,'Cast Fixate');
-- Hakkari Frostwing
SET @ENTRY := 5291;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,6000,10000,16000,32000,11,8398,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Frostbolt Volley'),
(@ENTRY,0,1,0,9,0,100,2,0,5,8000,17000,11,5708,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Swoop on Close'),
(@ENTRY,0,2,0,0,0,100,2,7000,16000,16000,28000,11,11831,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Frost Nova');
-- Gomora the Bloodletter
SET @ENTRY := 46623;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,5000,5000,15000,17000,11,79893,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Bloodworm'),
(@ENTRY,0,1,0,9,0,100,2,0,5,9000,11000,11,88844,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Cauterizing Strike on Close');
-- Hakkari Sapper
SET @ENTRY := 8336;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,15000,17000,10000,18500,11,11981,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Mana Burn'),
(@ENTRY,0,1,0,0,0,100,2,9000,14000,27000,33000,11,11019,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Wing Flap');
-- Mummified Atal'ai
SET @ENTRY := 5263;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,6000,11000,4000,10000,11,16186,0,0,0,0,0,2,32,0,0,0,0,0,0,'Cast Fevered Plague');
-- Murk Spitter
SET @ENTRY := 5225;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,3000,3000,12000,14000,11,6917,0,0,0,0,0,2,32,0,0,0,0,0,0,'Cast Venom Spit');
-- Nightmare Scalebane
SET @ENTRY := 5277;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,4500,10500,12000,17000,11,3248,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Improved Blocking');
-- Nightmare Wanderer
SET @ENTRY := 5283;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,13000,16000,12000,19000,11,11976,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Strike'),
(@ENTRY,0,1,0,9,0,100,2,0,5,23000,38000,11,12097,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Pierce Armor on Close');
-- Jammal'an the Prophet
SET @ENTRY := 46656;
SET @ENTRYTOTEM := 6066;
SET @TOTEMSPELL := 8377;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
UPDATE `creature_template` SET `AIName`='0' WHERE `entry`=@ENTRYTOTEM;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRYTOTEM;
UPDATE `creature_template` SET `spell1`=@TOTEMSPELL WHERE `entry`=@ENTRYTOTEM;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,2000,4000,17000,21000,11,8376,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Earthgrab Totem'),
(@ENTRY,0,1,0,0,0,100,2,5000,5000,12000,14000,11,12468,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Flamestrike'),
(@ENTRY,0,2,0,2,0,100,3,0,50,0,0,11,12492,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Healing Wave at 50% HP');
-- Nightmare Wyrmkin
SET @ENTRY := 5280;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,4,0,100,3,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 1 on Aggro'),
(@ENTRY,0,1,0,4,1,100,3,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving on Aggro'),
(@ENTRY,0,2,0,4,1,100,3,0,0,0,0,11,15653,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Acid Spit on Aggro'),
(@ENTRY,0,3,0,9,1,100,2,5,30,3500,4100,11,15653,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Acid Spit'),
(@ENTRY,0,4,0,9,1,100,2,30,100,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Start Moving when not in Acid Spit Range'),
(@ENTRY,0,5,0,9,1,100,2,9,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving at 15 Yards'),
(@ENTRY,0,6,0,9,1,100,2,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Start Moving when not in Acid Spit Range'),
(@ENTRY,0,7,0,9,1,100,2,5,30,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving when in Acid Spit Range'),
(@ENTRY,0,8,0,0,1,100,2,9000,14000,23000,27000,11,15970,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Sleep');
-- Priestess Udum'bra
SET @ENTRY := 46424;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,4,0,100,3,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 1 on Aggro'),
(@ENTRY,0,1,0,4,1,100,3,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving on Aggro'),
(@ENTRY,0,2,0,4,1,100,3,0,0,0,0,11,9613,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast bolt on Aggro'),
(@ENTRY,0,3,0,9,1,100,2,0,40,3400,4700,11,9613,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast bolt'),
(@ENTRY,0,4,0,9,1,100,2,40,100,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Start Moving when not in bolt Range'),
(@ENTRY,0,5,0,9,1,100,2,10,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving at 15 Yards'),
(@ENTRY,0,6,0,9,1,100,2,0,40,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Stop Moving when in bolt Range'),
(@ENTRY,0,7,0,3,1,100,2,0,15,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Set Phase 2 at 15% Mana'),
(@ENTRY,0,8,0,3,2,100,2,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Start Moving at 15% Mana'),
(@ENTRY,0,9,0,0,1,100,2,4000,5000,17000,19000,11,18266,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Curse of Agony');
|
drop table `hb_server_node`;
create table `hb_server_node`(
`id` bigint not null primary key auto_increment,
`app_name` varchar(100) not null comment '应用名称',
`host` varchar(100) not null comment '机器名',
`port` int not null comment '端口号',
`cpu` float not null comment 'cpu占用率',
`memory` bigint not null comment '剩余内存',
`memory_ratio` float not null comment '内存使用率',
`disk` bigint not null comment '剩余硬盘',
`disk_ratio` float not null comment '硬盘使用率',
`latency` bigint null comment '平均请求处理延时',
`payload` int not null comment '服务器负载',
`status` int not null comment '状态',
`next` bigint null comment '节点环中下一个结点',
`start_time` datetime not null comment '服务启动时间',
`ring_lock` int default 0 comment '并发锁',
`create_time` datetime not null comment '创建时间',
`update_time` datetime not null comment '更新时间'
)engine=InnoDB charset=utf8 comment='服务器结点信息表';
alter table `hb_server_node` add unique(`host`,`port`); |
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', 'mals_app', true);
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- TABLE: MAL_APPLICATION_USER
--
alter table mal_application_user
add constraint appusr_apprl_fk foreign key (application_role_id)
references mal_application_role(id)
on delete no action not deferrable initially immediate;
--
-- TABLE: MAL_DAIRY_FARM_TEST_RESULT
--
alter table mal_dairy_farm_test_result
add constraint dftr_dftj_fk foreign key (test_job_id)
references mal_dairy_farm_test_job(id)
on delete no action not deferrable initially immediate;
alter table mal_dairy_farm_test_result
add constraint dftr_lic_fk foreign key (licence_id)
references mal_licence(id)
on delete no action not deferrable initially immediate;
--
-- TABLE: MAL_FUR_FARM_INVENTORY
--
alter table mal_fur_farm_inventory
add constraint ffi_lic_fk foreign key (licence_id)
references mal_licence(id)
on delete no action not deferrable initially immediate;
--
alter table mal_fur_farm_inventory
add constraint ffi_lssc_fk foreign key (species_sub_code_id)
references mal_licence_species_sub_code_lu(id)
on delete no action not deferrable initially immediate;
--
-- TABLE: MAL_GAME_FARM_INVENTORY
--
alter table mal_game_farm_inventory
add constraint gfi_addrsn_fk foreign key (add_reason_code_id)
references mal_add_reason_code_lu(id)
on delete no action not deferrable initially immediate;
--
alter table mal_game_farm_inventory
add constraint gfi_delrsn_fk foreign key (delete_reason_code_id)
references mal_delete_reason_code_lu(id)
on delete no action not deferrable initially immediate;
--
alter table mal_game_farm_inventory
add constraint gfi_lic_fk foreign key (licence_id)
references mal_licence(id)
on delete no action not deferrable initially immediate;
--
alter table mal_game_farm_inventory
add constraint gfi_lssc_fk foreign key (species_sub_code_id)
references mal_licence_species_sub_code_lu(id)
on delete no action not deferrable initially immediate;
--
-- TABLE: MAL_LICENCE
--
alter table mal_licence
add constraint lic_lictyp_fk foreign key (licence_type_id)
references mal_licence_type_lu(id)
on delete no action not deferrable initially immediate;
--
alter table mal_licence
add constraint lic_rgst_fk foreign key (primary_registrant_id)
references mal_registrant(id)
on delete no action not deferrable initially immediate;
alter table mal_licence
add constraint lic_reg_fk foreign key (region_id)
references mal_region_lu(id)
on delete no action not deferrable initially immediate;
alter table mal_licence
add constraint lic_regdist_fk foreign key (regional_district_id)
references mal_regional_district_lu(id)
on delete no action not deferrable initially immediate;
--
alter table mal_licence
add constraint lic_lsc_fk foreign key (species_code_id)
references mal_licence_species_code_lu(id)
on delete no action not deferrable initially immediate;
alter table mal_licence
add constraint lic_stat_fk foreign key (status_code_id)
references mal_status_code_lu(id)
on delete no action not deferrable initially immediate;
alter table mal_licence
add constraint lic_plnt_fk foreign key (plant_code_id)
references mal_plant_code_lu(id)
on delete no action not deferrable initially immediate;
--
-- TABLE: MAL_LICENCE_COMMENT
--
alter table mal_licence_comment
add constraint liccmnt_lic_fk foreign key (licence_id)
references mal_licence(id)
on delete no action not deferrable initially immediate;
--
-- TABLE: MAL_LICENCE_PARENT_CHILD_XREF
--
alter table mal_licence_parent_child_xref
add constraint licprntchldxref_prntlic_fk foreign key (parent_licence_id)
references mal_licence(id)
on delete no action not deferrable initially immediate;
alter table mal_licence_parent_child_xref
add constraint licprntchldxref_chldlic_fk foreign key (child_licence_id)
references mal_licence(id)
on delete no action not deferrable initially immediate;
--
-- TABLE: MAL_LICENCE_REGISTRANT_XREF
--
alter table mal_licence_registrant_xref
add constraint licrgstxref_lic_fk foreign key (licence_id)
references mal_licence(id)
on delete no action not deferrable initially immediate;
alter table mal_licence_registrant_xref
add constraint licrgstxref_rgst_fk foreign key (registrant_id)
references mal_registrant(id)
on delete no action not deferrable initially immediate;
--
-- TABLE: MAL_LICENCE_TYPE_PARENT_CHILD_XREF
--
alter table mal_licence_type_parent_child_xref
add constraint lictypprntchldxref_prntlictyp_fk foreign key (parent_licence_type_id)
references mal_licence_type_lu(id)
on delete no action not deferrable initially immediate;
alter table mal_licence_type_parent_child_xref
add constraint lictypprntchldxref_chldlictyp_fk foreign key (child_licence_type_id)
references mal_licence_type_lu(id)
on delete no action not deferrable initially immediate;
--
-- TABLE: MAL_REGIONAL_DISTRICT
--
alter table mal_regional_district_lu
add constraint regdist_reg_fk foreign key (region_id)
references mal_region_lu(id)
on delete no action not deferrable initially immediate;
--
-- TABLE: MAL_SALE_YARD_INVENTORY
--
alter table mal_sale_yard_inventory
add constraint syi_lic_fk foreign key (licence_id)
references mal_licence(id)
on delete no action not deferrable initially immediate;
--
alter table mal_sale_yard_inventory
add constraint syi_syssc_fk foreign key (species_sub_code_id)
references mal_sale_yard_species_sub_code_lu(id)
on delete no action not deferrable initially immediate;
--
-- TABLE: MAL_SITE
--
alter table mal_site
add constraint site_lic_fk foreign key (licence_id)
references mal_licence(id)
on delete no action not deferrable initially immediate;
alter table mal_site
add constraint sitr_reg_fk foreign key (region_id)
references mal_region_lu(id)
on delete no action not deferrable initially immediate;
alter table mal_site
add constraint site_regdist_fk foreign key (regional_district_id)
references mal_regional_district_lu(id)
on delete no action not deferrable initially immediate;
alter table mal_site
add constraint site_stat_fk foreign key (status_code_id)
references mal_status_code_lu(id)
on delete no action not deferrable initially immediate;
--
-- TABLE: MAL_DAIRY_FARM_TANK
--
alter table mal_dairy_farm_tank
add constraint dft_site_fk foreign key (site_id)
references mal_site(id)
on delete no action not deferrable initially immediate;
--
-- TABLE: MAL_DAIRY_FARM_SPECIES_SUB_CODE_LU
--
alter table mal_dairy_farm_species_sub_code_lu
add constraint dfssc_dfsc_fk foreign key (species_code_id)
references mal_dairy_farm_species_code_lu(id)
on delete no action not deferrable initially immediate;
--
-- TABLE: MAL_LICENCE_SPECIES_CODE_LU
--
alter table mal_licence_species_code_lu
add constraint lsc_lictyp_fk foreign key (licence_type_id)
references mal_licence_type_lu(id)
on delete no action not deferrable initially immediate;
--
-- TABLE: MAL_LICENCE_SPECIES_SUB_CODE_LU
--
alter table mal_licence_species_sub_code_lu
add constraint lssc_sc_fk foreign key (species_code_id)
references mal_licence_species_code_lu(id)
on delete no action not deferrable initially immediate;
--
-- TABLE: MAL_SALE_YARD_SPECIES_SUB_CODE_LU
--
alter table mal_sale_yard_species_sub_code_lu
add constraint syssc_sysc_fk foreign key (species_code_id)
references mal_sale_yard_species_code_lu(id)
on delete no action not deferrable initially immediate;
|
<filename>inst/sql/sql_server/OptimizeConceptSetWithoutTempTable.sql<gh_stars>0
{DEFAULT @conceptSetConceptIdsExcluded = 0}
{DEFAULT @conceptSetConceptIdsDescendantsExcluded = 0}
{DEFAULT @conceptSetConceptIdsNotExcluded = 0}
{DEFAULT @conceptSetConceptIdsDescendantsNotExcluded = 0}
WITH conceptSetConceptsNotExcluded
AS (
-- Concepts that are part of the concept set definition that are "EXCLUDED = N, DECENDANTS = Y or N"
SELECT DISTINCT concept_id,
standard_concept,
invalid_reason
FROM @vocabulary_database_schema.concept
WHERE concept_id IN (@conceptSetConceptIdsNotExcluded)
),
conceptSetConceptsDescendantsNotExcluded
AS (
-- Concepts that are part of the concept set definition that are "EXCLUDED = N, DECENDANTS = Y"
SELECT DISTINCT ancestor_concept_id,
descendant_concept_id concept_id
FROM @vocabulary_database_schema.concept_ancestor
WHERE ancestor_concept_id IN (@conceptSetConceptIdsDescendantsNotExcluded)
AND ancestor_concept_id != descendant_concept_id -- Exclude the selected ancestor itself
),
conceptSetConceptsNonStandardMappedNotExcluded
AS (
SELECT cr.concept_id_1 concept_id,
cr.concept_id_2 concept_id_standard,
allStandard.concept_id available_standard_concept_id
FROM @vocabulary_database_schema.concept_relationship cr
INNER JOIN conceptSetConceptsNotExcluded ON concept_id = concept_id_1
LEFT JOIN (
SELECT DISTINCT concept_id
FROM conceptSetConceptsNotExcluded
WHERE ISNULL(standard_concept,'') = 'S'
UNION
SELECT DISTINCT concept_id
FROM conceptSetConceptsDescendantsNotExcluded
) allStandard
ON cr.concept_id_2 = allStandard.concept_id
AND relationship_id = 'Maps to'
WHERE ISNULL(standard_concept,'') = ''
AND ISNULL(cr.invalid_reason,'') = ''
),
conceptSetConceptsExcluded
AS (
-- Concepts that are part of the concept set definition that are "EXCLUDED = Y, DECENDANTS = Y or N"
SELECT DISTINCT concept_id,
standard_concept,
invalid_reason
FROM @vocabulary_database_schema.concept
WHERE concept_id IN (@conceptSetConceptIdsExcluded)
),
conceptSetConceptsDescendantsExcluded
AS (
-- Concepts that are part of the concept set definition that are "EXCLUDED = Y, DECENDANTS = Y"
SELECT DISTINCT ancestor_concept_id,
descendant_concept_id concept_id
FROM @vocabulary_database_schema.concept_ancestor
WHERE ancestor_concept_id IN (@conceptSetConceptIdsDescendantsExcluded)
AND ancestor_concept_id != descendant_concept_id -- Exclude the selected ancestor itself
),
conceptSetsIncluded
AS (
SELECT a.concept_id original_concept_id,
a.invalid_reason,
c1.concept_name original_concept_name,
b.ancestor_concept_id,
c3.concept_name ancestor_concept_name,
d.available_standard_concept_id mapped_concept_id,
c4.concept_name mapped_concept_name,
ISNULL(b.concept_id, d.available_standard_concept_id) subsumed_concept_id,
ISNULL(c2.concept_name, c4.concept_name) subsumed_concept_name
FROM conceptSetConceptsNotExcluded a
LEFT JOIN conceptSetConceptsDescendantsNotExcluded b ON a.concept_id = b.concept_id
LEFT JOIN conceptSetConceptsNonStandardMappedNotExcluded d ON a.concept_id = d.concept_id
LEFT JOIN @vocabulary_database_schema.concept c1 ON a.concept_id = c1.concept_id
LEFT JOIN @vocabulary_database_schema.concept c2 ON b.concept_id = c2.concept_id
LEFT JOIN @vocabulary_database_schema.concept c3 ON b.ancestor_concept_id = c3.concept_id
LEFT JOIN @vocabulary_database_schema.concept c4 ON d.available_standard_concept_id = c4.concept_id
),
conceptSetsExcluded
AS (
SELECT a.concept_id original_concept_id,
a.invalid_reason,
c1.concept_name original_concept_name,
b.ancestor_concept_id,
c3.concept_name ancestor_concept_name,
cast(NULL as int) mapped_concept_id,
cast(NULL as VARCHAR(255)) mapped_concept_name,
b.concept_id subsumed_concept_id,
c2.concept_name subsumed_concept_name
FROM conceptSetConceptsExcluded a
LEFT JOIN conceptSetConceptsDescendantsExcluded b ON a.concept_id = b.concept_id
LEFT JOIN @vocabulary_database_schema.concept c1 ON a.concept_id = c1.concept_id
LEFT JOIN @vocabulary_database_schema.concept c2 ON b.concept_id = c2.concept_id
LEFT JOIN @vocabulary_database_schema.concept c3 ON b.ancestor_concept_id = c3.concept_id
),
conceptSetOptimized
AS (
SELECT original_concept_id concept_id,
original_concept_name concept_name,
invalid_reason,
cast(0 as int) excluded,
cast(0 as int) removed
FROM conceptSetsIncluded
WHERE subsumed_concept_id = original_concept_id or
subsumed_concept_id IS NULL
union
SELECT original_concept_id concept_id,
original_concept_name concept_name,
invalid_reason,
cast(1 as int) excluded,
cast(0 as int) removed
FROM conceptSetsExcluded
WHERE subsumed_concept_id = original_concept_id or
subsumed_concept_id IS NULL
),
conceptSetRemoved
AS (
SELECT DISTINCT original_concept_id concept_id,
original_concept_name concept_name,
invalid_reason,
cast(0 as int) excluded,
cast(1 as int) removed
FROM conceptSetsIncluded
WHERE (subsumed_concept_id != original_concept_id and
subsumed_concept_id IS NOT NULL)
union
SELECT DISTINCT original_concept_id concept_id,
original_concept_name concept_name,
invalid_reason,
cast(1 as int) excluded,
cast(1 as int) removed
FROM conceptSetsExcluded
WHERE (subsumed_concept_id != original_concept_id and
subsumed_concept_id IS NOT NULL)
)
SELECT *
FROM conceptSetOptimized
WHERE concept_id IS NOT NULL
UNION
SELECT *
FROM conceptSetRemoved
WHERE concept_id IS NOT NULL; |
SELECT product_title, product_cat
FROM products p
INNER JOIN categories c
ON p.product_cat=c.cat_id; |
<reponame>zaina/nova<filename>nova/db/sqlalchemy/migrate_repo/versions/246_sqlite_downgrade.sql
CREATE TABLE pci_devices_new (
created_at DATETIME,
updated_at DATETIME,
deleted_at DATETIME,
deleted INTEGER,
id INTEGER NOT NULL,
compute_node_id INTEGER NOT NULL,
address VARCHAR(12) NOT NULL,
vendor_id VARCHAR(4) NOT NULL,
product_id VARCHAR(4) NOT NULL,
dev_type VARCHAR(8) NOT NULL,
dev_id VARCHAR(255),
label VARCHAR(255) NOT NULL,
status VARCHAR(36) NOT NULL,
extra_info TEXT,
instance_uuid VARCHAR(36),
PRIMARY KEY (id),
CONSTRAINT uniq_pci_devices0compute_node_id0address0deleted UNIQUE (compute_node_id, address, deleted)
);
INSERT INTO pci_devices_new
SELECT created_at,
updated_at,
deleted_at,
deleted,
id,
compute_node_id,
address,
vendor_id,
product_id,
dev_type,
dev_id,
label,
status,
extra_info,
instance_uuid
FROM pci_devices;
DROP TABLE pci_devices;
ALTER TABLE pci_devices_new RENAME TO pci_devices;
CREATE INDEX ix_pci_devices_compute_node_id_deleted
ON pci_devices (compute_node_id, deleted);
CREATE INDEX ix_pci_devices_instance_uuid_deleted
ON pci_devices (instance_uuid, deleted);
|
-- Deploy ggircs-portal:tables/emission_category_001 to pg
-- requires: tables/emission_category
begin;
alter table ggircs_portal.emission_category add column carbon_taxed boolean default true;
alter table ggircs_portal.emission_category add column category_definition varchar(100000);
comment on table ggircs_portal.emission_category is 'Table of emission categories used in the CIIP program as defined in Schedule A / Schedule B of the Greenhouse Gas Industrial Reporting and Control Act (https://www.bclaws.gov.bc.ca/civix/document/id/complete/statreg/249_2015#ScheduleA)';
comment on column ggircs_portal.emission_category.carbon_taxed is 'Boolean carbon_taxed column indicates whether or not a fuel reported in this category is taxed';
comment on column ggircs_portal.emission_category.category_definition is 'Definition of the emission_category as defined in Schedule A / Schedule B of the Greenhouse Gas Industrial Reporting and Control Act (https://www.bclaws.gov.bc.ca/civix/document/id/complete/statreg/249_2015#ScheduleA)';
commit;
|
<filename>deploy/db/db/db_schema.sql
DROP VIEW IF EXISTS public.beacon_data_summary;
DROP VIEW IF EXISTS public.beacon_dataset;
DROP VIEW IF EXISTS public.beacon_dataset_consent_code;
DROP TABLE IF EXISTS public.beacon_dataset_consent_code_table CASCADE;
DROP TABLE IF EXISTS public.consent_code_table;
DROP TABLE IF EXISTS public.consent_code_category_table;
DROP TABLE IF EXISTS public.tmp_data_sample_table;
DROP TABLE IF EXISTS public.tmp_sample_table;
DROP TABLE IF EXISTS public.beacon_data_sample_table CASCADE;
DROP TABLE IF EXISTS public.beacon_dataset_sample_table CASCADE;
DROP TABLE IF EXISTS public.beacon_data_table;
DROP TABLE IF EXISTS public.beacon_sample_table;
DROP TABLE IF EXISTS public.beacon_dataset_table;
CREATE TABLE public.beacon_dataset_table
(
id SERIAL NOT NULL PRIMARY KEY,
stable_id character varying(50) NOT NULL,
description character varying(800),
access_type character varying(10),
reference_genome character varying(50),
variant_cnt bigint NOT NULL,
call_cnt bigint,
sample_cnt bigint NOT NULL,
CONSTRAINT beacon_dataset_table_access_type_check CHECK (access_type = ANY (ARRAY['PUBLIC', 'REGISTERED', 'CONTROLLED']))
);
CREATE TABLE public.beacon_data_table (
id SERIAL NOT NULL PRIMARY KEY,
dataset_id integer NOT NULL REFERENCES public.beacon_dataset_table (id),
chromosome character varying(2) NOT NULL,
variant_id text,
reference text NOT NULL,
alternate text NOT NULL,
start integer NOT NULL,
"end" integer,
type character varying(10),
sv_length integer,
variant_cnt integer,
call_cnt integer,
sample_cnt integer,
matching_sample_cnt integer,
frequency decimal
);
CREATE TABLE public.beacon_sample_table (
id serial NOT NULL PRIMARY KEY,
stable_id text NOT NULL
);
CREATE TABLE public.beacon_dataset_sample_table (
id serial NOT NULL PRIMARY KEY,
dataset_id int NOT NULL REFERENCES beacon_dataset_table(id),
sample_id int NOT NULL REFERENCES beacon_sample_table(id),
UNIQUE (dataset_id, sample_id)
);
CREATE TABLE public.beacon_data_sample_table (
data_id int NOT NULL REFERENCES beacon_data_table(id),
sample_id int NOT NULL REFERENCES beacon_sample_table(id),
PRIMARY KEY (data_id, sample_id)
);
-- Temporary table for loading data into beacon_data_sample_table
CREATE TABLE public.tmp_data_sample_table (
dataset_id integer NOT NULL REFERENCES public.beacon_dataset_table (id),
chromosome character varying(2) NOT NULL,
variant_id text,
reference text NOT NULL,
alternate text NOT NULL,
start integer NOT NULL,
type character varying(10),
sample_ids text ARRAY[4] NOT NULL
);
CREATE TABLE tmp_sample_table (
id serial NOT NULL,
sample_stable_id text NOT NULL,
dataset_id int NOT NULL REFERENCES beacon_dataset_table(id)
);
-----------------------------------
---------- CONSENT CODES ----------
-----------------------------------
CREATE TABLE consent_code_category_table (
id serial PRIMARY KEY,
name character varying(11)
);
INSERT INTO consent_code_category_table(name) VALUES ('PRIMARY');
INSERT INTO consent_code_category_table(name) VALUES ('SECONDARY');
INSERT INTO consent_code_category_table(name) VALUES ('REQUIREMENT');
CREATE TABLE consent_code_table (
id serial PRIMARY KEY,
name character varying(100) NOT NULL,
abbr character varying(20) NOT NULL,
description character varying(400) NOT NULL,
additional_constraint_required boolean NOT NULL,
category_id int NOT NULL REFERENCES consent_code_category_table(id)
);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('No restrictions', 'NRES', 'No restrictions on data use.', false, 1);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('General research use and clinical care', 'GRU(CC)', 'For health/medical/biomedical purposes, including the study of population origins or ancestry.', false, 1);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('Health/medical/biomedical research and clinical care', 'HMB(CC)', 'Use of the data is limited to health/medical/biomedical purposes; does not include the study of population origins or ancestry.', false, 1);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('Disease-specific research and clinical care', 'DS-[XX](CC)', 'Use of the data must be related to [disease].', true, 1);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('Population origins/ancestry research', 'POA', 'Use of the data is limited to the study of population origins or ancestry.', false, 1);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('Oher research-specific restrictions', 'RS-[XX]', 'Use of the data is limited to studies of [research type] (e.g., pediatric research).', true, 2);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('Research use only', 'RUO', 'Use of data is limited to research purposes (e.g., does not include its use in clinical care).', false, 2);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('No “general methods” research', 'NMDS', 'Use of the data includes methods development research (e.g., development of software or algorithms) ONLY within the bounds of other data use limitations.', false, 2);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('Genetic studies only', 'GSO', 'Use of the data is limited to genetic studies only (i.e., no “phenotype-only” research).', false, 2);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('Not-for-profit use only', 'NPU', 'Use of the data is limited to not-for-profit organizations.', false, 3);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('Publication required', 'PUB', 'Requestor agrees to make results of studies using the data available to the larger scientific community.', false, 3);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('Collaboration required', 'COL-[XX]', 'Requestor must agree to collaboration with the primary study investigator(s).', true, 3);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('Ethics approval required', 'IRB', 'Requestor must provide documentation of local IRB/REC approval.', false, 3);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('Geographical restrictions', 'GS-[XX]', 'Use of the data is limited to within [geographic region].', true, 3);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('Publication moratorium/embargo', 'MOR-[XX]', 'Requestor agrees not to publish results of studies until [date].', true, 3);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('Time limits on use', 'TS-[XX]', 'Use of data is approved for [x months].', true, 3);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('User-specific restrictions', 'US', 'Use of data is limited to use by approved users.', false, 3);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('Project-specific restrictions', 'PS', 'Use of data is limited to use within an approved project.', false, 3);
INSERT INTO consent_code_table(name, abbr, description, additional_constraint_required, category_id) VALUES ('Institution-specific restrictions', 'IS', 'Use of data is limited to use within an approved institution.', false, 3);
CREATE TABLE beacon_dataset_consent_code_table (
dataset_id integer NOT NULL REFERENCES beacon_dataset_table(id),
consent_code_id int NOT NULL REFERENCES consent_code_table(id),
additional_constraint text,
description text,
version text,
PRIMARY KEY (dataset_id, consent_code_id)
);
---------------------------
---------- VIEWS ----------
---------------------------
-- DROP VIEW public.beacon_data_summary;
CREATE OR REPLACE VIEW public.beacon_data_summary AS
SELECT dat.id AS dataset_id,
d.variant_cnt,
d.call_cnt,
d.sample_cnt,
COALESCE(COUNT(DISTINCT d_sam.sample_id),NULL) AS matching_sample_cnt,
d.frequency
FROM beacon_data_table d
INNER JOIN beacon_dataset_table dat ON dat.id = d.dataset_id
LEFT JOIN beacon_data_sample_table d_sam ON d_sam.data_id=d.id
GROUP BY dat.id, d.variant_cnt, d.call_cnt, d.sample_cnt, d.frequency;
CREATE OR REPLACE VIEW beacon_dataset AS
SELECT
d.id,
d.stable_id,
d.description,
d.access_type,
d.reference_genome,
d.variant_cnt,
d.call_cnt,
d.sample_cnt
FROM beacon_dataset_table d
WHERE (d.access_type = ANY (ARRAY['PUBLIC', 'REGISTERED', 'CONTROLLED']))
AND d.variant_cnt > 0 AND d.reference_genome != '';
CREATE OR REPLACE VIEW beacon_dataset_consent_code AS
SELECT dc.dataset_id,
cat.name AS category,
code.abbr AS code,
code.description AS description,
dc.additional_constraint,
dc.description AS additional_description,
dc.version
FROM beacon_dataset_consent_code_table dc
INNER JOIN consent_code_table code ON code.id=dc.consent_code_id
INNER JOIN consent_code_category_table cat ON cat.id=code.category_id
ORDER BY dc.dataset_id, cat.id, code.id;
|
ALTER TABLE users
DROP COLUMN created_at;
ALTER TABLE users
DROP COLUMN updated_at;
DROP TRIGGER IF EXISTS update_users_updated_at ON users;
|
<gh_stars>1-10
CREATE STREAM MOVIE_TICKET_SALES (title VARCHAR, sale_ts VARCHAR, ticket_total_value INT)
WITH (KAFKA_TOPIC='movie-ticket-sales',
PARTITIONS=1,
VALUE_FORMAT='avro',
TIMESTAMP='sale_ts',
TIMESTAMP_FORMAT='yyyy-MM-dd''T''HH:mm:ssX');
CREATE TABLE MOVIE_TICKETS_SOLD AS
SELECT TITLE,
COUNT(TICKET_TOTAL_VALUE) AS TICKETS_SOLD
FROM MOVIE_TICKET_SALES
GROUP BY TITLE
EMIT CHANGES;
|
<filename>tests/pgbench/concurrency-test.sql<gh_stars>100-1000
select now();
/* read */ select now();
insert into proxytest values (1, 'foo', 'bar');
/* read */ select count(*) from proxytest;
update proxytest set name = 'doo' where id = 1;
delete from proxytest where id = 1;
insert into proxytest values (2, 'aaa', 'bbb');
/* read */ select value from proxytest;
delete from proxytest;
|
INSERT INTO control_config (guild_id, mode, role)
VALUES ($1,$2,$3)
ON CONFLICT (guild_id)
DO UPDATE SET mode=EXCLUDED.mode, role=EXCLUDED.role; |
-- MySQL dump 10.13 Distrib 5.1.73, for redhat-linux-gnu (x86_64)
--
-- Host: localhost Database: food
-- ------------------------------------------------------
-- Server version 5.1.73
/*!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 */;
--
-- Current Database: `food`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `food` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `food`;
--
-- Table structure for table `auth_group`
--
DROP TABLE IF EXISTS `auth_group`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auth_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(80) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `auth_group`
--
LOCK TABLES `auth_group` WRITE;
/*!40000 ALTER TABLE `auth_group` DISABLE KEYS */;
/*!40000 ALTER TABLE `auth_group` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `auth_group_permissions`
--
DROP TABLE IF EXISTS `auth_group_permissions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auth_group_permissions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`group_id` int(11) NOT NULL,
`permission_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `group_id` (`group_id`,`permission_id`),
KEY `auth_group_permissions_5f412f9a` (`group_id`),
KEY `auth_group_permissions_83d7f98b` (`permission_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `auth_group_permissions`
--
LOCK TABLES `auth_group_permissions` WRITE;
/*!40000 ALTER TABLE `auth_group_permissions` DISABLE KEYS */;
/*!40000 ALTER TABLE `auth_group_permissions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `auth_permission`
--
DROP TABLE IF EXISTS `auth_permission`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auth_permission` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`content_type_id` int(11) NOT NULL,
`codename` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `content_type_id` (`content_type_id`,`codename`),
KEY `auth_permission_37ef4eb4` (`content_type_id`)
) ENGINE=MyISAM AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `auth_permission`
--
LOCK TABLES `auth_permission` WRITE;
/*!40000 ALTER TABLE `auth_permission` DISABLE KEYS */;
INSERT INTO `auth_permission` VALUES (1,'Can add permission',1,'add_permission'),(2,'Can change permission',1,'change_permission'),(3,'Can delete permission',1,'delete_permission'),(4,'Can add group',2,'add_group'),(5,'Can change group',2,'change_group'),(6,'Can delete group',2,'delete_group'),(7,'Can add user',3,'add_user'),(8,'Can change user',3,'change_user'),(9,'Can delete user',3,'delete_user'),(10,'Can add content type',4,'add_contenttype'),(11,'Can change content type',4,'change_contenttype'),(12,'Can delete content type',4,'delete_contenttype'),(13,'Can add session',5,'add_session'),(14,'Can change session',5,'change_session'),(15,'Can delete session',5,'delete_session'),(16,'Can add site',6,'add_site'),(17,'Can change site',6,'change_site'),(18,'Can delete site',6,'delete_site'),(19,'Can add log entry',7,'add_logentry'),(20,'Can change log entry',7,'change_logentry'),(21,'Can delete log entry',7,'delete_logentry'),(22,'Can add userpwd',8,'add_userpwd'),(23,'Can change userpwd',8,'change_userpwd'),(24,'Can delete userpwd',8,'delete_userpwd'),(25,'Can add foodinfo',9,'add_foodinfo'),(26,'Can change foodinfo',9,'change_foodinfo'),(27,'Can delete foodinfo',9,'delete_foodinfo'),(28,'Can add shoplistinfo',10,'add_shoplistinfo'),(29,'Can change shoplistinfo',10,'change_shoplistinfo'),(30,'Can delete shoplistinfo',10,'delete_shoplistinfo');
/*!40000 ALTER TABLE `auth_permission` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `auth_user`
--
DROP TABLE IF EXISTS `auth_user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auth_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`password` varchar(128) NOT NULL,
`last_login` datetime NOT NULL,
`is_superuser` tinyint(1) NOT NULL,
`username` varchar(30) NOT NULL,
`first_name` varchar(30) NOT NULL,
`last_name` varchar(30) NOT NULL,
`email` varchar(75) NOT NULL,
`is_staff` tinyint(1) NOT NULL,
`is_active` tinyint(1) NOT NULL,
`date_joined` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `auth_user`
--
LOCK TABLES `auth_user` WRITE;
/*!40000 ALTER TABLE `auth_user` DISABLE KEYS */;
INSERT INTO `auth_user` VALUES (1,'pbkdf2_sha256$10000$eyh0fOVW0lLl$Px1Secx5aGwQuwYHqfMcLp70fI904GQiSAH2UhJoCeg=','2016-03-16 05:23:36',1,'root','','','',1,1,'2016-03-16 05:23:36');
/*!40000 ALTER TABLE `auth_user` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `auth_user_groups`
--
DROP TABLE IF EXISTS `auth_user_groups`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auth_user_groups` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`group_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `user_id` (`user_id`,`group_id`),
KEY `auth_user_groups_6340c63c` (`user_id`),
KEY `auth_user_groups_5f412f9a` (`group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `auth_user_groups`
--
LOCK TABLES `auth_user_groups` WRITE;
/*!40000 ALTER TABLE `auth_user_groups` DISABLE KEYS */;
/*!40000 ALTER TABLE `auth_user_groups` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `auth_user_user_permissions`
--
DROP TABLE IF EXISTS `auth_user_user_permissions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auth_user_user_permissions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`permission_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `user_id` (`user_id`,`permission_id`),
KEY `auth_user_user_permissions_6340c63c` (`user_id`),
KEY `auth_user_user_permissions_83d7f98b` (`permission_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `auth_user_user_permissions`
--
LOCK TABLES `auth_user_user_permissions` WRITE;
/*!40000 ALTER TABLE `auth_user_user_permissions` DISABLE KEYS */;
/*!40000 ALTER TABLE `auth_user_user_permissions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `django_admin_log`
--
DROP TABLE IF EXISTS `django_admin_log`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `django_admin_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`action_time` datetime NOT NULL,
`user_id` int(11) NOT NULL,
`content_type_id` int(11) DEFAULT NULL,
`object_id` longtext,
`object_repr` varchar(200) NOT NULL,
`action_flag` smallint(5) unsigned NOT NULL,
`change_message` longtext NOT NULL,
PRIMARY KEY (`id`),
KEY `django_admin_log_6340c63c` (`user_id`),
KEY `django_admin_log_37ef4eb4` (`content_type_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `django_admin_log`
--
LOCK TABLES `django_admin_log` WRITE;
/*!40000 ALTER TABLE `django_admin_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `django_admin_log` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `django_content_type`
--
DROP TABLE IF EXISTS `django_content_type`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `django_content_type` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`app_label` varchar(100) NOT NULL,
`model` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `app_label` (`app_label`,`model`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `django_content_type`
--
LOCK TABLES `django_content_type` WRITE;
/*!40000 ALTER TABLE `django_content_type` DISABLE KEYS */;
INSERT INTO `django_content_type` VALUES (1,'permission','auth','permission'),(2,'group','auth','group'),(3,'user','auth','user'),(4,'content type','contenttypes','contenttype'),(5,'session','sessions','session'),(6,'site','sites','site'),(7,'log entry','admin','logentry'),(8,'userpwd','foodshop','userpwd'),(9,'foodinfo','foodshop','foodinfo'),(10,'shoplistinfo','foodshop','shoplistinfo');
/*!40000 ALTER TABLE `django_content_type` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `django_session`
--
DROP TABLE IF EXISTS `django_session`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `django_session` (
`session_key` varchar(40) NOT NULL,
`session_data` longtext NOT NULL,
`expire_date` datetime NOT NULL,
PRIMARY KEY (`session_key`),
KEY `django_session_b7b81f0c` (`expire_date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `django_session`
--
LOCK TABLES `django_session` WRITE;
/*!40000 ALTER TABLE `django_session` DISABLE KEYS */;
/*!40000 ALTER TABLE `django_session` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `django_site`
--
DROP TABLE IF EXISTS `django_site`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `django_site` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`domain` varchar(100) NOT NULL,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `django_site`
--
LOCK TABLES `django_site` WRITE;
/*!40000 ALTER TABLE `django_site` DISABLE KEYS */;
INSERT INTO `django_site` VALUES (1,'example.com','example.com');
/*!40000 ALTER TABLE `django_site` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `foodshop_foodinfo`
--
DROP TABLE IF EXISTS `foodshop_foodinfo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `foodshop_foodinfo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`shoppagetitle` varchar(50) NOT NULL,
`shoptitle` varchar(50) NOT NULL,
`shoptitledetail` varchar(300) NOT NULL,
`price` varchar(20) NOT NULL,
`pricep` varchar(20) NOT NULL,
`priceph` varchar(20) NOT NULL,
`height` varchar(20) NOT NULL,
`commentnum` varchar(20) NOT NULL,
`scuoftranum` varchar(20) NOT NULL,
`shipintime` varchar(50) NOT NULL,
`inventorynum` varchar(20) NOT NULL,
`deposit` varchar(20) NOT NULL,
`desscores` varchar(20) NOT NULL,
`sevscores` varchar(20) NOT NULL,
`logisticsscores` varchar(20) NOT NULL,
`costscores` varchar(20) NOT NULL,
`width445px` varchar(20) NOT NULL,
`commodityencoding` varchar(30) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=33 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `foodshop_foodinfo`
--
LOCK TABLES `foodshop_foodinfo` WRITE;
/*!40000 ALTER TABLE `foodshop_foodinfo` DISABLE KEYS */;
INSERT INTO `foodshop_foodinfo` VALUES (1,'zi shu xiaomb2','zi shu mbao','hao chi de zi shu xiao mian bao ,jin hang jia huang de ,shi song ren jia ping ,zhi shang de xuan ze,bao zhuang jing mei,shou ren haung yin','30','25.56','500','3560','895','567','traved 24 hour','7365','7500','4.3','4.6','4.7','4.5','445',''),(2,'紫薯小面包详情页','zi shu mbao','hao chi de zi shu xiao mian bao ,jin hang jia huang de ,shi song ren jia ping ,zhi shang de xuan ze,bao zhuang jing mei,shou ren haung yin','30','25.56','500','3560','895','567','traved 24 hour','7365','7500','4.3','4.6','4.7','4.5','445',''),(3,'紫薯小面包详情页','','好吃的零食大礼包,一包里面有很多,三十几样食品,只要你喜欢,送人还是比较高大上的,有礼盒的,包装精美,质量上等是送女孩的礼,可以随时加一点送你心爱的人,欢迎选购,全国包邮,偏远地区除外,详情见商品,谢谢','30','25.56','500','3560','895','567','卖家承诺27小时内发货','7365','7500','4.3','4.6','4.7','4.5','445',''),(4,'友臣肉松饼详情页','好吃的友臣肉松饼','金黄,金黄的,你知道的','28','12','500','5000','0','0','17小时内发货','5641','10000','5.0','5.0','5.0','5.0','445','98746512'),(9,'一品蛋苏松饼详情页','好吃的一口蛋苏','香甜可口,吃一下就得倒,金黄,金黄的,你知道的','28','12','500','5000','0','0','17小时内发货','5641','10000','5.0','5.0','5.0','5.0','445','66666668'),(8,'一品蛋苏松饼详情页','好吃的一口蛋苏','香甜可口,吃一下就得倒,金黄,金黄的,你知道的','28','12','500','5000','0','0','17小时内发货','5641','10000','5.0','5.0','5.0','5.0','445','66666668'),(10,'一品蛋苏松饼详情页','好吃的一口蛋苏','香甜可口,吃一下就得倒,金黄,金黄的,你知道的','28','12','500','5000','0','0','17小时内发货','5641','10000','5.0','5.0','5.0','5.0','445','66666668'),(14,'紫薯小面包详情页','味美早点紫薯小面包','一包里面有很多,三十几样食品,只要你喜欢,送人还是比较高大上的,有礼盒的,包装精美,质量上等是送女孩的礼,可以随时加一点送你心爱的人,欢迎选购,全国包邮,偏远地区除外,详情见商品,谢谢','48','24','24','2000','0','0','24小时内发货','10000','10000','5.0','5.0','5.0','5.0','445','80060001'),(15,'鳕鱼肠详情页','韩国进口鳕鱼肠','鳕鱼肠,外表漂亮,美味可口,只要你喜欢,送人还是比较高大上的,有礼盒的,包装精美,质量上等是送女孩的礼,可以随时加一点送你心爱的人,欢迎选购,全国包邮,偏远地区除外,详情见商品,谢谢 ','27','3','500','500','0','0','24小时内发货','9985','10000','5.0','5.0','5.0','5.0','445','80060002'),(16,'北田99能量棒详情页','北田99能量棒','台湾进口 正品北田99能量棒 实体店可批发 有3个味道 芋头味 南瓜味 蛋黄味','9.40','47','500','180','0','0','24小时内发货','10000','10000','5.0','5.0','5.0','5.0','445','80060003'),(17,'德国嘉云糖详情页','德国嘉云糖','亲,这款糖共有20种口味:草莓,香草,无糖什锦,冰爽,维他命夹心,黑莓+梨味,柠檬+西柚,香橙,樱桃,热带香果,西柚,桑果什锦味,苹果,芒果+猕猴桃,柠檬,咖啡,薄荷,新版什锦,四季香果,可乐。您需要指定口味的,一定要备注留言哦没有备注留言的我们是随机发货的,谢谢支持','13.50','36','500','200','0','0','24小时内发货','9989','10000','5.0','5.0','5.0','5.0','445','80060004'),(18,'黄桃罐头详情页','正品砀山水果糖水黄桃罐头','选择我们的理由: ①我们的产品【无色素】【无防腐剂】【无甜蜜素】,更健康②我们是真正的厂家直销,厂家自有品牌,并非贸易公司③我们的产品出口多个国家,具有相关出口资质认证(生产日期最近2个月左右)','5.00','60','425','500','0','0','24小时内发货','9936','10000','5.0','5.0','5.0','5.0','445','80060005'),(19,'无漂白开心果详情页','无漂白开心果','热销自然开、无漂白、性价比高、热销 碧根果,巴旦木疯狂抢购任意搭配 收货好评更有惊喜!!商品详情有关于口味的区别介绍,敬请关注。本色无漂白请拍【原味】哦,白果盐焗请拍【盐焗】哦,大厂出品,品质保证哦!','40','80','500','500','0','0','24小时内发货','9985','10000','5.0','5.0','5.0','5.0','445','80060006'),(20,'巴旦木详情页','奶香味临安巴旦木','本款为特级巴旦木,罐装500g2罐,本品是3月份新货新炒。属于壳杏仁里面最好的品种NP.24.9元的价格超级实惠,欢迎广大客户前来咨询购买。','48','48','500','1000','0','0','24小时内发货','9965','10000','5.0','5.0','5.0','5.0','445','80060007'),(21,'去骨鸭掌详情页','脉动去骨鸭爪无骨鸭掌 ','A.始终坚持下单预定,现炒现做,无存货、无添加,做新鲜私房菜;B.始终坚持用家用的油和食材,以自家吃的标准,做健康私房菜;C.始终坚持自家厨房烹饪,严格区别于餐馆和工厂生产,做家常私房菜;D.始终坚持为买家提供更好的美味与服务的理念,做家常私房菜!','26','26','500','500','0','0','24小时内发货','9985','10000','5.0','5.0','5.0','5.0','445','80060008'),(22,'辣子鸡汁点心面详情页','张君雅小妹妹辣子鸡汁点心面','点心面淋上鸡汁,低温文火烘烤后,产生不同于一般点心面的浓郁碳烤风味,口感松脆,咔吱咔吱作响,满口生香让你停不了嘴','5.00','75','80','3000','0','0','24小时内发货','7585','10000','5.0','5.0','5.0','5.0','445','80060009'),(23,' 沙巴哇芭蕉干详情页',' 沙巴哇芭蕉干100g ','沙巴哇干果为越南金牌干果,比一般的越南干果口味要更好,您只要亲自尝一尝就会有结果了。摘采新鲜蔬果,先进烤制工艺加工而成保留鲜果肉的果实品质和天然香味。口味松脆,香而不腻,入口香脆爽口,色,香,味俱全,是您日常休闲美食之选。','8.00','8','100','100','0','0','24小时内发货','8658','10000','5.0','5.0','5.0','5.0','445','80060010'),(25,'沙巴哇菠萝蜜干详情页','越南进口果干沙巴哇菠萝蜜干','沙巴哇采用越南当地新鲜果蔬,将其脱水,使其含水量减少,以达到最佳保存效果,最大程度保持原有的营养成分和新鲜口感','8.50','42.50','500','100','0','0','24小时内发货','5641','10000','5.0','5.0','5.0','5.0','445','80060011'),(26,'沙巴哇综合果蔬干详情页','越南进口果干沙巴哇综合果蔬干','沙巴哇蔬果干以真空低压脱水而成的一种新一代果蔬食品。保持了原有蔬菜水果的色、香、味,且增加了酥脆可口的特点,含有多种维生素和多种矿物质,脂肪酸含量极低,不添加任何化工原料,真正做到了健康和营养,其口味香脆可口,是时尚的休闲食品。','8.00','42.00','500','100','0','0','24小时内发货','5645','10000','5.0','5.0','5.0','5.0','445','80060012'),(27,'台湾99水果综合味糖详情页','台湾99水果综合味糖','【买2包减5元】买3包减10元,多买多减。台湾原装正品,樱桃爷爷官方授权,另加购店内任何产品全场免邮!【新鲜美味】0添加,0防腐剂,纯手工,选自新鲜最上品食材,打造最纯正的牛轧糖。','11.00','55','500','100','0','0','24小时内发货','5648','10000','5.0','5.0','5.0','5.0','445','80060013'),(28,'碧根果详情页','奶香碧根果','新鲜炒制碧根果,32.9元/斤包邮哦,,奶香十足,买就赠开壳神器一把,不叠加不累计,好吃又实惠,开壳器可爱又方便','32.90','32.90','500','500','0','0','24小时内发货','6647','10000','5.0','5.0','5.0','5.0','445','80060014'),(29,'日式串烧丸子详情页','台湾特产进口零食 张君雅小妹妹系列 日式串烧丸子/五香海苔80g ','大脸妹的全家福,不同包装,不同味道,不同形状,不同口味,都是我的最爱。日式串烧休闲丸子95g拍原味,五香海苔休闲丸子80g拍海苔味。','5.00','63','500','80','0','0','24小时内发货','6649','10000','5.0','5.0','5.0','5.0','445','80060015'),(30,'五香休闲丸子详情页','台湾特产进口零食 张君雅小妹妹系列 五香海苔休闲丸子','大脸妹的全家福,不同包装,不同味道,不同形状,不同口味,都是我的最爱。日式串烧休闲丸子95g拍原味,五香海苔休闲丸子80g拍海苔味。','5.00','63','500','80','0','0','24小时内发货','6645','10000','5.0','5.0','5.0','5.0','445','80060017'),(31,'捏碎面详情页','台湾特产进口零食 张君雅小妹妹系列捏碎面','1、台湾创意的品牌美食,表情超萌超逗,家长必买! 2、口感松脆,喀吱喀吱声作响,满口生香让你停不嘴; 3、种类齐全,还有甜甜圈、点心面、串烧丸子多系列供选择喔~','6.50','65.00','500','100','0','0','24小时内发货','7322','10000','5.0','5.0','5.0','5.0','445','80060016');
/*!40000 ALTER TABLE `foodshop_foodinfo` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `foodshop_shoplistinfo`
--
DROP TABLE IF EXISTS `foodshop_shoplistinfo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `foodshop_shoplistinfo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`shoplistno` varchar(30) NOT NULL,
`addrname` varchar(200) NOT NULL,
`setname` varchar(30) NOT NULL,
`zipcode` varchar(6) NOT NULL,
`phoneno` varchar(30) NOT NULL,
`wordstoboss` varchar(200) NOT NULL,
`deliveway` varchar(30) NOT NULL,
`comcodeandnum` varchar(300) NOT NULL,
`expressdeliveprice` varchar(10) NOT NULL,
`shipinsurancevalue` varchar(10) NOT NULL,
`couponprice` varchar(10) NOT NULL,
`shoplistprice` varchar(50) NOT NULL,
`status` varchar(4) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `foodshop_shoplistinfo`
--
LOCK TABLES `foodshop_shoplistinfo` WRITE;
/*!40000 ALTER TABLE `foodshop_shoplistinfo` DISABLE KEYS */;
INSERT INTO `foodshop_shoplistinfo` VALUES (1,'145933317957','安徽省淮北市濉','韩望','235128','01861022952','一只鸟','普通快递6元','80060001r3','6','0.2','0','150.2','0'),(2,'145933425742','安徽省淮北市濉溪县双堆镇','同一个人','456123','18655852564,0561-85469988','送点东西','顺丰快递22元','80060013r4','22','0.2','0','66.2','0'),(3,'145933438156','安徽省淮北市濉溪县双堆镇','韩望','235128','18610229523','多送点东西,老板,要包装好一点,路上不要坏了。。。','极速隔夜达42元','80060007r3','42','0.2','0','186.2','0'),(4,'145985138271','北京大兴西红门','韩大望','100000','18610229524','你好有事','极速隔夜达42元','80060005r5','42','0.2','0','67.2','1'),(5,'145994129686','北京大兴西红门','韩大望','100000','18610229523','vb ha o;laksd;fla','普通快递6元','80060005r4','6','0.2','0','26.2','1');
/*!40000 ALTER TABLE `foodshop_shoplistinfo` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `foodshop_userpwd`
--
DROP TABLE IF EXISTS `foodshop_userpwd`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `foodshop_userpwd` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(30) NOT NULL,
`userpwd` varchar(50) NOT NULL,
`usermail` varchar(50) NOT NULL,
`userstatus` varchar(4) DEFAULT '0',
`usermoneny` varchar(12) DEFAULT '0',
`usercreditstatus` varchar(12) DEFAULT '5',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `foodshop_userpwd`
--
LOCK TABLES `foodshop_userpwd` WRITE;
/*!40000 ALTER TABLE `foodshop_userpwd` DISABLE KEYS */;
INSERT INTO `foodshop_userpwd` VALUES (1,'hanwang77','<PASSWORD>','<EMAIL>','0','0','5'),(2,'hanwang065','123456','<EMAIL>','0','0','5'),(3,'hanwang066','123','<EMAIL>','0','0','5'),(4,'hanwang888','123','<EMAIL>','0','0','5'),(5,'admin','123456','<EMAIL>','0','1000','5'),(9,'hanwang81','123456','<EMAIL>','','208.0','5'),(10,'hanwang90','123456','<EMAIL>','0','130.0','5'),(11,'hanwang10','123','<EMAIL>','0','0','5'),(12,'hanwang11','123456','<EMAIL>','0','0','5');
/*!40000 ALTER TABLE `foodshop_userpwd` 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 2016-04-07 6:26:31
|
<gh_stars>0
drop view vaccess_person
create view vaccess_person as
select a.id,a.first_name,a.second_name,a.last_name,a.second_surname,a.gender,a.document,a.birth_date,a.type_blood,eps.description as eps,
arl.description as arl,a.status_id,a.created_at,a.updated_at,dep.description as dependency,a.authorization_person,a.insert_id,a.img,a.consecutive,a.observation,
a.stakeholder_id
from access_person a
LEFT JOIN parameters eps ON eps.code=eps_id and eps.group ='eps'
LEFT JOIN parameters arl ON arl.code=arl_id and arl.group ='arl'
LEFT JOIN parameters dep ON dep.code=dependency_id and dep.group ='dependency'
drop view vaccess_person_home
create view vaccess_person_home as
select a.id,a.first_name,a.second_name,a.last_name,a.second_surname,a.gender,a.document,a.birth_date,a.type_blood,eps.description as eps,
arl.description as arl,a.status_id,a.created_at,a.updated_at,coalesce(tor.description,'') ||' (' ||coalesce(roof.description,'')||coalesce(apt.description,'')||')' as dependency,typ.description as type_visit,
a.insert_id,a.img,a.consecutive,a.observation,a.stakeholder_id,a.price,typ_v.description as type_vehicle
from access_person_home a
LEFT JOIN parameters eps ON eps.code=eps_id and eps.group ='eps'
LEFT JOIN parameters arl ON arl.code=arl_id and arl.group ='arl'
LEFT JOIN parameters tor ON tor.code=torre_id and tor.group ='torre'
LEFT JOIN parameters apt ON apt.code=apartment_id and apt.group ='apartment'
LEFT JOIN parameters typ ON typ.code=type_visit_id and typ.group ='type_visit'
LEFT JOIN parameters typ_v ON typ_v.code=type_vehicle_id and typ_v.group ='type_vehicle'
LEFT JOIN parameters roof ON roof.code=roof_id and roof.group ='roof'
drop view vclient
CREATE VIEW vclient AS
SELECT s.id,s.business_name,s.business,coalesce(s.name,'') as name,coalesce(s.last_name,'') as last_name,s.document,s.email,coalesce(s.address_send,'') as address,s.phone,
s.term,c.description as city,s.web_site,coalesce(typeperson.description,'') as typeperson,typeregime.description as typeregime,
typestakeholder.description as typestakeholder,status.description as status,s.responsible_id,coalesce(u.name,'') as responsible,
s.created_at,s.address_invoice,send.description city_invoice,s.updated_at
FROM stakeholder s
LEFT JOIN cities c ON c.id=s.city_id
LEFT JOIN cities send ON send.id=s.invoice_city_id
LEFT JOIN users as u ON u.id=s.responsible_id
LEFT JOIN parameters as typeperson ON typeperson.code=s.type_person_id and typeperson."group"='typeperson'
LEFT JOIN parameters as typeregime ON typeregime.code=s.type_regime_id and typeregime."group"='typeregime'
LEFT JOIN parameters as typestakeholder ON typestakeholder.code=s.type_stakeholder and typestakeholder."group"='typestakeholder'
LEFT JOIN parameters as status ON status.code=s.status_id and status."group"='status_user'
WHERE s.type_stakeholder=1
drop view vtickets
create view vtickets as
select t.id,t.subject,t.description,dep.description as dependency,prio.description as priority,
s.description as status,t.created_at,t.dependency_id,u.name ||' '||u.last_name as responsible,t.user_assigned_id
from tickets t
LEFT JOIN users u ON u.id=t.user_assigned_id
JOIN parameters dep ON dep.code=t.dependency_id and dep.group='dependency'
JOIN parameters prio ON prio.code=t.priority_id and prio.group='priority'
JOIN parameters s ON s.code=t.status_id and s.group='status_ticket'
create view vcities as
select c.id,c.description city,d.description department,c.code
from cities c
join departments d ON d.id=c.department_id;
drop view vusers
create view vusers as
select users.id,users.name,users.last_name,stakeholder.business as stakeholder,users.email,users.document,r.description as role,parameters.description as status,
users.chief_area_id,dep.description as dependency,role_id,users.stakeholder_id
from users
JOIN parameters r ON r.code=users.role_id and r.group='role_id'
LEFT JOIN stakeholder ON stakeholder.id= users.stakeholder_id
LEFT JOIN parameters ON parameters.code = users.status_id and parameters.group='status_user'
left JOIN parameters dep ON dep.code=users.dependency_id and dep.group='dependency'
drop view vreception_elements
create view vreception_elements as
select r.id,r.observation,elem.description as reception_element,dep.description as dependency,s.description as sender,r.received_id,r.stakeholder_id,u.name as received,
r.observation_delivery,r.img_delivery,r.status_id
from reception_elements r
JOIN parameters elem ON elem.code=r.reception_element_id and elem.group = 'element_reception'
JOIN parameters dep ON dep.code=r.dependency_id and dep.group = 'dependency'
JOIN parameters s ON s.code=r.sender_id and s.group = 'sender'
JOIN users u On u.id=r.received_id
create view vauthorization_person as
select a.id,a.document,s.description as status,a.reason
from authorization_person a
JOIN parameters s ON s.code=a.status_access_id and s.group = 'status_access'
create view users as
SELECT users.id,
users.name,
users.last_name,
stakeholder.business AS stakeholder,
users.email,
users.document,
r.description AS role,
parameters.description AS status,
users.chief_area_id,
dep.description AS dependency
FROM users
JOIN parameters r ON r.code = users.role_id AND r."group"::text = 'role_id'::text
LEFT JOIN stakeholder ON stakeholder.id = users.stakeholder_id
LEFT JOIN parameters ON parameters.code = users.status_id AND parameters."group"::text = 'status_user'::text
JOIN parameters dep ON dep.code = users.dependency_id AND dep."group"::text = 'dependency'::text; |
<reponame>haoyoushuai/cms
set FOREIGN_KEY_CHECKS=0;
ALTER TABLE `app` MODIFY COLUMN `app_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '站点id' FIRST;
ALTER TABLE `basic_column` MODIFY COLUMN `column_category_id` int(11) NOT NULL COMMENT '关联category表(类别表ID)' FIRST;
ALTER TABLE `category` MODIFY COLUMN `category_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '类别ID' FIRST;
ALTER TABLE `comment` MODIFY COLUMN `comment_content` varchar(2000) NULL COMMENT '评论的内容' AFTER `comment_commentid`;
ALTER TABLE `mdiy_page` ADD COLUMN `create_date` datetime NULL AFTER `page_key`;
ALTER TABLE `mdiy_page` MODIFY COLUMN `page_app_id` int(11) NOT NULL COMMENT '应用id' AFTER `page_id`;
ALTER TABLE `people_user` DROP COLUMN `PU_APP_ID`;
ALTER TABLE `people` MODIFY COLUMN `people_app_id` int(11) NOT NULL COMMENT '应用编号' AFTER `people_datetime`;
ALTER TABLE `mdiy_content_model` MODIFY COLUMN `create_by` int(11) NULL AFTER `cm_app_id`;
ALTER TABLE `mdiy_content_model` MODIFY COLUMN `update_by` int(11) NULL AFTER `creaet_date`;
ALTER TABLE `model` ADD COLUMN `model_parent_ids` varchar(300) NULL COMMENT '父级编号集合,从小到大排序' AFTER `model_ismenu`;
ALTER TABLE `model` ADD FOREIGN KEY (`model_modelid`) REFERENCES `model` (`model_id`) ON DELETE CASCADE ON UPDATE NO ACTION;
update model set model_url = 'manager/querylist.do' where model_url = 'manager/index.do';
update model set model_url = 'role/querylist.do' where model_url = 'role/index.do';
update model set model_url = 'basic/manager/index.do' where model_url = 'manager/queryList.do';
update model set model_url = 'basic/role/index.do' where model_url = 'role/queryList.do';
update model set model_url = 'people/peopleUser/index.do ' where model_url = 'people/user/list.do';
update model set model_title = '静态化',model_modelid=1 where model_url = 'cms/generate/index.do';
update model set model_ismenu = 1;
update model set model_modelid = null where model_modelid=0;
delete from model where model_url = 'cms/generate/column.do' or model_url='cms/generate/article.do';
delete from model where model_code = '11000000'; |
<filename>testdata/sql/update.sql
--
-- Test UPDATE
--
DROP TABLE IF EXISTS tbl1;
CREATE TABLE tbl1 (c1 int primary key, c2 int, c3 int);
INSERT INTO tbl1 VALUES
(0, 1, 2),
(3, 4, 5),
(6, 7, 8),
(9, 10, 11),
(12, 13, 14),
(15, 16, 17),
(18, 19, 20),
(21, 22, 23),
(24, 25, 26),
(27, 28, 29),
(30, 31, 32);
SELECT * FROM tbl1;
UPDATE tbl1 SET c2 = c1 + c3 WHERE c1 < 6;
SELECT * FROM tbl1;
UPDATE tbl1 SET c3 = c3 * 5 WHERE c2 % 2 = 0;
SELECT * FROM tbl1;
DROP TABLE IF EXISTS tbl2;
CREATE TABLE tbl2 (c1 int primary key, c2 int, c3 int);
INSERT INTO tbl2 VALUES
(0, 0, 0),
(2, 2, 2),
(4, 4, 4),
(6, 6, 6),
(8, 8, 8),
(10, 10, 10);
SELECT * FROM tbl2;
UPDATE tbl2 SET c1 = c1 + 1, c2 = c2 + 1;
SELECT * FROM tbl2;
UPDATE tbl2 SET c1 = c1 - 1, c2 = c2 - 1;
SELECT * FROM tbl2;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.