sql
stringlengths 6
1.05M
|
|---|
<filename>backend/notes/schema_v4.sql
create table "metric-data" (
-- TODO: server or app
time timestamp not null,
"call-count" real not null,
"total-call-time" real not null,
"total-exclusive-time" real not null,
"min-call-time" real not null,
"max-call-time" real not null,
"sum-of-squares" real not null,
"scope" varchar(255) not null,
"name" varchar(255) not null
);
create index on "metric-data" (time);
INSERT INTO "metric-data" (
time,
"scope",
"name",
"call-count",
"total-call-time",
"total-exclusive-time",
"min-call-time",
"max-call-time",
"sum-of-squares"
)
SELECT
to_timestamp(floor( 1555523785 - i / 300 * 60 )),
concat_ws('/', floor(random() * 2),
floor(random() * 20),
floor(random() * 200)),
concat_ws('/', floor(random() * 2),
floor(random() * 20),
floor(random() * 200)),
0, 0, 0, 0, 0, 0
FROM generate_series(0, 300 * 60 * 24 * 7 * 3 ) AS g (i);
explain analyze
select
"name"
from "metric-data"
where
time >= '2019-04-10 17:00:00' and time < '2019-04-10 17:02:00'
group by "name";
-- btree: 9.7 ms, 300MB
-- brin: 841.5 ms, примерно 50KB
-- cstore: 13.376 ms, -
explain analyze
select
"time",
"name"
from "metric-data"
where
time >= '2019-04-10 17:00:00' and time < '2019-04-10 17:30:00'
and "name" like '1%'
group by "time", "name";
|
alter table
subgraphs.subgraph_deployment
add
column debug_fork text;
|
<reponame>fanfuxiaoran/kafka_fdw
\i test/sql/setup.inc
CREATE FOREIGN TABLE kafka_test_junk (
part int OPTIONS (partition 'true'),
offs bigint OPTIONS (offset 'true'),
some_int int,
some_text text,
some_date date,
some_time timestamp,
junk text OPTIONS (junk 'true'),
junk_err text OPTIONS (junk_error 'true')
)
SERVER kafka_server OPTIONS
(format 'csv', topic 'contrib_regress_junk', batch_size '30', buffer_delay '100');
CREATE FOREIGN TABLE kafka_test_junk_json (
part int OPTIONS (partition 'true'),
offs bigint OPTIONS (offset 'true'),
int_val int,
text_val text,
date_val date,
time_val timestamp,
junk text OPTIONS (junk 'true'),
junk_err text OPTIONS (junk_error 'true')
)
SERVER kafka_server OPTIONS
(format 'json', topic 'contrib_regress_json_junk', batch_size '30', buffer_delay '100');
\x on
SELECT part, offs, some_int, some_text, some_date, some_time, junk, string_to_array(junk_err, E'\n') FROM kafka_test_junk WHERE offs>=0 and part=0 ;
SELECT part, offs, int_val, text_val, date_val, time_val, junk, string_to_array(junk_err, E'\n') FROM kafka_test_junk_json WHERE offs>=0 and part=0 ;
|
CREATE TABLE IF NOT EXISTS guilds (
GuildID integer PRIMARY KEY,
Prefix text DEFAULT "t.",
LogChannel integer DEFAULT 0,
StarboardChannel integer DEFAULT 0,
LevelUpChannel integer DEFAULT 0,
WelcomeChannel integer DEFAULT 0
);
CREATE TABLE IF NOT EXISTS exp (
ID text PRIMARY KEY,
UserID integer,
GuildID integer,
XP integer DEFAULT 0,
Level integer DEFAULT 0,
XPLock text DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS mutes (
UserID integer PRIMARY KEY,
GuildID integer,
EndTime text
);
CREATE TABLE IF NOT EXISTS warns (
WarnID INTEGER PRIMARY KEY AUTOINCREMENT,
UserID integer,
GuildID integer,
TimeOfViolation text,
ActionBy integer,
Reason text DEFAULT "No Reason Given",
PolViolated text
);
CREATE TABLE IF NOT EXISTS starboard (
RootMessageID integer PRIMARY KEY,
StarMessageID integer,
Stars integer DEFAULT 1
);
|
<filename>tests/migrations/sqlite.sql<gh_stars>1-10
/**
* SQLite
*/
DROP TABLE IF EXISTS "post";
CREATE TABLE "post" (
"id" INTEGER NOT NULL PRIMARY KEY,
"title" TEXT NOT NULL,
"body" TEXT NOT NULL
);
DROP TABLE IF EXISTS "tag";
CREATE TABLE "tag" (
"id" INTEGER NOT NULL PRIMARY KEY,
"slug" VARCHAR (6) NOT NULL,
"name" VARCHAR (6) NOT NULL,
"frequency" INTEGER DEFAULT 0
);
DROP TABLE IF EXISTS "post_tag";
CREATE TABLE "post_tag" (
"post_id" INTEGER NOT NULL,
"tag_id" INTEGER NOT NULL,
PRIMARY KEY ("post_id", "tag_id")
);
DROP TABLE IF EXISTS "image";
CREATE TABLE "image" (
"id" INTEGER NOT NULL PRIMARY KEY,
"name" VARCHAR (12) NOT NULL,
"post_id" INTEGER DEFAULT 0
);
|
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE quota(host TEXT NOT NULL, type INTEGER NOT NULL, quota INTEGER NOT NULL, PRIMARY KEY(host, type)) WITHOUT ROWID;
CREATE TABLE buckets(id INTEGER PRIMARY KEY, storage_key TEXT NOT NULL, host TEXT NOT NULL, type INTEGER NOT NULL, name TEXT NOT NULL, use_count INTEGER NOT NULL, last_accessed INTEGER NOT NULL, last_modified INTEGER NOT NULL, expiration INTEGER NOT NULL, quota INTEGER NOT NULL);
CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR);
INSERT INTO meta VALUES ('mmap_status', '-1');
INSERT INTO meta VALUES ('last_compatible_version', '7');
INSERT INTO meta VALUES ('version', '7');
CREATE UNIQUE INDEX buckets_by_storage_key ON buckets(storage_key, type, name);
CREATE INDEX buckets_by_host ON buckets(host, type);
CREATE INDEX buckets_by_last_accessed ON buckets(type, last_accessed);
CREATE INDEX buckets_by_last_modified ON buckets(type, last_modified);
CREATE INDEX buckets_by_expiration ON buckets(expiration);
COMMIT;
|
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 26-04-2018 a las 06:46:03
-- Versión del servidor: 10.1.21-MariaDB
-- Versión de PHP: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Base de datos: `php_phpexcel`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `contactos`
--
CREATE TABLE `contactos` (
`id` int(11) NOT NULL,
`nombres` varchar(250) NOT NULL,
`email` varchar(250) DEFAULT NULL,
`asunto` varchar(220) DEFAULT NULL,
`mensajes` text,
`fcreacion` datetime DEFAULT NULL,
`fmodificacion` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
--
-- Volcado de datos para la tabla `contactos`
--
INSERT INTO `contactos` (`id`, `nombres`, `email`, `asunto`, `mensajes`, `fcreacion`, `fmodificacion`) VALUES
(1, 'Mario', '<EMAIL>', 'Examen 01', 'Mi resultado 01', '2018-04-24 21:03:00', NULL),
(2, 'Mario', '<EMAIL>', 'Examen 02', 'Mi resultado 02', '2018-04-24 21:20:07', NULL),
(3, 'Mario', '<EMAIL>', 'Examen 03', 'Mi resultado 03', '2018-04-24 21:37:52', NULL),
(4, '<NAME>', '<EMAIL>', 'Examen 04', 'Mi resultado 04 del parcial', '2018-04-24 12:24:27', NULL),
(5, '<NAME>', '<EMAIL>', 'Examen 05', 'Mi resultado 05 del parcial', '2018-04-24 12:26:35', NULL);
--
-- Índices para tablas volcadas
--
--
-- Indices de la tabla `contactos`
--
ALTER TABLE `contactos`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT de las tablas volcadas
--
--
-- AUTO_INCREMENT de la tabla `contactos`
--
ALTER TABLE `contactos`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
/*!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
/* Using this dataset, show the SQL query to find the rolling 3 day average transaction amount for each day in January 2021. */
create table transactions_grouped_by_day
as
select
sum(a.transaction_amount) as transaction_amount,
a.t_date as transaction_day
from (
select
transaction_amount,
date_part('year',transaction_time) * 10000 + date_part('month',transaction_time) * 100 + date_part('day',transaction_time) as t_date
from transactions
) a
group by a.t_date;
-- check
/*
select * from transactions_grouped_by_day
where transaction_day between 20210129 and 20210131
order by transaction_day;
*/
select
avg(transaction_amount) OVER(ORDER BY transaction_day ROWS BETWEEN 2 PRECEDING AND CURRENT ROW )
as threeday_moving_average,
transaction_day
from transactions_grouped_by_day
order by transaction_day
|
CREATE TABLE [dbo].[tbl_transactions] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[type] VARCHAR (50) NULL,
[dea_cust_id] INT NULL,
[grandTotal] DECIMAL (18, 2) NULL,
[transaction_date] DATETIME NULL,
[tax] DECIMAL (18, 2) NULL,
[discount] DECIMAL (18, 2) NULL,
[added_by] INT NULL,
[kontobez] VARCHAR NULL,
PRIMARY KEY CLUSTERED ([Id] ASC)
);
|
-- MySQL dump 10.13 Distrib 5.7.26, for osx10.10 (x86_64)
--
-- Host: 127.0.0.1 Database: laraclassified
-- ------------------------------------------------------
-- Server version 5.7.26
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Dumping data for table `<<prefix>>subadmin1`
--
/*!40000 ALTER TABLE `<<prefix>>subadmin1` DISABLE KEYS */;
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.17','BI','Makamba','Makamba',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.10','BI','Bururi','Bururi',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.22','BI','Muramvya','Muramvya',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.13','BI','Gitega','Gitega',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.21','BI','Ruyigi','Ruyigi',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.11','BI','Cankuzo','Cankuzo',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.14','BI','Karuzi','Karuzi',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.09','BI','Bubanza','Bubanza',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.12','BI','Cibitoke','Cibitoke',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.19','BI','Ngozi','Ngozi',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.15','BI','Kayanza','Kayanza',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.18','BI','Muyinga','Muyinga',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.16','BI','Kirundo','Kirundo',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.20','BI','Rutana','Rutana',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.23','BI','Mwaro','Mwaro',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.24','BI','Bujumbura Mairie','Bujumbura Mairie',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.25','BI','Bujumbura Rural','Bujumbura Rural',1);
INSERT INTO `<<prefix>>subadmin1` (`code`, `country_code`, `name`, `asciiname`, `active`) VALUES ('BI.26','BI','Rumonge','Rumonge',1);
/*!40000 ALTER TABLE `<<prefix>>subadmin1` ENABLE KEYS */;
--
-- Dumping data for table `<<prefix>>subadmin2`
--
/*!40000 ALTER TABLE `<<prefix>>subadmin2` DISABLE KEYS */;
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.13.424739','BI','BI.13','Makebuko','Makebuko',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.09.7670587','BI','BI.09','Bubanza','Bubanza',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.12.7670588','BI','BI.12','Bukinanvana','Bukinanvana',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.13.7670589','BI','BI.13','Buraza','Buraza',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.19.7670590','BI','BI.19','Busiga','Busiga',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.16.7670591','BI','BI.16','Busoni','Busoni',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.26.7670592','BI','BI.26','Buyengero','Buyengero',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.11.7670593','BI','BI.11','Cendajuru','Cendajuru',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.19.7670594','BI','BI.19','Gashikanwa','Gashikanwa',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.18.7670595','BI','BI.18','Gashoho','Gashoho',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.23.7670596','BI','BI.23','Gisozi','Gisozi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.13.7670597','BI','BI.13','Gitega','Gitega',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.18.7670598','BI','BI.18','Giteranyi','Giteranyi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.15.7670599','BI','BI.15','Kabarore','Kabarore',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.15.7670600','BI','BI.15','Kayanza','Kayanza',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.23.7670601','BI','BI.23','Kayokwe','Kayokwe',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.22.7670602','BI','BI.22','Kiganda','Kiganda',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.17.7670603','BI','BI.17','Mabanda','Mabanda',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.12.7670604','BI','BI.12','Mabayi','Mabayi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.10.7670605','BI','BI.10','Mugamba','Mugamba',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.26.7670606','BI','BI.26','Muhuta','Muhuta',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.12.7670607','BI','BI.12','Murwi','Murwi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.25.7670608','BI','BI.25','Commune of Mutimbuzi','Commune of Mutimbuzi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.18.7670609','BI','BI.18','Muyinga','Muyinga',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.23.7670610','BI','BI.23','Nyabihanga','Nyabihanga',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.14.7670611','BI','BI.14','Nyabikere','Nyabikere',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.24.7670612','BI','BI.24','Commune of Rohero','Commune of Rohero',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.12.7670613','BI','BI.12','Commune of Rugombo','Commune of Rugombo',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.19.7670614','BI','BI.19','Ruhororo','Ruhororo',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.22.7670615','BI','BI.22','Rutegama','Rutegama',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.21.7670616','BI','BI.21','Ruyigi','Ruyigi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.19.7670617','BI','BI.19','Tangara','Tangara',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.16.7670618','BI','BI.16','Vumbi','Vumbi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.19.7670822','BI','BI.19','Ngozi','Ngozi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.13.7670823','BI','BI.13','Mutaho','Mutaho',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.24.7670922','BI','BI.24','Buterere','Buterere',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.24.7670925','BI','BI.24','Kamenge','Kamenge',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.24.7670926','BI','BI.24','Kinama','Kinama',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.24.7670927','BI','BI.24','Gihosha','Gihosha',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.24.7670928','BI','BI.24','Musaga','Musaga',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.13.7670931','BI','BI.13','Giheta','Giheta',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.13.7670933','BI','BI.13','Bugendana','Bugendana',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.15.7732510','BI','BI.15','Muruta','Muruta',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.13.7874080','BI','BI.13','Ryansoro','Ryansoro',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.09.8303259','BI','BI.09','Commune of Gihanga','Commune of Gihanga',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.12.8334579','BI','BI.12','Commune of Buganda','Commune of Buganda',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.24.8335224','BI','BI.24','Ngagara','Ngagara',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.24.8335225','BI','BI.24','Commune of Buyenzi','Commune of Buyenzi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.15.8692984','BI','BI.15','Butaganzwa','Butaganzwa',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.13.8692994','BI','BI.13','Commune of Itaba','Commune of Itaba',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.15.9072885','BI','BI.15','Commune of Matongo','Commune of Matongo',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.16.9072886','BI','BI.16','Commune of Kirundo','Commune of Kirundo',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.09.9072887','BI','BI.09','Commune of Mpanda','Commune of Mpanda',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.09.9072888','BI','BI.09','Commune of Musigati','Commune of Musigati',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.12.9072889','BI','BI.12','Commune of Mugina','Commune of Mugina',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.16.9072890','BI','BI.16','Commune of Bwambarangwe','Commune of Bwambarangwe',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.17.9072891','BI','BI.17','Commune of Makamba','Commune of Makamba',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.20.9072892','BI','BI.20','Commune of Rutana','Commune of Rutana',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.11.9072894','BI','BI.11','Commune of Cankuzo','Commune of Cankuzo',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.10.9157454','BI','BI.10','Commune of Matana','Commune of Matana',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.26.9158023','BI','BI.26','Commune of Rumonge','Commune of Rumonge',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.23.9171802','BI','BI.23','Ndava','Ndava',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.26.9171803','BI','BI.26','Bugarama','Bugarama',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.10.9171804','BI','BI.10','Bururi','Bururi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.25.9171805','BI','BI.25','Kanyosha1','Kanyosha1',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.25.9171806','BI','BI.25','Kabezi','Kabezi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.25.9171807','BI','BI.25','Mukike','Mukike',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.25.9171808','BI','BI.25','Mutambu','Mutambu',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.25.9171809','BI','BI.25','Nyabiraba','Nyabiraba',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.17.9171810','BI','BI.17','Vugizo','Vugizo',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.10.9171811','BI','BI.10','Vyanda','Vyanda',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.10.9171812','BI','BI.10','Songa','Songa',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.23.9171813','BI','BI.23','Rusaka','Rusaka',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.23.9171814','BI','BI.23','Bisoro','Bisoro',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.25.9171815','BI','BI.25','Mugongomanga','Mugongomanga',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.11.9171816','BI','BI.11','Mishiha','Mishiha',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.15.9171817','BI','BI.15','Rango','Rango',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.22.9171818','BI','BI.22','Bukeye','Bukeye',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.20.9171819','BI','BI.20','Bukemba','Bukemba',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.17.9171820','BI','BI.17','Kayogoro','Kayogoro',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.25.9171821','BI','BI.25','Isale','Isale',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.09.9171822','BI','BI.09','Rugazi','Rugazi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.17.9171823','BI','BI.17','Kibago','Kibago',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.25.9171825','BI','BI.25','Mubimbi','Mubimbi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.22.9171826','BI','BI.22','Mbuye','Mbuye',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.16.9171827','BI','BI.16','Bugabira','Bugabira',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.18.9171829','BI','BI.18','Butihinda','Butihinda',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.15.9171830','BI','BI.15','Gatara','Gatara',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.15.9171831','BI','BI.15','Gahombo','Gahombo',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.18.9171832','BI','BI.18','Buhinyuza','Buhinyuza',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.20.9171833','BI','BI.20','Musongati','Musongati',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.11.9171834','BI','BI.11','Kigamba','Kigamba',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.20.9171836','BI','BI.20','Gitanga','Gitanga',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.11.9171837','BI','BI.11','Gisagara','Gisagara',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.10.9171840','BI','BI.10','Rutovu','Rutovu',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.21.9171841','BI','BI.21','Gisuru','Gisuru',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.13.9171842','BI','BI.13','Nyanrusange','Nyanrusange',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.13.9171843','BI','BI.13','Gishubi','Gishubi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.21.9171844','BI','BI.21','Kinyinya','Kinyinya',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.13.9171845','BI','BI.13','Bukirasazi','Bukirasazi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.20.9171847','BI','BI.20','Mpinga-Kayove','Mpinga-Kayove',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.20.9171849','BI','BI.20','Giharo','Giharo',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.21.9171851','BI','BI.21','Nyabitsinda','Nyabitsinda',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.14.9171852','BI','BI.14','Shombo','Shombo',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.17.9171854','BI','BI.17','Nyanza-Lac','Nyanza-Lac',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.21.9171856','BI','BI.21','Butezi','Butezi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.19.9171858','BI','BI.19','Mwumba','Mwumba',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.21.9171859','BI','BI.21','Bweru','Bweru',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.14.9171861','BI','BI.14','Gitaramuka','Gitaramuka',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.19.9171863','BI','BI.19','Nyamurenza','Nyamurenza',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.14.9171866','BI','BI.14','Bugenyuzi','Bugenyuzi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.19.9171867','BI','BI.19','Marangara','Marangara',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.15.9171868','BI','BI.15','Muhanga','Muhanga',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.16.9171870','BI','BI.16','Ntega','Ntega',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.14.9171872','BI','BI.14','Gihogazi','Gihogazi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.19.9171874','BI','BI.19','Kiremba','Kiremba',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.14.9171878','BI','BI.14','Mutumba','Mutumba',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.14.9171879','BI','BI.14','Buhiga','Buhiga',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.24.9171881','BI','BI.24','Nyakabiga','Nyakabiga',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.18.9171882','BI','BI.18','Mwakiro','Mwakiro',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.24.9171883','BI','BI.24','Bwiza','Bwiza',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.18.9171884','BI','BI.18','Gasorwe','Gasorwe',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.16.9171886','BI','BI.16','Gitobe','Gitobe',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.24.9171888','BI','BI.24','Kanyosha','Kanyosha',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.24.9171890','BI','BI.24','Kinindo','Kinindo',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.22.9179822','BI','BI.22','Muramvya','Muramvya',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.26.9881326','BI','BI.26','Commune of Burambi','Commune of Burambi',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.24.11819935','BI','BI.24','Cibitoke','Cibitoke',1);
INSERT INTO `<<prefix>>subadmin2` (`code`, `country_code`, `subadmin1_code`, `name`, `asciiname`, `active`) VALUES ('BI.21.11819937','BI','BI.21','Butaganzwa','Butaganzwa',1);
/*!40000 ALTER TABLE `<<prefix>>subadmin2` ENABLE KEYS */;
--
-- Dumping data for table `<<prefix>>cities`
--
/*!40000 ALTER TABLE `<<prefix>>cities` DISABLE KEYS */;
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Makamba','Makamba',29.804,-4.1348,'P','PPLA','BI.17',NULL,19642,'Africa/Bujumbura',1,'2012-01-18 23:00:00','2012-01-18 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Bururi','Bururi',29.6244,-3.94877,'P','PPLA','BI.10',NULL,19740,'Africa/Bujumbura',1,'2010-08-02 23:00:00','2010-08-02 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Rumonge','Rumonge',29.4386,-3.9736,'P','PPLA','BI.26','BI.26.9158023',6074,'Africa/Bujumbura',1,'2016-06-13 23:00:00','2016-06-13 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Mwaro','Mwaro',29.7033,-3.51128,'P','PPLA','BI.23',NULL,4924,'Africa/Bujumbura',1,'2015-10-11 23:00:00','2015-10-11 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Isale','Isale',29.4839,-3.3489,'P','PPLA','BI.25',NULL,0,'Africa/Bujumbura',1,'2015-10-04 23:00:00','2015-10-04 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Bujumbura','Bujumbura',29.3614,-3.38193,'P','PPLA','BI.24',NULL,331700,'Africa/Bujumbura',1,'2019-09-04 23:00:00','2019-09-04 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Muramvya','Muramvya',29.6079,-3.2682,'P','PPLA','BI.22',NULL,18041,'Africa/Bujumbura',1,'2013-04-04 23:00:00','2013-04-04 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Gitega','Gitega',29.9246,-3.42708,'P','PPLC','BI.13',NULL,41000,'Africa/Bujumbura',1,'2019-05-09 23:00:00','2019-05-09 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Ruyigi','Ruyigi',30.2486,-3.47639,'P','PPLA','BI.21',NULL,38458,'Africa/Bujumbura',1,'2012-01-18 23:00:00','2012-01-18 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Cankuzo','Cankuzo',30.5528,-3.2186,'P','PPLA','BI.11',NULL,6585,'Africa/Bujumbura',1,'2012-01-18 23:00:00','2012-01-18 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Karuzi','Karuzi',30.1628,-3.10139,'P','PPLA','BI.14',NULL,10705,'Africa/Bujumbura',1,'2015-10-04 23:00:00','2015-10-04 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Bubanza','Bubanza',29.391,-3.0804,'P','PPLA','BI.09',NULL,12728,'Africa/Bujumbura',1,'2013-06-05 23:00:00','2013-06-05 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Cibitoke','Cibitoke',29.1248,-2.8869,'P','PPLA','BI.12',NULL,14220,'Africa/Bujumbura',1,'2018-10-26 23:00:00','2018-10-26 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Ngozi','Ngozi',29.8306,-2.9075,'P','PPLA','BI.19',NULL,21506,'Africa/Bujumbura',1,'2013-06-05 23:00:00','2013-06-05 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Kayanza','Kayanza',29.6293,-2.9221,'P','PPLA','BI.15',NULL,19443,'Africa/Bujumbura',1,'2012-01-18 23:00:00','2012-01-18 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Muyinga','Muyinga',30.3414,-2.8451,'P','PPLA','BI.18',NULL,71076,'Africa/Bujumbura',1,'2012-01-18 23:00:00','2012-01-18 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Kirundo','Kirundo',30.0959,-2.5845,'P','PPLA','BI.16',NULL,6083,'Africa/Bujumbura',1,'2013-05-07 23:00:00','2013-05-07 23:00:00');
INSERT INTO `<<prefix>>cities` (`country_code`, `name`, `asciiname`, `longitude`, `latitude`, `feature_class`, `feature_code`, `subadmin1_code`, `subadmin2_code`, `population`, `time_zone`, `active`, `created_at`, `updated_at`) VALUES ('BI','Rutana','Rutana',29.992,-3.9279,'P','PPLA','BI.20',NULL,20893,'Africa/Bujumbura',1,'2012-01-18 23:00:00','2012-01-18 23:00:00');
/*!40000 ALTER TABLE `<<prefix>>cities` ENABLE KEYS */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed
|
<filename>mobio.sql
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Oct 07, 2020 at 10:41 AM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.4.0
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: `mobio`
--
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`contact` varchar(11) NOT NULL,
`email` varchar(100) NOT NULL,
`state` varchar(20) NOT NULL,
`city` varchar(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `name`, `contact`, `email`, `state`, `city`) VALUES
(1, 'Kaushik', '9638477969', '<EMAIL>', 'Gujarat', 'Ahmedabad'),
(3, 'Kboy', '892742394', '<EMAIL>', 'Maharashtra', '');
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
<gh_stars>0
DROP DATABASE IF EXISTS tarotclubdb;
CREATE DATABASE tarotclubdb;
\c tarotclubdb;
CREATE TABLE IF NOT EXISTS users (
id bigserial PRIMARY KEY NOT NULL,
username TEXT NOT NULL,
password TEXT NOT NULL,
email TEXT NOT NULL,
attr JSON, -- autres paramètres en vrac (nom complet, avatar, twitter, fb, ...)
created timestamp, -- when the account was created
reset_password_datetime timestamp,
login_attempts INTEGER,
reset_token TEXT, -- reset password token,
status INTEGER -- -1 = deleted account, 0 = email not validated, 1 = normal user
);
CREATE TABLE IF NOT EXISTS infos
(
version TEXT
);
CREATE TABLE IF NOT EXISTS servers
(
id bigserial PRIMARY KEY NOT NULL,
user_id bigserial NOT NULL, -- compte associé à ce serveur
token TEXT NOT NULL
);
|
-- =============================================
-- Author: <NAME>
-- Create date: 2020-08-28
-- Description: Updating firstname and lastname
-- =============================================
CREATE PROCEDURE ums_Update_name_user
@param_Id nvarchar(256),
@param_fname nvarchar(256),
@param_lname nvarchar(256)
AS
IF (SELECT [dbo].[Account].acc_Id FROM [dbo].[Account] WHERE [dbo].[Account].acc_Id = @param_Id) != ''
BEGIN
UPDATE [dbo].[Account] SET
[dbo].[Account].acc_Firstname = @param_fname,
[dbo].[Account].acc_Lastname = @param_lname
WHERE [dbo].[Account].acc_Id = @param_Id
END
GO
|
/*
Navicat Premium Data Transfer
Source Server : yezi
Source Server Type : MySQL
Source Server Version : 50718
Source Host : localhost:3306
Source Schema : zerd
Target Server Type : MySQL
Target Server Version : 50718
File Encoding : 65001
Date: 09/04/2019 13:24:05
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for banner
-- ----------------------------
DROP TABLE IF EXISTS `user_info`;
CREATE TABLE `user_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nickname` varchar(250) DEFAULT NULL COMMENT '用户名称,通常作为标识',
`headpic` varchar(500) DEFAULT NULL COMMENT '用户头像',
`openid` varchar(250) DEFAULT NULL COMMENT '用户ID',
`unionid` varchar(250) DEFAULT NULL COMMENT '用户ID',
`mobile` varchar(255) DEFAULT NULL COMMENT '用户手机',
`shop_id` varchar(255) DEFAULT NULL COMMENT '用户手机',
`is_checked` int(1) DEFAULT NULL,
`is_in_contract` int(1) DEFAULT NULL,
`update_time` int(11) DEFAULT NULL,
`create_time` int(11) DEFAULT NULL,
`delete_time` int(11) DEFAULT NULL,
`is_shop_owner` smallint(6) DEFAULT NULL,
`extend` varchar(500) DEFAULT NULL COMMENT '用户头像',
`auth` smallint(6) DEFAULT NULL COMMENT '用户头像',
`status` smallint(6) DEFAULT NULL COMMENT '用户头像',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='用户管理表';
|
/*
https://www.hackerrank.com/challenges/revising-aggregations-sum/problem
*/
SELECT SUM(POPULATION) FROM CITY WHERE DISTRICT = "California"
|
<reponame>Georgiana21/sakai<filename>signup/resources/updateSqlScripts/updatingMySqlScript_July_2010.sql
alter table signup_site_groups modify calendar_event_id VARCHAR(2000);
alter table signup_sites modify calendar_event_id VARCHAR(2000);
|
<filename>BookListerCMS_ttomczak3/webbooks/webbooks_users.sql
-- MySQL dump 10.13 Distrib 8.0.12, for Win64 (x86_64)
--
-- Host: localhost Database: webbooks
-- ------------------------------------------------------
-- Server version 8.0.12
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
SET NAMES utf8 ;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `users` (
`uName` varchar(255) NOT NULL,
`pWord` varchar(255) DEFAULT NULL,
PRIMARY KEY (`uName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `users`
--
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES ('acooley','$2y$10$I/V9QgauhydOktqB9VCooe0MUkVqt2v3xJhD79JsQvpHjNEebLIOi'),('ojones','$<PASSWORD>'),('ttomczak','$<PASSWORD>');
/*!40000 ALTER TABLE `users` 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 2021-12-06 21:11:28
|
<filename>restaurant_kone.sql
-- MariaDB dump 10.19 Distrib 10.5.12-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: restaurant_kone
-- ------------------------------------------------------
-- Server version 10.5.12-MariaDB-1
/*!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 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `Badge`
--
DROP TABLE IF EXISTS `Badge`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Badge` (
`IdBadge` int(10) unsigned NOT NULL AUTO_INCREMENT,
`MontantBadge` decimal(14,0) NOT NULL,
`MatriculeEt` varchar(10) NOT NULL,
PRIMARY KEY (`IdBadge`),
UNIQUE KEY `MatriculeEt` (`MatriculeEt`),
CONSTRAINT `fk_MatriculeEtBadge` FOREIGN KEY (`MatriculeEt`) REFERENCES `Etudiant` (`MatriculeEt`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Badge`
--
LOCK TABLES `Badge` WRITE;
/*!40000 ALTER TABLE `Badge` DISABLE KEYS */;
INSERT INTO `Badge` VALUES (1,150000,'18INP00826'),(2,100000,'17INP00452'),(3,53200,'17INP00231'),(4,0,'20INP00322');
/*!40000 ALTER TABLE `Badge` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `Contenir`
--
DROP TABLE IF EXISTS `Contenir`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Contenir` (
`IdCont` int(10) unsigned NOT NULL AUTO_INCREMENT,
`IdPlat` int(5) unsigned NOT NULL,
`NumeroFact` int(10) unsigned NOT NULL,
PRIMARY KEY (`IdCont`),
KEY `fk_IdPlat` (`IdPlat`),
KEY `fk_NumeroFact` (`NumeroFact`),
CONSTRAINT `fk_IdPlat` FOREIGN KEY (`IdPlat`) REFERENCES `Plat` (`IdPlat`),
CONSTRAINT `fk_NumeroFact` FOREIGN KEY (`NumeroFact`) REFERENCES `Facture` (`NumeroFact`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Contenir`
--
LOCK TABLES `Contenir` WRITE;
/*!40000 ALTER TABLE `Contenir` DISABLE KEYS */;
/*!40000 ALTER TABLE `Contenir` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `Etudiant`
--
DROP TABLE IF EXISTS `Etudiant`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Etudiant` (
`MatriculeEt` varchar(10) NOT NULL,
`NomEt` varchar(10) NOT NULL,
`PrenomEt` varchar(30) NOT NULL,
`DateNaissEt` date NOT NULL,
`LieuNaissEt` varchar(20) NOT NULL,
`EcoleEt` varchar(50) NOT NULL,
`FiliereEt` varchar(50) NOT NULL,
PRIMARY KEY (`MatriculeEt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Etudiant`
--
LOCK TABLES `Etudiant` WRITE;
/*!40000 ALTER TABLE `Etudiant` DISABLE KEYS */;
INSERT INTO `Etudiant` VALUES ('17INP00231','Cuisse','Potelee','2003-06-10','Zougougbeu','ESI','STGI'),('17INP00452','Kouagni','<NAME>','1998-03-21','','',''),('18INP00826','Vanie','<NAME> <NAME>','2001-08-20','','',''),('18INP00888','Jilles','Joli','1999-08-14','Diegonefla','ESI','STGI'),('20INP00322','Kouamé','<NAME>','1998-03-20','Cocody','ESI','STIC');
/*!40000 ALTER TABLE `Etudiant` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `Facture`
--
DROP TABLE IF EXISTS `Facture`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Facture` (
`NumeroFact` int(10) unsigned NOT NULL AUTO_INCREMENT,
`MontantFact` decimal(14,0) NOT NULL,
`DateFact` datetime NOT NULL,
`MatriculeEt` varchar(10) NOT NULL,
PRIMARY KEY (`NumeroFact`),
KEY `fk_MatriculeEt` (`MatriculeEt`),
CONSTRAINT `fk_MatriculeEt` FOREIGN KEY (`MatriculeEt`) REFERENCES `Etudiant` (`MatriculeEt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Facture`
--
LOCK TABLES `Facture` WRITE;
/*!40000 ALTER TABLE `Facture` DISABLE KEYS */;
/*!40000 ALTER TABLE `Facture` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `Plat`
--
DROP TABLE IF EXISTS `Plat`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Plat` (
`IdPlat` int(5) unsigned NOT NULL AUTO_INCREMENT,
`NomPlat` varchar(100) NOT NULL,
`MontantPlat` decimal(14,0) NOT NULL,
PRIMARY KEY (`IdPlat`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Plat`
--
LOCK TABLES `Plat` WRITE;
/*!40000 ALTER TABLE `Plat` DISABLE KEYS */;
INSERT INTO `Plat` VALUES (1,'Tchep Poisson',1000),(2,'Tchep Poulet',1500),(3,'Alloco',500),(4,'Attieke',200),(5,'Risoto de poulet',1500),(6,'Attieke Soupe de poulet',1500),(7,'Deguê',500),(8,'Gateau au chocolat',2500),(9,'<NAME>',6000),(10,'Frite Poulet',1200),(11,'Poulet KFC',2500),(12,'Bissap',500),(13,'Foutou Sauce Graine avec poisson',1000),(14,'Foutou Sauce Graine avec viande de boeuf',1500),(15,'Pizza moyenne',3000),(16,'Pizza grande',5000),(17,'Foutou Sauce Arachide avec poisson',1000),(18,'Foufou Sauce Claire',1000);
/*!40000 ALTER TABLE `Plat` 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 2022-01-21 0:38:26
|
-- TABLE HAS TO BE CREATED BEFORE HAND. This is same structure postgress SQL creates
-- It very unfortunate the connector doesn't handle __connect_topic text primary key field since its a field without specific length.
-- Such things one would expect the connector would be able to handle based on the dialect.
create table kafka_source_twitter_topic_geek_tweets
(
__connect_topic varchar(256) not null,
__connect_partition integer not null,
__connect_offset bigint not null,
created_at text,
id bigint not null,
text text,
lang text,
is_retweet binary not null,
constraint source_twitter_topic_geek_tweets_pkey
primary key (__connect_topic, __connect_partition, __connect_offset)
);
select * from kafka_source_twitter_topic_geek_tweets;
|
CREATE EXTENSION IF NOT EXISTS moddatetime;
CREATE TABLE artist (
id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc'),
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc'),
name TEXT NOT NULL
);
CREATE TRIGGER artist_updated_at
BEFORE UPDATE ON artist
FOR EACH ROW
EXECUTE PROCEDURE moddatetime (updated_at);
INSERT INTO artist (name)
VALUES ('Christine and the Queens'),
('Daft Punk'),
('Grizzly Bear'),
('Imogen Heap');
|
SELECT
o.organism_id
, o.name
, o.template
, o.gene_counter_start
, o.gene_counter_current
, o.transcript_counter_start
, o.transcript_counter_current
, o.created
, o.modified
, o.created_by
FROM
osi.organisms AS o
WHERE
LOWER(o.name) = LOWER(?)
;
|
CREATE SEQUENCE usagedatareporting_id_seq START WITH 1;
CREATE TABLE UsageDataReporting (
id BIGINT DEFAULT nextval('usagedatareporting_id_seq') PRIMARY KEY,
serverId VARCHAR(255) NOT NULL,
lastReportedAt TIMESTAMP
);
--//@UNDO
DROP TABLE IF EXISTS UsageDataReporting;
DROP SEQUENCE usagedatareporting_id_seq;
|
<gh_stars>1-10
-- Macro to rename a relation
{% macro rename_named_relation(from_name, to_name) %}
{%- set from_relation = api.Relation.create(database=target.database, schema=target.schema, identifier=from_name, type='table') -%}
{%- set to_relation = api.Relation.create(database=target.database, schema=target.schema, identifier=to_name, type='table') -%}
{% do adapter.rename_relation(from_relation, to_relation) %}
{% endmacro %}
|
<gh_stars>1-10
-- Verify ggircs-portal:tables/application_review_step_001 on pg
begin;
do
$do$
begin
if (select exists(
select * from ggircs_portal.application_review_step
where review_step_id > 1
and application_id in (select id from ggircs_portal.application where reporting_year = 2018)))
then
raise exception 'There are non-legacy review steps present on legacy applications';
else
perform true;
end if;
end
$do$;
rollback;
|
CREATE TABLE IF NOT EXISTS `Org` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`createdAt` datetime(3) DEFAULT CURRENT_TIMESTAMP(3),
PRIMARY KEY (`id`),
UNIQUE KEY `Org.name_unique` (`name`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `User` (
`id` int NOT NULL AUTO_INCREMENT,
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`username` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`displayName` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`role` enum('USER', 'ADMIN') COLLATE utf8mb4_unicode_ci DEFAULT 'USER',
`orgId` int NOT NULL,
`createdAt` datetime(3) DEFAULT CURRENT_TIMESTAMP(3),
PRIMARY KEY (`id`),
UNIQUE KEY `User.email_unique` (`email`),
UNIQUE KEY `User.username_unique` (`username`),
KEY `orgId` (`orgId`),
CONSTRAINT `User_ibfk_1` FOREIGN KEY (`orgId`) REFERENCES `Org` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `Lens` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`orgId` int NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `Lens.name_unique` (`name`),
KEY `orgId` (`orgId`),
CONSTRAINT `Lens_ibfk_1` FOREIGN KEY (`orgId`) REFERENCES `Org` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `Tag` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`channelId` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `Tag.name_unique` (`name`),
UNIQUE KEY `Tag.channelId_unique` (`channelId`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `Post` (
`id` int NOT NULL AUTO_INCREMENT,
`createdAt` datetime(3) DEFAULT CURRENT_TIMESTAMP(3),
`title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`summary` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`published` tinyint(1) DEFAULT '0',
`authorId` int NOT NULL,
`lensId` int NOT NULL,
`content` text COLLATE utf8mb4_unicode_ci,
`tagId` int NOT NULL,
PRIMARY KEY (`id`),
KEY `authorId` (`authorId`),
KEY `lensId` (`lensId`),
KEY `tagId` (`tagId`),
CONSTRAINT `Post_ibfk_1` FOREIGN KEY (`authorId`) REFERENCES `User` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `Post_ibfk_2` FOREIGN KEY (`lensId`) REFERENCES `Lens` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `Post_ibfk_3` FOREIGN KEY (`tagId`) REFERENCES `Tag` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `Profile` (
`id` int NOT NULL AUTO_INCREMENT,
`bio` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`avatar` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`userId` int NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `Profile_userId_unique` (`userId`),
CONSTRAINT `Profile_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `User` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE `Reply` (
`id` int NOT NULL AUTO_INCREMENT,
`createdAt` datetime(3) DEFAULT CURRENT_TIMESTAMP(3),
`postId` int NOT NULL,
`authorId` int NOT NULL,
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
`parentId` int DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `postId` (`postId`),
KEY `authorId` (`authorId`),
CONSTRAINT `Reply_ibfk_1` FOREIGN KEY (`postId`) REFERENCES `Post` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `Reply_ibfk_2` FOREIGN KEY (`authorId`) REFERENCES `User` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `Star` (
`id` int NOT NULL AUTO_INCREMENT,
`postId` int NOT NULL,
`userId` int NOT NULL,
`shining` tinyint(1) DEFAULT NULL,
`replyId` int DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `postId` (`postId`),
KEY `userId` (`userId`),
KEY `replyId` (`replyId`),
CONSTRAINT `Star_ibfk_1` FOREIGN KEY (`postId`) REFERENCES `Post` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `Star_ibfk_2` FOREIGN KEY (`userId`) REFERENCES `User` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `Star_ibfk_3` FOREIGN KEY (`replyId`) REFERENCES `Reply` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
INSERT INTO Org (id, name) VALUES (1, '');
|
<filename>!dev_files/db/dump-20171116.sql
-- MySQL dump 10.16 Distrib 10.1.25-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: test_xcompany
-- ------------------------------------------------------
-- Server version 10.1.25-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `test_xcompany_auth_assignment`
--
DROP TABLE IF EXISTS `test_xcompany_auth_assignment`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test_xcompany_auth_assignment` (
`item_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`user_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`created_at` int(11) DEFAULT NULL,
PRIMARY KEY (`item_name`,`user_id`),
KEY `auth_assignment_user_id_idx` (`user_id`),
CONSTRAINT `test_xcompany_auth_assignment_ibfk_1` FOREIGN KEY (`item_name`) REFERENCES `test_xcompany_auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `test_xcompany_auth_assignment`
--
LOCK TABLES `test_xcompany_auth_assignment` WRITE;
/*!40000 ALTER TABLE `test_xcompany_auth_assignment` DISABLE KEYS */;
INSERT INTO `test_xcompany_auth_assignment` VALUES ('admin','1',1510707163),('user','2',1510837167),('user','3',1510837191);
/*!40000 ALTER TABLE `test_xcompany_auth_assignment` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `test_xcompany_auth_item`
--
DROP TABLE IF EXISTS `test_xcompany_auth_item`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test_xcompany_auth_item` (
`name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`type` smallint(6) NOT NULL,
`description` text COLLATE utf8_unicode_ci,
`rule_name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
`data` blob,
`created_at` int(11) DEFAULT NULL,
`updated_at` int(11) DEFAULT NULL,
PRIMARY KEY (`name`),
KEY `rule_name` (`rule_name`),
KEY `idx-auth_item-type` (`type`),
CONSTRAINT `test_xcompany_auth_item_ibfk_1` FOREIGN KEY (`rule_name`) REFERENCES `test_xcompany_auth_rule` (`name`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `test_xcompany_auth_item`
--
LOCK TABLES `test_xcompany_auth_item` WRITE;
/*!40000 ALTER TABLE `test_xcompany_auth_item` DISABLE KEYS */;
INSERT INTO `test_xcompany_auth_item` VALUES ('admin',1,NULL,NULL,NULL,1510707163,1510707163),('dashboard',1,NULL,NULL,NULL,1510707163,1510707163),('manager',1,NULL,NULL,NULL,1510707163,1510707163),('user',1,NULL,NULL,NULL,1510707163,1510707163);
/*!40000 ALTER TABLE `test_xcompany_auth_item` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `test_xcompany_auth_item_child`
--
DROP TABLE IF EXISTS `test_xcompany_auth_item_child`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test_xcompany_auth_item_child` (
`parent` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`child` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`parent`,`child`),
KEY `child` (`child`),
CONSTRAINT `test_xcompany_auth_item_child_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `test_xcompany_auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `test_xcompany_auth_item_child_ibfk_2` FOREIGN KEY (`child`) REFERENCES `test_xcompany_auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `test_xcompany_auth_item_child`
--
LOCK TABLES `test_xcompany_auth_item_child` WRITE;
/*!40000 ALTER TABLE `test_xcompany_auth_item_child` DISABLE KEYS */;
INSERT INTO `test_xcompany_auth_item_child` VALUES ('admin','manager'),('dashboard','user'),('manager','dashboard');
/*!40000 ALTER TABLE `test_xcompany_auth_item_child` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `test_xcompany_auth_rule`
--
DROP TABLE IF EXISTS `test_xcompany_auth_rule`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test_xcompany_auth_rule` (
`name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`data` blob,
`created_at` int(11) DEFAULT NULL,
`updated_at` int(11) DEFAULT NULL,
PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `test_xcompany_auth_rule`
--
LOCK TABLES `test_xcompany_auth_rule` WRITE;
/*!40000 ALTER TABLE `test_xcompany_auth_rule` DISABLE KEYS */;
/*!40000 ALTER TABLE `test_xcompany_auth_rule` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `test_xcompany_blog_article`
--
DROP TABLE IF EXISTS `test_xcompany_blog_article`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test_xcompany_blog_article` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(255) NOT NULL,
`active` tinyint(1) NOT NULL,
`title` varchar(255) NOT NULL,
`preview_content` text,
`content` longtext,
`seo_keywords` varchar(255) DEFAULT NULL,
`seo_description` varchar(255) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`image_id` int(11) unsigned DEFAULT NULL,
`blog_category_id` int(11) unsigned NOT NULL,
`user_id` int(11) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `code` (`code`),
KEY `fk_blog_article_image1_idx` (`image_id`),
KEY `fk_blog_article_user1_idx` (`user_id`),
KEY `fk_blog_article_blog_category1_idx` (`blog_category_id`),
CONSTRAINT `fk_blog_article_blog_category1_idx` FOREIGN KEY (`blog_category_id`) REFERENCES `test_xcompany_blog_category` (`id`),
CONSTRAINT `fk_blog_article_image1_idx` FOREIGN KEY (`image_id`) REFERENCES `test_xcompany_blog_image` (`id`),
CONSTRAINT `fk_blog_article_user1_idx` FOREIGN KEY (`user_id`) REFERENCES `test_xcompany_user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `test_xcompany_blog_article`
--
LOCK TABLES `test_xcompany_blog_article` WRITE;
/*!40000 ALTER TABLE `test_xcompany_blog_article` DISABLE KEYS */;
INSERT INTO `test_xcompany_blog_article` VALUES (1,'test',1,'test','<p>Товарищи! укрепление и развитие структуры требуют определения и уточнения дальнейших направлений развития. Разнообразный и богатый опыт сложившаяся структура организации позволяет выполнять важные задания по разработке позиций, занимаемых участниками в отношении поставленных задач.</p>\r\n\r\n<p>Повседневная практика показывает, что постоянный количественный рост и сфера нашей активности представляет собой интересный эксперимент проверки направлений прогрессивного развития. Таким образом рамки и место обучения кадров представляет собой интересный эксперимент проверки систем массового участия. Не следует, однако забывать, что рамки и место обучения кадров влечет за собой процесс внедрения и модернизации направлений прогрессивного развития. Идейные соображения высшего порядка, а также сложившаяся структура организации влечет за собой процесс внедрения и модернизации модели развития.</p>\r\n','<p>Товарищи! укрепление и развитие структуры требуют определения и уточнения дальнейших направлений развития. Разнообразный и богатый опыт сложившаяся структура организации позволяет выполнять важные задания по разработке позиций, занимаемых участниками в отношении поставленных задач.</p>\r\n\r\n<p>Повседневная практика показывает, что постоянный количественный рост и сфера нашей активности представляет собой интересный эксперимент проверки направлений прогрессивного развития. Таким образом рамки и место обучения кадров представляет собой интересный эксперимент проверки систем массового участия. Не следует, однако забывать, что рамки и место обучения кадров влечет за собой процесс внедрения и модернизации направлений прогрессивного развития. Идейные соображения высшего порядка, а также сложившаяся структура организации влечет за собой процесс внедрения и модернизации модели развития.</p>\r\n\r\n<p>Товарищи! укрепление и развитие структуры требуют определения и уточнения дальнейших направлений развития. Разнообразный и богатый опыт сложившаяся структура организации позволяет выполнять важные задания по разработке позиций, занимаемых участниками в отношении поставленных задач.</p>\r\n\r\n<p>Повседневная практика показывает, что постоянный количественный рост и сфера нашей активности представляет собой интересный эксперимент проверки направлений прогрессивного развития. Таким образом рамки и место обучения кадров представляет собой интересный эксперимент проверки систем массового участия. Не следует, однако забывать, что рамки и место обучения кадров влечет за собой процесс внедрения и модернизации направлений прогрессивного развития. Идейные соображения высшего порядка, а также сложившаяся структура организации влечет за собой процесс внедрения и модернизации модели развития.</p>\r\n\r\n<p>Товарищи! укрепление и развитие структуры требуют определения и уточнения дальнейших направлений развития. Разнообразный и богатый опыт сложившаяся структура организации позволяет выполнять важные задания по разработке позиций, занимаемых участниками в отношении поставленных задач.</p>\r\n\r\n<p>Повседневная практика показывает, что постоянный количественный рост и сфера нашей активности представляет собой интересный эксперимент проверки направлений прогрессивного развития. Таким образом рамки и место обучения кадров представляет собой интересный эксперимент проверки систем массового участия. Не следует, однако забывать, что рамки и место обучения кадров влечет за собой процесс внедрения и модернизации направлений прогрессивного развития. Идейные соображения высшего порядка, а также сложившаяся структура организации влечет за собой процесс внедрения и модернизации модели развития.</p>\r\n\r\n<p> </p>\r\n','test, seo, test','tes description','2017-11-15 23:44:30','2017-11-15 23:53:04',1,1,1),(2,'test1',1,'test1','<p>С другой стороны дальнейшее развитие различных форм деятельности влечет за собой процесс внедрения и модернизации форм развития. Товарищи! постоянный количественный рост и сфера нашей активности представляет собой интересный эксперимент проверки модели развития. Равным образом реализация намеченных плановых заданий играет важную роль в формировании направлений прогрессивного развития. Значимость этих проблем настолько очевидна, что реализация намеченных плановых заданий в значительной степени обуславливает создание модели развития.</p>\r\n\r\n<p>Значимость этих проблем настолько очевидна, что постоянное информационно-пропагандистское обеспечение нашей деятельности позволяет оценить значение новых предложений. С другой стороны укрепление и развитие структуры требуют определения и уточнения модели развития. Задача организации, в особенности же консультация с широким активом требуют определения и уточнения системы обучения кадров, соответствует насущным потребностям. Повседневная практика показывает, что начало повседневной работы по формированию позиции обеспечивает широкому кругу (специалистов) участие в формировании новых предложений. Товарищи! реализация намеченных плановых заданий обеспечивает широкому кругу (специалистов) участие в формировании дальнейших направлений развития. Разнообразный и богатый опыт консультация с широким активом позволяет оценить значение модели развития.</p>\r\n','<p>С другой стороны дальнейшее развитие различных форм деятельности влечет за собой процесс внедрения и модернизации форм развития. Товарищи! постоянный количественный рост и сфера нашей активности представляет собой интересный эксперимент проверки модели развития. Равным образом реализация намеченных плановых заданий играет важную роль в формировании направлений прогрессивного развития. Значимость этих проблем настолько очевидна, что реализация намеченных плановых заданий в значительной степени обуславливает создание модели развития.</p>\r\n\r\n<p>Значимость этих проблем настолько очевидна, что постоянное информационно-пропагандистское обеспечение нашей деятельности позволяет оценить значение новых предложений. С другой стороны укрепление и развитие структуры требуют определения и уточнения модели развития. Задача организации, в особенности же консультация с широким активом требуют определения и уточнения системы обучения кадров, соответствует насущным потребностям. Повседневная практика показывает, что начало повседневной работы по формированию позиции обеспечивает широкому кругу (специалистов) участие в формировании новых предложений. Товарищи! реализация намеченных плановых заданий обеспечивает широкому кругу (специалистов) участие в формировании дальнейших направлений развития. Разнообразный и богатый опыт консультация с широким активом позволяет оценить значение модели развития.</p>\r\n\r\n<p>Разнообразный и богатый опыт реализация намеченных плановых заданий позволяет оценить значение систем массового участия. Не следует, однако забывать, что сложившаяся структура организации требуют от нас анализа дальнейших направлений развития. Идейные соображения высшего порядка, а также реализация намеченных плановых заданий представляет собой интересный эксперимент проверки направлений прогрессивного развития.</p>\r\n\r\n<p>Идейные соображения высшего порядка, а также рамки и место обучения кадров требуют определения и уточнения форм развития. Повседневная практика показывает, что новая модель организационной деятельности требуют от нас анализа направлений прогрессивного развития.</p>\r\n\r\n<p>Равным образом реализация намеченных плановых заданий влечет за собой процесс внедрения и модернизации позиций, занимаемых участниками в отношении поставленных задач. Значимость этих проблем настолько очевидна, что реализация намеченных плановых заданий влечет за собой процесс внедрения и модернизации дальнейших направлений развития. Повседневная практика показывает, что дальнейшее развитие различных форм деятельности способствует подготовки и реализации систем массового участия. Не следует, однако забывать, что новая модель организационной деятельности требуют от нас анализа позиций, занимаемых участниками в отношении поставленных задач. Разнообразный и богатый опыт дальнейшее развитие различных форм деятельности способствует подготовки и реализации новых предложений. Разнообразный и богатый опыт дальнейшее развитие различных форм деятельности позволяет оценить значение систем массового участия.</p>\r\n\r\n<p>Повседневная практика показывает, что постоянный количественный рост и сфера нашей активности позволяет выполнять важные задания по разработке дальнейших направлений развития. Не следует, однако забывать, что укрепление и развитие структуры позволяет выполнять важные задания по разработке новых предложений.</p>\r\n\r\n<p>Равным образом реализация намеченных плановых заданий играет важную роль в формировании форм развития. Не следует, однако забывать, что укрепление и развитие структуры в значительной степени обуславливает создание соответствующий условий активизации.</p>\r\n\r\n<p>Задача организации, в особенности же новая модель организационной деятельности требуют определения и уточнения форм развития. Товарищи! новая модель организационной деятельности играет важную роль в формировании форм развития. Товарищи! консультация с широким активом позволяет выполнять важные задания по разработке системы обучения кадров, соответствует насущным потребностям. Повседневная практика показывает, что укрепление и развитие структуры позволяет оценить значение новых предложений. Разнообразный и богатый опыт реализация намеченных плановых заданий играет важную роль в формировании существенных финансовых и административных условий. Повседневная практика показывает, что дальнейшее развитие различных форм деятельности играет важную роль в формировании дальнейших направлений развития.</p>\r\n\r\n<p>Не следует, однако забывать, что постоянное информационно-пропагандистское обеспечение нашей деятельности играет важную роль в формировании существенных финансовых и административных условий. Задача организации, в особенности же дальнейшее развитие различных форм деятельности позволяет оценить значение позиций, занимаемых участниками в отношении поставленных задач.</p>\r\n\r\n<p>Идейные соображения высшего порядка, а также консультация с широким активом позволяет выполнять важные задания по разработке позиций, занимаемых участниками в отношении поставленных задач. Разнообразный и богатый опыт рамки и место обучения кадров в значительной степени обуславливает создание существенных финансовых и административных условий. Не следует, однако забывать, что начало повседневной работы по формированию позиции способствует подготовки и реализации модели развития.</p>\r\n','test','','2017-11-16 17:51:49','2017-11-16 17:51:49',2,1,1);
/*!40000 ALTER TABLE `test_xcompany_blog_article` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `test_xcompany_blog_article_has_blog_tag`
--
DROP TABLE IF EXISTS `test_xcompany_blog_article_has_blog_tag`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test_xcompany_blog_article_has_blog_tag` (
`blog_article_id` int(11) unsigned NOT NULL,
`blog_tag_id` int(11) unsigned NOT NULL,
PRIMARY KEY (`blog_article_id`,`blog_tag_id`),
KEY `fk_blog_article_has_blog_tag_blog_tag1_idx` (`blog_tag_id`),
CONSTRAINT `fk_blog_article_has_blog_tag_blog_article1_idx` FOREIGN KEY (`blog_article_id`) REFERENCES `test_xcompany_blog_article` (`id`),
CONSTRAINT `fk_blog_article_has_blog_tag_blog_tag1_idx` FOREIGN KEY (`blog_tag_id`) REFERENCES `test_xcompany_blog_tag` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `test_xcompany_blog_article_has_blog_tag`
--
LOCK TABLES `test_xcompany_blog_article_has_blog_tag` WRITE;
/*!40000 ALTER TABLE `test_xcompany_blog_article_has_blog_tag` DISABLE KEYS */;
INSERT INTO `test_xcompany_blog_article_has_blog_tag` VALUES (1,1),(1,2),(1,3);
/*!40000 ALTER TABLE `test_xcompany_blog_article_has_blog_tag` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `test_xcompany_blog_category`
--
DROP TABLE IF EXISTS `test_xcompany_blog_category`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test_xcompany_blog_category` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(255) NOT NULL,
`parent_id` int(11) unsigned DEFAULT NULL,
`name` varchar(255) NOT NULL,
`description` text,
`seo_keywords` varchar(255) DEFAULT NULL,
`seo_description` varchar(255) DEFAULT NULL,
`create_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`user_id` int(11) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `code` (`code`),
KEY `fk_blog_category_user1_idx` (`user_id`),
CONSTRAINT `fk_blog_category_user1_idx` FOREIGN KEY (`user_id`) REFERENCES `test_xcompany_user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `test_xcompany_blog_category`
--
LOCK TABLES `test_xcompany_blog_category` WRITE;
/*!40000 ALTER TABLE `test_xcompany_blog_category` DISABLE KEYS */;
INSERT INTO `test_xcompany_blog_category` VALUES (1,'life',NULL,'Жизнь','Сайт рыбатекст поможет дизайнеру, верстальщику, вебмастеру сгенерировать несколько абзацев более менее осмысленного текста рыбы на русском языке, а начинающему оратору отточить навык публичных выступлений в домашних условиях. При создании генератора мы использовали небезизвестный универсальный код речей. Текст генерируется абзацами случайным образом от двух до десяти предложений в абзаце, что позволяет сделать текст более привлекательным и живым для визуально-слухового восприятия.\r\n\r\nПо своей сути рыбатекст является альтернативой традиционному lorem ipsum, который вызывает у некторых людей недоумение при попытках прочитать рыбу текст. В отличии от lorem ipsum, текст рыба на русском языке наполнит любой макет непонятным смыслом и придаст неповторимый колорит советских времен. ','жизнь','Сайт рыбатекст поможет дизайнеру, верстальщику, вебмастеру сгенерировать несколько абзацев более менее осмысленного текста рыбы на русском языке','2017-11-15 20:09:57','2017-11-15 20:20:58',1),(2,'motivation',NULL,'Мотивация',' Задача организации, в особенности же сложившаяся структура организации требуют от нас анализа систем массового участия. Не следует, однако забывать, что рамки и место обучения кадров позволяет выполнять важные задания по разработке позиций, занимаемых участниками в отношении поставленных задач. Не следует, однако забывать, что реализация намеченных плановых заданий требуют от нас анализа направлений прогрессивного развития. Не следует, однако забывать, что реализация намеченных плановых заданий позволяет выполнять важные задания по разработке новых предложений. Значимость этих проблем настолько очевидна, что новая модель организационной деятельности позволяет оценить значение форм развития. Разнообразный и богатый опыт консультация с широким активом представляет собой интересный эксперимент проверки дальнейших направлений развития.\r\n\r\nПовседневная практика показывает, что постоянное информационно-пропагандистское обеспечение нашей деятельности обеспечивает широкому кругу (специалистов) участие в формировании существенных финансовых и административных условий. Равным образом сложившаяся структура организации представляет собой интересный эксперимент проверки форм развития. ','Мотивация','Задача организации, в особенности же сложившаяся структура организации требуют от нас анализа систем массового участия.','2017-11-15 20:19:06','2017-11-15 20:19:06',1);
/*!40000 ALTER TABLE `test_xcompany_blog_category` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `test_xcompany_blog_image`
--
DROP TABLE IF EXISTS `test_xcompany_blog_image`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test_xcompany_blog_image` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) DEFAULT NULL,
`origin_name` varchar(255) NOT NULL,
`name` char(36) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `test_xcompany_blog_image`
--
LOCK TABLES `test_xcompany_blog_image` WRITE;
/*!40000 ALTER TABLE `test_xcompany_blog_image` DISABLE KEYS */;
INSERT INTO `test_xcompany_blog_image` VALUES (1,NULL,'100 Best Wallpapers 11 1920x1080 (10).jpg','fc3fecaebd6522b62339196046b7f3bb.jpg'),(2,NULL,'100 Best Wallpapers 11 1920x1080 (10).jpg','b858354b34ee9bf3ccd14967a6997a85.jpg');
/*!40000 ALTER TABLE `test_xcompany_blog_image` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `test_xcompany_blog_tag`
--
DROP TABLE IF EXISTS `test_xcompany_blog_tag`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test_xcompany_blog_tag` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `test_xcompany_blog_tag`
--
LOCK TABLES `test_xcompany_blog_tag` WRITE;
/*!40000 ALTER TABLE `test_xcompany_blog_tag` DISABLE KEYS */;
INSERT INTO `test_xcompany_blog_tag` VALUES (1,'Здоровье'),(2,'Видео'),(3,'Тего-тест');
/*!40000 ALTER TABLE `test_xcompany_blog_tag` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `test_xcompany_link_item`
--
DROP TABLE IF EXISTS `test_xcompany_link_item`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test_xcompany_link_item` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) unsigned NOT NULL,
`link` varchar(255) NOT NULL,
`price` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `link` (`link`),
KEY `fk_link_item_user1_idx` (`user_id`),
CONSTRAINT `fk_link_item_user1_idx` FOREIGN KEY (`user_id`) REFERENCES `test_xcompany_user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `test_xcompany_link_item`
--
LOCK TABLES `test_xcompany_link_item` WRITE;
/*!40000 ALTER TABLE `test_xcompany_link_item` DISABLE KEYS */;
INSERT INTO `test_xcompany_link_item` VALUES (1,1,'/site/about',1),(4,2,'/blog/article/1',10),(5,3,'/blog/article/2',10);
/*!40000 ALTER TABLE `test_xcompany_link_item` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `test_xcompany_link_user_balance`
--
DROP TABLE IF EXISTS `test_xcompany_link_user_balance`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test_xcompany_link_user_balance` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) unsigned NOT NULL,
`balance` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `fk_link_user_balance_user1_idx` (`user_id`),
CONSTRAINT `fk_link_user_balance_user1_idx` FOREIGN KEY (`user_id`) REFERENCES `test_xcompany_user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `test_xcompany_link_user_balance`
--
LOCK TABLES `test_xcompany_link_user_balance` WRITE;
/*!40000 ALTER TABLE `test_xcompany_link_user_balance` DISABLE KEYS */;
INSERT INTO `test_xcompany_link_user_balance` VALUES (1,1,200),(2,2,100),(3,3,0);
/*!40000 ALTER TABLE `test_xcompany_link_user_balance` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `test_xcompany_migration`
--
DROP TABLE IF EXISTS `test_xcompany_migration`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test_xcompany_migration` (
`version` varchar(180) NOT NULL,
`apply_time` int(11) DEFAULT NULL,
PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `test_xcompany_migration`
--
LOCK TABLES `test_xcompany_migration` WRITE;
/*!40000 ALTER TABLE `test_xcompany_migration` DISABLE KEYS */;
INSERT INTO `test_xcompany_migration` VALUES ('common\\modules\\blog\\migrations\\M171115000213CreateTableBlogImage',1510707164),('common\\modules\\blog\\migrations\\M171115000221CreateTableBlogArticle',1510707165),('common\\modules\\blog\\migrations\\M171115000255CreateTableBlogCategory',1510707167),('common\\modules\\blog\\migrations\\M171115000308CreateTableBlogTag',1510707167),('common\\modules\\blog\\migrations\\M171115000339CreateTableBlogArticleHasBlogTag',1510707168),('common\\modules\\link\\migrations\\M171116112737CreateTableLinkItem',1510837461),('common\\modules\\link\\migrations\\M171116112743CreateTableLinkUserBalance',1510837462),('m000000_000000_base',1510707160),('m130524_201442_init',1510707162),('m171113_224909_create_first_user',1510707162),('m171113_224938_rbac_init',1510707163),('m171113_224959_rbac_add_index_on_auth_assignment_user_id',1510707163),('m171113_225030_add_starting_roles',1510707163);
/*!40000 ALTER TABLE `test_xcompany_migration` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `test_xcompany_user`
--
DROP TABLE IF EXISTS `test_xcompany_user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test_xcompany_user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`auth_key` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
`password_hash` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`password_reset_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`status` smallint(6) NOT NULL DEFAULT '10',
`created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`),
UNIQUE KEY `email` (`email`),
UNIQUE KEY `password_reset_token` (`password_reset_token`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `test_xcompany_user`
--
LOCK TABLES `test_xcompany_user` WRITE;
/*!40000 ALTER TABLE `test_xcompany_user` DISABLE KEYS */;
INSERT INTO `test_xcompany_user` VALUES (1,'admin','<PASSWORD>5q2rFppG5','$2y$13$R9VvhiqOBsRT81Vzs3/FretaZSdiIwc8zaJ3xHlRXOeHfJMSIfmfS',NULL,'<EMAIL>',10,1510707162,1510707162),(2,'test','P-C6_kreAlNQZf4cV9X7yBJ7ZSq1lGJu','$2y$13$c3Wv/cNjAYLwkYKM9/N3XuoXpV2pkjrck3/kZ.Ugdzi0965pleaDq',NULL,'<EMAIL>',10,1510837166,1510837166),(3,'test1','uGGW0emOEtHAqUWHkMsQd2uuiskCqvBA','$2y$13$9p7vJG7LepHBi/vG5oakNOS9Ie3hx/1lciUAULYWHShZUmDt3e3v.',NULL,'<EMAIL>',10,1510837191,1510837191);
/*!40000 ALTER TABLE `test_xcompany_user` 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 2017-11-16 18:09:46
|
<gh_stars>0
SELECT * FROM ms_produk;
|
<reponame>rochaandre/scripts-oracle-named
-- Tablespace Summary report
--Note: You need to connect as SYS or
--need direct grants on dba_data_files to run this report.
Set linesize 120 pagesize 60 feedback off heading on
ttitle skip center "Space usage report by Tablespace" skip 2
col Tablespace format a15
set numformat 999999.9
clear breaks
clear computes
create or replace view dbadmin.temprpt_free as select tablespace_name,sum(bytes) free
from sys.dba_free_space
group by tablespace_name;
create or replace view dbadmin.temprpt_bytes as
select tablespace_name,sum(bytes) bytes
from sys.dba_data_files
group by tablespace_name;
create or replace view dbadmin.temprpt_status as
select a.tablespace_name,free,bytes
from temprpt_bytes a,temprpt_free b
where a.tablespace_name=b.tablespace_name(+);
spool c:\freespace_by_tbs.log
select tablespace_name "Tablesapce",
round(bytes/(1024*1024),1) "Size_Mb",
round(nvl(bytes-free,bytes)/(1024*1024),1) "Used_Mb",
round(nvl(free,0)/(1024*1024),1) "Free_Mb",
round(nvl(100*(bytes-free)/bytes,100),1) "Used_%"
from temprpt_status
order by 5 desc;
ttitle off
select rpad('Total',30,'.') " ",
round(sum(bytes)/(1024*1024),1) " ",
round(sum(nvl(bytes-free,bytes))/(1024*1024),1) " ",
round(sum(nvl(free,0))/(1024*1024),1) " ",
round((100*(sum(bytes)-sum(free))/sum(bytes)),1) " "
from temprpt_status;
--drop view temprpt_bytes;
--drop view temprpt_free;
--drop view temprpt_status;
spool off
select a.tablespace_name "Tablesapce",
round(sum(a.bytes)/(1024*1024),1) "Size_Mb",
round(nvl(sum(a.bytes)-sum(b.bytes),sum(b.bytes))/(1024*1024),1) "Used_Mb",
round(nvl(sum(b.bytes),0)/(1024*1024),1) "Free_Mb",
round(nvl(100*(sum(a.bytes)-sum(b.bytes))/sum(a.bytes),100),1) "Used_%"
from dba_data_files a, dba_free_space b
group by a.tablespace_name
order by 5 desc
/
select a.tablespace_name, sum(b.bytes) free, sum(a.bytes) bytes
from dba_data_files a, dba_free_space b
where a.tablespace_name=b.tablespace_name(+)
group by a.tablespace_name
/
|
select FirstName + ' ' + + LastName AS "full name", CustomerID, Country
from dbo.Customer
where not country = 'USA'
select FirstName + ' ' + LastName AS "full name", CustomerID, Country
from dbo.Customer
where country = 'Brazil'
select distinct BillingCountry
from dbo.Invoice
select sum(Total) AS Sales
from dbo.Invoice
where InvoiceDate >= '2009' and InvoiceDate < '2010'
group by year(InvoiceDate)
|
<reponame>kkousounnis/Mysql_Excersises
-- LEFT OUTER JOIN
USE `classicmodels`;
SELECT
`customers`.`customerNumber`,
`customers`.`customerName`,
`orders`.`orderNumber`,
`orders`.`status`
FROM
`customers`
LEFT OUTER JOIN `orders`
ON `customers`.`customerNumber` = `orders`.`customerNumber`;
|
<gh_stars>0
-- MySQL dump 10.13 Distrib 5.6.35, for osx10.9 (x86_64)
--
-- Host: localhost Database: laraclassified
-- ------------------------------------------------------
-- Server version 5.6.35
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Dumping data for table `<<prefix>>subadmin1`
--
/*!40000 ALTER TABLE `<<prefix>>subadmin1` DISABLE KEYS */;
INSERT INTO `<<prefix>>subadmin1` VALUES (982,'FM.04','FM','Yap','Yap',1);
INSERT INTO `<<prefix>>subadmin1` VALUES (983,'FM.02','FM','Pohnpei','Pohnpei',1);
INSERT INTO `<<prefix>>subadmin1` VALUES (984,'FM.01','FM','Kosrae','Kosrae',1);
INSERT INTO `<<prefix>>subadmin1` VALUES (985,'FM.03','FM','Chuuk','Chuuk',1);
/*!40000 ALTER TABLE `<<prefix>>subadmin1` ENABLE KEYS */;
--
-- Dumping data for table `<<prefix>>subadmin2`
--
/*!40000 ALTER TABLE `<<prefix>>subadmin2` DISABLE KEYS */;
INSERT INTO `<<prefix>>subadmin2` VALUES (12944,'FM.02.KP','FM','FM.02','Kapingamarangi Municipality','Kapingamarangi Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12945,'FM.02.KT','FM','FM.02','Kitti Municipality','Kitti Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12946,'FM.02.KL','FM','FM.02','Kolonia Municipality','Kolonia Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12947,'FM.02.MA','FM','FM.02','Madolenihm Municipality','Madolenihm Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12948,'FM.02.MO','FM','FM.02','Mokil Municipality','Mokil Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12949,'FM.02.NE','FM','FM.02','Nett Municipality','Nett Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12950,'FM.02.NG','FM','FM.02','Ngatik Municipality','Ngatik Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12951,'FM.02.NU','FM','FM.02','Nukuoro Municipality','Nukuoro Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12952,'FM.02.OR','FM','FM.02','Oroluk Municipality','Oroluk Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12953,'FM.02.PI','FM','FM.02','Pingelap Municipality','Pingelap Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12954,'FM.02.SO','FM','FM.02','Sokehs Municipality','Sokehs Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12955,'FM.02.UH','FM','FM.02','U Municipality','U Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12956,'FM.01.LE','FM','FM.01','Lelu Municipality','Lelu Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12957,'FM.01.MA','FM','FM.01','Malem Municipality','Malem Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12958,'FM.01.TA','FM','FM.01','Tafunsak Municipality','Tafunsak Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12959,'FM.01.UT','FM','FM.01','Utwe Municipality','Utwe Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12960,'FM.04.DA','FM','FM.04','Dalipebinaw Municipality','Dalipebinaw Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12961,'FM.04.ER','FM','FM.04','Eauripik Municipality','Eauripik Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12962,'FM.04.EL','FM','FM.04','Elato Municipality','Elato Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12963,'FM.04.FS','FM','FM.04','Fais Municipality','Fais Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12964,'FM.04.FF','FM','FM.04','Fanif Municipality','Fanif Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12965,'FM.04.FP','FM','FM.04','Faraulep Municipality','Faraulep Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12966,'FM.04.GI','FM','FM.04','Gaferut Municipality','Gaferut Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12967,'FM.04.GG','FM','FM.04','Gagil Municipality','Gagil Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12968,'FM.04.GL','FM','FM.04','Gilman Municipality','Gilman Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12969,'FM.04.IF','FM','FM.04','Ifalik Municipality','Ifalik Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12970,'FM.04.KA','FM','FM.04','Kanifay Municipality','Kanifay Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12971,'FM.04.LA','FM','FM.04','Lamotrek Municipality','Lamotrek Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12972,'FM.04.MA','FM','FM.04','Maap Municipality','Maap Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12973,'FM.04.NG','FM','FM.04','Ngulu Municipality','Ngulu Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12974,'FM.04.RL','FM','FM.04','Rull Municipality','Rull Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12975,'FM.04.RM','FM','FM.04','Rumung Municipality','Rumung Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12976,'FM.04.SA','FM','FM.04','Satawal Municipality','Satawal Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12977,'FM.04.SO','FM','FM.04','Sorol Municipality','Sorol Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12978,'FM.04.TO','FM','FM.04','Tomil Municipality','Tomil Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12979,'FM.04.UL','FM','FM.04','Ulithi Municipality','Ulithi Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12980,'FM.04.WE','FM','FM.04','Weloy Municipality','Weloy Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12981,'FM.04.WO','FM','FM.04','Woleai Municipality','Woleai Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12982,'FM.03.EO','FM','FM.03','Eot Municipality','Eot Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12983,'FM.03.ET','FM','FM.03','Ettal Municipality','Ettal Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12984,'FM.03.FN','FM','FM.03','Fananu Municipality','Fananu Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12985,'FM.03.FB','FM','FM.03','Fanapanges Municipality','Fanapanges Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12986,'FM.03.FF','FM','FM.03','Fefen Municipality','Fefen Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12987,'FM.03.PK','FM','FM.03','Houk Municipality','Houk Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12988,'FM.03.KU','FM','FM.03','Kuttu Municipality','Kuttu Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12989,'FM.03.LO','FM','FM.03','Losap Municipality','Losap Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12990,'FM.03.LU','FM','FM.03','Lekinioch Municipality','Lekinioch Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12991,'FM.03.MA','FM','FM.03','Makur Municipality','Makur Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12992,'FM.03.MC','FM','FM.03','Moch Municipality','Moch Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12993,'FM.03.MU','FM','FM.03','Murilo Municipality','Murilo Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12994,'FM.03.NA','FM','FM.03','Nema Municipality','Nema Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12995,'FM.03.NL','FM','FM.03','Namoluk Municipality','Namoluk Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12996,'FM.03.NW','FM','FM.03','Nomwin Municipality','Nomwin Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12997,'FM.03.OP','FM','FM.03','Oneop Municipality','Oneop Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12998,'FM.03.OO','FM','FM.03','Onou Municipality','Onou Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (12999,'FM.03.UL','FM','FM.03','Onoun Municipality','Onoun Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13000,'FM.03.PR','FM','FM.03','Parem Municipality','Parem Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13001,'FM.03.PS','FM','FM.03','Piherarh Municipality','Piherarh Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13002,'FM.03.PL','FM','FM.03','Piis-Emwar Municipality','Piis-Emwar Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13003,'FM.03.PP','FM','FM.03','Pollap Municipality','Pollap Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13004,'FM.03.PW','FM','FM.03','Polowat Municipality','Polowat Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13005,'FM.03.RO','FM','FM.03','Ramanum Municipality','Ramanum Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13006,'FM.03.RU','FM','FM.03','Ruo Municipality','Ruo Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13007,'FM.03.SA','FM','FM.03','Satowan Municipality','Satowan Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13008,'FM.03.TA','FM','FM.03','Ta Municipality','Ta Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13009,'FM.03.TM','FM','FM.03','Tamatam Municipality','Tamatam Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13010,'FM.03.TL','FM','FM.03','Tolensom Municipality','Tolensom Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13011,'FM.03.DU','FM','FM.03','Tonoas Municipality','Tonoas Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13012,'FM.03.TS','FM','FM.03','Siis Municipality','Siis Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13013,'FM.03.UD','FM','FM.03','Udot-Fonuweisom Municipality','Udot-Fonuweisom Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13014,'FM.03.UM','FM','FM.03','Uman-Fonuweisom Municipality','Uman-Fonuweisom Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13015,'FM.03.OR','FM','FM.03','Unanu Municipality','Unanu Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13016,'FM.03.MN','FM','FM.03','Weno-Choniro Municipality','Weno-Choniro Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13017,'FM.03.FO','FM','FM.03','Fonoton Municipality','Fonoton Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13018,'FM.03.PA','FM','FM.03','Paata-Tupunion Municipality','Paata-Tupunion Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13019,'FM.03.PI','FM','FM.03','Piis-Panewu Municipality','Piis-Panewu Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13020,'FM.03.ON','FM','FM.03','Oneisom Municipality','Oneisom Municipality',1);
INSERT INTO `<<prefix>>subadmin2` VALUES (13021,'FM.03.PN','FM','FM.03','Pwene Municipality','Pwene Municipality',1);
/*!40000 ALTER TABLE `<<prefix>>subadmin2` ENABLE KEYS */;
--
-- Dumping data for table `<<prefix>>cities`
--
/*!40000 ALTER TABLE `<<prefix>>cities` DISABLE KEYS */;
INSERT INTO `<<prefix>>cities` VALUES (2081114,'FM','Weno','Weno',7.44648,151.841,'P','PPLA','FM.03','FM.03.MN',13856,'Pacific/Chuuk',1,'2016-09-23 23:00:00','2016-09-23 23:00:00');
INSERT INTO `<<prefix>>cities` VALUES (2081342,'FM','Tofol','Tofol',5.32479,163.008,'P','PPLA','FM.01','FM.01.LE',9686,'Pacific/Kosrae',1,'2013-08-10 23:00:00','2013-08-10 23:00:00');
INSERT INTO `<<prefix>>cities` VALUES (2081986,'FM','Palikir - National Government Center','Palikir - National Government Center',6.92477,158.161,'P','PPLC','FM.02','FM.02.SO',0,'Pacific/Pohnpei',1,'2015-06-02 23:00:00','2015-06-02 23:00:00');
INSERT INTO `<<prefix>>cities` VALUES (2082038,'FM','Kolonia Town','Kolonia Town',6.964,158.206,'P','PPL','FM.02','FM.02.KL',5681,'Pacific/Pohnpei',1,'2011-02-11 23:00:00','2011-02-11 23:00:00');
INSERT INTO `<<prefix>>cities` VALUES (4043034,'FM','Kolonia','Kolonia',6.964,158.206,'P','PPLA','FM.02','FM.02.KL',6074,'Pacific/Pohnpei',1,'2014-08-17 23:00:00','2014-08-17 23:00:00');
INSERT INTO `<<prefix>>cities` VALUES (7648112,'FM','Colonia','Colonia',9.51638,138.122,'P','PPLA','FM.04','FM.04.WE',7371,'Pacific/Chuuk',1,'2014-08-18 23:00:00','2014-08-18 23:00:00');
/*!40000 ALTER TABLE `<<prefix>>cities` ENABLE KEYS */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed
|
ALTER TABLE course DROP COLUMN university_id;
ALTER TABLE course ADD COLUMN university_id INT REFERENCES university(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE project_group DROP COLUMN course_id;
ALTER TABLE project_group ADD COLUMN course_id INT REFERENCES course(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE review DROP COLUMN project_group_id;
ALTER TABLE review ADD COLUMN project_group_id INT REFERENCES project_group(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE project_tags DROP COLUMN project_id;
ALTER TABLE project_tags ADD COLUMN project_id INT REFERENCES project(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE approved DROP COLUMN project_id;
ALTER TABLE approved ADD COLUMN project_id INT REFERENCES project(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE approved DROP COLUMN course_id;
ALTER TABLE approved ADD COLUMN course_id INT REFERENCES course(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE enroll DROP COLUMN account_id;
ALTER TABLE enroll ADD COLUMN account_id INT REFERENCES account(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE enroll DROP COLUMN course_id;
ALTER TABLE enroll ADD COLUMN course_id INT REFERENCES course(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE enroll DROP COLUMN university_id;
ALTER TABLE enroll ADD COLUMN university_id INT REFERENCES university(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE member DROP COLUMN account_id;
ALTER TABLE member ADD COLUMN account_id INT REFERENCES account(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE member DROP COLUMN project_group_id;
ALTER TABLE member ADD COLUMN project_group_id INT REFERENCES project_group(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE instructor DROP COLUMN account_id;
ALTER TABLE instructor ADD COLUMN account_id INT REFERENCES account(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE instructor DROP COLUMN course_id;
ALTER TABLE instructor ADD COLUMN course_id INT REFERENCES course(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE rep DROP COLUMN account_id;
ALTER TABLE rep ADD COLUMN account_id INT REFERENCES account(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE rep DROP COLUMN organization_id;
ALTER TABLE rep ADD COLUMN organization_id INT REFERENCES organization(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE preference DROP COLUMN account_id;
ALTER TABLE preference ADD COLUMN account_id INT REFERENCES account(id) ON DELETE RESTRICT NOT NULL;
ALTER TABLE preference DROP COLUMN project_id;
ALTER TABLE preference ADD COLUMN project_id INT REFERENCES project(id) ON DELETE RESTRICT NOT NULL;
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 09 Nov 2021 pada 12.28
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.2
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: `pengarsipan`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `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;
-- --------------------------------------------------------
--
-- Struktur dari tabel `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 untuk tabel `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(39, '2014_10_12_000000_create_users_table', 1),
(40, '2014_10_12_100000_create_password_resets_table', 1),
(41, '2019_08_19_000000_create_failed_jobs_table', 1),
(42, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(43, '2021_10_26_225315_create_surat_table', 1);
-- --------------------------------------------------------
--
-- Struktur dari tabel `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;
-- --------------------------------------------------------
--
-- Struktur dari tabel `personal_access_tokens`
--
CREATE TABLE `personal_access_tokens` (
`id` bigint(20) UNSIGNED NOT NULL,
`tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`tokenable_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
`abilities` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`last_used_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Struktur dari tabel `surat`
--
CREATE TABLE `surat` (
`id` bigint(20) UNSIGNED NOT NULL,
`nomor` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
`kategori` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`judul` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`file_arsip` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data untuk tabel `surat`
--
INSERT INTO `surat` (`id`, `nomor`, `kategori`, `judul`, `file_arsip`, `created_at`, `updated_at`) VALUES
(8, '5814', 'Undangan', 'Kuliah Luring', 'Slide 09 - UTS.pdf', '2021-10-28 04:42:41', '2021-10-28 04:42:41'),
(9, '0987655', 'Undangan', 'Kuliah Luring', 'UTS_PROPOSAL LA_Ayu AriestaW_1931710180.pdf', '2021-10-28 05:06:24', '2021-10-28 05:06:24'),
(10, 'wwd', 'Undangan', 'safcaf', 'document.pdf', '2021-10-28 05:12:44', '2021-10-28 05:12:44'),
(12, '89898v', 'Undangan', 'Kuliah Luring', 'Slide 09 - UTS.pdf', '2021-10-28 07:55:55', '2021-10-28 07:55:55'),
(13, '1081921', 'Undangan', 'Ujian Akhir Semester Telah Datang', 'C-01-Endang_Jurnal SPK COVID.pdf', '2021-10-28 13:41:41', '2021-10-28 13:41:41');
-- --------------------------------------------------------
--
-- Struktur dari tabel `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;
--
-- Indexes for dumped tables
--
--
-- Indeks untuk tabel `failed_jobs`
--
ALTER TABLE `failed_jobs`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);
--
-- Indeks untuk tabel `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indeks untuk tabel `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`);
--
-- Indeks untuk tabel `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`);
--
-- Indeks untuk tabel `surat`
--
ALTER TABLE `surat`
ADD PRIMARY KEY (`id`);
--
-- Indeks untuk tabel `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`);
--
-- AUTO_INCREMENT untuk tabel yang dibuang
--
--
-- AUTO_INCREMENT untuk tabel `failed_jobs`
--
ALTER TABLE `failed_jobs`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT untuk tabel `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=44;
--
-- AUTO_INCREMENT untuk tabel `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT untuk tabel `surat`
--
ALTER TABLE `surat`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
--
-- AUTO_INCREMENT untuk tabel `users`
--
ALTER TABLE `users`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
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 */;
|
##############################################################################################################################
# Copyright 2013 <NAME>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
##############################################################################################################################
##############################################################################################################################
# This script creates menus and menu_items tables required to support dynamic menus component. For more information, read
# official Fantastico documentation.
##############################################################################################################################
DROP TABLE IF EXISTS menu_items;
DROP TABLE IF EXISTS menus;
CREATE TABLE menus(
id INTEGER AUTO_INCREMENT,
name VARCHAR(150),
PRIMARY KEY(id)
);
CREATE TABLE menu_items(
id INTEGER AUTO_INCREMENT,
target VARCHAR(50) NOT NULL DEFAULT '_blank',
url VARCHAR(255) NOT NULL,
title VARCHAR(255) NOT NULL,
label VARCHAR(255) NOT NULL,
menu_id INTEGER NOT NULL,
PRIMARY KEY(id),
CONSTRAINT fk_menuitems_menu FOREIGN KEY(menu_id) REFERENCES menus(id)
);
INSERT INTO menus(id, name) VALUES(1, 'My First Menu');
INSERT INTO menu_items(target, url, title, label, menu_id)
VALUES ('_blank', '/homepage', 'Simple and friendly description', 'Home', 1),
('_blank', '/page2', 'Simple and friendly description', 'Page 2', 1),
('_blank', '/page3', 'Simple and friendly description', 'Page 3', 1);
|
<reponame>221B-io/databrary.org
alter table "public"."projects_funding" drop constraint "projects_funding_pkey";
alter table "public"."projects_funding"
add constraint "projects_funding_pkey"
primary key ( "projectId" );
|
INSERT INTO slfweb.bookmakers (id, created_at, updated_at, nom, logo, status, pirorite) VALUES (1, '2015-10-18 11:07:06', '2015-10-18 11:07:06', 'Pinnacle Sports', '', 0, 3);
INSERT INTO slfweb.bookmakers (id, created_at, updated_at, nom, logo, status, pirorite) VALUES (2, '2015-10-19 15:03:11', '2015-10-19 15:03:11', 'Bet365', '', 0, 3);
INSERT INTO slfweb.bookmakers (id, created_at, updated_at, nom, logo, status, pirorite) VALUES (3, '2015-10-20 17:52:05', '2015-10-20 17:52:05', 'Luckia.es', '', 0, 3);
INSERT INTO slfweb.bookmakers (id, created_at, updated_at, nom, logo, status, pirorite) VALUES (4, '2015-10-23 02:57:48', '2015-10-23 02:57:48', 'BetClic.fr', '', 0, 3);
|
-- Copyright (c) Microsoft. All rights reserved.
-- Licensed under the MIT license. See LICENSE file in the project root for full license information.
---------------------------------------------------------------------------------------------------
-- Script to upgrade Local Shard Map from version 0.0 to 1.0
---------------------------------------------------------------------------------------------------
-- add a column to ShardMapManagerLocal table to hold SCH-M lock during upgrade
ALTER TABLE __ShardManagement.ShardMapManagerLocal
ADD UpgradeLock INT NULL
GO
|
alter table OS_HISTORYSTEP drop constraint historystep_entry_fk;
alter table OS_CURRENTSTEP drop constraint currentstep_entry_fk;
drop table OS_HISTORYSTEP;
drop table OS_PROPERTYENTRY;
drop table OS_WFENTRY;
drop table OS_CURRENTSTEP;
DROP TABLE hibernate_sequence;
create table OS_HISTORYSTEP (
id BIGINT not null,
action_Id INTEGER,
caller VARCHAR(255),
finish_Date TIMESTAMP,
start_Date TIMESTAMP,
due_Date TIMESTAMP,
owner VARCHAR(255),
status VARCHAR(255),
step_Id INTEGER,
entry_Id BIGINT,
stepIndex INTEGER,
primary key (id)
);
create table OS_PROPERTYENTRY (
entity_name VARCHAR(125) not null,
entity_id BIGINT not null,
entity_key VARCHAR(255) not null,
key_type INTEGER,
boolean_val BIT,
double_val DOUBLE,
string_val VARCHAR(255),
long_val BIGINT,
int_val INTEGER,
date_val DATE,
primary key (entity_name, entity_id, entity_key)
);
create table OS_WFENTRY (
id BIGINT not null,
name VARCHAR(255),
state INTEGER,
primary key (id)
);
create table OS_CURRENTSTEP (
id BIGINT not null,
action_Id INTEGER,
caller VARCHAR(255),
finish_Date TIMESTAMP,
start_Date TIMESTAMP,
due_Date TIMESTAMP,
owner VARCHAR(255),
status VARCHAR(255),
step_Id INTEGER,
entry_Id BIGINT,
stepIndex INTEGER,
primary key (id)
);
alter table OS_HISTORYSTEP add constraint historystep_entry_fk foreign key (entry_Id) references OS_WFENTRY;
alter table OS_CURRENTSTEP add constraint currentstep_entry_fk foreign key (entry_Id) references OS_WFENTRY;
CREATE TABLE hibernate_sequence(
id NUMERIC
);
|
<reponame>datacentricity/log4tsql
create procedure [CommonSchemaTests].[test log4Private.JournalDetail column structure]
as
begin
create table CommonSchemaTests.expected
(
JournalId int not null
, ExtraInfo varchar(max) null
) ;
exec tSQLt.AssertEqualsTableSchema 'CommonSchemaTests.expected', 'log4Private.JournalDetail';
end;
|
-- file:numeric.sql ln:815 expect:true
INSERT INTO num_input_test(n1) VALUES ('555.50')
|
<filename>Database/Tables/EntitySearchFilter.sql
-- **************************************************************************************************
-- Table:EntitySearchFilter
-- Description: Stores the searched filters for a saved entity search
-- **************************************************************************************************
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'EntitySearchFilter')
AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
DROP TABLE EntitySearchFilter
GO
CREATE TABLE EntitySearchFilter (
Ident BIGINT IDENTITY(1,1) NOT NULL,
EntitySearchIdent BIGINT NULL,
EntitySearchFilterTypeIdent BIGINT NULL,
EntitySearchOperatorIdent BIGINT NULL,
EntityProjectRequirementIdent BIGINT NULL,
ReferenceIdent BIGINT NULL,
SearchValue NVARCHAR(MAX) NULL,
Active BIT NULL,
AddASUserIdent BIGINT NULL,
AddDateTime DATETIME NULL,
EditASUserIdent BIGINT NULL,
EditDateTime DATETIME NULL
)
CREATE UNIQUE CLUSTERED INDEX idx_EntitySearchFilter_Ident ON dbo.EntitySearchFilter(Ident)
GO
CREATE NONCLUSTERED INDEX idx_EntitySearchFilter_EntitySearchIdent ON dbo.EntitySearchFilter(EntitySearchIdent)
GO
|
<reponame>mfooo/wow<gh_stars>1-10
UPDATE `creature_template` SET `ScriptName` = 'npc_saikkal_the_elder' WHERE `entry` = 22932;
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 2.6.1-pl3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generato il: 22 Dic, 2006 at 12:47 PM
-- Versione MySQL: 3.23.49
-- Versione PHP: 4.2.0
--
-- Database: `cart`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `allegati`
--
CREATE TABLE `allegati` (
`id` int(11) NOT NULL auto_increment,
`idp` int(11) NOT NULL default '0',
`percorso` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=5 ;
--
-- Dump dei dati per la tabella `allegati`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `altrepagine`
--
CREATE TABLE `altrepagine` (
`id` int(11) NOT NULL auto_increment,
`nome` varchar(255) NOT NULL default '',
`contenuto` longtext NOT NULL,
`posto` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=7 ;
--
-- Dump dei dati per la tabella `altrepagine`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `categorie`
--
CREATE TABLE `categorie` (
`id` int(11) NOT NULL auto_increment,
`nome` varchar(50) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=17 ;
--
-- Dump dei dati per la tabella `categorie`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `colori`
--
CREATE TABLE `colori` (
`id` int(11) NOT NULL auto_increment,
`idp` int(11) NOT NULL default '0',
`nome` varchar(200) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=20 ;
--
-- Dump dei dati per la tabella `colori`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `configurazione`
--
CREATE TABLE `configurazione` (
`id` int(11) NOT NULL auto_increment,
`logo` varchar(255) NOT NULL default '',
`email_ordini` varchar(100) NOT NULL default '',
`piva` varchar(57) NOT NULL default '',
`email_paypal` varchar(100) NOT NULL default '',
`chisiamo` longtext NOT NULL,
`dovesiamo` longtext NOT NULL,
`contatti` longtext NOT NULL,
`nome` varchar(200) NOT NULL default '',
`telefono` varchar(20) NOT NULL default '',
`template` varchar(200) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=2 ;
--
-- Dump dei dati per la tabella `configurazione`
--
INSERT INTO `configurazione` VALUES (1, 'fungo.png', '<EMAIL>', '12345ert567', '<EMAIL>', 'yiyiyiyuiyuti', 'Siamo a mare', 'khjkhkkelefonando al xxxhgjhgjf', 'ecommerce', 'e', '../html/a');
-- --------------------------------------------------------
--
-- Struttura della tabella `immagini`
--
CREATE TABLE `immagini` (
`id` int(11) NOT NULL auto_increment,
`idp` int(11) NOT NULL default '0',
`percorso` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=19 ;
--
-- Dump dei dati per la tabella `immagini`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `newsletter`
--
CREATE TABLE `newsletter` (
`id` int(11) NOT NULL auto_increment,
`email` varchar(200) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
--
-- Dump dei dati per la tabella `newsletter`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `opzioni`
--
CREATE TABLE `opzioni` (
`id` int(11) NOT NULL auto_increment,
`modalita` int(11) NOT NULL default '0',
`statocarrello` int(11) NOT NULL default '0',
`statoiva` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=2 ;
--
-- Dump dei dati per la tabella `opzioni`
--
INSERT INTO `opzioni` VALUES (1, 1, 1, 0);
-- --------------------------------------------------------
--
-- Struttura della tabella `ordini`
--
CREATE TABLE `ordini` (
`id` int(11) NOT NULL auto_increment,
`note` longtext NOT NULL,
`user` varchar(69) NOT NULL default '0',
`dataora` varchar(50) NOT NULL default '',
`stato` int(11) NOT NULL default '0',
`pagamento` varchar(50) NOT NULL default '',
`spedizione` varchar(50) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=9 ;
--
-- Dump dei dati per la tabella `ordini`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `pagamenti`
--
CREATE TABLE `pagamenti` (
`id` int(11) NOT NULL auto_increment,
`bonifico` int(100) NOT NULL default '0',
`infobonifico` longtext NOT NULL,
`vaglia` int(11) NOT NULL default '0',
`infovaglia` longtext NOT NULL,
`contrassegno` int(10) NOT NULL default '0',
`infocontrassegno` longtext NOT NULL,
`paypal` int(11) NOT NULL default '0',
`emailpaypal` varchar(150) NOT NULL default '',
`gestpay` int(11) NOT NULL default '0',
`codice` varchar(30) NOT NULL default '',
`emailgestpay` varchar(150) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=13 ;
--
-- Dump dei dati per la tabella `pagamenti`
--
INSERT INTO `pagamenti` VALUES (1, 1, 'hhd', 1, 'jhgfj', 1, 'hdhgfhghdgfh', 1, 'yeytytry', 1, 'GETSPAYXXXX', 'jhjfjhgj');
-- --------------------------------------------------------
--
-- Struttura della tabella `prodotti`
--
CREATE TABLE `prodotti` (
`id` int(11) NOT NULL auto_increment,
`idcat` int(11) NOT NULL default '0',
`idsottocat` int(11) NOT NULL default '0',
`codice` varchar(20) NOT NULL default '',
`descrizione` longtext NOT NULL,
`thumb` varchar(255) NOT NULL default '',
`prezzo` varchar(20) NOT NULL default '',
`nome` varchar(60) NOT NULL default '',
`taglie` varchar(40) NOT NULL default '',
`colori` varchar(30) NOT NULL default '',
`giacenza` int(11) NOT NULL default '0',
`isofferta` int(11) NOT NULL default '0',
`peso` varchar(10) NOT NULL default '',
`spedizionesep` varchar(40) NOT NULL default '',
`iva` int(11) NOT NULL default '0',
`riordino` int(11) NOT NULL default '0',
`sconto` int(11) NOT NULL default '0',
`ishome` int(11) NOT NULL default '0',
`marca` varchar(100) NOT NULL default '',
`isnovita` int(11) NOT NULL default '0',
`breve` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=37 ;
--
-- Dump dei dati per la tabella `prodotti`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `prodotticorrelati`
--
CREATE TABLE `prodotticorrelati` (
`id` int(11) NOT NULL auto_increment,
`idp1` int(11) NOT NULL default '0',
`idp2` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=20 ;
--
-- Dump dei dati per la tabella `prodotticorrelati`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `prodottiordini`
--
CREATE TABLE `prodottiordini` (
`id` int(11) NOT NULL auto_increment,
`transazione` varchar(255) NOT NULL default '',
`idp` int(11) NOT NULL default '0',
`taglia` varchar(10) NOT NULL default '',
`colore` varchar(10) NOT NULL default '',
`quantita` mediumint(9) NOT NULL default '0',
`prezzo` varchar(8) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=10 ;
--
-- Dump dei dati per la tabella `prodottiordini`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `sottocategorie`
--
CREATE TABLE `sottocategorie` (
`id` int(11) NOT NULL auto_increment,
`idcat` int(11) NOT NULL default '0',
`nome` varchar(200) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=41 ;
--
-- Dump dei dati per la tabella `sottocategorie`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `spedizioni`
--
CREATE TABLE `spedizioni` (
`id` int(11) NOT NULL auto_increment,
`compagnia` varchar(100) NOT NULL default '',
`prezzo` varchar(30) NOT NULL default '',
`tipo` varchar(255) NOT NULL default '',
`peso` int(11) NOT NULL default '0',
`percentuale` int(11) NOT NULL default '0',
`iscontrass` int(11) NOT NULL default '0',
`limspese` varchar(10) NOT NULL default '',
`tiposped` int(11) NOT NULL default '0',
`kilopiu` varchar(10) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=19 ;
--
-- Dump dei dati per la tabella `spedizioni`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `taglie`
--
CREATE TABLE `taglie` (
`id` int(11) NOT NULL auto_increment,
`nome` varchar(15) NOT NULL default '',
`idp` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=13 ;
--
-- Dump dei dati per la tabella `taglie`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `utenti`
--
CREATE TABLE `utenti` (
`id` int(11) NOT NULL auto_increment,
`ragione` varchar(200) NOT NULL default '',
`nome` varchar(200) NOT NULL default '',
`cognome` varchar(200) NOT NULL default '',
`sesso` char(2) NOT NULL default '',
`eta` int(11) NOT NULL default '0',
`fiscale` varchar(40) NOT NULL default '',
`indirizzo` varchar(234) NOT NULL default '',
`cap` varchar(20) NOT NULL default '',
`provincia` varchar(100) NOT NULL default '',
`citta` varchar(100) NOT NULL default '',
`telefono` varchar(80) NOT NULL default '',
`email` varchar(200) NOT NULL default '',
`user` varchar(20) NOT NULL default '',
`password` varchar(20) NOT NULL default '',
`stato` int(11) NOT NULL default '0',
`data` varchar(17) NOT NULL default '',
`sconto` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=8 ;
--
-- Dump dei dati per la tabella `utenti`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `visite`
--
CREATE TABLE `visite` (
`id` int(11) NOT NULL auto_increment,
`data` varchar(12) NOT NULL default '',
`visite` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=5 ;
--
-- Dump dei dati per la tabella `visite`
--
|
CREATE TABLE IF NOT EXISTS follow
(
username varchar(255),
following varchar(255),
primary key (username, following),
FOREIGN KEY (username) REFERENCES users (username),
FOREIGN KEY (following) REFERENCES users (username)
)
|
<filename>metrics/kubernetes/prs_labels.sql
with issues as (
select sub.issue_id,
sub.event_id,
sub.repo_name,
sub.repo_id
from (
select distinct
id as issue_id,
dup_repo_name as repo_name,
dup_repo_id as repo_id,
last_value(event_id) over issues_ordered_by_update as event_id,
last_value(closed_at) over issues_ordered_by_update as closed_at
from
gha_issues
where
created_at < '{{to}}'
and updated_at < '{{to}}'
and is_pull_request = true
window
issues_ordered_by_update as (
partition by id
order by
updated_at asc,
event_id asc
range between current row
and unbounded following
)
) sub
where
sub.closed_at is null
), prs as (
select i.issue_id,
i.event_id,
i.repo_name,
i.repo_id
from (
select distinct id as pr_id,
last_value(closed_at) over prs_ordered_by_update as closed_at,
last_value(merged_at) over prs_ordered_by_update as merged_at
from
gha_pull_requests
where
created_at < '{{to}}'
and updated_at < '{{to}}'
and event_id > 0
window
prs_ordered_by_update as (
partition by id
order by
updated_at asc,
event_id asc
range between current row
and unbounded following
)
) pr,
issues i,
gha_issues_pull_requests ipr
where
ipr.issue_id = i.issue_id
and ipr.pull_request_id = pr.pr_id
and pr.closed_at is null
and pr.merged_at is null
), labels as (
select il.issue_id,
pr.repo_name,
pr.repo_id,
il.dup_label_name as label,
il.event_id
from
prs pr,
gha_issues_labels il
where
il.issue_id = pr.issue_id
and il.event_id = pr.event_id
and il.dup_label_name in (
'cla: no',
'cncf-cla: no',
'do-not-merge',
'do-not-merge/blocked-paths',
'do-not-merge/cherry-pick-not-approved',
'do-not-merge/hold',
'do-not-merge/release-note-label-needed',
'do-not-merge/work-in-progress',
'needs-ok-to-test',
'needs-rebase',
'release-note-label-needed'
)
)
select
sub.name,
count(distinct sub.issue_id) as label_count
from (
select 'prlbl,' || coalesce(ecf.repo_group, re.repo_group) || ': All labels combined' as name,
r.issue_id
from
labels r
join
gha_repos re
on
r.repo_name = re.name
and r.repo_id = re.id
left join
gha_events_commits_files ecf
on
ecf.event_id = r.event_id
union select 'prlbl,' || coalesce(ecf.repo_group, re.repo_group) || ': ' || r.label as name,
r.issue_id
from
labels r
join
gha_repos re
on
r.repo_name = re.name
and r.repo_id = re.id
left join
gha_events_commits_files ecf
on
ecf.event_id = r.event_id
union select 'prlbl,All repos combined: All labels combined' as name,
r.issue_id
from
labels r
union select 'prlbl,All repos combined: ' || r.label as name,
r.issue_id
from
labels r
) sub
where
sub.name is not null
group by
sub.name
order by
label_count desc,
name asc
;
|
-- Copyright (C) ---Put here your own copyright and developer email---
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see http://www.gnu.org/licenses/.
-- BEGIN MODULEBUILDER INDEXES
ALTER TABLE llx_bom_bomline ADD INDEX idx_bom_bomline_rowid (rowid);
ALTER TABLE llx_bom_bomline ADD INDEX idx_bom_bomline_fk_product (fk_product);
ALTER TABLE llx_bom_bomline ADD INDEX idx_bom_bomline_fk_bom (fk_bom);
-- END MODULEBUILDER INDEXES
--ALTER TABLE llx_bom_bomline ADD UNIQUE INDEX uk_bom_bomline_fieldxy(fieldx, fieldy);
ALTER TABLE llx_bom_bomline ADD CONSTRAINT llx_bom_bomline_fk_bom FOREIGN KEY (fk_bom) REFERENCES llx_bom_bom(rowid);
|
<reponame>greysond/datahub
-- create metadata aspect table
create table metadata_aspect_v2 (
urn varchar(500) not null,
aspect varchar(200) not null,
version bigint(20) not null,
metadata longtext not null,
systemmetadata longtext,
createdon datetime(6) not null,
createdby varchar(255) not null,
createdfor varchar(255),
constraint pk_metadata_aspect_v2 primary key (urn,aspect,version)
);
insert into metadata_aspect_v2 (urn, aspect, version, metadata, createdon, createdby) values(
'urn:li:corpuser:datahub',
'corpUserInfo',
0,
'{"displayName":"<NAME>","active":true,"fullName":"<NAME>","email":"<EMAIL>"}',
now(),
'urn:li:principal:datahub'
), (
'urn:li:corpuser:datahub',
'corpUserEditableInfo',
0,
'{"skills":[],"teams":[],"pictureLink":"https://raw.githubusercontent.com/linkedin/datahub/master/datahub-web/packages/data-portal/public/assets/images/default_avatar.png"}',
now(),
'urn:li:principal:datahub'
);
|
<filename>docker/mariadb/backup/his_patient.sql
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 28, 2019 at 04:14 PM
-- Server version: 5.7.27-0ubuntu0.18.04.1
-- PHP Version: 7.2.19-0ubuntu0.18.04.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: `tcds`
--
-- --------------------------------------------------------
--
-- Table structure for table `his_patient`
--
CREATE TABLE `his_patient` (
`hn` bigint(20) NOT NULL COMMENT 'ข้อมูลผู้ป่วย',
`prefix` varchar(50) NOT NULL DEFAULT '',
`fname` varchar(50) NOT NULL,
`lname` varchar(50) NOT NULL DEFAULT '',
`sex` char(1) NOT NULL DEFAULT '',
`birthday_date` date DEFAULT NULL,
`idcard` varchar(20) NOT NULL,
`UPDATE_TIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`doctor_id` varchar(100) DEFAULT NULL,
`doctor_history` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='ข้อมูลคนไข้';
--
-- Dumping data for table `his_patient`
--
INSERT INTO `his_patient` (`hn`, `prefix`, `fname`, `lname`, `sex`, `birthday_date`, `idcard`, `UPDATE_TIME`, `doctor_id`, `doctor_history`) VALUES
(1571136, 'นาง', 'ศุลีมาศ', 'สุทธิสัมพัทน์', 'F', '1944-10-18', '3101202296894', '2019-04-30 03:57:50', NULL, NULL),
(33356, 'นาง', 'อรพินท์', 'กุลชล', 'F', '1921-01-01', '3209900172143', '2019-04-30 03:57:53', NULL, NULL),
(1542144, 'นาง', 'ธนภรณ์', 'ธูปทองเจริญผล', 'F', '1951-01-01', ' ', '2019-04-30 03:57:59', NULL, NULL),
(156658, 'นาย', 'ชัยพร', 'กนกทิพย์พรชัย', 'M', '1950-03-20', '4102400017818', '2019-04-30 03:57:52', NULL, NULL),
(137454, 'นาย', 'สมพงษ์', 'กิจเจริญไพศาล', 'M', '1971-03-25', '3100901166760', '2019-04-30 03:57:51', NULL, NULL),
(460028, 'คุณ', 'ทดสอบ', 'ทดสอบ', 'M', '1985-08-29', ' ', '2019-07-28 07:48:08', NULL, NULL),
(1117836, 'นาง', 'จรรยา', 'วรรณชานนท์', 'F', '1938-01-01', '3101501373220', '2019-04-27 02:36:24', NULL, NULL),
(365656, 'น.ส.', 'โนรีฮัน', 'จิตต์ปราณี', 'F', '1990-04-13', '1969900121155', '2019-06-18 11:40:19', NULL, NULL),
(130945, 'ดร.', 'ประเสริฐ', 'ภัทรมัย', 'M', '1947-06-05', ' ', '2019-04-27 02:43:50', NULL, NULL),
(107140, 'นาย', 'วิทยา', 'ภัทรเมธากุล', 'M', '1958-05-16', '3101800058245', '2019-04-27 02:45:09', NULL, NULL),
(899859, 'นาง', 'ชิดารัจ', 'หวังชิงชัย', 'F', '1968-11-09', '3101501300044', '2019-04-27 02:47:08', NULL, NULL),
(320162, 'นาย', 'บรรเลง', 'โลหชลิตานนท์', 'M', '1935-06-27', '3102200049068', '2019-04-30 03:57:50', NULL, NULL),
(527553, 'นาย', 'ภัทร', 'ติลกานนท์', 'M', '1996-11-26', '1103900004649', '2019-05-07 02:40:22', NULL, NULL),
(1016061, 'นาย', 'เสน่ห์', 'มะม่วง', 'M', '1954-01-01', '3130100120176', '2019-05-20 03:36:23', NULL, NULL),
(730361, 'น.ส.', 'อุไรวรรณ', 'แสงก่ำ', 'F', '1982-03-04', '3670600120235', '2019-05-07 03:01:56', NULL, NULL),
(99140, 'นาง', 'บังอร', 'ศตวุฒิ', 'F', '1923-02-25', '3100904340752', '2019-05-07 03:03:47', NULL, NULL),
(411840, 'น.ส.', 'อรณี', 'พรศิริรัตน์', 'F', '1967-04-06', '3730400002181', '2019-05-07 09:20:21', NULL, NULL),
(782761, 'นาย', 'อดุลย์', 'โทสาลี', 'M', '1965-02-16', '3430500537012', '2019-05-27 07:15:10', NULL, NULL),
(251546, 'นาง', 'พรรณี', 'อรุณศิริโชค', 'F', '1932-01-01', ' ', '2019-05-08 15:18:19', NULL, NULL),
(923755, 'MR.', '<NAME>', 'FARRAR', 'M', '1951-02-08', '0014711712063', '2019-05-08 08:13:44', NULL, NULL),
(1471143, 'นาง', 'พันทิพา', 'ไรวา', 'F', '1952-07-17', '3100901779672', '2019-05-08 11:47:28', NULL, NULL),
(383459, 'นาง', 'บังอร', 'จันทร์สว่างศรี', 'F', '1933-01-13', '3100501347082', '2019-05-08 11:42:27', NULL, NULL),
(821445, 'นาง', 'อ๋า', 'แซ่เจี่ย', 'F', '1942-01-01', ' ', '2019-05-09 04:20:23', NULL, NULL),
(970440, 'ด.ช.', 'โกญจนาท', 'จันทร์กระจ่าง', 'M', '1996-12-20', '0000000000000', '2019-05-17 07:41:43', NULL, NULL),
(91639, 'นาย', 'โกมล', 'จงวัฒนา', 'M', '1974-08-03', '0000000000000', '2019-05-17 07:41:43', NULL, NULL),
(954839, 'นาย', 'โกมล', 'จวบจันทร์ผล', 'M', '1960-04-05', '3101500913930', '2019-05-17 07:41:43', NULL, NULL),
(795050, 'นาย', 'โกวิท', 'จงเจริญมั่นคง', 'M', '1981-01-25', '3100902081857', '2019-05-17 07:41:43', NULL, NULL),
(248060, 'นาย', 'โกวิท', 'จังไพบูลย์', 'M', '1960-11-30', 'ไม่ได้นำมา ', '2019-05-17 07:41:43', NULL, NULL),
(159442, 'นาย', 'โกวิท', 'จันทรกิติวุฒิ', 'M', '1968-04-01', '3101203294585', '2019-05-17 07:41:43', NULL, NULL),
(602550, 'นาย', 'โกวิท', 'จันทร์ศรี', 'M', '1976-12-15', '3610700295134', '2019-05-17 07:41:43', NULL, NULL),
(9000102257, 'นาย', 'โกวิท', 'จิตประพันธ์', 'M', '1969-01-22', ' ', '2019-05-17 07:41:43', NULL, NULL),
(522245, 'นาย', 'โกวิท', 'จิระวิโรจน์', 'M', '1935-00-00', '3349900695013', '2019-05-17 07:41:43', NULL, NULL),
(1279136, 'นาย', 'โกวิท', 'จ่างวิทยา', 'M', '1940-01-01', '0000000000000', '2019-05-17 07:41:43', NULL, NULL),
(1000539, 'นาย', 'โกวิทย์', 'จันทร์สว่างภูวนะ', 'M', '1937-01-10', '3101200643511', '2019-05-17 07:41:43', NULL, NULL),
(130349, 'นาย', 'โกวิทย์', 'จิตสายชลธารา', 'M', '1944-00-00', '3201000022598', '2019-05-17 07:41:43', NULL, NULL),
(62953, 'นาย', 'โกศล', 'จันทรชาติ', 'M', '1966-12-26', '3220100346611', '2019-05-17 07:41:43', NULL, NULL),
(9000177449, 'นาย', 'โกศล', 'จันทสุวรรณ', 'M', '1983-10-14', ' ', '2019-05-17 07:41:43', NULL, NULL),
(547439, 'น.ส.', 'โกศล', 'จิตต์สม', 'F', '1928-01-01', '0000000000000', '2019-05-17 07:41:43', NULL, NULL),
(244842, 'นาย', 'โกศล', 'จิตสน', 'M', '1972-01-01', '0000000000000', '2019-05-17 07:41:43', NULL, NULL),
(111062, 'น.ส.', 'โกศล', 'จิตสม', 'F', '1928-01-01', ' ', '2019-05-17 07:41:43', NULL, NULL),
(102040, 'นาย', 'โกศล', 'จิรฐิติวงศ์', 'M', '1939-01-01', '0000000000000', '2019-05-17 07:41:43', NULL, NULL),
(48245, 'นาย', 'โกศล', 'จิราธนกูล', 'M', '1934-10-15', ' ', '2019-05-17 07:41:43', NULL, NULL),
(1186146, 'นาย', 'โกศล', 'จึงประสิทธิ์พร', 'M', '1948-08-10', '5130499002750', '2019-05-17 07:41:43', NULL, NULL),
(216443, 'นาย', 'โกสินธุ์', 'จิระชฎชัย', 'M', '1976-04-18', ' ', '2019-05-17 07:41:43', NULL, NULL),
(132748, 'นาง', 'โกสุมภ์', 'จิตตปาลพงศ์', 'F', '1957-08-22', '3101500641573', '2019-05-17 07:41:43', NULL, NULL),
(8000053053, 'นาง', 'โกสุมภ์', 'จีบแก้ว', 'F', '1974-08-29', ' ', '2019-05-17 07:41:43', NULL, NULL),
(9000353953, 'นาง', 'โกสุมภ์', 'จีบแก้ว', 'F', '1974-08-29', ' ', '2019-05-17 07:41:43', NULL, NULL),
(279760, 'นาย', 'โฆษิต', 'จตุรัสวัฒนากูล', 'M', '1977-09-16', ' ', '2019-05-17 07:41:43', NULL, NULL),
(348460, 'นาย', 'โฆษิต', 'จตุรัสวัฒนากูล', 'M', '1977-09-16', ' ', '2019-05-17 07:41:43', NULL, NULL),
(1226348, 'นาย', 'โฆษิต', 'จตุรัสวัฒนากูล', 'M', '1977-09-16', '3101701289711', '2019-05-17 07:41:43', NULL, NULL),
(764349, 'สามเณร', 'โจ', 'จิตตรีพันธ์ุ', 'M', '1991-05-06', ' ', '2019-05-17 07:41:43', NULL, NULL),
(871850, 'นาย', 'โจ ถิน', 'จาง', 'M', '1963-12-05', ' - ', '2019-05-17 07:41:43', NULL, NULL),
(487452, 'น.ส.', 'โจแอน', 'จิระประเสริฐศักดิ์', 'F', '1982-03-18', '3209900425122', '2019-05-17 07:41:43', NULL, NULL),
(580053, 'น.ส.', 'โฉมมณี', 'จะเข้ทอง', 'F', '1976-03-30', '3190300455660', '2019-05-17 07:41:43', NULL, NULL),
(598848, 'นาย', 'โชค', 'จำเริญ', 'M', '1973-04-22', '3340900658977', '2019-05-17 07:41:43', NULL, NULL),
(1191442, 'นาย', 'โชคกิตติ', 'จารุนิเวศน์', 'M', '1954-01-01', '3100900353281', '2019-05-17 07:41:43', NULL, NULL),
(1028852, 'นาย', 'โชคชัย', 'จองสิทธิมหากุล', 'M', '1970-07-28', '3101600201362', '2019-05-17 07:41:43', NULL, NULL),
(9000046558, 'นาย', 'โชคชัย', 'จันดาผล', 'M', '1979-03-16', ' ', '2019-05-17 07:41:43', NULL, NULL),
(1512233, 'นาย', 'โชคชัย', 'จารุวาที', 'M', '1956-04-06', ' ', '2019-05-17 07:41:43', NULL, NULL),
(1241543, 'นาย', 'โชคชัย', 'จิณณวาโส', 'M', '1970-06-15', ' ', '2019-05-17 07:41:43', NULL, NULL),
(9000120559, 'นาย', 'โชคชัย', 'จิณณวาโส', 'M', '1970-06-15', ' ', '2019-05-17 07:41:43', NULL, NULL),
(1117949, 'นาย', 'โชคชัย', 'จิรวัฒน์ถาวร', 'M', '1983-07-01', '3100903239071', '2019-05-17 07:41:43', NULL, NULL),
(1190145, 'นาย', 'โชคชัย', 'จิรารัตน์สกุล', 'M', '1961-05-22', '4100900029619', '2019-05-17 07:41:43', NULL, NULL),
(785051, 'นาย', 'โชคพร', 'จิตต์ดร', 'M', '1978-11-02', '3430800112262', '2019-05-17 07:41:43', NULL, NULL),
(239260, 'นาย', 'โชติ', 'จันทรางศุ', 'M', '1965-04-20', '3100900131695', '2019-05-17 07:41:43', NULL, NULL),
(904831, 'นาย', 'โชติ', 'จันทรางศุ', 'M', '1965-04-20', '3100900131695', '2019-05-17 07:41:43', NULL, NULL),
(214341, 'นาย', 'โชติ', 'จันทร์สว่าง', 'M', '1927-01-01', ' ', '2019-05-17 07:41:43', NULL, NULL),
(1256443, 'น.ส.', 'โชติกา', 'จงอ่อนกลาง', 'F', '1968-02-06', '3440900271893', '2019-05-17 07:41:43', NULL, NULL),
(1237243, 'น.ส.', 'โชติกา', 'จิรรุ่งโรจน์', 'F', '2000-10-15', ' ', '2019-05-17 07:41:43', NULL, NULL),
(9000385954, 'น.ส.', 'โชติกา', 'จิระธนะวัฒน์', 'F', '1989-12-15', ' ', '2019-05-17 07:41:43', NULL, NULL),
(9000249156, 'น.ส.', 'โชติชนิต', 'จันทร์แจ่ม', 'F', '1992-03-20', ' ', '2019-05-17 07:41:43', NULL, NULL),
(371741, 'นาย', 'โชติพงศ์', 'จิตรสกุล', 'M', '1980-09-02', '3549900019849', '2019-05-17 07:41:43', NULL, NULL),
(684445, 'นาย', 'โชติพัฒน์', 'จิรพันธ์พรทวี', 'M', '1967-11-07', '3100900344613', '2019-05-17 07:41:43', NULL, NULL),
(9000323645, 'น.ส.', 'โชติมา', 'จงสถาพรพงศ์', 'F', '1979-00-00', ' ', '2019-05-17 07:41:43', NULL, NULL),
(454960, 'นาง', 'โชติรส', 'จ่ายกระโทก', 'F', '1987-05-02', '1959900120051', '2019-05-17 07:41:43', NULL, NULL),
(688556, 'น.ส.', 'โชติรัศม์', 'จิรพงศ์ชัยกุล', 'F', '1996-07-27', 'ไม่ได้นำมา ', '2019-05-17 07:41:43', NULL, NULL),
(491847, 'ม.ร.ว.', 'โชติวุฒิ', 'จักรพันธุ์', 'M', '1954-01-01', '3100900812901', '2019-05-17 07:41:43', NULL, NULL),
(281049, 'นาง', 'โชษิตา', 'จารุโชติรัตนสกุล', 'F', '1968-04-19', '3361000009558', '2019-05-17 07:41:43', NULL, NULL),
(8000017361, 'นาง', 'โซวินเดอร์กอร์', 'จาวลา', 'F', '1968-12-30', ' ', '2019-05-17 07:41:43', NULL, NULL),
(741461, 'นาง', 'โซเทียวี', 'จันทร์อำพร', 'F', '1982-01-01', '8103800003273', '2019-05-17 07:41:43', NULL, NULL),
(1057449, 'นาง', 'โซเฟีย', 'จำปานันท์', 'F', '1971-02-02', '3102401055065', '2019-05-17 07:41:43', NULL, NULL),
(415151, 'น.ส.', 'โนรี', 'จอมขวัญ', 'F', '1971-06-17', '3341900554552', '2019-05-17 07:41:43', NULL, NULL),
(9000141149, 'คุณ', 'โนรี', 'จอมขวัญ', 'F', '1971-06-17', ' ', '2019-05-17 07:41:43', NULL, NULL),
(9000166161, 'น.ส.', 'โนรีฮัน', 'จิตต์ปราณี', 'F', '1990-04-13', ' ', '2019-05-17 07:41:43', NULL, NULL),
(9000079658, 'น.ส.', 'โนรีฮัน', 'จิตต์ปราณี(เทพ)', 'F', '1990-04-13', ' ', '2019-05-17 07:41:43', NULL, NULL),
(9000109059, 'น.ส.', 'โนรีฮัน', 'จิตต์ปราณี(เทพ)', 'F', '1990-04-13', ' ', '2019-05-17 07:41:43', NULL, NULL),
(9000156557, 'น.ส.', 'โนรีฮัน', 'จิตต์ปราณี(TP)', 'F', '1990-04-13', ' ', '2019-05-17 07:41:43', NULL, NULL),
(794945, 'น.ส.', 'โบ', 'จิตต์ในธรรม', 'F', '1986-05-04', '1101800178902', '2019-05-17 07:41:43', NULL, NULL),
(926548, 'นาย', 'โป', 'จันทรสุคนธ์', 'M', '1954-12-09', ' ', '2019-05-17 07:41:43', NULL, NULL),
(186742, 'นาง', 'โป้ยหง่อ', 'จิตต์กมลศักดิ์', 'F', '1949-01-01', '3920400134035', '2019-05-17 07:41:43', NULL, NULL),
(1326549, 'ด.ญ.', 'โฟกัส', 'จิรโสตติกุล', 'F', '2006-11-10', ' ', '2019-05-17 07:41:43', NULL, NULL),
(9000336654, 'นาย', 'โยธิน', 'จันทคัต', 'M', '1962-04-18', ' ', '2019-05-17 07:41:43', NULL, NULL),
(910250, 'นาย', 'โยธิน', 'จันทะพา', 'M', '1982-04-01', '2410400039390', '2019-05-17 07:41:43', NULL, NULL),
(499959, 'นาย', 'โยธิน', 'จิตมั่น', 'M', '1983-09-23', '3330900892864', '2019-05-17 07:41:43', NULL, NULL),
(332454, 'นาย', 'โยธิน', 'จีระสวัสดิ์', 'M', '1948-03-07', '3120101801274', '2019-05-17 07:41:43', NULL, NULL),
(9000121859, 'นาย', 'โยธิน', 'จุลญาติ(ฮันจิน)', 'M', '1977-04-24', ' ', '2019-05-17 07:41:43', NULL, NULL),
(800245, 'ด.ญ.', 'โยษิตา', 'จริตวงษ์', 'F', '2002-07-06', ' ', '2019-05-17 07:41:43', NULL, NULL),
(17652, 'นาย', 'โรช', 'จันนุบิน', 'M', '1963-11-21', '3321000945580', '2019-05-17 07:41:43', NULL, NULL),
(8000044745, 'น.ส.', 'โศจิรา', 'จารุศิริจินดา', 'F', '1983-00-00', ' ', '2019-05-17 07:41:43', NULL, NULL),
(447459, 'นาง', 'โศภชา', 'จิณณะปวร', 'F', '1967-08-24', '3509900561261', '2019-05-17 07:41:43', NULL, NULL),
(188543, 'น.ส.', 'โศภิน', 'จิตสัตย์ซื่อ', 'F', '1977-11-18', '3100400818292', '2019-05-17 07:41:43', NULL, NULL),
(1367942, 'น.ส.', 'โศรดา', 'จิรธนานันท์', 'F', '1978-07-12', '5730190029450', '2019-05-17 07:41:43', NULL, NULL),
(340556, 'นาย', 'โสตถิยะราช', 'จันทร์นวล', 'M', '1978-12-09', '3801600172099', '2019-05-17 07:41:43', NULL, NULL),
(102462, 'น.ส.', 'โสพิศ', 'จันทร์วิลัย', 'F', '1989-09-11', '1539900240450', '2019-05-17 07:41:43', NULL, NULL),
(791642, 'นาง', 'โสพิศ', 'จารุสมบัติ', 'F', '1963-03-03', '0000000000000', '2019-05-17 07:41:43', NULL, NULL),
(953145, 'นาย', 'โสภณ', 'จงดีไพศาล', 'M', '1961-03-17', ' ', '2019-05-17 07:41:43', NULL, NULL),
(1484640, 'นาย', 'โสภณ', 'จริงใจกุล', 'M', '1974-08-08', '0000000000000', '2019-05-17 07:41:43', NULL, NULL),
(388453, 'นาย', 'โสภณ', 'จักเดชไชย', 'M', '1975-04-24', '3100800656699', '2019-05-17 07:41:43', NULL, NULL),
(768849, 'นาย', 'โสภณ', 'จันทร์กลม', 'M', '1956-09-28', '3100100842171', '2019-05-17 07:41:43', NULL, NULL),
(900255, 'นาย', 'โสภณ', 'จันทร์เงิน', 'M', '1975-01-08', '3879900117051', '2019-05-17 07:41:43', NULL, NULL),
(15045, 'นาย', 'โสภณ', 'จันทร์เพ็ญ', 'M', '1975-06-03', ' ', '2019-05-17 07:41:43', NULL, NULL),
(9000159856, 'นาย', 'โสภณ', 'จินดาทิพย์', 'M', '1975-05-11', ' ', '2019-05-17 07:41:43', NULL, NULL),
(224140, 'นาย', 'โสภณ', 'จินตมากุล', 'M', '1958-06-13', '4100900065771', '2019-05-17 07:41:43', NULL, NULL),
(706150, 'ด.ช.', 'โสภณ', 'จิ๊ดเจริญ', 'M', '2002-02-16', ' ', '2019-05-17 07:41:43', NULL, NULL),
(397048, 'น.ส.', 'โสภัคค์', 'จั่นอี๊ด', 'F', '1976-02-04', '3110102518100', '2019-05-17 07:41:43', NULL, NULL),
(311154, 'นาง', 'โสภา', 'จรัลชวนะเพท', 'F', '1948-10-01', '3100902039851', '2019-05-17 07:41:43', NULL, NULL),
(827836, 'นาง', 'โสภา', 'จรุงโภคากร', 'F', '1945-01-01', '0000000000000', '2019-05-17 07:41:43', NULL, NULL),
(237542, 'นาง', 'โสภา', 'จันทรอุทัย', 'F', '1940-01-01', '3709900230891', '2019-05-17 07:41:43', NULL, NULL),
(11246, 'น.ส.', 'โสภา', 'จันทรี', 'F', '1978-03-21', '3451100038052', '2019-05-17 07:41:43', NULL, NULL),
(9000292350, 'นาย', 'โสภา', 'จันทร์อัมพร', 'M', '1979-12-12', ' ', '2019-05-17 07:41:43', NULL, NULL),
(115246, 'น.ส.', 'โสภา', 'จำปี', 'F', '1975-02-21', '3320800225882', '2019-05-17 07:41:43', NULL, NULL),
(239462, 'นาง', 'โสภา', 'จินดารัตน์', 'F', '1939-07-22', '3100902450542', '2019-05-17 07:41:43', NULL, NULL),
(459642, 'น.ส.', 'โสภา', 'จิระมงคลกุล', 'F', '1974-09-10', '0000000000000', '2019-05-17 07:41:43', NULL, NULL),
(1403542, 'นาง', 'โสภา', 'จูทะพุทธิ', 'F', '1934-04-27', '0000000000000', '2019-05-17 07:41:43', NULL, NULL),
(7859, 'นาง', 'โสภาพรรณ', 'จันทราศรี', 'F', '1941-08-23', '3419900158513', '2019-05-17 07:41:43', NULL, NULL),
(1496043, 'นาง', 'โสภิณ', 'จรรยาวดี', 'F', '1935-00-00', ' ', '2019-05-17 07:41:43', NULL, NULL),
(867640, 'นาง', 'โสภิณ', 'จักรธานนท์', 'F', '1944-01-01', '0000000000000', '2019-05-17 07:41:43', NULL, NULL),
(9000198461, 'น.ส.', 'โสภิดา', 'จตุโชคทวีสิทธิ์', 'F', '1990-08-10', ' ', '2019-05-17 07:41:43', NULL, NULL),
(367638, 'ด.ญ.', 'โสภิดา', 'จันทร์จรัสวัฒนา', 'F', '1993-06-18', '0000000000000', '2019-05-17 07:41:43', NULL, NULL),
(294746, 'น.ส.', 'โสภิดา', 'จันทร์จรูญ', 'F', '1976-07-09', '3239900060965', '2019-05-17 07:41:43', NULL, NULL),
(517153, 'ด.ญ.', 'โสภิดา', 'จันทร์รวม', 'F', '2003-06-27', '1103300209878', '2019-05-17 07:41:43', NULL, NULL),
(660961, 'น.ส.', 'โสภิดา', 'จารุวิทยโกวิท', 'F', '1964-08-07', '3101501277514', '2019-05-17 07:41:43', NULL, NULL),
(678650, 'น.ส.', 'โสภิตา', 'จันทร์ชมภู', 'F', '1981-03-06', '3411400292906', '2019-05-17 07:41:43', NULL, NULL),
(574848, 'น.ส.', 'โสมจุฑา', 'จันทร์เจริญ', 'F', '1982-05-27', '3110102256156', '2019-05-17 07:41:43', NULL, NULL),
(60038, 'น.ส.', 'โสรยา', 'จินตวิโรจน์', 'F', '1967-04-04', '0000000000000', '2019-05-17 07:41:43', NULL, NULL),
(81641, 'นาย', 'โสรัช', 'จริยานุพัฒนกุล', 'M', '1968-04-09', '3959900096441', '2019-05-17 07:41:43', NULL, NULL),
(1180649, 'นาย', 'โสวัฒน์', 'จาตุรงค์สกุล', 'M', '1959-10-01', '3101203624925', '2019-05-17 07:41:43', NULL, NULL),
(899949, 'นาย', 'โสฬส', 'จิตอัจนาบุญ', 'M', '1975-09-11', '3101201100775', '2019-05-17 07:41:43', NULL, NULL),
(1016648, 'นาย', 'โอน', 'จันทร์สกุลพร', 'M', '1938-00-00', ' ', '2019-05-17 07:41:43', NULL, NULL),
(920042, 'นาย', 'โอภาส', 'จีบเจริญ', 'M', '1977-10-13', '0000000000000', '2019-05-17 07:41:43', NULL, NULL),
(1213039, 'ด.ช.', 'โอห์ม', 'จารุคม', 'M', '1994-12-27', '0000000000000', '2019-05-17 07:41:43', NULL, NULL),
(754346, 'นพ.', 'โอฬาร', 'จำเดิมเผด็จศึก', 'M', '1934-04-29', ' ', '2019-05-17 07:41:43', NULL, NULL),
(305337, 'นาย', 'โอฬาร', 'จิตต์เจริญธรรม', 'M', '1918-03-30', '3309900421991', '2019-05-17 07:41:43', NULL, NULL),
(114459, 'นาง', 'วนิดา', 'วาทินานนท์', 'F', '1948-01-01', '3100800970997', '2019-05-11 02:32:04', NULL, NULL),
(166639, 'น.ส.', 'ขวัญหทัย', 'จรรยาอังกูร', 'F', '1979-09-17', '3100904413091', '2019-07-28 07:16:07', NULL, NULL),
(306538, 'นาง', 'สุรางค์', 'จรรยาอังกูร', 'F', '1947-02-17', '3100904413075', '2019-05-11 02:31:14', NULL, NULL),
(117352, 'นาง', 'ประกาย', 'จีระวัฒนเลิศ', 'F', '1954-11-01', '3300800911531', '2019-05-12 03:01:56', NULL, NULL),
(111, 'เฉพาะ', 'ทดสอบ', 'ระบบห้องตรวจแพทย์', 'F', '1979-01-18', ' ', '2019-05-27 10:41:48', NULL, NULL),
(211, 'เฉพาะ', 'ทดสอบ', 'จาก HIMS Conn java', 'F', '1979-01-18', ' ', '2019-05-27 10:41:49', NULL, NULL),
(357141, 'นาง', 'อนุรัตน์', 'กลัดกลิ่น', 'F', '1963-08-02', '3650100273351', '2019-05-13 10:51:23', NULL, NULL),
(115362, 'นาย', 'กิตติศักดิ์', 'พรศิริรุ่ง', 'M', '1982-01-02', '3259900008670', '2019-05-13 10:51:24', NULL, NULL),
(361760, 'นาง', 'พัชรินทร์', 'จิระธำรง', 'F', '1968-11-03', '3660100216080', '2019-05-14 09:23:12', NULL, NULL),
(115857, 'นาย', 'พรเทพ', 'สัจจะวีระวงศ์', 'M', '1973-02-11', '3949900070077', '2019-05-20 09:16:26', NULL, NULL),
(443858, 'MISS', 'SUPAGAN', 'TANAKRITCHAGORN', 'F', '1986-09-05', '1839900101121', '2019-05-20 09:23:46', NULL, NULL),
(1225239, 'นาง', 'สิริหงส์', 'ปิยวุฒิเศรษฐ์', 'F', '1934-01-01', '3100900238660', '2019-05-20 09:24:12', NULL, NULL),
(1072539, 'นาย', 'ธวัช', 'เลิศปัญญาสัมปทา', 'M', '1951-02-20', '4101700031602', '2019-05-20 07:32:14', NULL, NULL),
(76860, 'น.ส.', 'ศุภลักษณ์', 'เกษมบุญชัย', 'F', '1980-10-11', '3101300140643', '2019-05-20 07:47:19', NULL, NULL),
(69961, 'MR.', '<NAME>', '', 'M', '1973-06-01', ' ', '2019-05-20 08:08:44', NULL, NULL),
(1078454, 'นาย', 'เสน่ห์', 'เพ็ชรนิล', 'M', '1959-02-01', '3100900727270', '2019-05-20 07:48:39', NULL, NULL),
(301461, 'MR.', '<NAME>', 'HOCK', 'M', '1976-02-11', ' ', '2019-05-20 07:58:18', NULL, NULL),
(902359, 'น.ส.', 'พัชรา', 'ภู่พานิช', 'F', '1962-03-31', '3101400654428', '2019-05-20 08:01:35', NULL, NULL),
(379062, 'น.ส.', 'จรัสลักษณ์', 'ทองโอฬาร', 'F', '1979-07-05', '3120100580355', '2019-05-20 08:03:54', NULL, NULL),
(295362, 'น.ส.', 'พิมพ์รุ่ง', 'ธีรุตม์ธนานนท์', 'F', '1992-06-11', '1311100185751', '2019-05-20 08:08:12', NULL, NULL),
(928748, 'นาย', 'บุญเยี่ยม', 'ก้อนทอง', 'M', '1969-06-15', '3331300292131', '2019-05-20 08:10:01', NULL, NULL),
(72260, 'MISS', 'PARIDEE', 'KOSITCHIRANANT', 'F', '1980-01-20', '3459900072341', '2019-05-20 08:12:43', NULL, NULL),
(208254, 'นาง', 'ไก้', 'แซ่หว็อง', 'F', '1930-01-01', '3102101107256', '2019-05-20 08:23:26', NULL, NULL),
(1011854, 'น.ส.', 'เนาวนิต', 'รุจิระวิโรจน์', 'F', '1969-04-16', '3101300304514', '2019-05-20 08:30:03', NULL, NULL),
(72440, 'นาง', 'สุวรรณี', 'แจ่มปรีชา', 'F', '1964-02-02', '3100600500334', '2019-05-20 08:34:59', NULL, NULL),
(64145, 'น.ส.', 'ชนิทประภา', 'เมนะสูต', 'F', '1969-07-01', '3100502723231', '2019-05-20 08:38:42', NULL, NULL),
(171561, 'นาง', 'วิมาลา', 'ทองโอฬาร', 'F', '1952-06-03', '3120100580347', '2019-05-20 08:44:22', NULL, NULL),
(135861, 'น.ส.', 'ณัฐชญา', 'งามละเมียด', 'F', '1993-07-27', '1219900407241', '2019-05-20 08:44:53', NULL, NULL),
(1098143, 'MRS.', 'PREM', 'KALRA', 'F', '1947-10-15', ' ', '2019-05-20 08:46:53', NULL, NULL),
(957650, 'นาง', 'สุดสวาท', 'สุจริตกุล', 'F', '1951-12-21', '3100200054451', '2019-05-20 08:55:25', NULL, NULL),
(1916234, 'DR.', 'ATHIWAT', 'PRACHASERI', 'M', '1947-04-12', '3101801268715', '2019-05-20 08:57:37', NULL, NULL),
(840661, 'พระครู', 'นวการวิมล', '', 'M', '1957-11-05', '3102101031080', '2019-05-20 08:59:50', NULL, NULL),
(378162, 'น.ส.', 'ภรัณยา', 'เกียรติศักดิ์โสภณ', 'F', '1986-04-17', '1529900164176', '2019-05-20 09:01:50', NULL, NULL),
(1064431, 'นาง', 'ศจี', 'โพธิปักษ์', 'F', '1938-08-09', ' ', '2019-05-20 09:05:48', NULL, NULL),
(277962, 'นาง', 'อังคณีย์', 'ฤกษ์ศิริสุข', 'F', '1972-10-20', '3101401933819', '2019-05-20 09:07:44', NULL, NULL),
(120853, 'น.ส.', 'สุพร', 'สุดทวี', 'F', '1962-01-12', '3100900544434', '2019-05-20 09:11:33', NULL, NULL),
(248950, 'น.ส.', 'ณัฐฐา', 'ศิรวาณิชย์', 'F', '1978-10-15', '3102001127654', '2019-05-20 09:15:05', NULL, NULL),
(731246, 'นาง', 'รัชนี', 'สุรัตนาสถิตย์กุล', 'F', '1939-04-25', '3100903175707', '2019-05-20 09:17:06', NULL, NULL),
(22036, 'นาง', 'ณิษา', 'ชัยสิริธนากร', 'F', '1962-10-18', '3509900513240', '2019-05-20 09:19:02', NULL, NULL),
(935142, 'นาง', 'ดนุชา', 'คุณพนิชกิจ', 'F', '1953-12-28', '3100904340990', '2019-05-20 09:21:11', NULL, NULL),
(98457, 'MR.', 'DAVID MARCEL LUC', 'TEIRLYNCK', 'M', '1974-06-11', ' ', '2019-05-20 09:28:01', NULL, NULL),
(44761, 'นาย', 'กิตติศักดิ์', 'ทองชื่น', 'M', '1977-08-17', '3110102424288', '2019-05-20 09:31:52', NULL, NULL),
(755844, 'นาย', 'สมบูรณ์', 'ศิลปานิสงค์', 'M', '1937-01-28', '3100900207241', '2019-05-20 09:34:26', NULL, NULL),
(812159, 'น.ส.', 'วรวรรณ', 'เลิศดี', 'F', '1988-05-10', '1101700070573', '2019-05-20 09:38:27', NULL, NULL),
(260062, 'น.ส.', 'เสกสุรีย์', 'รัตนยาติกุล', 'F', '1955-07-08', '3101800775311', '2019-05-20 09:43:18', NULL, NULL),
(1003944, 'นาง', 'วาสนา', 'อังกินันทน์', 'F', '1946-06-27', ' ', '2019-05-20 09:52:03', NULL, NULL),
(486748, 'น.ส.', 'โพธิรัตน์', 'ตันติวิริยางกูร', 'F', '1948-01-01', '3100901201069', '2019-05-21 10:39:39', NULL, NULL),
(310645, 'นาย', 'ธีรพันธุ์', 'จิตตาลาน', 'M', '1955-02-08', '3100700424702', '2019-05-21 10:39:45', NULL, NULL),
(380562, 'MR.', 'DALIS', 'OEM', 'M', '1956-06-05', ' ', '2019-07-28 07:16:05', NULL, NULL),
(380662, 'นาย', 'ดำรงค์', 'วิรัชกุล', 'M', '1962-02-10', '3240500400124', '2019-05-21 10:39:42', NULL, NULL),
(658559, 'น.ส.', 'พรประภา', 'ปัญญาชัย', 'F', '1990-10-09', '1509900910935', '2019-05-21 10:39:43', NULL, NULL),
(145547, 'น.ส.', 'นิศารัตน์', 'จงวิศาล', 'F', '1989-01-07', '1100400374291', '2019-05-21 10:39:50', NULL, NULL),
(328336, 'น.ส.', 'พรพิมล', 'อนันควานิช', 'F', '1969-05-27', '3100100264160', '2019-05-21 10:39:49', NULL, NULL),
(636256, 'นาย', 'ธีรภัทร์', 'จิตตาลาน', 'M', '1981-07-22', '3100700424711', '2019-05-21 10:39:46', NULL, NULL),
(326736, 'น.ส.', 'ชูจิตร', 'อนันควานิช', 'F', '1965-10-05', '3100100264135', '2019-05-21 10:39:51', NULL, NULL),
(744858, 'นาง', 'บุศยรินทร์', 'ศิริญาวิโรฒ', 'F', '1956-04-10', 'ไม่ได้นำมา ', '2019-05-22 09:35:14', NULL, NULL),
(736639, 'นาง', 'อุไรวรรณ', 'เหล่ากิจเจริญ', 'F', '1956-10-17', '3101202641907', '2019-05-23 01:21:48', NULL, NULL),
(383162, 'นาง', 'จำลอง', 'มีสุข', 'F', '1939-01-01', '3110300301174', '2019-05-22 09:35:15', NULL, NULL),
(235942, 'นาง', 'สุมา', 'อารมณ์สุขโข', 'F', '1932-09-13', '3759900180290', '2019-05-22 09:36:59', NULL, NULL),
(399051, 'น.ส.', 'ณกัลย์ภัค', 'เตชาเรืองวณิชย์', 'F', '1969-05-01', '3100400074889', '2019-05-23 01:22:22', NULL, NULL),
(443743, 'น.ส.', 'สลิตา', 'จันทารักษ์', 'F', '1963-06-06', '3100602529011', '2019-05-23 01:23:24', NULL, NULL),
(394646, 'นาง', 'ประนอม', 'นิลยกานนท์', 'F', '1927-01-01', '3869900080944', '2019-05-24 03:27:51', NULL, NULL),
(1038246, 'นาง', 'อาภา', 'แสงสุพรรณ', 'F', '1932-08-14', '3101801271783', '2019-05-24 07:41:45', NULL, NULL),
(689244, 'น.ส.', 'ปนัสดา', 'คชพันธ์', 'F', '1980-01-04', '3330401638971', '2019-05-23 05:55:08', NULL, NULL),
(453261, 'นาย', 'สุทธิพัฒน์', 'อุณหโภคา', 'M', '1975-03-14', '3100903620298', '2019-05-26 04:04:53', NULL, NULL),
(258952, 'น.ส.', 'แสงจันทร์', 'ชัยสิทธิ์', 'F', '1973-10-20', '3451300164469', '2019-05-27 03:08:37', NULL, NULL),
(245957, 'นาย', 'สมศักดิ์', 'สุวัฒน์มีชัย', 'M', '1970-10-29', '3102400790501', '2019-05-27 03:17:16', NULL, NULL),
(402962, 'นาย', 'จิรศักดิ์', 'สามทอง', 'M', '1966-10-11', '3909800515956', '2019-05-29 03:32:32', NULL, NULL),
(941549, 'นาง', 'อนงค์', 'สุขชัยศรี', 'F', '1942-01-01', '3110101146659', '2019-05-29 07:13:43', NULL, NULL),
(804058, 'นาย', 'ธีธัฐน์', 'วิริยะสุมน', 'M', '1964-01-19', '3639900043935', '2019-05-31 07:42:10', NULL, NULL),
(198947, 'นาย', 'สุนทร', 'สุนทรธาราวงศ์', 'M', '1951-07-10', '3101202265638', '2019-05-31 07:52:19', NULL, NULL),
(447554, 'นาย', 'วุฒิ', 'จึงบุลภรณ์', 'M', '1948-08-30', '3100201860922', '2019-06-11 08:10:58', NULL, NULL),
(1, 'เฉพาะ', 'LDL 400 E-LYTE 900 CA 280', 'CBC 250', 'M', '2003-00-00', ' ', '2019-06-17 05:14:17', NULL, NULL),
(580557, 'นาย', 'ณัฏฐ์', 'อธิบุญศรัณย์', 'M', '2001-04-05', '1104200208781', '2019-06-18 06:46:09', NULL, NULL),
(648952, 'นาย', 'คทาวุธ', 'หาญอุไรพงษ์', 'M', '1985-03-30', '1100400089049', '2019-06-18 06:47:20', NULL, NULL),
(786435, 'นาย', 'สุพจน์', 'อนันควานิช', 'M', '1936-07-16', '3100100264119', '2019-06-18 08:45:49', NULL, NULL),
(25959, 'MR.', 'HAK', 'LEANG', 'M', '1953-05-02', ' ', '2019-06-18 11:39:48', NULL, NULL),
(460562, 'MR.', 'THAY', 'KHUN', 'M', '1936-05-07', ' ', '2019-06-18 11:40:32', NULL, NULL),
(1025054, 'นาย', 'วันชัย', 'แซ่อุ่น', 'M', '1963-01-06', '3100990007662', '2019-07-28 07:16:09', NULL, NULL),
(499260, 'นาง', 'ศรัณญา', 'ธิติธำรงกุล', 'F', '1963-12-19', '3100904309812', '2019-06-20 02:35:52', NULL, NULL),
(203738, 'นาย', 'ประพัฒน์', 'เชยชม', 'M', '1961-03-22', ' ', '2019-06-20 02:45:36', NULL, NULL),
(127259, 'น.ส.', 'มิลทร์ญาดา', 'กีขุนทด', 'F', '1985-05-26', '1300800035726', '2019-06-20 02:41:25', NULL, NULL),
(878259, 'นาย', 'พงษ์พันธุ์', 'วัฒนะลิขิต', 'M', '1942-09-30', '3100905373239', '2019-06-20 02:42:17', NULL, NULL),
(202462, 'น.ส.', 'ภคมน', 'บุญเรือง', 'F', '1981-06-15', '3100903756891', '2019-06-20 02:44:05', NULL, NULL),
(287857, 'นาย', 'มนตรี', 'กัลยาณรัตน์', 'M', '1943-12-01', '3101500417070', '2019-06-20 02:44:39', NULL, NULL),
(362962, 'นาย', 'ธนกฤต', 'อักษรดี', 'M', '1979-09-24', '3141100234148', '2019-06-20 02:45:11', NULL, NULL),
(838337, 'นาย', 'เลิศ', 'ประหยัดทรัพย์', 'M', '1941-09-26', ' ', '2019-06-20 03:21:40', NULL, NULL),
(615835, 'นาง', 'สมศรี', 'นิธิกาญจน์', 'F', '1945-01-01', '3100902507544', '2019-06-20 03:22:21', NULL, NULL),
(657944, 'นาย', 'สมศักดิ์', 'สุขเสถียรศรี', 'M', '1955-01-20', '3100602337074', '2019-07-22 08:24:50', NULL, NULL),
(900236, 'น.ส.', 'วันพร', 'ชื่นสมบุญ', 'F', '1958-05-18', '3100900136565', '2019-07-26 10:15:25', NULL, NULL),
(59062, 'นาง', 'นาถปราง', 'อภิสิริเดช', 'F', '1966-08-10', '3101201863370', '2019-07-26 11:18:15', NULL, NULL),
(1092048, 'นาง', 'อัญชลี', 'ชื่นผาติกุล', 'F', '1952-07-15', '3101201599249', '2019-07-28 07:16:06', NULL, NULL),
(33554, 'นาย', 'อดิศร', 'ศักดิ์รัตนา', 'M', '1953-11-17', '3901100329681', '2019-07-28 09:12:50', NULL, NULL),
(201855, 'นาง', 'ระจิตร', 'โฉมงาม', 'F', '1951-09-10', '3549900042085', '2019-07-28 07:16:05', NULL, NULL),
(372162, 'MRS.', 'BELA', 'AGARWAL', 'F', '1976-08-19', ' ', '2019-07-28 07:15:16', NULL, NULL),
(491751, 'นาง', 'พนิดา', 'สุดทรัพย์', 'F', '1964-07-03', '3100400415457', '2019-07-28 09:13:14', NULL, NULL);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `his_patient`
--
ALTER TABLE `his_patient`
ADD PRIMARY KEY (`hn`) 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 */;
|
<filename>database/mazad.sql
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 26, 2021 at 12:35 PM
-- Server version: 5.7.24
-- PHP Version: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `mazad`
--
-- --------------------------------------------------------
--
-- Table structure for table `addresses`
--
CREATE TABLE `addresses` (
`id` bigint(20) UNSIGNED NOT NULL,
`user_id` bigint(20) UNSIGNED NOT NULL,
`building` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`floor` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`apartment_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`lat` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`long` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`type` enum('home','work') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `address_translations`
--
CREATE TABLE `address_translations` (
`id` bigint(20) UNSIGNED NOT NULL,
`address_id` bigint(20) UNSIGNED NOT NULL,
`country` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`state` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`district` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`street` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`full_address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`locale` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `answers`
--
CREATE TABLE `answers` (
`id` bigint(20) UNSIGNED NOT NULL,
`user_id` bigint(20) UNSIGNED DEFAULT NULL,
`ask_id` bigint(20) UNSIGNED DEFAULT NULL,
`text` longtext COLLATE utf8mb4_unicode_ci,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `asks`
--
CREATE TABLE `asks` (
`id` bigint(20) UNSIGNED NOT NULL,
`user_id` bigint(20) UNSIGNED DEFAULT NULL,
`mazad_id` bigint(20) UNSIGNED DEFAULT NULL,
`text` longtext COLLATE utf8mb4_unicode_ci,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `categories`
--
CREATE TABLE `categories` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`image` text COLLATE utf8mb4_unicode_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `comments`
--
CREATE TABLE `comments` (
`id` bigint(20) UNSIGNED NOT NULL,
`user_id` bigint(20) UNSIGNED DEFAULT NULL,
`mazad_id` bigint(20) UNSIGNED DEFAULT NULL,
`price` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `data_rows`
--
CREATE TABLE `data_rows` (
`id` int(10) UNSIGNED NOT NULL,
`data_type_id` int(10) UNSIGNED NOT NULL,
`field` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`display_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`required` tinyint(1) NOT NULL DEFAULT '0',
`browse` tinyint(1) NOT NULL DEFAULT '1',
`read` tinyint(1) NOT NULL DEFAULT '1',
`edit` tinyint(1) NOT NULL DEFAULT '1',
`add` tinyint(1) NOT NULL DEFAULT '1',
`delete` tinyint(1) NOT NULL DEFAULT '1',
`details` text COLLATE utf8mb4_unicode_ci,
`order` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `data_rows`
--
INSERT INTO `data_rows` (`id`, `data_type_id`, `field`, `type`, `display_name`, `required`, `browse`, `read`, `edit`, `add`, `delete`, `details`, `order`) VALUES
(1, 1, 'id', 'number', 'ID', 1, 1, 0, 0, 0, 0, '{}', 1),
(2, 1, 'name', 'text', 'Name', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 2),
(3, 1, 'email', 'text', 'Email', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 3),
(4, 1, 'password', 'password', 'Password', 1, 0, 0, 1, 1, 0, '{\"validation\":{\"rule\":\"required\"}}', 4),
(5, 1, 'remember_token', 'text', 'Remember Token', 0, 0, 0, 0, 0, 0, '{}', 5),
(6, 1, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 0, 0, 0, '{}', 13),
(7, 1, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 14),
(8, 1, 'avatar', 'image', 'Avatar', 0, 1, 1, 1, 1, 1, '{}', 9),
(9, 1, 'user_belongsto_role_relationship', 'relationship', 'Role', 0, 1, 1, 1, 1, 0, '{\"model\":\"TCG\\\\Voyager\\\\Models\\\\Role\",\"table\":\"roles\",\"type\":\"belongsTo\",\"column\":\"role_id\",\"key\":\"id\",\"label\":\"display_name\",\"pivot_table\":\"roles\",\"pivot\":\"0\",\"taggable\":\"0\"}', 10),
(10, 1, 'user_belongstomany_role_relationship', 'relationship', 'voyager::seeders.data_rows.roles', 0, 0, 1, 1, 1, 0, '{\"model\":\"TCG\\\\Voyager\\\\Models\\\\Role\",\"table\":\"roles\",\"type\":\"belongsToMany\",\"column\":\"id\",\"key\":\"id\",\"label\":\"display_name\",\"pivot_table\":\"user_roles\",\"pivot\":\"1\",\"taggable\":\"0\"}', 16),
(11, 1, 'settings', 'hidden', 'Settings', 0, 0, 0, 0, 0, 0, '{}', 17),
(12, 2, 'id', 'number', 'ID', 1, 0, 0, 0, 0, 0, NULL, 1),
(13, 2, 'name', 'text', 'Name', 1, 1, 1, 1, 1, 1, NULL, 2),
(14, 2, 'created_at', 'timestamp', 'Created At', 0, 0, 0, 0, 0, 0, NULL, 3),
(15, 2, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, NULL, 4),
(16, 3, 'id', 'number', 'ID', 1, 0, 0, 0, 0, 0, NULL, 1),
(17, 3, 'name', 'text', 'Name', 1, 1, 1, 1, 1, 1, NULL, 2),
(18, 3, 'created_at', 'timestamp', 'Created At', 0, 0, 0, 0, 0, 0, NULL, 3),
(19, 3, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, NULL, 4),
(20, 3, 'display_name', 'text', 'Display Name', 1, 1, 1, 1, 1, 1, NULL, 5),
(21, 1, 'role_id', 'text', 'Role', 0, 1, 1, 1, 1, 1, '{}', 15),
(22, 4, 'id', 'text', 'Id', 1, 1, 0, 0, 0, 0, '{}', 1),
(23, 4, 'user_id', 'text', 'User Id', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 2),
(24, 4, 'building', 'text', 'Building', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 3),
(25, 4, 'floor', 'text', 'Floor', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 4),
(26, 4, 'apartment_number', 'text', 'Apartment Number', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 5),
(27, 4, 'lat', 'text', 'Lat', 0, 1, 1, 1, 1, 1, '{}', 6),
(28, 4, 'long', 'text', 'Long', 0, 1, 1, 1, 1, 1, '{}', 7),
(29, 4, 'type', 'text', 'Type', 0, 1, 1, 1, 1, 1, '{\"home\":\"home\",\"options\":{\"home\":\"home\",\"work\":\"work\"}}', 8),
(30, 4, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 1, 0, 1, '{}', 9),
(31, 4, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 10),
(32, 5, 'id', 'text', 'Id', 1, 1, 0, 0, 0, 0, '{}', 1),
(33, 5, 'address_id', 'text', 'Address Id', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 2),
(34, 5, 'country', 'text', 'Country', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 3),
(35, 5, 'state', 'text', 'State', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 4),
(36, 5, 'district', 'text', 'District', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 5),
(37, 5, 'street', 'text', 'Street', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 6),
(38, 5, 'full_address', 'text', 'Full Address', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 7),
(39, 5, 'locale', 'text', 'Locale', 1, 1, 1, 1, 1, 1, '{\"en\":\"en\",\"options\":{\"en\":\"en\",\"ar\":\"ar\"}}', 8),
(40, 5, 'address_translation_belongsto_address_relationship', 'relationship', 'addresses', 0, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\Address\",\"table\":\"addresses\",\"type\":\"belongsTo\",\"column\":\"address_id\",\"key\":\"id\",\"label\":\"type\",\"pivot_table\":\"address_translations\",\"pivot\":\"0\",\"taggable\":\"0\"}', 9),
(41, 6, 'id', 'text', 'Id', 1, 1, 0, 0, 0, 0, '{}', 1),
(42, 6, 'name', 'text', 'Name', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 2),
(43, 6, 'details', 'text_area', 'Details', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 3),
(44, 6, 'price', 'number', 'Price', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 6),
(45, 6, 'price_min_plus', 'number', 'Price Min Plus', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 7),
(46, 6, 'category_id', 'text', 'Category Id', 0, 0, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 8),
(47, 6, 'user_id', 'text', 'User Id', 0, 0, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 9),
(48, 6, 'from', 'timestamp', 'From', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 10),
(49, 6, 'to', 'timestamp', 'To', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 11),
(50, 6, 'status', 'select_dropdown', 'Status', 1, 1, 1, 1, 1, 1, '{\"1\":\"True\",\"options\":{\"0\":\"False\",\"1\":\"True\"}}', 12),
(51, 6, 'created_at', 'timestamp', 'Created At', 0, 0, 1, 1, 0, 1, '{}', 13),
(52, 6, 'updated_at', 'timestamp', 'Updated At', 0, 0, 1, 0, 0, 0, '{}', 14),
(53, 6, 'mazad_belongsto_user_relationship', 'relationship', 'users', 0, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\User\",\"table\":\"users\",\"type\":\"belongsTo\",\"column\":\"user_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"address_translations\",\"pivot\":\"0\",\"taggable\":\"0\"}', 4),
(54, 6, 'mazad_belongsto_category_relationship', 'relationship', 'categories', 0, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\Category\",\"table\":\"categories\",\"type\":\"belongsTo\",\"column\":\"category_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"address_translations\",\"pivot\":\"0\",\"taggable\":\"0\"}', 5),
(55, 7, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(56, 7, 'user_id', 'number', 'User Id', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 2),
(57, 7, 'mazad_id', 'number', 'Mazad Id', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 3),
(58, 7, 'price', 'number', 'Price', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 4),
(59, 7, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 1, 0, 1, '{}', 7),
(60, 7, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 8),
(61, 7, 'comment_belongsto_user_relationship', 'relationship', 'users', 0, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\User\",\"table\":\"users\",\"type\":\"belongsTo\",\"column\":\"user_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"address_translations\",\"pivot\":\"0\",\"taggable\":\"0\"}', 5),
(62, 7, 'comment_belongsto_mazad_relationship', 'relationship', 'mazads', 0, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\Mazad\",\"table\":\"mazads\",\"type\":\"belongsTo\",\"column\":\"mazad_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"address_translations\",\"pivot\":\"0\",\"taggable\":\"0\"}', 6),
(63, 8, 'id', 'text', 'Id', 1, 1, 0, 0, 0, 0, '{}', 1),
(64, 8, 'user_id', 'number', 'User Id', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 2),
(65, 8, 'mazad_id', 'number', 'Mazad Id', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 3),
(66, 8, 'text', 'text_area', 'Text', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 4),
(67, 8, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 1, 0, 1, '{}', 5),
(68, 8, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 6),
(69, 8, 'ask_belongsto_user_relationship', 'relationship', 'users', 0, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\User\",\"table\":\"users\",\"type\":\"belongsTo\",\"column\":\"user_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"address_translations\",\"pivot\":\"0\",\"taggable\":\"0\"}', 7),
(70, 8, 'ask_belongsto_mazad_relationship', 'relationship', 'mazads', 0, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\Mazad\",\"table\":\"mazads\",\"type\":\"belongsTo\",\"column\":\"mazad_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"address_translations\",\"pivot\":\"0\",\"taggable\":\"0\"}', 8),
(71, 9, 'id', 'text', 'Id', 1, 1, 0, 0, 0, 0, '{}', 1),
(72, 9, 'user_id', 'number', 'User Id', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 2),
(73, 9, 'ask_id', 'number', 'Ask Id', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 3),
(74, 9, 'text', 'text_area', 'Text', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 4),
(75, 9, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 1, 0, 1, '{}', 5),
(76, 9, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 6),
(77, 9, 'answer_belongsto_user_relationship', 'relationship', 'users', 0, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\User\",\"table\":\"users\",\"type\":\"belongsTo\",\"column\":\"user_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"address_translations\",\"pivot\":\"0\",\"taggable\":\"0\"}', 7),
(78, 9, 'answer_belongsto_ask_relationship', 'relationship', 'asks', 0, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\Ask\",\"table\":\"asks\",\"type\":\"belongsTo\",\"column\":\"ask_id\",\"key\":\"id\",\"label\":\"text\",\"pivot_table\":\"address_translations\",\"pivot\":\"0\",\"taggable\":\"0\"}', 8),
(79, 10, 'id', 'text', 'Id', 1, 1, 0, 0, 0, 0, '{}', 1),
(80, 10, 'name', 'text', 'Name', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 2),
(81, 10, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 1, 0, 1, '{}', 4),
(82, 10, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 5),
(83, 11, 'id', 'text', 'Id', 1, 1, 0, 0, 0, 0, '{}', 1),
(84, 11, 'photo', 'image', 'Photo', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 2),
(85, 11, 'item_id', 'number', 'Item Id', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 3),
(86, 11, 'model', 'text', 'Model', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 4),
(87, 11, 'image_belongsto_mazad_relationship', 'relationship', 'mazads', 0, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\Mazad\",\"table\":\"mazads\",\"type\":\"belongsTo\",\"column\":\"item_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"address_translations\",\"pivot\":\"0\",\"taggable\":\"0\"}', 5),
(88, 12, 'id', 'text', 'Id', 1, 1, 0, 0, 0, 0, '{}', 1),
(89, 12, 'user_id', 'number', 'User Id', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 2),
(90, 12, 'mazad_id', 'number', 'Mazad Id', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 3),
(91, 12, 'price', 'number', 'Price', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 4),
(92, 12, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 1, 0, 1, '{}', 7),
(93, 12, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 8),
(94, 12, 'winner_belongsto_user_relationship', 'relationship', 'users', 0, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\User\",\"table\":\"users\",\"type\":\"belongsTo\",\"column\":\"user_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"address_translations\",\"pivot\":\"0\",\"taggable\":\"0\"}', 5),
(95, 12, 'winner_belongsto_mazad_relationship', 'relationship', 'mazads', 0, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\Mazad\",\"table\":\"mazads\",\"type\":\"belongsTo\",\"column\":\"mazad_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"address_translations\",\"pivot\":\"0\",\"taggable\":\"0\"}', 6),
(103, 1, 'email_verified_at', 'timestamp', 'Email Verified At', 0, 1, 1, 1, 1, 1, '{}', 7),
(104, 1, 'phone', 'text', 'Phone', 0, 1, 1, 1, 1, 1, '{}', 6),
(105, 1, 'type', 'select_dropdown', 'Type', 1, 1, 1, 1, 1, 1, '{\"user\":\"user\",\"options\":{\"user\":\"user\",\"admin\":\"admin\"}}', 8),
(106, 1, 'gender', 'text', 'Gender', 0, 1, 1, 1, 1, 1, '{}', 12),
(107, 1, 'birth_date', 'text', 'Birth Date', 0, 1, 1, 1, 1, 1, '{}', 11),
(108, 1, 'code', 'text', 'Code', 0, 0, 1, 1, 1, 1, '{}', 18),
(109, 10, 'image', 'image', 'Image', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 3);
-- --------------------------------------------------------
--
-- Table structure for table `data_types`
--
CREATE TABLE `data_types` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`display_name_singular` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`display_name_plural` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`icon` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`model_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`policy_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`controller` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`description` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`generate_permissions` tinyint(1) NOT NULL DEFAULT '0',
`server_side` tinyint(4) NOT NULL DEFAULT '0',
`details` text COLLATE utf8mb4_unicode_ci,
`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 `data_types`
--
INSERT INTO `data_types` (`id`, `name`, `slug`, `display_name_singular`, `display_name_plural`, `icon`, `model_name`, `policy_name`, `controller`, `description`, `generate_permissions`, `server_side`, `details`, `created_at`, `updated_at`) VALUES
(1, 'users', 'users', 'User', 'Users', 'voyager-person', 'TCG\\Voyager\\Models\\User', 'TCG\\Voyager\\Policies\\UserPolicy', 'TCG\\Voyager\\Http\\Controllers\\VoyagerUserController', NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"desc\",\"default_search_key\":null,\"scope\":null}', '2021-09-26 08:36:32', '2021-09-26 09:54:44'),
(2, 'menus', 'menus', 'Menu', 'Menus', 'voyager-list', 'TCG\\Voyager\\Models\\Menu', NULL, '', '', 1, 0, NULL, '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(3, 'roles', 'roles', 'Role', 'Roles', 'voyager-lock', 'TCG\\Voyager\\Models\\Role', NULL, 'TCG\\Voyager\\Http\\Controllers\\VoyagerRoleController', '', 1, 0, NULL, '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(4, 'addresses', 'addresses', 'Address', 'Addresses', 'voyager-folder', 'App\\Models\\Address', NULL, NULL, NULL, 1, 1, '{\"order_column\":\"id\",\"order_display_column\":\"id\",\"order_direction\":\"desc\",\"default_search_key\":\"id\"}', '2021-09-26 08:41:20', '2021-09-26 08:41:20'),
(5, 'address_translations', 'address-translations', 'Address Translation', 'Address Translations', 'voyager-folder', 'App\\Models\\AddressTranslation', NULL, NULL, NULL, 1, 1, '{\"order_column\":\"id\",\"order_display_column\":\"id\",\"order_direction\":\"desc\",\"default_search_key\":\"full_address\",\"scope\":null}', '2021-09-26 08:43:12', '2021-09-26 08:43:51'),
(6, 'mazads', 'mazads', 'Mazad', 'Mazads', 'voyager-folder', 'App\\Models\\Mazad', NULL, NULL, NULL, 1, 1, '{\"order_column\":\"id\",\"order_display_column\":\"id\",\"order_direction\":\"desc\",\"default_search_key\":\"name\",\"scope\":null}', '2021-09-26 08:45:53', '2021-09-26 09:58:02'),
(7, 'comments', 'comments', 'Comment', 'Comments', 'voyager-folder', 'App\\Models\\Comment', NULL, NULL, NULL, 1, 1, '{\"order_column\":\"id\",\"order_display_column\":\"id\",\"order_direction\":\"desc\",\"default_search_key\":\"price\",\"scope\":null}', '2021-09-26 09:33:08', '2021-09-26 09:56:44'),
(8, 'asks', 'asks', 'Ask', 'Asks', 'voyager-folder', 'App\\Models\\Ask', NULL, NULL, NULL, 1, 1, '{\"order_column\":\"id\",\"order_display_column\":\"id\",\"order_direction\":\"desc\",\"default_search_key\":\"text\",\"scope\":null}', '2021-09-26 09:34:34', '2021-09-26 09:56:02'),
(9, 'answers', 'answers', 'Answer', 'Answers', 'voyager-folder', 'App\\Models\\Answer', NULL, NULL, NULL, 1, 1, '{\"order_column\":\"id\",\"order_display_column\":\"id\",\"order_direction\":\"desc\",\"default_search_key\":\"text\",\"scope\":null}', '2021-09-26 09:36:00', '2021-09-26 09:55:53'),
(10, 'categories', 'categories', 'Category', 'Categories', 'voyager-folder', 'App\\Models\\Category', NULL, NULL, NULL, 1, 1, '{\"order_column\":\"id\",\"order_display_column\":\"id\",\"order_direction\":\"desc\",\"default_search_key\":\"name\",\"scope\":null}', '2021-09-26 09:37:28', '2021-09-26 10:13:18'),
(11, 'images', 'images', 'Image', 'Images', 'voyager-folder', 'App\\Models\\Image', NULL, NULL, NULL, 1, 1, '{\"order_column\":\"id\",\"order_display_column\":\"id\",\"order_direction\":\"desc\",\"default_search_key\":\"model\",\"scope\":null}', '2021-09-26 09:38:10', '2021-09-26 09:38:49'),
(12, 'winners', 'winners', 'Winner', 'Winners', 'voyager-folder', 'App\\Models\\Winner', NULL, NULL, NULL, 1, 1, '{\"order_column\":\"id\",\"order_display_column\":\"id\",\"order_direction\":\"desc\",\"default_search_key\":\"user_id\",\"scope\":null}', '2021-09-26 09:39:33', '2021-09-26 09:58:23');
-- --------------------------------------------------------
--
-- Table structure for table `failed_jobs`
--
CREATE TABLE `failed_jobs` (
`id` bigint(20) UNSIGNED NOT NULL,
`uuid` varchar(191) 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 `images`
--
CREATE TABLE `images` (
`id` bigint(20) UNSIGNED NOT NULL,
`photo` text COLLATE utf8mb4_unicode_ci,
`item_id` bigint(20) UNSIGNED DEFAULT NULL,
`model` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `mazads`
--
CREATE TABLE `mazads` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`details` longtext COLLATE utf8mb4_unicode_ci,
`price` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`price_min_plus` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`category_id` bigint(20) UNSIGNED DEFAULT NULL,
`user_id` bigint(20) UNSIGNED DEFAULT NULL,
`from` datetime DEFAULT NULL,
`to` datetime DEFAULT NULL,
`status` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `menus`
--
CREATE TABLE `menus` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `menus`
--
INSERT INTO `menus` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'admin', '2021-09-26 08:36:32', '2021-09-26 08:36:32');
-- --------------------------------------------------------
--
-- Table structure for table `menu_items`
--
CREATE TABLE `menu_items` (
`id` int(10) UNSIGNED NOT NULL,
`menu_id` int(10) UNSIGNED DEFAULT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`url` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`target` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '_self',
`icon_class` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`color` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`parent_id` int(11) DEFAULT NULL,
`order` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`route` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`parameters` text COLLATE utf8mb4_unicode_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `menu_items`
--
INSERT INTO `menu_items` (`id`, `menu_id`, `title`, `url`, `target`, `icon_class`, `color`, `parent_id`, `order`, `created_at`, `updated_at`, `route`, `parameters`) VALUES
(1, 1, 'Dashboard', '', '_self', 'voyager-boat', NULL, NULL, 1, '2021-09-26 08:36:32', '2021-09-26 08:36:32', 'voyager.dashboard', NULL),
(2, 1, 'Media', '', '_self', 'voyager-images', NULL, NULL, 7, '2021-09-26 08:36:32', '2021-09-26 09:45:29', 'voyager.media.index', NULL),
(3, 1, 'Users', '', '_self', 'voyager-person', NULL, NULL, 3, '2021-09-26 08:36:32', '2021-09-26 08:36:32', 'voyager.users.index', NULL),
(4, 1, 'Roles', '', '_self', 'voyager-lock', NULL, NULL, 2, '2021-09-26 08:36:32', '2021-09-26 08:36:32', 'voyager.roles.index', NULL),
(5, 1, 'Tools', '', '_self', 'voyager-tools', NULL, NULL, 9, '2021-09-26 08:36:32', '2021-09-26 09:45:32', NULL, NULL),
(6, 1, 'Menu Builder', '', '_self', 'voyager-list', NULL, 5, 1, '2021-09-26 08:36:32', '2021-09-26 09:43:39', 'voyager.menus.index', NULL),
(7, 1, 'Database', '', '_self', 'voyager-data', NULL, 5, 2, '2021-09-26 08:36:32', '2021-09-26 09:43:39', 'voyager.database.index', NULL),
(8, 1, 'Compass', '', '_self', 'voyager-compass', NULL, 5, 3, '2021-09-26 08:36:32', '2021-09-26 09:43:39', 'voyager.compass.index', NULL),
(9, 1, 'BREAD', '', '_self', 'voyager-bread', NULL, 5, 4, '2021-09-26 08:36:32', '2021-09-26 09:43:55', 'voyager.bread.index', NULL),
(10, 1, 'Settings', '', '_self', 'voyager-settings', NULL, NULL, 8, '2021-09-26 08:36:32', '2021-09-26 09:45:29', 'voyager.settings.index', NULL),
(11, 1, 'Addresses', '', '_self', 'voyager-folder', NULL, 22, 1, '2021-09-26 08:41:20', '2021-09-26 09:43:40', 'voyager.addresses.index', NULL),
(12, 1, 'Address Translations', '', '_self', 'voyager-folder', NULL, 22, 2, '2021-09-26 08:43:12', '2021-09-26 09:43:45', 'voyager.address-translations.index', NULL),
(13, 1, 'Mazads', '', '_self', 'voyager-folder', NULL, 23, 1, '2021-09-26 08:45:53', '2021-09-26 09:44:28', 'voyager.mazads.index', NULL),
(14, 1, 'Comments', '', '_self', 'voyager-folder', NULL, 23, 3, '2021-09-26 09:33:08', '2021-09-26 09:44:43', 'voyager.comments.index', NULL),
(15, 1, 'Asks', '', '_self', 'voyager-folder', NULL, 23, 4, '2021-09-26 09:34:34', '2021-09-26 09:44:43', 'voyager.asks.index', NULL),
(16, 1, 'Answers', '', '_self', 'voyager-folder', NULL, 23, 5, '2021-09-26 09:36:00', '2021-09-26 09:44:43', 'voyager.answers.index', NULL),
(17, 1, 'Categories', '', '_self', 'voyager-folder', NULL, NULL, 5, '2021-09-26 09:37:28', '2021-09-26 09:45:29', 'voyager.categories.index', NULL),
(18, 1, 'Images', '', '_self', 'voyager-folder', NULL, 23, 2, '2021-09-26 09:38:10', '2021-09-26 09:44:43', 'voyager.images.index', NULL),
(19, 1, 'Winners', '', '_self', 'voyager-folder', NULL, 23, 6, '2021-09-26 09:39:33', '2021-09-26 09:44:47', 'voyager.winners.index', NULL),
(22, 1, 'Addresses', '', '_self', 'voyager-double-down', '#000000', NULL, 4, '2021-09-26 09:43:32', '2021-09-26 09:46:27', NULL, ''),
(23, 1, 'Mazad', '', '_self', 'voyager-double-down', '#000000', NULL, 6, '2021-09-26 09:44:22', '2021-09-26 09:46:37', NULL, '');
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2016_01_01_000000_add_voyager_user_fields', 1),
(4, '2016_01_01_000000_create_data_types_table', 1),
(5, '2016_05_19_173453_create_menu_table', 1),
(6, '2016_06_01_000001_create_oauth_auth_codes_table', 1),
(7, '2016_06_01_000002_create_oauth_access_tokens_table', 1),
(8, '2016_06_01_000003_create_oauth_refresh_tokens_table', 1),
(9, '2016_06_01_000004_create_oauth_clients_table', 1),
(10, '2016_06_01_000005_create_oauth_personal_access_clients_table', 1),
(11, '2016_10_21_190000_create_roles_table', 1),
(12, '2016_10_21_190000_create_settings_table', 1),
(13, '2016_11_30_135954_create_permission_table', 1),
(14, '2016_11_30_141208_create_permission_role_table', 1),
(15, '2016_12_26_201236_data_types__add__server_side', 1),
(16, '2017_01_13_000000_add_route_to_menu_items_table', 1),
(17, '2017_01_14_005015_create_translations_table', 1),
(18, '2017_01_15_000000_make_table_name_nullable_in_permissions_table', 1),
(19, '2017_03_06_000000_add_controller_to_data_types_table', 1),
(20, '2017_04_21_000000_add_order_to_data_rows_table', 1),
(21, '2017_07_05_210000_add_policyname_to_data_types_table', 1),
(22, '2017_08_05_000000_add_group_to_settings_table', 1),
(23, '2017_11_26_013050_add_user_role_relationship', 1),
(24, '2017_11_26_015000_create_user_roles_table', 1),
(25, '2018_03_11_000000_add_user_settings', 1),
(26, '2018_03_14_000000_add_details_to_data_types_table', 1),
(27, '2018_03_16_000000_make_settings_value_nullable', 1),
(28, '2019_08_19_000000_create_failed_jobs_table', 1),
(29, '2021_06_27_225315_create_images_table', 1),
(30, '2021_06_29_214248_create_user_translations_table', 1),
(31, '2021_07_01_091457_create_addresses_table', 1),
(32, '2021_07_01_093004_create_address_translations_table', 1),
(33, '2021_09_24_180857_create_mazads_table', 1),
(34, '2021_09_24_180950_create_categories_table', 1),
(35, '2021_09_24_181803_create_answers_table', 1),
(36, '2021_09_24_181813_create_asks_table', 1),
(37, '2021_09_24_181823_create_winners_table', 1),
(38, '2021_09_24_181831_create_comments_table', 1);
-- --------------------------------------------------------
--
-- Table structure for table `oauth_access_tokens`
--
CREATE TABLE `oauth_access_tokens` (
`id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`user_id` bigint(20) UNSIGNED DEFAULT NULL,
`client_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`scopes` text COLLATE utf8mb4_unicode_ci,
`revoked` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`expires_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `oauth_auth_codes`
--
CREATE TABLE `oauth_auth_codes` (
`id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`user_id` bigint(20) UNSIGNED NOT NULL,
`client_id` bigint(20) UNSIGNED NOT NULL,
`scopes` text COLLATE utf8mb4_unicode_ci,
`revoked` tinyint(1) NOT NULL,
`expires_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `oauth_clients`
--
CREATE TABLE `oauth_clients` (
`id` bigint(20) UNSIGNED NOT NULL,
`user_id` bigint(20) UNSIGNED DEFAULT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`secret` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`provider` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`redirect` text COLLATE utf8mb4_unicode_ci NOT NULL,
`personal_access_client` tinyint(1) NOT NULL,
`password_client` tinyint(1) NOT NULL,
`revoked` tinyint(1) 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 `oauth_clients`
--
INSERT INTO `oauth_clients` (`id`, `user_id`, `name`, `secret`, `provider`, `redirect`, `personal_access_client`, `password_client`, `revoked`, `created_at`, `updated_at`) VALUES
(1, NULL, 'Laravel Personal Access Client', 'oebbZa6JLg5MjmtDZ0BCPbXsC41YRjTF1yODAyVg', NULL, 'http://localhost', 1, 0, 0, '2021-09-26 08:41:41', '2021-09-26 08:41:41'),
(2, NULL, 'Laravel Password Grant Client', 'tVPXZr5JYJlPvqogEIF8hyWcidBJXEgIZ67UZZU5', 'users', 'http://localhost', 0, 1, 0, '2021-09-26 08:41:41', '2021-09-26 08:41:41');
-- --------------------------------------------------------
--
-- Table structure for table `oauth_personal_access_clients`
--
CREATE TABLE `oauth_personal_access_clients` (
`id` bigint(20) UNSIGNED NOT NULL,
`client_id` bigint(20) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `oauth_personal_access_clients`
--
INSERT INTO `oauth_personal_access_clients` (`id`, `client_id`, `created_at`, `updated_at`) VALUES
(1, 1, '2021-09-26 08:41:41', '2021-09-26 08:41:41');
-- --------------------------------------------------------
--
-- Table structure for table `oauth_refresh_tokens`
--
CREATE TABLE `oauth_refresh_tokens` (
`id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`access_token_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`revoked` tinyint(1) NOT NULL,
`expires_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `permissions`
--
CREATE TABLE `permissions` (
`id` bigint(20) UNSIGNED NOT NULL,
`key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`table_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `permissions`
--
INSERT INTO `permissions` (`id`, `key`, `table_name`, `created_at`, `updated_at`) VALUES
(1, 'browse_admin', NULL, '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(2, 'browse_bread', NULL, '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(3, 'browse_database', NULL, '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(4, 'browse_media', NULL, '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(5, 'browse_compass', NULL, '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(6, 'browse_menus', 'menus', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(7, 'read_menus', 'menus', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(8, 'edit_menus', 'menus', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(9, 'add_menus', 'menus', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(10, 'delete_menus', 'menus', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(11, 'browse_roles', 'roles', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(12, 'read_roles', 'roles', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(13, 'edit_roles', 'roles', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(14, 'add_roles', 'roles', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(15, 'delete_roles', 'roles', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(16, 'browse_users', 'users', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(17, 'read_users', 'users', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(18, 'edit_users', 'users', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(19, 'add_users', 'users', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(20, 'delete_users', 'users', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(21, 'browse_settings', 'settings', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(22, 'read_settings', 'settings', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(23, 'edit_settings', 'settings', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(24, 'add_settings', 'settings', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(25, 'delete_settings', 'settings', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(26, 'browse_addresses', 'addresses', '2021-09-26 08:41:20', '2021-09-26 08:41:20'),
(27, 'read_addresses', 'addresses', '2021-09-26 08:41:20', '2021-09-26 08:41:20'),
(28, 'edit_addresses', 'addresses', '2021-09-26 08:41:20', '2021-09-26 08:41:20'),
(29, 'add_addresses', 'addresses', '2021-09-26 08:41:20', '2021-09-26 08:41:20'),
(30, 'delete_addresses', 'addresses', '2021-09-26 08:41:20', '2021-09-26 08:41:20'),
(31, 'browse_address_translations', 'address_translations', '2021-09-26 08:43:12', '2021-09-26 08:43:12'),
(32, 'read_address_translations', 'address_translations', '2021-09-26 08:43:12', '2021-09-26 08:43:12'),
(33, 'edit_address_translations', 'address_translations', '2021-09-26 08:43:12', '2021-09-26 08:43:12'),
(34, 'add_address_translations', 'address_translations', '2021-09-26 08:43:12', '2021-09-26 08:43:12'),
(35, 'delete_address_translations', 'address_translations', '2021-09-26 08:43:12', '2021-09-26 08:43:12'),
(36, 'browse_mazads', 'mazads', '2021-09-26 08:45:53', '2021-09-26 08:45:53'),
(37, 'read_mazads', 'mazads', '2021-09-26 08:45:53', '2021-09-26 08:45:53'),
(38, 'edit_mazads', 'mazads', '2021-09-26 08:45:53', '2021-09-26 08:45:53'),
(39, 'add_mazads', 'mazads', '2021-09-26 08:45:53', '2021-09-26 08:45:53'),
(40, 'delete_mazads', 'mazads', '2021-09-26 08:45:53', '2021-09-26 08:45:53'),
(41, 'browse_comments', 'comments', '2021-09-26 09:33:08', '2021-09-26 09:33:08'),
(42, 'read_comments', 'comments', '2021-09-26 09:33:08', '2021-09-26 09:33:08'),
(43, 'edit_comments', 'comments', '2021-09-26 09:33:08', '2021-09-26 09:33:08'),
(44, 'add_comments', 'comments', '2021-09-26 09:33:08', '2021-09-26 09:33:08'),
(45, 'delete_comments', 'comments', '2021-09-26 09:33:08', '2021-09-26 09:33:08'),
(46, 'browse_asks', 'asks', '2021-09-26 09:34:34', '2021-09-26 09:34:34'),
(47, 'read_asks', 'asks', '2021-09-26 09:34:34', '2021-09-26 09:34:34'),
(48, 'edit_asks', 'asks', '2021-09-26 09:34:34', '2021-09-26 09:34:34'),
(49, 'add_asks', 'asks', '2021-09-26 09:34:34', '2021-09-26 09:34:34'),
(50, 'delete_asks', 'asks', '2021-09-26 09:34:34', '2021-09-26 09:34:34'),
(51, 'browse_answers', 'answers', '2021-09-26 09:36:00', '2021-09-26 09:36:00'),
(52, 'read_answers', 'answers', '2021-09-26 09:36:00', '2021-09-26 09:36:00'),
(53, 'edit_answers', 'answers', '2021-09-26 09:36:00', '2021-09-26 09:36:00'),
(54, 'add_answers', 'answers', '2021-09-26 09:36:00', '2021-09-26 09:36:00'),
(55, 'delete_answers', 'answers', '2021-09-26 09:36:00', '2021-09-26 09:36:00'),
(56, 'browse_categories', 'categories', '2021-09-26 09:37:28', '2021-09-26 09:37:28'),
(57, 'read_categories', 'categories', '2021-09-26 09:37:28', '2021-09-26 09:37:28'),
(58, 'edit_categories', 'categories', '2021-09-26 09:37:28', '2021-09-26 09:37:28'),
(59, 'add_categories', 'categories', '2021-09-26 09:37:28', '2021-09-26 09:37:28'),
(60, 'delete_categories', 'categories', '2021-09-26 09:37:28', '2021-09-26 09:37:28'),
(61, 'browse_images', 'images', '2021-09-26 09:38:10', '2021-09-26 09:38:10'),
(62, 'read_images', 'images', '2021-09-26 09:38:10', '2021-09-26 09:38:10'),
(63, 'edit_images', 'images', '2021-09-26 09:38:10', '2021-09-26 09:38:10'),
(64, 'add_images', 'images', '2021-09-26 09:38:10', '2021-09-26 09:38:10'),
(65, 'delete_images', 'images', '2021-09-26 09:38:10', '2021-09-26 09:38:10'),
(66, 'browse_winners', 'winners', '2021-09-26 09:39:33', '2021-09-26 09:39:33'),
(67, 'read_winners', 'winners', '2021-09-26 09:39:33', '2021-09-26 09:39:33'),
(68, 'edit_winners', 'winners', '2021-09-26 09:39:33', '2021-09-26 09:39:33'),
(69, 'add_winners', 'winners', '2021-09-26 09:39:33', '2021-09-26 09:39:33'),
(70, 'delete_winners', 'winners', '2021-09-26 09:39:33', '2021-09-26 09:39:33');
-- --------------------------------------------------------
--
-- Table structure for table `permission_role`
--
CREATE TABLE `permission_role` (
`permission_id` bigint(20) UNSIGNED NOT NULL,
`role_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `permission_role`
--
INSERT INTO `permission_role` (`permission_id`, `role_id`) VALUES
(1, 1),
(2, 1),
(3, 1),
(4, 1),
(5, 1),
(6, 1),
(7, 1),
(8, 1),
(9, 1),
(10, 1),
(11, 1),
(12, 1),
(13, 1),
(14, 1),
(15, 1),
(16, 1),
(17, 1),
(18, 1),
(19, 1),
(20, 1),
(21, 1),
(22, 1),
(23, 1),
(24, 1),
(25, 1),
(26, 1),
(27, 1),
(28, 1),
(29, 1),
(30, 1),
(31, 1),
(32, 1),
(33, 1),
(34, 1),
(35, 1),
(36, 1),
(37, 1),
(38, 1),
(39, 1),
(40, 1),
(41, 1),
(42, 1),
(43, 1),
(44, 1),
(45, 1),
(46, 1),
(47, 1),
(48, 1),
(49, 1),
(50, 1),
(51, 1),
(52, 1),
(53, 1),
(54, 1),
(55, 1),
(56, 1),
(57, 1),
(58, 1),
(59, 1),
(60, 1),
(61, 1),
(62, 1),
(63, 1),
(64, 1),
(65, 1),
(66, 1),
(67, 1),
(68, 1),
(69, 1),
(70, 1);
-- --------------------------------------------------------
--
-- Table structure for table `roles`
--
CREATE TABLE `roles` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`display_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `roles`
--
INSERT INTO `roles` (`id`, `name`, `display_name`, `created_at`, `updated_at`) VALUES
(1, 'admin', 'Administrator', '2021-09-26 08:36:32', '2021-09-26 08:36:32'),
(2, 'user', 'Normal User', '2021-09-26 08:36:32', '2021-09-26 08:36:32');
-- --------------------------------------------------------
--
-- Table structure for table `settings`
--
CREATE TABLE `settings` (
`id` int(10) UNSIGNED NOT NULL,
`key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`display_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`value` text COLLATE utf8mb4_unicode_ci,
`details` text COLLATE utf8mb4_unicode_ci,
`type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`order` int(11) NOT NULL DEFAULT '1',
`group` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `settings`
--
INSERT INTO `settings` (`id`, `key`, `display_name`, `value`, `details`, `type`, `order`, `group`) VALUES
(1, 'site.title', 'Site Title', 'Site Title', '', 'text', 1, 'Site'),
(2, 'site.description', 'Site Description', 'Site Description', '', 'text', 2, 'Site'),
(3, 'site.logo', 'Site Logo', '', '', 'image', 3, 'Site'),
(4, 'site.google_analytics_tracking_id', 'Google Analytics Tracking ID', '', '', 'text', 4, 'Site'),
(5, 'admin.bg_image', 'Admin Background Image', '', '', 'image', 5, 'Admin'),
(6, 'admin.title', 'Admin Title', 'Voyager', '', 'text', 1, 'Admin'),
(7, 'admin.description', 'Admin Description', 'Welcome to Voyager. The Missing Admin for Laravel', '', 'text', 2, 'Admin'),
(8, 'admin.loader', 'Admin Loader', '', '', 'image', 3, 'Admin'),
(9, 'admin.icon_image', 'Admin Icon Image', '', '', 'image', 4, 'Admin'),
(10, 'admin.google_analytics_client_id', 'Google Analytics Client ID (used for admin dashboard)', '', '', 'text', 1, 'Admin');
-- --------------------------------------------------------
--
-- Table structure for table `translations`
--
CREATE TABLE `translations` (
`id` int(10) UNSIGNED NOT NULL,
`table_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`column_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`foreign_key` int(10) UNSIGNED NOT NULL,
`locale` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`value` text COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` bigint(20) UNSIGNED NOT NULL,
`role_id` bigint(20) UNSIGNED DEFAULT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`avatar` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT 'users/default.png',
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`type` enum('user','admin') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'user',
`gender` enum('male','female') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`birth_date` date DEFAULT NULL,
`code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`settings` text COLLATE utf8mb4_unicode_ci,
`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`, `role_id`, `name`, `email`, `avatar`, `email_verified_at`, `password`, `phone`, `type`, `gender`, `birth_date`, `code`, `remember_token`, `settings`, `created_at`, `updated_at`) VALUES
(1, 1, 'Admin', '<EMAIL>', 'users/default.png', '2021-09-26 11:59:53', '$2y$10$.oQYH1YIq4cmGoINdq8Tq.J2utwblFdSqZdWv0rOkxIdJ8QYCdY6y', NULL, 'admin', NULL, NULL, NULL, NULL, NULL, '2021-09-26 08:37:45', '2021-09-26 08:37:45');
-- --------------------------------------------------------
--
-- Table structure for table `user_roles`
--
CREATE TABLE `user_roles` (
`user_id` bigint(20) UNSIGNED NOT NULL,
`role_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `user_translations`
--
CREATE TABLE `user_translations` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`user_id` bigint(20) UNSIGNED NOT NULL,
`locale` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `user_translations`
--
INSERT INTO `user_translations` (`id`, `name`, `user_id`, `locale`) VALUES
(1, 'admin', 1, 'en');
-- --------------------------------------------------------
--
-- Table structure for table `winners`
--
CREATE TABLE `winners` (
`id` bigint(20) UNSIGNED NOT NULL,
`user_id` bigint(20) UNSIGNED DEFAULT NULL,
`mazad_id` bigint(20) UNSIGNED DEFAULT NULL,
`price` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `addresses`
--
ALTER TABLE `addresses`
ADD PRIMARY KEY (`id`),
ADD KEY `addresses_user_id_foreign` (`user_id`);
--
-- Indexes for table `address_translations`
--
ALTER TABLE `address_translations`
ADD PRIMARY KEY (`id`),
ADD KEY `address_translations_address_id_foreign` (`address_id`),
ADD KEY `address_translations_locale_index` (`locale`);
--
-- Indexes for table `answers`
--
ALTER TABLE `answers`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `asks`
--
ALTER TABLE `asks`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `comments`
--
ALTER TABLE `comments`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `data_rows`
--
ALTER TABLE `data_rows`
ADD PRIMARY KEY (`id`),
ADD KEY `data_rows_data_type_id_foreign` (`data_type_id`);
--
-- Indexes for table `data_types`
--
ALTER TABLE `data_types`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `data_types_name_unique` (`name`),
ADD UNIQUE KEY `data_types_slug_unique` (`slug`);
--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);
--
-- Indexes for table `images`
--
ALTER TABLE `images`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `mazads`
--
ALTER TABLE `mazads`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `menus`
--
ALTER TABLE `menus`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `menus_name_unique` (`name`);
--
-- Indexes for table `menu_items`
--
ALTER TABLE `menu_items`
ADD PRIMARY KEY (`id`),
ADD KEY `menu_items_menu_id_foreign` (`menu_id`);
--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `oauth_access_tokens`
--
ALTER TABLE `oauth_access_tokens`
ADD PRIMARY KEY (`id`),
ADD KEY `oauth_access_tokens_user_id_index` (`user_id`);
--
-- Indexes for table `oauth_auth_codes`
--
ALTER TABLE `oauth_auth_codes`
ADD PRIMARY KEY (`id`),
ADD KEY `oauth_auth_codes_user_id_index` (`user_id`);
--
-- Indexes for table `oauth_clients`
--
ALTER TABLE `oauth_clients`
ADD PRIMARY KEY (`id`),
ADD KEY `oauth_clients_user_id_index` (`user_id`);
--
-- Indexes for table `oauth_personal_access_clients`
--
ALTER TABLE `oauth_personal_access_clients`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `oauth_refresh_tokens`
--
ALTER TABLE `oauth_refresh_tokens`
ADD PRIMARY KEY (`id`),
ADD KEY `oauth_refresh_tokens_access_token_id_index` (`access_token_id`);
--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`);
--
-- Indexes for table `permissions`
--
ALTER TABLE `permissions`
ADD PRIMARY KEY (`id`),
ADD KEY `permissions_key_index` (`key`);
--
-- Indexes for table `permission_role`
--
ALTER TABLE `permission_role`
ADD PRIMARY KEY (`permission_id`,`role_id`),
ADD KEY `permission_role_permission_id_index` (`permission_id`),
ADD KEY `permission_role_role_id_index` (`role_id`);
--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `roles_name_unique` (`name`);
--
-- Indexes for table `settings`
--
ALTER TABLE `settings`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `settings_key_unique` (`key`);
--
-- Indexes for table `translations`
--
ALTER TABLE `translations`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `translations_table_name_column_name_foreign_key_locale_unique` (`table_name`,`column_name`,`foreign_key`,`locale`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`),
ADD UNIQUE KEY `users_phone_unique` (`phone`),
ADD KEY `users_role_id_foreign` (`role_id`);
--
-- Indexes for table `user_roles`
--
ALTER TABLE `user_roles`
ADD PRIMARY KEY (`user_id`,`role_id`),
ADD KEY `user_roles_user_id_index` (`user_id`),
ADD KEY `user_roles_role_id_index` (`role_id`);
--
-- Indexes for table `user_translations`
--
ALTER TABLE `user_translations`
ADD PRIMARY KEY (`id`),
ADD KEY `user_translations_user_id_foreign` (`user_id`),
ADD KEY `user_translations_locale_index` (`locale`);
--
-- Indexes for table `winners`
--
ALTER TABLE `winners`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `addresses`
--
ALTER TABLE `addresses`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `address_translations`
--
ALTER TABLE `address_translations`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `answers`
--
ALTER TABLE `answers`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `asks`
--
ALTER TABLE `asks`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `data_rows`
--
ALTER TABLE `data_rows`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=110;
--
-- AUTO_INCREMENT for table `data_types`
--
ALTER TABLE `data_types`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `images`
--
ALTER TABLE `images`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `mazads`
--
ALTER TABLE `mazads`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `menus`
--
ALTER TABLE `menus`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `menu_items`
--
ALTER TABLE `menu_items`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=39;
--
-- AUTO_INCREMENT for table `oauth_clients`
--
ALTER TABLE `oauth_clients`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `oauth_personal_access_clients`
--
ALTER TABLE `oauth_personal_access_clients`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `permissions`
--
ALTER TABLE `permissions`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=81;
--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `settings`
--
ALTER TABLE `settings`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `translations`
--
ALTER TABLE `translations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `user_translations`
--
ALTER TABLE `user_translations`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `winners`
--
ALTER TABLE `winners`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `addresses`
--
ALTER TABLE `addresses`
ADD CONSTRAINT `addresses_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `address_translations`
--
ALTER TABLE `address_translations`
ADD CONSTRAINT `address_translations_address_id_foreign` FOREIGN KEY (`address_id`) REFERENCES `addresses` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `data_rows`
--
ALTER TABLE `data_rows`
ADD CONSTRAINT `data_rows_data_type_id_foreign` FOREIGN KEY (`data_type_id`) REFERENCES `data_types` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `menu_items`
--
ALTER TABLE `menu_items`
ADD CONSTRAINT `menu_items_menu_id_foreign` FOREIGN KEY (`menu_id`) REFERENCES `menus` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `permission_role`
--
ALTER TABLE `permission_role`
ADD CONSTRAINT `permission_role_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `permission_role_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `users`
--
ALTER TABLE `users`
ADD CONSTRAINT `users_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`);
--
-- Constraints for table `user_roles`
--
ALTER TABLE `user_roles`
ADD CONSTRAINT `user_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `user_roles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `user_translations`
--
ALTER TABLE `user_translations`
ADD CONSTRAINT `user_translations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
<filename>src/main/resources/db/migration/mysql/V1__init.sql
create table empresa (id bigint not null auto_increment, cnpj varchar(255) not null, data_atualizacao datetime not null, data_criacao datetime not null, razao_social varchar(255) not null, primary key (id)) ENGINE=InnoDB;
create table funcionario (id bigint not null auto_increment, cpf varchar(255) not null, data_atualizacao datetime not null, data_criacao datetime not null, email varchar(255) not null, nome varchar(255) not null, perfil varchar(255) not null, qtd_horas_almoco float not null, qtd_horas_trabalho_dia float not null, senha varchar(255) not null, valor_hora decimal(19,2) not null, empresa_id bigint, primary key (id)) ENGINE=InnoDB;
create table lancamento (id bigint not null auto_increment, data datetime not null, data_atualizacao datetime not null, data_criacao datetime not null, descricao varchar(255) not null, localizacao varchar(255) not null, tipo varchar(255) not null, funcionario_id bigint, primary key (id)) ENGINE=InnoDB;
alter table funcionario add constraint FK4cm1kg523jlopyexjbmi6y54j foreign key (empresa_id) references empresa (id);
alter table lancamento add constraint FK46i4k5vl8wah7feutye9kbpi4 foreign key (funcionario_id) references funcionario (id);
|
SELECT
COUNT(RA)
FROM SPLETIVO (NOLOCK)
INNER JOIN SMATRICPL (NOLOCK) ON
SMATRICPL.CODCOLIGADA = SPLETIVO.CODCOLIGADA
AND SMATRICPL.CODFILIAL = SPLETIVO.CODFILIAL
AND SMATRICPL.IDPERLET = SPLETIVO.IDPERLET
WHERE
SMATRICPL.CODSTATUS IN (101)
AND SPLETIVO.CODPERLET IN ('2022.1')
|
<filename>assets/sql/cart-old.sql<gh_stars>0
/*
SQLyog Community v11.52 (64 bit)
MySQL - 10.1.16-MariaDB : Database - cart
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`cart` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `cart`;
/*Table structure for table `admin_users` */
DROP TABLE IF EXISTS `admin_users`;
CREATE TABLE `admin_users` (
`admin_id` int(11) NOT NULL AUTO_INCREMENT,
`admin_name` varchar(250) NOT NULL,
`admin_password` varchar(250) NOT NULL,
`admin_email` varchar(250) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`admin_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
/*Data for the table `admin_users` */
insert into `admin_users`(`admin_id`,`admin_name`,`admin_password`,`admin_email`,`created_at`,`updated_at`) values (1,'admin','admin','<EMAIL>','2016-09-30 12:37:45','2017-03-25 05:04:35'),(3,'kiran','123456','<EMAIL>','0000-00-00 00:00:00','0000-00-00 00:00:00');
/*Table structure for table `assign_orders` */
DROP TABLE IF EXISTS `assign_orders`;
CREATE TABLE `assign_orders` (
`delivery_id` int(11) NOT NULL AUTO_INCREMENT,
`deliveryboy_id` int(11) NOT NULL,
`order_id` int(250) NOT NULL,
`pickup_time` datetime NOT NULL,
`delivered_time` datetime NOT NULL,
`delivery_drop` varchar(250) NOT NULL,
`payment_mode` varchar(250) NOT NULL,
`status` varchar(150) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`delivery_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
/*Data for the table `assign_orders` */
insert into `assign_orders`(`delivery_id`,`deliveryboy_id`,`order_id`,`pickup_time`,`delivered_time`,`delivery_drop`,`payment_mode`,`status`,`created_at`,`updated_at`) values (1,9,3,'0000-00-00 00:00:00','0000-00-00 00:00:00','','','','2017-03-21 10:27:20','2017-03-21 10:27:20'),(4,11,4,'0000-00-00 00:00:00','0000-00-00 00:00:00','','','','2017-03-21 12:22:42','2017-03-21 12:22:42'),(6,10,5,'2017-03-22 05:26:48','2017-03-22 12:46:53','','','','2017-03-22 08:05:50','2017-03-22 08:05:50'),(7,12,6,'0000-00-00 00:00:00','0000-00-00 00:00:00','','','','2017-03-22 08:10:18','2017-03-22 08:10:18'),(8,2,7,'2017-03-01 00:00:00','0000-00-00 00:00:00','','','','2017-03-16 00:00:00','2017-03-22 07:34:57'),(9,15,8,'0000-00-00 00:00:00','0000-00-00 00:00:00','','','','2017-03-25 07:02:26','2017-03-25 07:02:26');
/*Table structure for table `categories` */
DROP TABLE IF EXISTS `categories`;
CREATE TABLE `categories` (
`category_id` int(11) NOT NULL AUTO_INCREMENT,
`category_name` varchar(250) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
/*Data for the table `categories` */
insert into `categories`(`category_id`,`category_name`,`created_at`,`updated_at`) values (2,'FOOD','2017-03-20 10:56:06','2017-03-20 10:56:06'),(3,'Electronics','2017-03-21 13:42:10','2017-03-21 13:42:25'),(4,'xdfgdfg','2017-03-21 13:58:49','2017-03-21 13:58:49');
/*Table structure for table `category` */
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
`category_id` int(11) NOT NULL AUTO_INCREMENT,
`category_name` varchar(50) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
/*Data for the table `category` */
insert into `category`(`category_id`,`category_name`,`created_at`,`updated_at`) values (1,'Books','0000-00-00 00:00:00','2017-05-15 08:00:00'),(2,'Electronics','0000-00-00 00:00:00','0000-00-00 00:00:00'),(3,'Fashion','0000-00-00 00:00:00','2017-03-31 11:45:14'),(4,'Food','0000-00-00 00:00:00','0000-00-00 00:00:00'),(5,'Grocery','0000-00-00 00:00:00','2017-03-25 06:22:36'),(6,'Category','2017-05-16 12:42:13','2017-05-16 12:42:13'),(7,'gaming','2017-06-02 11:32:07','2017-06-02 11:32:07'),(8,'dummy','2017-06-02 14:06:54','2017-06-02 14:06:54');
/*Table structure for table `cih` */
DROP TABLE IF EXISTS `cih`;
CREATE TABLE `cih` (
`cih_id` int(11) NOT NULL AUTO_INCREMENT,
`category_name` varchar(1000) NOT NULL,
`cih_fee` varchar(500) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`cih_id`)
) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=latin1;
/*Data for the table `cih` */
insert into `cih`(`cih_id`,`category_name`,`cih_fee`,`created_at`,`updated_at`) values (1,'FITNESS','12%','2017-04-26 12:44:54','2017-04-26 12:44:54'),(2,'APPAREL','17%','2017-04-26 12:45:14','2017-04-26 12:45:14'),(4,'APPAREL – ACCESSORIES, INNERWEAR, SLEEPWEAR','13%','2017-04-26 12:45:59','2017-04-26 12:45:59'),(5,'AUTOMOTIVE – ACCESSORIES','15%','2017-04-26 12:46:27','2017-04-26 12:46:27'),(6,'AUTOMOTIVE – AUTOMOBILES','2%','2017-04-26 12:46:49','2017-04-26 12:46:49'),(7,'AUTOMOTIVE – OTHER SUB CATEGORIES','15%','2017-04-26 12:48:44','2017-04-26 12:48:44'),(8,'AUTOMOTIVE – HELMETS, LUBRICANTS, PARTS, VEHICLE CARE','8%','2017-04-26 12:49:01','2017-04-26 12:49:01'),(9,'AUTOMOTIVE – TYRES','3%','2017-04-26 12:49:19','2017-04-26 12:49:19'),(10,'B<NAME> B<NAME>','10%','2017-04-26 12:49:41','2017-04-26 12:49:41'),(11,'BEAUTY','5%','2017-04-26 12:50:00','2017-04-26 12:50:00'),(12,'BEAUTY – FRAGRANCE','12%','2017-04-26 12:50:16','2017-04-26 12:50:16'),(13,'BUSINESS INDUSTRIAL & SCIENTIFIC SUPPLIES','8%','2017-04-26 12:50:30','2017-04-26 12:50:30'),(14,'BOOKS','12%','2017-04-26 12:50:47','2017-04-26 12:50:47'),(15,'CAMERA','4%','2017-04-26 12:51:04','2017-04-26 12:51:04'),(16,'CLOCKS','10%','2017-04-26 12:51:25','2017-04-26 12:51:25'),(17,'Chargers ','12%','2017-04-26 12:51:41','2017-04-26 12:51:41'),(18,'CRAFT MATERIALS','9%','2017-04-26 12:52:24','2017-04-26 12:52:24'),(19,'CONSUMABLE PHYSICAL GIFT CARD','5%','2017-04-26 12:52:42','2017-04-26 12:52:42'),(20,'EDUCATIONAL SOFTWARE','10%','2017-04-26 12:52:58','2017-04-26 12:52:58'),(21,'BAGS & SLEEVES – ELECTRONICS & PC, WIRELESS','135%','2017-04-26 12:53:16','2017-04-26 12:53:16'),(22,'ELECTRONIC DEVICES – EXCEPT TV, CAMERA, & CAMCORDER, CAMERA LENS, GPS DEVICES, SPEAKERS, MOBILE PHONES AND TABLETS','7%','2017-05-04 06:28:18','2017-05-04 06:28:18'),(23,'GAMING','12 %','2017-06-09 00:00:00','0000-00-00 00:00:00'),(24,'BAKERY','20%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(25,'PERSONAL CARE','10%','2017-06-09 03:00:00','2017-06-09 02:00:00'),(26,'FROZEN & CHILLED FOOD','15%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(27,'MEATS AND SEA FOODS','15%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(28,'PET CARE & FOOD','15%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(29,'FRUITS AND VEGETABLES','12%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(30,'BABY & KIDS','9%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(31,'WATCHES','13%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(32,'GROCERY','8%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(33,'FLOWERS','20%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(34,'ASSORTED JUICES','12%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(35,'FOOD','17%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(36,'ELECTRONIC ACCESSORIES ','18%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(37,'PC – DEVICES (PRINTERS & SCANNERS)','4%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(38,'ELECTRONICS – KINDLE ACCESSORIES','25%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(39,'STORAGE DEVICES (EXCEPT MEMORY CARDS & PEN DRIVES) ELECTRONICS, PC, WIRELESS','5%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(40,'EYE WEAR','17%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(41,'FASHION JEWELLERY','18%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(42,'FINE JEWELLERY STUDDED','7%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(43,'FINE JEWELLERY UNSTUDDED','4%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(44,'FURNITURE','10%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(45,'GPS DEVICES','4%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(46,'HOME – CUSHIONS & COVERS','10%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(47,'HOME IMPROVEMENT','8%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(48,'HOME SMALL APPLIANCES','3%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(49,'HOME OTHERS (EXCLUDING SMALL APPLIANCES & HOME IMPROVEMENTS)','15%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(50,'HPC – BODY SUPPORT','10%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(51,'INDOOR LIGHTENING (EXPECT LED BULBS)','10%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(52,'KITCHEN – NON-APPLIANCES','12%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(53,'LAPTOP BATTERY','12%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(54,'LAPTOPS','35','0000-00-00 00:00:00','0000-00-00 00:00:00'),(55,'LARGE APPLIANCES','5%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(56,'LAWN & GARDEN','10%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(57,'LED BULBS','8%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(58,'LUGGAGE','13%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(59,'MEDICAL EQUIPMENT','8%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(60,'MEMORY CARDS','10%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(61,'MOBILE PHONES AND TABLETS','3.5%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(62,'MODEMS AND NETWORKING DEVICES','6%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(63,'MONITORS','3%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(64,'MOVIES & MUSIC','5%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(65,'MUSICAL INSTRUMENTS','6%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(66,'NON-EDUCATIONAL SOFTWARE','10%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(67,'NURSING AND FEEDING','6%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(68,'NUTRITION','8%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(69,'OFFICE PRODUCTS','7%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(70,'PANTRY','13%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(71,'PC COMPONENTS (RAM, MOTHER BOARD)','5%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(72,'PERSONAL CARE APPLIANCES','7%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(73,'PET ACCESSORIES','10%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(74,'PET FOOD (EXPECT DOG FOOD)','5%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(75,'SELFIE STICKS','13%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(76,'SHOES','13%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(77,'SPEAKERS','4%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(78,'SPORTING GOODS','10%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(79,'TV','4%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(80,'USB FLASH DEVICES (PEN DRIVES)','8%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(81,'VIDEO GAMES','5%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(82,'VIDEO GAME – ACCESSORIES','7%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(83,'VIDEO GAME CONSOLES','4%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(84,'WALLETS & BACKPACKS','15%','0000-00-00 00:00:00','0000-00-00 00:00:00'),(85,'WARRANTY SERVICES','37%','0000-00-00 00:00:00','0000-00-00 00:00:00');
/*Table structure for table `closingfee` */
DROP TABLE IF EXISTS `closingfee`;
CREATE TABLE `closingfee` (
`closing_id` int(11) NOT NULL AUTO_INCREMENT,
`product_price` varchar(500) NOT NULL,
`closing_fee` varchar(500) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`closing_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
/*Data for the table `closingfee` */
insert into `closingfee`(`closing_id`,`product_price`,`closing_fee`,`created_at`,`updated_at`) values (1,'1000','10','2017-04-28 13:09:11','2017-04-28 13:09:11'),(2,'10000','20','2017-04-28 13:09:25','2017-04-28 13:09:25'),(4,'100000','30','2017-04-28 13:11:17','2017-04-28 13:11:17');
/*Table structure for table `contactus` */
DROP TABLE IF EXISTS `contactus`;
CREATE TABLE `contactus` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`first_name` varchar(200) COLLATE utf8_bin NOT NULL,
`last_name` varchar(200) COLLATE utf8_bin NOT NULL,
`email` varchar(200) COLLATE utf8_bin NOT NULL,
`phone_number` varchar(200) COLLATE utf8_bin NOT NULL,
`message` varchar(500) COLLATE utf8_bin NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*Data for the table `contactus` */
insert into `contactus`(`id`,`first_name`,`last_name`,`email`,`phone_number`,`message`,`created_at`,`updated_at`) values (1,'raghava','charee','<EMAIL>','7788996633','hai','2017-05-26 08:19:48','2017-05-26 08:19:48'),(2,'charee','charee','<EMAIL>','7788996633','haii','2017-05-26 08:21:03','2017-05-26 08:21:03'),(4,'raghava','charee','<EMAIL>','7788996633','fdfdf','2017-05-26 09:55:46','2017-05-26 09:55:46'),(5,'charee','chree','<EMAIL>','7894561230','haian','2017-05-29 12:34:34','2017-05-29 12:34:34'),(6,'blog','blog','<EMAIL>','9966332211','hai','2017-05-29 12:35:52','2017-05-29 12:35:52');
/*Table structure for table `customer_payments` */
DROP TABLE IF EXISTS `customer_payments`;
CREATE TABLE `customer_payments` (
`customer_payment_id` int(11) NOT NULL AUTO_INCREMENT,
`order_id` int(11) NOT NULL,
`customer_name` varchar(250) NOT NULL,
`trans_id` varchar(50) NOT NULL,
`amount` int(11) NOT NULL,
`date_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`status` varchar(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`customer_payment_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
/*Data for the table `customer_payments` */
insert into `customer_payments`(`customer_payment_id`,`order_id`,`customer_name`,`trans_id`,`amount`,`date_time`,`status`,`created_at`,`updated_at`) values (2,5,'fsf f','7789654123',700,'2017-03-27 14:22:27','1','2017-03-02 10:44:57','2017-03-25 09:40:59');
/*Table structure for table `deliveryboy` */
DROP TABLE IF EXISTS `deliveryboy`;
CREATE TABLE `deliveryboy` (
`deliveryboy_id` int(11) NOT NULL AUTO_INCREMENT,
`deliveryboy_name` varchar(20) NOT NULL,
`deliveryboy_email` varchar(50) NOT NULL,
`deliveryboy_mobile` varchar(20) NOT NULL,
`deliveryboy_alternateno` varchar(50) NOT NULL,
`deliveryboy_password` varchar(60) NOT NULL,
`deliveryboy_address` text NOT NULL,
`deliveryboy_bike` varchar(250) NOT NULL,
`deliveryboy_bikeno` varchar(100) NOT NULL,
`deliveryboy_license` varchar(250) NOT NULL,
`deliveryboy_adhar` varchar(250) NOT NULL,
`deliveryboy_bank` varchar(250) NOT NULL,
`deliveryboy_photo` varchar(250) NOT NULL,
`status` int(11) NOT NULL DEFAULT '0',
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`deliveryboy_id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;
/*Data for the table `deliveryboy` */
insert into `deliveryboy`(`deliveryboy_id`,`deliveryboy_name`,`deliveryboy_email`,`deliveryboy_mobile`,`deliveryboy_alternateno`,`deliveryboy_password`,`deliveryboy_address`,`deliveryboy_bike`,`deliveryboy_bikeno`,`deliveryboy_license`,`deliveryboy_adhar`,`deliveryboy_bank`,`deliveryboy_photo`,`status`,`created_at`,`updated_at`) values (3,'test','<EMAIL>','9632256455','7789541123','<PASSWORD>','kpkb','2589','36987','852369','','','Hydrangeas3.jpg',1,'2017-03-16 13:57:59','2017-03-24 13:09:14'),(6,'boy','<EMAIL>','8852369412','9125563250','a65f25e7edede6decceceeb708473398','kpkb','boy5','gdrr','35444','','','Lighthouse.jpg',1,'2017-03-18 06:03:32','2017-03-24 13:16:38'),(8,'xcsdfsf','smail.comfsdgfd@g','8523654656','9963258741','4a8bc6b09c0980dae11abbdbd9e2cbc8','xzdfdsf','sfsdf','36987','852369','','','Koala.jpg',1,'2017-03-20 09:48:52','2017-03-25 06:19:50'),(9,'addfsfs','<EMAIL>','9632256455','','094fd12ec6f81b82a379ca8fcf795466','gfcfgdgfdt','2589','36987','fgdf','','','Chrysanthemum1.jpg',1,'2017-03-20 09:51:08','2017-03-20 09:51:08'),(10,'aedfffgdfgfhfg','<EMAIL>','9632256455','','c8d278dd28e1c4ac23774d004bce1d74','gfcfgdgfdt','2589','7896523','852369','','','Desert.jpg',1,'2017-03-21 10:47:31','2017-03-21 10:47:31'),(11,'sdsfjvgg','<EMAIL>','9632256455','','fc7588193f4e8e5b919d203d2734c58b','gfcfgdgfdt','2589','679002345','852369','','','Hydrangeas2.jpg',1,'2017-03-21 10:58:39','2017-03-21 10:58:39'),(12,'sample boy1','<EMAIL>','9160090122','','c74995fdfa9b4e8a6ba1ba3abdc91d4c','pragathi nagar','yamaha','TS 01hh 9856','apjh55541ooH45','','','Penguins.jpg',1,'2017-03-22 08:08:26','2017-03-25 06:13:25'),(13,'boysample','<EMAIL>','8852369741','9632587419','540c49c539dea7f69491fecfa988b9c7','pragathi nagar','boy','85236','852369','','','Lighthouse2.jpg',0,'2017-03-24 11:15:21','2017-03-24 11:15:21'),(14,'Ramesh','<EMAIL>','9856612522','9987452121','fdf3ab3292c26a4a3a480c0b41bc7a3f','S R nagar','Yamaha','TS 09 BV 8541','APFGRTBHD1250','','','jerkin.jpg',0,'2017-03-25 06:10:04','2017-03-25 06:10:04'),(15,'Glastin','<EMAIL>','8458845122','4585512588','a3d3a23c14c3f6abd6b183242ef2c425','shamshabad','Yamaha- FZ','TS 12 HH 9899','TGFVBJCD45235','','','Agile.jpg',1,'2017-03-25 06:42:46','2017-03-25 06:42:46');
/*Table structure for table `kyc_reports` */
DROP TABLE IF EXISTS `kyc_reports`;
CREATE TABLE `kyc_reports` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`seller_id` int(11) NOT NULL,
`file_name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;
/*Data for the table `kyc_reports` */
insert into `kyc_reports`(`id`,`seller_id`,`file_name`) values (1,8,'report_1042162850.xlsx'),(2,8,'report_10421628501.xlsx'),(3,8,'report_1009127829.png'),(4,8,'report_1009127829.jpg'),(5,8,'report_660468166.jpg'),(6,8,'U'),(7,8,'U'),(8,8,'U'),(9,8,'U'),(10,8,'U'),(11,8,'report_348882407.png'),(12,8,'report_1218162651.png'),(13,1,'i');
/*Table structure for table `locations` */
DROP TABLE IF EXISTS `locations`;
CREATE TABLE `locations` (
`location_id` int(11) NOT NULL AUTO_INCREMENT,
`location_name` varchar(500) NOT NULL,
`status` int(11) NOT NULL,
PRIMARY KEY (`location_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
/*Data for the table `locations` */
insert into `locations`(`location_id`,`location_name`,`status`) values (1,'Kphb',1),(2,'Kukatpally',1),(3,'Miyapur',1),(4,'Ameerpet',1);
/*Table structure for table `orders` */
DROP TABLE IF EXISTS `orders`;
CREATE TABLE `orders` (
`order_id` int(11) NOT NULL AUTO_INCREMENT,
`item_id` int(11) NOT NULL,
`seller_id` int(11) NOT NULL,
`product_name` varchar(250) NOT NULL,
`order_price` varchar(500) NOT NULL,
`delivery_date` date NOT NULL,
`delivery_time` time NOT NULL,
`customer_name` varchar(100) NOT NULL,
`customer_email` varchar(100) NOT NULL,
`customer_phone` varchar(100) NOT NULL,
`customer_address` text NOT NULL,
`order_status` int(11) DEFAULT '0',
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
/*Data for the table `orders` */
insert into `orders`(`order_id`,`item_id`,`seller_id`,`product_name`,`order_price`,`delivery_date`,`delivery_time`,`customer_name`,`customer_email`,`customer_phone`,`customer_address`,`order_status`,`created_at`,`updated_at`) values (3,0,8,'food','','2017-03-01','10:48:55','test','<EMAIL>','8896325147','ddsdfsdfsf',0,'2017-05-02 06:14:00','2017-03-22 14:52:49'),(4,0,8,'phone','','2017-03-02','05:37:56','dddsd','<EMAIL>','7789632541','fhg hgh hghjgg hghjghj hgh',0,'2017-04-05 08:08:00','2017-03-02 08:36:54'),(5,0,8,'moile','','2017-03-01','08:40:55','bcgc','<EMAIL>','89963255','dfvdfg',0,'2017-04-19 10:11:00','2017-03-30 00:00:00'),(6,0,8,'grocery','','2017-03-01','07:40:58','gggjgj','<EMAIL>','8896325417','jhjjh hgjhguy',1,'2017-05-05 00:00:00','2017-03-24 00:00:00'),(7,0,28,'hghgfg','','2017-03-01','04:33:49','yuiuiu','j','thtr','htrhtr',2,'2017-05-05 00:00:00','0000-00-00 00:00:00'),(9,0,28,'hgjgh','','2017-05-09','04:19:00','raghava','kitgutyu','yutyuty','gvjjghjgh',0,'2017-04-21 00:00:00','2017-05-03 00:15:00');
/*Table structure for table `payments` */
DROP TABLE IF EXISTS `payments`;
CREATE TABLE `payments` (
`payment_id` int(11) NOT NULL AUTO_INCREMENT,
`order_id` int(11) NOT NULL,
`customer_name` varchar(250) NOT NULL,
`trans_id` varchar(50) NOT NULL,
`amount` int(11) NOT NULL,
`date_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`status` varchar(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`payment_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*Data for the table `payments` */
insert into `payments`(`payment_id`,`order_id`,`customer_name`,`trans_id`,`amount`,`date_time`,`status`,`created_at`,`updated_at`) values (1,5,'test','1213232e34434',100,'2017-03-24 17:13:20','1','2017-03-15 10:51:54','2017-03-08 09:46:51');
/*Table structure for table `products` */
DROP TABLE IF EXISTS `products`;
CREATE TABLE `products` (
`item_id` int(11) NOT NULL AUTO_INCREMENT,
`seller_id` int(11) NOT NULL,
`seller_subcategory_id` int(11) NOT NULL,
`category_id` int(11) NOT NULL,
`subcategory_id` int(11) NOT NULL,
`subitem_id` int(11) NOT NULL,
`item_name` varchar(500) NOT NULL,
`item_code` varchar(250) NOT NULL,
`item_description` text NOT NULL,
`item_quantity` int(11) NOT NULL,
`item_cost` varchar(500) NOT NULL,
`item_image` varchar(500) NOT NULL,
`item_status` int(11) NOT NULL,
`admin_status` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`item_id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;
/*Data for the table `products` */
insert into `products`(`item_id`,`seller_id`,`seller_subcategory_id`,`category_id`,`subcategory_id`,`subitem_id`,`item_name`,`item_code`,`item_description`,`item_quantity`,`item_cost`,`item_image`,`item_status`,`admin_status`) values (1,8,0,1,1,0,'Manchurian','12345','sfsdfs efsdf',3,'100','',1,1),(2,6,0,1,1,0,'Noodles','5678','sdfd dfsdf',200,'300','sesame-noodles2.jpg',1,0),(3,8,0,3,12,0,'Samsung j7','45678','grtg grgrtgr',6,'12000','Samsung-J7.jpg',1,0),(4,8,0,2,16,0,'Casual Shirt','5678','dvfdg fgfgf f gf',7,'800','download.jpg',1,0),(5,8,0,3,12,0,'micromax','4567','fdgdfg',5,'700','Penguins3.jpg',1,0),(6,8,0,1,3,0,'<NAME>','5678','fghfghfgh',6,'300','images.jpg',1,1),(7,8,0,1,3,0,'<NAME>','8984','hgfhgf',8,'290','download_(1).jpg',1,0),(9,8,12,13,15,0,'online books','17','ftrgrtrf',23,'125','gtaarta',25,56),(10,8,0,2,16,0,'Coat','456987','sggdfg fgfgdf dfg gf',3,'950','coat1.jpg',1,0),(11,8,0,3,12,0,'Iphone 5s','54345453455','fgd fgdfgfgdfg dfgdfgdfg',7,'20000','SDL221198048_1.jpg',1,0),(12,8,0,5,9,0,'php book','0001','rtgre',1,'99','coat1.jpg',1,1),(13,8,0,5,9,0,'books','235','yuhjy',1,'99','images_(1).jpg',1,0),(14,8,0,1,2,0,'some','5221','jhdjsdsd',1,'99','bg1.jpg',1,0),(15,36,0,0,0,0,'','','',0,'','',0,0),(16,8,0,1,1,1,'some','021','hai',1,'50','013cf270-e9eb-45e1-8e3b-a9495843eb2e.jpg',1,0),(17,8,0,1,2,2,'versionone','123','hhaa',2,'520','531b43a798a6a64da8929b669dd25fc3.png',1,0),(18,1,0,1,1,1,'test1','1123','testing',2,'32','images1.jpg',1,0),(19,1,0,1,2,2,'test12','testing','ntg',3,'52','late-birthday-wishes.jpg',1,0),(20,1,0,2,3,0,'ntg','4','just',5,'65','IMG_15052017_195704_0.png',1,0),(21,1,0,2,4,0,'high','1234321','likethat',8,'9876','wait.jpg',1,0),(22,1,0,3,7,0,'rgsfg','5656','fgdfgsd',6,'4','IMG_15052017_195704_01.png',1,0),(23,1,0,5,12,0,'dfasdf','erwe','',5,'45','images_(1).jpg',1,0),(24,1,0,4,8,0,'55','5','',5,'5','images_(1)1.jpg',1,0),(25,53,0,2,3,0,'44','33','testing',3,'33','images2.jpg',1,0),(26,53,0,2,4,0,'112','2','likethat',2,'44','IMG_15052017_195704_02.png',1,0),(27,53,0,1,1,1,'3','33','likethat',3,'56','late-birthday-wishes1.jpg',1,0),(28,53,0,3,6,0,'hjh','56','56546',65,'65','images_(1)2.jpg',1,0),(29,53,0,0,0,0,'','','',0,'','',0,0);
/*Table structure for table `promotions` */
DROP TABLE IF EXISTS `promotions`;
CREATE TABLE `promotions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`first_name` varchar(250) COLLATE utf8_bin NOT NULL,
`email` varchar(250) COLLATE utf8_bin NOT NULL,
`phone_number` varchar(250) COLLATE utf8_bin NOT NULL,
`message` varchar(250) COLLATE utf8_bin NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*Data for the table `promotions` */
insert into `promotions`(`id`,`first_name`,`email`,`phone_number`,`message`,`created_at`,`updated_at`) values (1,'raghava','<EMAIL>','9966332211','dummy content','2017-06-09 11:32:33','2017-06-09 11:32:33');
/*Table structure for table `referral_fee` */
DROP TABLE IF EXISTS `referral_fee`;
CREATE TABLE `referral_fee` (
`referral_fee_id` int(11) NOT NULL AUTO_INCREMENT,
`category_id` int(11) NOT NULL,
`subcategory_id` int(11) NOT NULL,
`referral_fee` varchar(500) NOT NULL,
PRIMARY KEY (`referral_fee_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
/*Data for the table `referral_fee` */
insert into `referral_fee`(`referral_fee_id`,`category_id`,`subcategory_id`,`referral_fee`) values (1,1,1,'10%'),(2,1,3,'12%'),(3,2,11,'13%'),(5,3,6,'9%'),(6,3,12,'15%'),(7,3,13,'15%'),(8,4,14,'10%'),(9,4,15,'12%'),(10,2,16,'15%');
/*Table structure for table `request_for_services` */
DROP TABLE IF EXISTS `request_for_services`;
CREATE TABLE `request_for_services` (
`service_id` int(11) NOT NULL AUTO_INCREMENT,
`seller_id` int(11) NOT NULL,
`seller_name` varchar(500) COLLATE utf8_bin NOT NULL,
`phone_number` varchar(500) COLLATE utf8_bin NOT NULL,
`select_plan` varchar(500) COLLATE utf8_bin NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`service_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*Data for the table `request_for_services` */
insert into `request_for_services`(`service_id`,`seller_id`,`seller_name`,`phone_number`,`select_plan`,`created_at`,`updated_at`) values (1,8,'charee','8985258562','Both','2017-06-10 09:10:16','2017-06-10 09:10:16'),(2,8,'charee','8985258562','Inventory management','2017-06-10 11:14:48','2017-06-10 11:14:48'),(3,69,'yuryuty','4346563356356534563565666666666666666666','Inventory management','2017-06-15 11:20:45','2017-06-15 11:20:45'),(4,69,'yuryuty','5463456345','Both','2017-06-15 12:13:48','2017-06-15 12:13:48');
/*Table structure for table `seller_all_notifications` */
DROP TABLE IF EXISTS `seller_all_notifications`;
CREATE TABLE `seller_all_notifications` (
`id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*Data for the table `seller_all_notifications` */
/*Table structure for table `seller_basic_details` */
DROP TABLE IF EXISTS `seller_basic_details`;
CREATE TABLE `seller_basic_details` (
`seller_basic_id` int(11) NOT NULL AUTO_INCREMENT,
`seller_id` int(11) NOT NULL,
`seller_name` varchar(200) COLLATE utf8_bin NOT NULL,
`seller_address` varchar(200) COLLATE utf8_bin NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`seller_basic_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*Data for the table `seller_basic_details` */
insert into `seller_basic_details`(`seller_basic_id`,`seller_id`,`seller_name`,`seller_address`,`created_at`,`updated_at`) values (1,8,'raghava','kphb','0000-00-00 00:00:00','0000-00-00 00:00:00');
/*Table structure for table `seller_categories` */
DROP TABLE IF EXISTS `seller_categories`;
CREATE TABLE `seller_categories` (
`seller_cat_id` int(11) NOT NULL AUTO_INCREMENT,
`seller_id` int(11) NOT NULL,
`seller_category_id` int(11) NOT NULL,
`category_name` varchar(250) COLLATE utf8_bin DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`seller_cat_id`)
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*Data for the table `seller_categories` */
insert into `seller_categories`(`seller_cat_id`,`seller_id`,`seller_category_id`,`category_name`,`created_at`,`updated_at`) values (1,8,1,NULL,'2017-06-04 15:24:50','2017-06-04 15:24:50'),(2,8,2,NULL,'2017-06-04 15:28:01','2017-06-04 15:28:01'),(4,8,3,NULL,'2017-06-06 04:26:57','2017-06-06 04:26:57'),(7,8,4,NULL,'2017-06-08 07:55:06','2017-06-08 07:55:06'),(8,0,1,NULL,'0000-00-00 00:00:00','0000-00-00 00:00:00'),(9,0,5,NULL,'0000-00-00 00:00:00','0000-00-00 00:00:00'),(10,0,4,NULL,'0000-00-00 00:00:00','0000-00-00 00:00:00'),(11,0,2,NULL,'2017-06-14 11:50:05','2017-06-14 11:50:05'),(12,0,2,NULL,'2017-06-14 12:00:11','2017-06-14 12:00:11'),(13,0,5,NULL,'2017-06-14 12:00:11','2017-06-14 12:00:11'),(16,65,3,NULL,'2017-06-14 12:08:52','2017-06-14 12:08:52'),(17,65,0,NULL,'2017-06-14 12:08:52','2017-06-14 12:08:52'),(18,65,2,NULL,'2017-06-14 12:10:33','2017-06-14 12:10:33'),(19,65,2,NULL,'2017-06-14 12:33:46','2017-06-14 12:33:46'),(20,65,2,NULL,'2017-06-14 12:38:49','2017-06-14 12:38:49'),(21,66,2,NULL,'2017-06-14 07:40:55','2017-06-14 07:40:55'),(22,67,2,NULL,'2017-06-15 07:13:47','2017-06-15 07:13:47'),(23,67,5,NULL,'2017-06-15 07:13:47','2017-06-15 07:13:47'),(24,67,1,NULL,'2017-06-15 07:37:31','2017-06-15 07:37:31'),(25,67,6,NULL,'2017-06-15 07:37:32','2017-06-15 07:37:32'),(26,68,2,NULL,'2017-06-15 07:48:09','2017-06-15 07:48:09'),(27,68,6,NULL,'2017-06-15 07:48:09','2017-06-15 07:48:09'),(47,71,1,'Books','2017-06-16 01:02:30','2017-06-16 01:02:30'),(48,71,7,'gaming','2017-06-16 01:02:30','2017-06-16 01:02:30'),(49,71,6,'Category','2017-06-16 01:02:30','2017-06-16 01:02:30'),(50,73,5,'Grocery','2017-06-16 01:05:12','2017-06-16 01:05:12'),(51,73,7,'gaming','2017-06-16 01:05:51','2017-06-16 01:05:51'),(53,73,2,'Electronics','2017-06-16 01:05:51','2017-06-16 01:05:51');
/*Table structure for table `seller_lists` */
DROP TABLE IF EXISTS `seller_lists`;
CREATE TABLE `seller_lists` (
`seller_list_id` int(11) NOT NULL AUTO_INCREMENT,
`seller_id` int(11) NOT NULL,
`category_id` int(11) NOT NULL,
`subcategory_id` int(11) NOT NULL,
`subitem_id` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`seller_list_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*Data for the table `seller_lists` */
/*Table structure for table `seller_payments` */
DROP TABLE IF EXISTS `seller_payments`;
CREATE TABLE `seller_payments` (
`seller_payment_id` int(11) NOT NULL AUTO_INCREMENT,
`seller_id` int(11) NOT NULL,
`order_id` varchar(500) NOT NULL,
`cih_comission` varchar(500) NOT NULL,
`net_profit` varchar(500) NOT NULL,
`order_amount` varchar(500) NOT NULL,
`amount_status` int(11) NOT NULL DEFAULT '0',
`invoice` varchar(500) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`seller_payment_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*Data for the table `seller_payments` */
insert into `seller_payments`(`seller_payment_id`,`seller_id`,`order_id`,`cih_comission`,`net_profit`,`order_amount`,`amount_status`,`invoice`,`created_at`,`updated_at`) values (1,8,'6','2344','8%','1000',0,'19-apr-20172.xlsx','2017-05-05 09:13:40','2017-05-05 09:25:44');
/*Table structure for table `seller_personal_details` */
DROP TABLE IF EXISTS `seller_personal_details`;
CREATE TABLE `seller_personal_details` (
`seller_personal_id` int(11) NOT NULL AUTO_INCREMENT,
`seller_id` int(11) NOT NULL,
`seller_bank_account` varchar(250) COLLATE utf8_bin NOT NULL,
`seller_adhar` varchar(250) COLLATE utf8_bin NOT NULL,
`seller_pan_card` varchar(250) COLLATE utf8_bin NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`seller_personal_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*Data for the table `seller_personal_details` */
insert into `seller_personal_details`(`seller_personal_id`,`seller_id`,`seller_bank_account`,`seller_adhar`,`seller_pan_card`,`created_at`,`updated_at`) values (4,8,'20157138501','','12345678918','2017-06-05 11:59:56','2017-06-05 11:59:56'),(5,8,'20157138204','123456789','1234567891','2017-06-10 09:55:34','2017-06-10 09:55:34'),(6,8,'20157138204','101010101010','1010101010101','2017-06-10 11:33:40','2017-06-10 11:33:40'),(7,8,'20157138204','101010101010','1010101010101','2017-06-10 11:45:05','2017-06-10 11:45:05'),(8,8,'65645645','45455434','34343435434','0000-00-00 00:00:00','0000-00-00 00:00:00');
/*Table structure for table `seller_request` */
DROP TABLE IF EXISTS `seller_request`;
CREATE TABLE `seller_request` (
`seller_request_id` int(11) NOT NULL AUTO_INCREMENT,
`seller_id` int(11) NOT NULL,
`message` varchar(500) COLLATE utf8_bin NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`seller_request_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*Data for the table `seller_request` */
insert into `seller_request`(`seller_request_id`,`seller_id`,`message`,`created_at`,`updated_at`) values (1,8,'hai','2017-05-31 13:15:22','2017-05-31 13:15:22'),(2,8,'hello sir','2017-05-31 13:15:45','2017-05-31 13:15:45'),(3,28,'You should check the $result construction code. you are not setting $result properly.','2017-06-01 13:54:26','2017-05-31 13:54:26'),(4,28,'hai sir please send me ur mobile number','2017-05-31 19:35:38','2017-05-31 19:35:38'),(5,8,'please change your password for securty purpose','2017-06-02 09:08:28','2017-06-02 09:08:28'),(6,52,'gyty','0000-00-00 00:00:00','0000-00-00 00:00:00');
/*Table structure for table `seller_store_details` */
DROP TABLE IF EXISTS `seller_store_details`;
CREATE TABLE `seller_store_details` (
`seller_store_details_id` int(11) NOT NULL AUTO_INCREMENT,
`seller_id` int(11) DEFAULT NULL,
`store_name` varchar(250) COLLATE utf8_bin DEFAULT NULL,
`addrees1` varchar(250) COLLATE utf8_bin DEFAULT NULL,
`addrees2` varchar(250) COLLATE utf8_bin DEFAULT NULL,
`pin_code` varchar(250) COLLATE utf8_bin DEFAULT NULL,
`other_shops` varchar(500) COLLATE utf8_bin DEFAULT NULL,
`other_shops_location` varchar(500) COLLATE utf8_bin DEFAULT NULL,
`deliveryes` int(11) DEFAULT NULL,
`weblink` varchar(250) COLLATE utf8_bin DEFAULT NULL,
`tin_vat` varchar(250) COLLATE utf8_bin DEFAULT NULL,
`tinvatimage` varchar(250) COLLATE utf8_bin DEFAULT NULL,
`tan` varchar(250) COLLATE utf8_bin DEFAULT NULL,
`tanimage` varchar(250) COLLATE utf8_bin DEFAULT NULL,
`cst` varchar(250) COLLATE utf8_bin DEFAULT NULL,
`cstimage` varchar(250) COLLATE utf8_bin DEFAULT NULL,
`gstin` varchar(250) COLLATE utf8_bin DEFAULT NULL,
`created_at` datetime NOT NULL,
PRIMARY KEY (`seller_store_details_id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*Data for the table `seller_store_details` */
insert into `seller_store_details`(`seller_store_details_id`,`seller_id`,`store_name`,`addrees1`,`addrees2`,`pin_code`,`other_shops`,`other_shops_location`,`deliveryes`,`weblink`,`tin_vat`,`tinvatimage`,`tan`,`tanimage`,`cst`,`cstimage`,`gstin`,`created_at`) values (3,8,'tgggf','no',NULL,NULL,'','none',NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2017-06-05 13:06:20'),(4,1,'','test',NULL,NULL,'10-10','kkr',NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2017-06-12 17:13:48'),(5,66,'dfasd','fasdfasd','fdfasdf','52345435','dfsdfa','rewerqwer',1,'reqwerer','erqwer','AutoTPA Document.docx','erqewr','AutoTPA Site Flows & Issues. 6.6.17.docx','rqwerqwe','Autotpadeveloperdocument.docx','45errwer','2017-06-14 19:47:46'),(6,67,'ty','6','6','67677766','','',1,'urytu','yurty','cart_new.sql','yuyur','','yurtyu','','yurty','2017-06-15 07:18:17'),(7,67,'67','776','ghf','67567566','h','fghf',1,'gh','gfh','','ghfg','','gfh','cart_new.sql','ghfg','2017-06-15 07:19:26'),(8,67,'67767','6776','767','76766776','yury','ytu',1,'yur','u','','yuryu','','uryt','','yuryu','2017-06-15 07:20:30'),(9,67,'65','56','65','65655656','6','6',1,'6','56','cart_new.sql','56','','56','','56','2017-06-15 07:21:08'),(10,67,'676','76','67','76677767','fghfg','gh',1,'gh','hg','AutoTPA Document.docx','bn','','ghg','','ghgf','2017-06-15 07:26:23'),(11,67,'787','785678','67766767','67766776','7667','77',1,'7','76','AutoTPA Document.docx','67','','67','AutoTPA Document.docx','67','2017-06-15 07:30:55'),(12,67,'56','ghfg','ghdg','676776','ghfgh','gfhf',1,'ghdfg','ghfg','AutoTPA Document.docx','yrty','','tyrty','','tyrte','2017-06-15 07:38:56'),(13,68,'testing56554','hj.fgdf','fhgjkhdjfhj','234566','ghd','ghfgdh',1,'ghfghtyty','tyt','AutoTPA Document.docx','yrty65','','dfgdf','','fgsdfg','2017-06-15 07:49:33'),(14,69,'jhh','hjfg','hjfg','675677','gh','jhg',1,'hjf','hjfgh','AutoTPA Document.docx','ghjfg','AutoTPA Site Flows & Issues. 6.6.17.docx','hjfgh','Autotpadeveloperdocument.docx','ghjg','2017-06-15 09:11:33'),(15,70,'fgsdfg','fdg','gfsdfg','566656','','',1,'ghdfgh','dfgh','','gfdhd','','fghdfh','','fghfd','2017-06-15 09:30:33'),(16,71,'vasudeva','reyerty','tryert','554546','','tyetry',1,'tyerty','ghdfgh','Mike Sprint 1 & 2 Issues. 5.30.17.docx','tyerty','AutoTPA Site Flows & Issues. 6.6.17.docx','ertyrty','Autotpadeveloperdocument.docx','rty','2017-06-16 11:25:56');
/*Table structure for table `selleradmin_users` */
DROP TABLE IF EXISTS `selleradmin_users`;
CREATE TABLE `selleradmin_users` (
`selleradmin_id` int(11) NOT NULL AUTO_INCREMENT,
`selleradmin_name` varchar(250) NOT NULL,
`selleradmin_password` varchar(250) NOT NULL,
`selleradmin_email` varchar(250) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`selleradmin_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
/*Data for the table `selleradmin_users` */
insert into `selleradmin_users`(`selleradmin_id`,`selleradmin_name`,`selleradmin_password`,`selleradmin_email`,`created_at`,`updated_at`) values (1,'admin','admin','<EMAIL>','2016-09-30 12:37:45','2016-09-30 13:22:48'),(2,'kiran','<PASSWORD>','<EMAIL>','0000-00-00 00:00:00','0000-00-00 00:00:00');
/*Table structure for table `sellers` */
DROP TABLE IF EXISTS `sellers`;
CREATE TABLE `sellers` (
`seller_id` int(11) NOT NULL AUTO_INCREMENT,
`seller_rand_id` varchar(200) NOT NULL,
`seller_name` varchar(20) NOT NULL,
`seller_email` varchar(50) NOT NULL,
`seller_address` varchar(500) NOT NULL,
`seller_mobile` bigint(20) NOT NULL,
`seller_password` varchar(60) NOT NULL,
`password_status` varchar(250) NOT NULL,
`seller_bank_account` varchar(250) DEFAULT NULL,
`seller_pan_card` varchar(250) DEFAULT NULL,
`seller_adhar` varchar(250) DEFAULT NULL,
`first_time` int(11) DEFAULT '0',
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`seller_id`)
) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=latin1;
/*Data for the table `sellers` */
insert into `sellers`(`seller_id`,`seller_rand_id`,`seller_name`,`seller_email`,`seller_address`,`seller_mobile`,`seller_password`,`password_status`,`seller_bank_account`,`seller_pan_card`,`seller_adhar`,`first_time`,`created_at`,`updated_at`) values (1,'0','vasudevareddy','<EMAIL>','<EMAIL>',7789654123,'64c9ac2bb5fe46c3ac32844bb97be6bc','',NULL,NULL,NULL,1,'2017-06-12 17:13:21','2017-06-12 17:13:21'),(3,'0','Rakesh','<EMAIL>','',9160090122,'827CCB0EEA8A706C4C34A16891F84E7B','',NULL,NULL,NULL,0,'2017-03-24 13:00:56','2017-03-25 05:09:22'),(4,'0','sandeep','<EMAIL>','',9160090122,'a3d3a23c14c3f6abd6b183242ef2c425','',NULL,NULL,NULL,0,'2017-03-25 05:25:09','2017-03-25 05:25:09'),(8,'SEL394523','charee','<EMAIL>','kphb',7097919454,'e10adc3949ba59abbe56e057f20f883e','0',NULL,NULL,NULL,0,'2017-06-08 11:25:46','2017-06-08 11:25:46'),(36,'676289','boy','<EMAIL>','',7095235504,'5d529761dc52fd42c154a365dbb67552','',NULL,NULL,NULL,0,'2017-06-01 12:05:51','2017-06-01 12:05:51'),(50,'SEL997636','','','',9494422779,'ab3a04f203c699c751e14f59632abb10','0',NULL,NULL,NULL,0,'2017-06-08 08:57:13','2017-06-08 08:57:13'),(51,'SEL388200','','','',8985258562,'24877958a75e165a4012c6627fb8b652','0',NULL,NULL,NULL,0,'2017-06-12 07:44:18','2017-06-12 07:44:18'),(52,'SEL617492','','','',8500050944,'e10adc3949ba59abbe56e057f20f883e','0',NULL,NULL,NULL,0,'2017-06-12 17:12:54','2017-06-12 17:12:54'),(53,'SEL105629','','','',3214569870,'e10adc3949ba59abbe56e057f20f883e','0',NULL,NULL,NULL,0,'2017-06-13 04:25:42','2017-06-13 04:25:42'),(54,'SEL280735','','','',9696969696,'e10adc3949ba59abbe56e057f20f883e','0',NULL,NULL,NULL,0,'2017-06-13 11:36:56','2017-06-13 11:36:56'),(55,'SEL439996','','','',8585858585,'35c76363da1466a0a032f20bb4bcdb0b','0',NULL,NULL,NULL,0,'2017-06-13 11:43:40','2017-06-13 11:43:40'),(56,'SEL504333','','','',8985543855,'01ae7ee32b4a96ccf18b1d3e540d2446','0',NULL,NULL,NULL,0,'2017-06-13 18:34:05','2017-06-13 18:34:05'),(57,'SEL108416','','','',8019345212,'957253f3ce261ee4a0a3cfeb77afd471','0',NULL,NULL,NULL,0,'2017-06-14 08:07:31','2017-06-14 08:07:31'),(58,'SEL158653','','','',6574567456,'8032212700eea147ae8f1801ce47e888','0',NULL,NULL,NULL,0,'2017-06-14 11:05:27','2017-06-14 11:05:27'),(59,'SEL708195','','','',6346345634,'00764cd6bc5ba87940871af9d8690321','0',NULL,NULL,NULL,0,'2017-06-14 11:06:50','2017-06-14 11:06:50'),(60,'SEL834248','','','',6745674567,'35a649899f2c9879ac9021a46a32449e','0',NULL,NULL,NULL,0,'2017-06-14 11:07:30','2017-06-14 11:07:30'),(61,'SEL147775','','','',5675674674,'71a0de8655374ccd3f0435a318ba58cd','0',NULL,NULL,NULL,0,'2017-06-14 11:40:08','2017-06-14 11:40:08'),(62,'SEL160919','','','',4524352345,'973686049de52e8b7c76ea8e9275dc4c','0',NULL,NULL,NULL,0,'2017-06-14 11:44:15','2017-06-14 11:44:15'),(63,'SEL772761','','','',5634563565,'22e9b282b624d228ba97475615b3ddf3','0',NULL,NULL,NULL,0,'2017-06-14 11:45:13','2017-06-14 11:45:13'),(64,'SEL517406','','','',5745674564,'7611723cce3ad6b2815ecc3f180a0f1c','0',NULL,NULL,NULL,0,'2017-06-14 11:55:06','2017-06-14 11:55:06'),(65,'SEL211968','yurtyuty','<EMAIL>','fdfhfghdfg',5745674567,'7907c7ee8a3b14249e64d0959e3c51ae','0','jkgjkghj','667456756','75676745674567456',0,'2017-06-14 12:28:10','2017-06-14 12:28:10'),(66,'SEL606435','vzfgsdfg','<EMAIL>','<PASSWORD>',4352345235,'96b3a768570e60af3f403bc5b941eb7b','0','dfasdf','fgsdfgsdg','123456789087',0,'2017-06-14 19:48:33','2017-06-14 19:48:33'),(67,'SEL918097','testing','<EMAIL>','likethat',5446446545,'02c1dcef75ec66267c7c53b518f0a47e','0','sbi mydukur','tst','123456789009',0,'2017-06-15 07:41:13','2017-06-15 07:41:13'),(68,'SEL515837','vasu','<EMAIL>','testing',3453434434,'e10adc3949ba59abbe56e057f20f883e','0','6786856867867','7876','7856787857878',1,'2017-06-15 07:57:50','2017-06-15 07:57:50'),(69,'SEL358314','yuryutyfdgfdg','<EMAIL>','hdfhdfghdff',6545675674,'e10adc3949ba59abbe56e057f20f883e','0','785675867867','7ityui','123456789090',1,'2017-06-15 09:11:50','2017-06-15 09:11:50'),(70,'SEL197679','6756','<EMAIL>','fgfdg',6767657567,'e10adc3949ba59abbe56e057f20f883e','0','756376767676756','7546gf','65676575676576',1,'2017-06-15 09:31:06','2017-06-15 09:31:06'),(71,'SEL571419','trye','<EMAIL>','rtyrtey',5634643564,'e10adc3949ba59abbe56e057f20f883e','0','746757476746767','746747','45674674674676754',1,'2017-06-15 09:39:57','2017-06-15 09:39:57'),(72,'SEL501919','','','',6746756746,'b54d197c5b953cb617dc2cb488620a7e','0',NULL,NULL,NULL,0,'2017-06-15 12:26:19','2017-06-15 12:26:19'),(73,'SEL915193','785678','<EMAIL>','gjhghgrwe',5654635634,'e7c6bbcef3264132e87965873196cddd','0',NULL,NULL,NULL,0,'2017-06-16 13:04:32','2017-06-16 13:04:32');
/*Table structure for table `servicefee` */
DROP TABLE IF EXISTS `servicefee`;
CREATE TABLE `servicefee` (
`service_id` int(11) NOT NULL AUTO_INCREMENT,
`service_fee` varchar(500) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`service_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*Data for the table `servicefee` */
insert into `servicefee`(`service_id`,`service_fee`,`created_at`,`updated_at`) values (1,'1.3%','2017-04-28 13:33:38','2017-04-28 13:33:38');
/*Table structure for table `shipping` */
DROP TABLE IF EXISTS `shipping`;
CREATE TABLE `shipping` (
`weight_id` int(11) NOT NULL AUTO_INCREMENT,
`product_weight` int(11) NOT NULL,
`shipping_charges` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`weight_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
/*Data for the table `shipping` */
insert into `shipping`(`weight_id`,`product_weight`,`shipping_charges`,`created_at`,`updated_at`) values (1,500,30,'0000-00-00 00:00:00','0000-00-00 00:00:00'),(2,1000,60,'0000-00-00 00:00:00','0000-00-00 00:00:00'),(3,1500,90,'0000-00-00 00:00:00','0000-00-00 00:00:00'),(4,2000,120,'0000-00-00 00:00:00','0000-00-00 00:00:00'),(5,2500,150,'2017-04-27 08:29:54','2017-04-27 08:29:54'),(6,3000,180,'2017-04-27 08:30:08','2017-04-27 08:30:08'),(7,3500,210,'2017-04-27 08:30:39','2017-04-27 08:30:39');
/*Table structure for table `sub_items` */
DROP TABLE IF EXISTS `sub_items`;
CREATE TABLE `sub_items` (
`subitem_id` int(11) NOT NULL AUTO_INCREMENT,
`subcategory_id` int(11) NOT NULL,
`subitem_name` varchar(250) COLLATE utf8_bin NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`category_id` int(11) NOT NULL,
PRIMARY KEY (`subitem_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*Data for the table `sub_items` */
insert into `sub_items`(`subitem_id`,`subcategory_id`,`subitem_name`,`created_at`,`updated_at`,`category_id`) values (1,1,'php','0000-00-00 00:00:00','0000-00-00 00:00:00',1),(2,2,'mysql','0000-00-00 00:00:00','0000-00-00 00:00:00',1);
/*Table structure for table `subcategories` */
DROP TABLE IF EXISTS `subcategories`;
CREATE TABLE `subcategories` (
`subcategory_id` int(11) NOT NULL AUTO_INCREMENT,
`category_id` int(11) NOT NULL,
`subcategory_name` varchar(500) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`subcategory_id`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=latin1;
/*Data for the table `subcategories` */
insert into `subcategories`(`subcategory_id`,`category_id`,`subcategory_name`,`created_at`,`updated_at`) values (1,1,'online books','2017-05-16 10:00:00','2017-05-16 11:00:00'),(2,1,'online general books','2017-05-16 09:00:00','2017-05-16 09:00:00'),(3,2,'tabs','2017-05-16 10:00:00','2017-05-16 11:00:00'),(4,2,'laptops','2017-05-16 15:00:00','2017-05-16 10:00:00'),(5,2,'mobiles','2017-05-16 09:00:00','2017-05-16 11:00:00'),(6,3,'Womens clothing','2017-05-16 08:00:00','2017-05-16 10:00:00'),(7,3,'Mens clothing','2017-05-16 11:00:00','2017-05-16 14:00:00'),(8,4,'Veg items','2017-05-16 10:00:00','2017-05-16 13:00:00'),(10,4,'Non-Veg items','2017-05-16 11:00:00','2017-05-16 10:00:00'),(11,5,'Ayurvedic','2017-05-16 09:00:00','2017-05-16 13:00:00'),(12,5,'Bread Dairy & Eggs','2017-05-16 08:00:00','2017-05-16 09:00:00'),(13,5,'Beverages','2017-05-16 07:00:00','2017-05-16 08:00:00'),(14,5,'Branded Foods','2017-05-16 09:00:00','2017-05-16 12:00:00'),(16,5,'Dals & Pulses','2017-05-16 08:00:00','2017-05-16 07:00:00'),(17,5,'Dry Fruits','2017-05-16 13:00:00','2017-05-16 11:00:00'),(18,5,' Edible Oils & Ghee','2017-05-16 10:00:00','2017-05-16 10:00:00'),(20,5,'Flours &Sooji','2017-05-16 09:00:00','2017-05-16 12:00:00'),(21,5,'Household','2017-05-16 08:00:00','2017-05-16 08:00:00'),(23,5,'Imported & Gourmet','2017-05-16 09:00:00','2017-05-16 07:00:00'),(28,5,'Masalas & Spices','2017-05-16 07:00:00','2017-05-16 07:00:00'),(30,5,'Meat','2017-05-16 06:00:00','2017-05-16 11:00:00'),(31,5,'Organic Staples','2017-05-16 13:00:00','2017-05-16 09:00:00'),(32,5,'Personal Care','2017-05-16 08:00:00','2017-05-16 11:00:00'),(33,5,'Rice & Rice Products','2017-05-16 08:00:00','2017-05-16 11:00:00'),(34,5,'Salt, Sugar & Jaggery','2017-05-16 10:00:00','2017-05-16 09:00:00'),(35,1,'lol','2017-05-31 13:08:06','2017-05-31 13:08:06');
/*Table structure for table `subcategory` */
DROP TABLE IF EXISTS `subcategory`;
CREATE TABLE `subcategory` (
`seller_subcategory_id` int(11) NOT NULL AUTO_INCREMENT,
`seller_id` int(11) NOT NULL,
`category_id` int(11) NOT NULL,
`subcategory_id` int(11) NOT NULL,
`subitem_id` int(11) NOT NULL,
PRIMARY KEY (`seller_subcategory_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
/*Data for the table `subcategory` */
insert into `subcategory`(`seller_subcategory_id`,`seller_id`,`category_id`,`subcategory_id`,`subitem_id`) values (1,8,1,1,0),(2,8,3,12,0),(3,8,1,3,0),(4,8,2,16,0),(5,8,4,15,0);
/*Table structure for table `tmpcart` */
DROP TABLE IF EXISTS `tmpcart`;
CREATE TABLE `tmpcart` (
`cart_id` bigint(20) NOT NULL AUTO_INCREMENT,
`cart_data` text NOT NULL,
UNIQUE KEY `cart_id` (`cart_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
/*Data for the table `tmpcart` */
insert into `tmpcart`(`cart_id`,`cart_data`) values (2,'a:0:{}'),(3,'a:0:{}'),(4,'a:1:{s:32:\"1679091c5a880faf6fb5e6087eb1b2dc\";a:6:{s:5:\"rowid\";s:32:\"1679091c5a880faf6fb5e6087eb1b2dc\";s:2:\"id\";s:1:\"6\";s:3:\"qty\";s:1:\"1\";s:5:\"price\";s:3:\"500\";s:4:\"name\";s:10:\"skin cream\";s:8:\"subtotal\";i:500;}}');
/*Table structure for table `user` */
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`user_name` varchar(20) NOT NULL,
`user_email` varchar(50) NOT NULL,
`user_mobile` bigint(20) NOT NULL,
`user_password` varchar(60) NOT NULL,
`user_summary` text NOT NULL,
`identifier` varchar(500) NOT NULL,
`provider` varchar(500) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`status` int(11) NOT NULL DEFAULT '0',
`forgot_status` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*Data for the table `user` */
insert into `user`(`user_id`,`user_name`,`user_email`,`user_mobile`,`user_password`,`user_summary`,`identifier`,`provider`,`created_at`,`updated_at`,`status`,`forgot_status`) values (1,'kiran','<EMAIL>',0,'<PASSWORD>','','','','2017-04-14 14:02:47','2017-04-14 14:02:47',1,0);
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
Select S.Name
From ( Students S join Friends F Using(ID)
join Packages P1 on S.ID=P1.ID
join Packages P2 on F.Friend_ID=P2.ID)
Where P2.Salary > P1.Salary
Order By P2.Salary;
|
<gh_stars>0
drop table chatinfo;
drop table itinerarylight;
drop table service_city;
drop table sup_and_order;
drop table itinerary;
drop table wk_favor_keys;
drop table order_info;
drop table wk_order;
drop table mypiece;
drop table mypiece_imgurl;
drop table mypiecetags;
drop table expense;
drop table match_table;
drop table userinfo;
alter table frag add column sup_id int default NULL;
|
<reponame>metasloth/elhg-discord
CREATE TABLE IF NOT EXISTS MemeLog (
guildid NUMERIC,
link TEXT,
userid NUMERIC,
sendtime TEXT
);
CREATE TABLE IF NOT EXISTS MemeStore (
fetched TEXT,
link TEXT,
subreddit TEXT
);
|
-- Clue #1: We recently got word that someone fitting <NAME>'s description has been
-- traveling through Southern Europe. She's most likely traveling someplace where she won't be noticed,
-- so find the least populated country in Southern Europe, and we'll start looking for her there.
carmen=# select country, population from country where region = 'Southern Europe' order by population asc;
carmen=# select country, population from country where region = 'Southern Europe' order by population asc;
-- Holy See (Vatican City State)
-- Clue #2: Now that we're here, we have insight that Carmen was seen attending language classes in
-- this country's officially recognized language. Check our databases and find out what language is
-- spoken in this country, so we can call in a translator to work with you.
carmen=# select * from countrylanguage where countrycode = 'VAT';
-- countrycode | language | isofficial | percentage
-- -------------+----------+------------+------------
-- VAT | Italian | t | 0
-- Clue #3: We have new news on the classes Carmen attended – our gumshoes tell us she's moved on
-- to a different country, a country where people speak only the language she was learning. Find out which
-- nearby country speaks nothing but that language.
carmen=# select * from countrylanguage where language = 'Italian';
-- countrycode | language | isofficial | percentage
-- -------------+----------+------------+------------
-- ITA | Italian | t | 94.1
-- SMR | Italian | t | 100
[17:41]
carmen=# select * from country where code = 'SMR';
code | name | continent | region | surfacearea | indepyear | population | lifeexpectancy | gnp | gnpold | localname | governmentform | headofstate | capital | code2
------+------------+-----------+-----------------+-------------+-----------+------------+----------------+--------+--------+------------+----------------+-------------+---------+-------
SMR | San Marino | Europe | Southern Europe | 61 | 885 | 27000 | 81.1 | 510.00 | | San Marino | Republic | | 3171 | SM
(1 row)
carmen=# select * from city where countrycode = 'SMR';
id | name | countrycode | district | population
------+------------+-------------+-------------------+------------
3170 | Serravalle | SMR | Serravalle/Dogano | 4802
3171 | San Marino | SMR | San Marino | 2294
-- Clue #4: We're booking the first flight out – maybe we've actually got a chance to catch her this time.
-- There are only two cities she could be flying to in the country. One is named the same as the country – that
-- would be too obvious. We're following our gut on this one; find out what other city in that country she might
-- be flying to.
carmen=# select * from city where name like 'Serr%';
id | name | countrycode | district | population
------+------------+-------------+-------------------+------------
265 | Serra | BRA | Esp�rito Santo | 302666
3170 | Serravalle | SMR | Serravalle/Dogano | 4802
[17:55]
carmen=# select * from country where code = 'BRA';
code | name | continent | region | surfacearea | indepyear | population | lifeexpectancy | gnp | gnpold | localname | governmentform | headofstate | capital | code2
------+--------+---------------+---------------+-------------+-----------+------------+----------------+-----------+-----------+-----------+------------------+---------------------------+---------+-------
BRA | Brazil | South America | South America | 8.5474e+06 | 1822 | 170115000 | 62.9 | 776739.00 | 804108.00 | Brasil | Federal Republic | <NAME>oso | 211 | BR
(1 row)
-- Clue #5: Oh no, she pulled a switch – there are two cities with very similar names, but in totally different
-- parts of the globe! She's headed to South America as we speak; go find a city whose name is like the one we were
-- headed to, but doesn't end the same. Find out the city, and do another search for what country it's in. Hurry!
carmen=# select * from city where id = '211';
id | name | countrycode | district | population
-----+------------+-------------+------------------+------------
211 | Bras�lia | BRA | Distrito Federal | 1969868
-- Clue #6: We're close! Our South American agent says she just got a taxi at the airport, and is headed towards
-- the capital! Look up the country's capital, and get there pronto! Send us the name of where you're headed and we'll
-- follow right behind you!
-- Clue #7: She knows we're on to her – her taxi dropped her off at the international airport, and she beat us to
-- the boarding gates. We have one chance to catch her, we just have to know where she's heading and beat her to the
-- landing dock.
-- Clue #8: Lucky for us, she's getting cocky. She left us a note, and I'm sure she thinks she's very clever, but
-- if we can crack it, we can finally put her where she belongs – behind bars.
-- Our playdate of late has been unusually fun –
-- As an agent, I'll say, you've been a joy to outrun.
-- And while the food here is great, and the people – so nice!
-- I need a little more sunshine with my slice of life.
-- So I'm off to add one to the population I find
-- In a city of ninety-one thousand and now, eighty five.
-- We're counting on you, gumshoe. Find out where she's headed, send us the info, and we'll be sure to meet her at the gates with bells on.
carmen=# select * from city where population = 91084;
-- id | name | countrycode | district | population
-- ------+--------------+-------------+------------+------------
-- 4060 | Santa Monica | USA | California | 91084
-- She's in ____________________________!
|
/*
@author <NAME> / 01 / XII RPL-1
*/
--- Pratkikum soal no 2
SELECT kode_mk, nama_mk, sks, semester
FROM matakuliah
ORDER BY nama_mk;
|
<reponame>winfredSunga-jw0226/bamazon
--sql scripts for challenge #1
DROP DATABASE IF EXISTS bamazon;
CREATE DATABASE bamazon;
USE bamazon;
DROP TABLE IF EXISTS products;
CREATE TABLE products (
item_id SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL,
product_name VARCHAR(1000) NOT NULL,
department_name VARCHAR(50) NOT NULL,
price DECIMAL(8,2) NOT NULL,
stock_quantity SMALLINT UNSIGNED,
PRIMARY KEY (item_id)
);
-- inserting records to products
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES('Canon 5D Mark IV','Camera & Photo', 2499.99, 50);
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES('Canon 70-200 F2.8 Lens','Camera & Photo', 2299.99, 20);
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES('The Fate of the Furious Blu-Ray','Movies, Music & Games', 19.99, 250);
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES('<NAME> : Chapter 2','Movies, Music & Games', 14.99, 200);
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES('Samsung Electronics QN55Q7F 55-Inch 4K Ultra HD Smart QLED TV','TV & Video', 1797.99, 40);
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES('LG Electronics OLED55B6P Flat 55-Inch 4K Ultra HD Smart OLED TV','TV & Video', 1699.99, 30);
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES('Happy Belly Chocolate & Dried Fruit Trail Mix, 16 oz','Grocery', 4.85, 200);
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES('Terrasoul Superfoods Raw Organic Criollo Cacao Nibs, 1 Pound','Grocery', 11.99, 300);
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES('Superdry Men''s Fuji Bomber Jacket','Clothing, Shoes & Jewelry', 99.50, 75);
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES('Pendleton Women''s Zip Front Hooded Techrain Coat','Clothing, Shoes & Jewelry', 199.95, 100);
SELECT * FROM products;
-- sql scripts for challenge #3
CREATE TABLE departments (
department_id SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL,
department_name VARCHAR(50) NOT NULL,
over_head_costs MEDIUMINT UNSIGNED NOT NULL,
PRIMARY KEY (department_id)
);
INSERT INTO departments (department_name, over_head_costs)
VALUES ('Camera & Photo', 100000.00);
INSERT INTO departments (department_name, over_head_costs)
VALUES ('Movies, Music & Games', 20000.00);
INSERT INTO departments (department_name, over_head_costs)
VALUES ('TV & Video', 150000.00);
INSERT INTO departments (department_name, over_head_costs)
VALUES ('Grocery', 5000.00);
INSERT INTO departments (department_name, over_head_costs)
VALUES ('Clothing, Shoes & Jewelry', 35000.00);
ALTER TABLE products
ADD COLUMN product_sales DECIMAL(10,2) DEFAULT 0.00;
-- query for challenge #3
SELECT b.department_id AS 'Department ID', b.department_name AS 'Department Name', b.over_head_costs AS 'Overhead Costs', SUM(a.product_sales) AS 'Product Sales' , SUM(a.product_sales - b.over_head_costs) AS 'Total Profit'
FROM products a
INNER JOIN departments b
ON a.department_name = b.department_name
GROUP BY b.department_id, b.department_name, b.over_head_costs;
|
CREATE TABLE [dbo].[MenuItem] (
[Id] INT NOT NULL,
[NavigateUrl] NVARCHAR (256) NOT NULL,
[Text] NVARCHAR (256) NOT NULL,
[Target] NVARCHAR (256) NOT NULL,
[ParentId] INT CONSTRAINT [DF_MenuItem_ParentId] DEFAULT ((-1)) NOT NULL,
[MenuId] INT NOT NULL,
[IsActive] INT NOT NULL,
[Rank] INT NOT NULL,
[PageId] INT CONSTRAINT [DF_MenuItem_PageId] DEFAULT ((-1)) NOT NULL,
[Type] INT CONSTRAINT [DF_MenuItem_Type] DEFAULT ((1)) NOT NULL,
[CheckPermission] INT CONSTRAINT [DF_MenuItem_CheckPermission] DEFAULT ((0)) NOT NULL,
CONSTRAINT [PK_MenuItems] PRIMARY KEY CLUSTERED ([Id] ASC)
);
|
-- MySQL dump 10.13 Distrib 8.0.18, for Win64 (x86_64)
--
-- Host: localhost Database: dbLPM
-- ------------------------------------------------------
-- Server version 8.0.18
/*!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 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `tbAtividade`
--
DROP TABLE IF EXISTS `tbAtividade`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tbAtividade` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idUsuario` int(11) NOT NULL,
`idTarefa` int(11) DEFAULT NULL,
`tipo` varchar(45) DEFAULT 'funcionario',
`tempoGasto` decimal(8,2) NOT NULL,
`comentario` varchar(100) NOT NULL,
`dataRealizacao` date NOT NULL,
`totalGasto` decimal(9,2) NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_tbAtividade_tbUsuario` (`idUsuario`),
KEY `fk_tbAtividade_tbTarefa` (`idTarefa`),
CONSTRAINT `fk_tbAtividade_tbTarefa` FOREIGN KEY (`idTarefa`) REFERENCES `tbTarefa` (`id`) ON DELETE CASCADE,
CONSTRAINT `fk_tbAtividade_tbUsuario` FOREIGN KEY (`idUsuario`) REFERENCES `tbUsuario` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tbAtividade`
--
LOCK TABLES `tbAtividade` WRITE;
/*!40000 ALTER TABLE `tbAtividade` DISABLE KEYS */;
INSERT INTO `tbAtividade` VALUES (7,27,NULL,'Reunião Interna',6.00,'Reunião para decidir novo projeto a ser criado','2019-10-12',50.58),(8,26,NULL,'Workshop Externo',6.60,'Workshop Network','2019-04-12',43.89),(9,27,16,'Design',5.00,'Design do ambiente','2019-04-23',40.00),(10,26,19,'Desenvolvimento',8.00,'CRUD usuários','2019-10-12',53.20),(11,27,15,'Desenvolvimento',6.00,'Desenvolvimento de Primeiro personagem','2019-10-01',48.00),(12,26,19,'Aprimoramento',3.00,'Vídeo aulas de javascript','2019-10-07',19.95),(13,27,17,'Desenvolvimento',10.00,'Definir design de ambiente de personagem','2019-10-02',80.00),(14,26,21,'Design',9.00,'Design das antenas','2019-10-22',59.85),(15,26,NULL,'Projeto Interno',5.00,'Desenvolvimento de jogo com React','2019-07-21',33.25),(16,27,23,'Aprimoramento',5.00,'Material','2010-10-02',40.00),(17,22,15,'Aprimoramento',3.00,'Roupas de personagem ','2019-10-03',16.29),(18,22,17,'Desenvolvimento',6.00,'Estilo de personagem','2019-10-04',32.58),(19,22,23,'Desenvolvimento',3.00,'Equipamento','2019-10-05',16.29);
/*!40000 ALTER TABLE `tbAtividade` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tbCompra`
--
DROP TABLE IF EXISTS `tbCompra`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tbCompra` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`proposito` varchar(60) NOT NULL,
`totalGasto` decimal(6,2) DEFAULT '0.00',
`idTarefa` int(11) NOT NULL,
`idComprador` int(11) NOT NULL,
`fonte` varchar(50) NOT NULL,
`naturezaOrcamentaria` varchar(50) NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_tbTarefa_tbCompra` (`idTarefa`),
KEY `fk_tbCompra_tbUsuario` (`idComprador`),
CONSTRAINT `fk_tbCompra_tbTarefa` FOREIGN KEY (`idTarefa`) REFERENCES `tbTarefa` (`id`) ON DELETE CASCADE,
CONSTRAINT `fk_tbCompra_tbUsuario` FOREIGN KEY (`idComprador`) REFERENCES `tbUsuario` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tbCompra`
--
LOCK TABLES `tbCompra` WRITE;
/*!40000 ALTER TABLE `tbCompra` DISABLE KEYS */;
INSERT INTO `tbCompra` VALUES (17,'Melhorar design de gráficos ',120.67,19,26,'3374734','73738374'),(18,'Dar andamento a Impressora 3d',70.00,15,27,'123654','654321'),(19,'Melhorar conforto dos desenvolvedores',672.97,19,26,'627737374','726636373');
/*!40000 ALTER TABLE `tbCompra` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tbCondutor`
--
DROP TABLE IF EXISTS `tbCondutor`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tbCondutor` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nome` varchar(45) NOT NULL,
`cnh` varchar(45) NOT NULL,
`validadeCNH` date NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tbCondutor`
--
LOCK TABLES `tbCondutor` WRITE;
/*!40000 ALTER TABLE `tbCondutor` DISABLE KEYS */;
INSERT INTO `tbCondutor` VALUES (7,'Pedro','56987412','2030-02-17');
/*!40000 ALTER TABLE `tbCondutor` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tbFormulario`
--
DROP TABLE IF EXISTS `tbFormulario`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tbFormulario` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nome` varchar(100) NOT NULL,
`caminhoDocumento` longtext NOT NULL,
`idUsuario` int(11) NOT NULL,
`idViagem` int(11) DEFAULT NULL,
`idCompra` int(11) DEFAULT NULL,
`dataModificacao` date NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_tbFormulario_tbUsuario` (`idUsuario`),
KEY `fk_tbFormulario_tbViagem` (`idViagem`),
KEY `tbFormulario_tbCompra__fk` (`idCompra`),
CONSTRAINT `fk_tbFormulario_tbUsuario` FOREIGN KEY (`idUsuario`) REFERENCES `tbUsuario` (`id`) ON DELETE CASCADE,
CONSTRAINT `fk_tbFormulario_tbViagem` FOREIGN KEY (`idViagem`) REFERENCES `tbViagem` (`id`) ON DELETE CASCADE,
CONSTRAINT `tbFormulario_tbCompra__fk` FOREIGN KEY (`idCompra`) REFERENCES `tbCompra` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tbFormulario`
--
LOCK TABLES `tbFormulario` WRITE;
/*!40000 ALTER TABLE `tbFormulario` DISABLE KEYS */;
/*!40000 ALTER TABLE `tbFormulario` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tbGasto`
--
DROP TABLE IF EXISTS `tbGasto`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tbGasto` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`valor` decimal(9,2) NOT NULL,
`tipo` varchar(45) NOT NULL,
`idViagem` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_tbGasto_tbViagem` (`idViagem`),
CONSTRAINT `fk_tbViagem_tbGasto` FOREIGN KEY (`idViagem`) REFERENCES `tbViagem` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tbGasto`
--
LOCK TABLES `tbGasto` WRITE;
/*!40000 ALTER TABLE `tbGasto` DISABLE KEYS */;
INSERT INTO `tbGasto` VALUES (92,50.00,'Aluguel de veículos (locado fora de Foz)',15),(93,100.00,'Combustível',15),(94,12.00,'Estacionamento',15),(95,120.00,'Passagens rodoviárias (metrô/ônibus)',15),(96,0.00,'Passagens rodoviárias internacionais',15),(97,12.50,'Pedágio',15),(98,0.00,'Seguro internacional (obrigatório)',15),(99,0.00,'Táxi',15);
/*!40000 ALTER TABLE `tbGasto` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tbItem`
--
DROP TABLE IF EXISTS `tbItem`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tbItem` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idCompra` int(11) NOT NULL,
`valor` decimal(9,2) NOT NULL,
`quantidade` decimal(6,2) NOT NULL,
`nome` varchar(45) NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_tbProduto_tbCompra` (`idCompra`),
CONSTRAINT `fk_tbCompra_tbItem` FOREIGN KEY (`idCompra`) REFERENCES `tbCompra` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tbItem`
--
LOCK TABLES `tbItem` WRITE;
/*!40000 ALTER TABLE `tbItem` DISABLE KEYS */;
INSERT INTO `tbItem` VALUES (17,17,120.67,1.00,'Licença highcharts'),(18,18,35.00,2.00,'Filamento 30 metros'),(19,19,65.00,2.00,'Teclado Gamer'),(20,19,180.99,3.00,'Cadeira Gamer');
/*!40000 ALTER TABLE `tbItem` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tbProjeto`
--
DROP TABLE IF EXISTS `tbProjeto`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tbProjeto` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dataFinalizacao` date NOT NULL,
`dataInicio` date NOT NULL,
`totalGasto` decimal(10,2) DEFAULT '0.00',
`descricao` longtext NOT NULL,
`nome` varchar(45) NOT NULL,
`numCentroCusto` varchar(45) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tbProjeto`
--
LOCK TABLES `tbProjeto` WRITE;
/*!40000 ALTER TABLE `tbProjeto` DISABLE KEYS */;
INSERT INTO `tbProjeto` VALUES (14,'2022-03-02','2016-03-12',59.85,'Projeto com objetivo de monitorar as atividades da cidade de Entre Rios','P&D Entre Rios','4354644'),(15,'2025-02-04','2018-03-12',581.37,'Projeto para desenvolver um aplicação de monitoramento da bomba d\'agua em um ambiente virtual','Realidade Virtual','4645463'),(16,'2024-03-09','2008-03-12',866.79,'Projeto para criar uma aplicação web de gerenciamento de projetos','Gerenciador de Projetos','5645654'),(17,'2023-11-05','2010-03-12',56.29,'Projeto para monitorar e executar simulações de sistemas elétricos da Itaipu Binacional','Monitoramento Elétrico','34778587');
/*!40000 ALTER TABLE `tbProjeto` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tbTarefa`
--
DROP TABLE IF EXISTS `tbTarefa`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tbTarefa` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dataInicio` date NOT NULL,
`dataConclusao` date DEFAULT NULL,
`estado` varchar(45) DEFAULT 'trabalhando',
`nome` varchar(45) NOT NULL,
`descricao` longtext NOT NULL,
`idProjeto` int(11) NOT NULL,
`totalGasto` decimal(9,2) DEFAULT '0.00',
PRIMARY KEY (`id`),
KEY `fk_tbProjeto_tbTarefa` (`idProjeto`),
CONSTRAINT `fk_tbProjeto_tbTarefa` FOREIGN KEY (`idProjeto`) REFERENCES `tbProjeto` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tbTarefa`
--
LOCK TABLES `tbTarefa` WRITE;
/*!40000 ALTER TABLE `tbTarefa` DISABLE KEYS */;
INSERT INTO `tbTarefa` VALUES (15,'2019-03-12','2020-10-29','Em andamento','Desenvolver Modelos de Personagem','Tarefa para desenvolver modelos 3d desde sua concepção até sua modelagem',15,428.79),(16,'2018-03-22','2019-03-15','Concluída','Definir Escopo','Tarefa para definir o escopo do projeto desde suas funcionalidades mais básicas',15,40.00),(17,'2019-04-22','2020-08-16','Em andamento','Definir design','Tarefa para definir o design do ambiente',15,112.58),(18,'2019-03-12','2019-06-23','Concluída','Definir requisitos','Tarefa para realizar entrevistas e definir requisitos ',16,0.00),(19,'2019-09-17','2020-10-05','Em andamento','Desenvolver API','Tarefa para desenvolvimento da estrutura e código da ALI Rest',16,866.79),(20,'2020-10-09','2021-05-18','Á fazer','Implementar Funcionalidade ODT','Tarefa para desenvolver funcionalidade de receber ODT',16,0.00),(21,'2019-09-10','2020-12-10','Em andamento','Instalação de antenas','Tarefa para desenvolver e instalar antenas nos locais requisitados',14,59.85),(23,'2010-11-02','2010-12-03','Em andamento','Elétrica','Desenvolver sensores elétricos',17,56.29);
/*!40000 ALTER TABLE `tbTarefa` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tbUsuario`
--
DROP TABLE IF EXISTS `tbUsuario`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tbUsuario` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nomeCompleto` varchar(45) NOT NULL,
`cpf` varchar(40) NOT NULL,
`rg` varchar(20) NOT NULL,
`dataDeEmissao` date NOT NULL,
`valorHora` decimal(6,2) NOT NULL,
`formacao` varchar(45) NOT NULL,
`atuacao` varchar(45) DEFAULT 'Colaborador',
`email` varchar(45) NOT NULL,
`login` varchar(45) NOT NULL,
`senha` longtext NOT NULL,
`dtNascimento` date NOT NULL,
`estado` varchar(45) DEFAULT 'ativado',
`tokenValido` longtext,
`admin` tinyint(1) DEFAULT NULL,
`caminhoFoto` longtext NOT NULL,
`tokenConfirmacao` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tbUsuario`
--
LOCK TABLES `tbUsuario` WRITE;
/*!40000 ALTER TABLE `tbUsuario` DISABLE KEYS */;
INSERT INTO `tbUsuario` VALUES (22,'<NAME>','242.097.180-92','31.442.752-1','2004-09-12',5.43,'Designer','Bolsista/Voluntário','<EMAIL>','Camiggf','$2y$10$tpOG9jGCkJEzb6V0gsgT3u84yCYqefCBeCWLQ1dpD7THC.AUzT3am','1999-10-07','ativado',NULL,0,'assets/files/22/perfil1573940374.jpeg',NULL),(26,'<NAME>','121.128.809-93','12.611.282-3','2008-03-12',6.65,'Programador','Bolsista/Voluntário','<EMAIL>','LynconEBB','$2y$10$omG8DIu/HZvo1U0gBKhKk.VrCPHwHoYHdxMsedz6QS50N7NPntTAW','2001-03-24','ativado',NULL,1,'assets/files/26/perfil1573941785.jpeg',NULL),(27,'<NAME>','212.790.020-00','23.274.586-9','2004-02-05',8.00,'Analista de Sistemas','Terceiros','<EMAIL>','Ismael270','$2y$10$hF3yNHrly73efs4oCoiw8uWfnMM7ctmsl0zTO5g.hx5fz7/fEq6Wq','2002-03-12','ativado',NULL,0,'assets/files/27/perfil1573942696.jpeg',NULL),(28,'<NAME>','175.985.730-00','37.989.863-9','2000-09-07',7.54,'Gerente','Colaborador ','<EMAIL>','ana123','$2y$10$OZVIqc2gHErqMFAzP6gGieKA72OmkdoVipNUs3YYKVReKO51dKRSq','1980-03-12','ativado',NULL,0,'assets/files/28/perfil1573942992.jpeg',NULL);
/*!40000 ALTER TABLE `tbUsuario` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tbUsuarioProjeto`
--
DROP TABLE IF EXISTS `tbUsuarioProjeto`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tbUsuarioProjeto` (
`idProjeto` int(11) NOT NULL,
`idUsuario` int(11) NOT NULL,
`dono` tinyint(1) NOT NULL,
PRIMARY KEY (`idUsuario`,`idProjeto`),
KEY `fk_tbUsuarioProjeto_tbProjeto` (`idProjeto`),
CONSTRAINT `fk_tbUsuarioProjeto_tbUsuario` FOREIGN KEY (`idUsuario`) REFERENCES `tbUsuario` (`id`),
CONSTRAINT `tbUsuarioProjeto_ibfk_1` FOREIGN KEY (`idProjeto`) REFERENCES `tbProjeto` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tbUsuarioProjeto`
--
LOCK TABLES `tbUsuarioProjeto` WRITE;
/*!40000 ALTER TABLE `tbUsuarioProjeto` DISABLE KEYS */;
INSERT INTO `tbUsuarioProjeto` VALUES (14,22,1),(15,22,0),(16,22,0),(17,22,0),(14,26,0),(16,26,1),(15,27,1),(17,27,0),(15,28,0),(17,28,1);
/*!40000 ALTER TABLE `tbUsuarioProjeto` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tbVeiculo`
--
DROP TABLE IF EXISTS `tbVeiculo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tbVeiculo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idCondutor` int(11) NOT NULL,
`nome` varchar(45) NOT NULL,
`tipo` varchar(45) NOT NULL,
`retirada` datetime NOT NULL,
`devolucao` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_tbVeiculo_tbCondutor` (`idCondutor`),
CONSTRAINT `fk_tbVeiculo_tbCondutor` FOREIGN KEY (`idCondutor`) REFERENCES `tbCondutor` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tbVeiculo`
--
LOCK TABLES `tbVeiculo` WRITE;
/*!40000 ALTER TABLE `tbVeiculo` DISABLE KEYS */;
INSERT INTO `tbVeiculo` VALUES (9,7,'Fusca','Veículo locado','2019-04-23 13:00:00','2019-05-23 23:00:00');
/*!40000 ALTER TABLE `tbVeiculo` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tbViagem`
--
DROP TABLE IF EXISTS `tbViagem`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tbViagem` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idVeiculo` int(11) NOT NULL,
`idTarefa` int(11) NOT NULL,
`origem` varchar(45) NOT NULL,
`destino` varchar(45) NOT NULL,
`dataIda` date NOT NULL,
`dataVolta` date NOT NULL,
`justificativa` varchar(200) NOT NULL,
`observacoes` varchar(200) NOT NULL,
`passagem` varchar(45) NOT NULL,
`totalGasto` decimal(12,2) NOT NULL,
`idUsuario` int(11) NOT NULL,
`entradaHosp` datetime NOT NULL,
`saidaHosp` datetime NOT NULL,
`fonte` varchar(45) NOT NULL,
`atividade` varchar(45) NOT NULL,
`tipo` varchar(200) NOT NULL,
`tipoPassagem` varchar(200) NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_tbViagem_tbVeiculo` (`idVeiculo`),
KEY `fk_tbViagem_tbTarefa` (`idTarefa`),
CONSTRAINT `fk_tbViagem_tbTarefa` FOREIGN KEY (`idTarefa`) REFERENCES `tbTarefa` (`id`) ON DELETE CASCADE,
CONSTRAINT `fk_tbViagem_tbVeiculo` FOREIGN KEY (`idVeiculo`) REFERENCES `tbVeiculo` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tbViagem`
--
LOCK TABLES `tbViagem` WRITE;
/*!40000 ALTER TABLE `tbViagem` DISABLE KEYS */;
INSERT INTO `tbViagem` VALUES (15,9,15,'Foz do Iguaçu','Cascavel','2019-04-15','2019-05-16','Buscar equipamento','3 Funcionários para a viagem','587496',294.50,27,'2019-04-24 13:30:00','2019-04-25 14:00:00','235698','Copel.00','Viagem a trabalho','Terrestre nacional');
/*!40000 ALTER TABLE `tbViagem` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-11-16 21:24:20
|
USE [master]
GO--
IF DB_ID('UnitTests') IS NOT NULL BEGIN
ALTER DATABASE [UnitTests] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
DROP DATABASE [UnitTests]
END
GO--
CREATE DATABASE [UnitTests]
GO--
USE [UnitTests]
GO--
IF OBJECT_ID('[dbo].[Import_Employees]') IS NOT NULL DROP PROCEDURE [dbo].[Import_Employees]
GO--
IF TYPE_ID('[dbo].[EmployeeData]') IS NOT NULL DROP TYPE [dbo].[EmployeeData]
GO--
IF OBJECT_ID('[dbo].[Employees]') IS NOT NULL DROP TABLE [dbo].[Employees]
GO--
SET ANSI_NULLS ON
GO--
SET QUOTED_IDENTIFIER ON
GO--
SET ANSI_PADDING ON
GO--
CREATE TABLE [dbo].[Employees](
[EmployeeId] [int] IDENTITY(1,1) NOT NULL,
[SSN] [varchar](50) NOT NULL,
[Name] [varchar](255) NOT NULL,
[Errors] varchar(8000) NULL,
CONSTRAINT [PK_Employees] PRIMARY KEY CLUSTERED
(
[EmployeeId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO--
SET ANSI_PADDING OFF
GO--
CREATE TYPE [dbo].[EmployeeData] AS TABLE(
[SSN] varchar(50) NOT NULL,
[Name] varchar(255) NOT NULL,
[Errors] varchar(8000) NULL
);
GO--
CREATE PROCEDURE [dbo].[Import_Employees] (@data dbo.EmployeeData READONLY)
AS
BEGIN
SET NOCOUNT ON;
INSERT INTO dbo.Employees(SSN, Name, Errors)
SELECT d.SSN, d.Name, d.Errors
FROM @data d
END
GO--
|
DECLARE @NamedInstance bit
IF CAST(SERVERPROPERTY('ServerName') AS varchar) LIKE '%\%' SET @NamedInstance = 1 ELSE SET @NamedInstance = 0
DECLARE @ServiceName varchar(50)
IF @NamedInstance = 0
BEGIN
SET @ServiceName = 'MSSQLSERVER'
END
ELSE
BEGIN
SET @ServiceName = 'MSSQL$' + RIGHT(CAST(SERVERPROPERTY('ServerName') AS varchar),LEN(CAST(SERVERPROPERTY('ServerName') AS varchar)) - CHARINDEX('\',CAST(SERVERPROPERTY('ServerName') AS varchar),1))
END
DECLARE @KEY_VALUE varchar(100)
DECLARE @ServiceAccountName varchar(100)
SET @KEY_VALUE = 'SYSTEM\CurrentControlSet\Services\' + @ServiceName
EXECUTE master..xp_regread 'HKEY_LOCAL_MACHINE', @KEY_VALUE, 'ObjectName', @ServiceAccountName OUTPUT
SELECT @ServiceAccountName as 'SQLService Account'
IF CAST(SERVERPROPERTY('ServerName') AS varchar) LIKE '%\%' SET @NamedInstance = 1 ELSE SET @NamedInstance = 0
IF @NamedInstance = 0
BEGIN
SET @ServiceName = 'SQLSERVERAGENT'
END
ELSE
BEGIN
SET @ServiceName = 'SQLAgent$' + RIGHT(CAST(SERVERPROPERTY('ServerName') AS varchar),LEN(CAST(SERVERPROPERTY('ServerName') AS varchar)) - CHARINDEX('\',CAST(SERVERPROPERTY('ServerName') AS varchar),1))
END
SET @KEY_VALUE = 'SYSTEM\CurrentControlSet\Services\' + @ServiceName
EXECUTE master..xp_regread 'HKEY_LOCAL_MACHINE', @KEY_VALUE, 'ObjectName', @ServiceAccountName OUTPUT
SELECT @ServiceAccountName as 'SQLAgent Account'
|
<gh_stars>10-100
-- file:plpgsql.sql ln:2662 expect:false
begin
select * from foo where f1 = p1 and f1::text = p3 into strict x
|
-- AlterTable
ALTER TABLE "ApiRoute" ADD COLUMN "caching" JSONB NOT NULL DEFAULT E'{}';
|
<reponame>SkyFire/CCDB406_PUBLIC<filename>CCDB/database/main_db/world_rebase/game_event_model_equip.sql
/*!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 */;
DROP TABLE IF EXISTS `game_event_model_equip`;
CREATE TABLE `game_event_model_equip` (
`guid` int(10) unsigned NOT NULL DEFAULT '0',
`modelid` mediumint(8) unsigned NOT NULL DEFAULT '0',
`equipment_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`eventEntry` smallint(5) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`guid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
LOCK TABLES `game_event_model_equip` WRITE;
/*!40000 ALTER TABLE `game_event_model_equip` DISABLE KEYS */;
INSERT INTO `game_event_model_equip` VALUES (46,0,92,0),(47,0,92,0),(32997,0,92,0),(32998,0,92,0),(32999,0,92,0),(33001,0,92,0),(33007,0,92,0),(33017,0,92,0),(33018,0,92,0),(33023,0,92,0),(194,0,92,0),(4326,0,92,0),(4587,0,92,0),(153651,0,92,0),(153650,0,92,0),(153649,0,92,0),(62685,0,92,0),(62686,0,92,0),(153512,0,92,0),(62687,0,92,0),(62688,0,92,0),(153511,0,92,0),(153504,0,92,0),(153503,0,92,0),(153502,0,92,0),(95830,0,92,0),(95771,0,92,0),(95754,0,92,0),(95722,0,92,0),(95718,0,92,0),(95628,0,92,0),(95593,0,92,0),(95546,0,92,0),(95537,0,92,0),(95507,0,92,0),(95476,0,92,0),(95472,0,92,0),(95358,0,92,0),(95269,0,92,0),(95229,0,92,0),(95191,0,92,0),(95150,0,92,0),(153505,0,92,0),(95124,0,92,0),(95117,0,92,0),(95101,0,92,0),(94991,0,92,0),(94986,0,92,0),(94862,0,92,0),(94853,0,92,0),(94742,0,92,0),(94712,0,92,0),(94506,0,92,0),(94495,0,92,0),(94488,0,92,0),(94444,0,92,0),(94358,0,92,0),(94230,0,92,0),(94191,0,92,0),(94152,0,92,0),(94115,0,92,0),(94091,0,92,0),(94084,0,92,0),(94072,0,92,0),(94057,0,92,0),(93946,0,92,0),(93939,0,92,0),(93823,0,92,0),(93815,0,92,0),(93810,0,92,0),(93760,0,92,0),(93666,0,92,0),(93567,0,92,0),(93551,0,92,0),(93513,0,92,0),(93454,0,92,0),(93420,0,92,0),(161727,0,92,0),(162204,0,92,0),(6582958,0,92,0),(162153,0,92,0),(162154,0,92,0),(6582973,0,92,0),(161728,0,92,0),(161732,0,92,0),(33043,0,92,0),(33047,0,92,0),(33048,0,92,0),(33050,0,92,0),(33052,0,92,0),(33053,0,92,0),(33054,0,92,0),(33055,0,92,0),(161731,0,92,0),(33056,0,92,0),(33058,0,92,0),(33059,0,92,0),(33060,0,92,0),(33066,0,92,0),(33067,0,92,0),(33068,0,92,0),(33069,0,92,0),(33079,0,92,0),(33081,0,92,0),(33082,0,92,0),(6687,0,92,0),(38643,0,92,0),(95776,0,92,0),(95719,0,92,0),(95547,0,92,0),(95533,0,92,0),(95474,0,92,0),(95304,0,92,0),(95290,0,92,0),(95267,0,92,0),(95236,0,92,0),(95051,0,92,0),(95049,0,92,0),(94988,0,92,0),(94820,0,92,0),(94558,0,92,0),(94545,0,92,0),(94438,0,92,0),(94369,0,92,0),(93955,0,92,0),(161730,0,92,0),(93843,0,92,0),(93825,0,92,0),(93593,0,92,0),(93577,0,92,0),(93540,0,92,0),(161729,0,92,0),(12088,0,92,0),(12093,0,92,0),(79670,0,92,0),(79690,0,92,0),(79792,0,92,0),(79807,0,92,0),(79814,0,92,0),(90438,0,92,0),(1044001,0,92,0),(62662,0,92,0),(62663,0,92,0),(62664,0,92,0),(62665,0,92,0),(62666,0,92,0),(62667,0,92,0),(62668,0,92,0),(62669,0,92,0),(62670,0,92,0),(62671,0,92,0),(62672,0,92,0),(62673,0,92,0),(62674,0,92,0),(62675,0,92,0),(62676,0,92,0),(62677,0,92,0),(62678,0,92,0),(62679,0,92,0),(62680,0,92,0),(62681,0,92,0),(62682,0,92,0),(62683,0,92,0),(62684,0,92,0),(80041,0,92,0),(80042,0,92,0),(80043,0,92,0),(80044,0,92,0),(80045,0,92,0),(80046,0,92,0),(80047,0,92,0),(80048,0,92,0),(80049,0,92,0),(80050,0,92,0),(80051,0,92,0),(80052,0,92,0),(153516,0,92,0),(80087,0,92,0),(80088,0,92,0),(95759,0,92,0),(95721,0,92,0),(95646,0,92,0),(95514,0,92,0),(95400,0,92,0),(95396,0,92,0),(95272,0,92,0),(95169,0,92,0),(95033,0,92,0),(94990,0,92,0),(94957,0,92,0),(94925,0,92,0),(94828,0,92,0),(94782,0,92,0),(94740,0,92,0),(94722,0,92,0),(94701,0,92,0),(94566,0,92,0),(94530,0,92,0),(94473,0,92,0),(94448,0,92,0),(94308,0,92,0),(94266,0,92,0),(94248,0,92,0),(94170,0,92,0),(94137,0,92,0),(94038,0,92,0),(93951,0,92,0),(93945,0,92,0),(93882,0,92,0),(93803,0,92,0),(93690,0,92,0),(93610,0,92,0),(93518,0,92,0),(93461,0,92,0),(93446,0,92,0),(161723,0,92,0),(95835,0,92,0),(95819,0,92,0),(95758,0,92,0),(95666,0,92,0),(95655,0,92,0),(95585,0,92,0),(95513,0,92,0),(95412,0,92,0),(95322,0,92,0),(95185,0,92,0),(95176,0,92,0),(94941,0,92,0),(94686,0,92,0),(94525,0,92,0),(94427,0,92,0),(94335,0,92,0),(94265,0,92,0),(94231,0,92,0),(94229,0,92,0),(94080,0,92,0),(94048,0,92,0),(93983,0,92,0),(93877,0,92,0),(93774,0,92,0),(93728,0,92,0),(93701,0,92,0),(93633,0,92,0),(93626,0,92,0),(93620,0,92,0),(93478,0,92,0),(93466,0,92,0),(161725,0,92,0),(161724,0,92,0),(161722,0,92,0),(161726,0,92,0);
/*!40000 ALTER TABLE `game_event_model_equip` 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 */;
|
SELECT * FROM votes WHERE `student`=? && `song_id`=?
|
---Tat ca Nhan Vien binh thuong (tru Truong Phong, Truong Chi Nhanh, Truong Du An) chi duoc phep xem thong tin cua phong minhf va luong cua minh
create view view_nhanvien1 as
select * from nhanvien where manv not in (select truongphong from phongban)
and manv not in (select truongda from duan) and manv not in (select truongchinhanh from chinhanh)
and maphong in (select maphong from nhanvien where manv=user)
grant select on view_nhanvien1 to nhanvien;
create or replace function xem_luong (
p_schema varchar2, p_obj varchar2)
return varchar2
as
user varchar2(100);
begin
user := sys_context('userenv', 'session_user');
return 'manv = ' || q'[']' || user || q'[']';
end;
begin
dbms_rls.add_policy (
object_schema => 'system',
object_name => 'view_nhanvien1',
policy_name => 'xemluongnhanvien',
function_schema => 'system',
policy_function => 'xem_luong',
sec_relevant_cols => 'LUONG',sec_relevant_cols_opt => dbms_rls.ALL_ROWS);
end;
|
/*********************************************************************************
Create storage (database) to store the tweets
Create compute (warehouse) to run analytical queries on the tweets
*********************************************************************************/
use role sysadmin;
create or replace warehouse twitter_wh
with warehouse_size = 'x-small'
auto_suspend = 300
auto_resume = true
initially_suspended = true;
CREATE OR REPLACE DATABASE twitter_db;
USE SCHEMA twitter_db.public;
/*********************************************************************************
Create external S3 stage pointing to the S3 buckets storing the tweets
*********************************************************************************/
CREATE or replace STAGE twitter_db.public.tweets
URL = 's3://my-twitter-bucket/'
CREDENTIALS = (AWS_KEY_ID = '<KEY>'
AWS_SECRET_KEY = '<KEY>')
file_format=(type='JSON')
COMMENT = 'Tweets stored in S3';
/*********************************************************************************
Create new table for storing JSON data in native format into a VARIANT column
*********************************************************************************/
create or replace table tweets(tweet variant);
/*********************************************************************************
Create pipe for auto-ingesting tweets from S3 into the "tweets" Snowflake table
*********************************************************************************/
create or replace pipe twitter_db.public.tweetpipe auto_ingest=true as
copy into twitter_db.public.tweets
from @twitter_db.public.tweets
file_format=(type='JSON');
/*********************************************************************************
Check that the pipe is created
Copy the notification_channel value of the pipe
*********************************************************************************/
show pipes;
/*********************************************************************************
Go to the AWS S3 console and update the event notifications with the
notification_channel value
*********************************************************************************/
|
#standardSQL
# meta nodes
CREATE TEMPORARY FUNCTION getMetaNodes(payload STRING)
RETURNS ARRAY<STRING>
LANGUAGE js AS '''
try {
var $ = JSON.parse(payload);
var almanac = JSON.parse($._almanac);
return almanac['meta-nodes'].nodes.map(n => n.name || n.property);
} catch (e) {
return [];
}
''';
WITH totals AS (
SELECT
_TABLE_SUFFIX,
COUNT(0) AS total_pages
FROM
`httparchive.pages.2021_07_01_*`
GROUP BY
_TABLE_SUFFIX
)
SELECT
_TABLE_SUFFIX AS client,
IF(IFNULL(TRIM(name), '') = '', '(not set)', name) AS name,
COUNT(0) AS freq,
COUNT(0) / SUM(COUNT(0)) OVER () AS pct_nodes,
COUNT(DISTINCT url) AS num_urls,
COUNT(DISTINCT url) / total_pages AS pct_pages
FROM
`httparchive.pages.2021_07_01_*`,
UNNEST(getMetaNodes(payload)) AS name
JOIN
totals
USING
(_TABLE_SUFFIX)
GROUP BY
client,
total_pages,
name
HAVING
freq > 1
ORDER BY
pct_nodes DESC,
client,
name
LIMIT 200
|
-- Create Enhanced Table Function (ETF) using input syntax:
-- CREATE FUNCTION tabfunc(t anytable) RETURNS ...
-- MPP-16614, the SELECT query would fail
DROP FUNCTION IF EXISTS transform(anytable);
CREATE OR REPLACE FUNCTION transform(a anytable)
RETURNS SETOF outtable
AS '$libdir/tabfunc_gppc_demo', 'mytransform'
LANGUAGE C;
\df transform
SELECT * FROM transform(
TABLE( SELECT * FROM randtable ORDER BY id, value SCATTER BY id)
) order by b;
-- The 1st workaround of MPP-16614
DROP FUNCTION IF EXISTS transform(anytable);
CREATE OR REPLACE FUNCTION transform(a anytable)
RETURNS SETOF RECORD
AS '$libdir/tabfunc_gppc_demo', 'mytransform'
LANGUAGE C;
SELECT * FROM transform(
TABLE( SELECT * FROM randtable ORDER BY id, value SCATTER BY id)
) AS t (a text, b int) order by b;
-- The 2nd workaround of MPP-16614
DROP FUNCTION IF EXISTS transform(anytable);
CREATE OR REPLACE FUNCTION transform(a anytable)
RETURNS TABLE (a text, b int)
AS '$libdir/tabfunc_gppc_demo', 'mytransform'
LANGUAGE C;
SELECT * FROM transform(
TABLE( SELECT * FROM randtable ORDER BY id, value SCATTER BY id)
) order by b;
-- create describe (callback) function
-- both input and output type must be internal
CREATE OR REPLACE FUNCTION project_desc(internal)
RETURNS internal
AS '$libdir/tabfunc_gppc_demo', 'project_describe'
LANGUAGE C;
-- create dynamic return type (drt) table function
-- using the callback function
-- the return type must be defined as set of record
CREATE OR REPLACE FUNCTION project(anytable, integer)
RETURNS setof record
AS '$libdir/tabfunc_gppc_demo', 'project'
LANGUAGE C
WITH (describe = project_desc);
-- Check callback function project_desc is registerred in pg_proc_callback
select * from pg_proc_callback
where profnoid='project'::regproc
and procallback='project_desc'::regproc;
|
<gh_stars>0
1I: helpers/example.sql;
select example();
|
BEGIN;
SELECT plan( 2 );
CREATE TABLE postgres_auth_methods (
auth_method text NOT NULL unique
);
COPY postgres_auth_methods (auth_method) FROM stdin;
md5
ldap
krb
ident
ident pgadmin
ident sameuser
\.
select lives_ok($$
select bitemporal_internal.pk_constraint('release_version_id') ;
select bitemporal_internal.unique_constraint('release_version') ;
CREATE TABLE database_versions (
release_version_id integer -- | not null default nextval('database_versions_id_seq'::regclass)
, release_version numeric(3,1) -- temporal unique
, effective temporal_relationships.timeperiod
, asserted temporal_relationships.timeperiod
, row_created_at timestamptz NOT NULL DEFAULT now()
, CONSTRAINT "bitemporal ok release_version_id unique idx" EXCLUDE
USING gist (release_version_id WITH =, asserted WITH &&, effective WITH &&)
, CONSTRAINT "bitemporal pk release_version_id"
check(true or 'pk' <> '@release_version_id@')
, CONSTRAINT "bitemporal unique release_version" EXCLUDE USING gist
(release_version WITH =, asserted WITH &&, effective WITH &&)
);
select bitemporal_internal.pk_constraint('postgres_cluster_id');
select bitemporal_internal.unique_constraint('port');
select bitemporal_internal.fk_constraint(
'postgres_version', 'database_versions', 'release_version');
CREATE TABLE postgres_clusters (
postgres_cluster_id integer NOT NULL -- bitemporal PK
, port int -- bitemporal unique
, name varchar(16)
, postgres_version int -- bitemporal fk
, archive boolean DEFAULT false NOT NULL
, preferred_auth_method text references postgres_auth_methods ( auth_method )
, effective temporal_relationships.timeperiod
, asserted temporal_relationships.timeperiod
, row_created_at temporal_relationships.time_endpoint NOT NULL DEFAULT now()
, CONSTRAINT "bitemporal pk postgres_cluster_id unique idx" EXCLUDE
USING gist (postgres_cluster_id WITH =, asserted WITH &&, effective WITH &&)
, CONSTRAINT "bitemporal pk postgres_cluster_id" check(true or 'pk' <> '@postgres_cluster_id@')
, CONSTRAINT "bitemporal unique port" EXCLUDE USING gist
(port WITH =, asserted WITH &&, effective WITH &&)
, CONSTRAINT "bitemporal fk postgres_versiondatabase_versionsrelease_version"
check (true or 'fk' <> '@postgres_version -> database_versions(release_version)@')
);
$$);
select results_eq($q$
/* relname,conname,contype,consrc */
select relname::name, conname::name, contype::char,pg_get_constraintdef(pg_constraint.oid)
from pg_constraint join pg_class on pg_class.oid = conrelid
where
conname like 'bitemporal%'
and relname in ( 'postgres_clusters' , 'database_versions' )
order by 1,2
$q$,$v$
VALUES
('database_versions'::name,'bitemporal ok release_version_id unique idx'::name
,'x'::char,'EXCLUDE USING gist (release_version_id WITH =, asserted WITH &&, effective WITH &&)')
,('database_versions'::name,'bitemporal pk release_version_id'::name
,'c'::char
,$src$CHECK ((true OR ('pk'::text <> '@release_version_id@'::text)))$src$)
,('database_versions'::name,'bitemporal unique release_version'::name
,'x'::char,'EXCLUDE USING gist (release_version WITH =, asserted WITH &&, effective WITH &&)')
,('postgres_clusters'::name
,'bitemporal fk postgres_versiondatabase_versionsrelease_version'::name
,'c'::char
,$$CHECK ((true OR ('fk'::text <> '@postgres_version -> database_versions(release_version)@'::text)))$$)
,('postgres_clusters'::name
,'bitemporal pk postgres_cluster_id'::name,'c'::char
,$$CHECK ((true OR ('pk'::text <> '@postgres_cluster_id@'::text)))$$)
,('postgres_clusters'::name
,'bitemporal pk postgres_cluster_id unique idx'::name
,'x'::char,$$EXCLUDE USING gist (postgres_cluster_id WITH =, asserted WITH &&, effective WITH &&)$$)
,('postgres_clusters'::name,'bitemporal unique port'::name
,'x'::char,$$EXCLUDE USING gist (port WITH =, asserted WITH &&, effective WITH &&)$$)
$v$);
/*
relname | conname | contype | consrc
-------------------+----------------------------------------------------------------+---------+--------------------------------------------------------------------------------------------
database_versions | bitemporal ok release_version_id unique idx | x |
database_versions | bitemporal pk release_version_id | c | (true OR ('pk'::text <> '@release_version_id@'::text))
database_versions | bitemporal unique release_version | x |
postgres_clusters | bitemporal fk postgres_versiondatabase_versionsrelease_version | c | (true OR ('fk'::text <> '@postgres_version -> database_versions(release_version)@'::text))
postgres_clusters | bitemporal pk postgres_cluster_id | c | (true OR ('pk'::text <> '@postgres_cluster_id@'::text))
postgres_clusters | bitemporal pk postgres_cluster_id unique idx | x |
postgres_clusters | bitemporal unique port | x |
(7 rows)
*/
SELECT * FROM finish();
ROLLBACK;
-- vim: set filetype=pgsql expandtab tabstop=2 shiftwidth=2:
|
create table num_t(zero int, one int, null_c int);
insert into num_t values (0, 1, NULL);
select 1 from num_t where zero=0 XOR zero=0;
select 1 from num_t where zero=0 XOR 1=zero;
select 1 from num_t where zero=0 XOR zero=NULL;
select 1 from num_t where zero=0 XOR 2=zero;
select 1 from num_t where zero=0 XOR 'a'=zero;
select 1 from num_t where one=0 XOR zero=0;
select 1 from num_t where one=0 XOR one=1;
select 1 from num_t where one=0 XOR null_c IS NULL;
select 1 from num_t where one=0 XOR 2=one;
select 1 from num_t where one=0 XOR 'a'=one;
select 1 from num_t where null_c=0 XOR zero IS NULL;
select 1 from num_t where null_c=0 XOR one IS NULL;
select 1 from num_t where null_c=0 XOR null_c IS NULL;
select 1 from num_t where null_c=0 XOR 2 IS NULL;
select 1 from num_t where null_c=0 XOR 'a' IS NULL;
select 1 from num_t where 2=zero XOR 0=one;
select 1 from num_t where 2=zero XOR 1=one;
select 1 from num_t where 2=zero XOR null_c IS NULL;
select 1 from num_t where 2=zero XOR 2=one;
select 1 from num_t where 2=zero XOR 'a'=one;
select 1 from num_t where 'a'=zero XOR 0=one;
select 1 from num_t where 'a'=zero XOR 1=one;
select 1 from num_t where 'a'=zero XOR null_c IS NULL;
select 1 from num_t where 'a'=zero XOR 2=one;
select 1 from num_t where 'a'=zero XOR 'a'=one;
select 1 from num_t where 'a'=zero XOR 'a'=one;
select 1 from num_t where 1234567890123456=zero XOR 1234567890=one;
drop table num_t;
|
/* SQL query that pulls North American pollen types names, pollen type IDs, and two columns of higher taxon names for each pollen type
from the Neotoma Paleoecology Database
By <NAME>
Notes:
- Geographical extent of the sites is defined by the lat/long bounding box but can change this by modifying conditiions in the WHERE clause
- North America Bounding box: W 166°41'00"--W 52°17'00"/N 72°22'00"--N 24°16'00"
-166.6833 to -52.28333/72.36667 to 24.26667
- est.ecolsetid = 1 pulls only taxa with a ecolsettype of Default plant */
SELECT DISTINCT taxa.taxonid AS TaxonID, taxa.taxonname AS TaxonName, htaxa1.taxonname AS HigherTaxon1, htaxa2.taxonname AS HigherTaxon2
FROM ndb.sites
INNER JOIN ndb.collectionunits AS cus ON sites.siteid = cus.siteid
INNER JOIN ndb.analysisunits AS aus ON cus.collectionunitid = aus.collectionunitid
INNER JOIN ndb.samples AS samp ON aus.analysisunitid = samp.analysisunitid
INNER JOIN ndb.data AS dat ON samp.sampleid = dat.sampleid
INNER JOIN ndb.variables AS vari ON dat.variableid = vari.variableid
INNER JOIN ndb.taxa ON vari.taxonid = taxa.taxonid
INNER JOIN ndb.taxa AS htaxa1 ON taxa.highertaxonid = htaxa1.taxonid
INNER JOIN ndb.taxa AS htaxa2 ON htaxa1.highertaxonid = htaxa2.taxonid
INNER JOIN ndb.ecolgroups AS ecg ON taxa.taxonid = ecg.taxonid
INNER JOIN ndb.ecolsettypes AS est ON ecg.ecolsetid = est.ecolsetid
WHERE est.ecolsetid = 1 AND sites.longitudeeast <= -52.28333 AND sites.longitudewest >= -166.6833
AND sites.latitudenorth <= 72.36667 AND sites.latitudesouth >= 24.26667
|
<filename>Tenant.SiteMetadata/private/sql/views/vw_SitesLockedReadOnly.sql<gh_stars>0
CREATE OR ALTER VIEW dbo.SitesLockedNoAccess
AS
SELECT
*
FROM
dbo.tvf_Sites(15,1)
WHERE
LockState = 2
|
<reponame>sejoung/spring-batch-test<gh_stars>0
insert into TB_READER(data,sync_yn,reg_dt) values('나는1','N',SYSDATE);
insert into TB_READER(data,sync_yn,reg_dt) values('너는2','N',SYSDATE);
insert into TB_READER(data,sync_yn,reg_dt) values('또는3','N',SYSDATE);
insert into TB_READER(data,sync_yn,reg_dt) values('하는4','N',SYSDATE);
|
<reponame>beleo/devilbox-dolphin
-- menu top
UPDATE `sys_menu_top` SET `Picture` = 'comments-alt' WHERE `Name` = 'Chat';
-- update module version
UPDATE `sys_modules` SET `version` = '1.1.0' WHERE `uri` = 'chat' AND `version` = '1.0.9';
|
/*
=====================================================================================================================
trigger: signUpAsClient()
whatdoes: registra un cliente al dar de alta un usuario.
=====================================================================================================================
*/
CREATE OR REPLACE FUNCTION signUpAsClient() RETURNS TRIGGER AS $funcemp$
DECLARE
planbasic plan% ROWTYPE;
currentuser varchar;
BEGIN
currentuser := (SELECT current_user);
if (currentuser = 'client') then
planbasic := (SELECT plan FROM plan WHERE plan.description='BASIC');
INSERT INTO client(available_consults, suscribed_to_plan, id_finaluser)
VALUES(planbasic.amount_consults, planbasic.description, NEW.id_finaluser);
end if;
RETURN NEW;
END; $funcemp$ LANGUAGE plpgsql;
CREATE TRIGGER signUpAsClient AFTER INSERT ON finaluser FOR EACH ROW EXECUTE PROCEDURE signUpAsClient();
/*
=============================================================================================================================
test: signUpAsClient()
=============================================================================================================================
*/
-- INSERT INTO finaluser (email, first_name, last_name, birthdate) VALUES('<EMAIL>', 'asd', 'asd', '06/08/1992');
-- SELECT c FROM client c, finaluser f WHERE c.id_finaluser=f.id_finaluser AND f.email='<EMAIL>';
-- DELETE FROM finaluser WHERE email='<EMAIL>';
/*
=====================================================================================================================
trigger: availableConsultsControl()
whatdoes: controla las consultas disponibles del cliente.
=====================================================================================================================
*/
CREATE OR REPLACE FUNCTION availableConsultsControl() RETURNS TRIGGER AS $funcemp$
DECLARE
amountcurrentplanqueries plan.amount_consults%TYPE;
amountqueriesmade queryhistory.amount_consults%TYPE;
availableconsults client.available_consults%TYPE;
BEGIN
amountcurrentplanqueries := (SELECT plan.amount_consults FROM plan, client
WHERE client.id_client=new.id_client AND client.suscribed_to_plan=plan.description);
-- raise notice 'amountcurrentplanqueries: %', amountcurrentplanqueries;
amountqueriesmade := new.amount_consults;
-- raise notice 'amountqueriesmade: %', amountqueriesmade;
availableconsults := (SELECT client.available_consults FROM client WHERE client.id_client=new.id_client);
-- raise notice 'availableconsults: %', availableconsults;
if (availableconsults = 0) then
raise exception 'Ha llegado a su limite de consultas.';
else
UPDATE client SET available_consults = amountcurrentplanqueries-amountqueriesmade
WHERE client.id_client=new.id_client;
end if;
RETURN NEW;
END; $funcemp$ LANGUAGE plpgsql;
CREATE TRIGGER availableConsultsControl AFTER UPDATE ON queryhistory FOR EACH ROW EXECUTE PROCEDURE availableConsultsControl();
/*
=============================================================================================================================
test: signUpAsClient()
=============================================================================================================================
*/
-- INSERT INTO finaluser (email, first_name, last_name, birthdate) VALUES('<EMAIL>', 'asd', 'asd', '06/08/1992');
-- SELECT c FROM client c, finaluser f WHERE c.id_finaluser=f.id_finaluser AND f.email='<EMAIL>';
-- SELECT saveInQueryHistory('idclient');
-- SELECT * FROM queryhistory WHERE queryhistory.id_client='idclient';
-- DELETE FROM finaluser WHERE email='<EMAIL>';
|
CREATE TABLE nv_store (
id bigint NOT NULL,
name text NOT NULL,
value int NOT NULL,
createdAt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE nv_store ADD PRIMARY KEY (id);
ALTER TABLE nv_store MODIFY id bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
CREATE PROCEDURE [dbo].[spToDos_ReadById]
@OwnerId nvarchar(50),
@Id int
AS
BEGIN
SET NOCOUNT ON;
SELECT ToDos.Id,
ToDos.ToDoText,
ToDos.IsComplete
FROM [dbo].[ToDos]
WHERE ToDos.OwnerId = @OwnerId AND Todos.Id = @Id;
END
|
alter table TB_WORK_PACKAGES
add SCHEDULED_DATE timestamp;
REORG table TB_WORK_PACKAGES;
|
CREATE TABLE ren_cms_Sub_Categories (
CID UNIQUEIDENTIFIER NULL
, langCode VARCHAR (128) NOT NULL
, longName VARCHAR (255) NOT NULL
, PKID UNIQUEIDENTIFIER ROWGUIDCOL NOT NULL
, ref VARCHAR (255) NOT NULL
, shortName VARCHAR (255) NOT NULL
)
|
create or replace package fsm_req_pkg
authid definer
as
/* Constructor for FSM_REQ_TYPE
* @param p_req instance of FSM_REQ_TYPE to be created
* @param p_req_id ID of the request
* @param p_req_fst_id Status of the request, reference to FSM_STATUS
* @param p_req_fev_list List of allowed events
* @param p_req_rtp_id type of the request, reference to FSM_REQ_TYPE
* @param p_req_rre_id requesting person, rerefence to FSM_requestors
* @param p_req_text request text
* @usage procedure is called from FSM_REQ_TYPE constructor function
* to create a new instance of FSM_REQ_TYPE
*/
procedure create_fsm_req(
p_req in out nocopy fsm_req_type,
p_req_id in fsm_requests.req_id%type default null,
p_req_fst_id in fsm_status.fst_id%type default fsm_fst.REQ_CREATED,
p_req_fev_list in fsm_event.fev_id%type default null,
p_req_rtp_id in fsm_request_types.rtp_id%type,
p_req_rre_id in fsm_requestors.rre_id%type,
p_req_text in fsm_requests.req_text%type);
/* Overlaod to re-create an already persisted instance from FSM_REQUESTS */
procedure create_fsm_req(
p_req in out nocopy fsm_req_type,
p_req_id in fsm_requests.req_id%type);
/* method to manually raise an event.
* @param p_req instance of type FSM_REQ_TYPE
* @param p_fev_id event to raise. Refernce to FSM_EVENT
* @usage This method is called if an event has to be called manually for a
* given instance of FSM_REQ_TYPE. Calling an event can be accomplished
* by calling this method manually, from a button or from a database job fi.
*/
function raise_event(
p_req in out nocopy fsm_req_type,
p_fev_id in fsm_event.fev_id%type)
return binary_integer;
/* method to set a new status.
* @param p_req instance of type FSM_REQ_TYPE
* @usage method is called from an event handler that has calculated the new status.
*/
function set_status(
p_req in out nocopy fsm_req_type)
return binary_integer;
end fsm_req_pkg;
/
|
<gh_stars>1-10
/* Formatted on 12-20-2018 9:55:35 AM (QP5 v5.126.903.23003) */
DECLARE
L_SQL VARCHAR2 (4000);
BEGIN
FOR CUR IN ( SELECT *
FROM ALL_OBJECTS
WHERE OBJECT_TYPE IN ('TABLE', 'SEQUENCE', 'FUNCTION')
AND OWNER IN (SELECT USERNAME
FROM SYS.ALL_USERS
WHERE USER_ID BETWEEN 106 AND 2000)
ORDER BY OWNER)
LOOP
L_SQL :=
'grant all on '
|| CUR.OWNER
|| '.'
|| CUR.OBJECT_NAME
|| ' to SYSADMIN,GST,EPAY,SEC,PRS,PASN,ORG';
DBMS_OUTPUT.PUT_LINE (L_SQL || ';');
EXECUTE IMMEDIATE L_SQL;
END LOOP;
END;
|
create or replace package body file_text_data_api
as
--------------------------------------------------------------------------------
procedure insert_rows (
i_frd_id in file_raw_data.frd_id%type)
is
l_ftd_id file_text_data.ftd_id%type;
begin
l_ftd_id:=insert_rows(i_frd_id);
end insert_rows;
--------------------------------------------------------------------------------
function insert_rows (
i_frd_id in file_raw_data.frd_id%type)
return number
is
l_frd_id file_raw_data.frd_id%type not null:=i_frd_id;
l_ftd_id file_text_data.ftd_id%type;
l_fmd_row file_meta_data%rowtype;
l_frd_row file_raw_data%rowtype;
l_sql varchar2(1000 char);
begin
select *
into l_frd_row
from file_raw_data
where frd_id=l_frd_id;
select *
into l_fmd_row
from file_meta_data
where l_frd_row.filename like case when filter_is_regular_expression=0
then replace(filename_match_filter, '*', '%')
else l_frd_row.filename
end
and regexp_like(l_frd_row.filename, case when filter_is_regular_expression=1
then filename_match_filter
else l_frd_row.filename
end);
l_ftd_id := file_text_data_seq.nextval;
l_sql:='begin imp_'||l_fmd_row.fad_id||'_file_adapter_data'||
'.insert_file_text_data(:1, :2, :3, :4, :5, :6); end;';
execute immediate l_sql using l_frd_row.frd_id,
l_fmd_row.fmd_id,
l_ftd_id,
l_frd_row.blob_value,
l_fmd_row.ora_charset_id,
l_fmd_row.ora_charset_name;
return l_ftd_id;
exception when no_data_found then
return null;
end insert_rows;
--------------------------------------------------------------------------------
procedure insert_rows (
i_frd_id in file_raw_data.frd_id%type,
o_ftd_id out file_text_data.ftd_id%type,
o_fmd_id out file_meta_data.fmd_id%type,
o_fad_id out file_adapter_data.fad_id%type,
o_filename out nocopy file_raw_data.filename%type,
o_filesize out nocopy file_raw_data.filename%type)
is
l_frd_id file_raw_data.frd_id%type not null:=i_frd_id;
l_ftd_id file_text_data.ftd_id%type;
l_fmd_row file_meta_data%rowtype;
l_frd_row file_raw_data%rowtype;
l_sql varchar2(1000 char);
begin
select *
into l_frd_row
from file_raw_data
where frd_id=l_frd_id;
o_filename:=l_frd_row.filename;
o_filesize:=l_frd_row.filesize;
select *
into l_fmd_row
from file_meta_data
where l_frd_row.filename like case when filter_is_regular_expression=0
then replace(filename_match_filter, '*', '%')
else l_frd_row.filename
end
and regexp_like(l_frd_row.filename, case when filter_is_regular_expression=1
then filename_match_filter
else l_frd_row.filename
end);
o_fmd_id:=l_fmd_row.fmd_id;
o_fad_id:=l_fmd_row.fad_id;
l_ftd_id := file_text_data_seq.nextval;
l_sql:='begin imp_'||l_fmd_row.fad_id||'_file_adapter_data'||
'.insert_file_text_data(:1, :2, :3, :4, :5, :6); end;';
execute immediate l_sql using l_frd_row.frd_id,
l_fmd_row.fmd_id,
l_ftd_id,
l_frd_row.blob_value,
l_fmd_row.ora_charset_id,
l_fmd_row.ora_charset_name;
o_ftd_id:=l_ftd_id;
exception when no_data_found then
o_ftd_id:=null;
end insert_rows;
--------------------------------------------------------------------------------
procedure delete_rows (
i_ftd_id in file_text_data.ftd_id%type)
is
l_ftd_id file_text_data.ftd_id%type not null:=i_ftd_id;
begin
delete file_text_data
where ftd_id=l_ftd_id;
commit;
end delete_rows;
--------------------------------------------------------------------------------
end file_text_data_api;
/
|
<reponame>StJudeWasHere/seonaut
ALTER TABLE `projects` DROP COLUMN `follow_nofollow`;
|
DROP TABLE IF EXISTS `uteknark`;
CREATE TABLE `uteknark` (
`id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
`stage` INT(3) UNSIGNED NOT NULL DEFAULT 1,
`time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`x` FLOAT(10) NOT NULL,
`y` FLOAT(10) NOT NULL,
`z` FLOAT(10) NOT NULL,
`soil` BIGINT(20) NOT NULL,
INDEX (`stage`, `time`)
);
|
<filename>backend/de.metas.ui.web.base/src/main/sql/postgresql/system/41-de.metas.ui.web.base/5479160_sys_gh711webui_PickingTerminal_viewProfiles_messages_delete.sql
-- 2017-12-04T00:16:01.753
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Message_Trl WHERE AD_Message_ID=544589
;
-- 2017-12-04T00:16:01.762
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Message WHERE AD_Message_ID=544589
;
-- 2017-12-04T00:16:06.852
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Message_Trl WHERE AD_Message_ID=544590
;
-- 2017-12-04T00:16:06.867
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Message WHERE AD_Message_ID=544590
;
|
-- phpMyAdmin SQL Dump
-- version phpStudy 2014
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期:
-- 服务器版本: 5.5.53
-- PHP 版本: 7.0.12
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- 数据库: `cj`
--
-- --------------------------------------------------------
--
-- 表的结构 `snake_articles`
--
CREATE TABLE IF NOT EXISTS `snake_articles` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '文章id',
`title` varchar(155) NOT NULL COMMENT '文章标题',
`description` varchar(255) NOT NULL COMMENT '文章描述',
`keywords` varchar(155) NOT NULL COMMENT '文章关键字',
`thumbnail` varchar(255) NOT NULL COMMENT '文章缩略图',
`content` text NOT NULL COMMENT '文章内容',
`add_time` datetime NOT NULL COMMENT '发布时间',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
--
-- 转存表中的数据 `snake_articles`
--
INSERT INTO `snake_articles` (`id`, `title`, `description`, `keywords`, `thumbnail`, `content`, `add_time`) VALUES
(2, '文章标题', '文章描述', '关键字1,关键字2,关键字3', '/upload/20170916/1e915c70dbb9d3e8a07bede7b64e4cff.png', '<p><img src="/upload/image/20170916/1505555254.png" title="1505555254.png" alt="QQ截图20170916174651.png"/></p><p>测试文章内容</p><p>测试内容</p>', '2017-09-16 17:47:44');
-- --------------------------------------------------------
--
-- 表的结构 `snake_game`
--
CREATE TABLE IF NOT EXISTS `snake_game` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`img` varchar(60) NOT NULL DEFAULT '',
`title` varchar(60) NOT NULL DEFAULT '',
`des` text NOT NULL,
`game_type` int(2) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
--
-- 转存表中的数据 `snake_game`
--
INSERT INTO `snake_game` (`id`, `img`, `title`, `des`, `game_type`) VALUES
(2, '/upload/20190812/97bd1fd9350e5b253ba283c4334c755e.png', '王者农药', 'moba手游444', 6);
-- --------------------------------------------------------
--
-- 表的结构 `snake_game_reward`
--
CREATE TABLE IF NOT EXISTS `snake_game_reward` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`gid` int(11) NOT NULL,
`content` varchar(50) NOT NULL DEFAULT '',
`img` varchar(255) NOT NULL DEFAULT '',
`chance` int(3) NOT NULL DEFAULT '0',
`price` decimal(10,2) NOT NULL DEFAULT '0.00',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
--
-- 转存表中的数据 `snake_game_reward`
--
INSERT INTO `snake_game_reward` (`id`, `gid`, `content`, `img`, `chance`, `price`) VALUES
(2, 2, '亚瑟皮肤一个价值188元', '/upload/20190813/417106a634cc03c45f3a2e1fbfcc0cc7.png', 3, '9.00'),
(3, 2, '立白皮肤一个价值188元', '/upload/20190926/9a7e3bf906873909bbc7dae0820dd8e6.jpg', 5, '0.00');
-- --------------------------------------------------------
--
-- 表的结构 `snake_game_type`
--
CREATE TABLE IF NOT EXISTS `snake_game_type` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`name` varchar(30) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=13 ;
--
-- 转存表中的数据 `snake_game_type`
--
INSERT INTO `snake_game_type` (`id`, `name`) VALUES
(3, '网易游戏'),
(4, '腾讯游戏'),
(5, '腾讯游戏'),
(6, '腾讯游戏');
-- --------------------------------------------------------
--
-- 表的结构 `snake_getcode_limit_ip`
--
CREATE TABLE IF NOT EXISTS `snake_getcode_limit_ip` (
`ip` int(20) NOT NULL,
`date` varchar(30) NOT NULL DEFAULT '',
`times` tinyint(4) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- 表的结构 `snake_node`
--
CREATE TABLE IF NOT EXISTS `snake_node` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`node_name` varchar(155) NOT NULL DEFAULT '' COMMENT '节点名称',
`control_name` varchar(155) NOT NULL DEFAULT '' COMMENT '控制器名',
`action_name` varchar(155) NOT NULL COMMENT '方法名',
`is_menu` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否是菜单项 1不是 2是',
`type_id` int(11) NOT NULL COMMENT '父级节点id',
`style` varchar(155) DEFAULT '' COMMENT '菜单样式',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=53 ;
--
-- 转存表中的数据 `snake_node`
--
INSERT INTO `snake_node` (`id`, `node_name`, `control_name`, `action_name`, `is_menu`, `type_id`, `style`) VALUES
(1, '用户管理', '#', '#', 2, 0, 'fa fa-users'),
(2, '管理员管理', 'user', 'index', 2, 1, ''),
(3, '添加管理员', 'user', 'useradd', 1, 2, ''),
(4, '编辑管理员', 'user', 'useredit', 1, 2, ''),
(5, '删除管理员', 'user', 'userdel', 1, 2, ''),
(6, '角色管理', 'role', 'index', 2, 1, ''),
(7, '添加角色', 'role', 'roleadd', 1, 6, ''),
(8, '编辑角色', 'role', 'roleedit', 1, 6, ''),
(9, '删除角色', 'role', 'roledel', 1, 6, ''),
(10, '分配权限', 'role', 'giveaccess', 1, 6, ''),
(11, '系统管理', '#', '#', 2, 0, 'fa fa-desktop'),
(12, '数据备份/还原', 'data', 'index', 2, 11, ''),
(13, '备份数据', 'data', 'importdata', 1, 12, ''),
(14, '还原数据', 'data', 'backdata', 1, 12, ''),
(15, '节点管理', 'node', 'index', 2, 1, ''),
(16, '添加节点', 'node', 'nodeadd', 1, 15, ''),
(17, '编辑节点', 'node', 'nodeedit', 1, 15, ''),
(18, '删除节点', 'node', 'nodedel', 1, 15, ''),
(19, '文章管理', 'articles', 'index', 2, 0, 'fa fa-book'),
(20, '文章列表', 'articles', 'index', 2, 19, ''),
(21, '添加文章', 'articles', 'articleadd', 1, 19, ''),
(22, '编辑文章', 'articles', 'articleedit', 1, 19, ''),
(23, '删除文章', 'articles', 'articledel', 1, 19, ''),
(24, '上传图片', 'articles', 'uploadImg', 1, 19, ''),
(25, '个人中心', '#', '#', 1, 0, ''),
(26, '编辑信息', 'profile', 'index', 1, 25, ''),
(27, '编辑头像', 'profile', 'headedit', 1, 25, ''),
(28, '上传头像', 'profile', 'uploadheade', 1, 25, ''),
(29, '游戏管理', '#', '#', 2, 0, 'fa fa-gamepad'),
(30, '游戏类型', 'gametype', 'index', 2, 29, 'fa fa-gamepad'),
(31, '编辑类型', 'gametype', 'gametypeedit', 1, 29, ''),
(32, '添加类型', 'gametype', 'gametypeadd', 1, 29, ''),
(33, '删除类型', 'gametype', 'gametypedel', 1, 29, ''),
(34, '游戏列表', 'game', 'index', 2, 29, ''),
(35, '添加游戏', 'game', 'gameadd', 1, 29, ''),
(36, '编辑游戏', 'game', 'gameedit', 1, 29, ''),
(37, '删除游戏', 'game', 'gamedel', 1, 29, ''),
(38, '抽奖管理', '#', '#', 2, 0, 'fa fa-cube'),
(39, '抽奖列表', 'reward', 'index', 2, 38, 'fa fa-bandcamp'),
(40, '删除抽奖', 'reward', 'rewarddel', 1, 38, 'fa fa-bandcamp'),
(41, '中奖记录', 'rewarded', 'index', 2, 38, ''),
(42, '删除中奖', 'rewarded', 'rewardeddel', 1, 38, ''),
(43, '奖品列表', 'gamereward', 'index', 2, 29, ''),
(44, '添加奖品', 'gamereward', 'gamerewardadd', 1, 29, ''),
(45, '编辑奖品', 'gamereward', 'gamerewardedit', 1, 29, ''),
(46, '删除奖品', 'gamereward', 'gamerewarddel', 1, 29, ''),
(47, '订单管理', '#', '#', 2, 0, 'fa fa-file-text-o'),
(48, '订单列表', 'order', 'index', 2, 47, 'fa fa-file-text-o'),
(49, '删除订单', 'order', 'orderdel', 1, 47, 'fa fa-file-text-o'),
(51, '用户列表', 'users', 'index', 2, 1, ''),
(52, '删除用户', 'users', 'usersdel', 1, 51, '');
-- --------------------------------------------------------
--
-- 表的结构 `snake_order`
--
CREATE TABLE IF NOT EXISTS `snake_order` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`order_no` varchar(20) NOT NULL DEFAULT '' COMMENT '订单号',
`uid` int(11) NOT NULL,
`gid` int(11) NOT NULL,
`cagegory` int(1) NOT NULL DEFAULT '1',
`money` decimal(10,2) NOT NULL DEFAULT '0.00',
`status` int(1) NOT NULL DEFAULT '0',
`trade_no` varchar(50) NOT NULL DEFAULT '',
`createtime` int(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;
--
-- 转存表中的数据 `snake_order`
--
INSERT INTO `snake_order` (`id`, `order_no`, `uid`, `gid`, `cagegory`, `money`, `status`, `trade_no`, `createtime`) VALUES
(1, '20190814093930', 1, 2, 1, '1.00', 1, '', 1565746770),
(2, '20190814093955', 1, 2, 1, '1.00', 0, '', 1565746795),
(3, '20190814100438', 1, 2, 2, '10.00', 0, '', 0),
(4, '20190814100536', 1, 2, 2, '10.00', 0, '', 1565748336),
(5, '20190819135402', 1, 2, 1, '1.00', 0, '', 1566194042),
(6, '20190819135415', 1, 2, 1, '1.00', 0, '', 1566194055),
(7, '20190819135424', 1, 2, 1, '1.00', 0, '', 1566194064),
(8, '20190819135533', 1, 2, 1, '1.00', 0, '', 1566194133),
(9, '20190819135715', 1, 2, 1, '1.00', 0, '', 1566194235),
(10, '20190819135809', 1, 2, 1, '1.00', 0, '', 1566194289);
-- --------------------------------------------------------
--
-- 表的结构 `snake_reward_record`
--
CREATE TABLE IF NOT EXISTS `snake_reward_record` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`orderid` int(11) unsigned NOT NULL,
`uid` int(11) NOT NULL,
`gid` int(11) NOT NULL,
`isreward` int(1) NOT NULL,
`reward` varchar(60) NOT NULL DEFAULT '',
`createtime` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
--
-- 转存表中的数据 `snake_reward_record`
--
INSERT INTO `snake_reward_record` (`id`, `orderid`, `uid`, `gid`, `isreward`, `reward`, `createtime`) VALUES
(1, 1, 1, 2, 1, '[3,3]', 0),
(2, 1, 1, 2, 1, '[3]', 1565776989),
(3, 1, 1, 2, 0, '', 1566372412);
-- --------------------------------------------------------
--
-- 表的结构 `snake_reward_user`
--
CREATE TABLE IF NOT EXISTS `snake_reward_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0',
`gid` int(11) NOT NULL DEFAULT '0',
`cagegory` int(1) NOT NULL DEFAULT '1',
`orderid` int(11) NOT NULL DEFAULT '0',
`phone_type` int(1) NOT NULL DEFAULT '1' COMMENT '1安卓2苹果',
`account_type` int(1) NOT NULL DEFAULT '1',
`account` varchar(30) NOT NULL DEFAULT '',
`phone` varchar(11) NOT NULL DEFAULT '',
`other` varchar(50) NOT NULL DEFAULT '',
`createtime` int(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
--
-- 转存表中的数据 `snake_reward_user`
--
INSERT INTO `snake_reward_user` (`id`, `uid`, `gid`, `cagegory`, `orderid`, `phone_type`, `account_type`, `account`, `phone`, `other`, `createtime`) VALUES
(1, 1, 2, 1, 1, 1, 1, '17826445252', '17826445252', '132', 1565778103),
(2, 1, 2, 1, 1, 1, 1, '17826445252', '17826445252', '132', 1565778108);
-- --------------------------------------------------------
--
-- 表的结构 `snake_role`
--
CREATE TABLE IF NOT EXISTS `snake_role` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`role_name` varchar(155) NOT NULL COMMENT '角色名称',
`rule` varchar(255) DEFAULT '' COMMENT '权限节点数据',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=3 ;
--
-- 转存表中的数据 `snake_role`
--
INSERT INTO `snake_role` (`id`, `role_name`, `rule`) VALUES
(1, '超级管理员', '*'),
(2, '系统维护员', '1,2,3,4,5,6,7,8,9,10');
-- --------------------------------------------------------
--
-- 表的结构 `snake_sendcode`
--
CREATE TABLE IF NOT EXISTS `snake_sendcode` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`account` int(11) NOT NULL,
`content` varchar(10) NOT NULL,
`addtime` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `snake_user`
--
CREATE TABLE IF NOT EXISTS `snake_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_name` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '用户名',
`password` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '密码',
`head` varchar(255) COLLATE utf8_bin DEFAULT '' COMMENT '头像',
`login_times` int(11) NOT NULL DEFAULT '0' COMMENT '登陆次数',
`last_login_ip` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '最后登录IP',
`last_login_time` int(11) NOT NULL DEFAULT '0' COMMENT '最后登录时间',
`real_name` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '真实姓名',
`status` int(1) NOT NULL DEFAULT '0' COMMENT '状态',
`role_id` int(11) NOT NULL DEFAULT '1' COMMENT '用户角色id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=3 ;
--
-- 转存表中的数据 `snake_user`
--
INSERT INTO `snake_user` (`id`, `user_name`, `password`, `head`, `login_times`, `last_login_ip`, `last_login_time`, `real_name`, `status`, `role_id`) VALUES
(1, 'admin', '<PASSWORD>', '/static/admin/images/profile_small.jpg', 52, '127.0.0.1', 1569832035, 'admin', 1, 1),
(2, 'fff', '<PASSWORD>', '/static/admin/images/profile_small.jpg', 0, '', 0, 'fff', 1, 2);
-- --------------------------------------------------------
--
-- 表的结构 `snake_users`
--
CREATE TABLE IF NOT EXISTS `snake_users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`nickname` varchar(30) NOT NULL DEFAULT '',
`user_login` varchar(60) NOT NULL DEFAULT '' COMMENT '登录名',
`user_pass` varchar(64) NOT NULL DEFAULT '',
`token` varchar(32) NOT NULL DEFAULT '',
`expiretime` int(10) NOT NULL DEFAULT '0',
`last_login_ip` varchar(16) NOT NULL DEFAULT '',
`last_login_time` varchar(20) NOT NULL DEFAULT '',
`create_time` int(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
--
-- 转存表中的数据 `snake_users`
--
INSERT INTO `snake_users` (`id`, `nickname`, `user_login`, `user_pass`, `token`, `expiretime`, `last_login_ip`, `last_login_time`, `create_time`) VALUES
(1, '山顶洞人', '17826445252', '<PASSWORD>', '<PASSWORD>9333', 1591607775, '192.168.3.11', '2019-08-13 17:16:15', 1565687313);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
<reponame>Solotzy/Analysis-of-BlogEngine.NET<gh_stars>0
ALTER TABLE `be_PostComment` ADD `IsSpam` tinyint(1) NOT NULL DEFAULT '0';
ALTER TABLE `be_PostComment` ADD `IsDeleted` tinyint(1) NOT NULL DEFAULT '0';
ALTER TABLE `be_Posts` ADD `IsDeleted` tinyint(1) NOT NULL DEFAULT '0';
ALTER TABLE `be_Pages` ADD `IsDeleted` tinyint(1) NOT NULL DEFAULT '0';
CREATE TABLE IF NOT EXISTS `be_Rights` (
`RightName` varchar(100) NOT NULL,
PRIMARY KEY (`RightName`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `be_RightRoles` (
`RightName` varchar(100) NOT NULL,
`Role` varchar(100) NOT NULL,
PRIMARY KEY (`RightName`, `Role`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
<reponame>BrettPWRE/HDB<gh_stars>0
alter table hdb_ext_site_code_sys
add
constraint hdb_ext_site_code_sys_fk1
foreign key (agen_id)
references hdb_agen(agen_id);
alter table hdb_ext_site_code_sys
add
constraint hdb_ext_site_code_sys_fk2
foreign key (model_id)
references hdb_model(model_id);
|
<gh_stars>0
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE general_params ( "name" text, "value" text );
INSERT INTO "general_params" VALUES('list_report_data_table','V_Storage_List_Report');
INSERT INTO "general_params" VALUES('list_report_data_sort_dir','DESC');
INSERT INTO "general_params" VALUES('detail_report_data_table','V_Storage_Detail_Report');
INSERT INTO "general_params" VALUES('detail_report_data_id_col','ID');
INSERT INTO "general_params" VALUES('detail_report_data_id_type','integer');
INSERT INTO "general_params" VALUES('entry_sproc','AddUpdateStorage');
INSERT INTO "general_params" VALUES('entry_page_data_table','V_Storage_Entry');
INSERT INTO "general_params" VALUES('entry_page_data_id_col','SP_ID');
CREATE TABLE form_fields ( id INTEGER PRIMARY KEY, "name" text, "label" text, "type" text, "size" text, "maxlength" text, "rows" text, "cols" text, "default" text, "rules" text);
INSERT INTO "form_fields" VALUES(1,'SP_ID','ID','non-edit','','','','','0','trim');
INSERT INTO "form_fields" VALUES(2,'SP_path','Path','text','40','255','','','','trim|required|max_length[255]');
INSERT INTO "form_fields" VALUES(3,'SP_vol_name_client','Volume (client)','text','40','128','','','','trim|max_length[128]');
INSERT INTO "form_fields" VALUES(4,'SP_vol_name_server','Volume (server)','text','40','128','','','','trim|required|max_length[128]');
INSERT INTO "form_fields" VALUES(5,'SP_function','Function','text','40','80','','','','trim|required|max_length[50]');
INSERT INTO "form_fields" VALUES(6,'SP_instrument_name','Instrument','text','40','80','','','','trim|required|max_length[50]');
INSERT INTO "form_fields" VALUES(7,'SP_description','Description','area','','','4','50','','trim|max_length[255]');
CREATE TABLE form_field_choosers ( id INTEGER PRIMARY KEY, "field" text, "type" text, "PickListName" text, "Target" text, "XRef" text, "Delimiter" text, "Label" text);
INSERT INTO "form_field_choosers" VALUES(1,'SP_function','picker.replace','storageFunctionPickList','','',',','');
INSERT INTO "form_field_choosers" VALUES(2,'SP_instrument_name','picker.replace','instrumentNamePickList','','',',','');
CREATE TABLE list_report_hotlinks ( id INTEGER PRIMARY KEY, "name" text, "LinkType" text, "WhichArg" text, "Target" text, "Options" text );
INSERT INTO "list_report_hotlinks" VALUES(1,'ID','invoke_entity','value','storage/show/','');
INSERT INTO "list_report_hotlinks" VALUES(2,'Instrument','invoke_entity','value','instrument/show/','');
CREATE TABLE sproc_args ( id INTEGER PRIMARY KEY, "field" text, "name" text, "type" text, "dir" text, "size" text, "procedure" text);
INSERT INTO "sproc_args" VALUES(1,'SP_path','path','varchar','input','255','AddUpdateStorage');
INSERT INTO "sproc_args" VALUES(2,'SP_vol_name_client','volNameClient','varchar','input','128','AddUpdateStorage');
INSERT INTO "sproc_args" VALUES(3,'SP_vol_name_server','volNameServer','varchar','input','128','AddUpdateStorage');
INSERT INTO "sproc_args" VALUES(4,'SP_function','storFunction','varchar','input','50','AddUpdateStorage');
INSERT INTO "sproc_args" VALUES(5,'SP_instrument_name','instrumentName','varchar','input','50','AddUpdateStorage');
INSERT INTO "sproc_args" VALUES(6,'SP_description','description','varchar','input','255','AddUpdateStorage');
INSERT INTO "sproc_args" VALUES(7,'SP_ID','ID','varchar','output','32','AddUpdateStorage');
INSERT INTO "sproc_args" VALUES(8,'<local>','mode','varchar','input','12','AddUpdateStorage');
INSERT INTO "sproc_args" VALUES(9,'<local>','message','varchar','output','512','AddUpdateStorage');
CREATE TABLE list_report_primary_filter ( id INTEGER PRIMARY KEY, "name" text, "label" text, "size" text, "value" text, "col" text, "cmp" text, "type" text, "maxlength" text, "rows" text, "cols" text );
INSERT INTO "list_report_primary_filter" VALUES(1,'pf_vol_client','Vol Client','20','','Vol Client','ContainsText','text','128','','');
INSERT INTO "list_report_primary_filter" VALUES(2,'pf_instrument','Instrument','20','','Instrument','ContainsText','text','50','','');
INSERT INTO "list_report_primary_filter" VALUES(3,'pf_function','Function','20','','Function','ContainsText','text','50','','');
INSERT INTO "list_report_primary_filter" VALUES(4,'pf_description','Description','20','','Description','ContainsText','text','255','','');
INSERT INTO "list_report_primary_filter" VALUES(5,'pf_path','Path','20','','Path','ContainsText','text','255','','');
CREATE TABLE detail_report_hotlinks ( idx INTEGER PRIMARY KEY, "name" text, "LinkType" text, "WhichArg" text, "Target" text, "Placement" text, "id" text , options text);
INSERT INTO "detail_report_hotlinks" VALUES(1,'Instrument','detail-report','Instrument','instrument/show/','labelCol','dl_Instrument','');
COMMIT;
|
<gh_stars>0
set session group_concat_max_len = 1000000
go
drop view permissions_meta.db_gen_table_columns
go
create view permissions_meta.db_gen_table_columns as (
select get_column_tables.table_schema,
get_column_tables.table_name,
group_concat(
concat('\t', get_column_tables.table_acronym, '.', isc.column_name, ' as ', get_column_tables.table_acronym, '_', isc.column_name)
separator ', \n '
)as alias_column
from
(
select base.table_schema,
base.table_name,
acronym(base.table_name) as table_acronym
from
(
select kcu.table_schema,
kcu.table_name
from information_schema.key_column_usage kcu
where kcu.constraint_schema = 'permissions_meta'
and ((kcu.constraint_name like 'fk_%') or (kcu.constraint_name like 'REL%'))
union
select kcu.referenced_table_schema,
kcu.referenced_table_name
from information_schema.key_column_usage kcu
where kcu.constraint_schema = 'permissions_meta'
and ((kcu.constraint_name like 'fk_%') or (kcu.constraint_name like 'REL%'))
) as base
) as get_column_tables
left join information_schema.columns isc
on get_column_tables.table_schema = isc.table_schema
and get_column_tables.table_name = isc.table_name
group by get_column_tables.table_schema,
get_column_tables.table_name
)
go
select forign_key_data.table_schema,
forign_key_data.table_name,
concat('drop view ', forign_key_data.schema_for_the_views, '.', forign_key_data.table_name, '_', forign_key_data.suffix_for_view, ' \n', forign_key_data.statement_sep, '\n') as drop_view,
concat(
-- Create View:
'create view ', forign_key_data.schema_for_the_views, '.', forign_key_data.table_name, '_', forign_key_data.suffix_for_view, ' as ( \n'
'select \n ',
orig_pmtc.alias_column, ', \n ',
group_concat(
ref_pmtc.alias_column
separator ', \n '
),
-- Froms:
concat('\nfrom ', forign_key_data.child_table, ' as ', forign_key_data.child_table_alias, '\n'),
group_concat(
concat('\t inner join ', forign_key_data.parent_table, ' as ', forign_key_data.parent_table_alias,
' \n \t \t on ', child_join_column, ' = ', parent_join_column)
separator ' \n '
),
-- End Create:
'\n ) \n',
forign_key_data.statement_sep, '\n'
) as create_view
from
(
select base.table_schema,
base.table_name,
concat(base.table_schema, '.', base.table_name) as child_table,
base.child_table_alias,
concat(base.child_table_alias, '.', base.column_name) as child_join_column,
base.referenced_table_schema,
base.referenced_table_name,
base.parent_table,
base.parent_table_alias,
concat(base.parent_table_alias, '.', base.referenced_column_name) as parent_join_column,
'permissions_meta' as schema_for_the_views,
'denorm' as suffix_for_view,
'go' as statement_sep
from
(
select kcu.table_schema,
kcu.table_name,
kcu.column_name,
acronym(kcu.table_name) as child_table_alias,
kcu.referenced_table_schema,
kcu.referenced_table_name,
concat(kcu.referenced_table_schema, '.', kcu.referenced_table_name) as parent_table,
acronym(kcu.referenced_table_name) as parent_table_alias,
kcu.referenced_column_name
from information_schema.key_column_usage kcu
where kcu.constraint_schema = 'permissions_meta'
and ((kcu.constraint_name like 'fk_%') or (kcu.constraint_name like 'REL%'))
) as base
) as forign_key_data
inner join permissions_meta.db_gen_table_columns orig_pmtc
on forign_key_data.table_schema = orig_pmtc.table_schema
and forign_key_data.table_name = orig_pmtc.table_name
inner join permissions_meta.db_gen_table_columns ref_pmtc
on forign_key_data.referenced_table_schema = ref_pmtc.table_schema
and forign_key_data.referenced_table_name = ref_pmtc.table_name
group by forign_key_data.table_schema,
forign_key_data.table_name,
orig_pmtc.alias_column,
forign_key_data.child_table_alias,
forign_key_data.child_table
|
SELECT F1(f2(a),b) FROM t
|
UPDATE `sp_metric_expression` SET `enable` = 0 WHERE `id` = (SELECT `id` FROM (SELECT `id` FROM `sp_metric_expression` WHERE `enable` = 1 AND `expression` LIKE "%\"alias\":\"application_cache_service\"%") AS `ids`);
UPDATE `sp_metric_expression` SET `enable` = 0 WHERE `id` = (SELECT `id` FROM (SELECT `id` FROM `sp_metric_expression` WHERE `enable` = 1 AND `expression` LIKE "%\"alias\":\"application_db_service\"%") AS `ids`);
UPDATE `sp_metric_expression` SET `enable` = 0 WHERE `id` = (SELECT `id` FROM (SELECT `id` FROM `sp_metric_expression` WHERE `enable` = 1 AND `expression` LIKE "%\"alias\":\"application_http_service\"%") AS `ids`);
UPDATE `sp_metric_expression` SET `enable` = 0 WHERE `id` = (SELECT `id` FROM (SELECT `id` FROM `sp_metric_expression` WHERE `enable` = 1 AND `expression` LIKE "%\"alias\":\"application_mq_service\"%") AS `ids`);
UPDATE `sp_metric_expression` SET `enable` = 0 WHERE `id` = (SELECT `id` FROM (SELECT `id` FROM `sp_metric_expression` WHERE `enable` = 1 AND `expression` LIKE "%\"alias\":\"application_rpc_service\"%") AS `ids`);
UPDATE `sp_metric_expression` SET `enable` = 0 WHERE `id` = (SELECT `id` FROM (SELECT `id` FROM `sp_metric_expression` WHERE `enable` = 1 AND `expression` LIKE "%\"alias\":\"trace\"%") AS `ids`);
INSERT `sp_metric_expression`(`attributes`,`expression`,`version`) VALUES("{}","{\"alias\":\"application_cache_service\",\"filter\":{},\"functions\":[{\"aggregator\":\"sum\",\"field\":\"elapsed\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_mean * field.elapsed_count; }\"},{\"aggregator\":\"sum\",\"field\":\"count\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_count; }\"}],\"group\":[\"host\",\"source_terminus_key\",\"source_application_id\",\"source_runtime_name\",\"source_service_name\",\"source_addon_id\"],\"metric\":\"application_cache\",\"outputs\":[\"metric\"],\"select\":{\"cluster_name\":\"#cluster_name\",\"component\":\"#component\",\"db_type\":\"#db_type\",\"host\":\"#host\",\"source_addon_id\":\"#source_addon_id\",\"source_addon_type\":\"#source_addon_type\",\"source_application_id\":\"#source_application_id\",\"source_application_name\":\"#source_application_name\",\"source_project_id\":\"#source_project_id\",\"source_project_name\":\"#source_project_name\",\"source_runtime_id\":\"#source_runtime_id\",\"source_runtime_name\":\"#source_runtime_name\",\"source_service_id\":\"#source_service_id\",\"source_service_name\":\"#source_service_name\",\"source_terminus_key\":\"#source_terminus_key\",\"source_workspace\":\"#source_workspace\"},\"window\":1}","3.0");
INSERT `sp_metric_expression`(`attributes`,`expression`,`version`) VALUES("{}","{\"alias\":\"application_db_service\",\"filter\":{},\"functions\":[{\"aggregator\":\"sum\",\"field\":\"elapsed\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_mean * field.elapsed_count; }\"},{\"aggregator\":\"sum\",\"field\":\"count\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_count; }\"}],\"group\":[\"host\",\"source_terminus_key\",\"source_application_id\",\"source_runtime_name\",\"source_service_name\",\"source_addon_id\"],\"metric\":\"application_db\",\"outputs\":[\"metric\"],\"select\":{\"cluster_name\":\"#cluster_name\",\"component\":\"#component\",\"db_type\":\"#db_type\",\"host\":\"#host\",\"source_addon_id\":\"#source_addon_id\",\"source_addon_type\":\"#source_addon_type\",\"source_application_id\":\"#source_application_id\",\"source_application_name\":\"#source_application_name\",\"source_project_id\":\"#source_project_id\",\"source_project_name\":\"#source_project_name\",\"source_runtime_id\":\"#source_runtime_id\",\"source_runtime_name\":\"#source_runtime_name\",\"source_service_id\":\"#source_service_id\",\"source_service_name\":\"#source_service_name\",\"source_terminus_key\":\"#source_terminus_key\",\"source_workspace\":\"#source_workspace\"},\"window\":1}","3.0");
INSERT `sp_metric_expression`(`attributes`,`expression`,`version`) VALUES("{}","{\"alias\":\"application_http_service\",\"filter\":{},\"functions\":[{\"aggregator\":\"sum\",\"field\":\"elapsed\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_mean * field.elapsed_count; }\"},{\"aggregator\":\"sum\",\"field\":\"count\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_count; }\"},{\"aggregator\":\"sum\",\"field\":\"errors\",\"field_script\":\"function invoke(field, tag){ return tag.error=='true'?field.elapsed_count:0; }\"}],\"group\":[\"host\",\"req_host\",\"target_terminus_key\",\"target_application_id\",\"target_runtime_name\",\"target_service_name\",\"target_addon_id\",\"source_terminus_key\",\"source_application_id\",\"source_runtime_name\",\"source_service_name\",\"source_addon_id\"],\"metric\":\"application_http\",\"outputs\":[\"metric\"],\"select\":{\"cluster_name\":\"#cluster_name\",\"component\":\"#component\",\"db_type\":\"#db_type\",\"host\":\"#host\",\"peer_service_scope\":\"#peer_service_scope\",\"req_host\":\"#req_host\",\"source_addon_id\":\"#source_addon_id\",\"source_addon_type\":\"#source_addon_type\",\"source_application_id\":\"#source_application_id\",\"source_application_name\":\"#source_application_name\",\"source_project_id\":\"#source_project_id\",\"source_project_name\":\"#source_project_name\",\"source_runtime_id\":\"#source_runtime_id\",\"source_runtime_name\":\"#source_runtime_name\",\"source_service_id\":\"#source_service_id\",\"source_service_name\":\"#source_service_name\",\"source_terminus_key\":\"#source_terminus_key\",\"source_workspace\":\"#source_workspace\",\"target_addon_id\":\"#target_addon_id\",\"target_addon_type\":\"#target_addon_type\",\"target_application_id\":\"#target_application_id\",\"target_application_name\":\"#target_application_name\",\"target_instance_id\":\"#target_instance_id\",\"target_project_id\":\"#target_project_id\",\"target_project_name\":\"#target_project_name\",\"target_runtime_name\":\"#target_runtime_name\",\"target_service_id\":\"#target_service_id\",\"target_service_name\":\"#target_service_name\",\"target_terminus_key\":\"#target_terminus_key\",\"target_workspace\":\"#target_workspace\"},\"window\":1}","3.0");
INSERT `sp_metric_expression`(`attributes`,`expression`,`version`) VALUES("{}","{\"alias\":\"application_mq_service\",\"filter\":{},\"functions\":[{\"aggregator\":\"sum\",\"field\":\"elapsed\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_mean * field.elapsed_count; }\"},{\"aggregator\":\"sum\",\"field\":\"count\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_count; }\"}],\"group\":[\"host\",\"target_terminus_key\",\"target_application_id\",\"target_runtime_name\",\"target_service_name\",\"target_addon_id\",\"source_terminus_key\",\"source_application_id\",\"source_runtime_name\",\"source_service_name\",\"source_addon_id\"],\"metric\":\"application_mq\",\"outputs\":[\"metric\"],\"select\":{\"cluster_name\":\"#cluster_name\",\"component\":\"#component\",\"db_type\":\"#db_type\",\"host\":\"#host\",\"source_addon_id\":\"#source_addon_id\",\"source_addon_type\":\"#source_addon_type\",\"source_application_id\":\"#source_application_id\",\"source_application_name\":\"#source_application_name\",\"source_project_id\":\"#source_project_id\",\"source_project_name\":\"#source_project_name\",\"source_runtime_id\":\"#source_runtime_id\",\"source_runtime_name\":\"#source_runtime_name\",\"source_service_id\":\"#source_service_id\",\"source_service_name\":\"#source_service_name\",\"source_terminus_key\":\"#source_terminus_key\",\"source_workspace\":\"#source_workspace\",\"target_addon_id\":\"#target_addon_id\",\"target_addon_type\":\"#target_addon_type\",\"target_application_id\":\"#target_application_id\",\"target_application_name\":\"#target_application_name\",\"target_instance_id\":\"#target_instance_id\",\"target_project_id\":\"#target_project_id\",\"target_project_name\":\"#target_project_name\",\"target_runtime_name\":\"#target_runtime_name\",\"target_service_id\":\"#target_service_id\",\"target_service_name\":\"#target_service_name\",\"target_terminus_key\":\"#target_terminus_key\",\"target_workspace\":\"#target_workspace\"},\"window\":1}","3.0");
INSERT `sp_metric_expression`(`attributes`,`expression`,`version`) VALUES("{}","{\"alias\":\"application_rpc_service\",\"filter\":{},\"functions\":[{\"aggregator\":\"sum\",\"field\":\"elapsed\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_mean * field.elapsed_count; }\"},{\"aggregator\":\"sum\",\"field\":\"count\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_count; }\"},{\"aggregator\":\"sum\",\"field\":\"errors\",\"field_script\":\"function invoke(field, tag){ return tag.error=='true'?field.elapsed_count:0; }\"}],\"group\":[\"host\",\"target_terminus_key\",\"target_application_id\",\"target_runtime_name\",\"target_service_name\",\"target_addon_id\",\"source_terminus_key\",\"source_application_id\",\"source_runtime_name\",\"source_service_name\",\"source_addon_id\"],\"metric\":\"application_rpc\",\"outputs\":[\"metric\"],\"select\":{\"cluster_name\":\"#cluster_name\",\"component\":\"#component\",\"db_type\":\"#db_type\",\"host\":\"#host\",\"peer_service_scope\":\"#peer_service_scope\",\"source_addon_id\":\"#source_addon_id\",\"source_addon_type\":\"#source_addon_type\",\"source_application_id\":\"#source_application_id\",\"source_application_name\":\"#source_application_name\",\"source_project_id\":\"#source_project_id\",\"source_project_name\":\"#source_project_name\",\"source_runtime_id\":\"#source_runtime_id\",\"source_runtime_name\":\"#source_runtime_name\",\"source_service_id\":\"#source_service_id\",\"source_service_name\":\"#source_service_name\",\"source_terminus_key\":\"#source_terminus_key\",\"source_workspace\":\"#source_workspace\",\"target_addon_id\":\"#target_addon_id\",\"target_addon_type\":\"#target_addon_type\",\"target_application_id\":\"#target_application_id\",\"target_application_name\":\"#target_application_name\",\"target_instance_id\":\"#target_instance_id\",\"target_project_id\":\"#target_project_id\",\"target_project_name\":\"#target_project_name\",\"target_runtime_name\":\"#target_runtime_name\",\"target_service_id\":\"#target_service_id\",\"target_service_name\":\"#target_service_name\",\"target_terminus_key\":\"#target_terminus_key\",\"target_workspace\":\"#target_workspace\"},\"window\":1}","3.0");
INSERT `sp_metric_expression`(`attributes`,`expression`,`version`) VALUES("{}","{\"alias\":\"trace\",\"filter\":{},\"functions\":[{\"aggregator\":\"min\",\"alias\":\"start_time\",\"field\":\"start_time\"},{\"aggregator\":\"max\",\"alias\":\"end_time\",\"field\":\"end_time\"},{\"aggregator\":\"distinct\",\"alias\":\"components\",\"field\":\"components\",\"field_script\":\"function invoke(field, tag){ if(tag.span_layer=='http' || tag.span_layer=='rpc') return tag.service_name; return tag.component; }\"},{\"aggregator\":\"sum\",\"field\":\"errors\",\"field_script\":\"function invoke(field, tag){ return tag.error=='true'?1:0; }\"},{\"aggregator\":\"distinct\",\"alias\":\"application_names\",\"field\":\"applications\",\"field_script\":\"function invoke(field, tag){ return tag.application_name; }\"},{\"aggregator\":\"distinct\",\"alias\":\"applications_ids\",\"field\":\"applications_ids\",\"field_script\":\"function invoke(field, tag){ return tag.application_id; }\"},{\"aggregator\":\"distinct\",\"alias\":\"service_names\",\"field\":\"service_names\",\"field_script\":\"function invoke(field, tag){ return tag.service_name; }\"},{\"aggregator\":\"distinct\",\"alias\":\"service_ids\",\"field\":\"service_ids\",\"field_script\":\"function invoke(field, tag){ return tag.service_id; }\"},{\"aggregator\":\"distinct\",\"alias\":\"dubbo_methods\",\"field\":\"dubbo_methods\",\"field_script\":\"function invoke(field, tag){ return tag.dubbo_method; }\"},{\"aggregator\":\"distinct\",\"alias\":\"http_paths\",\"field\":\"http_paths\",\"field_script\":\"function invoke(field, tag){ return tag.http_path; }\"},{\"aggregator\":\"distinct\",\"alias\":\"db_statements\",\"field\":\"db_statements\",\"field_script\":\"function invoke(field, tag){ return tag.db_statement; }\"},{\"aggregator\":\"distinct\",\"alias\":\"topics\",\"field\":\"topics\",\"field_script\":\"function invoke(field, tag){ return tag.message_bus_destination; }\"},{\"aggregator\":\"distinct\",\"alias\":\"terminus_keys\",\"field\":\"terminus_keys\",\"field_script\":\"function invoke(field, tag){ return tag.terminus_key; }\"},{\"aggregator\":\"value\",\"alias\":\"trace_duration\",\"field\":\"trace_duration\",\"field_script\":\"function invoke(field, tag){ return field.end_time - field.start_time; }\",\"trigger\":\"aggregated\"},{\"aggregator\":\"sum\",\"alias\":\"span_count\",\"field\":\"span_count\",\"field_script\":\"function invoke(field, tag){ return 1; }\"},{\"aggregator\":\"distinct\",\"alias\":\"operation_names\",\"field\":\"operation_names\",\"field_script\":\"function invoke(field, tag){ if(tag.parent_id!='') return null; else return tag.operation_name; }\"}],\"group\":[\"trace_id\"],\"metric\":\"span\",\"outputs\":[\"metric\"],\"select\":{\"cluster_name\":\"#cluster_name\",\"org_id\":\"#org_id\",\"org_name\":\"#org_name\",\"project_id\":\"#project_id\",\"project_name\":\"#project_name\",\"trace_id\":\"#trace_id\",\"workspace\":\"#workspace\"},\"window\":2}","3.0");
|
CREATE TABLE semaphores (
id int PRIMARY KEY AUTO_INCREMENT,
lockstring varchar(128) UNIQUE,
created datetime NOT NULL,
expires datetime NOT NULL,
locked_by text NOT NULL
);
|
<gh_stars>100-1000
select * from Artist;
|
<gh_stars>0
-- Put your SQLite "down" migration here
DROP INDEX orderdetailproductid ;
DROP INDEX orderdetailorderid;
CREATE INDEX ordercustomerid;
CREATE INDEX orderemployeeid;
CREATE INDEX productsupplierid;
CREATE INDEX employeereportsto;
|
<filename>sql/_23_apricot_qa/_02_performance/_02_function_based_index/cases/function_based_index_function_LEFT.sql
--+ holdcas on;
set system parameters 'dont_reuse_heap_file=yes';
create table t1( a char(1200), b varchar(1200), c nchar(1200), d NCHAR VARYING(1200), e BIT(1200), f BIT VARYING(1200), g int, h SMALLINT, i BIGINT, j NUMERIC, k FLOAT, l DOUBLE, m MONETARY, n DATE, o TIME, p TIMESTAMP, q DATETIME);
insert into t1 values (
'1234567890',
'1234567890',
N'abc',
N'ABC',
B'1111111111',
B'1111111111',
10,
255,
9223372036854775807,
0,
0,
0,
-100,
DATE '2008-10-31',
TIME '00:00:00',
TIMESTAMP '2010-10-31 01:15:45',
DATETIME '2008-10-31 13:15:45');
insert into t1 values (null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null);
--TEST Create successfully
create index i_t1_a2q on t1(LEFT(a,3));
--TEST: should use index i_t1_a2q
select /*+ RECOMPILE */* from t1 where LEFT(a,3)='123' ;
--TEST Create successfully
create index i_t1_a2p on t1(LEFT(b,g));
--TEST: should use index i_t1_a2p
select /*+ RECOMPILE */* from t1 where LEFT(b,g)>'12345' ;
--TEST Create successfully
create index i_t1_a2o on t1(LEFT(c,g));
--TEST: should use index i_t1_a2o
select /*+ RECOMPILE */* from t1 where LEFT(c,g)>=N'abc' ;
--TEST Create successfully
create index i_t1_a2n on t1(LEFT(d,g));
--TEST: should use index i_t1_a2n
select /*+ RECOMPILE */* from t1 where LEFT(d,g)<N'ABCd' ;
--TEST Create failed
create index i_t1_a2m on t1(LEFT(e,1));
--TEST Create failed
create index i_t1_a2l on t1(LEFT(f,g));
--TEST Create failed
create index i_t1_a2k on t1(LEFT(g,k));
--TEST Create failed
create index i_t1_a2j on t1(LEFT(h.g));
--TEST Create failed
create index i_t1_a2i on t1(LEFT(i,0));
--TEST Create failed
create index i_t1_a2h on t1(LEFT(j,g));
--TEST Create failed
create index i_t1_a2g on t1(LEFT(k,1));
--TEST Create failed
create index i_t1_a2f on t1(LEFT(l,1));
--TEST Create failed
create index i_t1_a2e on t1(LEFT(m,1));
--TEST Create failed
create index i_t1_a2d on t1(LEFT(n,g));
--TEST Create failed
create index i_t1_a2c on t1(LEFT(o,g));
--TEST Create failed
create index i_t1_a2b on t1(LEFT(p,g));
--TEST Create failed
create index i_t1_a2a on t1(LEFT(q,g));
--TEST Create failed
create index i_t1_a2 on t1(LEFT(a,g));
--TEST Create failed
create index i_t1_a on t1(LEFT(d,q));
drop table t1;
set system parameters 'dont_reuse_heap_file=no';
commit;
--+ holdcas off;
|
<reponame>navikt/helse-spesialist
ALTER TABLE notat
DROP COLUMN saksbehandler_navn;
ALTER TABLE notat
ADD CONSTRAINT notat_saksbehandler_ref_fkey FOREIGN KEY (saksbehandler_oid) REFERENCES saksbehandler (oid);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.