sql
stringlengths 6
1.05M
|
|---|
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 06, 2021 at 06:40 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `kedaiharian`
--
-- --------------------------------------------------------
--
-- Table structure for table `barang`
--
CREATE TABLE `barang` (
`KodeBrg` char(10) NOT NULL,
`NamaBrg` varchar(100) NOT NULL,
`Beli` int(20) NOT NULL,
`Jual` int(20) NOT NULL,
`stok` int(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `barang`
--
INSERT INTO `barang` (`KodeBrg`, `NamaBrg`, `Beli`, `Jual`, `stok`) VALUES
('B001', 'Sabun', 2500, 3500, 96),
('B002', '<NAME>', 14000, 15000, 3),
('B003', '<NAME>', 2000, 3000, 89),
('B004', '<NAME>', 3000, 5000, 175);
-- --------------------------------------------------------
--
-- Table structure for table `login`
--
CREATE TABLE `login` (
`id` int(5) NOT NULL,
`akses` varchar(50) NOT NULL,
`username` char(10) NOT NULL,
`pass` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `login`
--
INSERT INTO `login` (`id`, `akses`, `username`, `pass`) VALUES
(1, 'Pemilik', 'Fitri', '<PASSWORD>'),
(2, 'Kasir', 'Lusi', '<PASSWORD>'),
(3, 'Gudang', 'Riki', 'fehendra'),
(4, 'Kasir', 'Febi', '<PASSWORD>');
-- --------------------------------------------------------
--
-- Table structure for table `nota`
--
CREATE TABLE `nota` (
`NoFaktur` char(10) NOT NULL,
`JmlBrg` int(20) NOT NULL,
`TotalJual` int(20) NOT NULL,
`TotalDisc` int(20) NOT NULL,
`TotalByr` int(20) NOT NULL,
`JmlByr` int(20) NOT NULL,
`kembali` int(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `nota`
--
INSERT INTO `nota` (`NoFaktur`, `JmlBrg`, `TotalJual`, `TotalDisc`, `TotalByr`, `JmlByr`, `kembali`) VALUES
('F001', 4, 36000, 0, 36000, 50000, 14000);
-- --------------------------------------------------------
--
-- Table structure for table `pembelian`
--
CREATE TABLE `pembelian` (
`NoNota` char(10) NOT NULL,
`TglBeli` date NOT NULL,
`KodeBrg` char(10) NOT NULL,
`KodeSup` char(10) NOT NULL,
`JmlBeli` int(20) NOT NULL,
`HargaBeli` int(20) NOT NULL,
`Disc` int(20) NOT NULL,
`TotalBeli` int(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `pembelian`
--
INSERT INTO `pembelian` (`NoNota`, `TglBeli`, `KodeBrg`, `KodeSup`, `JmlBeli`, `HargaBeli`, `Disc`, `TotalBeli`) VALUES
('N001', '2020-12-09', 'B002', 'S002', 2, 14000, 0, 28000),
('N002', '2020-12-10', 'B003', 'S003', 3, 2000, 0, 6000),
('N003', '2021-02-06', 'B003', 'S002', 100, 2000, 0, 200000),
('N004', '2021-02-05', 'B001', 'S002', 100, 2500, 0, 250000),
('N005', '2021-02-03', 'B004', 'S003', 200, 3000, 0, 600000);
-- --------------------------------------------------------
--
-- Table structure for table `penjualan`
--
CREATE TABLE `penjualan` (
`NoFaktur` char(10) NOT NULL,
`TglJual` date NOT NULL,
`KodeBrg` char(10) NOT NULL,
`JmlJual` int(20) NOT NULL,
`HargaJual` int(20) NOT NULL,
`Disc` int(20) NOT NULL,
`TotalJual` int(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `penjualan`
--
INSERT INTO `penjualan` (`NoFaktur`, `TglJual`, `KodeBrg`, `JmlJual`, `HargaJual`, `Disc`, `TotalJual`) VALUES
('F001', '2020-12-10', 'B002', 2, 15000, 0, 30000),
('F002', '2020-12-11', 'B001', 1, 3500, 0, 3500),
('F003', '2020-12-09', 'B003', 3, 3000, 0, 9000),
('F001', '2020-12-10', 'B003', 2, 3000, 0, 6000),
('F004', '2021-02-06', 'B001', 5, 3500, 0, 17500),
('F004', '2021-02-06', 'B002', 3, 15000, 0, 45000),
('F004', '2021-02-06', 'B003', 12, 3000, 0, 36000),
('F004', '2021-02-06', 'B004', 35, 5000, 0, 175000);
-- --------------------------------------------------------
--
-- Table structure for table `supplier`
--
CREATE TABLE `supplier` (
`KodeSup` char(10) NOT NULL,
`NamaSup` varchar(100) NOT NULL,
`Alamat` varchar(200) NOT NULL,
`HP` int(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `supplier`
--
INSERT INTO `supplier` (`KodeSup`, `NamaSup`, `Alamat`, `HP`) VALUES
('S001', '<NAME>', 'Payakumbuh', 12345678),
('S002', 'PT. ABC', 'Payakumbuh', 87654321),
('S003', 'PT. Anugerah', 'Payakumbuh', 13245678);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `barang`
--
ALTER TABLE `barang`
ADD PRIMARY KEY (`KodeBrg`);
--
-- Indexes for table `login`
--
ALTER TABLE `login`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `nota`
--
ALTER TABLE `nota`
ADD PRIMARY KEY (`NoFaktur`);
--
-- Indexes for table `pembelian`
--
ALTER TABLE `pembelian`
ADD KEY `KodeBrg` (`KodeBrg`),
ADD KEY `KodeSup` (`KodeSup`);
--
-- Indexes for table `penjualan`
--
ALTER TABLE `penjualan`
ADD KEY `KodeBrg` (`KodeBrg`);
--
-- Indexes for table `supplier`
--
ALTER TABLE `supplier`
ADD PRIMARY KEY (`KodeSup`);
--
-- Constraints for dumped tables
--
--
-- Constraints for table `pembelian`
--
ALTER TABLE `pembelian`
ADD CONSTRAINT `pembelian_ibfk_1` FOREIGN KEY (`KodeBrg`) REFERENCES `barang` (`KodeBrg`),
ADD CONSTRAINT `pembelian_ibfk_2` FOREIGN KEY (`KodeSup`) REFERENCES `supplier` (`KodeSup`);
--
-- Constraints for table `penjualan`
--
ALTER TABLE `penjualan`
ADD CONSTRAINT `penjualan_ibfk_1` FOREIGN KEY (`KodeBrg`) REFERENCES `barang` (`KodeBrg`);
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 (c) YugaByte, Inc.
ALTER TABLE instance_type RENAME TO instance_type_old;
CREATE TABLE instance_type
(
provider_uuid UUID NOT NULL,
instance_type_code VARCHAR(255) NOT NULL,
active BOOLEAN DEFAULT TRUE NOT NULL,
num_cores FLOAT NOT NULL,
mem_size_gb FLOAT NOT NULL,
instance_type_details_json TEXT,
CONSTRAINT instance_type_provider_uuid_fkey FOREIGN KEY (provider_uuid) REFERENCES provider (uuid) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT instance_type_pkey PRIMARY KEY (provider_uuid, instance_type_code)
);
INSERT INTO instance_type
SELECT p.uuid, i.instance_type_code, i.active, i.num_cores, i.mem_size_gb, i.instance_type_details_json
FROM provider p
INNER JOIN instance_type_old i
ON i.provider_code = p.code;
DROP TABLE instance_type_old;
|
CREATE TABLE IF NOT EXISTS `kwc_menu` (
`component_id` varchar(255) NOT NULL,
`data` text NOT NULL,
PRIMARY KEY (`component_id`)
)
|
ALTER TABLE `personas` CHANGE COLUMN `approve` `approve` datetime NULL;
INSERT INTO `waffle_flag`
(name, everyone, percent, superusers, staff, authenticated, rollout, note) VALUES
('submit-personas',0,NULL,1,0,0,0, 'Allow Personas to be submitted to AMO');
|
UPDATE item_divulgacao
SET quantidade = quantidade - $1
WHERE id_divulgacao = $2
|
<reponame>sheet00/dairy<gh_stars>0
use diary;
delete from diaries;
alter table diaries auto_increment = 1;
insert into diaries
select
null,
entry_authored_on,
1,
entry_title,
entry_text,
null,
entry_id,
entry_created_on,
entry_modified_on
from mt.mt_entry
order by entry_authored_on
;
select title,authored_on from diaries limit 10 ;
|
<filename>mysql.sql
#
# SQL Export
# Created by Querious (962)
# Created: 2016年8月8日 GMT+8下午12:27:05
# Encoding: Unicode (UTF-8)
#
CREATE TABLE `history` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`keyword` varchar(45) DEFAULT NULL,
`source` varchar(45) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=338 DEFAULT CHARSET=utf8;
CREATE TABLE `torrent0` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`infohash` varchar(40) DEFAULT NULL,
`data` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `infohash` (`infohash`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=800906 DEFAULT CHARSET=utf8;
CREATE TABLE `torrent1` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`infohash` varchar(40) DEFAULT NULL,
`data` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `infohash` (`infohash`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=799054 DEFAULT CHARSET=utf8;
CREATE TABLE `torrent2` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`infohash` varchar(40) DEFAULT NULL,
`data` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `infohash` (`infohash`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=777980 DEFAULT CHARSET=utf8;
CREATE TABLE `torrent3` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`infohash` varchar(40) DEFAULT NULL,
`data` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `infohash` (`infohash`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=776569 DEFAULT CHARSET=utf8;
CREATE TABLE `torrent4` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`infohash` varchar(40) DEFAULT NULL,
`data` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `infohash` (`infohash`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=802410 DEFAULT CHARSET=utf8;
CREATE TABLE `torrent5` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`infohash` varchar(40) DEFAULT NULL,
`data` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `infohash` (`infohash`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=773538 DEFAULT CHARSET=utf8;
CREATE TABLE `torrent6` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`infohash` varchar(40) DEFAULT NULL,
`data` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `infohash` (`infohash`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=756437 DEFAULT CHARSET=utf8;
CREATE TABLE `torrent7` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`infohash` varchar(40) DEFAULT NULL,
`data` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `infohash` (`infohash`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=751880 DEFAULT CHARSET=utf8;
CREATE TABLE `torrent8` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`infohash` varchar(40) DEFAULT NULL,
`data` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `infohash` (`infohash`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=769953 DEFAULT CHARSET=utf8;
CREATE TABLE `torrent9` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`infohash` varchar(40) DEFAULT NULL,
`data` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `infohash` (`infohash`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=755656 DEFAULT CHARSET=utf8;
CREATE TABLE `torrenta` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`infohash` varchar(40) DEFAULT NULL,
`data` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `infohash` (`infohash`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=741695 DEFAULT CHARSET=utf8;
CREATE TABLE `torrentb` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`infohash` varchar(40) DEFAULT NULL,
`data` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `infohash` (`infohash`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=742012 DEFAULT CHARSET=utf8;
CREATE TABLE `torrentc` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`infohash` varchar(40) DEFAULT NULL,
`data` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `infohash` (`infohash`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=749031 DEFAULT CHARSET=utf8;
CREATE TABLE `torrentd` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`infohash` varchar(40) DEFAULT NULL,
`data` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `infohash` (`infohash`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=716835 DEFAULT CHARSET=utf8;
CREATE TABLE `torrente` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`infohash` varchar(40) DEFAULT NULL,
`data` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `infohash` (`infohash`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=718701 DEFAULT CHARSET=utf8;
CREATE TABLE `torrentf` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`infohash` varchar(40) DEFAULT NULL,
`data` varchar(1024) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `infohash` (`infohash`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=689052 DEFAULT CHARSET=utf8;
CREATE TABLE `infohash` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`infohash` varchar(40) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `infohash` (`infohash`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=3093 DEFAULT CHARSET=utf8;
CREATE TABLE `recommend` (
`id` int(11) NOT NULL DEFAULT '0',
`name` varchar(128) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 01 Jun 2018 pada 06.46
-- Versi Server: 10.1.13-MariaDB
-- PHP Version: 5.5.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `baru`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `login`
--
CREATE TABLE `login` (
`username` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
`akses` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `login`
--
INSERT INTO `login` (`username`, `password`, `akses`) VALUES
('kasir', 'kasir', 'kasir'),
('admin', 'admin', 'admin');
-- --------------------------------------------------------
--
-- Struktur dari tabel `tbl_barang`
--
CREATE TABLE `tbl_barang` (
`kd_barang` varchar(10) NOT NULL,
`nama` varchar(100) NOT NULL,
`harga` int(6) NOT NULL,
`stok` int(2) NOT NULL,
`kategori` enum('Makanan Berat','Minuman','Camilan','') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `tbl_barang`
--
INSERT INTO `tbl_barang` (`kd_barang`, `nama`, `harga`, `stok`, `kategori`) VALUES
('F0001', 'Ketoprak', 6000, 33, 'Makanan Berat'),
('F0002', 'Donat', 1000, 80, 'Camilan'),
('F0003', 'Baso', 5000, 23, 'Makanan Berat'),
('F0004', '<NAME>', 7000, 23, 'Makanan Berat'),
('F0005', '<NAME>', 8000, 20, 'Makanan Berat'),
('F0006', 'Seblak', 5000, 35, 'Makanan Berat'),
('F0007', 'Milkshake', 5000, 94, 'Minuman'),
('F0008', 'Jus', 4500, 50, 'Minuman'),
('F0009', 'Onde-Onde', 1000, 100, 'Camilan'),
('F0010', '<NAME>', 2000, 100, 'Camilan'),
('F0011', '<NAME>', 2000, 100, 'Camilan'),
('F0012', '<NAME>', 2000, 100, 'Camilan'),
('F0013', '<NAME>', 1000, 100, 'Camilan'),
('F0014', 'Es Kul-kul', 2000, 20, 'Camilan');
-- --------------------------------------------------------
--
-- Struktur dari tabel `tmp_transaksi`
--
CREATE TABLE `tmp_transaksi` (
`no` int(11) NOT NULL,
`kd_barang` varchar(10) NOT NULL,
`nama_barang` varchar(50) NOT NULL,
`harga` int(11) NOT NULL,
`jumlah` int(11) NOT NULL,
`total` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Trigger `tmp_transaksi`
--
DELIMITER $$
CREATE TRIGGER `batal_beli` AFTER DELETE ON `tmp_transaksi` FOR EACH ROW BEGIN UPDATE tbl_barang SET tbl_barang.stok = tbl_barang.stok + old.jumlah WHERE tbl_barang.kd_barang = old.kd_barang; END
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `beli` AFTER INSERT ON `tmp_transaksi` FOR EACH ROW BEGIN
UPDATE tbl_barang SET
tbl_barang.stok = tbl_barang.stok - NEW.jumlah
WHERE tbl_barang.kd_barang = new.kd_barang;
END
$$
DELIMITER ;
-- --------------------------------------------------------
--
-- Struktur dari tabel `transaksi`
--
CREATE TABLE `transaksi` (
`kd_transaksi` varchar(10) NOT NULL,
`tgl_pembelian` date NOT NULL,
`total` int(12) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `transaksi`
--
INSERT INTO `transaksi` (`kd_transaksi`, `tgl_pembelian`, `total`) VALUES
('T0001', '2018-05-31', 50000),
('T0002', '2018-05-31', 25500),
('T0003', '2018-05-31', 4000),
('T0004', '2018-05-31', 10000),
('T0005', '2018-06-01', 46000),
('T0006', '2018-06-01', 4000);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `tbl_barang`
--
ALTER TABLE `tbl_barang`
ADD PRIMARY KEY (`kd_barang`);
--
-- Indexes for table `tmp_transaksi`
--
ALTER TABLE `tmp_transaksi`
ADD PRIMARY KEY (`no`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `tmp_transaksi`
--
ALTER TABLE `tmp_transaksi`
MODIFY `no` int(11) NOT NULL AUTO_INCREMENT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
<reponame>mnabavi84/dcamp-ddriven-dmaking-sql
SELECT COUNT(*) -- Count the total number of customers
FROM customers
WHERE date_of_birth BETWEEN '1980-01-01' AND '1989-12-31'; -- Select customers born between 1980-01-01 and 1989-12-31
SELECT COUNT(*) -- Count the total number of customers
FROM customers
WHERE country = 'Germany'; -- Select all customers from Germany
SELECT COUNT(DISTINCT country) -- Count the number of countries
FROM customers;
SELECT MIN(rating) AS min_rating, -- Calculate the minimum rating and use alias min_rating
MAX(rating) AS max_rating, -- Calculate the maximum rating and use alias max_rating
AVG(rating) AS avg_rating, -- Calculate the average rating and use alias avg_rating
COUNT(rating) AS number_ratings -- Count the number of ratings and use alias number_ratings
FROM renting
WHERE movie_id = '25'; -- Select all records of the movie with ID 25
SELECT * -- Select all records of movie rentals since January 1st 2019
FROM renting
WHERE date_renting >= '2019-01-01';
SELECT
COUNT(*), -- Count the total number of rented movies
AVG(rating) -- Add the average rating
FROM renting
WHERE date_renting >= '2019-01-01';
SELECT
COUNT(*) AS number_renting, -- Give it the column name number_renting
AVG(rating) average_rating -- Give it the column name average_rating
FROM renting
WHERE date_renting >= '2019-01-01';
SELECT
COUNT(*) AS number_renting,
AVG(rating) AS average_rating,
SUM(rating) AS number_ratings -- Add the total number of ratings here.
FROM renting
WHERE date_renting >= '2019-01-01';
|
<reponame>ucdavis/ipa-web<gh_stars>1-10
ALTER TABLE `SectionGroupCosts` CHANGE COLUMN `Title` `Title` VARCHAR(100) NOT NULL;
|
CREATE TABLE [dbo].[UserPreferences]
(
[UserId] NVARCHAR(450) NOT NULL,
[Key] INT NOT NULL,
[Value] NVARCHAR(250) NULL,
CONSTRAINT [PK_dbo.UserPreferences] PRIMARY KEY CLUSTERED ([UserId] ASC, [Key] ASC),
CONSTRAINT [FK.dbo_UserPreferences_dbo.UserProfiles] FOREIGN KEY([UserId]) REFERENCES [dbo].[UserProfiles]([Id]) ON DELETE CASCADE
)
|
-- file:plpgsql.sql ln:1398 expect:true
update PSlot set slotlink = 'HS.base.hub1.1' where slotname = 'PS.base.b2'
|
DROP TABLE IF EXISTS xxxinfo;
CREATE TABLE xxxinfo (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
title VARCHAR(255) NOT NULL,
tagline VARCHAR(1024) NOT NULL,
plot VARCHAR(1024) NOT NULL,
genre VARCHAR(64) NOT NULL,
director VARCHAR(64) DEFAULT NULL,
actors VARCHAR(2000) NOT NULL,
extras TEXT DEFAULT NULL,
productinfo TEXT DEFAULT NULL,
trailers TEXT DEFAULT NULL,
directurl VARCHAR(2000) NOT NULL,
classused VARCHAR(3) NOT NULL,
cover TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
backdrop TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
createddate DATETIME NOT NULL,
updateddate DATETIME NOT NULL,
PRIMARY KEY (id),
INDEX ix_xxxinfo_title (title)
)
ENGINE = MYISAM
DEFAULT CHARSET = utf8
COLLATE = utf8_unicode_ci
AUTO_INCREMENT = 1;
|
<reponame>BrettPWRE/HDB
-- foreign key for table REF_ENSEMBLE_TRACE on ensemble_id from ref_ensemble
alter table REF_ENSEMBLE_TRACE add constraint ensemble_tr_ensemble_id_fk
foreign key (ensemble_id)
references ref_ensemble (ensemble_id) on delete cascade;
-- foreign key for table REF_ENSEMBLE_TRACE on site_datatype_id from hdb_site_datatype
alter table REF_ENSEMBLE_TRACE add constraint ensemble_model_run_id_fk
foreign key (model_run_id)
references ref_model_run (model_run_id) on delete cascade;
|
delete from provider_setting where related_entity_cd = 'AW' and related_entity_typ = 'LicenseType';
delete from lu_license_type where code = 'AW';
|
<reponame>Seddryck/Lookum
CREATE TABLE [dbo].[CategoryValue](
[Id] [int] NOT NULL,
[CategoryTypeId] [int] NOT NULL,
[Key] [nvarchar](50) NOT NULL
CONSTRAINT [PK.CategoryValue] PRIMARY KEY NONCLUSTERED
(
[Id] 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
ALTER TABLE [dbo].[CategoryValue] WITH NOCHECK ADD CONSTRAINT [FK_dbo.CategoryValue_app.CategoryType_CategoryTypeId] FOREIGN KEY([CategoryTypeId])
REFERENCES [dbo].[CategoryType] ([Id])
GO
ALTER TABLE [dbo].[CategoryValue] CHECK CONSTRAINT [FK_dbo.CategoryValue_app.CategoryType_CategoryTypeId]
GO
|
drop table if exists authors cascade
drop table if exists books cascade
drop sequence if exists hibernate_sequence
|
/*
Dungeon and Dragons Custom NPC List
*/
CREATE TABLE [Character] (
CharacterID INT IDENTITY NOT NULL ,
Name VARCHAR(50),
Class VARCHAR(50),
Race VARCHAR(50),
[Stats] INT,
CONSTRAINT pk_Character PRIMARY KEY (CharacterID)
);
go
--- INSERT DATA---
INSERT INTO [Character] (Name,Class,Race,[Stats])
VALUES ('Jim','Cook','Human',12),
('Joe','Blacksmith','Fairy',40);
---UPDATE---
UPDATE [Character] SET Name - 'Joseph',Class-'Barber'
WHERE [CharacterID]=3
---DELETE---
DELETE FROM [Character]
WHERE [CharacterID]=3
------------------------------------
select
from [Character]
---TRUNACATE TABLE---
|
<filename>src/model/db-queries/update-games-genres-genre-id.sql<gh_stars>0
update games_to_genres
set genre_id = ?
where genre_id = ?
|
-- int div to scalar lhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(5::int, ints) FROM measurements WHERE sensor_id IN (4)) r(r);
-- int div to scalar rhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(ints, 5::int) FROM measurements WHERE sensor_id IN (4)) r(r);
-- int div to array
SELECT r, pg_typeof(r) FROM (SELECT vec_div(ints, ints) FROM measurements WHERE sensor_id IN (4)) r(r);
-- int div to null scalar lhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::int, ints) FROM measurements WHERE sensor_id IN (4)) r(r);
-- int div to null scalar rhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(ints, NULL::int) FROM measurements WHERE sensor_id IN (4)) r(r);
-- int div scalar to null array lhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(5::int, NULL::int[]) FROM measurements WHERE sensor_id IN (4)) r(r);
-- int div scalar to null array rhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::int[], 5::int) FROM measurements WHERE sensor_id IN (4)) r(r);
-- int div to null array lhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(ints, NULL::int[]) FROM measurements WHERE sensor_id IN (4)) r(r);
-- int div to null array rhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::int[], ints) FROM measurements WHERE sensor_id IN (4)) r(r);
-- null int div to null scalar lhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::int, NULL::int[]) FROM measurements WHERE sensor_id IN (4)) r(r);
-- null int div to null scalar rhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::int[], NULL::int) FROM measurements WHERE sensor_id IN (4)) r(r);
-- null int div to null array
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::int[], NULL::int[]) FROM measurements WHERE sensor_id IN (4)) r(r);
-- float div to scalar lhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(5::float, floats) FROM measurements WHERE sensor_id IN (4)) r(r);
-- float div to scalar rhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(floats, 5::float) FROM measurements WHERE sensor_id IN (4)) r(r);
-- float div to array
SELECT r, pg_typeof(r) FROM (SELECT vec_div(floats, floats) FROM measurements WHERE sensor_id IN (4)) r(r);
-- float div to null scalar lhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::float, floats) FROM measurements WHERE sensor_id IN (4)) r(r);
-- float div to null scalar rhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(floats, NULL::float) FROM measurements WHERE sensor_id IN (4)) r(r);
-- float div scalar to null array lhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(5::float, NULL::float[]) FROM measurements WHERE sensor_id IN (4)) r(r);
-- float div scalar to null array rhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::float[], 5::float) FROM measurements WHERE sensor_id IN (4)) r(r);
-- float div to null array lhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(floats, NULL::float[]) FROM measurements WHERE sensor_id IN (4)) r(r);
-- float div to null array rhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::float[], floats) FROM measurements WHERE sensor_id IN (4)) r(r);
-- null float div to null scalar lhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::float, NULL::float[]) FROM measurements WHERE sensor_id IN (4)) r(r);
-- null float div to null scalar rhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::float[], NULL::float) FROM measurements WHERE sensor_id IN (4)) r(r);
-- null float div to null array
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::float[], NULL::float[]) FROM measurements WHERE sensor_id IN (4)) r(r);
-- numeric div to scalar lhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(5::numeric, nums) FROM measurements WHERE sensor_id IN (4)) r(r);
-- numeric div to scalar rhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(nums, 5::numeric) FROM measurements WHERE sensor_id IN (4)) r(r);
-- numeric div to array
SELECT r, pg_typeof(r) FROM (SELECT vec_div(nums, nums) FROM measurements WHERE sensor_id IN (4)) r(r);
-- numeric div to null scalar lhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::numeric, nums) FROM measurements WHERE sensor_id IN (4)) r(r);
-- numeric div to null scalar rhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(nums, NULL::numeric) FROM measurements WHERE sensor_id IN (4)) r(r);
-- numeric div scalar to null array lhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(5::numeric, NULL::numeric[]) FROM measurements WHERE sensor_id IN (4)) r(r);
-- numeric div scalar to null array rhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::numeric[], 5::numeric) FROM measurements WHERE sensor_id IN (4)) r(r);
-- numeric div to null array lhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(nums, NULL::numeric[]) FROM measurements WHERE sensor_id IN (4)) r(r);
-- numeric div to null array rhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::numeric[], nums) FROM measurements WHERE sensor_id IN (4)) r(r);
-- null numeric div to null scalar lhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::numeric, NULL::numeric[]) FROM measurements WHERE sensor_id IN (4)) r(r);
-- null numeric div to null scalar rhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::numeric[], NULL::numeric) FROM measurements WHERE sensor_id IN (4)) r(r);
-- null numeric div to null array
SELECT r, pg_typeof(r) FROM (SELECT vec_div(NULL::numeric[], NULL::numeric[]) FROM measurements WHERE sensor_id IN (4)) r(r);
-- numeric div to scalar 0 lhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(0::numeric, nums) FROM measurements WHERE sensor_id IN (4)) r(r);
-- numeric div to scalar 0 rhs
SELECT r, pg_typeof(r) FROM (SELECT vec_div(nums, 0::numeric) FROM measurements WHERE sensor_id IN (4)) r(r);
-- numeric div to array 0
SELECT r, pg_typeof(r) FROM (SELECT vec_div(nums, ARRAY[0,0,1]::numeric[]) FROM measurements WHERE sensor_id IN (4)) r(r);
|
--- Creating Database ---
CREATE DATABASE AssesmentDb
GO
CREATE SCHEMA adb
GO
--- Creating Tables ---
CREATE TABLE adb.Products(
ID INT IDENTITY,
Name NVARCHAR(200) NOT NULL,
Price MONEY,
CONSTRAINT PK_ProductId PRIMARY KEY(ID)
)
CREATE TABLE adb.Orders(
ID INT IDENTITY,
ProductID INT NOT NULL,
CustomerID INT NOT NULL,
CONSTRAINT PK_OrderId PRIMARY KEY(ID)
)
CREATE TABLE adb.Customers(
ID INT IDENTITY,
Firstname NVARCHAR(200) NOT NULL,
Lastname NVARCHAR(200) NOT NULL,
CardNumber NVARCHAR(20) NOT NULL,
CONSTRAINT PK_CustomerId PRIMARY KEY(ID)
)
-- Foreign Key Relationships ---
ALTER TABLE Orders ADD
CONSTRAINT FK_ProductId FOREIGN KEY(ProductID) REFERENCES Products(ID),
CONSTRAINT FK_CustomerId FOREIGN KEY(CustomerID) REFERENCES Customers(ID)
-- Inserting values --
INSERT INTO adb.Products(Name, Price) VALUES
('iPhone', 200),
('Macbook', 1000),
('iPad', 300);
INSERT INTO adb.Customers(Firstname, Lastname, CardNumber) VALUES
('John', 'Smith', '1234567890987654'),
('Jane', 'Doe', '0987654321234567'),
('Tina', 'Smith', '1111111111111111');
INSERT INTO adb.Orders(ProductID, CustomerID) VALUES
(1, 3),
(2, 2),
(3, 1);
-- Report all orders by <NAME> --
SELECT * FROM adb.Orders AS o
INNER JOIN adb.Customers AS c ON o.CustomerID = c.ID
WHERE FirstName = 'Tina'
-- Increase Price of iPhone --
UPDATE adb.Products
SET Price = 250
WHERE Name = 'iPhone'
-- report all revenue generated by sales of iphone --
SELECT SUM(Price) FROM adb.Orders AS o
INNER JOIN adb.Products AS p ON o.ProductID = p.ID
WHERE Name = 'iPhone'
|
INSERT INTO Meals (Name, SeaFood, DefaultPrice, Active)
VALUES
('Tiramisu', 0, 9.0, 1),
('Szarlotka', 0, 8.0, 1),
('Kawa', 0, 7.50, 1),
('Herbata', 0, 5.0, 1),
('Frytki', 0, 6.0, 1),
('Krewetki', 1, 25.50, 1),
('Ośmiornica', 1, 27.30, 1),
('Małże', 1, 23.70, 1),
('Kalmary', 1, 22.0, 1),
('Pizza Salami', 0, 28.0, 1),
('Pizza Napoletana', 0, 30.0, 1),
('Pizza Margherita', 0, 25.0, 1),
('Pizza Vegetariana', 0, 28.0, 1),
('Woda mineralna niegazowana', 0, 3.0, 1),
('Woda mineralna gazowana', 0, 3.50, 1);
INSERT INTO Menu (StartDate, EndDate, Active)
VALUES ('2021-12-17','2021-12-31', 1),
('2022-01-01','2022-01-08', 1),
('2022-01-09','2022-01-28', 1);
INSERT INTO MenuItems (MenuID, MealID, Price)
VALUES
(1, 2, 9),
(1, 3, 8.50),
(1, 4, 5.50),
(1, 5, 6.50),
(1, 6, 26.90),
(1, 10, 30.0),
(1, 12, 24.0),
(1, 14, 2.50),
(2, 1, 10),
(2, 8, 24.0),
(2, 9, 21.70),
(2, 11, 32.20),
(2, 13, 25.40),
(2, 14, 3.0),
(2, 15, 3.0),
(3, 1, 9.50),
(3, 3, 8.0),
(3, 4, 5.0),
(3, 6, 26.80),
(3, 7, 28.30),
(3, 12, 23.0);
INSERT INTO Tables (Seats, Active)
VALUES
(4, 1),
(3, 1),
(8, 1),
(10, 1),
(6, 1),
(5, 1),
(4, 1),
(4, 1),
(4, 1),
(6, 1),
(3, 1),
(9, 1),
(2, 1),
(2, 1),
(2, 1),
(3, 1),
(6, 1),
(8, 1),
(8, 1);
|
CREATE DATABASE IF NOT EXISTS ProjetoIntegrador3;
USE projetointegrador3;
CREATE TABLE categoria (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
nome VARCHAR (100) NOT NULL,
descricao VARCHAR (255)
);
CREATE TABLE livro (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
id_categoria INTEGER NOT NULL,
FOREIGN KEY (id_categoria) REFERENCES categoria (id),
titulo VARCHAR (100) NOT NULL,
valor VARCHAR (20) NOT NULL,
descricao VARCHAR (255),
idioma VARCHAR (50) NOT NULL,
autor VARCHAR (100) NOT NULL,
editora VARCHAR (100) NOT NULL,
edicao VARCHAR (5) NOT NULL,
numero_paginas VARCHAR (10),
isbn VARCHAR (20) NOT NULL,
removido BOOLEAN NOT NULL DEFAULT FALSE
);
CREATE TABLE endereco (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
rua VARCHAR (100) NOT NULL,
bairro VARCHAR (100) NOT NULL,
estado VARCHAR (100) NOT NULL,
cidade VARCHAR (100) NOT NULL,
numero VARCHAR (100) NOT NULL,
cep VARCHAR (100) NOT NULL
);
CREATE TABLE filial (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
nome_fantasia VARCHAR (100) NOT NULL,
inscricao_estadual VARCHAR (100) NOT NULL,
cnpj VARCHAR (20) NOT NULL,
telefone VARCHAR(20),
email VARCHAR(100),
fax VARCHAR(20),
id_endereco INTEGER NOT NULL,
removido BOOLEAN NOT NULL DEFAULT FALSE,
FOREIGN KEY (id_endereco) REFERENCES Endereco(id)
);
CREATE TABLE livro_filial (
PRIMARY KEY(id_filial, id_livro),
estoque INTEGER NOT NULL DEFAULT 0,
id_filial INTEGER NOT NULL,
id_livro INTEGER NOT NULL,
FOREIGN KEY (id_livro) REFERENCES livro (id),
FOREIGN KEY (id_filial) REFERENCES Filial (id)
);
CREATE TABLE usuario (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
nome VARCHAR (100) NOT NULL,
sobrenome VARCHAR (100) NOT NULL,
sexo VARCHAR (100) NOT NULL,
funcao VARCHAR (100) NOT NULL,
dt_admissao DATE NOT NULL,
removido BOOLEAN NOT NULL DEFAULT FALSE
);
CREATE TABLE cliente (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
id_endereco INTEGER NOT NULL,
nome VARCHAR (100) NOT NULL,
sobrenome VARCHAR (100) NOT NULL,
sexo VARCHAR (100) NOT NULL,
cpf VARCHAR (20) NOT NULL,
dt_nascimento DATE NOT NULL,
FOREIGN KEY (id_endereco) REFERENCES Endereco(id),
removido BOOLEAN NOT NULL DEFAULT FALSE
);
CREATE TABLE venda (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
id_usuario INTEGER NOT NULL,
id_filial INTEGER NOT NULL,
id_cliente INTEGER,
data_venda DATE NOT NULL,
FOREIGN KEY (id_usuario) REFERENCES usuario (id),
FOREIGN KEY (id_filial) REFERENCES filial (id),
FOREIGN KEY (id_cliente) REFERENCES cliente (id)
);
CREATE TABLE item_venda(
item_venda_id INTEGER PRIMARY KEY AUTO_INCREMENT,
id_venda INT NOT NULL,
id_livro INT NOT NULL,
valor_unitario FLOAT NOT NULL,
quantidade INTEGER NOT NULL,
FOREIGN KEY (id_livro) REFERENCES Livro (id),
FOREIGN KEY (id_venda) REFERENCES Venda (id)
);
DELIMITER //
CREATE TRIGGER insert_livro_filial_after_livro_insert
AFTER INSERT
ON livro FOR EACH ROW
BEGIN
-- Insert record into audit table
INSERT INTO livro_filial
( id_filial,
id_livro)
SELECT id, NEW.id from filial;
END; //
DELIMITER ;
DELIMITER //
CREATE TRIGGER insert_livro_filial_after_filial_insert
AFTER INSERT
ON filial FOR EACH ROW
BEGIN
-- Insert record into audit table
INSERT INTO livro_filial
( id_filial,
id_livro)
SELECT NEW.id, id from livro;
END; //
DELIMITER ;
INSERT INTO categoria (nome, descricao)
VALUES ('Autobiografia','Autobiografia é um gênero literário em que uma pessoa narra a história da sua vida, trata-se de uma biografia escrita ou narrada pela pessoa biografada.'),
('Suspense', 'Livros de suspense são assim: páginas repletas de mistérios, que prendem a nossa atenção. E se você curte obras desse gênero.'),
('Fantasia', 'Livros que te levam a outra dimensão'),
('Fantasia', 'Livros que te levam a outra dimensão')
INSERT INTO livro (id_categoria, titulo, valor, descricao, idioma, autor, editora, edicao, numero_paginas, isbn)
VALUES (3, 'Desafio Infinito', 80.00, 'fantasia', 'portugues', '<NAME>', 'abril','1', '298', '343434' ),
(2, 'Money', 56.00, 'fantasia', 'portugues', 'Salah W.', 'abril','1', '180', '342454' ),
(3, '<NAME>', 19.00, 'fantasia', 'portugues', '<NAME>', 'Panini Books','2', '220', '564635' ),
(1, 'Scar Tissue', 27.00, 'tragédias', 'portugues', '<NAME>', 'Panini Books','6', '330', '5345234' ),
(2, 'Auto da Barca do Inferno', 34.00, 'história', 'portugues', 'Vicente,Gil', 'abril','1', '100', '123' ),
(3, 'Animais Fantasticos', 102.00, 'fantasia', 'portugues', '<NAME>', 'Panini Books','3', '201', '28787' ),
(1, '12 Licoes de Historia', 12.00, 'fantasia', 'portugues', '<NAME>', 'abril','2', '258', '768765' ),
(2, 'Hamlet', 23.00, 'fantasia', 'portugues', '<NAME>', 'abril','1', '98', '5465342' ),
(1, '<NAME>', 23.00, 'fantasia', 'portugues', '<NAME>', 'abril','2', '1000', '5465342' ),
(1, '<NAME>', 23.00, 'fantasia', 'portugues', '<NAME>', 'abril','1', '98', '5465342' )
INSERT INTO endereco (rua, bairro, estado, cidade, numero, cep)
VALUES ('<NAME>','Santa cecilia', 'Rio de Janeiro', 'Rio de Janeiro', '1200', 033327-57),
('<NAME>','Grajaú', 'São Paulo', 'São Paulo', '1200', 033327-57),
('<NAME>','<NAME>', 'Ceará', 'Sobral', '1200', 033327-57),
('Av Sargento Geraldo','Cidade Ademar', 'Sergipe', 'Aracaju', '1200', 033327-57),
('<NAME>','<NAME>', 'Maranhão', 'São Luis', '1200', 033327-57)
INSERT INTO filial (nome_fantasia, inscricao_estadual, cnpj, telefone, email, fax, id_endereco)
VALUES ('<NAME>', '772.974.364.630','91.381.008/0001-09', '5566-9294','<EMAIL>', 3632-1778, 1 ),
('<NAME>', '478.546.291.395','19.037.231/0001-06', '2255-4323','<EMAIL>', 2344-7653, 2 ),
('<NAME>', '803.088.129.183','16.085.640/0001-81', '2323-5664','<EMAIL>', 3439-5643, 3 ),
('<NAME>', '008.975.135.020', '95.713.175/0001-52', '2132-4566','<EMAIL>', 3248-3453, 4 ),
('<NAME>', '803.088.129.183', '45.050.358/0001-67', '3123-9876','<EMAIL>', 2324-8765, 5 )
INSERT INTO cliente (id_endereco, nome, sobrenome, sexo, cpf, dt_nscimento)
VALUES (2, 'Adalberto', 'Mourao', 'Masculio', '0134567890', '1992-12-12')
INSERT INTO usuario (nome, sobrenome, sexo, funcao, dt_admissao)
VALUES ('vendedorA','A','masculino','vendedor','2018-01-01')
('vendedorB','B','feminino','vendedor','2018-02-01')
('vendedorC','C','masculino','vendedor','2018-03-01')
|
<filename>mudos.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Mar 21, 2021 at 01:18 AM
-- Server version: 5.7.23
-- PHP Version: 7.2.10
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: `mudos`
--
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
DROP TABLE IF EXISTS `migrations`;
CREATE TABLE IF NOT EXISTS `migrations` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2020_04_08_225445_create_tbl_admin_table', 1),
(2, '2020_04_09_015213_create_tbl_category_table', 1),
(3, '2020_04_09_142043_create_tbl_manufacture_table', 1),
(4, '2020_04_09_231319_create_tbl_products_table', 1),
(5, '2020_04_12_000112_create_tbl_slider_table', 1),
(6, '2020_04_14_030514_create_tbl_customer_table', 1),
(7, '2020_04_14_121259_create_tbl_shipping_table', 1),
(8, '2020_04_15_130617_create_tbl_payment_table', 1),
(9, '2020_04_15_131029_create_tbl_order_table', 1),
(10, '2020_04_15_131103_create_tbl_order_details_table', 1);
-- --------------------------------------------------------
--
-- Table structure for table `prescription`
--
DROP TABLE IF EXISTS `prescription`;
CREATE TABLE IF NOT EXISTS `prescription` (
`prescription_id` int(30) NOT NULL AUTO_INCREMENT,
`prescription_image` varchar(200) NOT NULL,
`product_name` varchar(200) NOT NULL,
`status` varchar(50) NOT NULL DEFAULT 'pending',
PRIMARY KEY (`prescription_id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `prescription`
--
INSERT INTO `prescription` (`prescription_id`, `prescription_image`, `product_name`, `status`) VALUES
(1, 'images/c25jz2uapHfGsKlUiNXY,jpg', 'cipro', 'pending'),
(5, 'images/6guWnJiwovion6FT40l8,jpg', 'cipro', 'pending');
-- --------------------------------------------------------
--
-- Table structure for table `tbl_admin`
--
DROP TABLE IF EXISTS `tbl_admin`;
CREATE TABLE IF NOT EXISTS `tbl_admin` (
`admin_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`admin_email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`admin_password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`admin_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`admin_phone` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`admin_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `tbl_admin`
--
INSERT INTO `tbl_admin` (`admin_id`, `admin_email`, `admin_password`, `admin_name`, `admin_phone`, `created_at`, `updated_at`) VALUES
(1, '<EMAIL>', '<PASSWORD>', '<NAME>', '0703699008', NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `tbl_category`
--
DROP TABLE IF EXISTS `tbl_category`;
CREATE TABLE IF NOT EXISTS `tbl_category` (
`category_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`category_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`category_description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`publication_status` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`category_id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `tbl_category`
--
INSERT INTO `tbl_category` (`category_id`, `category_name`, `category_description`, `publication_status`, `created_at`, `updated_at`) VALUES
(1, 'anti maleria', 'the drug for maleria', 1, NULL, NULL),
(2, 'antibiotics', 'Antibiotic drugs', 1, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `tbl_customer`
--
DROP TABLE IF EXISTS `tbl_customer`;
CREATE TABLE IF NOT EXISTS `tbl_customer` (
`customer_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`customer_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`customer_email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`mobile_number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`customer_id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `tbl_customer`
--
INSERT INTO `tbl_customer` (`customer_id`, `customer_name`, `customer_email`, `password`, `mobile_number`, `created_at`, `updated_at`) VALUES
(1, '<NAME>', '<EMAIL>', '<PASSWORD>', '07036998003', NULL, NULL),
(2, '<NAME>', '<EMAIL>', '<PASSWORD>', '07036998003', NULL, NULL),
(3, '<NAME>', '<EMAIL>', '<PASSWORD>fa57a93f', '07036998003', NULL, NULL),
(6, '<NAME>', '<EMAIL>', '81dc9bdb52d04dc20036dbd8313ed055', '07036998003', NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `tbl_manufacture`
--
DROP TABLE IF EXISTS `tbl_manufacture`;
CREATE TABLE IF NOT EXISTS `tbl_manufacture` (
`manufacture_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`manufacture_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`manufacture_description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`publication_status` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`manufacture_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `tbl_manufacture`
--
INSERT INTO `tbl_manufacture` (`manufacture_id`, `manufacture_name`, `manufacture_description`, `publication_status`, `created_at`, `updated_at`) VALUES
(1, 'Nasco', 'they do deugs', 1, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `tbl_order`
--
DROP TABLE IF EXISTS `tbl_order`;
CREATE TABLE IF NOT EXISTS `tbl_order` (
`order_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`customer_id` int(11) NOT NULL,
`shipping_id` int(11) NOT NULL,
`order_total` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`order_status` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`order_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `tbl_order_details`
--
DROP TABLE IF EXISTS `tbl_order_details`;
CREATE TABLE IF NOT EXISTS `tbl_order_details` (
`order_details_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(140) COLLATE utf8mb4_unicode_ci NOT NULL,
`address` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`phone` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`order_id` int(11) NOT NULL,
`order_details` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`order_total` int(20) NOT NULL,
`status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`order_details_id`)
) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `tbl_order_details`
--
INSERT INTO `tbl_order_details` (`order_details_id`, `name`, `address`, `phone`, `email`, `order_id`, `order_details`, `order_total`, `status`) VALUES
(1, '<NAME>', '29 eleyele', '07036998003', '<EMAIL>', 123445, 'null', 0, 'completed'),
(3, '<NAME>', '29 eleyele', '07036998003', '<EMAIL>', 748328563, 'null', 0, 'completed'),
(4, '<NAME>', '29 eleyele', '07036998003', '<EMAIL>', 748329588, 'null', 0, 'awaiting-shipping'),
(5, '<NAME>', '29 eleyele', '07036998003', '<EMAIL>', 748331153, 'null', 0, 'paid'),
(6, '<NAME>', '29 eleyele', '07036998003', '<EMAIL>', 748331415, 'null', 0, 'awaiting-shipping'),
(7, '<NAME>', '29 eleyele', '07036998003', '<EMAIL>', 748331415, 'null', 0, 'paid'),
(8, '<NAME>', '29 eleyele', '07036998003', '<EMAIL>', 748331415, 'null', 0, 'paid'),
(9, '<NAME>', '29 eleyele', '07036998003', '<EMAIL>', 749125143, 'null', 0, 'paid'),
(10, '<NAME>', '29 eleyele', '07036998003', '<EMAIL>', 776139002, 'null', 0, 'pending'),
(13, '<NAME>', '29 eleyele', '07036998003', '<EMAIL>', 823166975, '{\"1\": {\"id\": 1, \"name\": \"Cloroquin\", \"price\": 1200, \"quantity\": \"1\", \"attributes\": [], \"conditions\": [], \"associatedModel\": {\"sold\": 9, \"created_at\": null, \"product_id\": 1, \"updated_at\": null, \"category_id\": 2, \"prescription\": \"false\", \"product_name\": \"Cloroquin\", \"product_size\": \"12g\", \"product_image\": \"images/dCECF2laPXJiqt3vHZpK,jpg\", \"product_price\": 1200, \"manufacture_id\": 1, \"publication_status\": 1, \"product_shipping_price\": 2000, \"product_long_description\": \"The drug is active for maleria\", \"product_short_description\": \"The drug is active for maleria\"}}, \"2\": {\"id\": 2, \"name\": \"Ceptrin\", \"price\": 500, \"quantity\": 2, \"attributes\": [], \"conditions\": [], \"associatedModel\": {\"sold\": 25, \"created_at\": null, \"product_id\": 2, \"updated_at\": null, \"category_id\": 2, \"prescription\": \"false\", \"product_name\": \"Ceptrin\", \"product_size\": \"3g\", \"product_image\": \"images/Kcyzw2o2TNpDWCCpmGfS,jpg\", \"product_price\": 500, \"manufacture_id\": 1, \"publication_status\": 1, \"product_shipping_price\": 700, \"product_long_description\": \"Lorem ipsum dolor sit amet consectetur adipisicing elit\", \"product_short_description\": \"Lorem ipsum dolor sit amet consectetur\"}}}', 1700, 'pending'),
(14, '<NAME>', 'I\'m testing this work with this address', '07036998003', '<EMAIL>', 824346546, '{\"1\":{\"id\":1,\"name\":\"Cloroquin\",\"price\":1200,\"quantity\":\"1\",\"attributes\":[],\"conditions\":[],\"associatedModel\":{\"product_id\":1,\"product_name\":\"Cloroquin\",\"category_id\":2,\"manufacture_id\":1,\"product_short_description\":\"The drug is active for maleria\",\"product_long_description\":\"The drug is active for maleria\",\"product_price\":1200,\"product_image\":\"images\\/dCECF2laPXJiqt3vHZpK,jpg\",\"product_size\":\"12g\",\"product_shipping_price\":2000,\"publication_status\":1,\"prescription\":\"false\",\"created_at\":null,\"updated_at\":null,\"sold\":21}}}', 1200, 'pending');
-- --------------------------------------------------------
--
-- Table structure for table `tbl_payment`
--
DROP TABLE IF EXISTS `tbl_payment`;
CREATE TABLE IF NOT EXISTS `tbl_payment` (
`payment_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`payment_method` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`payment_status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`payment_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `tbl_products`
--
DROP TABLE IF EXISTS `tbl_products`;
CREATE TABLE IF NOT EXISTS `tbl_products` (
`product_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`product_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`category_id` int(11) NOT NULL,
`manufacture_id` int(11) NOT NULL,
`product_short_description` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`product_long_description` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`product_price` double(8,2) NOT NULL,
`product_image` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`product_size` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`product_shipping_price` double(8,2) NOT NULL,
`publication_status` int(11) NOT NULL,
`prescription` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'false',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`sold` int(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`product_id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `tbl_products`
--
INSERT INTO `tbl_products` (`product_id`, `product_name`, `category_id`, `manufacture_id`, `product_short_description`, `product_long_description`, `product_price`, `product_image`, `product_size`, `product_shipping_price`, `publication_status`, `prescription`, `created_at`, `updated_at`, `sold`) VALUES
(1, 'Cloroquin', 2, 1, 'The drug is active for maleria', 'The drug is active for maleria', 1200.00, 'images/ewou7exRIx6SsAMe0oaG,jpg', '12g', 2000.00, 1, 'false', NULL, NULL, 22),
(2, 'Ceptrin', 2, 1, 'Lorem ipsum dolor sit amet consectetur', 'Lorem ipsum dolor sit amet consectetur adipisicing elit', 500.00, 'images/ewou7exRIx6SsAMe0oaG,jpg', '3g', 700.00, 1, 'false', NULL, NULL, 29),
(3, 'cipro', 2, 1, 'this is an antibiotic', 'the antibioctic is useful for treatment of all kind of bacterial infections', 2000.00, 'images/ewou7exRIx6SsAMe0oaG,jpg', '20g', 1400.00, 1, 'true', NULL, NULL, 0),
(4, 'Combisute', 2, 1, 'The drug is active for maleria', 'The drug is active for maleria', 1200.00, 'images/ewou7exRIx6SsAMe0oaG,jpg', '12g', 2000.00, 1, 'false', NULL, NULL, 22),
(5, 'Azymthrocim', 2, 1, 'Lorem ipsum dolor sit amet consectetur', 'Lorem ipsum dolor sit amet consectetur adipisicing elit', 500.00, 'images/ewou7exRIx6SsAMe0oaG,jpg', '3g', 700.00, 1, 'false', NULL, NULL, 29),
(6, 'B-complex', 2, 1, 'this is an antibiotic', 'the antibioctic is useful for treatment of all kind of bacterial infections', 2000.00, 'images/ewou7exRIx6SsAMe0oaG,jpg', '20g', 1400.00, 1, 'true', NULL, NULL, 0),
(7, 'Tramol', 2, 1, 'The drug is active for maleria', 'The drug is active for maleria', 1200.00, 'images/ewou7exRIx6SsAMe0oaG,jpg', '12g', 2000.00, 1, 'false', NULL, NULL, 22),
(8, 'codine', 2, 1, 'Lorem ipsum dolor sit amet consectetur', 'Lorem ipsum dolor sit amet consectetur adipisicing elit', 500.00, 'images/ewou7exRIx6SsAMe0oaG,jpg', '3g', 700.00, 1, 'false', NULL, NULL, 29),
(9, 'paracetamol', 2, 1, 'this is an antibiotic', 'the antibioctic is useful for treatment of all kind of bacterial infections', 2000.00, 'images/ewou7exRIx6SsAMe0oaG,jpg', '20g', 1400.00, 1, 'true', NULL, NULL, 0),
(10, 'Codolin', 2, 1, 'The drug is active for maleria', 'The drug is active for maleria', 1200.00, 'images/ewou7exRIx6SsAMe0oaG,jpg', '12g', 2000.00, 1, 'false', NULL, NULL, 22),
(11, 'Aspirine', 2, 1, 'Lorem ipsum dolor sit amet consectetur', 'Lorem ipsum dolor sit amet consectetur adipisicing elit', 500.00, 'images/ewou7exRIx6SsAMe0oaG,jpg', '3g', 700.00, 1, 'false', NULL, NULL, 29),
(12, 'B-complex', 2, 1, 'this is an antibiotic', 'the antibioctic is useful for treatment of all kind of bacterial infections', 2000.00, 'images/ewou7exRIx6SsAMe0oaG,jpg', '20g', 1400.00, 1, 'true', NULL, NULL, 0);
-- --------------------------------------------------------
--
-- Table structure for table `tbl_shipping`
--
DROP TABLE IF EXISTS `tbl_shipping`;
CREATE TABLE IF NOT EXISTS `tbl_shipping` (
`shipping_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`shipping_email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`shipping_first_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`shipping_last_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`shipping_address` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`shipping_mobile_number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`shipping_city` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`shipping_id`)
) ENGINE=MyISAM AUTO_INCREMENT=59 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `tbl_shipping`
--
INSERT INTO `tbl_shipping` (`shipping_id`, `shipping_email`, `shipping_first_name`, `shipping_last_name`, `shipping_address`, `shipping_mobile_number`, `shipping_city`, `created_at`, `updated_at`) VALUES
(1, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(2, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(3, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(4, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(5, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(6, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(7, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(8, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(9, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(10, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(11, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(12, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(13, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(14, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(15, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(16, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(17, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(18, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(19, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(20, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(21, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(22, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(23, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(24, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(25, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(26, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(27, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(28, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(29, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(30, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(31, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(32, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(33, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(34, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(35, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(36, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(37, '<EMAIL>', 'olagoke', 'mubarak', '23 eleyel', 'o7o36990880', 'sdfjnioskjkijb', NULL, NULL),
(38, '<EMAIL>', 'olagoke', 'mubarak', '23 eleyel', 'o7o36990880', 'sdfjnioskjkijb', NULL, NULL),
(39, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(40, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(41, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(42, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(43, '<EMAIL>', 'Olagoke', 'Mubarak', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(44, '<EMAIL>', 'Olagoke', 'Mubarak', 'I\'m testing this work with this address', '07036998003', 'Ile-ife', NULL, NULL),
(45, '<EMAIL>', 'Olagoke', 'Mubarak', 'I\'m testing this work with this address', '07036998003', 'Ile-ife', NULL, NULL),
(46, '<EMAIL>', 'Olagoke', 'Mubarak', 'I\'m testing this work with this address', '07036998003', 'Ile-ife', NULL, NULL),
(47, '<EMAIL>', 'Olagoke', 'Mubarak', 'I\'m testing this work with this address', '07036998003', 'Ile-ife', NULL, NULL),
(48, '<EMAIL>', 'Olagoke', 'Mubarak', 'I\'m testing this work with this address', '07036998003', 'Ile-ife', NULL, NULL),
(49, '<EMAIL>', 'Olagoke', 'Mubarak', 'I\'m testing this work with this address', '07036998003', 'Ile-ife', NULL, NULL),
(50, '<EMAIL>', 'Olagoke', 'Mubarak', 'I\'m testing this work with this address', '07036998003', 'Ile-ife', NULL, NULL),
(51, '<EMAIL>', 'Olagoke', 'Olagoke', 'I\'m testing this work with this address', '07036998003', 'Ile-ife', NULL, NULL),
(52, '<EMAIL>', 'Olagoke', 'Olagoke', 'I\'m testing this work with this address', '07036998003', 'Ile-ife', NULL, NULL),
(53, '<EMAIL>', 'Olagoke', 'Olagoke', 'I\'m testing this work with this address', '07036998003', 'Ile-ife', NULL, NULL),
(54, '<EMAIL>', 'Olagoke', 'Olagoke', 'I\'m testing this work with this address', '07036998003', 'Ile-ife', NULL, NULL),
(55, '<EMAIL>', 'Olagoke', 'Olagoke', '29 eleyele', '07036998003', 'Ile-ife', NULL, NULL),
(56, '<EMAIL>', 'Olagoke', 'Mubarak', 'I\'m testing this work with this address', '07036998003', 'Ile-ife', NULL, NULL),
(57, '<EMAIL>', 'Olagoke', 'Olagoke', 'I\'m testing this work with this address', '07036998003', 'Ile-ife', NULL, NULL),
(58, '<EMAIL>', 'Olagoke', 'Mubarak', '29 unoilbikj', '9002033929', 'ife', NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `tbl_slider`
--
DROP TABLE IF EXISTS `tbl_slider`;
CREATE TABLE IF NOT EXISTS `tbl_slider` (
`slider_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`slider_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`slider_short_description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`slider_image` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`publication_status` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`slider_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `tbl_temp_data`
--
DROP TABLE IF EXISTS `tbl_temp_data`;
CREATE TABLE IF NOT EXISTS `tbl_temp_data` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`customer_id` int(11) NOT NULL,
`sub_total` varchar(20) NOT NULL,
`total_price` varchar(20) NOT NULL,
`cart` longtext NOT NULL,
`shipping_id` int(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `tbl_temp_data`
--
INSERT INTO `tbl_temp_data` (`id`, `customer_id`, `sub_total`, `total_price`, `cart`, `shipping_id`) VALUES
(2, 1, '1000', '1700', '{\"8\":{\"id\":8,\"name\":\"codine\",\"price\":500,\"quantity\":2,\"attributes\":[],\"conditions\":[],\"associatedModel\":{\"product_id\":8,\"product_name\":\"codine\",\"category_id\":2,\"manufacture_id\":1,\"product_short_description\":\"Lorem ipsum dolor sit amet consectetur\",\"product_long_description\":\"Lorem ipsum dolor sit amet consectetur adipisicing elit\",\"product_price\":500,\"product_image\":\"images\\/Kcyzw2o2TNpDWCCpmGfS,jpg\",\"product_size\":\"3g\",\"product_shipping_price\":700,\"publication_status\":1,\"prescription\":\"false\",\"created_at\":null,\"updated_at\":null,\"sold\":29}}}', 58),
(4, 4, '500', '700', '{\"2\":{\"id\":2,\"name\":\"Ceptrin\",\"price\":500,\"quantity\":\"1\",\"attributes\":[],\"conditions\":[],\"associatedModel\":{\"product_id\":2,\"product_name\":\"Ceptrin\",\"category_id\":2,\"manufacture_id\":1,\"product_short_description\":\"Lorem ipsum dolor sit amet consectetur\",\"product_long_description\":\"Lorem ipsum dolor sit amet consectetur adipisicing elit\",\"product_price\":500,\"product_image\":\"images\\/Kcyzw2o2TNpDWCCpmGfS,jpg\",\"product_size\":\"3g\",\"product_shipping_price\":700,\"publication_status\":1,\"prescription\":\"false\",\"created_at\":null,\"updated_at\":null,\"sold\":29}}}', NULL),
(3, 3, '1200', '3700', '{\"1\": {\"id\": 1, \"name\": \"Cloroquin\", \"price\": 1200, \"quantity\": \"1\", \"attributes\": [], \"conditions\": [], \"associatedModel\": {\"sold\": 21, \"created_at\": null, \"product_id\": 1, \"updated_at\": null, \"category_id\": 2, \"prescription\": \"false\", \"product_name\": \"Cloroquin\", \"product_size\": \"12g\", \"product_image\": \"images/dCECF2laPXJiqt3vHZpK,jpg\", \"product_price\": 1200, \"manufacture_id\": 1, \"publication_status\": 1, \"product_shipping_price\": 2000, \"product_long_description\": \"The drug is active for maleria\", \"product_short_description\": \"The drug is active for maleria\"}}}', 56),
(5, 5, '500', '700', '{\"2\":{\"id\":2,\"name\":\"Ceptrin\",\"price\":500,\"quantity\":\"1\",\"attributes\":[],\"conditions\":[],\"associatedModel\":{\"product_id\":2,\"product_name\":\"Ceptrin\",\"category_id\":2,\"manufacture_id\":1,\"product_short_description\":\"Lorem ipsum dolor sit amet consectetur\",\"product_long_description\":\"Lorem ipsum dolor sit amet consectetur adipisicing elit\",\"product_price\":500,\"product_image\":\"images\\/Kcyzw2o2TNpDWCCpmGfS,jpg\",\"product_size\":\"3g\",\"product_shipping_price\":700,\"publication_status\":1,\"prescription\":\"false\",\"created_at\":null,\"updated_at\":null,\"sold\":29}}}', NULL),
(6, 6, '500', '700', '{\"2\":{\"id\":2,\"name\":\"Ceptrin\",\"price\":500,\"quantity\":\"1\",\"attributes\":[],\"conditions\":[],\"associatedModel\":{\"product_id\":2,\"product_name\":\"Ceptrin\",\"category_id\":2,\"manufacture_id\":1,\"product_short_description\":\"Lorem ipsum dolor sit amet consectetur\",\"product_long_description\":\"Lorem ipsum dolor sit amet consectetur adipisicing elit\",\"product_price\":500,\"product_image\":\"images\\/Kcyzw2o2TNpDWCCpmGfS,jpg\",\"product_size\":\"3g\",\"product_shipping_price\":700,\"publication_status\":1,\"prescription\":\"false\",\"created_at\":null,\"updated_at\":null,\"sold\":29}}}', NULL);
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/Drp.ServerQueue/SQLFiles/ActiveAndHistory_ItemTypeCounts.sql<gh_stars>1-10
Select
ItemType as ActiveItemType,
Count(id) as ItemTypeCount
From ServerQueueItem
GROUP BY ItemType
Select
ItemType as HistoryItemType,
Count(id) as ItemTypeCount
From ServerQueueHistoryItem
GROUP BY ItemType
SELECT
YEAR([LogDateTime]) AS 'YEAR',
DATEPART(DAYOFYEAR, [LogDateTime]) AS 'DayOfYear',
DATEPART(HH, [LogDateTime]) AS 'HourOfDay',
MIN([LogDateTime]) AS 'StartTime',
MAX([LogDateTime]) AS 'EndTime',
Count(LogEntryId) AS 'LogEntryCount'
FROM dbo.ServerQueueLog
GROUP BY
YEAR([LogDateTime]),
DATEPART(DAYOFYEAR, [LogDateTime]),
DATEPART(HH, [LogDateTime])
ORDER BY
YEAR([LogDateTime]),
DATEPART(DAYOFYEAR, [LogDateTime]),
DATEPART(HH, [LogDateTime])
|
SET DEFINE OFF;
ALTER TABLE AFW_13_EMPLA_DOSR_VIRTL ADD (
CONSTRAINT AFW_13_EMPLA_DOSR_VIRTL_UK1
UNIQUE (REF_DOSR_VIRTL, REF_VERSN)
ENABLE VALIDATE)
/
|
metadata :name => "SimpleRPC Agent For LVM Management",
:description => "Agent to query LVM commands via MCollective",
:author => "<NAME>",
:url => 'https://github.com/nadeau/mcollective-plugins',
:license => "Apache License, Version 2.0",
:version => "1.0",
:timeout => 30
action "vgdisplay", :description => "Show Volume Groups Usage" do
display :always
output :total,
:description => "Total Disk Space",
:display_as => "Total"
output :allocated,
:description => "Allocated Disk Space",
:display_as => "Allocated"
output :free,
:description => "Free Disk Space",
:display_as => "Free"
end
action "lvdisplay", :description => "Show Logical Volumes Allocation" do
display :always
output :size,
:description => "Volume Space",
:display_as => "Size"
end
action "lvs", :description => "Show Logical Volume Details" do
display :always
output :lvs,
:description => "lvs details",
:display_as => "lvs"
end
action "fullvgdisplay", :description => "Show Full Volume Groups Usage" do
display :always
end
|
-- Creates database <[app-lower]>_dev_db
CREATE DATABASE IF NOT EXISTS <[app-lower]>_dev_db;
USE <[app-lower]>_dev_db;
CREATE USER IF NOT EXISTS '<[app-lower]>_dev'@'localhost' IDENTIFIED BY '<[app-lower]>_dev_pwd';
GRANT ALL ON <[app-lower]>_dev_db.* TO '<[app-lower]>_dev'@'localhost';
GRANT SELECT ON performance_schema.* TO '<[app-lower]>_dev'@'localhost';
|
<reponame>ryanmdoyle/class-karma<filename>api/db/migrations/20210429213218_init/migration.sql<gh_stars>1-10
-- CreateTable
CREATE TABLE "User" (
"id" TEXT NOT NULL,
"uid" TEXT NOT NULL,
"firstName" TEXT NOT NULL,
"lastName" TEXT NOT NULL,
"email" TEXT NOT NULL,
"profileImage" TEXT,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "UserRole" (
"id" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"name" TEXT NOT NULL,
"userId" TEXT NOT NULL,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Feedback" (
"id" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"name" TEXT NOT NULL DEFAULT E'Feedback',
"value" INTEGER NOT NULL DEFAULT 1,
"userId" TEXT NOT NULL,
"behaviorId" TEXT,
"groupId" TEXT,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Behavior" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"value" INTEGER NOT NULL,
"groupId" TEXT,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Redeemed" (
"id" TEXT NOT NULL,
"userId" TEXT NOT NULL,
"name" TEXT NOT NULL,
"cost" INTEGER NOT NULL,
"response" TEXT,
"reviewed" BOOLEAN NOT NULL DEFAULT false,
"reviewedAt" TIMESTAMP(3),
"groupId" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Reward" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"cost" INTEGER NOT NULL,
"responseRequired" BOOLEAN NOT NULL DEFAULT false,
"responsePrompt" TEXT,
"groupId" TEXT,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Group" (
"id" TEXT NOT NULL,
"type" TEXT NOT NULL,
"name" TEXT NOT NULL,
"description" TEXT DEFAULT E'',
"enrollId" TEXT,
"ownerId" TEXT NOT NULL,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Enrollment" (
"id" TEXT NOT NULL,
"userId" TEXT NOT NULL,
"groupId" TEXT,
PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "User.uid_unique" ON "User"("uid");
-- CreateIndex
CREATE UNIQUE INDEX "User.email_unique" ON "User"("email");
-- CreateIndex
CREATE UNIQUE INDEX "Group.enrollId_unique" ON "Group"("enrollId");
-- AddForeignKey
ALTER TABLE "UserRole" ADD FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Feedback" ADD FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Feedback" ADD FOREIGN KEY ("behaviorId") REFERENCES "Behavior"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Feedback" ADD FOREIGN KEY ("groupId") REFERENCES "Group"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Behavior" ADD FOREIGN KEY ("groupId") REFERENCES "Group"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Redeemed" ADD FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Redeemed" ADD FOREIGN KEY ("groupId") REFERENCES "Group"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Reward" ADD FOREIGN KEY ("groupId") REFERENCES "Group"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Group" ADD FOREIGN KEY ("ownerId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Enrollment" ADD FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Enrollment" ADD FOREIGN KEY ("groupId") REFERENCES "Group"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
<filename>scripts/store/insert_polyfillio_hash.sql<gh_stars>1-10
INSERT OR REPLACE INTO `polyfillio_hashes` (
`polyfill_io_list`,
`ua`,
`hash`
) VALUES (
?,
?,
?
);
|
-- expr.test
--
-- execsql {
-- SELECT 0+'9223372036854775807.0'
-- }
SELECT 0+'9223372036854775807.0'
|
<reponame>zhangchuanlei/blogs<gh_stars>0
insert into midata.web_visit_agg_1d_local (
app_id,
app_version_id,
os_id,
device_id,
country_id,
region_id,
city_id,
carrier_id,
ch_start_date,
timestamp,
visit_count,
customer_count,
device_uuid_count,
action_count,
http_count,
http_error_count,
crash_count,
anr_count,
slow_count,
http_third_count
) SELECT
app_id,
app_version_id,
os_id,
device_id,
country_id,
region_id,
city_id,
carrier_id,
ch_start_date,
toUInt64((intDiv(timestamp + ((60000 * 60) * 8), (60000 * 60) * 24) * ((60000 * 60) * 24)) - ((60000 * 60) * 8)) AS timestamp,
uniqMergeState(visit_count) AS visit_count,
uniqMergeState(customer_count) AS customer_count,
uniqMergeState(device_uuid_count) AS device_uuid_count,
sumMergeState(action_count) AS action_count,
sumMergeState(http_count) AS http_count,
sumMergeState(http_error_count) AS http_error_count,
sumMergeState(crash_count) AS crash_count,
sumMergeState(anr_count) AS anr_count,
sumMergeState(slow_count) AS slow_count,
sumMergeState(http_third_count) AS http_third_count
FROM midata.`.inner.web_visit_agg_1d_local_bak_1108`
where ch_start_date between '2019-11-04' and '2019-11-10'
GROUP BY app_id, app_version_id, os_id, device_id, country_id, region_id, city_id, carrier_id, ch_start_date, timestamp;
---
insert into midata.mi_visit_agg_1d_local (
app_id ,
app_version_id ,
os_id ,
device_id ,
country_id ,
region_id ,
city_id ,
carrier_id ,
ch_start_date ,
timestamp ,
visit_count ,
customer_count ,
device_uuid_count ,
action_count ,
http_count ,
http_error_count ,
crash_count ,
anr_count ,
slow_count ,
http_third_count
) SELECT
app_id,
app_version_id,
os_id,
device_id,
country_id,
region_id,
city_id,
carrier_id,
ch_start_date,
toUInt64((intDiv(timestamp + ((60000 * 60) * 8), (60000 * 60) * 24) * ((60000 * 60) * 24)) - ((60000 * 60) * 8)) AS timestamp,
uniqMergeState(visit_count) AS visit_count,
uniqMergeState(customer_count) AS customer_count,
uniqMergeState(device_uuid_count) AS device_uuid_count,
sumMergeState(action_count) AS action_count,
sumMergeState(http_count) AS http_count,
sumMergeState(http_error_count) AS http_error_count,
sumMergeState(crash_count) AS crash_count,
sumMergeState(anr_count) AS anr_count,
sumMergeState(slow_count) AS slow_count,
sumMergeState(http_third_count) AS http_third_count
FROM midata.`.inner.mi_visit_agg_1d_local_bak_1108`
where ch_start_date between '2019-11-04' and '2019-11-10'
GROUP BY app_id, app_version_id, os_id, device_id, country_id, region_id, city_id, carrier_id, ch_start_date, timestamp;
|
-- This file should undo anything in `up.sql`
DROP TABLE relations
|
INSERT INTO
project (
id,
creator_id,
updater_id,
name,
`key`,
workflow_type
)
VALUES
(
3001,
101,
101,
'Test (UI)',
'TEST',
'UI'
);
INSERT INTO
project (
id,
creator_id,
updater_id,
name,
`key`,
workflow_type
)
VALUES
(
3002,
101,
101,
'Shop (Git)',
'SHP',
'VCS'
);
INSERT INTO
project (
id,
creator_id,
updater_id,
name,
`key`,
workflow_type
)
VALUES
(
3003,
101,
101,
'Blog (Git)',
'BLG',
'VCS'
);
INSERT INTO
project (
id,
row_status,
creator_id,
updater_id,
name,
`key`,
workflow_type
)
VALUES
(
3004,
'ARCHIVED',
101,
101,
'Retired Project',
'RTR',
'UI'
);
|
/****** Object: View [dbo].[V_Tmp_Sorting_Index_Check] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW dbo.V_Tmp_Sorting_Index_Check
AS
SELECT Protein_Collection_ID, COUNT(Protein_Collection_ID) AS Count
FROM dbo.T_Protein_Collection_Members
WHERE (Sorting_Index IS NULL)
GROUP BY Protein_Collection_ID
GO
|
CREATE DATABASE Tracker;
CREATE TABLE rights (
right_id serial PRIMARY KEY,
right_name VARCHAR(50)
);
CREATE TABLE roles (
role_id serial PRIMARY KEY,
role_name VARCHAR(50)
);
CREATE TABLE role_right (
right_id INT NOT NULL,
CONSTRAINT rights_right_id_fk
FOREIGN KEY (right_id)
REFERENCES rights (right_id),
role_id INT NOT NULL,
CONSTRAINT roles_role_id_fk
FOREIGN KEY (role_id)
REFERENCES roles (role_id)
);
CREATE TABLE users (
user_id serial primary key,
role_id INT NOT NULL,
CONSTRAINT roles_role_id_fk
FOREIGN KEY (role_id)
REFERENCES roles (role_id),
user_name VARCHAR(50)
);
CREATE TABLE states (
state_id serial PRIMARY KEY,
state_name VARCHAR(50)
);
CREATE TABLE categories (
category_id serial PRIMARY KEY,
category_name VARCHAR(50)
);
CREATE TABLE items (
item_id serial primary key,
user_id INT NOT NULL,
CONSTRAINT users_user_id_fk
FOREIGN KEY (user_id)
REFERENCES users (user_id),
state_id INT NOT NULL,
CONSTRAINT states_state_id_fk
FOREIGN KEY (state_id)
REFERENCES states (state_id),
category_id INT NOT NULL,
CONSTRAINT categories_category_id_fk
FOREIGN KEY (category_id)
REFERENCES categories (category_id),
item_name VARCHAR(250) NOT NULL
);
CREATE TABLE comments (
comment_id serial PRIMARY KEY,
item_id INT NOT NULL,
CONSTRAINT items_item_id_fk
FOREIGN KEY (item_id)
REFERENCES items (item_id),
comment_text text
);
CREATE TABLE attaches (
attach_id serial PRIMARY KEY,
item_id INT NOT NULL,
CONSTRAINT items_item_id_fk
FOREIGN KEY (item_id)
REFERENCES items (item_id),
file_name VARCHAR(250)
);
INSERT INTO rights (right_name)
VALUES
('Full access'),
('Read only');
INSERT INTO roles (role_name)
VALUES
('Admin'),
('Guest');
INSERT INTO role_right (right_id, role_id)
VALUES
((SELECT right_id FROM rights WHERE right_name = 'Full access'), (SELECT role_id FROM roles WHERE role_name = 'Admin')),
((SELECT right_id FROM rights WHERE right_name = 'Read only'), (SELECT role_id FROM roles WHERE role_name = 'Guest'));
INSERT INTO users (role_id, user_name)
VALUES
((SELECT role_id FROM roles WHERE role_name = 'Admin'),'Roman'),
((SELECT role_id FROM roles WHERE role_name = 'Guest'),'Sergey');
INSERT INTO states (state_name)
VALUES
('New'),
('In the work'),
('Closed');
INSERT INTO categories (category_name)
VALUES
('Bug report'),
('Critical issue'),
('Technical problem');
INSERT INTO items (user_id, state_id, category_id, item_name)
VALUES
((SELECT user_id FROM users WHERE user_name = 'Roman'), (SELECT state_id FROM states WHERE state_name = 'New'),
(SELECT category_id FROM categories WHERE category_name = 'Bug report'), 'Bug #1'),
((SELECT user_id FROM users WHERE user_name = 'Roman'), (SELECT state_id FROM states WHERE state_name = 'New'),
(SELECT category_id FROM categories WHERE category_name = 'Technical problem'), 'Mouse don''t work');
INSERT INTO comments (item_id, comment_text)
VALUES ((SELECT item_id FROM items WHERE item_id = 1), 'При переходе по ссылке вылетает ошибка 404'),
((SELECT item_id FROM items WHERE item_id = 2), 'Я ничего не делал, оно само');
INSERT INTO attaches (item_id, file_name)
VALUES ((SELECT item_id FROM items WHERE item_id = 1), 'скриншот.жыпег');
|
CREATE TABLE collections (
id uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
name TEXT NOT NULL,
user_id uuid NOT NULL REFERENCES users (id),
featured_collectible_id uuid REFERENCES ticket_types (id),
created_at TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT now(),
updated_at TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT now()
);
CREATE INDEX index_collections_user_id ON collections (user_id);
CREATE UNIQUE INDEX index_collections_name ON collections (name, user_id);
CREATE TABLE collection_items (
id uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
collection_id uuid NOT NULL REFERENCES collections (id),
collectible_id uuid NOT NULL REFERENCES ticket_types (id),
next_collection_item_id uuid REFERENCES collection_items (id),
created_at TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT now(),
updated_at TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT now()
);
CREATE INDEX index_collections_items_collection_id ON collection_items (collection_id);
CREATE INDEX index_collection_items_collectible_id ON collection_items (collectible_id);
CREATE INDEX index_collection_items_next_collection_item_id ON collection_items (next_collection_item_id);
CREATE UNIQUE INDEX index_collection_items_ticket_type_and_collection_id ON collection_items (collectible_id, collection_id);
|
--TEST: [Analytic Functions] Error occurs when analytic functions are used in ANY expression within a where clause
set system parameters 'dont_reuse_heap_file=yes';
drop table if exists t;
drop table if exists u;
create table t(i int);
create table u(i int);
insert into t values (1);
insert into t values (2);
insert into u values (1);
insert into u values (2);
select /*+ recompile */ * from t where i > any(select row_number() over(order by i) from u) order by 1;
select /*+ recompile */ * from t where cast(i as int) > any(select row_number() over(order by i) from u) order by 1;
select /*+ recompile */ * from t where i >= all(select min(i) over(partition by i order by i) from u) order by 1;
select /*+ recompile */ * from t where cast(i as int) > all(select (max(i) over(order by i))-2 from u) order by 1;
select /*+ recompile */ * from t where i > some(select avg(i) over(order by i) aaa from u) order by 1;
select /*+ recompile */ * from t where cast(i as int) <= some(select sum(i) over(partition by i) from u) order by 1;
drop table t, u;
set system parameters 'dont_reuse_heap_file = no';
|
/*
* LogPkg1.sql
* Chapter 10, Oracle10g PL/SQL Programming
* by <NAME>, <NAME> and <NAME>
*
* This script demonstrates user defined packages called from
* triggers.
*/
CREATE OR REPLACE PACKAGE LogPkg AS
PROCEDURE LogConnect(p_UserID IN VARCHAR2);
PROCEDURE LogDisconnect(p_UserID IN VARCHAR2);
END LogPkg;
/
show errors
CREATE OR REPLACE PACKAGE BODY LogPkg AS
PROCEDURE LogConnect(p_UserID IN VARCHAR2) IS
BEGIN
INSERT INTO connect_audit (user_name, operation, timestamp)
VALUES (p_USerID, 'CONNECT', SYSDATE);
END LogConnect;
PROCEDURE LogDisconnect(p_UserID IN VARCHAR2) IS
BEGIN
INSERT INTO connect_audit (user_name, operation, timestamp)
VALUES (p_USerID, 'DISCONNECT', SYSDATE);
END LogDisconnect;
END LogPkg;
/
show errors
|
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Tempo de geração: 20/08/2018 às 13:16
-- Versão do servidor: 10.2.17-MariaDB-10.2.17+maria~xenial
-- Versão do PHP: 7.2.8-1+ubuntu16.04.1+deb.sury.org+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 */;
--
-- Banco de dados: `pienza`
--
-- --------------------------------------------------------
--
-- Estrutura para tabela `api_integrations`
--
CREATE TABLE `api_integrations` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Estrutura para tabela `attachments`
--
CREATE TABLE `attachments` (
`id` int(10) UNSIGNED NOT NULL,
`lesson_id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`value` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Estrutura para tabela `bairros`
--
CREATE TABLE `bairros` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`cidade_id` int(11) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Fazendo dump de dados para tabela `bairros`
--
INSERT INTO `bairros` (`id`, `name`, `cidade_id`, `created_at`, `updated_at`) VALUES
(1, 'Centro', 1, '2018-06-08 22:27:07', '2018-06-08 22:28:27'),
(3, 'Imigrantes', 1, '2018-06-08 22:28:41', '2018-06-08 22:28:41'),
(4, 'Centro', 2, '2018-06-10 00:07:27', '2018-06-10 00:07:27'),
(5, 'São Cristóvão', 1, '2018-07-19 15:49:54', '2018-07-19 15:49:54'),
(6, 'Dos Estados', 1, '2018-07-20 21:02:19', '2018-07-20 21:02:19');
-- --------------------------------------------------------
--
-- Estrutura para tabela `blogs`
--
CREATE TABLE `blogs` (
`id` int(11) NOT NULL,
`name` varchar(250) NOT NULL,
`slug` varchar(250) NOT NULL,
`lead` text NOT NULL,
`description` text NOT NULL,
`thumbnail` varchar(50) NOT NULL,
`image` varchar(50) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Fazendo dump de dados para tabela `blogs`
--
INSERT INTO `blogs` (`id`, `name`, `slug`, `lead`, `description`, `image`, `created_at`, `updated_at`) VALUES
(1, 'Este é o momento de investir, diz especialista em crise imobiliária', 'este-e-o-momento-de-investir-diz-especialista-em-crise-imobiliaria', 'Para o americano <NAME>, executivo do fundo de private equity Cerberus, a recuperação no Brasil poderia levar dez anos', '<p>Belém tem 30 mil famílias procurando imóveis e a expectativa é que em 2018 entrem mais 10 mil famílias procurando imóveis para morar. Assim como a economia do país, o mercado imobiliária viveu um momento de baixa. </p><p>Mas 2018 se apresenta como um ano eleitoral, em que há investimentos na sociedade como um todo e, claro, influência também no setor dos imóveis para suprir essa demanda adormecida. \"2018, além de ser um ano que a gente espera ser de crescimento de PIB, de uma estabilidade um pouco melhor na economia, é um ano de eleição, em que a construção civil é o primeiro setor beneficiado. Na hora que entrar esse recurso, a gente espera que esse preço que hoje está colado, tenha um deslocamento, não se espera um grande deslocamento no valor de mercado do imóvel, mas se espera que ele dê uma valorizada\", explica o corretor <NAME>. O grande desafio e a resposta para o questionamento sobre como agir no mercado imobiliário nesse início de 2018, segundo Murilo Souza é: <strong>COMPRAR PARA POUPAR</strong>. <em>\"Não existe mais como frear tanta demanda reprimida. </em></p><p>Qualquer valor, qualquer financiamento que melhore para o consumidor final vai deslocar esse preço. Não vamos esperar queda de preços nos valores imobiliários em 2018, vai existir sim, um descolamento\", projeta. Segundo Murilo, a compra do imóvel pode ser feita de várias formas, não precisa ter dinheiro à vista, a pessoa pode investir no metro quadrado, investir num lançamento, investir em uma série de produtos que vão ser ofertados em 2018. \"Procure um corretor, uma pessoa credenciada que pode ajudar nessa jornada\", pontua Murilo. No próximo vídeo da série o tema abordado será <strong><em>\"Tecnologia no Mercado Imobiliário\".</em></strong></p>', '195139201806075b198ccb65ec2.jpeg', '2018-06-07 22:51:39', '2018-06-12 22:25:36');
-- --------------------------------------------------------
--
-- Estrutura para tabela `caracteristicas`
--
CREATE TABLE `caracteristicas` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`quantidade` int(11) NOT NULL,
`imovel_id` int(11) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Fazendo dump de dados para tabela `caracteristicas`
--
INSERT INTO `caracteristicas` (`id`, `name`, `quantidade`, `imovel_id`, `created_at`, `updated_at`) VALUES
(2, 'Churrasqueiras', 2, 4, '2018-06-11 03:33:14', '2018-06-11 03:34:53');
-- --------------------------------------------------------
--
-- Estrutura para tabela `categories`
--
CREATE TABLE `categories` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`description` text COLLATE utf8_unicode_ci DEFAULT NULL,
`order` int(11) NOT NULL DEFAULT 0,
`active` tinyint(1) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`lead` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`image` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`is_main` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Estrutura para tabela `chapters`
--
CREATE TABLE `chapters` (
`id` int(10) UNSIGNED NOT NULL,
`course_id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`description` text COLLATE utf8_unicode_ci DEFAULT NULL,
`order` int(11) NOT NULL DEFAULT 0,
`active` tinyint(1) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Estrutura para tabela `cidades`
--
CREATE TABLE `cidades` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`uf` varchar(2) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Fazendo dump de dados para tabela `cidades`
--
INSERT INTO `cidades` (`id`, `name`, uf, `created_at`, `updated_at`) VALUES
(1, 'Concórdia', 'SC', '2018-06-08 20:53:55', '2018-06-08 20:53:55'),
(2, 'Chapecó', 'SC', '2018-06-08 20:54:05', '2018-06-08 20:54:05');
-- --------------------------------------------------------
--
-- Estrutura para tabela `clients`
--
CREATE TABLE `clients` (
`id` int(10) UNSIGNED NOT NULL,
`user_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`cpf` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`birthdate` varchar(14) COLLATE utf8_unicode_ci NOT NULL,
`phone` varchar(11) COLLATE utf8_unicode_ci NOT NULL,
`secondary_phone` varchar(11) COLLATE utf8_unicode_ci NOT NULL,
`zipcode` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
`street` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`number` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
`complement` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`district` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`city` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`state` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`moip_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Estrutura para tabela `configs`
--
CREATE TABLE `configs` (
`id` int(11) NOT NULL,
`name` varchar(25) NOT NULL,
`keywords` varchar(250) NOT NULL,
`description` text NOT NULL,
`facebook` varchar(250) DEFAULT NULL,
`linkedin` varchar(250) DEFAULT NULL,
`instagram` varchar(250) DEFAULT NULL,
`endereco` varchar(350) NOT NULL,
`latitude` varchar(25) DEFAULT NULL,
`longitude` varchar(25) DEFAULT NULL,
`telefone` varchar(15) NOT NULL,
`telefone_2` varchar(15) DEFAULT NULL,
`telefone_3` varchar(15) DEFAULT NULL,
`email` varchar(50) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Fazendo dump de dados para tabela `configs`
--
INSERT INTO `configs` (`id`, `name`, `keywords`, `description`, `facebook`, `linkedin`, `instagram`, `endereco`, `link_mapa`, `telefone`, `telefone_2`, `telefone_3`, `email`, `created_at`, `updated_at`) VALUES
(1, 'Configurações do site', 'PIENZA,pienza,imobiliaria,imobiliária,imóveis, concórdia, imoveis,alugar,vender,comprar,casas a venda, casas para alugar', 'PIENZA - Imobiliária', 'https://www.facebook.com/', NULL, NULL, 'Endereço', 'https://google.com.br', '(49) 3442-0000', '(42) 99914-0000', '(49) 99999-9999', '<EMAIL>', '2018-06-06 20:47:37', '2018-07-23 22:11:01');
-- --------------------------------------------------------
--
-- Estrutura para tabela `configurations`
--
CREATE TABLE `configurations` (
`id` int(10) UNSIGNED NOT NULL,
`key` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`value` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Estrutura para tabela `corretores`
--
CREATE TABLE `corretores` (
`id` int(11) NOT NULL,
`name` varchar(50) NOT NULL,
`email` varchar(25) NOT NULL,
`telefone` varchar(15) NOT NULL,
`image` varchar(50) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Fazendo dump de dados para tabela `corretores`
--
INSERT INTO `corretores` (`id`, `name`, `email`, `telefone`, `image`, `created_at`, `updated_at`) VALUES
(2, 'teste', '<EMAIL>', '(49) 99999-9344', '201900201807235b563834d3ac0.png', '2018-07-23 23:19:00', '2018-07-23 23:19:00');
-- --------------------------------------------------------
--
-- Estrutura para tabela `courses`
--
CREATE TABLE `courses` (
`id` int(10) UNSIGNED NOT NULL,
`category_id` int(11) NOT NULL,
`level_id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`image` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`lead` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`description` text COLLATE utf8_unicode_ci DEFAULT NULL,
`details_title` text COLLATE utf8_unicode_ci DEFAULT NULL,
`details_description` text COLLATE utf8_unicode_ci DEFAULT NULL,
`active` tinyint(1) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`price` int(11) NOT NULL DEFAULT 0,
`promotional_price` int(11) NOT NULL DEFAULT 0,
`promotion_active` tinyint(1) NOT NULL DEFAULT 0,
`promotional_phrase` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`teacher_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Estrutura para tabela `depoimentos`
--
CREATE TABLE `depoimentos` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`description` text NOT NULL,
`image` varchar(50) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Fazendo dump de dados para tabela `depoimentos`
--
INSERT INTO `depoimentos` (`id`, `name`, `description`, `image`, `created_at`, `updated_at`) VALUES
(1, '<NAME>', '<p>Lorem ipsum dolor sit a met dolorem lorem dlores Lorem ipsum dolor sit a met dolorem lorem dlores Lorem ipsum dolor sit a met dolorem lorem dlores Lorem ipsum dolor sit a met dolorem lorem dlores.</p>', '141111201806075b193cffd3ad3.jpeg', '2018-06-07 17:01:28', '2018-06-07 17:11:11');
-- --------------------------------------------------------
--
-- Estrutura para tabela `groups`
--
CREATE TABLE `groups` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Fazendo dump de dados para tabela `groups`
--
INSERT INTO `groups` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'Administrador', '2018-05-10 05:20:28', '2018-05-10 05:20:28');
-- --------------------------------------------------------
--
-- Estrutura para tabela `group_module`
--
CREATE TABLE `group_module` (
`id` int(10) UNSIGNED NOT NULL,
`group_id` int(11) NOT NULL,
`module_id` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Fazendo dump de dados para tabela `group_module`
--
INSERT INTO `group_module` (`id`, `group_id`, `module_id`, `created_at`, `updated_at`) VALUES
(1, 1, 2, NULL, NULL),
(2, 1, 4, NULL, NULL),
(3, 1, 3, NULL, NULL),
(4, 1, 1, NULL, NULL),
(5, 1, 5, NULL, NULL),
(6, 1, 6, NULL, NULL),
(7, 1, 7, NULL, NULL),
(8, 1, 8, NULL, NULL),
(9, 1, 9, NULL, NULL),
(10, 1, 10, NULL, NULL),
(11, 1, 11, NULL, NULL),
(12, 1, 12, NULL, NULL),
(13, 1, 13, NULL, NULL),
(14, 1, 14, NULL, NULL),
(15, 1, 15, NULL, NULL);
-- --------------------------------------------------------
--
-- Estrutura para tabela `imagem_extras`
--
CREATE TABLE `imagem_extras` (
`id` int(11) NOT NULL,
`image` varchar(100) NOT NULL,
`imovel_id` int(11) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Fazendo dump de dados para tabela `imagem_extras`
--
INSERT INTO `imagem_extras` (`id`, `image`, `imovel_id`, `created_at`, `updated_at`) VALUES
(8, '003153201806185b26fd7909399.jpeg', 4, '2018-06-18 03:31:53', '2018-06-18 03:31:53'),
(9, '003204201806185b26fd84d2de3.jpeg', 4, '2018-06-18 03:32:04', '2018-06-18 03:32:04'),
(10, '022114201806185b27171af3fa2.jpeg', 4, '2018-06-18 05:21:15', '2018-06-18 05:21:15'),
(11, '171415201806205b2a8b67457ab.jpeg', 5, '2018-06-20 20:14:15', '2018-06-20 20:14:15'),
(12, '171415201806205b2a8b67514ac.jpeg', 5, '2018-06-20 20:14:15', '2018-06-20 20:14:15'),
(13, '171415201806205b2a8b6756e3a.jpeg', 5, '2018-06-20 20:14:15', '2018-06-20 20:14:15'),
(14, '171415201806205b2a8b675c8d9.jpeg', 5, '2018-06-20 20:14:15', '2018-06-20 20:14:15'),
(16, '171415201806205b2a8b676cc8a.jpeg', 5, '2018-06-20 20:14:15', '2018-06-20 20:14:15'),
(17, '171415201806205b2a8b6771088.jpeg', 5, '2018-06-20 20:14:15', '2018-06-20 20:14:15'),
(18, '171415201806205b2a8b677576c.jpeg', 5, '2018-06-20 20:14:15', '2018-06-20 20:14:15'),
(19, '171415201806205b2a8b6778f96.jpeg', 5, '2018-06-20 20:14:15', '2018-06-20 20:14:15'),
(20, '171415201806205b2a8b677febc.jpeg', 5, '2018-06-20 20:14:15', '2018-06-20 20:14:15'),
(21, '171415201806205b2a8b6784582.jpeg', 5, '2018-06-20 20:14:15', '2018-06-20 20:14:15'),
(22, '171415201806205b2a8b6788368.jpeg', 5, '2018-06-20 20:14:15', '2018-06-20 20:14:15'),
(23, '171415201806205b2a8b678d0d1.jpeg', 5, '2018-06-20 20:14:15', '2018-06-20 20:14:15'),
(24, '171415201806205b2a8b679083b.jpeg', 5, '2018-06-20 20:14:15', '2018-06-20 20:14:15'),
(25, '122712201807035b3b6ba0cc30d.jpeg', 7, '2018-07-03 15:27:12', '2018-07-03 15:27:12'),
(26, '122728201807035b3b6bb0ebf74.jpeg', 7, '2018-07-03 15:27:28', '2018-07-03 15:27:28'),
(27, '122746201807035b3b6bc25a470.jpeg', 7, '2018-07-03 15:27:46', '2018-07-03 15:27:46'),
(28, '122811201807035b3b6bdb539c4.jpeg', 7, '2018-07-03 15:28:11', '2018-07-03 15:28:11'),
(29, '130519201807175b4de98f3604f.jpeg', 9, '2018-07-17 16:05:19', '2018-07-17 16:05:19'),
(30, '130619201807175b4de9cb51a20.jpeg', 9, '2018-07-17 16:06:19', '2018-07-17 16:06:19'),
(31, '180520201807175b4e2fe0bd015.jpeg', 10, '2018-07-17 21:05:20', '2018-07-17 21:05:20'),
(32, '180534201807175b4e2feedceb0.jpeg', 10, '2018-07-17 21:05:34', '2018-07-17 21:05:34'),
(33, '180555201807175b4e30037c6ee.jpeg', 10, '2018-07-17 21:05:55', '2018-07-17 21:05:55'),
(34, '180629201807175b4e30254aa77.jpeg', 10, '2018-07-17 21:06:29', '2018-07-17 21:06:29'),
(35, '180650201807175b4e303a659d3.jpeg', 10, '2018-07-17 21:06:50', '2018-07-17 21:06:50'),
(36, '180708201807175b4e304c3200c.jpeg', 10, '2018-07-17 21:07:08', '2018-07-17 21:07:08'),
(37, '181133201807175b4e315583421.jpeg', 11, '2018-07-17 21:11:33', '2018-07-17 21:11:33'),
(38, '181157201807175b4e316d352c8.jpeg', 11, '2018-07-17 21:11:57', '2018-07-17 21:11:57'),
(39, '181228201807175b4e318c4162f.jpeg', 11, '2018-07-17 21:12:28', '2018-07-17 21:12:28'),
(40, '181245201807175b4e319d52d87.jpeg', 11, '2018-07-17 21:12:45', '2018-07-17 21:12:45'),
(41, '181311201807175b4e31b7cff61.jpeg', 11, '2018-07-17 21:13:11', '2018-07-17 21:13:11'),
(42, '182258201807175b4e34029b6d3.jpeg', 12, '2018-07-17 21:22:58', '2018-07-17 21:22:58'),
(43, '182324201807175b4e341c676a3.jpeg', 12, '2018-07-17 21:23:24', '2018-07-17 21:23:24'),
(44, '182344201807175b4e343082acd.jpeg', 12, '2018-07-17 21:23:44', '2018-07-17 21:23:44'),
(45, '182359201807175b4e343f959b5.jpeg', 12, '2018-07-17 21:23:59', '2018-07-17 21:23:59'),
(46, '183706201807175b4e375222f81.jpeg', 13, '2018-07-17 21:37:06', '2018-07-17 21:37:06'),
(47, '183723201807175b4e3763448ca.jpeg', 13, '2018-07-17 21:37:23', '2018-07-17 21:37:23'),
(48, '183744201807175b4e3778d3c3d.jpeg', 13, '2018-07-17 21:37:44', '2018-07-17 21:37:44'),
(49, '183812201807175b4e3794914bd.jpeg', 13, '2018-07-17 21:38:12', '2018-07-17 21:38:12'),
(50, '183831201807175b4e37a7ae58f.jpeg', 13, '2018-07-17 21:38:31', '2018-07-17 21:38:31'),
(51, '184259201807175b4e38b3b95e4.jpeg', 14, '2018-07-17 21:42:59', '2018-07-17 21:42:59'),
(52, '184315201807175b4e38c3b8445.jpeg', 14, '2018-07-17 21:43:15', '2018-07-17 21:43:15'),
(53, '184337201807175b4e38d9c47fc.jpeg', 14, '2018-07-17 21:43:37', '2018-07-17 21:43:37'),
(55, '184436201807175b4e39145e7aa.jpeg', 14, '2018-07-17 21:44:36', '2018-07-17 21:44:36'),
(56, '185018201807175b4e3a6ab6513.png', 15, '2018-07-17 21:50:18', '2018-07-17 21:50:18'),
(57, '185048201807175b4e3a889b7d1.png', 15, '2018-07-17 21:50:48', '2018-07-17 21:50:48'),
(58, '185122201807175b4e3aaaa55f8.jpeg', 15, '2018-07-17 21:51:22', '2018-07-17 21:51:22'),
(59, '185155201807175b4e3acba8670.jpeg', 15, '2018-07-17 21:51:55', '2018-07-17 21:51:55'),
(60, '185226201807175b4e3aea104e5.jpeg', 15, '2018-07-17 21:52:26', '2018-07-17 21:52:26'),
(61, '185246201807175b4e3afe46259.jpeg', 15, '2018-07-17 21:52:46', '2018-07-17 21:52:46'),
(62, '185301201807175b4e3b0dbfa7a.jpeg', 15, '2018-07-17 21:53:01', '2018-07-17 21:53:01'),
(63, '185327201807175b4e3b27e01bd.jpeg', 15, '2018-07-17 21:53:27', '2018-07-17 21:53:27'),
(64, '185346201807175b4e3b3a07be2.jpeg', 15, '2018-07-17 21:53:46', '2018-07-17 21:53:46'),
(66, '185453201807175b4e3b7d683c8.jpeg', 15, '2018-07-17 21:54:53', '2018-07-17 21:54:53'),
(69, '190643201807175b4e3e43b8d74.jpeg', 16, '2018-07-17 22:06:43', '2018-07-17 22:06:43'),
(70, '190704201807175b4e3e583b68d.jpeg', 16, '2018-07-17 22:07:04', '2018-07-17 22:07:04'),
(71, '191041201807175b4e3f3143773.jpeg', 17, '2018-07-17 22:10:41', '2018-07-17 22:10:41'),
(72, '191059201807175b4e3f4394633.jpeg', 17, '2018-07-17 22:10:59', '2018-07-17 22:10:59'),
(73, '191116201807175b4e3f54f2de0.jpeg', 17, '2018-07-17 22:11:17', '2018-07-17 22:11:17'),
(74, '191145201807175b4e3f7125454.jpeg', 17, '2018-07-17 22:11:45', '2018-07-17 22:11:45'),
(75, '191207201807175b4e3f87aa57a.jpeg', 17, '2018-07-17 22:12:07', '2018-07-17 22:12:07'),
(76, '182544201807185b4f86284663d.jpeg', 19, '2018-07-18 21:25:44', '2018-07-18 21:25:44'),
(77, '182607201807185b4f863f56f6c.jpeg', 19, '2018-07-18 21:26:07', '2018-07-18 21:26:07'),
(78, '182619201807185b4f864bd719e.jpeg', 19, '2018-07-18 21:26:19', '2018-07-18 21:26:19'),
(79, '120056201807195b507d78e880c.jpeg', 20, '2018-07-19 15:00:56', '2018-07-19 15:00:56'),
(80, '120115201807195b507d8ba9119.jpeg', 20, '2018-07-19 15:01:15', '2018-07-19 15:01:15'),
(81, '120130201807195b507d9ac3480.jpeg', 20, '2018-07-19 15:01:30', '2018-07-19 15:01:30'),
(82, '120500201807195b507e6cb8b08.jpeg', 21, '2018-07-19 15:05:00', '2018-07-19 15:05:00'),
(83, '120514201807195b507e7a89e42.jpeg', 21, '2018-07-19 15:05:14', '2018-07-19 15:05:14'),
(84, '120529201807195b507e892febb.jpeg', 21, '2018-07-19 15:05:29', '2018-07-19 15:05:29'),
(85, '120544201807195b507e981ad9e.jpeg', 21, '2018-07-19 15:05:44', '2018-07-19 15:05:44'),
(86, '121150201807195b50800682756.jpeg', 22, '2018-07-19 15:11:50', '2018-07-19 15:11:50'),
(87, '121211201807195b50801b06a38.jpeg', 22, '2018-07-19 15:12:11', '2018-07-19 15:12:11'),
(88, '121228201807195b50802c31853.jpeg', 22, '2018-07-19 15:12:28', '2018-07-19 15:12:28'),
(89, '121629201807195b50811dbdb5f.jpeg', 23, '2018-07-19 15:16:29', '2018-07-19 15:16:29'),
(90, '121647201807195b50812fc40ce.jpeg', 23, '2018-07-19 15:16:47', '2018-07-19 15:16:47'),
(91, '121706201807195b50814248276.jpeg', 23, '2018-07-19 15:17:06', '2018-07-19 15:17:06'),
(92, '122110201807195b50823670ce4.jpeg', 24, '2018-07-19 15:21:10', '2018-07-19 15:21:10'),
(93, '122125201807195b508245795d1.jpeg', 24, '2018-07-19 15:21:25', '2018-07-19 15:21:25'),
(94, '122139201807195b5082535b3f1.jpeg', 24, '2018-07-19 15:21:39', '2018-07-19 15:21:39'),
(96, '165629201807195b50c2bd0befb.jpeg', 25, '2018-07-19 19:56:29', '2018-07-19 19:56:29'),
(97, '181750201807205b52274e2ff76.jpeg', 26, '2018-07-20 21:17:50', '2018-07-20 21:17:50'),
(98, '181805201807205b52275dad437.jpeg', 26, '2018-07-20 21:18:05', '2018-07-20 21:18:05'),
(99, '181829201807205b52277593d05.png', 26, '2018-07-20 21:18:29', '2018-07-20 21:18:29'),
(100, '192055201807205b5236174b305.jpeg', 25, '2018-07-20 22:20:55', '2018-07-20 22:20:55'),
(101, '192129201807205b523639b6c54.jpeg', 25, '2018-07-20 22:21:29', '2018-07-20 22:21:29');
-- --------------------------------------------------------
--
-- Estrutura para tabela `imovels`
--
CREATE TABLE `imovels` (
`id` int(11) NOT NULL,
`destaque` int(11) DEFAULT 0,
`name` varchar(150) NOT NULL,
`slug` varchar(150) NOT NULL,
`codigo` varchar(25) NOT NULL,
`status` int(11) NOT NULL,
`tipo_id` int(11) NOT NULL,
`cidade_id` int(11) NOT NULL,
`bairro_id` int(11) NOT NULL,
`area` int(11) NULL,
`quarto` int(11) NULL,
`garagem` int(11) NULL,
`banheiro` int(11) NULL,
`sala` int(11) NULL,
`preco` decimal(10,2) DEFAULT NULL,
`preco_adicionais` varchar(50) NULL,
`latitude` varchar(25) DEFAULT NULL,
`longitude` varchar(25) DEFAULT NULL,
`endereco` text NOT NULL,
`description` text NOT NULL,
`link_360` varchar(300) DEFAULT NULL,
`image` varchar(300) NOT NULL,
`banner` varchar(300) NOT NULL,
`video` varchar(255) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Fazendo dump de dados para tabela `imovels`
--
INSERT INTO `imovels` (`id`, `destaque`, `name`, `slug`, `codigo`, `status`, `tipo_id`, `cidade_id`, `bairro_id`, `quarto`, `garagem`, `banheiro`, `sala`, `preco`, `latitude`, `longitude`, `endereco`, `description`, `link_360`, `image`, `created_at`, `updated_at`) VALUES
(24, 1, 'Casas Pré Fabricadas', 'casas-pre-fabricadas-12', 'CSP014', 1, 6, 1, 1, 4, 1, 3, 2, '0.00', NULL, NULL, 'Concórdia-SC', '<p>Casas pré fabricadas</p><p>Kit madeira( acompanha portas e esquadrias)</p><p>Diversos projetos a partir de 9m²</p><p>Solicite um orçamento.</p>', NULL, '122012201807195b5081fce6797.jpeg', '2018-07-19 15:20:12', '2018-07-19 15:20:51');
-- --------------------------------------------------------
--
-- Estrutura para tabela `lessons`
--
CREATE TABLE `lessons` (
`id` int(10) UNSIGNED NOT NULL,
`chapter_id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`video` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`description` text COLLATE utf8_unicode_ci DEFAULT NULL,
`order` int(11) NOT NULL DEFAULT 0,
`active` tinyint(1) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Estrutura para tabela `levels`
--
CREATE TABLE `levels` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`description` text COLLATE utf8_unicode_ci DEFAULT NULL,
`order` int(11) NOT NULL DEFAULT 0,
`active` tinyint(1) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Estrutura para tabela `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Fazendo dump de dados para tabela `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_06_01_000001_create_oauth_auth_codes_table', 1),
(4, '2016_06_01_000002_create_oauth_access_tokens_table', 1),
(5, '2016_06_01_000003_create_oauth_refresh_tokens_table', 1),
(6, '2016_06_01_000004_create_oauth_clients_table', 1),
(7, '2016_06_01_000005_create_oauth_personal_access_clients_table', 1),
(8, '2018_02_11_015001_create_modules_table', 1),
(9, '2018_02_11_020311_create_groups_table', 1),
(10, '2018_02_12_212338_create_group_module_table', 1),
(11, '2018_03_02_112149_create_configurations_table', 1),
(12, '2018_03_27_111739_create_api_integrations_table', 1),
(13, '2018_03_27_124835_create_categories_table', 1),
(14, '2018_03_27_140844_create_levels_table', 1),
(15, '2018_03_27_143052_create_courses_table', 1),
(16, '2018_04_03_173706_alter_table_courses', 1),
(17, '2018_04_03_183714_create_chapters_controller', 1),
(18, '2018_04_03_191315_create_classes_table', 2),
(19, '2018_04_04_115051_create_attachments_table', 2),
(20, '2018_04_04_194648_alter_table_course_add_values', 2),
(21, '2018_04_05_173941_alter_table_users_add_type', 2),
(22, '2018_04_05_180734_create_clients_table', 2),
(23, '2018_04_06_183719_create_orders_table', 2),
(24, '2018_04_09_132431_alter_clients_table_add_moip_id', 2),
(25, '2018_04_09_171927_alter_table_categories_add_picture_and_lead', 2),
(26, '2018_04_09_180439_alter_table_orders', 2),
(27, '2018_04_09_193312_alter_table_orderss', 3),
(28, '2018_04_11_112044_create_teachers_table', 3),
(29, '2018_04_11_121733_alter_table_courses_add_teacher', 3);
-- --------------------------------------------------------
--
-- Estrutura para tabela `modules`
--
CREATE TABLE `modules` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`father_path` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`father_order` int(11) NOT NULL DEFAULT 0,
`path` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`route` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`order` int(11) NOT NULL DEFAULT 0,
`icon` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`has_son` tinyint(1) NOT NULL DEFAULT 0,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Fazendo dump de dados para tabela `modules`
--
INSERT INTO `modules` (`id`, `name`, `father_path`, `father_order`, `path`, `route`, `order`, `icon`, `has_son`, `created_at`, `updated_at`) VALUES
(1, 'Dashboard', '', 0, 'dashboard', 'dashboard', 0, 'fa fa-dashboard', 0, '2018-05-10 05:20:28', '2018-05-10 05:20:28'),
(2, 'Administração', '', 2, 'admin', 'admin', 10, 'fa fa-lock', 1, '2018-05-10 05:20:28', '2018-05-10 05:20:28'),
(3, 'Grupos de Usuários', 'admin', 2, 'groups', 'groups', 1, '', 0, '2018-05-10 05:20:28', '2018-05-10 05:20:28'),
(4, 'Usuários', 'admin', 2, 'users', 'users', 2, '', 0, '2018-05-10 05:20:28', '2018-05-10 05:20:28'),
(5, 'Páginas', '', 0, 'pages', 'pages', 8, 'fa fa-file-text-o', 0, '2018-06-06 13:35:30', '2018-06-06 14:00:00'),
(6, 'Configurações', '', 0, 'configs', 'configs', 9, 'fa fa-wrench', 0, '2018-06-06 13:35:30', '2018-06-06 14:00:00'),
(7, 'Depoimentos', '', 0, 'depoimentos', 'depoimentos', 7, 'fa fa-commenting-o', 0, '2018-06-06 13:35:30', '2018-06-06 14:00:00'),
(8, 'Corretores', '', 0, 'corretores', 'corretores', 6, 'fa fa-users', 0, '2018-06-06 13:35:30', '2018-06-06 14:00:00'),
(9, 'Blogs', '', 0, 'blogs', 'blogs', 5, 'fa fa-newspaper-o\n', 0, '2018-06-06 13:35:30', '2018-06-06 14:00:00'),
(10, 'Slides', '', 0, 'slides', 'slides', 3, 'fa fa-picture-o\n', 0, '2018-06-06 13:35:30', '2018-06-06 14:00:00'),
(11, 'Publicidades', '', 0, 'publicidades', 'publicidades', 4, 'fa fa-file-image-o\r\n', 0, '2018-06-06 13:35:30', '2018-06-06 14:00:00'),
(12, 'Imóveis', '', 0, 'imoveis', 'imoveis', 1, 'fa fa-home\r\n', 1, '2018-06-06 13:35:30', '2018-06-06 14:00:00'),
(13, 'Tipo', 'imoveis', 0, 'tipos', 'tipos', 1, 'fa fa-home\r\n', 0, '2018-06-06 13:35:30', '2018-06-06 14:00:00'),
(14, 'Cidades', 'imoveis', 1, 'cidades', 'cidades', 1, '', 0, '2018-06-06 13:35:30', '2018-06-06 14:00:00'),
(15, 'Imóvel', 'imoveis', 2, 'imovel', 'imovel', 1, '', 0, '2018-06-06 13:35:30', '2018-06-06 14:00:00');
-- --------------------------------------------------------
--
-- Estrutura para tabela `oauth_access_tokens`
--
CREATE TABLE `oauth_access_tokens` (
`id` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`user_id` int(11) DEFAULT NULL,
`client_id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`scopes` text COLLATE utf8_unicode_ci DEFAULT NULL,
`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=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Estrutura para tabela `oauth_auth_codes`
--
CREATE TABLE `oauth_auth_codes` (
`id` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`user_id` int(11) NOT NULL,
`client_id` int(11) NOT NULL,
`scopes` text COLLATE utf8_unicode_ci DEFAULT NULL,
`revoked` tinyint(1) NOT NULL,
`expires_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Estrutura para tabela `oauth_clients`
--
CREATE TABLE `oauth_clients` (
`id` int(10) UNSIGNED NOT NULL,
`user_id` int(11) DEFAULT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`secret` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`redirect` text COLLATE utf8_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=utf8 COLLATE=utf8_unicode_ci;
--
-- Fazendo dump de dados para tabela `oauth_clients`
--
INSERT INTO `oauth_clients` (`id`, `user_id`, `name`, `secret`, `redirect`, `personal_access_client`, `password_client`, `revoked`, `created_at`, `updated_at`) VALUES
(1, NULL, 'Laravel Personal Access Client', 'YnfhUxCi6Iui1jAjdBUuoGioTyOn4XzcuKRGJGeF', 'http://localhost', 1, 0, 0, '2018-08-14 19:58:12', '2018-08-14 19:58:12'),
(2, NULL, 'Laravel Password Grant Client', '5Xbh3xr1UC32YNnUC35VlcMr2C2EwZ7Nz26m0VkP', 'http://localhost', 0, 1, 0, '2018-08-14 19:58:12', '2018-08-14 19:58:12');
-- --------------------------------------------------------
--
-- Estrutura para tabela `oauth_personal_access_clients`
--
CREATE TABLE `oauth_personal_access_clients` (
`id` int(10) UNSIGNED NOT NULL,
`client_id` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Fazendo dump de dados para tabela `oauth_personal_access_clients`
--
INSERT INTO `oauth_personal_access_clients` (`id`, `client_id`, `created_at`, `updated_at`) VALUES
(1, 1, '2018-08-14 19:58:12', '2018-08-14 19:58:12');
-- --------------------------------------------------------
--
-- Estrutura para tabela `oauth_refresh_tokens`
--
CREATE TABLE `oauth_refresh_tokens` (
`id` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`access_token_id` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`revoked` tinyint(1) NOT NULL,
`expires_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Estrutura para tabela `orders`
--
CREATE TABLE `orders` (
`id` int(10) UNSIGNED NOT NULL,
`course_id` int(11) NOT NULL,
`client_id` int(11) NOT NULL,
`start` date NOT NULL,
`end` date NOT NULL,
`price` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`status` int(11) NOT NULL DEFAULT 1,
`available` tinyint(1) NOT NULL DEFAULT 0,
`moip_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`payment_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Estrutura para tabela `pages`
--
CREATE TABLE `pages` (
`id` int(11) NOT NULL,
`name` varchar(150) NOT NULL,
`title` varchar(200) DEFAULT NULL,
`description` text DEFAULT NULL,
`image` varchar(250) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Fazendo dump de dados para tabela `pages`
--
INSERT INTO `pages` (`id`, `name`, `title`, `description`, `image`, `created_at`, `updated_at`) VALUES
(1, 'Home - Encontramos o imóvel perfeito para você', 'Encontramos# o imóvel perfeito para você', '<p><strong>Sem tempo para pesquisar o imóvel desejado?</strong></p><p>Fique tranquilo, deixe seu nome, e-mail e WhatsApp no formulário a baixo, que entraremos em contato.</p>', NULL, '2018-06-06 19:58:29', '2018-06-06 21:45:28'),
(2, 'Home - Descrição acima de Depoimentos', 'especialidade em realizar o sonho do imóvel próprio', '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>', '', '2018-06-06 20:37:47', '2018-06-06 21:59:45'),
(3, 'Avaliação - Descrição', 'avaliamos seu imóvel para diversos fins', '<p>Envie-nos uma mensagem através do formulário a baixo, que em breve nosso time de corretores entrará em contato.</p>', NULL, '2018-06-06 20:40:53', '2018-06-06 20:50:30'),
(4, 'Sobre - Descrição', 'especialidade em realizar o sonho do imóvel próprio', '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p><p><br></p><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', '193001201806185b280839b8dc3.png', '2018-06-06 20:43:40', '2018-06-18 22:30:01'),
(5, 'Sobre - Missão', '', '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p>', '', '2018-06-06 20:44:22', '2018-06-06 20:44:22'),
(6, 'Sobre - Visão', '', '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p>', '', '2018-06-06 20:44:22', '2018-06-06 20:44:22'),
(7, 'Sobre - Valores', '', '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p>', '', '2018-06-06 20:44:22', '2018-06-06 20:44:22'),
(8, 'Blog - Descrição', 'Fique ligado nas novidades do mundo imobiliário', '<p>você sempre encontrará novidades sobre tudo que move o mundo imobiliário e da construção civil. Fique ligado.</p>', '', '2018-06-06 20:47:36', '2018-06-06 20:47:36'),
(9, 'Contato - Descrição', 'Envie uma mensagem para o time', '<p>Envie-nos uma mensagem através do formulário a baixo, que em breve nosso time de corretores entrará em contato.</p>', '', '2018-06-06 20:48:54', '2018-07-23 22:02:15'),
(10, 'Banner Conheça o Imóveis', 'Realizamos o #seu sonho# do imóvel próprio', NULL, '175911201807255b58ba6f5833c.jpeg', '2018-06-06 20:48:54', '2018-07-25 20:59:11');
-- --------------------------------------------------------
--
-- Estrutura para tabela `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Estrutura para tabela `publicidades`
--
CREATE TABLE `publicidades` (
`id` int(11) NOT NULL,
`local` int(11) NOT NULL,
`name` varchar(200) NOT NULL,
`titulo` varchar(50) NOT NULL,
`link` varchar(250) NOT NULL,
`image` varchar(50) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Fazendo dump de dados para tabela `publicidades`
--
INSERT INTO `publicidades` (`id`, `local`, `name`, `titulo`, `link`, `image`, `created_at`, `updated_at`) VALUES
(1, 1, 'Realize seu sonho do imóvel próprio', 'Conheça os imóveis', 'http://localhost:8000/', '125246201806085b1a7c1ee510e.jpeg', '2018-06-08 15:48:49', '2018-06-12 23:48:38'),
(2, 2, 'Realize seu sonho do imóvel próprio', 'Conheça os imóveis', 'http://localhost:8000/', '125246201806085b1a7c1ee510e.jpeg', '2018-06-08 15:48:49', '2018-06-12 23:48:38'),
(3, 3, 'Realize seu sonho do imóvel próprio', 'Conheça os imóveis', 'http://localhost:8000/', '125246201806085b1a7c1ee510e.jpeg', '2018-06-08 15:48:49', '2018-06-12 23:48:38');
-- --------------------------------------------------------
--
-- Estrutura para tabela `slides`
--
CREATE TABLE `slides` (
`id` int(11) NOT NULL,
`name` varchar(100) DEFAULT NULL,
`lead` text DEFAULT NULL,
`image` char(100) NOT NULL,
`link_title` varchar(100) DEFAULT NULL,
`link` varchar(100) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Fazendo dump de dados para tabela `slides`
--
INSERT INTO `slides` (`id`, `name`, `lead`, `image`, `link`, `created_at`, `updated_at`) VALUES
(2, 'Teste', 'testes', '204902201806075b199a3e0c2a2.jpeg', 'http://github.com/', '2018-06-07 23:49:02', '2018-06-08 14:52:39');
-- --------------------------------------------------------
--
-- Estrutura para tabela `teachers`
--
CREATE TABLE `teachers` (
`id` int(10) UNSIGNED NOT NULL,
`image` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Estrutura para tabela `tipos`
--
CREATE TABLE `tipos` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Fazendo dump de dados para tabela `tipos`
--
INSERT INTO `tipos` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'Casa', '2018-06-08 20:26:04', '2018-06-08 20:28:48'),
(2, 'Apartamento', '2018-06-08 20:28:54', '2018-06-08 20:28:54'),
(3, 'Terreno', '2018-06-20 15:11:19', '2018-06-20 15:11:19'),
(4, 'Barracâo', '2018-06-20 15:11:38', '2018-06-20 15:11:38'),
(5, 'Sala comercial', '2018-06-20 15:12:06', '2018-06-20 15:12:06'),
(6, 'Casas Pré Fabricadas', '2018-07-18 20:03:24', '2018-07-18 20:03:24');
-- --------------------------------------------------------
--
-- Estrutura para tabela `users`
--
CREATE TABLE `users` (
`id` int(10) UNSIGNED NOT NULL,
`group_id` int(11) NOT NULL DEFAULT 0,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`image` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`type` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Fazendo dump de dados para tabela `users`
--
INSERT INTO `users` (`id`, `group_id`, `name`, `username`, `email`, `password`, `image`, `remember_token`, `created_at`, `updated_at`, `type`) VALUES
(1, 1, 'Administrador', '<PASSWORD>', '<EMAIL>', <PASSWORD>', NULL, 'FkXpAJQXaFuRT3vDVSlvvyCQqiIeqkmRZMX2kygbugnKbIQQj2JHjwCQE3im', '2018-02-13 13:28:36', '2018-08-20 19:15:44', 0);
--
-- Índices de tabelas apagadas
--
--
-- Índices de tabela `api_integrations`
--
ALTER TABLE `api_integrations`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `api_integrations_token_unique` (`token`);
--
-- Índices de tabela `attachments`
--
ALTER TABLE `attachments`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `bairros`
--
ALTER TABLE `bairros`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `blogs`
--
ALTER TABLE `blogs`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `caracteristicas`
--
ALTER TABLE `caracteristicas`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `categories_slug_unique` (`slug`);
--
-- Índices de tabela `chapters`
--
ALTER TABLE `chapters`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `chapters_slug_unique` (`slug`);
--
-- Índices de tabela `cidades`
--
ALTER TABLE `cidades`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `clients`
--
ALTER TABLE `clients`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `clients_email_unique` (`email`);
--
-- Índices de tabela `configs`
--
ALTER TABLE `configs`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `configurations`
--
ALTER TABLE `configurations`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `corretores`
--
ALTER TABLE `corretores`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `courses`
--
ALTER TABLE `courses`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `courses_slug_unique` (`slug`);
--
-- Índices de tabela `depoimentos`
--
ALTER TABLE `depoimentos`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `groups`
--
ALTER TABLE `groups`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `group_module`
--
ALTER TABLE `group_module`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `imagem_extras`
--
ALTER TABLE `imagem_extras`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `imovels`
--
ALTER TABLE `imovels`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `codigo` (`codigo`);
--
-- Índices de tabela `lessons`
--
ALTER TABLE `lessons`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `lessons_slug_unique` (`slug`);
--
-- Índices de tabela `levels`
--
ALTER TABLE `levels`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `levels_slug_unique` (`slug`);
--
-- Índices de tabela `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `modules`
--
ALTER TABLE `modules`
ADD PRIMARY KEY (`id`),
ADD KEY `modules_order_index` (`order`);
--
-- Índices de tabela `oauth_access_tokens`
--
ALTER TABLE `oauth_access_tokens`
ADD PRIMARY KEY (`id`),
ADD KEY `oauth_access_tokens_user_id_index` (`user_id`);
--
-- Índices de tabela `oauth_auth_codes`
--
ALTER TABLE `oauth_auth_codes`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `oauth_clients`
--
ALTER TABLE `oauth_clients`
ADD PRIMARY KEY (`id`),
ADD KEY `oauth_clients_user_id_index` (`user_id`);
--
-- Índices de tabela `oauth_personal_access_clients`
--
ALTER TABLE `oauth_personal_access_clients`
ADD PRIMARY KEY (`id`),
ADD KEY `oauth_personal_access_clients_client_id_index` (`client_id`);
--
-- Índices de tabela `oauth_refresh_tokens`
--
ALTER TABLE `oauth_refresh_tokens`
ADD PRIMARY KEY (`id`),
ADD KEY `oauth_refresh_tokens_access_token_id_index` (`access_token_id`);
--
-- Índices de tabela `orders`
--
ALTER TABLE `orders`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `pages`
--
ALTER TABLE `pages`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`);
--
-- Índices de tabela `publicidades`
--
ALTER TABLE `publicidades`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `slides`
--
ALTER TABLE `slides`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `teachers`
--
ALTER TABLE `teachers`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `tipos`
--
ALTER TABLE `tipos`
ADD PRIMARY KEY (`id`);
--
-- Índices de tabela `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_username_unique` (`username`),
ADD UNIQUE KEY `users_email_unique` (`email`);
--
-- AUTO_INCREMENT de tabelas apagadas
--
--
-- AUTO_INCREMENT de tabela `api_integrations`
--
ALTER TABLE `api_integrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de tabela `attachments`
--
ALTER TABLE `attachments`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de tabela `bairros`
--
ALTER TABLE `bairros`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT de tabela `blogs`
--
ALTER TABLE `blogs`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT de tabela `caracteristicas`
--
ALTER TABLE `caracteristicas`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT de tabela `categories`
--
ALTER TABLE `categories`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de tabela `chapters`
--
ALTER TABLE `chapters`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de tabela `cidades`
--
ALTER TABLE `cidades`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT de tabela `clients`
--
ALTER TABLE `clients`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de tabela `configs`
--
ALTER TABLE `configs`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT de tabela `configurations`
--
ALTER TABLE `configurations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de tabela `corretores`
--
ALTER TABLE `corretores`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT de tabela `courses`
--
ALTER TABLE `courses`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de tabela `depoimentos`
--
ALTER TABLE `depoimentos`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT de tabela `groups`
--
ALTER TABLE `groups`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT de tabela `group_module`
--
ALTER TABLE `group_module`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
--
-- AUTO_INCREMENT de tabela `imagem_extras`
--
ALTER TABLE `imagem_extras`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=102;
--
-- AUTO_INCREMENT de tabela `imovels`
--
ALTER TABLE `imovels`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;
--
-- AUTO_INCREMENT de tabela `lessons`
--
ALTER TABLE `lessons`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de tabela `levels`
--
ALTER TABLE `levels`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de tabela `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;
--
-- AUTO_INCREMENT de tabela `modules`
--
ALTER TABLE `modules`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
--
-- AUTO_INCREMENT de tabela `oauth_clients`
--
ALTER TABLE `oauth_clients`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT de tabela `oauth_personal_access_clients`
--
ALTER TABLE `oauth_personal_access_clients`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT de tabela `orders`
--
ALTER TABLE `orders`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de tabela `pages`
--
ALTER TABLE `pages`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT de tabela `publicidades`
--
ALTER TABLE `publicidades`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT de tabela `slides`
--
ALTER TABLE `slides`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT de tabela `teachers`
--
ALTER TABLE `teachers`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de tabela `tipos`
--
ALTER TABLE `tipos`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT de tabela `users`
--
ALTER TABLE `users`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
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 */;
|
<reponame>TachibanaET/inside-ripple-test<filename>ripple/Config/Schema/update.sql<gh_stars>0
SET FOREIGN_KEY_CHECKS=0;
CREATE TABLE IF NOT EXISTS `ib_infos_groups` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`info_id` int(8) NOT NULL DEFAULT '0',
`group_id` int(8) NOT NULL DEFAULT '0',
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL,
`comment` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ib_groups_courses` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`group_id` int(8) NOT NULL DEFAULT '0',
`course_id` int(8) NOT NULL DEFAULT '0',
`started` date DEFAULT NULL,
`ended` date DEFAULT NULL,
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL,
`comment` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET FOREIGN_KEY_CHECKS=1;
ALTER TABLE ib_courses ADD COLUMN introduction text AFTER title;
ALTER TABLE ib_contents ADD COLUMN file_name varchar(200) AFTER url;
ALTER TABLE ib_contents ADD COLUMN status int(1) NOT NULL DEFAULT '1' AFTER pass_rate;
ALTER TABLE ib_contents ADD question_count int(8) AFTER pass_rate;
UPDATE ib_contents SET status = 1 WHERE status IS NULL;
ALTER TABLE ib_users_groups ADD INDEX idx_user_group_id(user_id, group_id);
ALTER TABLE ib_users_courses ADD INDEX idx_user_course_id(user_id, course_id);
ALTER TABLE ib_records ADD INDEX idx_group_course_user_content_id(group_id, course_id, user_id, content_id);
ALTER TABLE ib_records ADD INDEX idx_created(created);
|
EXECUTE sp_addrolemember @rolename = N'aspnet_Membership_ReportingAccess', @membername = N'aspnet_Membership_FullAccess';
GO
EXECUTE sp_addrolemember @rolename = N'aspnet_Membership_BasicAccess', @membername = N'aspnet_Membership_FullAccess';
|
-- Companía: Scooters Anywhere
-- Project: Modelo Proyecto Final
-- Author: <NAME> y <NAME>
-- Fecha: 04 de Junio del 2020
PROMPT ================================================================================
PROMPT Realizando Validación del Procediento: sp_crear_reporte_falla
PROMPT ================================================================================
set serveroutput on
declare
v_reporte_falla_id number(10,0);
v_count number(1,0);
v_num_imagenes number(1,0);
v_count_imagenes number(1,0) := 0;
begin
begin
sp_crear_reporte_falla(
p_descripcion => null,
p_usuario_id => 100,
p_scooter_id => 100,
p_reporte_falla_id => v_reporte_falla_id
);
dbms_output.put_line('Validación 1, P_DESCRIPCION no acepta valores nulos -> ERROR.');
exception
when others then
if(sqlcode = -20002) then
dbms_output.put_line('Validación 1, P_DESCRIPCION no acepta valores nulos -> OK.');
else
raise;
end if;
end;
begin
sp_crear_reporte_falla(
p_descripcion => 'Probando Reporte de Fallas',
p_usuario_id => -1,
p_scooter_id => 1,
p_reporte_falla_id => v_reporte_falla_id
);
dbms_output.put_line('Validación 2, P_USUARIO_ID debe ser un usuario valido -> ERROR.');
exception
when others then
if(sqlcode = -20000) then
dbms_output.put_line('Validación 2, P_USUARIO_ID debe ser un usuario valido -> OK.');
else
raise;
end if;
end;
begin
sp_crear_reporte_falla(
p_descripcion => 'Probando Reporte de Fallas',
p_usuario_id => -1,
p_scooter_id => 100,
p_reporte_falla_id => v_reporte_falla_id
);
dbms_output.put_line('Validación 3, P_USUARIO_ID es un usuario valido -> ERROR.');
exception
when others then
if(sqlcode = -20000) then
dbms_output.put_line('Validación 3, P_USUARIO_ID es un usuario valido -> OK.');
else
raise;
end if;
end;
begin
sp_crear_reporte_falla(
p_descripcion => 'Probando Reporte de Fallas',
p_usuario_id => 100,
p_scooter_id => null,
p_reporte_falla_id => v_reporte_falla_id
);
dbms_output.put_line('Validación 4, P_SCOOTER no acepta valores nulos -> ERROR.');
exception
when others then
if(sqlcode = -20001) then
dbms_output.put_line('Validación 4, P_SCOOTER no acepta valores nulos -> OK.');
else
raise;
end if;
end;
begin
sp_crear_reporte_falla(
p_descripcion => 'Probando Reporte de Fallas',
p_usuario_id => 100,
p_scooter_id => null,
p_reporte_falla_id => v_reporte_falla_id
);
dbms_output.put_line('Validación 5, P_SCOOTER debe ser un scooter valido -> ERROR.');
exception
when others then
if(sqlcode = -20001) then
dbms_output.put_line('Validación 5, P_SCOOTER debe ser un scooter valido -> OK.');
else
raise;
end if;
end;
-- Cargando imagenes en la tabla temporal
v_num_imagenes := dbms_random.value(0,5);
for i in 1..v_num_imagenes loop
insert into t_imagen_reporte (usuario_id, scooter_id, imagen)
values(100, 100, 'scooter.png');
end loop;
sp_crear_reporte_falla(
p_descripcion => 'Probando Reporte de Fallas',
p_usuario_id => 100,
p_scooter_id => 100,
p_reporte_falla_id => v_reporte_falla_id
);
select count(1) into v_count
from reporte_falla
where reporte_falla_id = v_reporte_falla_id;
if v_count = 0 then
dbms_output.put_line('Validación 6, Reporte Registrado en la tabla REPORTE_FALLA -> ERROR.');
else
dbms_output.put_line('Validación 6, Reporte Registrado en la tabla REPORTE_FALLA -> OK.');
end if;
for r in (select imagen from imagen_reporte
where reporte_falla_id = v_reporte_falla_id) loop
if dbms_lob.getlength(r.imagen) != 0 then
v_count_imagenes := v_count_imagenes + 1;
end if;
end loop;
if v_count_imagenes = v_num_imagenes then
dbms_output.put_line('Validación 7, Imageneres registradas en la tabla IMAGEN_REPORTE -> OK.');
else
dbms_output.put_line('Validación 7, Imageneres registradas en la tabla IMAGEN_REPORTE -> ERROR.');
end if;
end;
/
rollback;
|
select distinct r.rcb_st_nota from mgadm.est_itensreceb i, mgadm.est_recebimento r, mgtrf.trf_movdocfis_e t
where r.rcb_st_nota = t.mde_st_ndocini
and r.agn_in_codigo = i.agn_in_codigo
and r.rcb_st_nota = i.rcb_st_nota
and r.rcb_st_nota = i.rcb_st_nota
and r.rcb_dt_documento > '01-nov-2013'
and i.apl_in_codigo = 2
and r.rcb_re_totalfrete <> '0,00'
and t.mde_re_frete = '0,00'
|
-- phpMyAdmin SQL Dump
-- version 4.9.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 17, 2020 at 02:47 PM
-- Server version: 5.6.49-cll-lve
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `yihan_products`
--
-- --------------------------------------------------------
--
-- Table structure for table `track_locations`
--
CREATE TABLE `track_locations` (
`id` int(11) NOT NULL,
`animal_id` int(11) NOT NULL,
`lat` decimal(9,6) NOT NULL,
`lng` decimal(9,6) NOT NULL,
`description` text NOT NULL,
`photo` varchar(256) NOT NULL,
`icon` varchar(256) NOT NULL,
`date_create` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `track_locations`
--
INSERT INTO `track_locations` (`id`, `animal_id`, `lat`, `lng`, `description`, `photo`, `icon`, `date_create`) VALUES
(121, 37, 23.491390, 113.208340, 'Irure ut cillum laborum nostrud. Sunt est anim enim deserunt veniam Lorem dolor mollit enim velit aute sit. Pariatur nostrud dolor esse dolore occaecat voluptate enim nostrud.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-12-09 07:43:50'),
(120, 27, 23.450970, 113.638200, 'Et excepteur veniam aliquip ullamco id. Et dolore aliquip dolore voluptate labore id ipsum ipsum aliquip culpa exercitation sunt. Tempor in velit do exercitation minim deserunt velit dolore ullamco laborum labore magna do ipsum.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-05-28 12:56:51'),
(118, 38, 23.417200, 113.584850, 'Excepteur adipisicing aute cillum nostrud. Dolore adipisicing Lorem qui labore qui consequat anim. Incididunt id aliqua incididunt exercitation.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-11-07 07:50:05'),
(119, 16, 23.569120, 113.344720, 'Eiusmod incididunt reprehenderit consequat quis nostrud esse aliqua non. Veniam mollit proident ut nulla ex esse dolor cillum ipsum eiusmod ipsum esse. Nostrud proident sunt ex ex velit veniam quis dolor qui fugiat anim.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-05-20 02:29:46'),
(117, 30, 23.447920, 113.303340, 'Anim irure incididunt commodo in ullamco officia ad. Do ea duis ex occaecat ullamco irure cupidatat ullamco culpa eiusmod fugiat. Dolore aute aute tempor exercitation in labore ea ullamco ex do.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-04-16 05:39:27'),
(116, 1, 23.177650, 113.240250, 'Ea minim Lorem cillum officia do incididunt. Id qui laboris aute excepteur deserunt ullamco cillum amet velit commodo incididunt. Ut incididunt ut excepteur sint dolor eu tempor sint.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-06-18 09:01:04'),
(115, 6, 23.248500, 113.330370, 'Ipsum labore aliquip do ea irure. Do Lorem ullamco ut Lorem irure sunt occaecat. Labore voluptate quis mollit tempor eiusmod aute ipsum nisi eu cupidatat ipsum excepteur pariatur.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-09-04 05:02:04'),
(114, 50, 23.244340, 113.298450, 'Sit exercitation quis consectetur ullamco tempor non commodo anim fugiat labore excepteur mollit veniam excepteur. Non id incididunt minim excepteur sint. Aliquip officia consectetur laborum et ullamco irure qui deserunt velit.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-04-01 10:02:08'),
(113, 25, 23.075060, 113.423090, 'Commodo quis minim aliquip tempor enim in esse esse adipisicing ex velit anim et consectetur. Aliquip sint dolore est tempor qui consequat minim non occaecat. Reprehenderit commodo nisi duis sunt ex sit.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-07-04 05:16:05'),
(112, 34, 23.531600, 113.652840, 'Mollit veniam laborum ut sunt excepteur aliqua proident minim pariatur ullamco. Elit enim duis in consequat. Velit magna consectetur in nulla mollit aliqua eiusmod labore exercitation sit elit.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-11-05 02:59:01'),
(111, 2, 23.200130, 113.210090, 'Qui eiusmod dolore id ut nisi aliquip elit occaecat. Non culpa consectetur culpa culpa eu. Qui amet id irure aliquip cupidatat duis ad ex dolore commodo duis eu aute.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-04-16 01:07:26'),
(110, 31, 23.300950, 113.715580, 'Lorem labore elit aute et est nostrud reprehenderit exercitation sunt. Sint eiusmod laborum non est eu qui labore commodo officia voluptate incididunt anim qui excepteur. Cupidatat magna culpa consectetur magna.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-08-29 10:18:44'),
(109, 46, 23.467750, 113.388300, 'Qui elit magna eu Lorem anim ad ad. Qui incididunt amet aliquip minim cupidatat ea enim consequat quis duis enim aute irure. Sit incididunt magna eu proident ad Lorem enim anim adipisicing ullamco velit incididunt nisi pariatur.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-07-20 04:53:08'),
(108, 33, 23.523040, 113.443410, 'Nulla in aliquip voluptate dolor enim voluptate aliqua minim id. Aute commodo magna occaecat est incididunt ex duis ex. Proident sint sunt proident adipisicing culpa exercitation labore voluptate ipsum.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-10-02 12:52:47'),
(107, 20, 23.590630, 113.683590, 'Tempor nisi ullamco magna sint quis consectetur deserunt adipisicing velit duis magna deserunt incididunt. Enim adipisicing voluptate duis proident quis velit ut proident elit sit nisi pariatur dolor exercitation. Velit duis nostrud qui dolor laborum nisi qui sint qui.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-10-20 11:59:55'),
(106, 30, 23.581180, 113.330290, 'Nostrud veniam id Lorem commodo voluptate. Laborum sint velit sit aute ad adipisicing consectetur tempor ut dolore incididunt mollit fugiat. Officia exercitation aliqua duis ad ea commodo ut aliquip mollit tempor culpa enim.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-08-20 09:27:30'),
(105, 16, 23.579980, 113.385720, 'Consectetur consectetur ea nulla id culpa ipsum nostrud officia dolor ea ullamco veniam id. Aliquip reprehenderit voluptate magna culpa eu nisi. Duis qui id Lorem aute do.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-09-07 10:06:37'),
(104, 3, 23.574530, 113.495390, 'Fugiat minim consequat cillum ipsum adipisicing elit consequat. Consequat nulla labore incididunt nulla magna nisi minim eu cillum sit voluptate id anim. Velit ex ullamco fugiat non.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-10-23 08:44:41'),
(103, 33, 23.460340, 113.258040, 'Fugiat exercitation esse aute mollit et eiusmod occaecat amet enim ut. Aute incididunt mollit est mollit nostrud excepteur fugiat aliquip elit voluptate nulla consectetur enim. Consequat adipisicing voluptate dolor excepteur commodo.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-05-24 12:47:44'),
(102, 49, 23.482400, 113.525690, 'Quis incididunt velit sunt officia nulla exercitation laborum consequat ullamco. Excepteur sunt ut id aliqua sunt exercitation. Pariatur reprehenderit enim dolore consequat reprehenderit nisi laboris ad ea occaecat nostrud adipisicing.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-03-31 12:57:37'),
(101, 7, 23.080210, 113.710240, 'Irure labore minim cillum officia. Minim qui enim qui reprehenderit proident amet in. Non officia laborum aliqua consectetur minim tempor fugiat laborum.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-09-29 11:41:04'),
(100, 11, 23.465080, 113.444160, 'Duis esse ex in elit dolor fugiat. Tempor laboris aliquip dolore occaecat elit occaecat velit. Pariatur voluptate dolor in laboris sit nostrud sint et mollit laboris.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-06-11 12:13:10'),
(99, 3, 23.104680, 113.292010, 'Mollit reprehenderit tempor Lorem ut nisi eu enim pariatur qui ea qui ipsum anim laboris. Esse ullamco culpa excepteur pariatur cillum quis irure quis mollit proident. Enim consequat enim aute incididunt ullamco proident ipsum.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-04-19 09:26:12'),
(98, 50, 23.256000, 113.367000, 'Minim laboris aliqua consequat deserunt nulla nulla nulla ex esse. Officia proident velit officia nisi culpa irure est est aute mollit ullamco. Dolor quis labore laborum ut consequat cillum adipisicing non sint.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-02-28 09:50:51'),
(97, 18, 23.440330, 113.422450, 'Laborum ullamco ipsum minim adipisicing voluptate laboris commodo. Esse veniam consectetur aute mollit eiusmod elit dolor culpa id officia duis consectetur. Laboris duis id ullamco ipsum exercitation consectetur fugiat sint.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-12-03 06:00:11'),
(96, 12, 23.510440, 113.409690, 'Officia qui labore ipsum nostrud ex nulla. Id velit aute sunt nulla fugiat exercitation ipsum. Est minim occaecat aliqua fugiat cupidatat labore cupidatat ea ea nostrud mollit.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-02-13 10:13:44'),
(95, 7, 23.076370, 113.619000, 'Ipsum do commodo non ipsum deserunt do. Labore eiusmod laboris sit exercitation et minim consectetur nulla cupidatat incididunt ad commodo sit. Anim mollit minim culpa reprehenderit velit sint tempor cillum id nulla.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-04-17 07:49:21'),
(94, 15, 23.081890, 113.183240, 'Id ipsum tempor qui sit. Non Lorem enim proident nulla amet fugiat esse cillum aute consequat consectetur ea ut sint. Quis pariatur amet pariatur non laboris ad dolor dolor.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-11-16 02:06:29'),
(93, 25, 23.245820, 113.344310, 'Culpa aliquip quis velit adipisicing anim commodo in ipsum. Incididunt id commodo qui in voluptate adipisicing ullamco. Fugiat laboris fugiat consectetur officia ad anim officia in.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-06-13 10:51:45'),
(92, 35, 23.114770, 113.579670, 'Sit quis enim ullamco aliqua nulla sunt. In pariatur est sint enim amet ad. Cupidatat anim et esse enim Lorem cillum Lorem fugiat nisi aliquip duis laboris veniam.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-10-10 12:01:54'),
(91, 24, 23.084240, 113.184450, 'Minim est ea fugiat officia eiusmod enim reprehenderit cupidatat culpa eiusmod id. Culpa et reprehenderit nostrud velit qui commodo culpa magna tempor. Esse tempor laboris nostrud sunt nisi mollit cupidatat et tempor Lorem proident quis ut.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-05-15 11:01:12'),
(90, 29, 23.529210, 113.309960, 'Sint et qui non esse nulla nostrud enim. Aliqua aliqua sint nostrud adipisicing pariatur anim adipisicing mollit. Ea proident sint sit consequat ad ea culpa ut culpa proident non elit aute reprehenderit.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-03-11 09:47:55'),
(89, 31, 23.342820, 113.596960, 'Culpa labore excepteur anim consequat qui occaecat nisi. Aliquip quis exercitation id est consectetur labore. Labore veniam enim aliquip adipisicing occaecat nisi.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-06-01 08:38:08'),
(88, 11, 23.374170, 113.231430, 'Proident minim laboris sit ullamco incididunt id exercitation consequat magna do. Ut id sunt irure aute duis incididunt consectetur incididunt incididunt qui ex mollit occaecat ipsum. Magna sit occaecat sit consectetur incididunt duis pariatur incididunt aliqua laborum minim tempor.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-01-21 11:55:20'),
(87, 34, 23.323530, 113.280240, 'Laborum elit eu est reprehenderit qui laboris voluptate ex consequat exercitation. Consectetur sint culpa cillum occaecat laboris enim laborum. Ex do in sunt amet laboris eiusmod culpa eiusmod.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-02-07 05:27:28'),
(86, 9, 23.412740, 113.270370, 'Irure Lorem eu tempor et nisi magna ullamco. Excepteur consectetur velit irure laborum ad officia incididunt consequat sit. Exercitation dolor adipisicing velit dolor incididunt commodo aliqua proident.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-08-26 10:32:41'),
(85, 5, 23.464270, 113.627990, 'Id deserunt consectetur in aliqua. Qui deserunt dolor nisi consequat duis. Officia adipisicing dolor aliqua nostrud labore reprehenderit officia ipsum pariatur duis Lorem sunt id.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-07-19 11:45:09'),
(84, 45, 23.323130, 113.429560, 'Ut nisi velit elit duis. Sit adipisicing ea reprehenderit sit Lorem fugiat deserunt nisi. Exercitation consectetur laborum nostrud nulla consectetur qui sunt.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-03-28 12:37:35'),
(83, 4, 23.092020, 113.295990, 'Reprehenderit eu qui aute et voluptate. Ex pariatur adipisicing elit quis dolore officia sint velit cillum deserunt duis tempor ex. Nulla amet mollit sit magna eu laborum cillum exercitation velit excepteur ad incididunt officia.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-11-27 07:04:08'),
(82, 50, 23.455380, 113.470030, 'Ad anim nostrud aute quis ut do duis minim exercitation reprehenderit et. Est nulla occaecat quis ut duis ipsum. Mollit occaecat et ea culpa labore duis pariatur esse cillum labore mollit excepteur ullamco.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-06-11 05:57:36'),
(81, 39, 23.324440, 113.361930, 'Ut et esse do et excepteur excepteur consectetur ea qui qui consectetur cupidatat. Proident reprehenderit velit occaecat cillum sunt esse consequat adipisicing aliqua nostrud labore. Ad in laborum incididunt nisi enim ipsum commodo duis duis tempor.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-10-19 11:55:28'),
(80, 14, 23.521390, 113.578600, 'Ullamco et voluptate dolore labore sunt quis incididunt voluptate est quis commodo aute. Consequat labore enim veniam velit excepteur in ut est duis aute. Reprehenderit ipsum irure nisi nostrud aute fugiat ut ad minim proident.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-01-18 10:50:50'),
(79, 17, 23.359130, 113.267360, 'Irure veniam esse laborum cupidatat eiusmod magna incididunt cillum aliquip non. Sit qui do nisi enim dolor laborum sint proident occaecat tempor ullamco tempor. Id velit officia velit et ipsum nostrud veniam.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-09-26 05:26:19'),
(78, 27, 23.253770, 113.442450, 'Reprehenderit cillum nulla excepteur voluptate fugiat. Qui ea tempor mollit proident consequat proident adipisicing ea minim. Esse magna quis irure ut ex.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-02-11 05:09:17'),
(77, 40, 23.179290, 113.385680, 'Ad qui excepteur exercitation sint velit. Ea in ut laboris pariatur magna velit culpa magna. Aute labore in nisi ut officia Lorem id laborum fugiat et elit duis.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-03-19 05:55:46'),
(76, 47, 23.287360, 113.636840, 'Ex ipsum fugiat est labore consequat fugiat aute ea adipisicing fugiat nulla proident sint. Culpa laborum culpa nisi officia cillum labore est velit incididunt quis magna sunt ad. Pariatur eu fugiat cupidatat et irure veniam incididunt occaecat ut labore Lorem.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-02-25 04:42:04'),
(75, 50, 23.282810, 113.624340, 'Duis irure est eu non quis ex elit eiusmod tempor cillum. Dolor cupidatat voluptate minim est. Eiusmod officia et aute nisi cupidatat nisi laborum incididunt duis voluptate anim aute aute.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-05-23 08:52:42'),
(74, 27, 23.584890, 113.457230, 'Do reprehenderit reprehenderit eiusmod incididunt sint Lorem sint excepteur consectetur ullamco et. Cupidatat quis adipisicing ipsum veniam non consequat mollit non labore Lorem magna aliquip officia. Laborum ad dolore proident duis exercitation enim deserunt officia non labore esse laboris.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-01-28 11:07:31'),
(73, 8, 23.208780, 113.237040, 'Esse velit velit nulla incididunt deserunt aliqua cupidatat ex duis. In minim laboris quis quis do ipsum pariatur officia laborum eu enim. Aliqua excepteur nulla ut ad voluptate dolor laboris ipsum ullamco tempor laborum.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-11-23 08:24:58'),
(72, 26, 23.312920, 113.202320, 'Ex non tempor ad laboris officia non. Nulla ex est anim ut voluptate reprehenderit aute. Tempor quis quis exercitation non commodo velit dolor exercitation cupidatat tempor.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-10-05 11:29:40'),
(71, 44, 23.081550, 113.281020, 'Ullamco esse aliqua proident nulla laborum deserunt ea dolore exercitation ad laborum incididunt nulla officia. Qui nulla sint velit sint Lorem nulla non ex Lorem velit cupidatat id ea. Mollit excepteur proident nisi consectetur ex nostrud dolore.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-07-25 12:27:00'),
(70, 49, 23.586180, 113.442710, 'Cillum ex aliqua veniam irure duis ipsum in anim ea veniam. Id laboris mollit occaecat occaecat aute adipisicing. Deserunt amet deserunt et reprehenderit consequat aliqua Lorem proident sint qui commodo cillum excepteur exercitation.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-06-08 10:24:13'),
(69, 2, 23.399100, 113.401850, 'Id labore fugiat occaecat cupidatat ea sint nisi in laboris quis. Reprehenderit eu sint sint consequat esse eiusmod labore et magna aliqua veniam pariatur sit nostrud. Velit ea nulla incididunt irure enim.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-10-14 07:08:00'),
(68, 21, 23.233640, 113.515010, 'Veniam laboris tempor voluptate nostrud reprehenderit esse mollit occaecat exercitation duis. Ullamco dolore enim deserunt excepteur commodo anim amet ad ut. Incididunt laborum in cillum aliquip amet aliqua qui elit excepteur est aliqua minim.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-05-21 03:26:04'),
(67, 8, 23.149420, 113.239270, 'Ad ut mollit anim qui ea est commodo voluptate ullamco est. Eu qui ad veniam sunt sit tempor aliquip cupidatat ut mollit. Nulla ullamco mollit nisi consectetur laboris incididunt ad anim cupidatat esse eu proident.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-08-29 10:01:27'),
(66, 13, 23.169790, 113.615540, 'Incididunt consequat consequat Lorem nostrud id ad reprehenderit proident velit ex. Veniam aute incididunt irure mollit cillum tempor eu et officia ipsum est non excepteur. Nisi aliquip eiusmod nisi laboris veniam minim.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-05-07 02:43:46'),
(65, 21, 23.186460, 113.537840, 'Reprehenderit sit ipsum deserunt occaecat nisi consequat. Quis eu irure adipisicing consectetur cillum. In aliqua in reprehenderit labore.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-07-16 09:41:52'),
(64, 15, 23.288700, 113.378310, 'Non nostrud mollit nostrud et aliquip fugiat reprehenderit. Proident consequat commodo velit magna ex excepteur et sit nostrud ipsum. Deserunt esse deserunt voluptate enim ex.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-12-01 11:06:16'),
(63, 29, 23.371800, 113.432390, 'Minim nisi Lorem ea non in aute magna mollit ex amet nulla anim Lorem. Anim sunt officia qui velit est consectetur aliquip quis magna aliquip proident. Proident ipsum est laboris exercitation ullamco magna deserunt in eu proident anim veniam esse.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-05-12 05:35:33'),
(62, 24, 23.540910, 113.646580, 'Quis laborum laborum excepteur consectetur. Excepteur culpa aliquip sint dolore culpa elit do amet est ut anim proident amet laborum. Cillum culpa nostrud enim commodo laborum et ut.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-08-17 12:34:11'),
(61, 7, 23.248550, 113.276090, 'Cillum ut Lorem enim anim consectetur consequat ipsum veniam in. Aliqua do Lorem elit duis quis. Amet voluptate laborum nulla et qui.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-02-15 02:39:12'),
(60, 27, 23.455640, 113.562990, 'Fugiat mollit magna anim aute consectetur excepteur cillum quis aliqua reprehenderit. Do anim sint officia est dolor cupidatat dolor id officia irure non exercitation ipsum duis. Dolor culpa ullamco quis adipisicing ullamco dolore aliquip nostrud dolore mollit enim consectetur aliqua laborum.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-01-26 09:39:21'),
(59, 9, 23.269680, 113.578130, 'Est incididunt nisi qui ipsum sint ut enim consequat ad aliqua. Qui et quis est aliqua eu esse esse anim. Cillum fugiat ullamco cupidatat exercitation incididunt officia ullamco excepteur sint laboris nisi aliquip.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-01-21 03:28:59'),
(58, 8, 23.542650, 113.365890, 'Minim ullamco magna officia dolor. In aliquip nostrud quis cupidatat ad exercitation aute velit. Dolore laborum id irure ipsum nisi.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-09-02 06:09:38'),
(57, 18, 23.501170, 113.309930, 'Irure nulla est elit Lorem occaecat elit amet eu mollit amet amet ipsum. Officia cupidatat ex esse consectetur nisi id enim voluptate magna qui adipisicing commodo non. Esse est cillum veniam enim magna incididunt est veniam.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-07-31 10:24:15'),
(56, 8, 23.239660, 113.590060, 'Esse consectetur officia laborum dolor et. Ipsum est aliquip Lorem enim exercitation. Laborum qui officia dolore aliqua in cupidatat occaecat laborum excepteur commodo amet minim incididunt consectetur.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-02-29 03:55:32'),
(55, 41, 23.528130, 113.542600, 'Aute commodo deserunt nulla non aliquip sit laboris nostrud amet aliquip labore enim dolor. Sunt commodo duis proident dolor eu velit culpa duis cillum nisi amet veniam non. Ipsum reprehenderit aute et esse eu minim sunt officia in velit laborum.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-01-21 08:43:04'),
(54, 38, 23.099870, 113.232620, 'Proident aliqua ipsum amet duis proident pariatur. Tempor enim aute in duis esse elit. Est eiusmod eiusmod pariatur aliquip laboris excepteur.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-05-28 07:42:49'),
(53, 27, 23.567530, 113.718940, 'Duis ipsum proident dolor nostrud velit. Magna exercitation voluptate tempor nisi occaecat. Eu magna officia dolor nisi nostrud veniam.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-07-07 11:09:50'),
(52, 19, 23.159570, 113.666620, 'Fugiat elit nostrud tempor culpa minim enim cupidatat eiusmod ut laboris enim nostrud. Commodo fugiat in amet adipisicing exercitation cupidatat. Occaecat dolor elit consequat est voluptate irure nostrud ad et aliqua.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-11-29 07:40:44'),
(51, 10, 23.476440, 113.683860, 'Id cupidatat nulla sit pariatur duis laboris dolor esse velit occaecat quis. Adipisicing aute velit anim dolor occaecat. Minim ipsum adipisicing nulla do amet.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-03-10 12:58:29'),
(50, 12, 23.438250, 113.504110, 'Ad cillum nisi sit culpa incididunt veniam magna et ad. Id nostrud dolor tempor pariatur esse. Aute ullamco duis excepteur nostrud adipisicing anim qui quis nisi.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-02-25 04:00:15'),
(49, 12, 23.603650, 113.417950, 'Mollit est ullamco dolor amet aliqua aliquip esse quis. Lorem et sit ex anim adipisicing non aliqua et nulla aliquip sunt. Labore nisi dolor dolor amet.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-02-01 05:01:42'),
(48, 18, 23.274400, 113.386170, 'Id Lorem et incididunt commodo ad voluptate amet eiusmod consequat aliqua esse. Irure sunt ullamco nisi cupidatat aliqua. Laborum qui non voluptate sint.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-02-18 05:55:54'),
(47, 34, 23.076660, 113.351310, 'Excepteur do est nisi aute irure mollit. Nisi labore commodo et pariatur tempor. Fugiat do cillum officia amet ex do irure id excepteur minim.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-06-12 10:34:10'),
(46, 30, 23.340530, 113.207130, 'Do sint voluptate Lorem cupidatat qui proident et duis ea ex irure. Do irure proident velit in laboris ea culpa. Anim nulla ad commodo reprehenderit consectetur laboris et esse tempor reprehenderit.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-04-08 08:23:59'),
(45, 29, 23.596770, 113.388870, 'Ea fugiat quis sit eiusmod. Sit reprehenderit culpa velit anim commodo elit sit in labore minim dolor do. Ipsum laboris eiusmod labore nisi fugiat et irure deserunt amet commodo fugiat velit do.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-01-30 08:20:08'),
(44, 4, 23.471990, 113.323510, 'Dolore reprehenderit velit elit enim. Exercitation ea est sit fugiat magna. Do officia velit cillum ex laborum esse excepteur et et dolor ullamco incididunt.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-11-03 03:02:38'),
(43, 46, 23.200380, 113.188430, 'Aliqua non et deserunt amet elit et proident sunt mollit eu amet consectetur ad. Ad laborum occaecat ea labore cillum elit eiusmod. Non adipisicing incididunt anim cillum.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-09-14 05:22:58'),
(42, 26, 23.343690, 113.414150, 'Laborum officia ipsum officia non pariatur. Ea laborum ut ad fugiat id Lorem ut commodo eu in minim sunt. Irure commodo labore occaecat eiusmod non dolor laborum irure est duis duis.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-03-24 08:06:57'),
(41, 28, 23.242530, 113.368370, 'Esse ea aute aliqua elit duis in ut dolore laborum enim commodo consequat velit eiusmod. Ex excepteur eu consectetur qui Lorem qui sint ea enim sit Lorem officia. Tempor tempor laborum pariatur commodo consequat quis excepteur ut minim duis occaecat.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-04-21 03:47:21'),
(40, 33, 23.172170, 113.265340, 'Occaecat cillum esse et occaecat nulla commodo. Non veniam anim sint elit quis id fugiat veniam. Culpa non officia ut anim enim in sunt cillum cupidatat duis pariatur commodo.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-03-29 07:10:09'),
(39, 33, 23.092620, 113.585110, 'Aliquip cillum eu occaecat fugiat enim anim ipsum. Quis magna et nulla anim amet irure. Enim mollit commodo id elit officia quis incididunt irure commodo officia.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-03-20 11:54:37'),
(38, 33, 23.090670, 113.577760, 'Exercitation ipsum enim sunt ipsum reprehenderit minim proident sit reprehenderit. Ex consectetur duis do labore anim qui elit dolore qui adipisicing eiusmod do cillum. Enim pariatur nulla ea nisi voluptate nulla exercitation ea nisi cupidatat culpa minim aliquip commodo.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-05-19 07:37:01'),
(37, 49, 23.580670, 113.707880, 'Laborum velit dolore consectetur eu qui proident Lorem adipisicing. Fugiat pariatur esse occaecat qui amet voluptate et. Ad laboris nisi enim id in quis cupidatat non occaecat ea sunt deserunt.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-09-11 04:54:28'),
(36, 28, 23.349800, 113.713040, 'Nostrud fugiat aliqua ut eu dolore proident dolor ipsum ad minim. Ad magna non laboris amet do labore labore. Proident dolore pariatur quis labore exercitation et nostrud veniam quis irure eiusmod.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-11-11 07:48:32'),
(35, 6, 23.365330, 113.282320, 'Mollit consectetur sint exercitation Lorem culpa ad aute non reprehenderit. Quis nisi culpa elit fugiat amet aute commodo consectetur dolore pariatur. Ex sunt voluptate veniam velit occaecat proident et aliquip mollit nisi.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-11-16 09:43:51'),
(34, 8, 23.269920, 113.395650, 'Est duis id ad nulla occaecat veniam eiusmod labore dolor exercitation. Laboris incididunt ex do incididunt velit enim irure. Deserunt voluptate voluptate mollit fugiat incididunt dolor nisi pariatur adipisicing dolore Lorem anim.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-06-14 01:15:40'),
(33, 19, 23.186040, 113.638770, 'Nisi duis esse veniam dolore nisi velit culpa esse veniam. Adipisicing dolore minim eiusmod exercitation dolore officia excepteur. Aliquip in in duis nostrud id.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-10-03 08:12:47'),
(32, 22, 23.112390, 113.195330, 'Ipsum duis cupidatat proident consectetur. Esse minim eiusmod nostrud irure nulla Lorem ut fugiat veniam. Do proident deserunt Lorem ad elit proident exercitation eu eu consequat qui.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-12-11 01:19:04'),
(31, 15, 23.243500, 113.669220, 'Mollit minim commodo et sint labore quis fugiat esse quis dolor velit. Eu sit consequat eu proident ea ut Lorem in. Consequat anim ullamco sint enim occaecat cupidatat voluptate cillum fugiat sit dolor deserunt.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-03-26 09:55:11'),
(30, 33, 23.085210, 113.599450, 'Officia consectetur do minim consectetur ut ex enim adipisicing pariatur veniam. Elit mollit cupidatat proident dolore quis do. Nulla Lorem voluptate sunt sunt est aute fugiat culpa mollit ad minim dolor pariatur.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-06-19 01:56:14'),
(29, 14, 23.611030, 113.415460, 'Veniam mollit commodo enim labore ullamco cillum occaecat id dolore aliquip minim. Proident irure tempor nulla pariatur voluptate veniam Lorem velit nisi sit reprehenderit ut aliquip. Pariatur mollit ea et enim labore quis tempor adipisicing culpa consectetur laborum sint esse.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-07-18 02:37:40'),
(28, 45, 23.075240, 113.520340, 'Ut dolore id consequat dolore sint occaecat magna deserunt exercitation deserunt consectetur. Mollit sit voluptate ad ut nulla voluptate sint veniam. Exercitation amet esse esse est proident laboris ad officia eiusmod sit do.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-10-25 02:08:46'),
(27, 40, 23.231870, 113.312720, 'Cillum ea Lorem aliquip nostrud commodo adipisicing enim minim amet occaecat. Dolor minim occaecat veniam aliquip amet non elit consequat anim officia velit anim ullamco adipisicing. Dolore occaecat in ullamco occaecat labore qui dolor et occaecat est ex.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-10-03 06:12:10'),
(26, 13, 23.340970, 113.647190, 'Reprehenderit est dolore mollit aliqua ea irure enim aliqua qui. Sint labore dolor enim culpa id. Sint ullamco id cupidatat aliqua nisi minim non in officia amet velit.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-02-18 10:28:31'),
(25, 18, 23.210960, 113.332650, 'Ex dolore ad cillum velit sunt officia Lorem commodo ex nisi commodo ullamco. Reprehenderit labore commodo id elit eiusmod. Cupidatat non veniam laboris do.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-02-06 08:46:27'),
(24, 16, 23.353090, 113.252620, 'Deserunt nulla nisi quis eu anim non anim labore mollit. Deserunt enim dolor irure tempor reprehenderit sit est incididunt. Amet do in et nisi duis est dolor id eiusmod do.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-08-30 08:41:41'),
(23, 9, 23.271290, 113.428220, 'Elit veniam pariatur consequat ullamco in adipisicing exercitation quis Lorem commodo sint veniam eu in. Amet veniam est elit incididunt commodo ut aute nisi minim deserunt cillum. Irure adipisicing cupidatat nisi magna nisi in voluptate.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-09-20 01:38:49'),
(22, 11, 23.337110, 113.592450, 'Sit sunt aliqua officia veniam deserunt duis. Et mollit nisi eu Lorem occaecat minim excepteur consequat mollit. Cillum incididunt consectetur fugiat aute amet pariatur qui nulla eu nulla velit nisi sit.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-08-16 06:55:51'),
(21, 10, 23.606900, 113.199860, 'Cupidatat eu ad amet consequat cillum occaecat id id ullamco proident cupidatat ipsum eiusmod. Lorem qui dolore sit consequat reprehenderit esse dolor. Sit non Lorem sint deserunt enim anim ex labore voluptate sunt consequat anim nostrud.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-12-01 04:03:32'),
(20, 11, 23.537180, 113.545400, 'Exercitation id qui laborum mollit sit nulla mollit. Velit do sunt pariatur adipisicing voluptate ullamco id excepteur. Sint aliqua sunt excepteur id nulla ut excepteur.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-04-12 03:24:18'),
(19, 31, 23.487830, 113.391180, 'Enim enim veniam ullamco do nostrud sunt ullamco reprehenderit nisi consequat non. Cupidatat reprehenderit id aute veniam nostrud ad. Pariatur consequat incididunt exercitation mollit mollit et ex ad et anim pariatur.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-09-25 09:43:33'),
(18, 33, 23.111690, 113.285230, 'Cupidatat deserunt cillum id est id officia laboris irure. Non aliquip et cillum cillum commodo labore voluptate officia. Excepteur sit tempor qui mollit dolore enim dolore id pariatur.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-04-09 01:04:02'),
(17, 16, 23.145460, 113.547670, 'Reprehenderit ullamco anim in non eiusmod culpa consectetur pariatur. Voluptate nostrud minim dolore deserunt laborum voluptate sint sunt officia. Adipisicing sit eiusmod amet fugiat aliqua adipisicing dolore consectetur fugiat eiusmod ad.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-01-02 09:53:50'),
(16, 7, 23.338690, 113.688920, 'Aliqua magna ea non eu sit mollit consectetur. Ullamco laborum laborum proident id elit consectetur elit labore ea ex Lorem aliquip. Eiusmod laboris in aliqua ullamco ut nisi excepteur irure quis officia nulla velit nulla ea.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-12-14 01:14:51'),
(15, 5, 23.555930, 113.704220, 'Aliquip laborum fugiat aliqua veniam deserunt. Dolore non enim cillum consectetur sit minim ex ut labore. Ut eu anim laborum minim excepteur culpa ea.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-07-01 04:23:36'),
(14, 26, 23.237700, 113.521550, 'Consequat laborum minim magna adipisicing nostrud aliqua magna culpa ipsum. Fugiat sunt ex dolore non mollit quis est Lorem veniam ut consectetur consequat. Magna incididunt fugiat adipisicing qui culpa sunt laboris.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-02-12 08:39:22'),
(13, 3, 23.522460, 113.519660, 'Esse elit ut cillum dolore do aute dolore quis ad. Lorem nostrud cillum in qui adipisicing veniam consectetur. Aliqua sunt ullamco nisi tempor deserunt officia ad non Lorem magna tempor.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-09-03 06:51:19'),
(12, 2, 23.390870, 113.564300, 'Cupidatat enim veniam mollit occaecat irure dolore veniam officia. Adipisicing aliquip adipisicing ullamco sunt cupidatat eu consectetur aliqua eiusmod ex. In non veniam pariatur in qui ex ea consectetur nulla.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-09-03 03:02:01'),
(11, 20, 23.449680, 113.299590, 'Mollit ut officia adipisicing est exercitation. Nisi id Lorem adipisicing deserunt irure incididunt sit reprehenderit id sunt elit. Elit velit reprehenderit pariatur enim sunt veniam proident ad laboris aliquip officia.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-07-28 10:52:36'),
(10, 20, 23.589570, 113.666210, 'Laborum eiusmod consequat minim duis consectetur. Pariatur elit mollit adipisicing fugiat mollit sint minim amet labore. Exercitation in pariatur Lorem pariatur.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-03-05 05:50:27'),
(9, 19, 23.543740, 113.221310, 'Aliquip eiusmod exercitation dolore officia aliquip. Nostrud sint irure ad exercitation enim qui officia ex. Est eiusmod et et eiusmod occaecat occaecat labore laborum.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-01-07 01:48:46'),
(8, 34, 23.430890, 113.534720, 'Duis velit voluptate cupidatat sunt. Cillum ipsum reprehenderit aute esse ea aliquip irure. Dolore ipsum aliquip Lorem non minim laboris.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-03-02 12:26:50'),
(7, 13, 23.556020, 113.529380, 'Quis commodo in duis ea ad sint. Duis in duis proident duis non incididunt. Tempor do ea commodo sit et elit incididunt.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-06-24 10:46:09'),
(6, 26, 23.304230, 113.583360, 'Mollit magna et magna nisi reprehenderit irure nostrud et. Est adipisicing laboris sit ex enim. Dolore nisi eu ipsum laborum deserunt occaecat qui.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-01-15 01:29:40'),
(5, 42, 23.124160, 113.220680, 'Irure consectetur ullamco in qui ullamco. Ad in ut ipsum dolore duis adipisicing. Lorem cupidatat ullamco dolor ipsum ad officia sunt do dolor anim cupidatat.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-07-16 09:28:22'),
(4, 24, 23.417380, 113.228600, 'Aute elit anim ipsum nulla duis eiusmod consequat duis. Ipsum veniam et veniam tempor fugiat minim esse nostrud eiusmod adipisicing irure officia esse sint. Duis Lorem fugiat labore sint fugiat minim voluptate deserunt enim.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-04-17 08:09:56'),
(3, 28, 23.122060, 113.514650, 'Lorem mollit elit sit nisi duis id minim pariatur officia magna. Proident ut cupidatat dolore tempor sit nulla occaecat deserunt eu excepteur ipsum in reprehenderit cillum. Fugiat culpa officia et Lorem fugiat ut aute laboris consequat ipsum deserunt cupidatat.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-07-09 03:18:07'),
(2, 46, 23.205690, 113.294900, 'Esse ut cupidatat duis excepteur officia ipsum laboris ullamco veniam officia esse eu dolor. Aliqua nostrud enim pariatur consectetur officia consequat consectetur nostrud incididunt. Anim Lorem tempor consequat quis dolor aliquip qui tempor excepteur cupidatat.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-03-09 04:05:28'),
(1, 38, 23.263910, 113.209010, 'Laboris laborum aliquip enim dolor cillum anim. Consectetur enim laborum et ea et in Lorem proident culpa veniam cillum et tempor. Ex nulla eu reprehenderit commodo labore.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-01-18 07:04:22'),
(122, 46, 23.335780, 113.232230, 'Eu mollit ullamco laboris excepteur voluptate. Sit excepteur veniam Lorem Lorem reprehenderit consectetur ex ut sit labore. Culpa laboris duis consequat reprehenderit quis.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-11-16 02:29:59'),
(123, 23, 23.473200, 113.620420, 'Pariatur dolor non laboris irure consectetur adipisicing. Enim veniam officia est velit incididunt quis irure. Deserunt do id sunt exercitation esse culpa exercitation reprehenderit consectetur non elit cillum ad do.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-10-26 05:06:08'),
(124, 32, 23.274950, 113.326250, 'Dolore ea minim occaecat enim eu voluptate minim anim culpa id. Pariatur labore minim nulla velit aute dolore voluptate ad eu elit aliquip. Esse veniam ullamco ullamco in in est cupidatat eiusmod nostrud.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-09-07 04:26:02'),
(125, 44, 23.281180, 113.366650, 'Eiusmod culpa ullamco pariatur quis enim consectetur laboris aliqua aliqua deserunt pariatur ullamco in est. Exercitation cupidatat consequat esse ullamco sunt consectetur aliqua sunt velit incididunt ea magna id irure. Nisi non voluptate consectetur minim labore do dolore duis laboris excepteur incididunt enim fugiat.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-01-24 01:03:09'),
(126, 48, 23.552500, 113.263920, 'Laboris amet mollit cillum mollit sunt ex labore commodo est. Tempor est eu elit ipsum do duis fugiat reprehenderit non tempor laborum ea. Lorem sint quis duis incididunt labore proident ad quis ea commodo enim excepteur.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-05-28 04:33:21'),
(127, 1, 23.095860, 113.620760, 'Quis officia do sit ipsum nisi laboris laborum consectetur voluptate. Ex aliquip dolore est proident ipsum aliquip adipisicing eiusmod non velit voluptate exercitation aliquip. Et consequat fugiat fugiat ex fugiat cupidatat anim.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-07-06 02:13:18'),
(128, 3, 23.470890, 113.707790, 'Sunt aliqua irure laborum sunt occaecat veniam sit elit consequat culpa eu in pariatur. Laboris mollit cupidatat cillum qui voluptate ea mollit labore excepteur do adipisicing ipsum dolore. Ad quis Lorem adipisicing reprehenderit ut amet cillum velit sunt ipsum consequat amet.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-11-05 06:51:40'),
(129, 50, 23.145330, 113.452410, 'Id aliqua et est eu consequat cupidatat pariatur est aute aliquip eu consequat pariatur. Amet irure dolor ipsum fugiat. Cillum amet ut pariatur excepteur dolor qui in.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-02-21 02:36:51'),
(130, 22, 23.484650, 113.654110, 'Laboris velit fugiat ipsum esse ad ipsum est magna. Laboris ex proident proident occaecat dolor adipisicing est ad minim eiusmod. Tempor ad ut mollit laboris occaecat sunt voluptate aliqua magna quis dolor nostrud eiusmod consequat.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-11-02 08:29:56'),
(131, 47, 23.536800, 113.583260, 'Sint ut duis in consequat ea ex do laboris. Enim culpa sint enim cillum ullamco veniam reprehenderit dolore aute eu fugiat. Anim et ex non aliqua occaecat dolor id eiusmod aliqua velit.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-06-03 06:03:07'),
(132, 6, 23.298570, 113.680250, 'Id magna enim id voluptate in. Tempor id do et pariatur exercitation nostrud incididunt consequat Lorem amet culpa nisi. Et nisi laboris tempor et do veniam cupidatat veniam nisi et ipsum sint commodo.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-11-01 08:53:33'),
(133, 25, 23.144090, 113.475720, 'Mollit aute do esse qui laborum Lorem. Veniam voluptate cillum sit est labore exercitation. Cillum ut nostrud enim incididunt eiusmod nostrud ad eu Lorem voluptate cupidatat fugiat.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-02-25 12:43:45'),
(134, 47, 23.417350, 113.227950, 'Ex nostrud sunt veniam amet consectetur proident anim ea nulla dolore officia pariatur ullamco. Ullamco in in sint enim velit et non irure cillum aliqua sunt id. Nulla cupidatat et amet qui proident veniam.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-07-11 04:27:45'),
(135, 23, 23.084940, 113.259600, 'Veniam enim nostrud consectetur tempor pariatur sunt. Pariatur dolore dolor ex voluptate. In occaecat commodo culpa est reprehenderit occaecat Lorem duis irure consequat aliqua est reprehenderit duis.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-04-28 10:08:42'),
(136, 30, 23.181740, 113.719080, 'Fugiat sunt proident elit dolor cupidatat quis occaecat in dolore ipsum. Quis duis laborum veniam sit pariatur laboris amet tempor mollit elit ex enim qui. Lorem pariatur esse Lorem enim non ut.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-09-16 06:49:06'),
(137, 5, 23.224640, 113.206560, 'Do ex velit occaecat fugiat ullamco laboris veniam. Aliqua duis voluptate culpa sunt incididunt. Voluptate qui nisi eu aute est adipisicing incididunt enim aliqua commodo incididunt deserunt consequat sint.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-11-05 08:33:17'),
(138, 9, 23.125670, 113.371680, 'Dolore ipsum nostrud ea officia tempor labore aliquip excepteur irure. Non enim eu labore cupidatat fugiat. Lorem enim pariatur consequat incididunt fugiat.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-06-29 01:09:17'),
(139, 22, 23.386350, 113.711790, 'Anim duis ex officia veniam adipisicing adipisicing aute officia labore exercitation quis. Sit ea non laboris commodo nulla duis dolor amet amet esse consequat. Velit veniam labore labore sit anim cillum.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-05-05 08:52:15'),
(140, 19, 23.077170, 113.248260, 'Do adipisicing id nisi reprehenderit non id ullamco elit nisi voluptate cillum aliquip. Incididunt id id enim commodo veniam officia mollit ea magna laboris ipsum ut quis magna. Nisi consequat dolore ullamco consectetur ipsum ullamco aute ullamco consequat ut laboris.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-01-31 12:15:24'),
(141, 16, 23.306370, 113.597570, 'Elit ut qui deserunt eu ad laboris nostrud sunt. Excepteur in cupidatat incididunt consectetur id velit occaecat qui eu. Magna elit ut Lorem laborum do consequat magna id eiusmod adipisicing irure Lorem magna elit.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-01-27 12:17:56'),
(142, 13, 23.222670, 113.469800, 'Elit non sit Lorem commodo do deserunt. Qui labore dolor cupidatat non exercitation sit commodo consectetur officia incididunt aute labore anim pariatur. Ut exercitation excepteur adipisicing do nulla ad ex duis laboris dolor excepteur consequat adipisicing minim.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-01-29 06:05:31'),
(143, 37, 23.485400, 113.271370, 'Proident irure ipsum qui labore reprehenderit proident quis labore cillum. Dolor tempor adipisicing ullamco sint nisi eu do. Commodo dolor proident tempor excepteur culpa quis occaecat exercitation labore incididunt veniam sint qui ipsum.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-02-08 10:41:46'),
(144, 38, 23.310960, 113.450280, 'Voluptate ea exercitation dolore id magna id eiusmod laboris voluptate. Laboris aliqua cillum magna ullamco incididunt pariatur magna deserunt incididunt magna fugiat laborum. Mollit magna velit cupidatat sit.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-12-01 03:44:43'),
(145, 14, 23.087140, 113.368040, 'In tempor duis aute nostrud. Est velit velit proident in aute. Veniam exercitation irure do eiusmod adipisicing tempor officia cupidatat nostrud aliqua sint consequat.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-04-12 02:47:36');
INSERT INTO `track_locations` (`id`, `animal_id`, `lat`, `lng`, `description`, `photo`, `icon`, `date_create`) VALUES
(146, 46, 23.113460, 113.708340, 'Ad consequat ut occaecat est incididunt amet id anim veniam in sit aliqua. Id est tempor cupidatat velit amet deserunt fugiat in et nulla minim mollit veniam duis. Ad elit qui exercitation excepteur non eiusmod eiusmod.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-05-23 03:00:24'),
(147, 49, 23.405520, 113.291530, 'Ipsum non tempor mollit est. Tempor anim sunt aute qui in laborum anim anim est duis veniam tempor eu fugiat. Ad quis esse exercitation commodo enim irure ad.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-11-10 12:18:55'),
(148, 34, 23.125270, 113.694490, 'Aliqua id irure minim pariatur elit velit nostrud voluptate. Pariatur elit anim cupidatat non irure et fugiat aliqua. Ea deserunt pariatur laborum quis amet consequat velit eu commodo.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-06-29 01:43:47'),
(149, 39, 23.115860, 113.248860, 'Fugiat consectetur aute enim sunt. Eiusmod et aliqua anim ut excepteur aliquip exercitation voluptate. Consequat incididunt ipsum cillum voluptate laboris amet laborum sit exercitation ullamco laboris consequat qui anim.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-06-25 06:27:13'),
(150, 44, 23.195830, 113.263340, 'Laboris incididunt pariatur irure esse enim est commodo ullamco anim laborum commodo nostrud duis. Amet incididunt reprehenderit Lorem occaecat aliqua officia sint sunt adipisicing ea incididunt aliquip ut culpa. Pariatur labore laborum voluptate fugiat minim ad deserunt esse aliquip eu commodo Lorem.', 'https://via.placeholder.com/400/', 'https://via.placeholder.com/100/?text=ICON', '2020-12-02 07:56:28'),
(152, 1, 37.819556, -122.394498, 'fj', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-14 10:13:12'),
(153, 34, 37.803117, -122.360556, 'mnb', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-14 10:13:59'),
(154, 34, -38.788468, 175.420189, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-14 10:22:52'),
(155, 13, 37.799418, -122.374211, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-14 11:58:22'),
(156, 13, 37.781788, -122.379977, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-15 08:50:24'),
(157, 13, 7.180293, 148.349949, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-15 08:50:47'),
(158, 13, -0.610982, 115.602894, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-15 09:28:38'),
(159, 2, 37.841138, -122.371930, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-15 11:08:04'),
(160, 19, 37.796219, -122.354764, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-15 11:08:35'),
(161, 35, 37.832408, -122.369009, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-15 23:28:17'),
(162, 18, 37.844086, -122.360128, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-16 00:14:59'),
(163, 34, 56.852760, -39.789914, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-16 00:51:17'),
(164, 39, 79.791236, 133.182449, 'asf', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-16 01:44:04'),
(165, 31, 37.861850, -122.363325, 'ccd', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-16 03:08:18'),
(166, 8, 37.862164, -122.357602, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-16 05:53:18'),
(167, 39, 37.837338, -122.388776, 'fasdf', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-16 10:44:00'),
(168, 38, 37.854416, -122.403446, '_', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-16 12:03:33'),
(169, 160, 37.779990, -122.417163, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-16 12:14:52'),
(170, 163, 37.744163, -122.416133, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-16 12:20:36'),
(171, 160, 0.000000, 0.000000, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-16 12:42:07'),
(172, 44, 37.811189, -122.396563, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-16 14:15:00'),
(173, 38, 37.775707, -122.425624, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-16 15:28:40'),
(174, 28, 37.842350, -122.382140, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-17 00:17:49'),
(175, 167, 37.848666, -122.391187, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-17 00:29:41'),
(176, 155, 37.815270, -122.402930, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-17 04:24:34'),
(177, 155, 37.738462, -122.459563, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-17 04:37:05'),
(178, 8, 50.880856, -155.390830, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-17 10:21:02'),
(179, 8, -15.120208, 147.442981, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-17 10:21:18'),
(180, 15, 20.932152, -145.492588, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-17 10:38:59'),
(181, 36, 37.736207, -122.434032, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-17 12:16:33'),
(182, 36, 48.545437, 151.276708, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-17 12:17:03'),
(183, 15, 53.402939, 144.085655, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-17 12:19:20'),
(184, 15, 24.287869, 168.055824, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-17 12:19:54'),
(185, 15, 57.334207, -176.763066, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-17 12:20:09'),
(186, 33, 37.596057, -122.427806, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-17 13:19:38'),
(187, 21, 22.539454, 114.068442, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-17 13:45:11'),
(188, 5, 23.430186, 116.457654, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-17 13:46:08'),
(189, 21, 23.389858, 116.523572, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-17 13:46:56'),
(190, 21, 37.861167, -122.362381, '', 'https://via.placeholder.com/400?text=Photo', 'https://via.placeholder.com/100?text=Icon', '2020-12-17 13:57:12');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `track_locations`
--
ALTER TABLE `track_locations`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `track_locations`
--
ALTER TABLE `track_locations`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=191;
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 */;
|
SET DEFINE OFF;
CREATE TABLE AFW_01_MESG_INFOR
(
SEQNC NUMBER(10),
TEXT_MESG VARCHAR2(4000 BYTE),
UTILS_CREAT VARCHAR2(123 BYTE),
DATE_CREAT DATE,
SESS_ID NUMBER,
REF_UTILS NUMBER(10),
REF_MESG_LANG NUMBER(10)
)
LOGGING
NOCOMPRESS
NOCACHE
MONITORING
/
|
<gh_stars>1-10
SELECT TOP (5) e.EmployeeID,
e.FirstName,
e.Salary,
d.Name
FROM Employees AS e
JOIN Departments AS d ON d.DepartmentID = e.DepartmentID
WHERE Salary > 15000
ORDER BY d.DepartmentID;
|
<reponame>villdimova/SoftUni-CSharpDataBase
INSERT INTO Distributors([Name],CountryId,AddressText, Summary)
VALUES
('Deloitte & Touche', 2, '6 Arch St #9757', 'Customizable neutral traveling'),
('Congress Title', 13, '58 Hancock St','Customer loyalty'),
('Kitchen People', 1,'3 E 31st St #77','Triple-buffered stable delivery'),
('General Color Co Inc',21 ,'6185 Bohn St #72', 'Focus group'),
('Beck Corporation',23, '21 E 64th Ave','Quality-focused 4th generation hardware')
INSERT INTO Customers(FirstName,LastName,Age,Gender,PhoneNumber,CountryId)
VALUES
('Francoise','Rautenstrauch',15 ,'M','0195698399',5),
('Kendra', 'Loud', 22, 'F','0063631526',11),
('Lourdes', 'Bauswell', 50, 'M','0139037043',8),
('Hannah', 'Edmison', 18,'F', '0043343686', 1),
('Tom', 'Loeza',31, 'M','0144876096',23),
('Queenie', 'Kramarczyk',30,'F','0064215793',29),
('Hiu', 'Portaro', 25, 'M' ,'0068277755', 16),
('Josefa', 'Opitz', 43, 'F','0197887645', 17)
|
<filename>example/setup.sql
DROP TABLE IF EXISTS person;
CREATE TABLE person(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(100),
birthday DATE,
salary DECIMAL(20,2)
);
DROP TABLE IF EXISTS contact;
CREATE TABLE contact(
id INTEGER PRIMARY KEY AUTOINCREMENT,
person_id INTEGER,
value VARCHAR(255),
FOREIGN KEY (person_id) REFERENCES person(id)
);
DROP TABLE IF EXISTS post;
CREATE TABLE post(
date DATE,
no INTEGER,
title VARCHAR(255),
contents VARCHAR(1024),
PRIMARY KEY (date, no)
);
DROP TABLE IF EXISTS tag;
CREATE TABLE tag(
id INTEGER PRIMARY KEY AUTOINCREMENT,
post_date DATE,
post_no INTEGER,
value VARCHAR(1024),
FOREIGN KEY (post_date, post_no) REFERENCES post(date, no)
);
|
<gh_stars>10-100
-- file:event_trigger.sql ln:93 expect:true
alter event trigger regress_event_trigger enable replica
|
TRUNCATE TABLE KREW_RTE_BRCH_PROTO_T
/
INSERT INTO KREW_RTE_BRCH_PROTO_T (BRCH_NM,RTE_BRCH_PROTO_ID,VER_NBR)
VALUES ('ApprovalBranch','2422',130)
/
|
<reponame>forgottenlands/ForgottenCore406
-- Goblin Starting Zone
-- by <NAME>core
-- Part 1: Fixed order of quest sequence
-- Quest 25473 unleashed when 14069 and 14075 has been finished
UPDATE `quest_template` SET `ExclusiveGroup` = '-14069' WHERE `entry` = 14069;
UPDATE `quest_template` SET `ExclusiveGroup` = '-14069' WHERE `entry` = 14075;
-- Quest 25473 whith NextQuestInChain 28349
UPDATE `quest_template` SET `NextQuestInChain` = '28349' WHERE `entry` = 25473;
-- Quest 28349 whith NextQuestInChain 14071
UPDATE `quest_template` SET `NextQuestInChain` = '14071' WHERE `entry` = 28349;
-- Quest 14071 whith NextQuestInChain 24567
UPDATE `quest_template` SET `NextQuestInChain` = '24567' WHERE `entry` = 14071;
-- Quest 24567 whith NextQuestInChain 24488
UPDATE `quest_template` SET `NextQuestInChain` = '24488' WHERE `entry` = 24567;
-- Quest 24488 whith NextQuestInChain 24502
UPDATE `quest_template` SET `NextQuestInChain` = '24502' WHERE `entry` = 24488;
-- Quest 24502 whith NextQuestInChain 24503
UPDATE `quest_template` SET `NextQuestInChain` = '24503' WHERE `entry` = 24502;
-- Quest 24503 whith NextQuestInChain 24520
UPDATE `quest_template` SET `NextQuestInChain` = '24520' WHERE `entry` = 24503;
-- Quest 24520 whith NextQuestInChain 14070
UPDATE `quest_template` SET `NextQuestInChain` = '14070' WHERE `entry` = 24520;
-- Move RewSpellCast to RewSpellHiddenCast on quest 24520
UPDATE `quest_template` SET `RewSpellCast` = '0', `RewSpellHiddenCast` = '59073' WHERE `entry` = 24520;
-- Quest 28607 unleashed when 14071 has been finished
UPDATE `quest_template` SET `PrevQuestId` = '14071' WHERE `entry` = 28607;
-- Quest 28414 unleashed when 24502 has been finished
UPDATE `quest_template` SET `PrevQuestId` = '24502' WHERE `entry` = 28414;
-- Quest 14070 unleashed when 24520 has been finished
UPDATE `quest_template` SET `PrevQuestId` = '24520' WHERE `entry` = 14070;
-- Quests 26711 & 26712 when 24520 has been finished and added The new you NextQuestId
UPDATE `quest_template` SET `PrevQuestId` = '24520', `NextQuestId` = '14110' WHERE `entry` = 26711;
UPDATE `quest_template` SET `PrevQuestId` = '24520', `NextQuestId` = '14109' WHERE `entry` = 26712;
-- Class training quests unleashed when 24520 has been finished
UPDATE `quest_template` SET `PrevQuestId` = '24520' WHERE `entry` = 14007;
UPDATE `quest_template` SET `PrevQuestId` = '24520' WHERE `entry` = 14013;
UPDATE `quest_template` SET `PrevQuestId` = '24520' WHERE `entry` = 14012;
UPDATE `quest_template` SET `PrevQuestId` = '24520' WHERE `entry` = 14010;
UPDATE `quest_template` SET `PrevQuestId` = '24520' WHERE `entry` = 14009;
UPDATE `quest_template` SET `PrevQuestId` = '24520' WHERE `entry` = 14011;
UPDATE `quest_template` SET `PrevQuestId` = '24520' WHERE `entry` = 14008;
-- Quests 14110 & 14109 unleashed when 26711 has been finished
UPDATE `quest_template` SET `PrevQuestId` = '26711' WHERE `entry` = 14110;
UPDATE `quest_template` SET `PrevQuestId` = '26712' WHERE `entry` = 14109;
-- Quests 14153 & 14113 unleashed when 14110 or 14109 has been finished and added to NPCs 34668 and 35715
DELETE FROM `creature_questrelation` WHERE `quest` = 14153;
DELETE FROM `creature_questrelation` WHERE `quest` = 14113;
INSERT INTO `creature_questrelation` (`id`, `quest`)
VALUES
(34668, 14153),
(35175, 14153),
(34668, 14113),
(35175, 14113);
UPDATE `quest_template` SET `PrevQuestId` = '0' WHERE `entry` = 14115;
UPDATE `quest_template` SET `PrevQuestId` = '14110', `NextQuestId` = '14115', `ExclusiveGroup` = '14153', `NextQuestInChain` = '14115' WHERE `entry` = 14153;
UPDATE `quest_template` SET `PrevQuestId` = '14109', `NextQuestId` = '14115', `ExclusiveGroup` = '14153', `NextQuestInChain` = '14115' WHERE `entry` = 14113;
-- Much quests unleashed when 14122 has been finished
UPDATE `quest_template` SET `PrevQuestId` = '14122', `NextQuestId` = '14125', `ExclusiveGroup` = '-14121', `NextQuestInChain` = '14125' WHERE `entry` = 14121;
UPDATE `quest_template` SET `PrevQuestId` = '14122', `NextQuestId` = '14125', `ExclusiveGroup` = '-14121', `NextQuestInChain` = '14125' WHERE `entry` = 14123;
UPDATE `quest_template` SET `PrevQuestId` = '14122', `NextQuestId` = '14125', `ExclusiveGroup` = '-14121', `NextQuestInChain` = '14125' WHERE `entry` = 14124;
-- Quest 14122 don't have the end spell 69010 of Kezan phase and CompleteScript 14122
UPDATE `quest_template` SET `RewSpellCast` = '0', `CompleteScript` = '14122' WHERE `entry` = 14122;
-- Quest 14125 with NextQuestId and added to NPC 34668
DELETE FROM `creature_questrelation` WHERE `quest` = 14125;
INSERT INTO `creature_questrelation` (`id`, `quest`)
VALUES
(34668, 14125);
UPDATE `quest_template` SET `NextQuestId` = '14126' WHERE `entry` = 14125;
-- Quest 14126 with PrevQuestId, moved RewSpellCast to RewSpellHiddenCast, and added improved end script
DELETE FROM `creature_questrelation` WHERE `quest` = 14126;
INSERT INTO `creature_questrelation` (`id`, `quest`)
VALUES
(34668, 14126);
UPDATE `quest_template` SET `PrevQuestId` = '14125', `RewSpellCast` = '0', `RewSpellHiddenCast` = '91847', `CompleteScript` = '14126' WHERE `entry` = 14126;
DELETE FROM `quest_end_scripts` WHERE `id` = 14122;
DELETE FROM `quest_end_scripts` WHERE `id` = 14126;
INSERT INTO `quest_end_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`)
VALUES
(14126, 2, 6, 648, 0, 0, 533.77, 3274.62, 0.198194, 4.90527),
(14126, 3, 34, 22, 0, 0, 0, 0, 0, 0),
(14126, 30, 14, 69010, 0, 0, 0, 0, 0, 0);
|
CREATE TABLE user (
id INT PRIMARY KEY AUTO_INCREMENT,
name varchar(100)
);
INSERT INTO user (name) VALUES ('Justin');
INSERT INTO user (name) VALUES ('Candace');
INSERT INTO user (name) VALUES ('Jordan');
INSERT INTO user (name) VALUES ('Aubrey');
INSERT INTO user (name) VALUES ('Kaiden');
|
INSERT IGNORE INTO `accelog_menu` (`idmenu`, `nombre`, `idmenupadre`, `url`, `idcategoria`, `icono`, `orden`, `omision`)
VALUES
(2183, 'Bancos', 0, NULL, 1050, 0, 4, 0),
(1803, 'Tipo de cuenta', 2183, '../catalog/gestor.php?idestructura=281&ticket=testing', 1050, 0, 1, 0),
(1844, 'Conceptos Documentos Pago/Cobro', 2183, '../catalog/gestor.php?idestructura=288&ticket=testing', 1050, 0, 3, 0),
(1926, 'Tipos de Documento', 2183, '../catalog/gestor.php?idestructura=309&ticket=testing', 1050, 0, 2, 0),
(1932, 'Configuracion', 2183, '../../modulos/bancos/index.php?c=Configuracion&f=configuracion', 1050, 0, 0, 0),
(2151, 'Clasificador Ingresos-Egresos', 0, '../catalog/gestor.php?idestructura=285&ticket=testing', 1050, 0, 5, 0),
(2185, 'Bancos', 0, NULL, 1049, 0, 7, 0),
(1820, 'Flujo de Efectivo', 2185, '../../modulos/bancos/index.php?c=Flujo&f=verflujo', 1049, 0, 0, 0),
(2040, 'Posicion Bancaria Diaria', 2185, '../../modulos/bancos/index.php?c=Flujo&f=verposicion', 1049, 0, 1, 0),
(2078, 'Calendario Financiero', 2185, '../../modulos/bancos/index.php?c=Calendario&f=vercalendario', 1049, 0, 2, 0),
(2120, 'Auxiliar por Beneficiario / Pagador', 2185, '../../modulos/bancos/index.php?c=Flujo&f=verauxiliar', 1049, 0, 3, 0),
(2178, 'Retenciones e Informacion de Pagos', 2185, '../../modulos/bancos/index.php?c=Cheques&f=verRetencionPendiente', 1049, 0, 4, 0),
(2187, 'Egresos', 1828, '', 1033, 0, 1, 0),
(2186, 'Ingresos', 1828, '', 1033, 0, 0, 0),
(1923, 'Depositos', 2186, '../../modulos/bancos/index.php?c=Ingresos&f=filtro&fun=verDeposito', 1033, 0, 2, 0),
(1829, 'Egresos', 2187, '../../modulos/bancos/index.php?c=Ingresos&f=filtro&fun=verEgresos', 1033, 0, 0, 0),
(1805, 'Cheques', 2187, '../../modulos/bancos/index.php?c=Ingresos&f=filtro&fun=vercheque', 1033, 0, 1, 0),
(1822, 'Ingresos por Depositar', 2186, '../../modulos/bancos/index.php?c=Ingresos&f=filtro&fun=verIngresoNodep', 1033, 0, 1, 0),
(1830, 'Ingresos', 2186, '../../modulos/bancos/index.php?c=Ingresos&f=filtro&fun=verIngreso', 1033, 0, 0, 0),
(1808, 'Importar estado de cuenta bancario', 0, '../../modulos/bancos/index.php?c=importarEstadoCuenta&f=verImport', 1054, 0, 0, 0),
(1911, 'Reporte de Estado de Cuenta', 0, '../../modulos/cont/index.php?c=conciliacionAcontia&f=estadocuentafiltro', 1054, 0, 1, 0),
(1907, 'Realizar Conciliacion', 0, '../../modulos/cont/index.php?c=conciliacionAcontia&f=verCaratulaConciliacion', 1054, 0, 2, 0),
(1915, 'Reporte Conciliacion', 0, '../../modulos/cont/index.php?c=conciliacionAcontia&f=verReporteConciliacion', 1054, 0, 3, 0),
(1826, 'Sucursal Bancaria', 0, '../catalog/gestor.php?idestructura=283&ticket=testing', 1033, 0, 3, 0),
(1804, 'Cuentas Bancarias', 0, '../catalog/gestor.php?idestructura=280&ticket=testing', 1033, 0, 2, 0),
(1828, 'Documentos', 0, NULL, 1033, 0, 4, 0),
(2147, 'General', 0, '', 1050, 0, 2, 0),
(2138, 'Bienvenido', 2147, '../../modulos/inicio/index.php', 1050, 0, 1, 0),
(2137, 'Mi Organización', 2147, '../catalog/gestor.php?idestructura=1&ticket=testing', 1050, 0, 2, 0),
(2139, 'Perfiles de Usuario', 2147, '../../modulos/perfiles/index.php', 1050, 0, 3, 0),
(2140, 'Administración Usuarios', 2147, '../catalog/gestor.php?idestructura=47&ticket=testing', 1050, 0, 4, 0),
(2141, 'Color de Interfaz', 2147, '../../modulos/styleselector/index.php', 1050, 0, 5, 0),
(1706, 'Bancos de Beneficiarios/Proveedores ', 0, '../catalog/gestor.php?idestructura=275&ticket=testing', 1023, 0, 2, 0);
INSERT IGNORE INTO `accelog_perfiles_me` (`idperfil`, `idmenu`)
VALUES
(2,1706),(2, 1932),(2, 1803),(2, 1841),(2, 1804),(2,1844),(3,1844),(2,1926),(2,1826),(2,1828),(2,1830),(2,1822),(2,1923),(2,1829),(2,1824),(2,1805),(2,1805),(2,1808),(2,1820),(2,2040),(2,2078),(2,2185),(2,2186),(2,2187),
(2, 2183),(2, 2178),(3, 2178),(2, 2120),(3, 2120),(2,1911),(3,1911),(2,1907),(3,1907),(2,1915),(3,1915),(2,2151),(3,2151);
|
-- noinspection SqlNoDataSourceInspectionForFile
create extension if not exists "uuid-ossp";
create table if not exists users(
id uuid primary key default uuid_generate_v1(),
email text unique not null,
password text not null,
created_at timestamp not null default now()
);
create table if not exists api_keys(
id uuid primary key default uuid_generate_v1(),
user_id uuid references users(id),
created_at timestamp not null default now()
);
create table if not exists assets(
id uuid primary key default uuid_generate_v1(),
name varchar(100) unique not null,
tick varchar(12) unique not null,
created_at timestamp not null default now()
);
create table if not exists products(
id varchar(25) primary key,
base_id uuid references assets(id) not null,
quote_id uuid references assets(id) not null,
base_tick varchar(12) references assets(tick) not null,
quote_tick varchar(12) references assets(tick) not null,
created_at timestamp not null default now()
);
create table if not exists accounts(
id uuid primary key default uuid_generate_v1(),
user_id uuid references users(id),
asset_id uuid references assets(id),
balance bigint not null default 0,
holds bigint not null default 0,
created_at timestamp not null default now()
);
create table if not exists orders(
id uuid unique not null,
product_id varchar(25) references products(id) not null,
user_id uuid references users(id) not null,
amount bigint not null,
price bigint not null default 0, -- 0 if it's a market order
type varchar(6) not null default 'limit', -- one of {LIMIT, MARKET, STOP}
side boolean not null, -- Buy = True, Sell = False
status varchar(16) not null, -- one of {Filled, Partially Filled, Confirmed}
created_at timestamp not null
);
-- Initial asset setup
insert into assets(name, tick) values('US Dollar', 'USD');
insert into assets(name, tick) values('Bitcoin', 'BTC');
-- Initial product setup
with usd as (select id, tick from assets where tick = 'USD' limit 1),
btc as (select id, tick from assets where tick = 'BTC' limit 1)
insert into products(id, base_id, quote_id, base_tick, quote_tick)
values (
concat((select tick from btc), '-', (select tick from usd)),
(select id from btc),
(select id from usd),
(select tick from btc),
(select tick from usd)
);
|
<gh_stars>1-10
DO $$ BEGIN
-- <NAME>
-- Australian Open
PERFORM set_tournament_map_properties('580', NULL, NULL, NULL, '{"center": {"lat": -37.8217558, "lng": 144.9799148}, "zoom": 18}'::JSON);
-- <NAME>
PERFORM set_tournament_map_properties('520', NULL, NULL, NULL, '{"center": {"lat": 48.8471083, "lng": 2.2470515}, "zoom": 18}'::JSON);
-- Wimbledon
PERFORM set_tournament_map_properties('540', NULL, NULL, NULL, '{"center": {"lat": 51.4340738, "lng": -0.2137516}, "zoom": 17}'::JSON);
-- US Open
PERFORM set_tournament_map_properties('560', NULL, NULL, NULL, '{"center": {"lat": 40.7498881, "lng": -73.8463945}, "zoom": 18}'::JSON);
-- Tour Finals
-- London
PERFORM set_tournament_map_properties('605', 2009, NULL, NULL, '{"center": {"lat": 51.5030165, "lng": 0.0035802}, "zoom": 17}'::JSON);
-- Shanghai
PERFORM set_tournament_map_properties('605', 2005, 2008, NULL, '{"center": {"lat": 31.0418772, "lng": 121.3546204}, "zoom": 18}'::JSON);
-- Masters 1000
-- Indian Wells
PERFORM set_tournament_map_properties('404', NULL, NULL, NULL, '{"center": {"lat": 33.7236849, "lng": -116.3053698}, "zoom": 18}'::JSON);
-- Miami
PERFORM set_tournament_map_properties('403', NULL, NULL, NULL, '{"center": {"lat": 25.7089512, "lng": -80.1599014}, "zoom": 18}'::JSON);
-- Monte Carlo
PERFORM set_tournament_map_properties('410', NULL, NULL, NULL, '{"center": {"lat": 43.7523799, "lng": 7.4413013}, "zoom": 18}'::JSON);
-- Madrid
PERFORM set_tournament_map_properties('1536', 2009, NULL, NULL, '{"center": {"lat": 40.3694146, "lng": -3.6839787}, "zoom": 18}'::JSON);
-- Rome
PERFORM set_tournament_map_properties('416', NULL, NULL, NULL, '{"center": {"lat": 41.9289912, "lng": 12.4571116}, "zoom": 18}'::JSON);
-- Toronto
PERFORM set_tournament_map_properties('421', NULL, 1980, ARRAY[1982, 1984, 1986, 1988, 1990, 1992, 1994, 1996, 1998, 2000, 2002, 2004, 2006, 2008, 2010, 2012, 2014, 2016],
'{"center": {"lat": 43.7706578, "lng": -79.5113256}, "zoom": 18}'::JSON);
-- Montreal
PERFORM set_tournament_map_properties('421', NULL, 1967, ARRAY[1981, 1983, 1985, 1987, 1989, 1991, 1993, 1995, 1997, 1999, 2001, 2003, 2005, 2007, 2009, 2011, 2013, 2015],
'{"center": {"lat": 45.5333716, "lng": -73.6277015}, "zoom": 18}'::JSON);
-- Cincinnati
PERFORM set_tournament_map_properties('422', NULL, NULL, NULL, '{"center": {"lat": 39.3490604, "lng": -84.2758254}, "zoom": 18}'::JSON);
-- Shanghai
PERFORM set_tournament_map_properties('5014', 2009, NULL, NULL, '{"center": {"lat": 31.0418772, "lng": 121.3546204}, "zoom": 18}'::JSON);
-- Paris
PERFORM set_tournament_map_properties('352', NULL, NULL, NULL, '{"center": {"lat": 48.838524, "lng": 2.3784512}, "zoom": 18}'::JSON);
-- ATP 500
-- Rotterdam
PERFORM set_tournament_map_properties('407', NULL, NULL, NULL, '{"center": {"lat": 51.8828525, "lng": 4.4881466}, "zoom": 18}'::JSON);
-- Rio de Janeiro
PERFORM set_tournament_map_properties('6932', NULL, NULL, NULL, '{"center": {"lat": -22.9741851, "lng": -43.2193048}, "zoom": 18}'::JSON);
-- Dubai
PERFORM set_tournament_map_properties('495', NULL, NULL, NULL, '{"center": {"lat": 25.2392831, "lng": 55.3504042}, "zoom": 18}'::JSON);
-- Acapulco
PERFORM set_tournament_map_properties('807', NULL, NULL, NULL, '{"center": {"lat": 16.7881978, "lng": -99.8118322}, "zoom": 18}'::JSON);
-- Barcelona
PERFORM set_tournament_map_properties('425', NULL, NULL, NULL, '{"center": {"lat": 41.3935601, "lng": 2.1173231}, "zoom": 18}'::JSON);
-- Queens
PERFORM set_tournament_map_properties('311', NULL, NULL, NULL, '{"center": {"lat": 51.4878388, "lng": -0.2116654}, "zoom": 18}'::JSON);
-- Halle
PERFORM set_tournament_map_properties('500', NULL, NULL, NULL, '{"center": {"lat": 52.0636084, "lng": 8.3493754}, "zoom": 18}'::JSON);
-- Hamburg
PERFORM set_tournament_map_properties('414', NULL, NULL, NULL, '{"center": {"lat": 53.57357, "lng": 9.9908494}, "zoom": 18}'::JSON);
-- Washington
PERFORM set_tournament_map_properties('418', NULL, NULL, NULL, '{"center": {"lat": 38.954078, "lng": -77.0377643}, "zoom": 18}'::JSON);
-- Tokyo
PERFORM set_tournament_map_properties('329', NULL, NULL, NULL, '{"center": {"lat": 35.6895768, "lng": 139.6927919}, "zoom": 18}'::JSON);
-- Beijing
PERFORM set_tournament_map_properties('747', NULL, NULL, NULL, '{"center": {"lat": 39.8506515, "lng": 116.413618}, "zoom": 18}'::JSON);
-- Vienna
PERFORM set_tournament_map_properties('337', NULL, NULL, NULL, '{"center": {"lat": 48.2024032, "lng": 16.3330703}, "zoom": 18}'::JSON);
-- Basel
PERFORM set_tournament_map_properties('328', NULL, NULL, NULL, '{"center": {"lat": 47.5391808, "lng": 7.6186382}, "zoom": 18}'::JSON);
END $$;
COMMIT;
|
<gh_stars>10-100
-- enable roles
update settings_changes set value='--- automate,database_operations,ems_inventory,ems_metrics_collector,ems_metrics_coordinator,ems_metrics_processor,ems_operations,event,notifier,reporting,scheduler,smartproxy,smartstate,user_interface,web_services,websocket\n---\n' where key='/server/role';
-- enable NTP
update settings_changes set value='---\n- 192.168.101.1\n' where key='/ntp/server';
-- update company name
update settings_changes set value='--- Hailstorm\n...\n' where key='/server/company';
-- update Time Zone
update settings_changes set value='--- Berlin\n...\n' where key='/server/timezone';
DO
$do$
BEGIN
-- set roles if they haven't been set before
IF NOT EXISTS (select * from settings_changes where key='/server/role') THEN
insert into settings_changes (key,value,created_at,updated_at,resource_type,resource_id) VALUES ('/server/role','--- automate,database_operations,ems_inventory,ems_metrics_collector,ems_metrics_coordinator,ems_metrics_processor,ems_operations,event,notifier,reporting,scheduler,smartproxy,smartstate,user_interface,web_services,websocket\n---\n',now(),now(),'MiqServer',(select id from miq_servers));
END IF;
-- set NTP if it hasn't been set before
IF NOT EXISTS (select * from settings_changes where key='/ntp/server') THEN
insert into settings_changes (key,value,created_at,updated_at,resource_type,resource_id) VALUES ('/ntp/server','---\n- 192.168.101.1\n',now(),now(),'MiqServer',(select id from miq_servers));
END IF;
-- set company name
IF NOT EXISTS (select key,value from settings_changes where key='/server/company') THEN
insert into settings_changes (key,value,created_at,updated_at,resource_type,resource_id) VALUES ('/server/company','--- Hailstom\n...\n',now(),now(),'MiqServer',(select id from miq_servers));
END IF;
-- set Time Zone
IF NOT EXISTS (select key,value from settings_changes where key='/server/timezone') THEN
insert into settings_changes (key,value,created_at,updated_at,resource_type,resource_id) VALUES ('/server/timezone','--- Berlin\n...\n',now(),now(),'MiqServer',(select id from miq_servers));
END IF;
-- create storage C&U tag
IF NOT EXISTS (select * from tags where name='/performance/storage/capture_enabled') THEN
insert into tags (name) values ('/performance/storage/capture_enabled');
END IF;
-- create host and cluster C&U tag
IF NOT EXISTS (select * from tags where name='/performance/host_and_cluster/capture_enabled') THEN
insert into tags (name) values ('/performance/host_and_cluster/capture_enabled');
END IF;
-- enable C&U for all storages
IF NOT EXISTS (select * from taggings where tag_id=(select id from tags where name='/performance/storage/capture_enabled')) THEN
insert into taggings (taggable_id,tag_id,taggable_type) values ((select id from miq_regions),(select id from tags where name='/performance/storage/capture_enabled'),'MiqRegion');
END IF;
-- enable C&U for all Hosts and Clusters
IF NOT EXISTS (select * from taggings where tag_id=(select id from tags where name='/performance/host_and_cluster/capture_enabled')) THEN
insert into taggings (taggable_id,tag_id,taggable_type) values ((select id from miq_regions),(select id from tags where name='/performance/host_and_cluster/capture_enabled'),'MiqRegion');
END IF;
END;
$do$
|
<reponame>MCZbase/DDL
CREATE TABLE "PUBLICATION_ATTRIBUTES"
( "PUBLICATION_ATTRIBUTE_ID" NUMBER NOT NULL ENABLE,
"PUBLICATION_ID" NUMBER NOT NULL ENABLE,
"PUBLICATION_ATTRIBUTE" VARCHAR2(60 CHAR) NOT NULL ENABLE,
"PUB_ATT_VALUE" VARCHAR2(4000 CHAR) NOT NULL ENABLE,
CONSTRAINT "PK_PUBLICATION_ATTRIBUTE_ID" PRIMARY KEY ("PUBLICATION_ATTRIBUTE_ID")
USING INDEX ENABLE,
CONSTRAINT "FK_PUBATTR_CTPUBATTR" FOREIGN KEY ("PUBLICATION_ATTRIBUTE")
REFERENCES "CTPUBLICATION_ATTRIBUTE" ("PUBLICATION_ATTRIBUTE") ENABLE
)
|
create user "MASSDATA" identified by "Massdata.2018";
grant "PUBLIC","RESOURCE" to "MASSDATA";
grant select on V$INSTANCE to MASSDATA;
grant select on V$MPP_CFG_ITEM to MASSDATA;
grant select on V$DATABASE to MASSDATA;
grant select on V$DM_INI to MASSDATA;
|
<filename>other/metadata query.sql<gh_stars>1-10
declare @crlf nvarchar(2)=concat(N' ',char(13),char(10),N' ');
with [tables] as
(
select
concat(N'/3/',row_number() over(order by a.[name]),N'/') [objectPointer], --a.[object_id]
a.[object_id] [objectID],
object_schema_name(a.[object_id]) [schemaName],
a.[name] [tableName],
concat(N'### [',object_schema_name(a.[object_id]),'].[',a.[name], N']',@crlf) [documentationValue]
from
sys.tables a
where
a.[is_ms_shipped]=0
), [table_headers] as
(
select
concat([objectPointer],N'1.1/') [objectPointer],
[objectID],
[schemaName],
[tableName],
concat(N'#### Columns:',@crlf) [documentationValue]
from
[tables]
union all
select
concat([objectPointer],N'2.1/') [objectPointer],
[objectID],
[schemaName],
[tableName],
concat(N'#### Keys:',@crlf) [documentationValue]
from
[tables]
union all
select
concat([objectPointer],N'6.1/') [objectPointer],
[objectID],
[schemaName],
[tableName],
concat(N'#### Statistics:',@crlf) [documentationValue]
from
[tables]
union all
select
concat([objectPointer],N'7.1/') [objectPointer],
[objectID],
[schemaName],
[tableName],
concat(N'#### Properties:',@crlf) [documentationValue]
from
[tables]
-- before
union all
select
concat([objectPointer],N'1/') [objectPointer],
[objectID],
[schemaName],
[tableName],
concat(N'',@crlf) [documentationValue]
from
[tables]
union all
select
concat([objectPointer],N'2/') [objectPointer],
[objectID],
[schemaName],
[tableName],
concat(N'',@crlf) [documentationValue]
from
[tables]
union all
select
concat([objectPointer],N'6/') [objectPointer],
[objectID],
[schemaName],
[tableName],
concat(N'',@crlf) [documentationValue]
from
[tables]
union all
select
concat([objectPointer],N'7/') [objectPointer],
[objectID],
[schemaName],
[tableName],
concat(N'',@crlf) [documentationValue]
from
[tables]
-- after
union all
select
concat([objectPointer],N'1.1/0/') [objectPointer],
[objectID],
[schemaName],
[tableName],
concat(N'',@crlf) [documentationValue]
from
[tables]
union all
select
concat([objectPointer],N'2.1/0/') [objectPointer],
[objectID],
[schemaName],
[tableName],
concat(N'',@crlf) [documentationValue]
from
[tables]
union all
select
concat([objectPointer],N'6.1/0/') [objectPointer],
[objectID],
[schemaName],
[tableName],
concat(N'',@crlf) [documentationValue]
from
[tables]
union all
select
concat([objectPointer],N'7.1/0/') [objectPointer],
[objectID],
[schemaName],
[tableName],
concat(N'',@crlf) [documentationValue]
from
[tables]
union all
select
concat([objectPointer],N'8/0/') [objectPointer],
[objectID],
[schemaName],
[tableName],
concat(N'',@crlf) [documentationValue]
from
[tables]
-- table end
union all
select
concat([objectPointer],N'8/1/') [objectPointer],
[objectID],
[schemaName],
[tableName],
concat(N'---',@crlf) [documentationValue]
from
[tables]
union all
select
concat([objectPointer],N'8/2/') [objectPointer],
[objectID],
[schemaName],
[tableName],
concat(N'',@crlf) [documentationValue]
from
[tables]
), [table_description] as
(
select
concat([objectPointer],N'0/') [objectPointer],
concat(N'*',isnull(convert(nvarchar(max),a.[value]),quotename(x.[schemaName])+N'.'+quotename(x.[tableName])+N' description and/or summary missing.'),N'*') [documentationValue]
from
[tables] x
left join
sys.extended_properties a on x.[objectID]=a.[major_id] and a.[class]=1 and a.[minor_id]=0 and a.[name]='Description'
)
, [columns] as
(
select
concat([objectPointer],N'1.1/',a.[column_id],N'/') [objectPointer],
a.[object_id] [objectID],
object_schema_name(a.[object_id]) [schemaName],
object_name(a.[object_id]) [tableName],
concat(N' ',quotename(a.[name]),N' (',
case b.[name]
when N'char' then b.[name]+N'('+convert(nvarchar(10),a.[max_length])+N')'
when N'nchar' then b.[name]+N'('+convert(nvarchar(10),a.[max_length]/2)+N')'
when N'varchar' then b.[name]+N'('+ isnull(nullif(convert(nvarchar(10),a.[max_length]),N'-1'),N'max') +N')'
when N'nvarchar' then b.[name]+N'('+ isnull(nullif(convert(nvarchar(10),a.[max_length]/2),N'-1'),N'max') +N')'
when N'binary' then b.[name]+N'('+isnull(nullif(convert(nvarchar(10),a.[max_length]),N'-1'),N'max')+N')'
when N'varbinary' then b.[name]+N'('+isnull(nullif(convert(nvarchar(10),a.[max_length]),N'-1'),N'max')+N')'
when N'datetime2' then b.[name]+N'('+convert(nvarchar(10),a.[scale])+N')'
when N'decimal' then b.[name]+N'('+convert(nvarchar(10),a.[precision])+N','+convert(nvarchar(10),a.[scale])+N')'
when N'numeric' then b.[name]+N'('+convert(nvarchar(10),a.[precision])+N','+convert(nvarchar(10),a.[scale])+N')'
else b.[name]
end,
case
when c.[object_id] is not null then concat(N' identity(',convert(int,c.[seed_value]),N',',convert(int,c.[increment_value]),N')')
else N''
end,
case
when a.[is_sparse]=1 then N', sparse'
when a.[is_nullable]=0 then N', not null'
else ', null'
end,
case
when a.[collation_name]=convert(sysname,databasepropertyex(db_name(db_id()),N'collation')) then N')'
when a.[collation_name] is not null then concat(N', collated with ',a.[collation_name],N')')
else N')'
end,N' '
) [documentationValue]
from
[tables] x
inner join
sys.columns a on x.[objectID]=a.[object_id]
left join
sys.types b on a.[user_type_id]=b.[user_type_id]
left join
sys.identity_columns c on a.[object_id]=c.[object_id]
and a.[column_id]=c.[column_id]
), [keys] as
(
select
concat([objectPointer],N'2.1/',case a.[type] when N'UQ' then 2 else 1 end,N'/') [objectPointer],
x.[objectID] [objectID],
object_schema_name(x.[objectID]) [schemaName],
object_name(x.[objectID]) [tableName],
concat(N' ',quotename(a.[name]), N' (',case when b.[type]=1 then N'clustered ' else N'' end,case a.[type] when N'UQ' then N'alternate key' else N'primary key' end,N')') [documentationValue]
from
[tables] x
inner join
sys.key_constraints a on x.[objectID]=a.[parent_object_id]
inner join
sys.indexes b on a.[parent_object_id]=b.[object_id]
and a.[unique_index_id]=b.[index_id]
union all
select
concat([objectPointer],N'2.1/',3,N'/') [objectPointer],
a.[parent_object_id] [objectID],
object_schema_name(a.[parent_object_id]) [objectSchema],
object_name(a.[parent_object_id]) [objectName],
concat(N' ',quotename(a.[name]),char(13),char(10),N' (foreign key references ',quotename(object_schema_name(a.[referenced_object_id])),N'.',quotename(object_name(a.[referenced_object_id])),N' on {',stuff(b.[cols],1,1,N''),N'})') [documentationValue]
from
[tables] x
inner join
sys.foreign_keys a on x.[objectID]=a.[parent_object_id]
cross apply
(
select
concat(N',',quotename(c.[name]),N'=',quotename(d.[name]))
from
sys.foreign_key_columns b
inner join
sys.columns c on b.[parent_object_id]=c.[object_id]
and b.[parent_column_id]=c.[column_id]
inner join
sys.columns d on b.[referenced_object_id]=d.[object_id]
and b.[referenced_column_id]=d.[column_id]
where
a.[object_id]=b.[constraint_object_id]
for xml path(N'')
) b(cols)
), [statistics] as
(
select
concat(x.[objectPointer],N'6.1/',a.[stats_id],N'/') [objectPointer],
[object_id] [objectID],
object_schema_name(a.[object_id]) [schemaName],
object_name(a.[object_id]) [tableName],
concat(N' ',quotename(a.[name]),N' (',stuff(b.[cols],1,1,N''),N')') [documentationValue]
from
[tables] x
inner join
sys.stats a on x.[objectID]=a.[object_id] and a.[user_created]=1
cross apply
(
select
concat(N',',quotename(c.[name]))
from
sys.stats_columns b
inner join
sys.columns c on b.[object_id]=c.[object_id]
and b.[column_id]=c.[column_id]
inner join
sys.stats d on b.[object_id]=d.[object_id]
and b.[stats_id]=d.[stats_id]
where
a.[object_id]=b.[object_id]
and
a.[stats_id]=b.[stats_id]
and
d.[user_created]=1
for xml path(N'')
) b(cols)
), [properties] as
(
select
concat(x.[objectPointer],N'7.1/1/') [objectPointer],
[object_id] [objectID],
object_schema_name(a.[object_id]) [schemaName],
object_name(a.[object_id]) [tableName],
concat(N' [Create Date]: ',[create_date]) [documentationValue]
from
[tables] x
inner join
sys.tables a on x.[objectID]=a.[object_id]
where
a.[is_ms_shipped]=0
union all
select
concat(x.[objectPointer],N'7.1/2/') [objectPointer],
[object_id] [objectID],
object_schema_name(a.[object_id]) [schemaName],
object_name(a.[object_id]) [tableName],
concat(N' [Modify Date]: ',[modify_date]) [documentationValue]
from
[tables] x
inner join
sys.tables a on x.[objectID]=a.[object_id]
where
a.[is_ms_shipped]=0
union all
select
concat(x.[objectPointer],N'7.1/',row_number() over(order by a.[name])+2,'/') [objectPointer],
x.[objectID] [objectID],
object_schema_name(x.[objectID]) [schemaName],
object_name(x.[objectID]) [tableName],
concat(N' [',a.[name],']: ',convert(nvarchar(4000),a.[value])) [documentationValue]
from
[tables] x
inner join
sys.extended_properties a on x.[objectID]=a.[major_id]
where
a.[minor_id]=0
and
a.[name]!=N'Description'
), [document] as
(
select N'/0/' [objectPointer],concat(N'# ',quotename(db_name(db_id())),N' Data Definition Documentation') [documentationValue]
union all
select N'/0/0.1/' [objectPointer], N'' [documentationValue]
union all
select N'/0/1/' [objectPointer],N'---' [documentationValue]
union all
select N'/0/1/0/' [objectPointer], N'' [documentationValue]
union all
select N'/0/2/' [objectPointer],concat(N'*',convert(nvarchar(max),[value]) ,N'*') [documentationValue]
from sys.extended_properties
where [class]=0 and [name]=N'Description'
union all
select N'/0/2/0/' [objectPointer], N'' [documentationValue]
union all
select N'/1/' [objectPointer],N'## *Database Settings:*' [documentationValue]
union all
select N'/1/1/' [objectPointer],concat(N' [Collation]: ',convert(sysname,databasepropertyex(db_name(db_id()),N'collation'))) [documentationValue]
union all
select N'/1/2/' [objectPointer],concat(N' [Compatibility Level]: ',(select convert(nvarchar(10),[compatibility_level]) from sys.databases where [name] = 'edw_oda')) [documentationValue]
union all
select N'/1/3/' [objectPointer],concat(N' [Auto Create Statistics]: ',case convert(bit,databasepropertyex(db_name(db_id()),N'IsAutoCreateStatistics')) when 1 then N'Yes' else N'No' end) [documentationValue]
union all
select N'/1/4/' [objectPointer],concat(N' [Auto Update Statistics]: ',case convert(bit,databasepropertyex(db_name(db_id()),N'IsAutoUpdateStatistics')) when 1 then N'Yes' else N'No' end) [documentationValue]
union all
select N'/1/98/' [objectPointer],N'' [documentationValue]
union all
select N'/1/99/' [objectPointer],N'---' [documentationValue]
union all
select N'/1/100/' [objectPointer],N'' [documentationValue]
--union all
--select N'/2/' [objectPointer],N'## *Schemas:*' [documentationValue]
union all
select N'/3/' [objectPointer],N'## *Tables:*' [documentationValue]
union all
select N'/3/0/' [objectPointer],N'' [documentationValue]
union all
select
[objectPointer],[documentationValue]
from
[tables]
union all
select
[objectPointer],[documentationValue]
from
[table_headers]
union all
select
[objectPointer],[documentationValue]
from
[table_description]
union all
select
[objectPointer],[documentationValue]
from
[columns] a
union all
select
[objectPointer],[documentationValue]
from
[keys] a
union all
select
[objectPointer],[documentationValue]
from
[statistics] a
union all
select
[objectPointer],[documentationValue]
from
[properties] a
)
select [documentationValue]
from [document]
order by convert(hierarchyid,[objectPointer]);
|
<reponame>hrushi-salunkhe/biking2
/*
* Copyright 2019 michael-simons.eu.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
CREATE TABLE milages(
id serial primary key,
recorded_on DATE NOT NULL,
amount DECIMAL(8, 2) NOT NULL,
created_at DATETIME NOT NULL,
bike_id INTEGER NOT NULL,
CONSTRAINT milage_unique UNIQUE(bike_id, recorded_on),
CONSTRAINT milage_bike_fk FOREIGN KEY(bike_id) REFERENCES bikes(id) ON DELETE CASCADE
);
|
-- @testpoint:opengauss关键字recursive(非保留),作为函数名
--关键字不带引号-成功
drop function if exists recursive;
create function recursive(i integer)
returns integer
as $$
begin
return i+1;
end;
$$ language plpgsql;
/
drop function recursive;
--关键字带双引号-成功
drop function if exists "recursive";
create function "recursive"(i integer)
returns integer
as $$
begin
return i+1;
end;
$$ language plpgsql;
/
drop function "recursive";
--关键字带单引号-合理报错
drop function if exists 'recursive';
create function 'recursive'(i integer)
returns integer
as $$
begin
return i+1;
end;
$$ language plpgsql;
/
--关键字带反引号-合理报错
drop function if exists `recursive`;
create function `recursive`(i integer)
returns integer
as $$
begin
return i+1;
end;
$$ language plpgsql;
/
|
<gh_stars>0
CREATE TABLE st_user
(
userid SERIAL PRIMARY KEY NOT NULL,
username VARCHAR(100) NOT NULL,
password VARCHAR(200) NOT NULL,
email VARCHAR(100) NOT NULL,
role VARCHAR(100) NOT NULL,
created TIMESTAMP NOT NULL,
updated TIMESTAMP NOT NULL
);
CREATE UNIQUE INDEX st_user_username_key ON st_user (username);
CREATE UNIQUE INDEX st_user_email_key ON st_user (email);
CREATE TABLE st_session
(
token VARCHAR(23) PRIMARY KEY NOT NULL,
userid INT,
created TIMESTAMP NOT NULL,
FOREIGN KEY (userid) REFERENCES st_user (userid)
);
CREATE UNIQUE INDEX st_session_userid_key ON st_session (userid);
|
<reponame>duyndh/QuanLyHocSinh
create database QuanLyHocSinh
use QuanLyHocSinh
create table HOCSINH
(
MaHS int identity(1, 1) primary key,
HoTen nvarchar(50) not null, -- '<NAME>',...
GioiTinh nvarchar(3) not null, -- 'Nam', 'Nữ'
NgaySinh date -- '21/12/1998',...
DiaChi nvarchar(100), -- '10 Phạm Văn Đồng, ...'
SoDT varchar(25), -- '0919191119'
MaLop int
);
alter table HOCSINH
alter column NgaySinh date
create table LOP
(
MaLop int identity(1, 1) primary key,
TenLop nvarchar(20) not null, -- '10 Toán Tin', 11A1, 12/2,...
SiSo int not null, -- 30, 40, 45,...
MaKhoi int not null
);
create table KHOI
(
MaKhoi int primary key,
TenKhoi varchar(2) not null, -- '10', '11', '12',...
SoLop int not null -- 8, 9, 10,...
);
create table HOCPHAN
(
MaHP int identity(1, 1) primary key,
DiemTB float , -- 8.2
MaHS int not null,
MaMH int not null,
MaHK int not null,
);
create table MONHOC
(
MaMH int identity(1, 1) primary key,
TenMH nvarchar(20) not null -- 'Toán 10', 'Ngữ văn 11', 'Tin học 12',...
);
create table HOCKY
(
MaHK int identity(1, 1) primary key,
TenHK nvarchar(20) not null -- 'Học kỳ 1 (2017-2018)',...
);
create table CHITIETDIEM
(
MaCTD int identity(1, 1) primary key,
Diem float not null, -- 8.5
MaLKT int not null,
MaHP int not null
);
create table LOAIKIEMTRA
(
MaLKT int identity(1, 1) primary key,
TenLKT nvarchar(10) not null -- 'Miệng', '5 phút', '15 phút', '1 tiết', 'Học kỳ',...
);
create table THAMSO
(
TenTS varchar(10) not null,
TS1 int not null,
TS2 int,
GhiChu nvarchar(30)
);
alter table LOP
add constraint FK_MaKhoi_LOP_KHOI
foreign key (MaKhoi) references KHOI(MaKhoi);
alter table HOCPHAN
add constraint FK_MaHS_HOCPHAN_HOCSINH
foreign key (MaHS) references HOCSINH(MaHS);
alter table HOCPHAN
add constraint FK_MaMH_HOCPHAN_MONHOC
foreign key (MaMH) references MONHOC(MaMH);
alter table HOCPHAN
add constraint FK_MaHK_HOCPHAN_HOCKY
foreign key (MaHK) references HOCKY(MaHK);
alter table CHITIETDIEM
add constraint FK_MaLKT_CHITIETDIEM_LOAIKIEMTRA
foreign key (MaLKT) references LOAIKIEMTRA(MaLKT);
alter table CHITIETDIEM
add constraint FK_MaHP_CHITIETDIEM_HOCPHAN
foreign key (MaHP) references HOCPHAN(MaHP);
--------------------------------------------------------------------
--Add data
SET DATEFORMAT dmy;
INSERT INTO HOCSINH (MaHS, Hoten, GioiTinh, NgaySinh, DiaChi, SoDT) VALUES
(1, N'<NAME>', 'Nam', '01-02-2011', N'Bình Định', '0988153183'),
(1, N'<NAME>', 'Nữ', '04-04-2010', N'Bình Định', '01692631290'),
(3, N'<NAME>', 'Nam', '04-07-2017', N'Gia lai', '0919183350'),
(4, N'Tuấn', 'Nam', '01-01-2010', N'Gia lai', '0913817931'),
(5, N'<NAME>', 'Nam', '04-06-2017', N'Việt Nam', '01689129331')
--delete from HOCSINH
--INSERT INTO HOCKY (MaHK, TenHK) VALUES
--('HK120172018', N'Học kỳ 1 Năm học 2017-2018'),
--('HK220172018', N'Học kỳ 2 Năm học 2017-2018')
CREATE PROCEDURE ThemHocSinh
--@MaHS int,
@HoTen nvarchar(50),
@GioiTinh nvarchar(3),
@NgaySinh smalldatetime,
@DiaChi nvarchar(100),
@SoDT varchar(25),
@MaLop int
AS
BEGIN
INSERT INTO HOCSINH (HoTen, GioiTinh, NgaySinh, DiaChi, SoDT, MaLop)
VALUES(@HoTen, @GioiTinh, @NgaySinh, @DiaChi, @SoDT, @MaLop);
UPDATE LOP
SET SiSo = SiSo + 1
WHERE MaLop = @MaLop
END
GO
CREATE PROCEDURE LayMaHocSinhMoi
@ID int OUTPUT
AS
BEGIN
SELECT @ID = MAX(MaHS) FROM HOCSINH
GO
CREATE PROCEDURE LayDuLieuKhoi
AS
BEGIN
SELECT * FROM KHOI
END
GO
CREATE PROCEDURE LayDuLieuLopTuKhoi
@MaKhoi int
AS
BEGIN
SELECT * FROM LOP WHERE MaKhoi = @MaKhoi
END
GO
CREATE PROCEDURE LayDuLieuLop
AS
BEGIN
SELECT * FROM LOP
END
GO
CREATE PROCEDURE KiemTraLopHopLe
@MaLop int
AS
BEGIN
SELECT * FROM LOP WHERE MaLop = @MaLop;
END
GO
CREATE PROCEDURE LayDuLieuMonHoc
AS
BEGIN
SELECT * FROM MONHOC
END
GO
CREATE PROCEDURE KiemTraMonHocHopLe
@MaMH int
AS
BEGIN
SELECT * FROM MONHOC WHERE MaMH = @MaMH;
END
GO
CREATE PROCEDURE LayDuLieuHocKy
AS
BEGIN
SELECT * FROM HOCKY
END
GO
CREATE PROCEDURE KiemTraHocKyHopLe
@MaHK int
AS
BEGIN
SELECT * FROM HOCKY WHERE MaHK = @MaHK;
END
GO
CREATE PROCEDURE LayQuyDinhTuoi
@TuoiMin int out,
@TuoiMax int out
AS
BEGIN
SELECT @TuoiMin = TS1, @TuoiMax = TS2
FROM THAMSO
WHERE TenTS = 'Tuoi'
END
GO
CREATE PROCEDURE LuuQuyDinhTuoi
@TuoiMin int,
@TuoiMax int
AS
BEGIN
UPDATE THAMSO
SET TS1 = @TuoiMin, TS2 = @TuoiMax
WHERE TenTS = 'Tuoi'
END
GO
CREATE PROCEDURE LayQuyDinhSiSoToiDa
@SiSoToiDa int out
AS
BEGIN
SELECT @SiSoToiDa = TS1 FROM THAMSO WHERE TenTS = 'SiSoToiDa'
END
GO
CREATE PROCEDURE LuuQuyDinhSiSoToiDa
@SiSoToiDa int
AS
BEGIN
UPDATE THAMSO
SET TS1 = @SiSoToiDa
WHERE TenTS = 'SiSoToiDa'
END
GO
CREATE PROCEDURE LayQuyDinhDiemDatMon
@DiemDatMon float out
AS
BEGIN
SELECT @DiemDatMon = TS1 FROM THAMSO WHERE TenTS = 'DiemDatMon'
END
GO
CREATE PROCEDURE LuuQuyDinhDiemDatMon
@DiemDatMon float
AS
BEGIN
UPDATE THAMSO
SET TS1 = @DiemDatMon
WHERE TenTS = 'DiemDatMon'
END
GO
CREATE PROCEDURE LayDuLieuMotLop
@MaLop int
AS
BEGIN
SELECT * FROM LOP WHERE MaLop = @MaLop
END
GO
CREATE PROCEDURE LayDuLieuMotMonHoc
@MaMH int
AS
BEGIN
SELECT * FROM MONHOC WHERE MaMH = @MaMH
END
GO
CREATE PROCEDURE SuaThongTinLop
@MaLop int,
@TenLop nvarchar(20),
@SiSo int,
@MaKhoi int
AS
BEGIN
UPDATE LOP
SET TenLop = @TenLop, SiSo = @SiSo, MaKhoi = @MaKhoi
WHERE MaLop = @MaLop
END
GO
CREATE PROCEDURE SuaThongTinMonHoc
@MaMH int,
@TenMH nvarchar(20)
AS
BEGIN
UPDATE MONHOC
SET TenMH = @TenMH
WHERE MaMH = @MaMH
END
GO
CREATE PROCEDURE LayDuLieuBaoCaoTongKetMon
@MaMH int,
@MaHK int
AS
BEGIN
SELECT L.MaLop, L.TenLop, SiSo, ISNULL(HPHS.SoLuongDat, 0) AS 'SoLuongDat', SoLuongDat * 1.0 / SiSo AS 'TiLe'
FROM LOP L
LEFT JOIN (SELECT MaLop, COUNT(DiemTB) AS 'SoLuongDat'--HS.MaHS, HS.MaLop, HP.MaHP, HP.DiemTB
FROM HOCSINH HS, HOCPHAN HP
WHERE HS.MaHS = HP.MaHS
AND HP.MaMH = '1' AND HP.MaHK = '1'
AND HP.DiemTB >= (SELECT TS1 FROM THAMSO WHERE TenTS = 'DiemDatMon')
GROUP BY MaLop) AS HPHS
ON L.MaLop = HPHS.MaLop
END
GO
CREATE PROCEDURE LayDuLieuBaoCaoTongKetHocKy
@MaHK int
AS
BEGIN
SELECT L.MaLop AS 'Mã lớp', L.TenLop AS 'Tên lớp', SiSo AS 'Sĩ số', ISNULL(HS.SoLuongDat, 0) AS 'Số lượng đạt', SoLuongDat * 1.0 / SiSo AS 'Tỉ lệ'
FROM LOP L
LEFT JOIN (SELECT HS.MaLop, COUNT(*) AS 'SoLuongDat'
FROM HOCSINH HS, (SELECT DISTINCT MaHS
FROM HOCPHAN HP
WHERE MaHK = @MaHK
AND MaHS NOT IN (SELECT MaHS
FROM HOCPHAN
WHERE MaHK = @MaHK
AND DiemTB < (SELECT TS1 FROM THAMSO
WHERE TenTS = 'DiemDatMon'))) AS HPHS
WHERE HS.MaHS = HPHS.MaHS
GROUP BY HS.MaLop) AS HS
ON L.MaLop = HS.MaLop
END
GO
-- Báo cáo tổng kết môn
SELECT L.MaLop AS 'Mã lớp', L.TenLop AS 'Tên lớp', SiSo AS 'Sĩ số', ISNULL(HPHS.SoLuongDat, 0) AS 'Số lượng đạt', SoLuongDat * 1.0 / SiSo AS 'Tỉ lệ'
FROM LOP L
LEFT JOIN (SELECT MaLop, COUNT(DiemTB) AS 'SoLuongDat'--HS.MaHS, HS.MaLop, HP.MaHP, HP.DiemTB
FROM HOCSINH HS, HOCPHAN HP
WHERE HS.MaHS = HP.MaHS
AND HP.MaMH = '1' AND HP.MaHK = '1'
AND HP.DiemTB >= (SELECT TS1 FROM THAMSO WHERE TenTS = 'DiemDatMon')
GROUP BY MaLop) AS HPHS
ON L.MaLop = HPHS.MaLop
-- Báo cáo tổng kết học kỳ
SELECT L.MaLop AS 'Mã lớp', L.TenLop AS 'Tên lớp', SiSo AS 'Sĩ số', ISNULL(HS.SoLuongDat, 0) AS 'Số lượng đạt', SoLuongDat * 1.0 / SiSo AS 'Tỉ lệ'
FROM LOP L
LEFT JOIN (SELECT HS.MaLop, COUNT(*) AS 'SoLuongDat'
FROM HOCSINH HS, (SELECT DISTINCT MaHS
FROM HOCPHAN HP
WHERE MaHK = '1'
AND MaHS NOT IN (SELECT MaHS
FROM HOCPHAN
WHERE MaHK = '1'
AND DiemTB < (SELECT TS1 FROM THAMSO
WHERE TenTS = 'DiemDatMon'))) AS HPHS
WHERE HS.MaHS = HPHS.MaHS
GROUP BY HS.MaLop) AS HS
ON L.MaLop = HS.MaLop
|
/*
Warnings:
- The primary key for the `LabTest` table will be changed. If it partially fails, the table could be left without primary key constraint.
- You are about to drop the column `labTestResultId` on the `LabTest` table. All the data in the column will be lost.
- The required column `id` was added to the `LabTest` table with a prisma-level default value. This is not possible if the table is not empty. Please add this column as optional, then populate it before making it required.
*/
-- DropForeignKey
ALTER TABLE "Stock" DROP CONSTRAINT "Stock_labTestId_fkey";
-- AlterTable
ALTER TABLE "LabTest" DROP CONSTRAINT "LabTest_pkey",
DROP COLUMN "labTestResultId",
ADD COLUMN "id" TEXT NOT NULL,
ADD PRIMARY KEY ("id");
-- AddForeignKey
ALTER TABLE "Stock" ADD FOREIGN KEY ("labTestId") REFERENCES "LabTest"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
<reponame>krb42/GRSWebServices<gh_stars>0
/*------------------------------------------------------------------------------------
Project/Ticket#: GRS
<Description> Create CRUD Routines for GRS_Attribute tables </Description>
<Version> 1.0.0 </version>
-------------------------------------------------------------------------------------*/
USE [$DatabaseName$]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF OBJECT_ID('pAttribute_GetALL') IS NULL
EXEC ('CREATE PROCEDURE DBO.pAttribute_GetALL AS SELECT 1')
GO
ALTER PROCEDURE dbo.pAttribute_GetALL
AS
BEGIN
SELECT att.AttributeID
, att.AttributeType
, att.AttributeName
, att.AttributeSetting
, att.ParentID
, att.Deleted
, att.VersionAutoID
, att.TSCreateDate
, att.TSCreateUser
, att.TSModifyDate
, att.TSModifyUser
FROM dbo.GRS_Attribute AS att;
END
GO
IF OBJECT_ID('pAttribute_GetAttributeID') IS NULL
EXEC ('CREATE PROCEDURE DBO.pAttribute_GetAttributeID AS SELECT 1')
GO
ALTER PROCEDURE dbo.pAttribute_GetAttributeID
(
@AttributeID int
)
AS
BEGIN
SELECT att.AttributeID
, att.AttributeType
, att.AttributeName
, att.AttributeSetting
, att.ParentID
, att.Deleted
, att.VersionAutoID
, att.TSCreateDate
, att.TSCreateUser
, att.TSModifyDate
, att.TSModifyUser
FROM dbo.GRS_Attribute AS att
WHERE att.AttributeID = @AttributeID;
END
GO
IF OBJECT_ID('pAttribute_Update') IS NULL
EXEC ('CREATE PROCEDURE DBO.pAttribute_Update AS SELECT 1')
GO
ALTER PROCEDURE dbo.pAttribute_Update
(
@AdminUserID int
, @AttributeID int
, @AttributeType [nvarchar](10)
, @AttributeName [nvarchar](50)
, @AttributeSetting [nvarchar](1000)
, @ParentID [int]
)
AS
BEGIN
DECLARE @VersionAutoID int
SELECT @VersionAutoID = MAX(att.VersionAutoID) FROM dbo.GRS_Attribute AS att
SET @VersionAutoID += 1
DECLARE @AdminUserName nvarchar(80) = NULL
SELECT @AdminUserName = u.UserName FROM dbo.GRS_User AS u WHERE u.UserID = @AdminUserID
UPDATE dbo.GRS_Attribute
SET AttributeType = @AttributeType
, AttributeName = @AttributeName
, AttributeSetting = @AttributeSetting
, ParentID = @ParentID
, VersionAutoID = @VersionAutoID
, TSModifyDate = GETDATE()
, TSModifyUser = @AdminUserName
WHERE AttributeID = @AttributeID;
END
GO
IF OBJECT_ID('pAttribute_Insert') IS NULL
EXEC ('CREATE PROCEDURE DBO.pAttribute_Insert AS SELECT 1')
GO
ALTER PROCEDURE dbo.pAttribute_Insert
(
@AdminUserID int
, @AttributeType [nvarchar](10)
, @AttributeName [nvarchar](50)
, @AttributeSetting [nvarchar](1000)
, @ParentID [int]
)
AS
BEGIN
DECLARE @VersionAutoID int;
SELECT @VersionAutoID = MAX(att.VersionAutoID) FROM dbo.GRS_Attribute AS att;
SET @VersionAutoID += 1;
DECLARE @AdminUserName nvarchar(80) = NULL;
SELECT @AdminUserName = u.UserName FROM dbo.GRS_User AS u WHERE u.UserID = @AdminUserID;
DECLARE @generated_keys table([Id] int);
INSERT INTO dbo.GRS_Attribute
(AttributeType, AttributeName, AttributeSetting, ParentID,
Deleted, VersionAutoID, TSCreateDate, TSCreateUser
)
OUTPUT inserted.AttributeID INTO @generated_keys
VALUES (@AttributeType, @AttributeName, @AttributeSetting, @ParentID,
0, @VersionAutoID, GETDATE(), @AdminUserName
);
IF EXISTS(SELECT * FROM @generated_keys)
BEGIN
SELECT Success = 1, Id FROM @generated_keys
END
ELSE
BEGIN
SELECT Success = 0, Id = -1
END
END
GO
IF OBJECT_ID('pAttribute_Delete') IS NULL
EXEC ('CREATE PROCEDURE DBO.pAttribute_Delete AS SELECT 1')
GO
ALTER PROCEDURE dbo.pAttribute_Delete
(
@AdminUserID int
, @AttributeID int
)
AS
BEGIN
DECLARE @VersionAutoID int;
SELECT @VersionAutoID = MAX(att.VersionAutoID) FROM dbo.GRS_Attribute AS att;
SET @VersionAutoID += 1;
DECLARE @AdminUserName nvarchar(80) = NULL;
SELECT @AdminUserName = u.UserName FROM dbo.GRS_User AS u WHERE u.UserID = @AdminUserID;
UPDATE dbo.GRS_Attribute
SET Deleted = 1
, VersionAutoID = @VersionAutoID
, TSModifyDate = GETDATE()
, TSModifyUser = @AdminUserName
WHERE AttributeID = @AttributeID;
END
GO
|
-- fix the error of gender. add commiter field.
ALTER TABLE `zt_user` CHANGE `gendar` `gender` ENUM( 'f', 'm' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'f' ;
ALTER TABLE `zt_user` ADD `commiter` VARCHAR( 100 ) NOT NULL AFTER `nickname` ;
-- fix the error of objectType.
UPDATE `zt_action` SET `objectType` = 'product' WHERE `objectType` = '`product`';
UPDATE `zt_action` SET `objectType` = 'productplan' WHERE `objectType` = '`productPlan`';
UPDATE `zt_action` SET `objectType` = 'project' WHERE `objectType` = '`project`';
UPDATE `zt_action` SET `objectType` = 'story' WHERE `objectType` = '`story`';
UPDATE `zt_action` SET `objectType` = 'task' WHERE `objectType` = '`task`';
UPDATE `zt_action` SET `objectType` = 'bug' WHERE `objectType` = '`bug`';
UPDATE `zt_action` SET `objectType` = 'case' WHERE `objectType` = '`case`';
UPDATE `zt_action` SET `objectType` = 'build' WHERE `objectType` = '`build`';
UPDATE `zt_action` SET `objectType` = 'release' WHERE `objectType` = '`release`';
UPDATE `zt_action` SET `objectType` = 'user' WHERE `objectType` = '`user`';
UPDATE `zt_action` SET `objectType` = 'doc' WHERE `objectType` = '`doc`';
UPDATE `zt_action` SET `objectType` = 'doclib' WHERE `objectType` = '`doclib`';
UPDATE `zt_action` SET `objectType` = 'testtask' WHERE `objectType` = '`testtask`';
UPDATE `zt_action` SET `objectType` = 'todo' WHERE `objectType` = '`todo`';
UPDATE `zt_bug` SET `os` = 'andriod' WHERE `os` = 'adriod';
-- add stories and bugs to release and build table.
ALTER TABLE `zt_release` ADD `stories` TEXT NOT NULL AFTER `date` ;
ALTER TABLE `zt_release` ADD `bugs` TEXT NOT NULL AFTER `stories` ;
ALTER TABLE `zt_build` ADD `stories` TEXT NOT NULL AFTER `date` ,
ADD `bugs` TEXT NOT NULL AFTER `stories` ;
|
/*
Warnings:
- You are about to drop the `_Label_posts_Post_labels` table. If the table is not empty, all the data it contains will be lost.
- You are about to drop the `_PollAnswer_answeredByUsers_User_pollAnswers` table. If the table is not empty, all the data it contains will be lost.
*/
-- DropForeignKey
ALTER TABLE "_Label_posts_Post_labels" DROP CONSTRAINT "_Label_posts_Post_labels_A_fkey";
-- DropForeignKey
ALTER TABLE "_Label_posts_Post_labels" DROP CONSTRAINT "_Label_posts_Post_labels_B_fkey";
-- DropForeignKey
ALTER TABLE "_PollAnswer_answeredByUsers_User_pollAnswers" DROP CONSTRAINT "_PollAnswer_answeredByUsers_User_pollAnswers_A_fkey";
-- DropForeignKey
ALTER TABLE "_PollAnswer_answeredByUsers_User_pollAnswers" DROP CONSTRAINT "_PollAnswer_answeredByUsers_User_pollAnswers_B_fkey";
-- DropTable
DROP TABLE "_Label_posts_Post_labels";
-- DropTable
DROP TABLE "_PollAnswer_answeredByUsers_User_pollAnswers";
-- CreateTable
CREATE TABLE "_Label_posts" (
"A" TEXT NOT NULL,
"B" TEXT NOT NULL
);
-- CreateTable
CREATE TABLE "_PollAnswer_answeredByUsers" (
"A" TEXT NOT NULL,
"B" TEXT NOT NULL
);
-- CreateIndex
CREATE UNIQUE INDEX "_Label_posts_AB_unique" ON "_Label_posts"("A", "B");
-- CreateIndex
CREATE INDEX "_Label_posts_B_index" ON "_Label_posts"("B");
-- CreateIndex
CREATE UNIQUE INDEX "_PollAnswer_answeredByUsers_AB_unique" ON "_PollAnswer_answeredByUsers"("A", "B");
-- CreateIndex
CREATE INDEX "_PollAnswer_answeredByUsers_B_index" ON "_PollAnswer_answeredByUsers"("B");
-- AddForeignKey
ALTER TABLE "_Label_posts" ADD FOREIGN KEY ("A") REFERENCES "Label"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "_Label_posts" ADD FOREIGN KEY ("B") REFERENCES "Post"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "_PollAnswer_answeredByUsers" ADD FOREIGN KEY ("A") REFERENCES "PollAnswer"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "_PollAnswer_answeredByUsers" ADD FOREIGN KEY ("B") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
ALTER TABLE [dbo].[StoredImage]
ADD CONSTRAINT [FK_StoredImage_MainType] FOREIGN KEY ([MainTypeID]) REFERENCES [dbo].[MainType] ([MainTypeID]) ON DELETE CASCADE ON UPDATE NO ACTION;
|
ALTER TABLE PMC_AWARD
ADD CONSTRAINT FK_PMC_AWARD_ID
FOREIGN KEY (PERSON_MASS_CHANGE_ID) REFERENCES PERSON_MASS_CHANGE (PERSON_MASS_CHANGE_ID)
/
|
<reponame>scossin/FeatureExtraction<filename>inst/sql/sql_server/DemographicsTime.sql
-- Feature construction
{@aggregated} ? {
IF OBJECT_ID('tempdb..#dem_time_data', 'U') IS NOT NULL
DROP TABLE #dem_time_data;
IF OBJECT_ID('tempdb..#dem_time_stats', 'U') IS NOT NULL
DROP TABLE #dem_time_stats;
IF OBJECT_ID('tempdb..#dem_time_prep', 'U') IS NOT NULL
DROP TABLE #dem_time_prep;
IF OBJECT_ID('tempdb..#dem_time_prep2', 'U') IS NOT NULL
DROP TABLE #dem_time_prep2;
SELECT subject_id,
cohort_definition_id,
cohort_start_date,
days
INTO #dem_time_data
} : {
SELECT CAST(1000 + @analysis_id AS BIGINT) AS covariate_id,
{@temporal} ? {
CAST(NULL AS INT) AS time_id,
}
row_id,
days AS covariate_value
INTO @covariate_table
}
FROM (
SELECT
{@aggregated} ? {
cohort_definition_id,
subject_id,
cohort_start_date,
} : {
cohort.@row_id_field AS row_id,
}
{@sub_type == 'priorObservation'} ? {
DATEDIFF(DAY, observation_period_start_date, cohort_start_date) AS days
}
{@sub_type == 'postObservation'} ? {
DATEDIFF(DAY, cohort_start_date, observation_period_end_date) AS days
}
{@sub_type == 'inCohort'} ? {
DATEDIFF(DAY, cohort_start_date, cohort_end_date) AS days
}
FROM @cohort_table cohort
{@sub_type != 'inCohort'} ? {
INNER JOIN @cdm_database_schema.observation_period
ON cohort.subject_id = observation_period.person_id
AND observation_period_start_date <= cohort_start_date
AND observation_period_end_date >= cohort_start_date
}
{@cohort_definition_id != -1} ? { WHERE cohort.cohort_definition_id IN (@cohort_definition_id)}
) raw_data;
{@aggregated} ? {
WITH t1 AS (
SELECT cohort_definition_id,
COUNT(*) AS cnt
FROM @cohort_table
{@cohort_definition_id != -1} ? { WHERE cohort_definition_id IN(@cohort_definition_id)}
GROUP BY cohort_definition_id
),
t2 AS (
SELECT cohort_definition_id,
COUNT(*) AS cnt,
MIN(days) AS min_days,
MAX(days) AS max_days,
SUM(CAST(days AS BIGINT)) AS sum_days,
SUM(CAST(days AS BIGINT) * CAST(days AS BIGINT)) AS squared_days
FROM #dem_time_data
GROUP BY cohort_definition_id
)
SELECT t1.cohort_definition_id,
CASE WHEN t2.cnt = t1.cnt THEN t2.min_days ELSE 0 END AS min_value,
t2.max_days AS max_value,
CAST(t2.sum_days / (1.0 * t1.cnt) AS FLOAT) AS average_value,
CAST(CASE WHEN t2.cnt = 1 THEN 0 ELSE SQRT((1.0 * t2.cnt*t2.squared_days - 1.0 * t2.sum_days*t2.sum_days) / (1.0 * t2.cnt*(1.0 * t2.cnt - 1))) END AS FLOAT) AS standard_deviation,
t2.cnt AS count_value,
t1.cnt - t2.cnt AS count_no_value,
t1.cnt AS population_size
INTO #dem_time_stats
FROM t1
INNER JOIN t2
ON t1.cohort_definition_id = t2.cohort_definition_id;
SELECT cohort_definition_id,
days,
COUNT(*) AS total,
ROW_NUMBER() OVER (PARTITION BY cohort_definition_id ORDER BY days) AS rn
INTO #dem_time_prep
FROM #dem_time_data
GROUP BY cohort_definition_id,
days;
SELECT s.cohort_definition_id,
s.days,
SUM(p.total) AS accumulated
INTO #dem_time_prep2
FROM #dem_time_prep s
INNER JOIN #dem_time_prep p
ON p.rn <= s.rn
AND p.cohort_definition_id = s.cohort_definition_id
GROUP BY s.cohort_definition_id,
s.days;
SELECT o.cohort_definition_id,
CAST(1000 + @analysis_id AS BIGINT) AS covariate_id,
{@temporal} ? {
CAST(NULL AS INT) AS time_id,
}
o.count_value,
o.min_value,
o.max_value,
CAST(o.average_value AS FLOAT) average_value,
CAST(o.standard_deviation AS FLOAT) standard_deviation,
CASE
WHEN .50 * o.population_size < count_no_value THEN 0
ELSE MIN(CASE WHEN p.accumulated + count_no_value >= .50 * o.population_size THEN days END)
END AS median_value,
CASE
WHEN .10 * o.population_size < count_no_value THEN 0
ELSE MIN(CASE WHEN p.accumulated + count_no_value >= .10 * o.population_size THEN days END)
END AS p10_value,
CASE
WHEN .25 * o.population_size < count_no_value THEN 0
ELSE MIN(CASE WHEN p.accumulated + count_no_value >= .25 * o.population_size THEN days END)
END AS p25_value,
CASE
WHEN .75 * o.population_size < count_no_value THEN 0
ELSE MIN(CASE WHEN p.accumulated + count_no_value >= .75 * o.population_size THEN days END)
END AS p75_value,
CASE
WHEN .90 * o.population_size < count_no_value THEN 0
ELSE MIN(CASE WHEN p.accumulated + count_no_value >= .90 * o.population_size THEN days END)
END AS p90_value
INTO @covariate_table
FROM #dem_time_prep2 p
INNER JOIN #dem_time_stats o
ON p.cohort_definition_id = o.cohort_definition_id
{@included_cov_table != ''} ? {WHERE 1000 + @analysis_id IN (SELECT id FROM @included_cov_table)}
GROUP BY o.count_value,
o.count_no_value,
o.min_value,
o.max_value,
o.average_value,
o.standard_deviation,
o.population_size,
o.cohort_definition_id;
TRUNCATE TABLE #dem_time_data;
DROP TABLE #dem_time_data;
TRUNCATE TABLE #dem_time_stats;
DROP TABLE #dem_time_stats;
TRUNCATE TABLE #dem_time_prep;
DROP TABLE #dem_time_prep;
TRUNCATE TABLE #dem_time_prep2;
DROP TABLE #dem_time_prep2;
}
-- Reference construction
INSERT INTO #cov_ref (
covariate_id,
covariate_name,
analysis_id,
concept_id
)
SELECT covariate_id,
{@sub_type == 'priorObservation'} ? {
CAST('observation time (days) prior to index' AS VARCHAR(512)) AS covariate_name,
}
{@sub_type == 'postObservation'} ? {
CAST('observation time (days) after index' AS VARCHAR(512)) AS covariate_name,
}
{@sub_type == 'inCohort'} ? {
CAST('time (days) between cohort start and end' AS VARCHAR(512)) AS covariate_name,
}
@analysis_id AS analysis_id,
0 AS concept_id
FROM (
SELECT DISTINCT covariate_id
FROM @covariate_table
) t1;
INSERT INTO #analysis_ref (
analysis_id,
analysis_name,
domain_id,
{!@temporal} ? {
start_day,
end_day,
}
is_binary,
missing_means_zero
)
SELECT @analysis_id AS analysis_id,
CAST('@analysis_name' AS VARCHAR(512)) AS analysis_name,
CAST('@domain_id' AS VARCHAR(20)) AS domain_id,
{!@temporal} ? {
CAST(NULL AS INT) AS start_day,
CAST(NULL AS INT) AS end_day,
}
CAST('N' AS VARCHAR(1)) AS is_binary,
CAST('Y' AS VARCHAR(1)) AS missing_means_zero;
|
<filename>mysk/beforeuserinsert.sql
if @group.group_id is null then
set @group.group_id = (select `group.group_id` from `user` where id = getuser());
end if;
|
GO
DECLARE @office_id integer = core.get_office_id_by_office_name('Default');
EXECUTE auth.create_app_menu_policy
'Admin',
@office_id,
'Frapid.Authorization',
'{*}';
EXECUTE auth.create_app_menu_policy
'Admin',
@office_id,
'Frapid.Account',
'{*}';
EXECUTE auth.create_app_menu_policy
'User',
@office_id,
'Frapid.Account',
'{Configuration Profile, Email Templates, Account Verification, Password Reset, Welcome Email, Welcome Email (3rd Party)}';
EXECUTE auth.create_app_menu_policy
'Admin',
@office_id,
'Frapid.Account',
'{*}';
EXECUTE auth.create_app_menu_policy
'Admin',
@office_id,
'Frapid.Authorization',
'{*}';
GO
|
<gh_stars>1-10
ALTER TABLE host DROP CONSTRAINT host_owner_eon_id_nn;
|
<reponame>maallen/mojito<filename>webapp/src/main/resources/db/migration/V2__Concurrent_Translation.sql
-- rename column, need to rename FK too
alter table translation_kit_text_unit change column tm_text_unit_variant_id imported_tm_text_unit_variant_id bigint;
alter table translation_kit_text_unit drop foreign key `FK__TRANSLATION_KIT_TEXT_UNIT__TM_TEXT_UNIT_VARIANT__ID`;
alter table translation_kit_text_unit add constraint FK__TRANSLATION_KIT_TEXT_UNIT__IMPORTED_TM_TEXT_UNIT_VARIANT__ID foreign key (imported_tm_text_unit_variant_id) references tm_text_unit_variant (id);
-- Add new column
alter table translation_kit_text_unit add column exported_tm_text_unit_variant_id bigint;
alter table translation_kit_text_unit add constraint FK__TRANSLATION_KIT_TEXT_UNIT__EXPORTED_TM_TEXT_UNIT_VARIANT__ID foreign key (exported_tm_text_unit_variant_id) references tm_text_unit_variant (id);
|
<filename>metastore/scripts/upgrade/mysql/005-HIVE-417.mysql.sql
SELECT '< HIVE-417 Implement Indexing in Hive >' AS ' ';
CREATE TABLE IF NOT EXISTS `IDXS` (
`INDEX_ID` bigint(20) NOT NULL,
`CREATE_TIME` int(11) NOT NULL,
`DEFERRED_REBUILD` bit(1) NOT NULL,
`INDEX_HANDLER_CLASS` varchar(256) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`INDEX_NAME` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`INDEX_TBL_ID` bigint(20) DEFAULT NULL,
`LAST_ACCESS_TIME` int(11) NOT NULL,
`ORIG_TBL_ID` bigint(20) DEFAULT NULL,
`SD_ID` bigint(20) DEFAULT NULL,
PRIMARY KEY (`INDEX_ID`),
UNIQUE KEY `UNIQUEINDEX` (`INDEX_NAME`,`ORIG_TBL_ID`),
KEY `IDXS_FK1` (`SD_ID`),
KEY `IDXS_FK2` (`INDEX_TBL_ID`),
KEY `IDXS_FK3` (`ORIG_TBL_ID`),
CONSTRAINT `IDXS_FK1` FOREIGN KEY (`SD_ID`) REFERENCES `SDS` (`SD_ID`),
CONSTRAINT `IDXS_FK2` FOREIGN KEY (`INDEX_TBL_ID`) REFERENCES `TBLS` (`TBL_ID`),
CONSTRAINT `IDXS_FK3` FOREIGN KEY (`ORIG_TBL_ID`) REFERENCES `TBLS` (`TBL_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `INDEX_PARAMS` (
`INDEX_ID` bigint(20) NOT NULL,
`PARAM_KEY` varchar(256) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`PARAM_VALUE` varchar(767) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
PRIMARY KEY (`INDEX_ID`,`PARAM_KEY`),
CONSTRAINT `INDEX_PARAMS_FK1` FOREIGN KEY (`INDEX_ID`) REFERENCES `IDXS` (`INDEX_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
<reponame>imajaydwivedi/ProblemTask---Troubleshooting-Slow-SQL-Server
$sqlLinkedServers = "select srvname from sys.sysservers s where CHARINDEX('.',srvname) <> 0"
$dbaDatabase = 'DBA_Admin';
$linkedServers = Invoke-DbaQuery -SqlInstance 172.31.25.106 -Query $sqlLinkedServers -SqlCredential $personalCredential | Select-Object -ExpandProperty srvname;
cls
$SpaceRequirement = @()
$sqlSpaceRequirement = @"
declare @_tbl_disk_drive table (drive varchar(1), mb_free bigint);
declare @host_name varchar(125);
declare @database_name varchar(125);
declare @object_name varchar(255);
declare @days_threshold tinyint = 60;
insert @_tbl_disk_drive (drive, mb_free)
exec xp_fixeddrives;
select @host_name = host_name from $dbaDatabase.dbo.instance_details;
set @object_name = (case when @@SERVICENAME = 'MSSQLSERVER' then 'SQLServer' else 'MSSQL$'+@@SERVICENAME end);
set @database_name = '$dbaDatabase'
;with t_size_start as (
select top 1 'InitialSize' as QueryData,
collection_time_utc = case when datediff(day,collection_time_utc,GETUTCDATE()) >= 365 then (select create_date from $dbaDatabase.sys.tables where name = 'performance_counters') else collection_time_utc end, value
from $dbaDatabase.dbo.performance_counters pc
where pc.host_name = @host_name
and pc.object = (@object_name+':Databases') and pc.counter in ('Data File(s) Size (KB)')
and pc.instance = @database_name
order by collection_time_utc asc
)
, t_size_latest as (
select top 1 'CurrentSize' as QueryData, *
from $dbaDatabase.dbo.performance_counters pc
where pc.host_name = @host_name
and pc.object = (@object_name+':Databases') and pc.counter in ('Data File(s) Size (KB)')
and pc.instance = @database_name
order by collection_time_utc desc
)
, t_disk_drive_size as (
select [server_ip] = CONNECTIONPROPERTY('local_net_address'),
server_name = SERVERPROPERTY('ServerName'),
drive = drive+':\',
mb_free, free_space_gb = convert(numeric(20,2),mb_free/1024.0)
from @_tbl_disk_drive d where d.drive in
(select [drive] = left(physical_name,1)
from sys.master_files mf
where mf.database_id = db_id('$dbaDatabase')
and mf.type_desc = 'ROWS')
)
select QueryData = 'Size-Estimate', [server_ip], server_name, drive, free_space_gb,
start__collection_time_utc = i.collection_time_utc
,[start__size_gb] = i.value/1024/1024
,[current__size_gb] = l.value/1024/1024
,[days-of-growth] = DATEDIFF(day,i.collection_time_utc, l.collection_time_utc)
,[size_gb-of-growth] = (l.value-i.value)/1024.0/1024.0
,[total_gb-in-threshold-Days] = (((l.value-i.value)/1024.0/1024.0)/(DATEDIFF(day,i.collection_time_utc, l.collection_time_utc)))*60
,[space_gb-2-add] = convert(numeric(20,2),(((l.value-i.value)/1024.0/1024.0)/(DATEDIFF(day,i.collection_time_utc, l.collection_time_utc)))*(@days_threshold-DATEDIFF(day,i.collection_time_utc, l.collection_time_utc)))
from t_size_latest l, t_size_start i, t_disk_drive_size;
"@
$failedServers = @()
foreach($srv in $linkedServers) {
try {
$SpaceRequirement += Invoke-DbaQuery -SqlInstance $srv -Query $sqlSpaceRequirement -SqlCredential $personalCredential -EnableException
}
catch {
$errMessage = $_;
"Failed for server [$srv] => `n'$($errMessage.Exception.Message)'" | Write-Host -ForegroundColor Red
$failedServers += $srv
}
}
$failedServers | ogv -Title "Failed Servers"
$SpaceRequirement | ogv -Title "Space of Servers"
$SpaceRequirement | Export-Excel -Path $env:USERPROFILE\disk-space-details.xlsx
|
<filename>ScriptsBD/s-15-fx-funcion1.sql
-- Companía: Scooters Anywhere
-- Project: Modelo Proyecto Final
-- Author: <NAME> y <NAME>
-- Fecha: 04 de Junio del 2020
/*
FUNCIÓN: CALCULAR CUÁNTO LE QUEDA DE GANANCIA A LA COMPAÑÍA EN UN MES DE DETERMINADO AÑO
DESPUÉS DE:
- SI ES MES 6 O 12 SE RECORTA EL 10% PARA PAGOS DE PERSONAL
- SI ES GOBIERTO DE 'LA 4T' SE COBRA MÁS IMPUESTOS
- POR CADA REPARACIÓN DE SCOOTER SE PAGAN 50 PESOS
- AL FINAL TODO SE LE RESTA A LAS GANACIAS BRUTAS QUE SE OBTUVIERON EN EL MES
- SE MANDA ESTE NÚMERO DE VUELTA.
*/
CREATE OR REPLACE FUNCTION FN_UTILIDAD(MES NUMBER, ANIO NUMBER,GOBIERNO VARCHAR2) RETURN NUMBER
IS
V_IVA NUMBER;
V_IMP_RENTA NUMBER;
V_GASTOS NUMBER;
V_GANANCIAS NUMBER:=0;
V_PERDIDAS NUMBER;
CURSOR CUR_GANACIAS(MES NUMBER,ANIO NUMBER) IS
SELECT FECHA_INICIO, PRECIO FROM SERVICIO
WHERE EXTRACT(MONTH FROM FECHA_INICIO) = MES AND
EXTRACT(YEAR FROM FECHA_INICIO) = ANIO
AND (TIPO_SERVICIO = 'V' OR TIPO_SERVICIO='R');
BEGIN
FOR R IN CUR_GANACIAS(MES,ANIO) LOOP
IF EXTRACT(MONTH FROM R.FECHA_INICIO) = 6 OR EXTRACT(MONTH FROM R.FECHA_INICIO) = 12 THEN
--GANANCIAS SE REDUCEN EN VACACIONES O FIN DE AÑO PARA PAGO DE EMPLEADOS
V_GANANCIAS := V_GANANCIAS + R.PRECIO*0.90;
END IF;
V_GANANCIAS := V_GANANCIAS + R.PRECIO;
END LOOP;
IF GOBIERNO = 'LA 4T' THEN
V_IMP_RENTA := V_GANANCIAS*0.5;
V_IVA := V_GANANCIAS*0.16;
ELSE
V_IMP_RENTA := V_GANANCIAS*0.2;
V_IVA := V_GANANCIAS*0.1;
END IF;
SELECT COUNT(*) INTO V_PERDIDAS FROM HIST_SCOOTER_STATUS
WHERE EXTRACT(MONTH FROM FECHA_STATUS) = MES
AND EXTRACT(YEAR FROM FECHA_STATUS) = ANIO
AND STATUS_ID = 5;
V_GANANCIAS := V_GANANCIAS - V_PERDIDAS*50 - V_IMP_RENTA - V_IVA;
RETURN V_GANANCIAS;
END;
/
|
source 2013.sql
source 2014.sql
source 2015.sql
source 2016.sql
source 2017.sql
source 2018.sql
source 2019.sql
source 2020.sql
source 2021.sql
source 2022.sql
source 2023.sql
source 2024.sql
source 2025.sql
source 2026.sql
source 2027.sql
source 2028.sql
source 2029.sql
source 2030.sql
source akas.sql
source events.sql
|
<filename>Portal/Binaries/Database/Procedures/MChapter_Get.create.sql
-- Procedure MChapter_Get
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE dbo.MChapter_Get
(
@ParentId int = -2,
@Id int = -1,
@LocaleId int = -2,
@Name nvarchar(500) = NULL
)
AS
SET NOCOUNT ON
SELECT Id, Name, ParentId, [Address], Mobile, Telephone, Email, ChapterType, Latitude, Longitude,
AccessType, CountryCode, ServiceSchedule, MoreInfo, DistrictNo, DivisionId, LastUpdate, LocaleId,
Extra
FROM MChapter
WHERE (@ParentId = -2 OR ParentId=@ParentId)
AND (@Id = -1 OR Id=@Id)
AND (@LocaleId = -2 OR LocaleId=@LocaleId)
AND (@Name IS NULL OR Name=@Name)
RETURN
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
|
-- run these codes if you want to start the database
-- create database
CREATE DATABASE foodfy;
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
-- create the tables
CREATE TABLE "chefs"(
"id" SERIAL PRIMARY KEY,
"name" TEXT NOT NULL,
"file_id" INT,
"created_at" TIMESTAMP DEFAULT(now())
);
CREATE TABLE "files"(
"id" SERIAL PRIMARY KEY,
"name" TEXT,
"path" TEXT NOT NULL
);
CREATE TABLE "recipe_files"(
"id" SERIAL PRIMARY KEY,
"recipe_id" INT NOT NULL,
"file_id" INT NOT NULL
);
CREATE TABLE "recipes"(
"id" SERIAL PRIMARY KEY,
"chef_id" INT NOT NULL,
"user_id" INT NOT NULL,
"title" TEXT NOT NULL,
"ingredients" TEXT[],
"preparation" TEXT[],
"information" TEXT,
"created_at" TIMESTAMP DEFAULT(now()),
"updated_at" TIMESTAMP DEFAULT(now())
);
CREATE TABLE "users"(
"id" SERIAL PRIMARY KEY,
"name" TEXT NOT NULL,
"email" TEXT UNIQUE NOT NULL,
"password" TEXT NOT NULL,
"is_admin" BOOLEAN DEFAULT false,
"reset_token" TEXT,
"reset_token_expires" TEXT,
"created_at" TIMESTAMP DEFAULT(now()),
"updated_at" TIMESTAMP DEFAULT(now())
);
ALTER TABLE "chefs" ADD FOREIGN KEY ("file_id") REFERENCES "files" ("id") ON DELETE CASCADE;
ALTER TABLE "recipe_files" ADD FOREIGN KEY ("file_id") REFERENCES "files" ("id") ON DELETE CASCADE;
ALTER TABLE "recipe_files" ADD FOREIGN KEY ("recipe_id") REFERENCES "recipes" ("id") ON DELETE CASCADE;
ALTER TABLE "recipes" ADD FOREIGN KEY ("chef_id") REFERENCES "chefs" ("id") ON DELETE CASCADE;
ALTER TABLE "recipes" ADD FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE;
-- create procedures
CREATE FUNCTION trigger_set_timestamp()
RETURNS TRIGGER AS $$
BEGIN
NEW.updated_at = NOW();
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
-- create triggers products and users
CREATE TRIGGER set_timestamp
BEFORE UPDATE ON "recipes"
FOR EACH ROW
EXECUTE PROCEDURE trigger_set_timestamp();
CREATE TRIGGER set_timestamp
BEFORE UPDATE ON "users"
FOR EACH ROW
EXECUTE PROCEDURE trigger_set_timestamp();
-- connection pg simple table
CREATE TABLE "session" (
"sid" varchar NOT NULL COLLATE "default",
"sess" json NOT NULL,
"expire" timestamp(6) NOT NULL
)
WITH (OIDS=FALSE);
ALTER TABLE "session" ADD CONSTRAINT "session_pkey" PRIMARY KEY ("sid") NOT DEFERRABLE INITIALLY IMMEDIATE;
CREATE INDEX "IDX_session_expire" ON "session" ("expire");
|
with I80_sample as (
select * from {{ ref('stg_I80_sample') }}
),
I80_stations as (
select * from {{ ref('stg_I80_stations') }}
)
select
I80_sample.*,
I80_stations.County,
I80_stations.City,
I80_stations.Latitude,
I80_stations.Longitude
from I80_sample
left join I80_stations
on I80_sample.station_id = I80_stations.ID
|
<reponame>jimmyleongth/DP-203-Data-Engineer
EXECUTE AS USER = 'asa.sql.highperf'
IF OBJECT_ID(N'[wwi_perf].[Sale_Hash_Projection_Big]', N'U') IS NOT NULL
DROP TABLE [wwi_perf].[Sale_Hash_Projection_Big]
CREATE TABLE [wwi_perf].[Sale_Hash_Projection_Big]
WITH
(
DISTRIBUTION = HASH ( [CustomerId] ),
HEAP
)
AS
SELECT
[CustomerId]
,CAST([ProductId] as bigint) as [ProductId]
,CAST([Quantity] as bigint) as [Quantity]
FROM
[wwi_perf].[Sale_Heap]
OPTION (LABEL = 'CTAS : Sale_Hash_Projection_Big')
|
<reponame>XuXianTao/LabRecord
drop database if exists `LabRecord`;
create database `LabRecord` character set utf8;
use `LabRecord`;
# day、name、type、group为MySQL保留关键字,字段中不应出现以避免冲突
# day → weekday
# name → nam
# type → typ
# group → grp
# 日期表 当前周数,星期几
create table the_date(
id int not null primary key,
week int not null default 1,
weekday int not null default 1,
start_date int,
update_statu boolean default false, # 学生登录
update_statu2 boolean default false # 故障提交
) engine=InnoDB;
insert into the_date(id,week,start_date) values (1,1,1);
# 映像表 IP与座位号一一对应
create table ip (
ip varchar(20) not null primary key, # ip地址
cla varchar(10) not null, # 课室号
num varchar(10) not null # 台号
) engine=InnoDB;
# 老师表
create table tea (
id int not null primary key, # 职工号
typ int not null, # 类型,二进制位判断
nam varchar(10) not null # 名字
) engine=InnoDB;
# 课程表
create table course (
id int not null primary key auto_increment,
# 课程id
nam varchar(30) not null, # 课程名称
cla varchar(10) not null, # 课室号
tea_id int not null, # 老师id
sch_time_start time not null, # 上课时间
sch_time_end time not null, # 下课时间
sch_year varchar(20), # 学年
sch_term int, # 学期
sch_day varchar(10), # 工作日
sch_week_start int, # 第几周开始上课
sch_week_end int, # 第几周结束上课
grp_mem_num int # 小组最多人数
) auto_increment=1 engine=InnoDB;
# 学生表
create table stu (
id int not null, # 学号
nam varchar(10) not null, # 名字
course_id int not null, # 课程id
primary key(id,course_id)
) engine=InnoDB;
# 助理表
create table ta (
id int not null primary key, # 学号
nam varchar(10) not null, # 姓名
sch_year varchar(20), # 学年
sch_term int, # 学期
sch_time varchar(30), # 具体时间-仅用作描述
duty_time int default 0, # 执勤时间
excp_suc int default 0, # 处理异常成功次数
excp_fail int default 0 # 失败次数
) engine=InnoDB;
# 组队表
create table grp (
id int not null primary key auto_increment,
# 小组id
course_id int not null, # 课程id
stu1_id int not null, # 组长id
stu2_id int default null, # 组员1 id
stu3_id int default null, # 组员2 id
stu4_id int default null # 组员3 id
) auto_increment=1 engine=InnoDB;
# 学生签到表
create table sign_stu (
id int not null, # 学号
course_id int not null, # 课程id
ip varchar(20), # 登录ip
week int not null, # 周数
stat varchar(10) default '未签到', # 签到情况
sign_in time, # 登入时间
sign_out time, # 登出时间
info varchar(20) default '' # 信息
) engine=InnoDB;
# 助理签到表
create table sign_ta (
id int not null, # 学号
sign_in datetime, # 签到/登入时间
sign_out datetime, # 登出时间
cla varchar(10), # 值班教室
week int not null, # 签到周数
weekday int not null, # 签到天数
duty_time int default 0, # 当天执勤时长
excp_suc int default 0, # 处理异常成功次数
excp_fail int default 0 # 失败次数
) engine=InnoDB;
# 故障提交表
create table excp_submit (
id int not null primary key auto_increment,
# 提交故障的编号
stu_id int not null, # 学号
cla varchar(10) not null, # 课室号
num varchar(10) not null, # 台号
cid int not null, # 课程号
week int not null, # 提交周数
submit_tim datetime not null, # 提交时间
del_tim datetime default null, # 处理时间
excp_desc text, # 故障描述
del_way text, # 处理方式
stat varchar(10) not null default '未处理'# 处理状态
) auto_increment=1 engine=InnoDB;
# 总体故障统计表,待定留用
# create table excp_cnt () engine=InnoDB;
# 设备表
create table dev (
id int not null primary key auto_increment,
sn varchar(30), # 序列号
sch_id varchar(10), # 校编号
typ varchar(10), # 类型, oscp示波器, dcpower直流电源, dmm万用电表, display显示器, pc主机, pm功率因数表, fsg函数发生器, box_ac交流电路箱, box_cir电路基础实验箱, box_mode模拟电路实验箱
cla varchar(10) not null, # 当前课室号
num varchar(10) not null, # 当前台号
model varchar(30), # 型号
cnt int not null default 0, # 故障次数
use_time int not null default 0, # 使用时长
stat int not null default 1, # 使用状态,1使用中,0未使用
excp_info mediumtext # 过往故障描述
) auto_increment=1 engine=InnoDB;
# 设备配件表
create table dev_detail (
dev_id int not null,
sn varchar(30), # 序列号
nam varchar(20), # 配件名
cnt int not null default 0 # 故障数
);
# 示波器表
-- create table dev_oscp (
-- id int not null primary key auto_increment,
-- # 登记用编号
-- sch_id varchar(10), # 校编号
-- sn varchar(30), # 序列号
-- cla varchar(10) not null, # 当前课室号
-- num varchar(10) not null, # 当前台号
-- model varchar(30) not null, # 型号
-- cnt int not null default 0, # 故障次数
-- use_time int not null default 0, # 使用时长
-- stat int not null default 1 # 使用状态,1使用中,0未使用
-- ) auto_increment=1 engine=InnoDB;
# 直流电源表
-- create table dev_dcpower (
-- id int not null primary key auto_increment,
-- # 登记用编号
-- sch_id varchar(10), # 校编号
-- sn varchar(30), # 序列号
-- cla varchar(10) not null, # 当前课室号
-- num varchar(10) not null, # 当前台号
-- model varchar(30) not null, # 型号
-- cnt int not null default 0, # 故障次数
-- use_time int not null default 0, # 使用时长
-- stat int not null default 1 # 使用状态,1使用中,0未使用
-- ) auto_increment=1 engine=InnoDB;
# 万用电表表
-- create table dev_dmm (
-- id int not null primary key auto_increment,
-- # 登记用编号
-- sch_id varchar(10), # 校编号
-- sn varchar(30), # 序列号
-- cla varchar(10) not null, # 当前课室号
-- num varchar(10) not null, # 当前台号
-- model varchar(30) not null, # 型号
-- cnt int not null default 0, # 故障次数
-- use_time int not null default 0, # 使用时长
-- stat int not null default 1 # 使用状态,1使用中,0未使用
-- ) auto_increment=1 engine=InnoDB;
# 显示器表
-- create table dev_display (
-- id int not null primary key auto_increment,
-- # 登记用编号
-- sch_id varchar(10), # 校编号
-- sn varchar(30), # 序列号
-- cla varchar(10) not null, # 当前课室号
-- num varchar(10) not null, # 当前台号
-- model varchar(30) not null, # 型号
-- cnt int not null default 0, # 故障次数
-- use_time int not null default 0, # 使用时长
-- stat int not null default 1 # 使用状态,1使用中,0未使用
-- ) auto_increment=1 engine=InnoDB;
# 主机表
-- create table dev_pc (
-- id int not null primary key auto_increment,
-- # 登记用编号
-- sch_id varchar(10), # 校编号
-- sn varchar(30), # 序列号
-- cla varchar(10) not null, # 当前课室号
-- num varchar(10) not null, # 当前台号
-- model varchar(30) not null, # 型号
-- cnt int not null default 0, # 故障次数
-- use_time int not null default 0, # 使用时长
-- stat int not null default 1 # 使用状态,1使用中,0未使用
-- ) auto_increment=1 engine=InnoDB;
# 功率因数表表
-- create table dev_pm (
-- id int not null primary key auto_increment,
-- # 登记用编号
-- sch_id varchar(10), # 校编号
-- sn varchar(30), # 序列号
-- cla varchar(10) not null, # 当前课室号
-- num varchar(10) not null, # 当前台号
-- model varchar(30) not null, # 型号
-- cnt int not null default 0, # 故障次数
-- use_time int not null default 0, # 使用时长
-- stat int not null default 1 # 使用状态,1使用中,0未使用
-- ) auto_increment=1 engine=InnoDB;
# 函数发生器表
-- create table dev_fsg (
-- id int not null primary key auto_increment,
-- # 登记用编号
-- sch_id varchar(10), # 校编号
-- sn varchar(30), # 序列号
-- cla varchar(10) not null, # 当前课室号
-- num varchar(10) not null, # 当前台号
-- model varchar(30) not null, # 型号
-- cnt int not null default 0, # 故障次数
-- use_time int not null default 0, # 使用时长
-- stat int not null default 1 # 使用状态,1使用中,0未使用
-- ) auto_increment=1 engine=InnoDB;
# 交流电路实验箱表
-- create table dev_box_ac (
-- id int not null primary key auto_increment,
-- # 登记用编号
-- sch_id varchar(10), # 校编号
-- sn varchar(30), # 序列号
-- cla varchar(10) not null, # 当前课室号
-- num varchar(10) not null, # 当前台号
-- model varchar(30) not null, # 型号
-- cnt int not null default 0, # 故障次数
-- use_time int not null default 0, # 使用时长
-- stat int not null default 1 # 使用状态,1使用中,0未使用
-- ) auto_increment=1 engine=InnoDB;
# 电路基础实验箱表
-- create table dev_box_cir (
-- id int not null primary key auto_increment,
-- # 登记用编号
-- sch_id varchar(10), # 校编号
-- sn varchar(30), # 序列号
-- cla varchar(10) not null, # 当前课室号
-- num varchar(10) not null, # 当前台号
-- model varchar(30) not null, # 型号
-- cnt int not null default 0, # 故障次数
-- use_time int not null default 0, # 使用时长
-- stat int not null default 1 # 使用状态,1使用中,0未使用
-- ) auto_increment=1 engine=InnoDB;
# 模拟电路实验箱表
-- create table dev_box_mode (
-- id int not null primary key auto_increment,
-- # 登记用编号
-- sch_id varchar(10), # 校编号
-- sn varchar(30), # 序列号
-- cla varchar(10) not null, # 当前课室号
-- num varchar(10) not null, # 当前台号
-- model varchar(30) not null, # 型号
-- cnt int not null default 0, # 故障次数
-- use_time int not null default 0, # 使用时长
-- stat int not null default 1 # 使用状态,1使用中,0未使用
-- ) auto_increment=1 engine=InnoDB;
# 配线表,需要进行默认导入
create table excp_static (
lid int not null, # 配线ID
typ varchar(80) not null, # 配线种类
machine varchar(80) not null, # 配套仪器
color varchar(80) not null, # 颜色
num int # 数量
) engine=InnoDB;
# 问卷or小测
create table que (
qid int not null primary key auto_increment,
# 问卷ID
tea_id int not null, # 老师id
amount int not null, # 问题个数
title varchar(80) not null # 问卷标题
) auto_increment=1 engine=InnoDB;
# 问题
create table que_q (
qid int not null, # 问卷id
num int not null, # 第几个问题
queid varchar(80) not null primary key, # id_num
que varchar(80) not null, # 问题
typ varchar(80) not null # 问卷or小测
) engine=InnoDB;
# 答案
create table que_a (
queid varchar(80) not null, # 问题id
num int not null, # 第几个答案
aid varchar(80) not null primary key, # queid_num
ans varchar(80) not null, # 回答内容
correct boolean default false # 是否正确答案
) engine=InnoDB;
# 已经发布的问卷
create table que_pub (
qid int not null, # 问卷原型id
sch_year varchar(80), # 学年
sch_term int, # 学期
sch_day int, # 工作日
sch_tim varchar(80) # 工作时段
) engine=InnoDB;
# 小测or问卷答案统计
create table que_a_sta (
queid varchar(80) not null, # 问题id
aid varchar(80) not null, # 答案id
count int not null, # 多少人填
ratio float # 占比例
) engine=InnoDB;
# 留言表
create table msg (
src_id int not null, # 源id
dst_id int not null, # 宿id
msg varchar(80) not null, # 留言内容
tim_send datetime, # 发送时间
tim_read datetime, # 阅读时间
stat varchar(10) default '未读' # 阅读状态
) engine=InnoDB;
alter table course add foreign key fk_course_tea(tea_id) references tea(id);
alter table stu add foreign key fk_stu_course(course_id) references course(id);
alter table grp add foreign key fk_grp_course(course_id) references course(id);
alter table sign_stu add foreign key fk_sign_stu_stu(id,course_id) references stu(id,course_id);
alter table sign_stu add foreign key fk_sign_stu_ip(ip) references ip(ip);
alter table sign_ta add foreign key fk_sign_ta_ta(id) references ta(id);
alter table dev_detail add foreign key fk_dev_detail_dev(dev_id) references dev(id);
|
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1141882286199832578', 'employees', '0', '[0],', '员工管理', '', '/employees', '99', '1', '1', NULL, '1', '0');
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1141882286199832579', 'employees_list', 'employees', '[0],[employees],', '员工管理列表', '', '/employees/list', '99', '2', '0', NULL, '1', '0');
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1141882286199832580', 'employees_add', 'employees', '[0],[employees],', '员工管理添加', '', '/employees/add', '99', '2', '0', NULL, '1', '0');
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1141882286199832581', 'employees_update', 'employees', '[0],[employees],', '员工管理更新', '', '/employees/update', '99', '2', '0', NULL, '1', '0');
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1141882286199832582', 'employees_delete', 'employees', '[0],[employees],', '员工管理删除', '', '/employees/delete', '99', '2', '0', NULL, '1', '0');
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1141882286199832583', 'employees_detail', 'employees', '[0],[employees],', '员工管理详情', '', '/employees/detail', '99', '2', '0', NULL, '1', '0');
|
<gh_stars>1-10
USE `ccdaa`;
DROP procedure IF EXISTS `reportFormsAndSectionsByProjectsId`;
DELIMITER $$
USE `ccdaa`$$
CREATE DEFINER=`ccdaa`@`localhost` PROCEDURE `reportFormsAndSectionsByProjectsId`(IN `deleted_at` text, IN `languages_id` bigint, IN `object_id` bigint)
BEGIN
SELECT
pt.title as form_title,
pt_child.title as section_title
FROM
forms AS object
JOIN
preferences_text AS pt ON object.id = pt.forms_id
join
sections as child ON object.id = child.forms_id
Join
preferences_text AS pt_child ON child.id = pt_child.sections_id
WHERE
object.projects_id = object_id
AND pt.languages_id = languages_id
AND pt_child.languages_id = languages_id
AND object.deleted_at = deleted_at
ORDER BY object.sort_order, child.sort_order ASC;
END$$
DELIMITER ;
|
<gh_stars>0
spool cr_ts_temp.log
set time on
set timing on
CREATE temporary TABLESPACE temp tempfile
'/u07/oradata/cdi_10/temp_d01.dbf' size 1024M reuse,
'/u02/oradata/cdi_10/temp_d06.dbf' size 1024M reuse,
'/u06/oradata/cdi_10/temp_d02.dbf' size 1024M reuse,
'/u03/oradata/cdi_10/temp_d05.dbf' size 1024M reuse,
'/u05/oradata/cdi_10/temp_d03.dbf' size 1024M reuse,
'/u04/oradata/cdi_10/temp_d04.dbf' size 1024M reuse
extent management local uniform size 1M
;
spool off
exit
|
CREATE TABLE `{table}` (
`id` integer unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
`scope` varchar(128) NOT NULL,
`user` integer unsigned NULL,
`name` varchar(128) NOT NULL,
`filters` text NOT NULL,
INDEX sun (`scope`,`user`,`name`)
);
|
<filename>test/resources/select_param.sql
SELECT 1
FROM TABLE
WHERE
FIELD1 = :Param1
AND FIELD2 = :Param2
AND FIELD3 = :Param1a
|
<filename>tokobaju.sql
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 01 Jul 2021 pada 17.57
-- Versi server: 10.4.19-MariaDB
-- Versi PHP: 7.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `tokobaju`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `barangs`
--
CREATE TABLE `barangs` (
`id` bigint(20) UNSIGNED NOT NULL,
`nama_barang` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`gambar` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`harga` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`stok` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`keterangan` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data untuk tabel `barangs`
--
INSERT INTO `barangs` (`id`, `nama_barang`, `gambar`, `harga`, `stok`, `keterangan`, `created_at`, `updated_at`) VALUES
(1, 'Crewneck', 'crewneck.jpeg', '235000', '2', 'Ukuran 2.10 x 1.10', '2021-06-22 17:00:00', '2021-06-23 04:59:27'),
(2, 'Jacket Denim', 'denim.jpeg', '300000', '10', 'Ukuran 2.10 x 1.10', '2021-06-22 17:00:00', '2021-06-22 17:00:00'),
(3, 'Jacket Black Hoodie', 'hoodie.jpeg', '275000', '8', 'Ukuran 2.10 x 1.10', '2021-06-22 17:00:00', '2021-06-22 17:00:00'),
(4, 'Kaos Keren', 'kaos.jpeg', '125000', '12', 'Ukuran 2.10 x 1.10', '2021-06-22 17:00:00', '2021-06-23 04:59:27'),
(5, 'Jacket White', 'white.jpeg', '150000', '3', 'Ukuran 2.10 x 1.10', '2021-06-22 17:00:00', '2021-06-23 04:59:27');
-- --------------------------------------------------------
--
-- Struktur dari tabel `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 untuk tabel `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, '2021_06_19_021928_create_barangs_table', 1),
(5, '2021_06_19_022319_create_pesanandetails_table', 1),
(7, '2021_06_19_022157_create_pesanans_table', 2);
-- --------------------------------------------------------
--
-- Struktur dari tabel `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;
-- --------------------------------------------------------
--
-- Struktur dari tabel `pesanandetails`
--
CREATE TABLE `pesanandetails` (
`id` bigint(20) UNSIGNED NOT NULL,
`barang_id` int(11) NOT NULL,
`pesanan_id` int(11) NOT NULL,
`jumlah` int(11) NOT NULL,
`jumlah_harga` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data untuk tabel `pesanandetails`
--
INSERT INTO `pesanandetails` (`id`, `barang_id`, `pesanan_id`, `jumlah`, `jumlah_harga`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, 55000, '2021-06-21 22:16:00', '2021-06-21 22:16:00'),
(2, 1, 2, 4, 220000, '2021-06-23 04:59:20', '2021-06-23 04:59:20'),
(3, 2, 3, 1, 60000, '2021-06-25 04:56:38', '2021-06-25 04:56:38'),
(5, 2, 5, 2, 600000, '2021-07-01 08:42:27', '2021-07-01 08:42:27');
-- --------------------------------------------------------
--
-- Struktur dari tabel `pesanans`
--
CREATE TABLE `pesanans` (
`id` bigint(20) UNSIGNED NOT NULL,
`user_id` int(11) NOT NULL,
`tanggal` date NOT NULL,
`status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`kode` int(11) NOT NULL,
`jumlah_harga` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data untuk tabel `pesanans`
--
INSERT INTO `pesanans` (`id`, `user_id`, `tanggal`, `status`, `kode`, `jumlah_harga`, `created_at`, `updated_at`) VALUES
(1, 2, '2021-06-22', '1', 831, 55000, '2021-06-21 22:16:00', '2021-06-21 22:32:36'),
(2, 2, '2021-06-22', '1', 769, 220000, '2021-06-21 22:34:02', '2021-06-23 04:59:27'),
(3, 3, '2021-06-25', '0', 427, 60000, '2021-06-25 04:56:38', '2021-06-25 04:56:38'),
(4, 5, '2021-07-01', '0', 634, 0, '2021-07-01 07:10:32', '2021-07-01 07:39:22'),
(5, 6, '2021-07-01', '0', 904, 600000, '2021-07-01 08:42:27', '2021-07-01 08:42:27');
-- --------------------------------------------------------
--
-- Struktur dari tabel `users`
--
CREATE TABLE `users` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`alamat` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`nohp` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data untuk tabel `users`
--
INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `alamat`, `nohp`, `remember_token`, `created_at`, `updated_at`) VALUES
(5, 'uka', '<EMAIL>', NULL, '$2y$10$aFUruPjF0I2RbjGalQGPCOZ6ufNrzP1hVJ0WMGDm0l34R5mbS9gLm', NULL, NULL, NULL, '2021-07-01 07:10:08', '2021-07-01 07:10:08'),
(6, 'dimas', '<EMAIL>', NULL, '$2y$10$oDh5E8TcOlVt98JAiwrU8.oVidluO.DlRMHmJZ3jAT7BPvVyzTGCO', NULL, NULL, NULL, '2021-07-01 08:41:40', '2021-07-01 08:41:40'),
(7, 'ukadimas', '<EMAIL>', NULL, '$2y$10$kiiz5QEuCMdX1rU7uGIGneQ9jNrWtwA.6G3lCINmkL9RYjqik0The', NULL, NULL, NULL, '2021-07-01 08:54:02', '2021-07-01 08:54:02');
--
-- Indexes for dumped tables
--
--
-- Indeks untuk tabel `barangs`
--
ALTER TABLE `barangs`
ADD PRIMARY KEY (`id`);
--
-- 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 `pesanandetails`
--
ALTER TABLE `pesanandetails`
ADD PRIMARY KEY (`id`);
--
-- Indeks untuk tabel `pesanans`
--
ALTER TABLE `pesanans`
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 `barangs`
--
ALTER TABLE `barangs`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT untuk tabel `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT untuk tabel `pesanandetails`
--
ALTER TABLE `pesanandetails`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT untuk tabel `pesanans`
--
ALTER TABLE `pesanans`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT untuk tabel `users`
--
ALTER TABLE `users`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
<gh_stars>0
CREATE KEYSPACE IF NOT EXISTS voc_test_keyspace
WITH REPLICATION = {
'class': 'SimpleStrategy',
'replication_factor': 1
};
USE voc_test_keyspace;
CREATE TABLE claim_by_company (
company_name text,
claim_id uuid,
claiminfo text,
PRIMARY KEY (claim_id)
);
CREATE INDEX on claim_by_company(company_name);
-- Sample Data 10 Cars
INSERT INTO claim_by_company (company_name, claim_id, claiminfo)
VALUES ('BMW', 8557f426-1cc9-41bf-a581-fadb101cd289, 'BMW 335D');
|
INSERT IGNORE INTO detailCount (date, province_name, current_confirmed_count, confirmed_count, dead_count, cured_count) VALUES
('2022-05-31', '台湾', 2016986, 2032983, 2255, 13742),
('2022-05-31', '香港', 260757, 332335, 9378, 62200),
('2022-05-31', '上海市', 732, 63003, 595, 61676),
('2022-05-31', '北京市', 472, 3368, 9, 2887),
('2022-05-31', '四川省', 207, 2332, 3, 2122),
('2022-05-31', '天津市', 114, 1975, 3, 1858),
('2022-05-31', '福建省', 94, 3258, 1, 3163),
('2022-05-31', '河南省', 83, 3180, 22, 3075),
('2022-05-31', '吉林省', 59, 40293, 5, 40229),
('2022-05-31', '广东省', 43, 7301, 8, 7250),
('2022-05-31', '浙江省', 23, 3137, 1, 3113),
('2022-05-31', '云南省', 16, 2148, 2, 2130),
('2022-05-31', '广西壮族自治区', 15, 1632, 2, 1615),
('2022-05-31', '江苏省', 14, 2235, 0, 2221),
('2022-05-31', '陕西省', 5, 3283, 3, 3275),
('2022-05-31', '重庆市', 3, 711, 6, 702),
('2022-05-31', '山东省', 2, 2735, 7, 2726),
('2022-05-31', '辽宁省', 2, 1675, 2, 1671),
('2022-05-31', '湖北省', 1, 68399, 4512, 63886),
('2022-05-31', '黑龙江省', 1, 2984, 13, 2970),
('2022-05-31', '湖南省', 1, 1393, 4, 1388),
('2022-05-31', '青海省', 1, 147, 0, 146),
('2022-05-31', '澳门', 1, 83, 0, 82),
('2022-05-31', '河北省', 0, 2004, 7, 1997),
('2022-05-31', '内蒙古自治区', 0, 1753, 1, 1752),
('2022-05-31', '江西省', 0, 1383, 1, 1382),
('2022-05-31', '安徽省', 0, 1065, 6, 1059),
('2022-05-31', '新疆维吾尔自治区', 0, 1008, 3, 1005),
('2022-05-31', '甘肃省', 0, 681, 2, 679),
('2022-05-31', '山西省', 0, 420, 0, 420),
('2022-05-31', '海南省', 0, 288, 6, 282),
('2022-05-31', '贵州省', 0, 185, 2, 183),
('2022-05-31', '宁夏回族自治区', 0, 122, 0, 122),
('2022-05-31', '西藏自治区', 0, 1, 0, 1);
|
CREATE TABLE [dbo].[MOV_M_UserRating] (
[ID] INT IDENTITY (1, 1) NOT NULL,
[UserID] INT NOT NULL,
[MovieID] INT NOT NULL,
[Watched] BIT NOT NULL,
[Rating] INT NULL,
CONSTRAINT [PK_Ratings] PRIMARY KEY CLUSTERED ([ID] ASC),
CONSTRAINT [FK_Ratings_Movies] FOREIGN KEY ([MovieID]) REFERENCES [dbo].[MOV_M_Movie] ([ID]),
CONSTRAINT [FK_Ratings_Users] FOREIGN KEY ([UserID]) REFERENCES [dbo].[User] ([ID]),
CONSTRAINT [IX_Ratings] UNIQUE NONCLUSTERED ([UserID] ASC, [MovieID] ASC)
);
|
<filename>AuctionDB/dbo/Tables/Bids.sql
CREATE TABLE [dbo].[Bids]
(
[BidID] INT NOT NULL PRIMARY KEY IDENTITY(1,1),
[cID] INT NOT NULL,
[ProductID] INT NOT NULL,
[AuctionID] INT NOT NULL,
[BidAmount] INT NOT NULL,
[BidTime] VARCHAR(50) NOT NULL
)
|
CREATE USER test WITH PASSWORD '<PASSWORD>';
GRANT ALL PRIVILEGES ON DATABASE object_store_test TO test;
|
-- CreateTable
CREATE TABLE `User` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`email` VARCHAR(191) NOT NULL,
`name` VARCHAR(191) NOT NULL,
`username` VARCHAR(191) NOT NULL,
`roleId` INTEGER NOT NULL,
UNIQUE INDEX `User_email_key`(`email`),
UNIQUE INDEX `User_username_key`(`username`),
PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- CreateTable
CREATE TABLE `Role` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`name` VARCHAR(191) NOT NULL,
PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- AddForeignKey
ALTER TABLE `User` ADD CONSTRAINT `User_roleId_fkey` FOREIGN KEY (`roleId`) REFERENCES `Role`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
CREATE TABLE `nodes` (
`uuid` char(36) NOT NULL,
`hostname` varchar(100) NOT NULL,
`ipv4address` varchar(15) NOT NULL,
`macaddress` varchar(12) NOT NULL,
`os_name` varchar(100) NOT NULL,
`os_step` tinyint(4) NOT NULL,
`init_data` blob NOT NULL,
`node_type` varchar(100) NOT NULL,
`oob_type` varchar(100) NOT NULL,
`heartbeat` int(11) NOT NULL,
PRIMARY KEY (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `nodes_discovered` (
`uuid` char(36) NOT NULL,
`ipv4address` varchar(15) NOT NULL,
`macaddress` varchar(12) NOT NULL,
`surpressed` tinyint(4) NOT NULL DEFAULT '0',
`enrolled` tinyint(4) NOT NULL DEFAULT '0',
`checkincount` int(11) NOT NULL DEFAULT '0',
`heartbeat` int(11) DEFAULT NULL,
PRIMARY KEY (`uuid`,`ipv4address`,`macaddress`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `os` (
`os_name` varchar(100) NOT NULL,
`os_step` tinyint(4) NOT NULL,
`boot_mode` varchar(100) NOT NULL,
`boot_kernel` varchar(255) DEFAULT NULL,
`boot_initrd` varchar(255) DEFAULT NULL,
`boot_options` varchar(255) DEFAULT NULL,
`next_step` tinyint(4) NOT NULL DEFAULT '0',
`init_data` blob,
PRIMARY KEY (`os_name`,`os_step`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
SET DEFINE OFF;
create or replace package body afw_25_publc_noyau_pkg
is
function obten_travl_courn (pbo_imedt in boolean default true
,pnu_type_travl in number default null
,pbo_mesgr in boolean default false
,pnu_domn in number default afw_12_domn_pkg.obten_domn_sesn
,pnu_utils in number default afw_12_utils_pkg.obten_usagr_conct)
return number
is
vnu_stat_initl number (10)
default afw_12_stat_pkg.obten_stat_initl_struc_aplic ('TRAVL'
,'AFW');
vnu_travl number (10);
vva_imedt varchar2 (1);
vnu_type_travl number (10);
begin
if not pbo_mesgr
then
if pbo_imedt
then
vva_imedt := 'O';
else
vva_imedt := 'N';
end if;
if pnu_type_travl is null
then
select seqnc
into vnu_type_travl
from vd_afw_25_type_travl
where seqnc = afw_12_domn_pkg.obten_type_travl_deft (pnu_domn);
else
vnu_type_travl := pnu_type_travl;
end if;
select min (seqnc)
into vnu_travl
from vd_i_afw_25_travl t
where t.ref_stat = vnu_stat_initl
and ref_utils = pnu_utils
and indic_imedt = vva_imedt
and ref_type_travl = vnu_type_travl;
end if;
return vnu_travl;
exception
when others
then
raise;
end obten_travl_courn;
function initl_travl (pva_nom_fichr_sort in varchar2
,pva_indic_imedt in varchar2
,pnu_type_travl in number default null
,pbo_mesgr in boolean default false
,pnu_domn in number default afw_12_domn_pkg.obten_domn_sesn
,pnu_utils in number default afw_12_utils_pkg.obten_usagr_conct)
return number
is
vnu_travl_courn number (10)
default obten_travl_courn (pva_indic_imedt = 'O'
,pnu_type_travl
,pbo_mesgr
,pnu_domn => pnu_domn
,pnu_utils => pnu_utils);
begin
if vnu_travl_courn is null
then
insert into vd_i_afw_25_travl (ref_utils
,indic_imedt
,nom
,ref_domn
,ref_type_travl)
values (pnu_utils
,pva_indic_imedt
,pva_nom_fichr_sort
,pnu_domn
,pnu_type_travl)
returning seqnc
into vnu_travl_courn;
end if;
return vnu_travl_courn;
exception
when others
then
raise;
end initl_travl;
function ajout_publc_travl (pva_nom_fichr_sort in varchar2
,pva_code_type_publc in varchar2
,pnu_travl in number
,pva_code_publc in varchar2 default null
,pnu_domn in number default afw_12_domn_pkg.obten_domn_sesn)
return number
is
vnu_type_publc number (10);
vnu_publc number (10);
vnu_publc_travl number (10);
vnu_versn_publc number (10);
begin
select seqnc
into vnu_type_publc
from vd_i_afw_25_type_publc tp
where tp.code = pva_code_type_publc
and tp.ref_prodt = afw_11_prodt_pkg.obten_prodt_sesn;
if pva_code_publc is not null
then
--Si on a un code de publication, prendre cette publication
select seqnc
into vnu_publc
from vd_i_afw_25_publc
where code = pva_code_publc
and ref_type_publc = vnu_type_publc;
else
--Prendre la publication par defaut pour le domaine
select ref_publc
into vnu_publc
from vd_i_afw_25_domn_type_publc
where ref_domn = pnu_domn
and ref_type_publc = vnu_type_publc;
end if;
declare
vva_nom_publc varchar2 (60);
begin
select seqnc
into vnu_versn_publc
from vd_i_afw_25_versn_publc
where (select sysdate
from dual) between date_debut_efect
and nvl (date_fin_efect
, (select sysdate + 10
from dual))
and ref_publc = vnu_publc;
exception
when no_data_found
then
if (vnu_publc is not null)
then
select nom
into vva_nom_publc
from vd_afw_25_publc
where seqnc = vnu_publc;
else
vva_nom_publc := 'ce rapport';
end if;
afw_01_err_apex_pkg.lever_err_apex_code ('RAP.000005'
,vva_nom_publc
,pva_code_prodt => 'SEM');
end;
insert into vd_i_afw_25_publc_travl pt (nom
,ref_versn_publc
,ref_travl)
values (pva_nom_fichr_sort
,vnu_versn_publc
,pnu_travl)
returning seqnc
into vnu_publc_travl;
return vnu_publc_travl;
end ajout_publc_travl;
procedure ajout_publc_travl (pva_nom_fichr_sort in varchar2
,pva_code_type_publc in varchar2
,pnu_travl in number
,pva_code_publc in varchar2 default null
,pnu_domn in number default afw_12_domn_pkg.obten_domn_sesn)
is
vnu_publc_travl number (10);
begin
vnu_publc_travl :=
ajout_publc_travl (pva_nom_fichr_sort
,pva_code_type_publc
,pnu_travl
,pva_code_publc);
end ajout_publc_travl;
function obten_type_publc (pnu_publc_travl in number)
return number
is
vnu_type_publc number (10);
begin
select p.ref_type_publc
into vnu_type_publc
from vd_i_afw_25_publc_travl pt
,vd_i_afw_25_publc p
,vd_i_afw_25_versn_publc vp
where vp.seqnc = pt.ref_versn_publc
and vp.ref_publc = p.seqnc
and pt.seqnc = pnu_publc_travl;
return vnu_type_publc;
end obten_type_publc;
procedure ajout_parmt (pva_code_parmt in varchar2
,pva_valr_varch in varchar2
,pnu_valr_numbr in number
,pda_valr_date date
,pnu_publc_travl in number)
is
vnu_seqnc_parmt number (10);
vnu_type_publc number (10);
begin
vnu_type_publc := obten_type_publc (pnu_publc_travl);
select seqnc
into vnu_seqnc_parmt
from vd_i_afw_25_parmt_type_publc
where ref_type_publc = vnu_type_publc
and upper (code) = upper (pva_code_parmt);
insert into vd_i_afw_25_parmt_publc_travl (ref_publc_travl
,ref_parmt_type_publc
,valr_varch
,valr_date
,valr_numbr)
values (pnu_publc_travl
,vnu_seqnc_parmt
,pva_valr_varch
,pda_valr_date
,pnu_valr_numbr);
end ajout_parmt;
function ajout_parmt (pva_code_parmt in varchar2
,pva_valr_varch in varchar2
,pnu_valr_numbr in number
,pda_valr_date date
,pnu_publc_travl in number)
return number
is
vnu_seqnc_parmt number (10);
vnu_type_publc number (10);
vnu_seqnc number (10);
begin
vnu_type_publc := obten_type_publc (pnu_publc_travl);
select seqnc
into vnu_seqnc_parmt
from vd_i_afw_25_parmt_type_publc
where ref_type_publc = vnu_type_publc
and upper (code) = upper (pva_code_parmt);
insert into vd_i_afw_25_parmt_publc_travl (ref_publc_travl
,ref_parmt_type_publc
,valr_varch
,valr_date
,valr_numbr)
values (pnu_publc_travl
,vnu_seqnc_parmt
,pva_valr_varch
,pda_valr_date
,pnu_valr_numbr)
returning seqnc
into vnu_seqnc;
return vnu_seqnc;
end ajout_parmt;
procedure lancr_travl (pva_formt in varchar2
,pnu_travl in number
,pbo_redrg_web_reslt in boolean default true)
is
begin
afw_25_travl_publc_pkg.lancr_travl (pnu_travl
,pva_formt
,pbo_redrg_web_reslt);
end lancr_travl;
function obten_nombr_ocurn_exect_courn
return number
is
begin
return 0;
end obten_nombr_ocurn_exect_courn;
end afw_25_publc_noyau_pkg;
/
|
<filename>lexicon/schema.sql
CREATE TABLE db_version (
version integer
);
CREATE TABLE lexicon_date (
date date
);
CREATE TABLE lexicon_file (
file varchar(256)
);
CREATE TABLE "words" (
word varchar(16),
length integer,
playability integer,
playability_order integer,
min_playability_order integer,
max_playability_order integer,
combinations0 integer,
probability_order0 integer,
min_probability_order0 integer,
max_probability_order0 integer,
combinations1 integer,
probability_order1 integer,
min_probability_order1 integer,
max_probability_order1 integer,
combinations2 integer,
probability_order2 integer,
min_probability_order2 integer,
max_probability_order2 integer,
alphagram varchar(16),
num_anagrams integer,
num_unique_letters integer,
num_vowels integer,
point_value integer,
front_hooks varchar(32),
back_hooks varchar(32),
is_front_hook integer,
is_back_hook integer,
lexicon_symbols varchar(16),
definition varchar(256),
consogram varchar(17)
);
CREATE UNIQUE INDEX play_index on words (length, playability_order);
CREATE INDEX play_min_max_index on words (length, min_playability_order, max_playability_order);
CREATE UNIQUE INDEX prob0_index on words (length, probability_order0);
CREATE UNIQUE INDEX prob1_index on words (length, probability_order1);
CREATE UNIQUE INDEX prob2_index on words (length, probability_order2);
CREATE INDEX prob0_min_max_index on words (length, min_probability_order0, max_probability_order0);
CREATE INDEX prob1_min_max_index on words (length, min_probability_order1, max_probability_order1);
CREATE INDEX prob2_min_max_index on words (length, min_probability_order2, max_probability_order2);
CREATE INDEX word_alphagram_index ON words (alphagram);
CREATE INDEX word_back_hook_index ON words (is_back_hook);
CREATE INDEX word_front_hook_index ON words (is_front_hook);
CREATE INDEX word_length_index ON words (length);
CREATE INDEX word_consogram_index ON words (consogram);
CREATE UNIQUE INDEX word_index ON words (word);
|
-- file:insert.sql ln:437 expect:true
alter table returningwrtest add b text
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.