sql stringlengths 6 1.05M |
|---|
DROP TABLE IF EXISTS jq_user_favorite_entity;
CREATE TABLE jq_user_favorite_entity (
favorite_id varchar(50) NOT NULL,
user_email_id varchar(500) DEFAULT NULL,
entity_type varchar(50) DEFAULT NULL,
entity_id varchar(100) DEFAULT NULL,
entity_name varchar(100) DEFAULT NULL,
last_updated_date timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (favorite_id),
UNIQUE KEY user_email_id (user_email_id,entity_type,entity_id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
insert into admit_patient(room_number,advance_payment,mode_of_payment,date_of_admission,initial_condition,diagnosis,treatment,number_of_doctors,attendant,MR_no,DC_no,dept_name)
values(100,5000,'Cash','2-3-2020','Critical','Pneumonia','In Process',2,'Farooq','PTDRAAHILCOVIDDGKHAN-101','DC-123','Orthopedic');
insert into admit_patient(room_number,advance_payment,mode_of_payment,date_of_admission,initial_condition,diagnosis,treatment,number_of_doctors,attendant,MR_no,DC_no,dept_name)
values(150,10000,'Card','6-5-2020','Critical','Diarrhea','In Process',1,'Javed','PTDRALIYANCOVIDMULTAN-102','DC-456','Pathology');
insert into admit_patient(room_number,advance_payment,mode_of_payment,date_of_admission,initial_condition,diagnosis,treatment,number_of_doctors,attendant,MR_no,DC_no,dept_name)
values(200,15000,'Card','5-10-2020','Critical','Heart attack','In Process',1,'Ilyas','PTDRALEHACOVIDOKARA-103','DC-789','Dental');
insert into admit_patient(room_number,advance_payment,mode_of_payment,date_of_admission,initial_condition,diagnosis,treatment,number_of_doctors,attendant,MR_no,DC_no,dept_name)
values(250,20000,'Cash','3-10-2020','Critical','Accident','In Process',2,'Iftikhar','PTDRAANIATCOVIDLHR-104','DC-321','Gynecology');
insert into admit_patient(room_number,advance_payment,mode_of_payment,date_of_admission,initial_condition,diagnosis,treatment,number_of_doctors,attendant,MR_no,Dc_no,dept_name)
values(300,250000,'Panel','5-17-2020','Critical','COVID Symptoms','In Process',1,'Irshad','PTDRAHMADCOVIDKHI-105','DC-654','ICU');
insert into admit_patient(room_number,advance_payment,mode_of_payment,date_of_admission,initial_condition,diagnosis,treatment,number_of_doctors,attendant,MR_no,DC_no,dept_name)
values(350,30000,'Panel','4-22-2020','Critical','Chest infection','In Process',2,'Mushtaq','PTDRAYANCOVIDISB-106','DC-987','COVID ISOLATION WARD');
insert into admit_patient(room_number,advance_payment,mode_of_payment,date_of_admission,initial_condition,diagnosis,treatment,number_of_doctors,attendant,MR_no,Dc_no,dept_name)
values(400,35000,'Panel','4-12-2020','Critical','COVID Symptoms','In Process',1,'Tariq','PTDRZILAYLCOVIDRWP-107','DC-3110','COVID ISOLATION WARD'); |
-- phpMyAdmin SQL Dump
-- version 4.8.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 17, 2019 at 05:41 PM
-- Server version: 10.1.33-MariaDB
-- PHP Version: 7.2.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: `gst_laravel`
--
-- --------------------------------------------------------
--
-- Table structure for table `credit_debit_details`
--
CREATE TABLE `credit_debit_details` (
`id` int(11) NOT NULL,
`user_id` int(100) DEFAULT NULL,
`item` varchar(100) DEFAULT NULL,
`item_discription` text,
`is_credit` tinyint(1) NOT NULL DEFAULT '0',
`amount` int(100) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `credit_debit_details`
--
INSERT INTO `credit_debit_details` (`id`, `user_id`, `item`, `item_discription`, `is_credit`, `amount`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 'card', 'bodyupdated', 1, 102, '2019-01-22 12:16:50', '2019-01-22 12:16:50', NULL),
(2, 1, 'sf', '345', 1, 3454, '2019-02-19 18:30:00', '2019-02-21 11:28:41', NULL),
(3, 1, 'sdf', 'fdf', 1, 534, '2019-02-19 18:30:00', '2019-02-21 11:28:41', NULL),
(4, 1, 'red', 'dfgdf', 0, 200, '2019-02-05 18:30:00', '2019-02-24 06:42:09', NULL),
(5, 1, 'tgfh', 'dfg', 0, 300, '2019-02-05 18:30:00', '2019-02-24 06:42:09', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `customers`
--
CREATE TABLE `customers` (
`id` int(6) NOT NULL,
`customer_name` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`customer_contact_number` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`customer_alt_number` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`customer_email` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`customer_address` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`customer_gstin` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_by` int(11) DEFAULT NULL,
`status` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `customers`
--
INSERT INTO `customers` (`id`, `customer_name`, `customer_contact_number`, `customer_alt_number`, `customer_email`, `customer_address`, `customer_gstin`, `created_by`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, '<NAME>', '9658476170', NULL, '<EMAIL>', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', 'DHFJ%^&*(', 1, 1, '2019-02-02 00:05:17', '2019-02-02 00:05:17', NULL),
(2, 'test', '9658476170', NULL, '<EMAIL>', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', 'DHFJ%^&*(', 1, 1, '2019-02-19 01:41:57', '2019-02-19 01:41:57', NULL),
(3, 'test', '9658476170', NULL, '<EMAIL>', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', 'DHFJ%^&*(', 1, 1, '2019-02-19 01:43:10', '2019-02-19 01:43:10', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `customer_logs`
--
CREATE TABLE `customer_logs` (
`id` int(100) NOT NULL,
`customer_id` int(100) NOT NULL,
`product_id` int(100) NOT NULL,
`sale_invoice_id` int(100) DEFAULT NULL,
`debit_amount` float(100,2) DEFAULT NULL,
`is_debit` int(11) DEFAULT '1' COMMENT '0=>credit,1=>debit',
`comments` varchar(155) DEFAULT NULL,
`payment_type` int(11) DEFAULT NULL COMMENT '''1''=>''By Cash'',''2''=>''By Internate Banking'',''3''=>''By Cheque''',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `documentations`
--
CREATE TABLE `documentations` (
`id` int(100) NOT NULL,
`menu_id` int(100) DEFAULT NULL,
`title_name` varchar(200) DEFAULT NULL,
`heading` varchar(200) DEFAULT NULL,
`discription` text,
`documentation` text,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `header_links`
--
CREATE TABLE `header_links` (
`id` int(11) NOT NULL,
`menu_id` varchar(100) DEFAULT NULL,
`link_title` varchar(100) DEFAULT NULL,
`link_name` varchar(100) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `markets`
--
CREATE TABLE `markets` (
`id` int(100) NOT NULL,
`user_id` int(100) NOT NULL,
`item` varchar(100) DEFAULT NULL,
`item_discription` text NOT NULL,
`quantity` int(100) DEFAULT NULL,
`price` double(10,2) DEFAULT NULL,
`total_price` double(10,2) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `menus`
--
CREATE TABLE `menus` (
`id` int(6) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`url` varchar(255) DEFAULT NULL,
`icon` varchar(50) DEFAULT NULL,
`parent_id` int(5) DEFAULT '0',
`sort` int(1) DEFAULT '0',
`has_submenu` smallint(1) DEFAULT '0',
`role_id` varchar(255) DEFAULT NULL,
`trash` tinyint(1) DEFAULT '0',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(155) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `modals`
--
CREATE TABLE `modals` (
`id` int(10) UNSIGNED NOT NULL,
`model_name` varchar(155) COLLATE utf8mb4_unicode_ci NOT NULL,
`brand_id` int(11) DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(155) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(155) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `products`
--
CREATE TABLE `products` (
`id` int(10) UNSIGNED NOT NULL,
`user_id` int(100) DEFAULT NULL,
`product_name` varchar(155) COLLATE utf8mb4_unicode_ci NOT NULL,
`product_type` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`product_model` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`product_brand` int(11) DEFAULT NULL,
`product_color` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`product_code` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`product_hsn` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`product_unit` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`product_price` double(90,2) DEFAULT '0.00',
`product_igst` double(90,2) DEFAULT '0.00',
`product_cgst` double(90,2) DEFAULT '0.00',
`product_sgst` double(90,2) DEFAULT '0.00',
`product_gst` double(90,2) DEFAULT '0.00',
`product_price_without_gst` double(100,2) DEFAULT '0.00',
`product_salling_price` double(90,2) DEFAULT '0.00',
`stock_in` double(100,2) DEFAULT '0.00',
`stock_out` double(100,2) DEFAULT '0.00',
`available_stock` float(100,2) DEFAULT '0.00',
`created_by` int(11) NOT NULL,
`product_discription` text COLLATE utf8mb4_unicode_ci,
`status` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `products`
--
INSERT INTO `products` (`id`, `user_id`, `product_name`, `product_type`, `product_model`, `product_brand`, `product_color`, `product_code`, `product_hsn`, `product_unit`, `product_price`, `product_igst`, `product_cgst`, `product_sgst`, `product_gst`, `product_price_without_gst`, `product_salling_price`, `stock_in`, `stock_out`, `available_stock`, `created_by`, `product_discription`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 'NA', '1', '1', 1, '1', 'NA', '', '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 'this is new item in stock', 1, '2019-01-22 12:37:30', '2019-02-19 09:28:05', NULL),
(2, 1, 'birla product', '3', '4', 2, '3', 'v5454', '3455gx', '3', 120.00, 5.00, 5.00, 10.00, 20.00, 100.00, 120.00, 29.00, NULL, 30.00, 1, 'birla ka packet', 1, '2019-01-22 12:39:42', '2019-02-23 08:29:45', NULL),
(3, 1, '123sd', '2', '3', 1, '1', 'dfgd', 'dfgdfxbg45645', '1', 4345.00, 34.00, 3.00, 4.00, 41.00, 3081.56, 3534534.00, NULL, NULL, NULL, 1, 'dfgdf', 1, '2019-02-02 00:07:52', '2019-02-19 08:27:11', NULL),
(4, 1, 'jjjjjjjjjjj', '1', '1', 1, '1', '2626', '879', '1', 5.00, 2.00, 5.00, 5.00, 12.00, 4.46, 5.00, NULL, NULL, NULL, 1, 'dfgh', 1, '2019-02-19 08:28:27', '2019-02-19 08:28:27', NULL),
(5, 1, 'rdfxdrf', '2', '4', 2, '1', '2000', NULL, '1', 12.00, 8.00, 5.00, 7.00, 20.00, 10.00, 20.00, 100.00, NULL, 100.00, 1, 'ddg', 1, '2019-02-21 09:58:52', '2019-02-21 10:22:21', NULL),
(6, 1, '100rup', '1', '1', 1, '1', 'fgjn', NULL, '1', 100.00, 5.00, 3.00, 2.00, 10.00, 90.91, 100.00, 60.00, NULL, 60.00, 1, 'gh', 1, '2019-02-21 10:08:55', '2019-02-21 10:22:21', NULL),
(7, 1, '100', '2', '4', 2, '2', 'sdfdx', '5645', '2', 120.00, 5.00, 4.00, 11.00, 20.00, 100.00, 200.00, 60.00, 13.00, 109.00, 1, 'edfgfd', 1, '2019-02-21 10:27:57', '2019-02-23 08:26:43', NULL),
(8, 1, '100', '3', '6', 3, '3', 'sdfdx', '564545', '3', 120.00, 5.00, 4.00, 1.00, 10.00, 109.09, 100.00, 90.00, 8.00, 88.00, 1, 'edfgfd', 1, '2019-02-21 10:29:06', '2019-02-22 00:02:40', NULL),
(9, 1, '12321', '2', '7', 4, '3', 'dfgdfg', '34534', '3', 12.00, 5.00, 7.00, 8.00, 20.00, 10.00, 20.00, 7.00, 0.00, 10.00, 1, 'dfgdf', 1, '2019-02-23 13:05:24', '2019-02-23 13:26:08', NULL),
(10, 1, '22322', '2', '7', 4, '3', 'dfgdfg', '34534', '3', 12.00, 5.00, 7.00, 8.00, 20.00, 10.00, 20.00, 0.00, 0.00, 0.00, 1, 'dfgdf', 1, '2019-02-23 13:05:43', '2019-02-23 13:05:43', NULL),
(11, 1, '32323', '2', '7', 4, '3', 'dfgdfg', '34534', '3', 120.00, 5.00, 7.00, 8.00, 20.00, 100.00, 200.00, 8.00, 0.00, 10.00, 1, 'dfgdf', 1, '2019-02-23 13:06:08', '2019-02-23 13:25:46', NULL),
(12, 1, 'mobile11', '2', '5', 2, '2', 'dsfd', 'dgdf4565', '4', 300.00, 2.00, 45.00, 5.00, 52.00, 197.37, 0.00, 0.00, 0.00, 0.00, 1, NULL, 1, '2019-03-22 10:00:50', '2019-03-22 10:00:50', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `product_brands`
--
CREATE TABLE `product_brands` (
`id` int(6) NOT NULL,
`brand_name` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_by` int(11) DEFAULT NULL,
`status` tinyint(1) DEFAULT '1',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `product_brands`
--
INSERT INTO `product_brands` (`id`, `brand_name`, `created_by`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'NA', 1, 1, '2019-01-22 12:28:30', '2019-01-22 12:28:30', NULL),
(2, 'birla', 1, 1, '2019-01-22 12:29:58', '2019-01-22 12:29:58', NULL),
(3, 'phoenix', 1, 1, '2019-01-22 12:30:07', '2019-01-22 12:30:07', NULL),
(4, 'reliance', 1, 1, '2019-01-22 12:30:31', '2019-01-22 12:30:31', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `product_colors`
--
CREATE TABLE `product_colors` (
`id` int(6) NOT NULL,
`color_name` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`color_code` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_by` int(11) DEFAULT NULL,
`status` tinyint(1) DEFAULT '1',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `product_colors`
--
INSERT INTO `product_colors` (`id`, `color_name`, `color_code`, `created_by`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'NA', '00', 1, 1, '2019-01-22 12:22:51', '2019-01-22 12:22:51', NULL),
(2, 'green', '852', 1, 1, '2019-01-22 12:23:05', '2019-01-22 12:23:05', NULL),
(3, 'blue', '147', 1, 1, '2019-01-22 12:23:16', '2019-01-22 12:23:16', NULL),
(4, 'yello', '456', 1, 1, '2019-01-22 12:23:30', '2019-01-22 12:23:30', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `product_models`
--
CREATE TABLE `product_models` (
`id` int(6) NOT NULL,
`brand_id` int(100) DEFAULT NULL,
`model_name` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`model_number` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_by` int(11) DEFAULT NULL,
`status` tinyint(1) DEFAULT '1',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `product_models`
--
INSERT INTO `product_models` (`id`, `brand_id`, `model_name`, `model_number`, `created_by`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 'NA', 'NA', 1, 1, '2019-01-22 12:30:51', '2019-01-22 12:30:51', NULL),
(2, 1, 'motor', '999', 1, 1, '2019-01-22 12:31:13', '2019-01-22 12:31:13', NULL),
(3, 1, 'kuch bhi', '879', 1, 1, '2019-01-22 12:32:11', '2019-01-22 12:32:11', NULL),
(4, 2, 'idea', '890', 1, 1, '2019-01-22 12:32:34', '2019-01-22 12:32:34', NULL),
(5, 2, 'birla model', '456', 1, 1, '2019-01-22 12:32:59', '2019-01-22 12:32:59', NULL),
(6, 3, 'software', '4546789', 1, 1, '2019-01-22 12:33:20', '2019-01-22 12:33:20', NULL),
(7, 4, 'petrol', '3243567', 1, 1, '2019-01-22 12:33:36', '2019-01-22 12:33:36', NULL),
(8, 2, 'hjg', '65ijh', 1, 1, '2019-03-22 10:43:50', '2019-03-22 10:43:50', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `product_types`
--
CREATE TABLE `product_types` (
`id` int(6) NOT NULL,
`type_name` varchar(155) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_by` int(11) NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `product_types`
--
INSERT INTO `product_types` (`id`, `type_name`, `created_by`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'NA', 1, 1, '2019-01-22 12:25:06', '2019-01-22 12:25:58', NULL),
(2, 'machinary', 1, 1, '2019-01-22 12:25:15', '2019-01-22 12:26:17', NULL),
(3, 'tea stall', 1, 1, '2019-01-22 12:25:32', '2019-01-22 12:27:13', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `product_units`
--
CREATE TABLE `product_units` (
`id` int(6) NOT NULL,
`unit_name` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_by` int(11) DEFAULT NULL,
`status` tinyint(1) DEFAULT '1',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `product_units`
--
INSERT INTO `product_units` (`id`, `unit_name`, `created_by`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'NA', 1, 1, '2019-01-22 12:27:29', '2019-01-22 12:27:29', NULL),
(2, 'pic', 1, 1, '2019-01-22 12:27:39', '2019-01-22 12:27:39', NULL),
(3, 'litter', 1, 1, '2019-01-22 12:27:58', '2019-01-22 12:27:58', NULL),
(4, 'per/pic', 1, 1, '2019-03-22 09:59:26', '2019-03-22 09:59:26', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `purchases`
--
CREATE TABLE `purchases` (
`id` int(11) NOT NULL,
`supplier_id` int(11) NOT NULL,
`purchase_invoice_id` int(100) NOT NULL,
`supplier_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`supplier_mob_num` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`supplier_address` text COLLATE utf8mb4_unicode_ci,
`supplier_email` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`purchase_invoice_number` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`purchase_invoice_date` date DEFAULT NULL,
`purchase_invoice_amount` double(10,2) DEFAULT NULL,
`purchase_tax_amount` double(10,2) DEFAULT NULL,
`purchase_discription` text COLLATE utf8mb4_unicode_ci,
`payment_type` int(155) DEFAULT NULL COMMENT '1=>By Cash,2=>By Internate Banking,3=>By Cheque',
`product_name` int(11) DEFAULT NULL,
`product_code` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`product_color` int(100) DEFAULT NULL,
`product_model` int(100) DEFAULT NULL,
`product_brand` int(100) DEFAULT NULL,
`product_type` int(100) DEFAULT NULL,
`product_discription` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`product_hsn` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`product_gst` double(10,2) DEFAULT NULL,
`product_sgst` double(10,2) DEFAULT NULL,
`product_cgst` double(10,2) DEFAULT NULL,
`product_igst` double(10,2) DEFAULT NULL,
`product_quantity` double(10,2) DEFAULT NULL,
`product_unit` varchar(155) COLLATE utf8mb4_unicode_ci NOT NULL,
`product_salling_price` float(100,4) DEFAULT NULL,
`product_discount_in_perce` double(155,2) NOT NULL DEFAULT '0.00',
`product_discount` double(155,2) NOT NULL DEFAULT '0.00',
`product_price_withoutgst` float(100,4) DEFAULT NULL,
`product_price_withgst` double(10,4) DEFAULT NULL,
`product_total_amount` double(10,2) DEFAULT NULL,
`product_tax_amount` double(10,2) DEFAULT NULL,
`product_total_tax_amount` float(100,3) DEFAULT NULL,
`created_by` int(11) NOT NULL,
`is_returned` tinyint(1) NOT NULL DEFAULT '0',
`status` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `purchases`
--
INSERT INTO `purchases` (`id`, `supplier_id`, `purchase_invoice_id`, `supplier_name`, `supplier_mob_num`, `supplier_address`, `supplier_email`, `purchase_invoice_number`, `purchase_invoice_date`, `purchase_invoice_amount`, `purchase_tax_amount`, `purchase_discription`, `payment_type`, `product_name`, `product_code`, `product_color`, `product_model`, `product_brand`, `product_type`, `product_discription`, `product_hsn`, `product_gst`, `product_sgst`, `product_cgst`, `product_igst`, `product_quantity`, `product_unit`, `product_salling_price`, `product_discount_in_perce`, `product_discount`, `product_price_withoutgst`, `product_price_withgst`, `product_total_amount`, `product_tax_amount`, `product_total_tax_amount`, `created_by`, `is_returned`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 2, '<NAME>', '9658476170', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', '<EMAIL>', '456dfg', '2019-01-17', 200000.00, NULL, 'dfvdfdf', 2, 1, 'dert1234', 2, 1, 1, 2, 'this is new item in stock', '46789123', 24.00, 8.00, 8.00, 8.00, 10.00, '2', 120000.0000, 0.00, 0.00, 100000.0000, 124000.0000, 1240000.00, 24000.00, 240000.000, 1, 0, 1, '2019-01-22 12:43:27', '2019-01-22 12:43:27', NULL),
(2, 1, 2, '<NAME>', '9658476170', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', '<EMAIL>', '456dfg', '2019-01-17', 200000.00, NULL, 'dfvdfdf', 2, 2, 'v5454', 3, 4, 2, 3, 'birla ka packet', '3455gx', 20.00, 10.00, 5.00, 5.00, 20.00, '3', 120.0000, 0.00, 0.00, 100.0000, 120.0000, 2400.00, 20.00, 400.000, 1, 0, 1, '2019-01-22 12:43:27', '2019-01-22 12:43:27', NULL),
(3, 1, 3, '<NAME>', '9658476170', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', '<EMAIL>', '34534543', '2019-01-15', 454644.00, NULL, 'dfgdfg', 3, 1, 'dert1234', 2, 1, 1, 2, 'this is new item in stock', '46789123', 24.00, 8.00, 8.00, 8.00, 3.00, '2', 120000.0000, 0.00, 0.00, 100000.0000, 124000.0000, 372000.00, 24000.00, 72000.000, 1, 0, 1, '2019-01-22 12:49:31', '2019-01-22 12:49:31', NULL),
(4, 1, 6, '<NAME>', '9658476170', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', '<EMAIL>', NULL, NULL, NULL, NULL, NULL, 1, 6, 'fgjn', 1, 1, 1, 1, 'gh', '34534', 10.00, 2.00, 3.00, 5.00, 20.00, '1', 100.0000, 0.00, 0.00, 90.9100, 100.0000, 2000.02, 9.09, 181.800, 1, 0, 1, '2019-02-21 10:22:21', '2019-02-21 10:22:21', NULL),
(5, 1, 6, '<NAME>', '9658476170', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', '<EMAIL>', NULL, NULL, NULL, NULL, NULL, 1, 5, '2000', 1, 4, 2, 2, 'ddg', '345435', 20.00, 7.00, 5.00, 8.00, 100.00, '1', 20.0000, 0.00, 0.00, 10.0000, 12.0000, 1200.00, 2.00, 200.000, 1, 0, 1, '2019-02-21 10:22:21', '2019-02-21 10:22:21', NULL),
(6, 1, 7, '<NAME>', '9658476170', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', '<EMAIL>', '123', '2019-02-20', 20.00, NULL, 'joi', 1, 8, 'sdfdx', 3, 6, 3, 3, 'edfgfd', '564545', 10.00, 1.00, 4.00, 5.00, 90.00, '3', 100.0000, 0.00, 0.00, 109.0900, 120.0000, 10799.91, 10.91, 1091.000, 1, 1, 1, '2019-02-21 10:34:58', '2019-02-22 00:02:39', NULL),
(7, 1, 7, '<NAME>', '9658476170', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', '<EMAIL>', '123', '2019-02-20', 20.00, NULL, 'joi', 1, 7, 'sdfdx', 2, 4, 2, 2, 'edfgfd', '5645', 20.00, 11.00, 4.00, 5.00, 70.00, '2', 200.0000, 0.00, 0.00, 100.0000, 120.0000, 8400.00, 20.00, 2000.000, 1, 1, 1, '2019-02-21 10:34:58', '2019-02-22 00:00:35', NULL),
(8, 1, 8, '<NAME>', '9658476170', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', 'ash<EMAIL>', '5656', '2019-02-21', 3443.00, NULL, 'dgsdg', 1, 2, 'v5454', 3, 4, 2, 3, 'birla ka packet', '3455gx', 20.00, 10.00, 5.00, 5.00, 9.00, '3', 120.0000, 0.00, 0.00, 100.0000, 120.0000, 1080.00, 20.00, 200.000, 1, 1, 1, '2019-02-22 00:09:53', '2019-02-23 08:29:45', NULL),
(9, 1, 8, '<NAME>', '9658476170', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', '<EMAIL>', '5656', '2019-02-21', 3443.00, NULL, 'dgsdg', 1, 7, 'sdfdx', 2, 4, 2, 2, 'edfgfd', '5645', 20.00, 11.00, 4.00, 5.00, 0.00, '2', 200.0000, 0.00, 0.00, 100.0000, 120.0000, 0.00, 20.00, 400.000, 1, 1, 1, '2019-02-22 00:09:53', '2019-02-23 08:26:42', NULL),
(10, 1, 9, '<NAME>', '9658476170', '<EMAIL>@<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', '<EMAIL>', '34534', '2019-02-22', 45.00, NULL, 'dfb', 2, 9, 'dfgdfg', 3, 7, 4, 2, 'dfgdf', '34534', 20.00, 8.00, 7.00, 5.00, 7.00, '3', 20.0000, 10.00, 0.00, 10.0000, 12.0000, 75.60, 2.00, 20.000, 1, 1, 1, '2019-02-23 13:08:15', '2019-02-23 13:26:08', NULL),
(11, 1, 9, '<NAME>', '9658476170', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', '<EMAIL>', '34534', '2019-02-22', 45.00, NULL, 'dfb', 2, 11, 'dfgdfg', 3, 7, 4, 2, 'dfgdf', '34534', 20.00, 8.00, 7.00, 5.00, 8.00, '3', 200.0000, 0.00, 10.00, 100.0000, 120.0000, 864.00, 20.00, 200.000, 1, 1, 1, '2019-02-23 13:08:15', '2019-02-23 13:25:46', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `purchase_invoices`
--
CREATE TABLE `purchase_invoices` (
`id` int(155) NOT NULL,
`supplier_id` int(155) NOT NULL,
`purchase_invoice_number` varchar(155) DEFAULT NULL,
`purchase_invoice_date` date DEFAULT NULL,
`purchase_invoice_amount` float(155,4) DEFAULT NULL COMMENT 'original amount',
`purchase_discription` text,
`payment_type` int(11) DEFAULT NULL,
`total_purchase_amount` float(155,4) DEFAULT NULL COMMENT 'our calculation for alll product',
`purchase_due_amount` float(155,4) DEFAULT NULL COMMENT 'remaing amount for supplier for this purchase invoice',
`satus` tinyint(1) NOT NULL DEFAULT '1',
`user_id` int(155) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `purchase_invoices`
--
INSERT INTO `purchase_invoices` (`id`, `supplier_id`, `purchase_invoice_number`, `purchase_invoice_date`, `purchase_invoice_amount`, `purchase_discription`, `payment_type`, `total_purchase_amount`, `purchase_due_amount`, `satus`, `user_id`, `created_at`, `updated_at`, `deleted_at`) VALUES
(2, 1, '456dfg', '2019-01-17', 200000.0000, 'dfvdfdf', 2, 1242400.0000, 100000.0000, 1, 1, '2019-01-22 12:43:26', '2019-01-22 12:43:26', NULL),
(3, 1, '34534543', '2019-01-15', 454644.0000, 'dfgdfg', 3, 372000.0000, 56575.0000, 1, 1, '2019-01-22 12:49:31', '2019-01-22 12:49:31', NULL),
(7, 1, '123', '2019-02-20', 20.0000, 'joi', 1, -26400.0098, 123.0000, 1, 1, '2019-02-21 10:34:58', '2019-02-22 00:02:39', NULL),
(8, 1, '5656', '2019-02-21', 3443.0000, 'dgsdg', 1, 480.0000, 20.0000, 1, 1, '2019-02-22 00:09:52', '2019-02-23 08:29:45', NULL),
(9, 1, '34534', '2019-02-22', 45.0000, 'dfb', 2, 248.4000, 1000.0000, 1, 1, '2019-02-23 13:08:14', '2019-02-23 13:26:08', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `return_product_logs`
--
CREATE TABLE `return_product_logs` (
`id` int(155) NOT NULL,
`user_id` int(155) DEFAULT NULL,
`comments` text,
`product_id` int(155) DEFAULT NULL,
`product_name` varchar(155) DEFAULT NULL,
`sale_id` int(155) DEFAULT NULL,
`sale_invoice_id` int(155) DEFAULT NULL,
`quantity` double(155,2) DEFAULT NULL,
`status` int(11) DEFAULT '1',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `return_product_logs`
--
INSERT INTO `return_product_logs` (`id`, `user_id`, `comments`, `product_id`, `product_name`, `sale_id`, `sale_invoice_id`, `quantity`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 'returned', 7, NULL, 20, NULL, 1.00, 1, '2019-02-21 11:21:45', '2019-02-21 11:21:45', NULL),
(2, 1, 'yugvhjk', 8, NULL, 21, NULL, 1.00, 1, '2019-02-21 11:23:55', '2019-02-21 11:23:55', NULL),
(3, 1, 'wrong item', 8, '100', 21, 14, 1.00, 1, '2019-02-21 22:07:02', '2019-02-21 22:07:02', NULL),
(4, 1, 'wrong item', 8, '100', 21, 14, 1.00, 1, '2019-02-21 22:08:16', '2019-02-21 22:08:16', NULL),
(5, 1, 'hkug', 7, '100', 20, 14, 1.00, 1, '2019-02-21 22:18:41', '2019-02-21 22:18:41', NULL),
(6, 1, 'hkj', 8, '100', 21, 14, 3.00, 1, '2019-02-21 23:54:36', '2019-02-21 23:54:36', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `return_purchase_logs`
--
CREATE TABLE `return_purchase_logs` (
`id` int(155) NOT NULL,
`user_id` int(155) DEFAULT NULL,
`comments` text,
`product_id` int(155) DEFAULT NULL,
`product_name` varchar(155) DEFAULT NULL,
`purchase_id` int(155) DEFAULT NULL,
`purchase_invoice_id` int(155) DEFAULT NULL,
`quantity` double(155,2) DEFAULT NULL,
`status` int(11) DEFAULT '1',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `return_purchase_logs`
--
INSERT INTO `return_purchase_logs` (`id`, `user_id`, `comments`, `product_id`, `product_name`, `purchase_id`, `purchase_invoice_id`, `quantity`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(6, 1, 'dfg', 7, '100', 7, 7, 10.00, 1, '2019-02-21 23:53:24', '2019-02-21 23:53:24', NULL),
(7, 1, 'fg', 7, '100', 7, 7, 10.00, 1, '2019-02-22 00:00:35', '2019-02-22 00:00:35', NULL),
(8, 1, 'ihkuh', 8, '100', 6, 7, 10.00, 1, '2019-02-22 00:02:40', '2019-02-22 00:02:40', NULL),
(9, 1, 'gjg', 7, '100', 9, 8, 10.00, 1, '2019-02-22 00:10:27', '2019-02-22 00:10:27', NULL),
(10, 1, 'gjg', 7, '100', 9, 8, 5.00, 1, '2019-02-22 00:15:26', '2019-02-22 00:15:26', NULL),
(11, 1, 'uug', 7, '100', 9, 8, 3.00, 1, '2019-02-22 07:12:34', '2019-02-22 07:12:34', NULL),
(12, 1, 'df', 7, '100', 9, 8, 2.00, 1, '2019-02-23 08:26:43', '2019-02-23 08:26:43', NULL),
(13, 1, 'df', 2, 'birla product', 8, 8, 1.00, 1, '2019-02-23 08:29:45', '2019-02-23 08:29:45', NULL),
(14, 1, 'new discount', 11, '32323', 11, 9, 2.00, 1, '2019-02-23 13:25:47', '2019-02-23 13:25:47', NULL),
(15, 1, 'new discountfjgfhft', 9, '12321', 10, 9, 3.00, 1, '2019-02-23 13:26:08', '2019-02-23 13:26:08', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `roles`
--
CREATE TABLE `roles` (
`id` int(6) NOT NULL,
`role_name` varchar(191) DEFAULT NULL,
`role_code` varchar(100) DEFAULT NULL,
`is_active` tinyint(1) DEFAULT '0',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `roles`
--
INSERT INTO `roles` (`id`, `role_name`, `role_code`, `is_active`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Super Admin', 'SUP', 1, '2019-01-01 16:01:58', '0000-00-00 00:00:00', NULL),
(2, 'marketing', 'MKT', 1, '2019-01-01 16:01:54', '0000-00-00 00:00:00', NULL),
(4, 'Pubic', 'PLC', 1, '2019-01-02 02:09:00', '0000-00-00 00:00:00', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `sales`
--
CREATE TABLE `sales` (
`id` int(11) NOT NULL,
`sale_invoice_id` int(155) NOT NULL,
`customer_id` int(155) DEFAULT NULL,
`customer_name` varchar(155) DEFAULT NULL,
`customer_contact_number` varchar(155) DEFAULT NULL,
`customer_address` text,
`customer_email` varchar(155) DEFAULT NULL,
`payment_type` varchar(155) DEFAULT NULL,
`sale_discription` text,
`user_id` int(155) DEFAULT NULL,
`product_type` varchar(155) DEFAULT NULL,
`product_brand` varchar(155) DEFAULT NULL,
`product_model` varchar(155) DEFAULT NULL,
`product_color` varchar(155) DEFAULT NULL,
`product_name` varchar(155) DEFAULT NULL,
`product_code` varchar(155) DEFAULT NULL,
`product_discription` text,
`product_unit` varchar(155) DEFAULT NULL,
`product_hsn` varchar(155) DEFAULT NULL,
`product_price_withgst` double(155,2) DEFAULT NULL,
`product_price_withoutgst` double(155,2) DEFAULT NULL,
`product_igst` double(155,2) DEFAULT NULL,
`product_cgst` double(155,2) DEFAULT NULL,
`product_sgst` double(155,2) DEFAULT NULL,
`product_gst` double(155,2) DEFAULT NULL,
`is_returned` tinyint(1) NOT NULL DEFAULT '0',
`product_quantity` double(155,2) DEFAULT NULL,
`product_total_amount` double(155,2) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `sales`
--
INSERT INTO `sales` (`id`, `sale_invoice_id`, `customer_id`, `customer_name`, `customer_contact_number`, `customer_address`, `customer_email`, `payment_type`, `sale_discription`, `user_id`, `product_type`, `product_brand`, `product_model`, `product_color`, `product_name`, `product_code`, `product_discription`, `product_unit`, `product_hsn`, `product_price_withgst`, `product_price_withoutgst`, `product_igst`, `product_cgst`, `product_sgst`, `product_gst`, `is_returned`, `product_quantity`, `product_total_amount`, `created_at`, `updated_at`, `deleted_at`) VALUES
(18, 13, 3, 'test', '9658476170', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', '<EMAIL>', NULL, 'jjjjjjjjj', 1, '2', '1', '1', '2', '1', 'dert1234', 'this is new item in stock', '2', '46789123', 148800.00, 120000.00, 8.00, 8.00, 8.00, 24.00, 0, 3.00, 446400.00, '2019-02-19 09:28:05', '2019-02-19 09:28:05', NULL),
(19, 13, 3, 'Ashutosh 1212', '1212', 'a', 'a1212', '3', 'jjjjjjjjj12', 1, '2', '1', '1', '2', '1', 'dert1234', 'this is new item in stock', '2', '46789123', 148800.00, 120000.00, 8.00, 8.00, 8.00, 24.00, 0, 6.00, 892800.00, '2019-02-19 09:28:05', '2019-02-19 11:38:01', NULL),
(20, 14, 1, '<NAME>', '9658476170', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', '<EMAIL>', NULL, 'dfxvfd', 1, '2', '2', '4', '2', '7', 'sdfdx', 'edfgfd', '2', '5645', 240.00, 200.00, 5.00, 4.00, 11.00, 20.00, 1, 2.00, 528.00, '2019-02-21 10:37:38', '2019-02-21 22:18:40', NULL),
(21, 14, 1, '<NAME>', '9658476170', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', '<EMAIL>', NULL, 'dfxvfd', 1, '3', '3', '6', '3', '8', 'sdfdx', 'edfgfd', '3', '564545', 110.00, 100.00, 5.00, 4.00, 1.00, 10.00, 1, 6.00, 660.00, '2019-02-21 10:37:38', '2019-02-21 23:54:36', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `sale_invoices`
--
CREATE TABLE `sale_invoices` (
`id` bigint(155) NOT NULL,
`customer_id` bigint(155) NOT NULL,
`customer_name` varchar(155) DEFAULT NULL,
`customer_contact_number` varchar(155) DEFAULT NULL,
`customer_address` text,
`customer_email` varchar(155) DEFAULT NULL,
`payment_type` varchar(155) DEFAULT NULL,
`sale_discription` text,
`total_sale_amount` double(155,2) DEFAULT NULL,
`sale_due_amount` double(155,2) DEFAULT NULL,
`user_id` int(155) DEFAULT NULL,
`discount` double(155,2) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `sale_invoices`
--
INSERT INTO `sale_invoices` (`id`, `customer_id`, `customer_name`, `customer_contact_number`, `customer_address`, `customer_email`, `payment_type`, `sale_discription`, `total_sale_amount`, `sale_due_amount`, `user_id`, `discount`, `created_at`, `updated_at`, `deleted_at`) VALUES
(13, 3, 'test', '9658476170', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', '<EMAIL>', NULL, 'jjjjjjjjj', 1339200.00, 133920.00, 1, 0.00, '2019-02-19 09:28:05', '2019-02-19 09:28:05', NULL),
(14, 1, '<NAME>', '9658476170', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', '<EMAIL>', NULL, 'dfxvfd', -9240.00, 0.00, 1, 0.00, '2019-02-21 10:37:38', '2019-02-21 23:54:36', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `suppliers`
--
CREATE TABLE `suppliers` (
`id` int(10) UNSIGNED NOT NULL,
`user_id` int(11) DEFAULT NULL,
`supplier_name` varchar(155) COLLATE utf8mb4_unicode_ci NOT NULL,
`mob_num` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`address` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`email` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`total_supplier_balance` double(100,2) DEFAULT NULL,
`total_supplier_credit` double(100,2) DEFAULT NULL,
`total_supplier_debit` double(100,2) DEFAULT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`gstin` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`status` int(2) DEFAULT '1',
`deleted_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `suppliers`
--
INSERT INTO `suppliers` (`id`, `user_id`, `supplier_name`, `mob_num`, `address`, `email`, `total_supplier_balance`, `total_supplier_credit`, `total_supplier_debit`, `email_verified_at`, `gstin`, `status`, `deleted_at`, `created_at`, `updated_at`) VALUES
(1, 1, '<NAME>', '9658476170', '<EMAIL>,com\r\nplot No-GA,430 Chandrasekharpur, Axis Bank ATM, <NAME>', '<EMAIL>', -2890388.00, NULL, 2890388.00, NULL, '34ccdfb', 1, NULL, '2019-01-22 12:34:28', '2019-02-23 13:08:15');
-- --------------------------------------------------------
--
-- Table structure for table `supplier_debit_logs`
--
CREATE TABLE `supplier_debit_logs` (
`id` int(100) NOT NULL,
`user_id` int(100) DEFAULT NULL,
`supplier_id` int(100) NOT NULL,
`purchase_id` int(100) DEFAULT NULL,
`debit_amount` float(100,2) DEFAULT NULL,
`total_amount` float(100,2) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `supplier_debit_logs`
--
INSERT INTO `supplier_debit_logs` (`id`, `user_id`, `supplier_id`, `purchase_id`, `debit_amount`, `total_amount`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 1, 1, 1240000.00, NULL, '2019-01-22 12:43:27', '2019-01-22 12:43:27', NULL),
(2, 1, 1, 2, 2400.00, NULL, '2019-01-22 12:43:27', '2019-01-22 12:43:27', NULL),
(3, 1, 1, 3, 372000.00, NULL, '2019-01-22 12:49:31', '2019-01-22 12:49:31', NULL),
(4, 1, 1, 4, 2000.02, NULL, '2019-02-21 10:22:21', '2019-02-21 10:22:21', NULL),
(5, 1, 1, 5, 1200.00, NULL, '2019-02-21 10:22:21', '2019-02-21 10:22:21', NULL),
(6, 1, 1, 6, 11999.90, NULL, '2019-02-21 10:34:58', '2019-02-21 10:34:58', NULL),
(7, 1, 1, 7, 12000.00, NULL, '2019-02-21 10:34:58', '2019-02-21 10:34:58', NULL),
(8, 1, 1, 8, 1200.00, NULL, '2019-02-22 00:09:53', '2019-02-22 00:09:53', NULL),
(9, 1, 1, 9, 2400.00, NULL, '2019-02-22 00:09:53', '2019-02-22 00:09:53', NULL),
(10, 1, 1, 10, 108.00, NULL, '2019-02-23 13:08:15', '2019-02-23 13:08:15', NULL),
(11, 1, 1, 11, 1080.00, NULL, '2019-02-23 13:08:15', '2019-02-23 13:08:15', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `supplier_payment_logs`
--
CREATE TABLE `supplier_payment_logs` (
`id` int(155) NOT NULL,
`user_id` int(155) DEFAULT NULL,
`supplier_id` int(155) DEFAULT NULL,
`credit_amount` float(100,4) DEFAULT NULL,
`payment_type` varchar(155) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`name` varchar(155) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(155) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(155) COLLATE utf8mb4_unicode_ci NOT NULL,
`password_hint` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`role_id` int(11) NOT NULL DEFAULT '2',
`avatar` varchar(2000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `password_hint`, `remember_token`, `role_id`, `avatar`, `created_at`, `updated_at`) VALUES
(1, '<NAME>', '<EMAIL>', NULL, '$2y$10$IDRlMIiXorKrci4p0poPPOxducGKbdLV/gExYtbjb6QtsuytjOXMW', '111111', 'L8FEYAIm4wLwrWFE8GrMqxlOYNF2JUntcGcMEVAKx7vRgo4MGnYm9pWG6UDN', 1, NULL, '2018-12-29 08:16:09', '2019-01-08 23:27:54'),
(2, 'Sai Auto Care', '<EMAIL>', NULL, '$2y$10$9ZwtUlXD.yJInd17D/GMCeo5/zCqjtBjXK4wIxJcZEjZLiGyvEOFS', NULL, NULL, 1, NULL, '2018-12-24 08:19:51', '2018-12-24 08:19:51'),
(16, 'Marketing', '<EMAIL>', NULL, '$2y$10$Sn/tpLjRgWFoI5XvydQ83.gxmkkt1v/sV.bxk9i3jXZBWleMNrS.2', 'marketing', NULL, 2, NULL, '2019-01-08 22:32:33', '2019-01-08 22:32:33'),
(17, '<NAME>', '<EMAIL>', NULL, '$2y$10$7yi1BPyRSihrhX8D/ssnwerkIKVoe6LsD0xGxvY7sUo83cD6916zW', NULL, '9H2PJ1bXKGscHs3rFCzesrbxzRHQKHGapZvN0QDDsv5OLVvPYSbNyW23R04A', 2, NULL, '2019-01-09 20:02:02', '2019-01-09 20:02:02'),
(18, '<NAME>', '<EMAIL>', NULL, '$2y$10$Z0Nt2Xaqeg7TYU2QiqEVfuqucG7ZiRGBfQfsM4g0xcyVUFkJQHJdm', NULL, 'kdqDRHC3AoWz71IxhvPqmGZyfyfOAIuqG2h5p2Xiw8SG8bpdr1GbaVkkFLFl', 2, NULL, '2019-01-09 20:07:15', '2019-01-09 20:18:15'),
(19, 'aaaaaaaaaaa', '<EMAIL>', NULL, '$2y$10$mXOoD2Q8ZZrf2l2cNcPRNu75zTVrwQ16pUdCwarrazUxbdZbin1B6', 'aaaaa', NULL, 4, NULL, '2019-01-11 13:53:22', '2019-01-11 19:03:36');
-- --------------------------------------------------------
--
-- Table structure for table `user_details`
--
CREATE TABLE `user_details` (
`id` bigint(20) NOT NULL,
`users_id` int(10) DEFAULT NULL,
`employee_gender` varchar(1000) DEFAULT NULL,
`Address` varchar(255) DEFAULT NULL,
`office_address` varchar(255) DEFAULT NULL,
`mobile_number` varchar(255) DEFAULT NULL,
`bank_account_name` varchar(255) DEFAULT NULL,
`bank_account_no` varchar(255) DEFAULT NULL,
`bank_ifsc_code` varchar(200) DEFAULT NULL,
`specimen_of_full_signature` varchar(255) DEFAULT NULL,
`department_name` varchar(100) DEFAULT NULL,
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `user_details`
--
INSERT INTO `user_details` (`id`, `users_id`, `employee_gender`, `Address`, `office_address`, `mobile_number`, `bank_account_name`, `bank_account_no`, `bank_ifsc_code`, `specimen_of_full_signature`, `department_name`, `created_at`, `updated_at`, `deleted_at`) VALUES
(11, 1, 'male', 'plot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', 'plot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', '9658476170', NULL, NULL, NULL, NULL, 'administrative', '2019-01-08 16:27:54', '2019-01-08 16:27:54', NULL),
(12, 17, 'male', 'bhubaneswar', NULL, '7683855014', NULL, NULL, NULL, NULL, 'administrative', '2019-01-09 13:02:02', '2019-01-09 13:02:02', NULL),
(13, 18, 'male', NULL, NULL, '7978262599', NULL, NULL, NULL, NULL, 'other', '2019-01-09 13:07:15', '2019-01-09 13:18:15', NULL),
(14, 19, 'male', '<EMAIL>', 'plot No-GA,430 Chandrasekharpur, Axis Bank ATM, Sailashree Vihar', '9658476170', '<NAME>', '5555', '5555', NULL, 'other', '2019-01-11 19:23:22', '2019-01-12 00:33:36', NULL);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `credit_debit_details`
--
ALTER TABLE `credit_debit_details`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `customers`
--
ALTER TABLE `customers`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `customer_logs`
--
ALTER TABLE `customer_logs`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `documentations`
--
ALTER TABLE `documentations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `header_links`
--
ALTER TABLE `header_links`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `markets`
--
ALTER TABLE `markets`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `menus`
--
ALTER TABLE `menus`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `modals`
--
ALTER TABLE `modals`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `brand_name` (`id`),
ADD UNIQUE KEY `id` (`id`);
--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`);
--
-- Indexes for table `products`
--
ALTER TABLE `products`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `product_brands`
--
ALTER TABLE `product_brands`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `product_colors`
--
ALTER TABLE `product_colors`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `product_models`
--
ALTER TABLE `product_models`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `product_types`
--
ALTER TABLE `product_types`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `product_units`
--
ALTER TABLE `product_units`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `purchases`
--
ALTER TABLE `purchases`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `id` (`id`);
--
-- Indexes for table `purchase_invoices`
--
ALTER TABLE `purchase_invoices`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `return_product_logs`
--
ALTER TABLE `return_product_logs`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `return_purchase_logs`
--
ALTER TABLE `return_purchase_logs`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `sales`
--
ALTER TABLE `sales`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `sale_invoices`
--
ALTER TABLE `sale_invoices`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `suppliers`
--
ALTER TABLE `suppliers`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `supplier_debit_logs`
--
ALTER TABLE `supplier_debit_logs`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `supplier_payment_logs`
--
ALTER TABLE `supplier_payment_logs`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`);
--
-- Indexes for table `user_details`
--
ALTER TABLE `user_details`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `credit_debit_details`
--
ALTER TABLE `credit_debit_details`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `customers`
--
ALTER TABLE `customers`
MODIFY `id` int(6) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `customer_logs`
--
ALTER TABLE `customer_logs`
MODIFY `id` int(100) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `documentations`
--
ALTER TABLE `documentations`
MODIFY `id` int(100) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `header_links`
--
ALTER TABLE `header_links`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `markets`
--
ALTER TABLE `markets`
MODIFY `id` int(100) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `menus`
--
ALTER TABLE `menus`
MODIFY `id` int(6) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `modals`
--
ALTER TABLE `modals`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `product_brands`
--
ALTER TABLE `product_brands`
MODIFY `id` int(6) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `product_colors`
--
ALTER TABLE `product_colors`
MODIFY `id` int(6) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `product_models`
--
ALTER TABLE `product_models`
MODIFY `id` int(6) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `product_types`
--
ALTER TABLE `product_types`
MODIFY `id` int(6) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `product_units`
--
ALTER TABLE `product_units`
MODIFY `id` int(6) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `purchases`
--
ALTER TABLE `purchases`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `purchase_invoices`
--
ALTER TABLE `purchase_invoices`
MODIFY `id` int(155) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `return_product_logs`
--
ALTER TABLE `return_product_logs`
MODIFY `id` int(155) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `return_purchase_logs`
--
ALTER TABLE `return_purchase_logs`
MODIFY `id` int(155) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
MODIFY `id` int(6) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `sales`
--
ALTER TABLE `sales`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT for table `sale_invoices`
--
ALTER TABLE `sale_invoices`
MODIFY `id` bigint(155) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
--
-- AUTO_INCREMENT for table `suppliers`
--
ALTER TABLE `suppliers`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `supplier_debit_logs`
--
ALTER TABLE `supplier_debit_logs`
MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `supplier_payment_logs`
--
ALTER TABLE `supplier_payment_logs`
MODIFY `id` int(155) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;
--
-- AUTO_INCREMENT for table `user_details`
--
ALTER TABLE `user_details`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
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>sql/db_ukk_spp.sql
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 11 Mar 2020 pada 12.26
-- Versi server: 10.4.6-MariaDB
-- Versi PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `db_ukk_spp`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `tb_agenda`
--
CREATE TABLE `tb_agenda` (
`id_agenda` int(11) NOT NULL,
`tanggal` date DEFAULT NULL,
`keterangan` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `tb_identitas`
--
CREATE TABLE `tb_identitas` (
`id_identitas` int(11) NOT NULL,
`nama_sekolah` varchar(40) DEFAULT NULL,
`alamat` text DEFAULT NULL,
`kecamatan` varchar(30) DEFAULT NULL,
`kota` varchar(30) DEFAULT NULL,
`no_telp` varchar(14) DEFAULT NULL,
`logo` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `tb_jenis_pembayaran`
--
CREATE TABLE `tb_jenis_pembayaran` (
`id_jenis` int(11) NOT NULL,
`id_pos` int(11) DEFAULT NULL,
`id_tahun` int(11) DEFAULT NULL,
`nama_pembayaran` varchar(20) DEFAULT NULL,
`type` enum('bulanan','bebas') DEFAULT NULL,
`nominal` decimal(10,0) DEFAULT NULL,
`id_kelas` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `tb_karyawan`
--
CREATE TABLE `tb_karyawan` (
`id_karyawan` int(11) NOT NULL,
`username` varchar(30) DEFAULT NULL,
`password` varchar(100) DEFAULT NULL,
`nama_karyawan` varchar(30) DEFAULT NULL,
`id_role` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `tb_karyawan`
--
INSERT INTO `tb_karyawan` (`id_karyawan`, `username`, `password`, `nama_karyawan`, `id_role`) VALUES
(12, '@wahyupramudya20', <PASSWORD>', '<NAME>', 4);
-- --------------------------------------------------------
--
-- Struktur dari tabel `tb_kelas`
--
CREATE TABLE `tb_kelas` (
`id_kelas` int(11) NOT NULL,
`nama_kelas` varchar(6) DEFAULT NULL,
`id_kompetensi` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `tb_kompetensi`
--
CREATE TABLE `tb_kompetensi` (
`id_kompetensi` int(11) NOT NULL,
`kompetensi_keahlian` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `tb_pemasukan`
--
CREATE TABLE `tb_pemasukan` (
`id_pemasukan` int(11) NOT NULL,
`tanggal` date DEFAULT NULL,
`keterangan` text DEFAULT NULL,
`jumlah_rupiah` decimal(10,0) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `tb_pembayaran`
--
CREATE TABLE `tb_pembayaran` (
`no_pembayaran` varchar(10) NOT NULL,
`id_karyawan` int(11) DEFAULT NULL,
`nisn` varchar(11) DEFAULT NULL,
`tanggal_bayar` date DEFAULT NULL,
`keterangan` text DEFAULT NULL,
`bulan_bayar` varchar(35) DEFAULT NULL,
`id_tahun` int(11) DEFAULT NULL,
`id_jenis_pembayaran` int(11) DEFAULT NULL,
`jumlah_bayar` decimal(10,0) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `tb_pengeluaran`
--
CREATE TABLE `tb_pengeluaran` (
`id_pengeluaran` int(11) NOT NULL,
`tanggal` date DEFAULT NULL,
`keterangan` text DEFAULT NULL,
`jumlah_rupiah` decimal(10,0) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `tb_pos_keuangan`
--
CREATE TABLE `tb_pos_keuangan` (
`id_pos` int(11) NOT NULL,
`nama_pos` varchar(20) DEFAULT NULL,
`keterangan` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `tb_role`
--
CREATE TABLE `tb_role` (
`id_role` int(11) NOT NULL,
`nama_role` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `tb_role`
--
INSERT INTO `tb_role` (`id_role`, `nama_role`) VALUES
(1, 'Admin'),
(2, 'Petugas'),
(3, 'Kepala Sekolah'),
(4, 'Siswa');
-- --------------------------------------------------------
--
-- Struktur dari tabel `tb_siswa`
--
CREATE TABLE `tb_siswa` (
`nisn` varchar(11) NOT NULL,
`nis` int(11) DEFAULT NULL,
`nama_lengkap` varchar(40) DEFAULT NULL,
`alamat` text DEFAULT NULL,
`no_telp` varchar(14) DEFAULT NULL,
`id_kelas` int(11) DEFAULT NULL,
`id_tahun` int(11) DEFAULT NULL,
`avatar` text DEFAULT NULL,
`no_pembayaran` varchar(11) DEFAULT NULL,
`username` varchar(30) DEFAULT NULL,
`password` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `tb_tahun_ajaran`
--
CREATE TABLE `tb_tahun_ajaran` (
`id_tahun` int(11) NOT NULL,
`tahun_ajaran` varchar(10) DEFAULT NULL,
`status` enum('aktif','tidak aktif') DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `tb_tahun_ajaran`
--
INSERT INTO `tb_tahun_ajaran` (`id_tahun`, `tahun_ajaran`, `status`) VALUES
(2, '2020-2021', 'tidak aktif');
--
-- Indexes for dumped tables
--
--
-- Indeks untuk tabel `tb_agenda`
--
ALTER TABLE `tb_agenda`
ADD PRIMARY KEY (`id_agenda`);
--
-- Indeks untuk tabel `tb_identitas`
--
ALTER TABLE `tb_identitas`
ADD PRIMARY KEY (`id_identitas`);
--
-- Indeks untuk tabel `tb_jenis_pembayaran`
--
ALTER TABLE `tb_jenis_pembayaran`
ADD PRIMARY KEY (`id_jenis`),
ADD KEY `FORIEGN` (`id_pos`,`id_tahun`,`id_kelas`),
ADD KEY `id_tahun` (`id_tahun`),
ADD KEY `id_kelas` (`id_kelas`);
--
-- Indeks untuk tabel `tb_karyawan`
--
ALTER TABLE `tb_karyawan`
ADD PRIMARY KEY (`id_karyawan`),
ADD KEY `id_role` (`id_role`);
--
-- Indeks untuk tabel `tb_kelas`
--
ALTER TABLE `tb_kelas`
ADD PRIMARY KEY (`id_kelas`),
ADD KEY `FORIEGN` (`id_kompetensi`) USING BTREE;
--
-- Indeks untuk tabel `tb_kompetensi`
--
ALTER TABLE `tb_kompetensi`
ADD PRIMARY KEY (`id_kompetensi`);
--
-- Indeks untuk tabel `tb_pemasukan`
--
ALTER TABLE `tb_pemasukan`
ADD PRIMARY KEY (`id_pemasukan`);
--
-- Indeks untuk tabel `tb_pembayaran`
--
ALTER TABLE `tb_pembayaran`
ADD PRIMARY KEY (`no_pembayaran`),
ADD KEY `id_tahun` (`id_tahun`),
ADD KEY `id_jenis_pembayaran` (`id_jenis_pembayaran`),
ADD KEY `nisn` (`nisn`),
ADD KEY `id_karyawan` (`id_karyawan`) USING BTREE;
--
-- Indeks untuk tabel `tb_pengeluaran`
--
ALTER TABLE `tb_pengeluaran`
ADD PRIMARY KEY (`id_pengeluaran`);
--
-- Indeks untuk tabel `tb_pos_keuangan`
--
ALTER TABLE `tb_pos_keuangan`
ADD PRIMARY KEY (`id_pos`);
--
-- Indeks untuk tabel `tb_role`
--
ALTER TABLE `tb_role`
ADD PRIMARY KEY (`id_role`);
--
-- Indeks untuk tabel `tb_siswa`
--
ALTER TABLE `tb_siswa`
ADD PRIMARY KEY (`nisn`),
ADD KEY `FORIEGN` (`id_kelas`,`no_pembayaran`,`id_tahun`) USING BTREE,
ADD KEY `id_tahun` (`id_tahun`),
ADD KEY `tb_siswa_ibfk_3` (`no_pembayaran`);
--
-- Indeks untuk tabel `tb_tahun_ajaran`
--
ALTER TABLE `tb_tahun_ajaran`
ADD PRIMARY KEY (`id_tahun`);
--
-- AUTO_INCREMENT untuk tabel yang dibuang
--
--
-- AUTO_INCREMENT untuk tabel `tb_agenda`
--
ALTER TABLE `tb_agenda`
MODIFY `id_agenda` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT untuk tabel `tb_identitas`
--
ALTER TABLE `tb_identitas`
MODIFY `id_identitas` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT untuk tabel `tb_jenis_pembayaran`
--
ALTER TABLE `tb_jenis_pembayaran`
MODIFY `id_jenis` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT untuk tabel `tb_karyawan`
--
ALTER TABLE `tb_karyawan`
MODIFY `id_karyawan` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT untuk tabel `tb_kelas`
--
ALTER TABLE `tb_kelas`
MODIFY `id_kelas` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT untuk tabel `tb_kompetensi`
--
ALTER TABLE `tb_kompetensi`
MODIFY `id_kompetensi` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT untuk tabel `tb_pemasukan`
--
ALTER TABLE `tb_pemasukan`
MODIFY `id_pemasukan` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT untuk tabel `tb_pengeluaran`
--
ALTER TABLE `tb_pengeluaran`
MODIFY `id_pengeluaran` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT untuk tabel `tb_pos_keuangan`
--
ALTER TABLE `tb_pos_keuangan`
MODIFY `id_pos` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT untuk tabel `tb_role`
--
ALTER TABLE `tb_role`
MODIFY `id_role` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT untuk tabel `tb_tahun_ajaran`
--
ALTER TABLE `tb_tahun_ajaran`
MODIFY `id_tahun` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- Ketidakleluasaan untuk tabel pelimpahan (Dumped Tables)
--
--
-- Ketidakleluasaan untuk tabel `tb_jenis_pembayaran`
--
ALTER TABLE `tb_jenis_pembayaran`
ADD CONSTRAINT `tb_jenis_pembayaran_ibfk_1` FOREIGN KEY (`id_pos`) REFERENCES `tb_pos_keuangan` (`id_pos`),
ADD CONSTRAINT `tb_jenis_pembayaran_ibfk_2` FOREIGN KEY (`id_tahun`) REFERENCES `tb_tahun_ajaran` (`id_tahun`),
ADD CONSTRAINT `tb_jenis_pembayaran_ibfk_3` FOREIGN KEY (`id_kelas`) REFERENCES `tb_kelas` (`id_kelas`);
--
-- Ketidakleluasaan untuk tabel `tb_karyawan`
--
ALTER TABLE `tb_karyawan`
ADD CONSTRAINT `tb_karyawan_ibfk_1` FOREIGN KEY (`id_role`) REFERENCES `tb_role` (`id_role`);
--
-- Ketidakleluasaan untuk tabel `tb_kelas`
--
ALTER TABLE `tb_kelas`
ADD CONSTRAINT `tb_kelas_ibfk_1` FOREIGN KEY (`id_kompetensi`) REFERENCES `tb_kompetensi` (`id_kompetensi`);
--
-- Ketidakleluasaan untuk tabel `tb_pembayaran`
--
ALTER TABLE `tb_pembayaran`
ADD CONSTRAINT `tb_pembayaran_ibfk_1` FOREIGN KEY (`nisn`) REFERENCES `tb_siswa` (`nisn`),
ADD CONSTRAINT `tb_pembayaran_ibfk_2` FOREIGN KEY (`id_tahun`) REFERENCES `tb_tahun_ajaran` (`id_tahun`),
ADD CONSTRAINT `tb_pembayaran_ibfk_3` FOREIGN KEY (`id_karyawan`) REFERENCES `tb_karyawan` (`id_karyawan`),
ADD CONSTRAINT `tb_pembayaran_ibfk_4` FOREIGN KEY (`id_jenis_pembayaran`) REFERENCES `tb_jenis_pembayaran` (`id_jenis`);
--
-- Ketidakleluasaan untuk tabel `tb_siswa`
--
ALTER TABLE `tb_siswa`
ADD CONSTRAINT `tb_siswa_ibfk_1` FOREIGN KEY (`id_kelas`) REFERENCES `tb_kelas` (`id_kelas`),
ADD CONSTRAINT `tb_siswa_ibfk_2` FOREIGN KEY (`id_tahun`) REFERENCES `tb_tahun_ajaran` (`id_tahun`),
ADD CONSTRAINT `tb_siswa_ibfk_3` FOREIGN KEY (`no_pembayaran`) REFERENCES `tb_pembayaran` (`no_pembayaran`);
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>db/sql/4569__update_table_vipunentk_lisatiedot_koulutusmuoto.sql
/****** Script for SelectTopNRows command from SSMS ******/
use VipunenTK_lisatiedot
go
update [VipunenTK_lisatiedot].[dbo].[koulutusmuoto]
set koulutusmuoto_SV = 'utbildning för unga, utbildning inom skolsystemet (grundläggande utbildning, gymnasieutbildning för unga enligt läroplanen, annan yrkesexamen än fristående examen, yrkeshögskoleutbildning för unga, universitetsutbildning), omfattar även examina inom det militära området och examina avlagda utomlands.'
,koulutusmuoto_EN = 'youth education, education under the education system (basic education, general upper secondary education following the curriculum for young people, vocational other than competence-based qualification, polytechnic education for young people, university education), includes armed forces qualifications and qualifications attained abroad.'
where koulutusmuoto_koodi = '1'
|
<filename>scripts/DB/PostgreSQL/DWKitUpdate_2.6.sql<gh_stars>10-100
BEGIN;
DO $CanBeInlined$
BEGIN
BEGIN
BEGIN
ALTER TABLE "WorkflowScheme" ADD COLUMN "CanBeInlined" boolean NOT NULL DEFAULT FALSE;
EXCEPTION
WHEN duplicate_column THEN RAISE NOTICE 'column CanBeInlined already exists in WorkflowScheme.';
END;
END;
END $CanBeInlined$;
DO $InlinedSchemes$
BEGIN
BEGIN
BEGIN
ALTER TABLE "WorkflowScheme" ADD COLUMN "InlinedSchemes" character varying(1024) NULL;
EXCEPTION
WHEN duplicate_column THEN RAISE NOTICE 'column InlinedSchemes already exists in WorkflowScheme.';
END;
END;
END $InlinedSchemes$;
COMMIT; |
<reponame>cincuranet/FirebirdDbComparer
set term ^ ;
create procedure p (in_i int)
returns (out_i int)
as
begin
out_i = in_i * 2;
end^
set term ;^ |
alter table "public"."games"
add constraint "games_card_play_style_fkey"
foreign key ("card_play_style")
references "public"."game_card_play_style"
("value") on update restrict on delete restrict;
|
<reponame>gpipperr/OraPowerShell
--==============================================================================
-- GPI - <NAME>
-- Desc: only for ms powerschell
--==============================================================================
$ (get-host).UI.RawUI.Backgroundcolor="DarkRed" |
<filename>test-db/src/main/resources/create-db.sql<gh_stars>0
DROP TABLE IF EXISTS patient;
DROP TABLE IF EXISTS nurse;
CREATE TABLE nurse(
id int NOT NULL auto_increment,
first_name varchar(50) NOT NULL,
last_name varchar(50) NOT NULL,
CONSTRAINT nurse_pk PRIMARY KEY (id)
);
CREATE TABLE patient(
id int NOT NULL auto_increment,
first_name varchar(50) NOT NULL,
last_name varchar(50) NOT NULL,
diagnosis varchar(100),
illness_date date NOT NULL,
nurse_id int,
CONSTRAINT patient_pk PRIMARY KEY (id),
CONSTRAINT patient_nurse_fk FOREIGN KEY (nurse_id) REFERENCES nurse(id)
); |
<reponame>viswaratha12/dbwarden
/****** Object: StoredProcedure [dbo].[GetMassCorrectionID] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[GetMassCorrectionID]
/****************************************************
**
** Desc: Gets Mass Correction ID for given ModSymbol
**
** Return values: 0: failure, otherwise, MassCorrectionID
**
** Auth: kja
** Date: 08/22/2004
** 08/03/2017 mem - Add Set NoCount On
** 11/30/2018 mem - Renamed the Monoisotopic_Mass and Average_Mass columns
** 04/02/2020 mem - Change @modMass from a varchar to a float
**
*****************************************************/
(
@modMass float
)
As
Set NoCount On
Declare @MassCorrectionID int = 0
Declare @MCVariance float = 0.00006
SELECT @MassCorrectionID = Mass_Correction_ID
FROM T_Mass_Correction_Factors
WHERE (Monoisotopic_Mass < @modMass + @MCVariance AND
Monoisotopic_Mass > @modMass - @MCVariance)
return @MassCorrectionID
GO
GRANT VIEW DEFINITION ON [dbo].[GetMassCorrectionID] TO [DDL_Viewer] AS [dbo]
GO
GRANT VIEW DEFINITION ON [dbo].[GetMassCorrectionID] TO [Limited_Table_Write] AS [dbo]
GO
|
<reponame>sasiperi/alexa-spring-boot<filename>samples/alexa_oms/DB/DML/populate.sql
/**** Customer *************** */
INSERT INTO `ad_6c8971fa5f71c05`.`customer` (`customer_id`, `created`, `last_updated_by`, `updated`, `dob`, `email`, `first_name`, `last_name`, `password`) VALUES ('1', now(), 'sasi', now(), '01-02-1999', '<EMAIL>', 'Sasi', '<PASSWORD>', '<PASSWORD>');
INSERT INTO `ad_6c8971fa5f71c05`.`customer` (`customer_id`, `created`, `last_updated_by`, `updated`, `dob`, `email`, `first_name`, `last_name`, `password`) VALUES ('2', now(), 'sasi', now(), now(), '<EMAIL>', 'kala', '<PASSWORD>', '<PASSWORD>');
INSERT INTO `customer` (`customer_id`, `created`, `last_updated_by`, `updated`, `dob`, `email`, `first_name`, `last_name`, `password`) VALUES ('1', now(), 'sasi', now(), '01-02-1999', '<EMAIL>', 'Sasi', '<PASSWORD>', <PASSWORD>');
INSERT INTO customer` (`customer_id`, `created`, `last_updated_by`, `updated`, `dob`, `email`, `first_name`, `last_name`, `password`) VALUES ('2', now(), 'sasi', now(), now(), '<EMAIL>', 'kala', '<PASSWORD>', <PASSWORD>');
/* ********* */
//702016
insert into customer_order (order_number, created, last_updated_by, updated, order_status, order_status_reason, order_total, customer_id)
values ('123',now(),'sasi','2017-02-01' ,'SHIPPED','This order is shipped on 2017-Feb-20', 200,1);
insert into customer_order (order_number, created, last_updated_by, updated, order_status, order_status_reason, order_total, customer_id)
values ('555','2017-03-01' ,'sasi',now(),'SHIPPED','This order is shipped on 2017-March-10', 150,1);
insert into customer_order (order_number, created, last_updated_by, updated, order_status, order_status_reason, order_total, customer_id)
values ('568',now(),'sasi',now(),'PENDING','This order is waiting to for inurance verification',10,1);
insert into customer_order (order_number, created, last_updated_by, updated, order_status, order_status_reason, order_total, customer_id)
values ('789','2017-02-28','sasi',now(),'CANCELLED','This order was cancelled by customer on 2017-March-05',600,2);
/* ********* */
insert into customer_order_detail (line_item_id, created, last_updated_by, updated, price, product_code, product_desc, quantity, order_number)
values (1,now(),'sasi',now(),50,'5253676','Similac Sensitive Ready to Feed Bottle',2,123);
insert into customer_order_detail (line_item_id, created, last_updated_by, updated, price, product_code, product_desc, quantity, order_number)
values (2,now(),'sasi',now(),100,'75869353','Enfamil Gentlease Powder',1,123);
insert into customer_order_detail (line_item_id, created, last_updated_by, updated, price, product_code, product_desc, quantity, order_number)
values (3,now(),'sasi',now(),150,'ZPL12000','Cardinal Health Essentials Lancng Device',1,555);
insert into customer_order_detail (line_item_id, created, last_updated_by, updated, price, product_code, product_desc, quantity, order_number)
values (4,now(),'sasi',now(),10,'70022136','OneTouch Delica Lancet',5,568);
insert into customer_order_detail (line_item_id, created, last_updated_by, updated, price, product_code, product_desc, quantity, order_number)
values (5,now(),'sasi',now(),10,'70022136','OneTouch Delica Lancet',10,789);
insert into customer_order_detail (line_item_id, created, last_updated_by, updated, price, product_code, product_desc, quantity, order_number)
values (6,now(),'sasi',now(),100,'75869353','Enfamil Gentlease Powder',1,789);
insert into customer_order_detail (line_item_id, created, last_updated_by, updated, price, product_code, product_desc, quantity, order_number)
values (7,now(),'sasi',now(),400,'ZPL12000','Cardinal Health Essentials Lancng Device',1,789);
|
<filename>config/model/usbmeta/SubClass/Replace.sql
REPLACE INTO usbmeta_subclass(
class_id,
subclass_id,
subclass_desc
)
VALUES (
:class_id,
:subclass_id,
:subclass_desc
)
|
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[{0}]') AND type = 'U')
DROP TABLE [dbo].[{0}]
IF OBJECT_ID (N'EndpointQueue', N'U') IS NOT NULL
BEGIN
declare @sql nvarchar(200)
set @sql = 'delete from EndpointQueue where QueueName = ''{0}''';
exec sp_executesql @sql
END |
-- phpMyAdmin SQL Dump
-- version 4.0.10.10
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1:3306
-- Время создания: Июл 29 2016 г., 15:35
-- Версия сервера: 5.5.45
-- Версия PHP: 5.4.44
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- База данных: `auto`
--
-- --------------------------------------------------------
--
-- Структура таблицы `auto_com_brands`
--
CREATE TABLE IF NOT EXISTS `auto_com_brands` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` tinytext,
`group` tinytext,
`url` tinytext,
`updated` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `url` (`url`(200))
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COMMENT='Список брендов' AUTO_INCREMENT=280 ;
--
-- Дамп данных таблицы `auto_com_brands`
--
INSERT INTO `auto_com_brands` (`id`, `name`, `group`, `url`, `updated`) VALUES
(1, 'Alke', 'light_trucks', '/catalog/light_trucks/alke/', 1408905257),
(2, 'DongFeng', 'light_trucks', '/catalog/light_trucks/dongfeng/', 1408905257),
(3, 'International', 'light_trucks', '/catalog/light_trucks/international/', 1408905257),
(4, 'Nissan', 'light_trucks', '/catalog/light_trucks/nissan/', 1408905257),
(5, 'Volteco', 'light_trucks', '/catalog/light_trucks/volteco/', 1408905257),
(6, 'Asia', 'light_trucks', '/catalog/light_trucks/asia/', 1408905257),
(7, 'Doninvest', 'light_trucks', '/catalog/light_trucks/doninvest/', 1408905257),
(8, 'Intrall', 'light_trucks', '/catalog/light_trucks/intrall/', 1408905257),
(9, 'Nysa', 'light_trucks', '/catalog/light_trucks/nysa/', 1408905257),
(10, 'YueJin', 'light_trucks', '/catalog/light_trucks/yuejin/', 1408905257),
(11, 'Barkas', 'light_trucks', '/catalog/light_trucks/barkas/', 1408905257),
(12, 'FAW', 'light_trucks', '/catalog/light_trucks/faw/', 1408905257),
(13, 'Isuzu', 'light_trucks', '/catalog/light_trucks/isuzu/', 1408905257),
(14, 'Opel', 'light_trucks', '/catalog/light_trucks/opel/', 1408905257),
(15, 'Автотор', 'light_trucks', '/catalog/light_trucks/avtotor/', 1408905257),
(16, 'BAW', 'light_trucks', '/catalog/light_trucks/baw/', 1408905257),
(17, 'Fiat', 'light_trucks', '/catalog/light_trucks/fiat/', 1408905257),
(18, 'IVECO', 'light_trucks', '/catalog/light_trucks/iveco/', 1408905257),
(19, 'Peugeot', 'light_trucks', '/catalog/light_trucks/peugeot/', 1408905257),
(20, 'ВАЗ', 'light_trucks', '/catalog/light_trucks/vaz/', 1408905258),
(21, 'BMC', 'light_trucks', '/catalog/light_trucks/bmc/', 1408905258),
(22, 'Ford', 'light_trucks', '/catalog/light_trucks/ford/', 1408905258),
(23, 'JAC', 'light_trucks', '/catalog/light_trucks/jac/', 1408905258),
(24, 'Piaggio', 'light_trucks', '/catalog/light_trucks/piaggio/', 1408905258),
(25, 'ВИС', 'light_trucks', '/catalog/light_trucks/vis/', 1408905258),
(26, 'Chana', 'light_trucks', '/catalog/light_trucks/chana/', 1408905258),
(27, 'Foton', 'light_trucks', '/catalog/light_trucks/foton/', 1408905258),
(28, 'Jinbei', 'light_trucks', '/catalog/light_trucks/jinbei_hiace/', 1408905258),
(29, 'Renault', 'light_trucks', '/catalog/light_trucks/renault/', 1408905258),
(30, 'ГАЗ', 'light_trucks', '/catalog/light_trucks/gaz/', 1408905258),
(31, 'Changan', 'light_trucks', '/catalog/light_trucks/changan/', 1408905258),
(32, 'Freightliner', 'light_trucks', '/catalog/light_trucks/freightliner/', 1408905258),
(33, 'JMC', 'light_trucks', '/catalog/light_trucks/jmc/', 1408905258),
(34, 'SEAT', 'light_trucks', '/catalog/light_trucks/seat/', 1408905258),
(35, 'ГолАЗ', 'light_trucks', '/catalog/light_trucks/golaz/', 1408905258),
(36, 'ChangFeng', 'light_trucks', '/catalog/light_trucks/changfeng/', 1408905258),
(37, 'Geely', 'light_trucks', '/catalog/light_trucks/geely/', 1408905258),
(38, 'Kia', 'light_trucks', '/catalog/light_trucks/kia/', 1408905258),
(39, 'Skoda', 'light_trucks', '/catalog/light_trucks/skoda/', 1408905258),
(40, 'ЕРАЗ', 'light_trucks', '/catalog/light_trucks/eraz/', 1408905258),
(41, 'Chevrolet', 'light_trucks', '/catalog/light_trucks/chevrolet/', 1408905258),
(42, 'GMC', 'light_trucks', '/catalog/light_trucks/gmc/', 1408905258),
(43, 'LDV', 'light_trucks', '/catalog/light_trucks/ldv/', 1408905258),
(44, 'Sokon', 'light_trucks', '/catalog/light_trucks/sokon/', 1408905258),
(45, 'ЗАЗ', 'light_trucks', '/catalog/light_trucks/zaz/', 1408905258),
(46, 'Citroen', 'light_trucks', '/catalog/light_trucks/citroen/', 1408905259),
(47, '<NAME>', 'light_trucks', '/catalog/light_trucks/golden-dragon/', 1408905259),
(48, 'Lincoln', 'light_trucks', '/catalog/light_trucks/lincoln/', 1408905259),
(49, '<NAME>', 'light_trucks', '/catalog/light_trucks/ssang-yong/', 1408905259),
(50, 'ИЖ', 'light_trucks', '/catalog/light_trucks/izh/', 1408905259),
(51, 'Dacia', 'light_trucks', '/catalog/light_trucks/dacia/', 1408905259),
(52, 'Goupil', 'light_trucks', '/catalog/light_trucks/goupil/', 1408905259),
(53, 'Lublin', 'light_trucks', '/catalog/light_trucks/lublin/', 1408905259),
(54, 'Subaru', 'light_trucks', '/catalog/light_trucks/subaru/', 1408905259),
(55, 'Москвич (АЗЛК)', 'light_trucks', '/catalog/light_trucks/moscvich/', 1408905259),
(56, 'Daewoo', 'light_trucks', '/catalog/light_trucks/daewoo/', 1408905259),
(57, 'Great Wall', 'light_trucks', '/catalog/light_trucks/great-wall/', 1408905259),
(58, 'Mazda', 'light_trucks', '/catalog/light_trucks/mazda/', 1408905259),
(59, 'Suzuki', 'light_trucks', '/catalog/light_trucks/suzuki/', 1408905259),
(60, 'РАФ', 'light_trucks', '/catalog/light_trucks/raf/', 1408905259),
(61, 'DAF', 'light_trucks', '/catalog/light_trucks/daf/', 1408905259),
(62, 'Groz', 'light_trucks', '/catalog/light_trucks/groz/', 1408905259),
(63, 'Mercedes-Benz', 'light_trucks', '/catalog/light_trucks/mercedes/', 1408905259),
(64, 'Toyota', 'light_trucks', '/catalog/light_trucks/toyota/', 1408905259),
(65, 'Самотлор-НН', 'light_trucks', '/catalog/light_trucks/samotlor-nn-/', 1408905259),
(66, 'Daihatsu', 'light_trucks', '/catalog/light_trucks/daihatsu/', 1408905259),
(67, 'Honda', 'light_trucks', '/catalog/light_trucks/honda/', 1408905259),
(68, 'MG', 'light_trucks', '/catalog/light_trucks/mg/', 1408905259),
(69, 'Trabant', 'light_trucks', '/catalog/light_trucks/trabant/', 1408905259),
(70, 'СЕМАР', 'light_trucks', '/catalog/light_trucks/semar/', 1408905259),
(71, 'DFSK', 'light_trucks', '/catalog/light_trucks/dfsk/', 1408905259),
(72, 'Hyundai', 'light_trucks', '/catalog/light_trucks/hyundai/', 1408905259),
(73, 'Mitsubishi', 'light_trucks', '/catalog/light_trucks/mitsubishi/', 1408905260),
(74, 'Vauxhall', 'light_trucks', '/catalog/light_trucks/vauxhall/', 1408905260),
(75, 'ТагАЗ', 'light_trucks', '/catalog/light_trucks/tagaz/', 1408905260),
(76, 'Dodge', 'light_trucks', '/catalog/light_trucks/dodge/', 1408905260),
(77, 'IFA', 'light_trucks', '/catalog/light_trucks/ifa/', 1408905260),
(78, 'Mudan', 'light_trucks', '/catalog/light_trucks/mudan/', 1408905260),
(79, 'Volkswagen', 'light_trucks', '/catalog/light_trucks/volkswagen/', 1408905260),
(80, 'УАЗ', 'light_trucks', '/catalog/light_trucks/uaz/', 1408905260),
(81, 'Daewoo', 'artic', '/catalog/artic/daewoo/', 1408968218),
(82, 'Howo', 'artic', '/catalog/artic/howo/', 1408968218),
(83, 'Kenworth', 'artic', '/catalog/artic/kenworth/', 1408968219),
(84, 'Sterling', 'artic', '/catalog/artic/sterling/', 1408968219),
(85, 'КамАЗ', 'artic', '/catalog/artic/kamaz/', 1408968219),
(86, 'DAF', 'artic', '/catalog/artic/daf/', 1408968219),
(87, 'Hyundai', 'artic', '/catalog/artic/hyundai/', 1408968220),
(88, 'Mack', 'artic', '/catalog/artic/mack/', 1408968220),
(89, 'Steyr', 'artic', '/catalog/artic/steyr/', 1408968220),
(90, 'КРАЗ', 'artic', '/catalog/artic/kraz/', 1408968220),
(91, 'DongFeng', 'artic', '/catalog/artic/dongfeng/', 1408968220),
(92, 'International', 'artic', '/catalog/artic/international/', 1408968220),
(93, 'MAN', 'artic', '/catalog/artic/man/', 1408968221),
(94, 'TATA Daewoo', 'artic', '/catalog/artic/tata-daewoo/', 1408968221),
(95, 'МАЗ', 'artic', '/catalog/artic/maz/', 1408968221),
(96, 'ERF (MAN Truck)', 'artic', '/catalog/artic/erf/', 1408968221),
(97, 'Isuzu', 'artic', '/catalog/artic/isuzu/', 1408968221),
(98, 'Mercedes-Benz', 'artic', '/catalog/artic/mercedes/', 1408968222),
(99, 'Tatra', 'artic', '/catalog/artic/tatra/', 1408968222),
(100, 'МАЗ-МАН', 'artic', '/catalog/artic/maz-man/', 1408968222),
(101, 'FAW', 'artic', '/catalog/artic/faw/', 1408968222),
(102, 'IVECO', 'artic', '/catalog/artic/iveco/', 1408968222),
(103, 'Peterbilt', 'artic', '/catalog/artic/peterbilt/', 1408968222),
(104, 'Volkswagen', 'artic', '/catalog/artic/volkswagen/', 1408968223),
(105, 'МЗКТ', 'artic', '/catalog/artic/mzkt/', 1408968223),
(106, 'Ford', 'artic', '/catalog/artic/ford/', 1408968223),
(107, '<NAME>', 'artic', '/catalog/artic/iveco-ling-ye/', 1408968223),
(108, 'Renault', 'artic', '/catalog/artic/renault/', 1408968223),
(109, 'Volvo', 'artic', '/catalog/artic/volvo/', 1408968223),
(110, 'Русич (КЗКТ)', 'artic', '/catalog/artic/rusich-_kzkt_/', 1408968224),
(111, 'Freightliner', 'artic', '/catalog/artic/freightliner/', 1408968224),
(112, 'Iveco-Уралаз', 'artic', '/catalog/artic/iveco-uralaz/', 1408968224),
(113, 'Scania', 'artic', '/catalog/artic/scania/', 1408968224),
(114, 'БЗКТ', 'artic', '/catalog/artic/bzkt/', 1408968224),
(115, 'Тонар', 'artic', '/catalog/artic/tonar/', 1408968225),
(116, 'Hania', 'artic', '/catalog/artic/hania/', 1408968225),
(117, 'JAC', 'artic', '/catalog/artic/jac/', 1408968225),
(118, 'Shaanxi', 'artic', '/catalog/artic/shaanxi/', 1408968225),
(119, 'ГАЗ', 'artic', '/catalog/artic/gaz/', 1408968225),
(120, 'Урал', 'artic', '/catalog/artic/ural/', 1408968225),
(121, 'Hino', 'artic', '/catalog/artic/hino/', 1408968226),
(122, 'Kalmar', 'artic', '/catalog/artic/kalmar/', 1408968226),
(123, 'Sinotruck', 'artic', '/catalog/artic/sinotruck/', 1408968226),
(124, 'ЗИЛ', 'artic', '/catalog/artic/zil/', 1408968226),
(125, '<NAME>', 'artic', '/catalog/artic/yarovit-motors/', 1408968226),
(126, 'ASTRA', 'trucks', '/catalog/trucks/astra/', 1408969110),
(127, 'Hino', 'trucks', '/catalog/trucks/hino/', 1408969110),
(128, 'Naveco', 'trucks', '/catalog/trucks/naveco/', 1408969111),
(129, 'Terberg', 'trucks', '/catalog/trucks/terberg/', 1408969111),
(130, 'ЗСА', 'trucks', '/catalog/trucks/zsa/', 1408969111),
(131, 'Avia', 'trucks', '/catalog/trucks/avia/', 1408969111),
(132, 'Hoka', 'trucks', '/catalog/trucks/hoka/', 1408969111),
(133, 'Nissan', 'trucks', '/catalog/trucks/nissan/', 1408969112),
(134, 'Tiema', 'trucks', '/catalog/trucks/tiema/', 1408969112),
(135, 'КАЗ', 'trucks', '/catalog/trucks/kaz/', 1408969112),
(136, 'BAW', 'trucks', '/catalog/trucks/baw/', 1408969112),
(137, 'Howo', 'trucks', '/catalog/trucks/howo/', 1408969112),
(138, 'North Benz', 'trucks', '/catalog/trucks/north-benz/', 1408969112),
(139, 'Volvo', 'trucks', '/catalog/trucks/volvo/', 1408969113),
(140, 'КамАЗ', 'trucks', '/catalog/trucks/kamaz/', 1408969113),
(141, 'Beifan', 'trucks', '/catalog/trucks/beifan/', 1408969113),
(142, 'Hyundai', 'trucks', '/catalog/trucks/hyundai/', 1408969113),
(143, 'Peterbilt', 'trucks', '/catalog/trucks/peterbilt/', 1408969113),
(144, 'WAW', 'trucks', '/catalog/trucks/waw/', 1408969113),
(145, 'КРАЗ', 'trucks', '/catalog/trucks/kraz/', 1408969114),
(146, 'BMC', 'trucks', '/catalog/trucks/bmc/', 1408969114),
(147, 'International', 'trucks', '/catalog/trucks/international/', 1408969114),
(148, 'Pinzgauer', 'trucks', '/catalog/trucks/pinzgauer/', 1408969114),
(149, 'Western Star', 'trucks', '/catalog/trucks/western-star/', 1408969114),
(150, 'МАЗ', 'trucks', '/catalog/trucks/maz/', 1408969114),
(151, 'CAMC', 'trucks', '/catalog/trucks/camc/', 1408969115),
(152, 'Isuzu', 'trucks', '/catalog/trucks/isuzu/', 1408969115),
(153, 'Renault', 'trucks', '/catalog/trucks/renault/', 1408969115),
(154, 'YoungMan', 'trucks', '/catalog/trucks/youngman/', 1408969115),
(155, 'МАЗ-МАН', 'trucks', '/catalog/trucks/maz-man/', 1408969115),
(156, 'Caterpillar', 'trucks', '/catalog/trucks/caterpillar/', 1408969116),
(157, 'IVECO', 'trucks', '/catalog/trucks/iveco/', 1408969116),
(158, 'Robur', 'trucks', '/catalog/trucks/robur/', 1408969116),
(159, 'Автомастер', 'trucks', '/catalog/trucks/avtomaster/', 1408969116),
(160, 'МЗКТ', 'trucks', '/catalog/trucks/mzkt/', 1408969116),
(161, 'Chevrolet', 'trucks', '/catalog/trucks/chevrolet/', 1408969116),
(162, 'IVE<NAME>', 'trucks', '/catalog/trucks/iveco-hongyang/', 1408969117),
(163, 'Scania', 'trucks', '/catalog/trucks/scania/', 1408969117),
(164, 'Автотор', 'trucks', '/catalog/trucks/avtotor/', 1408969118),
(165, 'МоАЗ', 'trucks', '/catalog/trucks/moaz/', 1408969118),
(166, 'Daewoo', 'trucks', '/catalog/trucks/daewoo/', 1408969118),
(167, 'IVE<NAME>', 'trucks', '/catalog/trucks/iveco-ling-ye/', 1408969118),
(168, 'Shaanxi-MAN', 'trucks', '/catalog/trucks/shaanxi-man/', 1408969118),
(169, 'АМУР', 'trucks', '/catalog/trucks/amur/', 1408969119),
(170, 'НефАЗ', 'trucks', '/catalog/trucks/nefaz/', 1408969119),
(171, 'DAF', 'trucks', '/catalog/trucks/daf/', 1408969119),
(172, 'Iveco-Уралаз', 'trucks', '/catalog/trucks/iveco-uralaz/', 1408969119),
(173, 'Shacman', 'trucks', '/catalog/trucks/shacman/', 1408969119),
(174, 'БЗКТ', 'trucks', '/catalog/trucks/bzkt/', 1408969119),
(175, 'Русич (КЗКТ)', 'trucks', '/catalog/trucks/rusich-_kzkt_/', 1408969120),
(176, 'DongFeng', 'trucks', '/catalog/trucks/dongfeng/', 1408969120),
(177, 'JAC', 'trucks', '/catalog/trucks/jac/', 1408969120),
(178, 'Shenye', 'trucks', '/catalog/trucks/shenye/', 1408969120),
(179, 'ВЗМ', 'trucks', '/catalog/trucks/vzm/', 1408969120),
(180, 'СЗАП', 'trucks', '/catalog/trucks/szap/', 1408969120),
(181, 'FAW', 'trucks', '/catalog/trucks/faw/', 1408969121),
(182, 'JMC', 'trucks', '/catalog/trucks/jmc/', 1408969132),
(183, 'Silant', 'trucks', '/catalog/trucks/silant/', 1408969132),
(184, 'ВМЗ', 'trucks', '/catalog/trucks/vmz/', 1408969132),
(185, 'Техноспас-НН', 'trucks', '/catalog/trucks/tehnospas-nn/', 1408969132),
(186, 'Ford', 'trucks', '/catalog/trucks/ford/', 1408969132),
(187, 'Kia', 'trucks', '/catalog/trucks/kia/', 1408969133),
(188, 'Star', 'trucks', '/catalog/trucks/star/', 1408969133),
(189, 'ГАЗ', 'trucks', '/catalog/trucks/gaz/', 1408969133),
(190, 'Тонар', 'trucks', '/catalog/trucks/tonar/', 1408969133),
(191, 'Foton', 'trucks', '/catalog/trucks/foton/', 1408969133),
(192, 'MAN', 'trucks', '/catalog/trucks/man/', 1408969133),
(193, 'Sterling', 'trucks', '/catalog/trucks/sterling/', 1408969134),
(194, 'ГАЗ-САЗ', 'trucks', '/catalog/trucks/gaz-saz/', 1408969134),
(195, 'УАЗ', 'trucks', '/catalog/trucks/uaz/', 1408969134),
(196, 'Freightliner', 'trucks', '/catalog/trucks/freightliner/', 1408969134),
(197, 'Mercedes-Benz', 'trucks', '/catalog/trucks/mercedes/', 1408969134),
(198, 'TATA', 'trucks', '/catalog/trucks/tata/', 1408969135),
(199, 'Граз', 'trucks', '/catalog/trucks/graz/', 1408969135),
(200, 'Урал', 'trucks', '/catalog/trucks/ural/', 1408969135),
(201, 'GMC', 'trucks', '/catalog/trucks/gmc/', 1408969135),
(202, 'Mitsubishi', 'trucks', '/catalog/trucks/mitsubishi/', 1408969135),
(203, 'TATA Daewoo', 'trucks', '/catalog/trucks/tata-daewoo/', 1408969136),
(204, 'Гуран', 'trucks', '/catalog/trucks/guran/', 1408969136),
(205, 'ЯРОВИТ МОТОРС', 'trucks', '/catalog/trucks/yarovit-motors/', 1408969136),
(206, 'Hania', 'trucks', '/catalog/trucks/hania/', 1408969136),
(207, 'Mudan', 'trucks', '/catalog/trucks/mudan/', 1408969136),
(208, 'Tatra', 'trucks', '/catalog/trucks/tatra/', 1408969136),
(209, 'ЗИЛ', 'trucks', '/catalog/trucks/zil/', 1408969137),
(210, 'ANKAI', 'bus', '/catalog/bus/ankai/', 1408970433),
(211, 'Ikarbus', 'bus', '/catalog/bus/ikarbus/', 1408970433),
(212, 'Mudan', 'bus', '/catalog/bus/mudan/', 1408970433),
(213, 'Volkswagen', 'bus', '/catalog/bus/volkswagen/', 1408970433),
(214, 'КамАЗ', 'bus', '/catalog/bus/kamaz/', 1408970434),
(215, 'Asia', 'bus', '/catalog/bus/asia/', 1408970434),
(216, 'Ikarus', 'bus', '/catalog/bus/ikarus/', 1408970434),
(217, 'Neoplan', 'bus', '/catalog/bus/neoplan/', 1408970434),
(218, 'Volvo', 'bus', '/catalog/bus/volvo/', 1408970434),
(219, 'ЛАЗ', 'bus', '/catalog/bus/laz/', 1408970434),
(220, 'Ayats', 'bus', '/catalog/bus/ayats/', 1408970435),
(221, 'Intech', 'bus', '/catalog/bus/intech/', 1408970435),
(222, 'Otokar', 'bus', '/catalog/bus/otokar/', 1408970435),
(223, 'Yutong', 'bus', '/catalog/bus/yutong/', 1408970435),
(224, 'ЛиАЗ', 'bus', '/catalog/bus/liaz/', 1408970435),
(225, 'BAW', 'bus', '/catalog/bus/baw/', 1408970436),
(226, 'Irisbus', 'bus', '/catalog/bus/irisbus/', 1408970436),
(227, 'Otoyol', 'bus', '/catalog/bus/otoyol/', 1408970436),
(228, '<NAME>', 'bus', '/catalog/bus/zhong-tong/', 1408970436),
(229, 'МАЗ', 'bus', '/catalog/bus/maz/', 1408970436),
(230, 'Bluebird', 'bus', '/catalog/bus/bluebird/', 1408970436),
(231, 'IVECO', 'bus', '/catalog/bus/iveco/', 1408970437),
(232, 'Scania', 'bus', '/catalog/bus/scania/', 1408970437),
(233, 'Zonda', 'bus', '/catalog/bus/zonda/', 1408970437),
(234, 'МАРЗ', 'bus', '/catalog/bus/marz/', 1408970437),
(235, 'Bova', 'bus', '/catalog/bus/bova/', 1408970438),
(236, 'JAC', 'bus', '/catalog/bus/jac/', 1408970438),
(237, 'Setra', 'bus', '/catalog/bus/setra/', 1408970438),
(238, 'Альтерна', 'bus', '/catalog/bus/alterna/', 1408970438),
(239, '<NAME>', 'bus', '/catalog/bus/oz-neman/', 1408970438),
(240, 'Bristol', 'bus', '/catalog/bus/bristol/', 1408970438),
(241, 'Jelcz', 'bus', '/catalog/bus/jelcz/', 1408970439),
(242, 'Solaris', 'bus', '/catalog/bus/solaris/', 1408970439),
(243, 'БАЗ_', 'bus', '/catalog/bus/baz_/', 1408970439),
(244, 'НефАЗ', 'bus', '/catalog/bus/nefaz/', 1408970439),
(245, 'Daewoo', 'bus', '/catalog/bus/daewoo/', 1408970439),
(246, 'Karosa', 'bus', '/catalog/bus/karosa/', 1408970439),
(247, 'TAM', 'bus', '/catalog/bus/tam/', 1408970440),
(248, 'Богдан', 'bus', '/catalog/bus/bogdan/', 1408970440),
(249, 'ПАЗ', 'bus', '/catalog/bus/paz/', 1408970440),
(250, 'DongFeng', 'bus', '/catalog/bus/dongfeng/', 1408970440),
(251, 'Kia', 'bus', '/catalog/bus/kia/', 1408970440),
(252, 'Temsa', 'bus', '/catalog/bus/temsa/', 1408970441),
(253, 'Волжанин', 'bus', '/catalog/bus/volzhanin/', 1408970441),
(254, 'РМЗ', 'bus', '/catalog/bus/rmz/', 1408970441),
(255, 'Ford', 'bus', '/catalog/bus/ford/', 1408970441),
(256, '<NAME>', 'bus', '/catalog/bus/king-long/', 1408970441),
(257, '<NAME> Buses', 'bus', '/catalog/bus/thomas-built-buses/', 1408970441),
(258, 'ГАЗ', 'bus', '/catalog/bus/gaz/', 1408970442),
(259, 'РоАЗ', 'bus', '/catalog/bus/roaz/', 1408970442),
(260, 'Foton', 'bus', '/catalog/bus/foton/', 1408970442),
(261, 'MAN', 'bus', '/catalog/bus/man/', 1408970442),
(262, 'Toyota', 'bus', '/catalog/bus/toyota/', 1408970442),
(263, 'ГолАЗ', 'bus', '/catalog/bus/golaz/', 1408970442),
(264, 'СЕМАР', 'bus', '/catalog/bus/semar/', 1408970443),
(265, 'Golden Dragon', 'bus', '/catalog/bus/golden-dragon/', 1408970443),
(266, 'Marcopolo', 'bus', '/catalog/bus/marcopolo-/', 1408970443),
(267, '<NAME>', 'bus', '/catalog/bus/van_hool/', 1408970443),
(268, 'ЗАЗ', 'bus', '/catalog/bus/zaz/', 1408970443),
(269, 'ТулаБус', 'bus', '/catalog/bus/tulabus/', 1408970443),
(270, 'Higer', 'bus', '/catalog/bus/higer/', 1408970444),
(271, 'Mercedes-Benz', 'bus', '/catalog/bus/mercedes/', 1408970454),
(272, 'V<NAME>', 'bus', '/catalog/bus/vdl-berkhof/', 1408970454),
(273, 'ЗИЛ', 'bus', '/catalog/bus/zil/', 1408970454),
(274, 'Тушино-Авто', 'bus', '/catalog/bus/tushino-avto/', 1408970454),
(275, 'Hyundai', 'bus', '/catalog/bus/hyundai/', 1408970454),
(276, 'Mitsubishi', 'bus', '/catalog/bus/mitsubishi/', 1408970454),
(277, 'VDL Bus Chassis (DAF)', 'bus', '/catalog/bus/vdl-bus-chassis-_daf_/', 1408970455),
(278, 'КАвЗ', 'bus', '/catalog/bus/kavz/', 1408970455),
(279, 'Урал', 'bus', '/catalog/bus/ural/', 1408970455);
/*!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 */;
|
/*
Navicat MySQL Data Transfer
Source Server : 李建博
Source Server Type : MySQL
Source Server Version : 50726
Source Host : 127.0.0.1:3306
Source Schema : vueapi
Target Server Type : MySQL
Target Server Version : 50726
File Encoding : 65001
Date: 10/04/2021 16:53:48
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for exam_orga
-- ----------------------------
DROP TABLE IF EXISTS `exam_orga`;
CREATE TABLE `exam_orga` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`exam_id` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '机构id',
`exam_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '机构名称',
`exam_branch` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '分支机构',
`exam_city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '省级地址',
`exam_city1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '市级地址',
`exam_genre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '机构类型',
`exam_tel` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '电话',
`exam_start` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否启用',
`exam_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '图片',
`exam_property` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '机构属性',
`exam_coord1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '坐标北纬',
`exam_coord2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '坐标东经',
`startprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '地址',
`is_delete` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '0' COMMENT '0或1 0是未删除 1是已删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 125 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of exam_orga
-- ----------------------------
INSERT INTO `exam_orga` VALUES (3, '284562', '284562', '深圳店', '深圳', NULL, '深圳体验机构', '284562', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (2, '2', '456456', '520分店', '邯郸市', NULL, '专业体检机构2', '12312312315', '0', NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (4, '806735', '806735', '深圳店', '北京', NULL, '天津体验机构', '806735', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (5, '434277', '434277', '天津店', '北京', NULL, '深圳体验机构', '434277', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (6, '615793', '615793', '北京店', '北京', NULL, '天津体验机构', '615793', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (7, '682211', '682211', '天津店', '北京', NULL, '天津体验机构', '682211', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (8, '290239', '290239', '北京店', '北京', NULL, '天津体验机构', '290239', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (9, '643956', '643956', '深圳店', '天津', NULL, '上海,广州体验机构', '643956', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (10, '820651', '820651', '上海,广州店', '天津', NULL, '天津体验机构', '820651', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (11, '564472', '564472', '北京店', '北京', NULL, '深圳体验机构', '564472', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (12, '843087', '843087', '北京店', '天津', NULL, '天津体验机构', '843087', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (13, '643582', '643582', '北京店', '天津', NULL, '上海,广州体验机构', '643582', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (14, '314339', '314339', '北京店', '深圳', NULL, '北京体验机构', '314339', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (16, '150354', '150354', '深圳店', '北京', NULL, '天津体验机构', '150354', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (17, '740520', '740520', '天津店', '天津', NULL, '天津体验机构', '740520', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (18, '734721', '734721', '天津店', '北京', NULL, '北京体验机构', '734721', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (19, '730776', '730776', '北京店', '上海,广州', NULL, '上海,广州体验机构', '730776', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (20, '805100', '805100', '深圳店', '上海,广州', NULL, '上海,广州体验机构', '805100', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (21, '750337', '750337', '深圳店', '上海,广州', NULL, '天津体验机构', '750337', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (22, '653295', '653295', '天津店', '北京', NULL, '深圳体验机构', '653295', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (23, '252979', '252979', '天津店', '天津', NULL, '上海,广州体验机构', '252979', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (24, '736065', '736065', '天津店', '上海,广州', NULL, '北京体验机构', '736065', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (25, '960569', '960569', '北京店', '深圳', NULL, '深圳体验机构', '960569', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (26, '401704', '401704', '上海,广州店', '天津', NULL, '天津体验机构', '401704', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (27, '652591', '652591', '天津店', '天津', NULL, '北京体验机构', '652591', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (28, '552076', '552076', '上海,广州店', '上海,广州', NULL, '天津体验机构', '552076', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (29, '386189', '386189', '上海,广州店', '北京', NULL, '天津体验机构', '386189', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (30, '409628', '409628', '深圳店', '北京', NULL, '北京体验机构', '409628', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (31, '235619', '235619', '深圳店', '深圳', NULL, '天津体验机构', '235619', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (32, '652786', '652786', '天津店', '北京', NULL, '上海,广州体验机构', '652786', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (33, '582148', '582148', '天津店', '深圳', NULL, '北京体验机构', '582148', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (34, '722216', '722216', '天津店', '上海,广州', NULL, '深圳体验机构', '722216', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (35, '500237', '500237', '上海,广州店', '北京', NULL, '天津体验机构', '500237', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (36, '960758', '960758', '天津店', '天津', NULL, '北京体验机构', '960758', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (37, '587907', '587907', '北京店', '上海,广州', NULL, '上海,广州体验机构', '587907', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (38, '838240', '838240', '北京店', '北京', NULL, '深圳体验机构', '838240', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (39, '942307', '942307', '上海,广州店', '深圳', NULL, '北京体验机构', '942307', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (40, '410528', '410528', '深圳店', '北京', NULL, '北京体验机构', '410528', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (41, '200337', '200337', '北京店', '深圳', NULL, '北京体验机构', '200337', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (42, '302839', '302839', '深圳店', '北京', NULL, '天津体验机构', '302839', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (43, '594188', '594188', '上海,广州店', '上海,广州', NULL, '深圳体验机构', '594188', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (44, '827428', '827428', '北京店', '深圳', NULL, '上海,广州体验机构', '827428', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (45, '361702', '361702', '天津店', '天津', NULL, '北京体验机构', '361702', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (46, '740460', '740460', '深圳店', '上海,广州', NULL, '天津体验机构', '740460', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (47, '816603', '816603', '天津店', '天津', NULL, '北京体验机构', '816603', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (48, '158731', '158731', '上海,广州店', '北京', NULL, '北京体验机构', '158731', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (49, '386296', '386296', '深圳店', '北京', NULL, '天津体验机构', '386296', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (50, '284314', '284314', '上海,广州店', '上海,广州', NULL, '上海,广州体验机构', '284314', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (51, '898925', '898925', '天津店', '深圳', NULL, '深圳体验机构', '898925', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (52, '196674', '196674', '上海,广州店', '北京', NULL, '深圳体验机构', '196674', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (53, '100354', '100354', '天津店', '深圳', NULL, '天津体验机构', '100354', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (54, '197045', '197045', '上海,广州店', '天津', NULL, '深圳体验机构', '197045', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (55, '361800', '361800', '深圳店', '天津', NULL, '天津体验机构', '361800', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (56, '193015', '193015', '深圳店', '北京', NULL, '深圳体验机构', '193015', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (57, '231288', '231288', '上海,广州店', '天津', NULL, '深圳体验机构', '231288', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (58, '629508', '629508', '上海,广州店', '上海,广州', NULL, '天津体验机构', '629508', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (59, '296011', '296011', '天津店', '北京', NULL, '天津体验机构', '296011', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (60, '578599', '578599', '上海,广州店', '北京', NULL, '北京体验机构', '578599', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (61, '388011', '388011', '北京店', '深圳', NULL, '北京体验机构', '388011', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (62, '376856', '376856', '北京店', '深圳', NULL, '上海,广州体验机构', '376856', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (63, '524387', '524387', '北京店', '上海,广州', NULL, '深圳体验机构', '524387', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (64, '723902', '723902', '深圳店', '深圳', NULL, '上海,广州体验机构', '723902', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (65, '294038', '294038', '上海,广州店', '上海,广州', NULL, '上海,广州体验机构', '294038', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (66, '779181', '779181', '上海,广州店', '天津', NULL, '北京体验机构', '779181', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (67, '911119', '911119', '深圳店', '深圳', NULL, '北京体验机构', '911119', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (68, '286855', '286855', '天津店', '深圳', NULL, '北京体验机构', '286855', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (69, '274093', '274093', '北京店', '天津', NULL, '上海,广州体验机构', '274093', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (70, '450896', '450896', '深圳店', '天津', NULL, '天津体验机构', '450896', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (71, '242236', '242236', '上海,广州店', '天津', NULL, '天津体验机构', '242236', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (72, '660591', '660591', '深圳店', '深圳', NULL, '深圳体验机构', '660591', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (73, '905224', '905224', '深圳店', '深圳', NULL, '深圳体验机构', '905224', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (74, '717174', '717174', '天津店', '深圳', NULL, '上海,广州体验机构', '717174', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (75, '353135', '353135', '天津店', '北京', NULL, '天津体验机构', '353135', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (76, '318029', '318029', '天津店', '深圳', NULL, '上海,广州体验机构', '318029', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (77, '173265', '173265', '深圳店', '天津', NULL, '北京体验机构', '173265', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (78, '251788', '251788', '天津店', '北京', NULL, '天津体验机构', '251788', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (79, '905381', '905381', '上海,广州店', '天津', NULL, '天津体验机构', '905381', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (80, '330523', '330523', '天津店', '深圳', NULL, '深圳体验机构', '330523', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (81, '516868', '516868', '天津店', '天津', NULL, '深圳体验机构', '516868', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (82, '407031', '407031', '北京店', '上海,广州', NULL, '深圳体验机构', '407031', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (83, '612513', '612513', '上海,广州店', '天津', NULL, '深圳体验机构', '612513', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (84, '686674', '686674', '上海,广州店', '上海,广州', NULL, '深圳体验机构', '686674', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (85, '858572', '858572', '天津店', '深圳', NULL, '上海,广州体验机构', '858572', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (86, '664755', '664755', '上海,广州店', '上海,广州', NULL, '深圳体验机构', '664755', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (87, '102749', '102749', '深圳店', '天津', NULL, '上海,广州体验机构', '102749', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (88, '984004', '984004', '深圳店', '深圳', NULL, '北京体验机构', '984004', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (89, '969281', '969281', '天津店', '上海,广州', NULL, '天津体验机构', '969281', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (90, '192628', '192628', '上海,广州店', '天津', NULL, '深圳体验机构', '192628', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (91, '705101', '705101', '北京店', '天津', NULL, '天津体验机构', '705101', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (92, '678790', '678790', '深圳店', '天津', NULL, '深圳体验机构', '678790', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (93, '719912', '719912', '天津店', '天津', NULL, '上海,广州体验机构', '719912', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (94, '471832', '471832', '深圳店', '深圳', NULL, '上海,广州体验机构', '471832', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (95, '270561', '270561', '上海,广州店', '北京', NULL, '天津体验机构', '270561', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (96, '853044', '853044', '深圳店', '深圳', NULL, '上海,广州体验机构', '853044', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (97, '800353', '800353', '深圳店', '上海,广州', NULL, '深圳体验机构', '800353', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (98, '488010', '488010', '上海,广州店', '天津', NULL, '北京体验机构', '488010', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (99, '790575', '790575', '深圳店', '北京', NULL, '上海,广州体验机构', '790575', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (100, '727819', '727819', '上海,广州店', '深圳', NULL, '深圳体验机构', '727819', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (101, '875570', '875570', '深圳店', '深圳', NULL, '北京体验机构', '875570', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (102, '341241', '341241', '北京店', '上海,广州', NULL, '上海,广州体验机构', '341241', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (103, 'TJ-TEqnpRfI', 'aaa', 'bbb', 'cccc', NULL, NULL, 'dddd', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (104, 'K9cjzVAF', 'aaa', 'bbb', 'cccc', NULL, NULL, 'dddd', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (105, 'TEHTYTlM', 'aaa', 'bbb', 'cccc', NULL, NULL, 'dddd', NULL, NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (106, '00002', '试试看', '520分店', '邯郸市', NULL, '专业体检机构2', '12312312315', '0', NULL, NULL, NULL, NULL, NULL, '0');
INSERT INTO `exam_orga` VALUES (107, '00002', '试试看', '520分店', '邯郸市', NULL, '专业体检机构2', '12312312315', '0', 'https://img0.baidu.com/it/u=2151136234,3513236673&fm=26&fmt=auto&gp=0.jpg', '1', '15', '15', NULL, '0');
INSERT INTO `exam_orga` VALUES (108, '00107', '试试看', '520分店', '邯郸市', NULL, '专业体检机构2', '12312312315', '0', 'https://img0.baidu.com/it/u=2151136234,3513236673&fm=26&fmt=auto&gp=0.jpg', '1', '15', '15', NULL, '1');
INSERT INTO `exam_orga` VALUES (109, '00108', '试试看', '520分店', '邯郸市', NULL, '专业体检机构2', '12312312315', '0', 'https://img0.baidu.com/it/u=2151136234,3513236673&fm=26&fmt=auto&gp=0.jpg', '1', '15', '15', NULL, '1');
INSERT INTO `exam_orga` VALUES (123, '', '123', '123', 'shanghai', 'beijing', 'shanghai', '123', '1', 'https://img0.baidu.com/it/u=2151136234,3513236673&fm=26&fmt=auto&gp=0.jpg', '1', '123', '123', 123.00, '1');
INSERT INTO `exam_orga` VALUES (124, '2143', '1243', '143', 'shanghai', 'beijing', 'beijing', '432', '1', 'https://img0.baidu.com/it/u=2151136234,3513236673&fm=26&fmt=auto&gp=0.jpg', '1', '43', '2413', 43.00, '1');
SET FOREIGN_KEY_CHECKS = 1;
|
<reponame>17JZ0101-LEEHOJAE/DeliverySystem<filename>src/dbDelivery/InsertOrderdetail.sql
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: 17jz0101 <NAME>
* Created: 2018/11/29
*/
INSERT INTO ORDERDETAIL (ORDERDETAIL_ID, ITEM_ID, ORDER_ID, ORDERCOUNT, ORDERPRICE) VALUES (1, 'A01', 10001, 1, 2500);
INSERT INTO ORDERDETAIL (ORDERDETAIL_ID, ITEM_ID, ORDER_ID, ORDERCOUNT, ORDERPRICE) VALUES (2, 'A16', 10001, 1, 0);
INSERT INTO ORDERDETAIL (ORDERDETAIL_ID, ITEM_ID, ORDER_ID, ORDERCOUNT, ORDERPRICE) VALUES (3, 'A01', 10002, 1, 2500);
INSERT INTO ORDERDETAIL (ORDERDETAIL_ID, ITEM_ID, ORDER_ID, ORDERCOUNT, ORDERPRICE) VALUES (4, 'A16', 10002, 1, 0);
INSERT INTO ORDERDETAIL (ORDERDETAIL_ID, ITEM_ID, ORDER_ID, ORDERCOUNT, ORDERPRICE) VALUES (5, 'A01', 10003, 1, 2500);
INSERT INTO ORDERDETAIL (ORDERDETAIL_ID, ITEM_ID, ORDER_ID, ORDERCOUNT, ORDERPRICE) VALUES (6, 'A17', 10003, 1, 0);
INSERT INTO ORDERDETAIL (ORDERDETAIL_ID, ITEM_ID, ORDER_ID, ORDERCOUNT, ORDERPRICE) VALUES (7, 'A01', 10004, 1, 2500);
INSERT INTO ORDERDETAIL (ORDERDETAIL_ID, ITEM_ID, ORDER_ID, ORDERCOUNT, ORDERPRICE) VALUES (8, 'A17', 10004, 1, 0);
INSERT INTO ORDERDETAIL (ORDERDETAIL_ID, ITEM_ID, ORDER_ID, ORDERCOUNT, ORDERPRICE) VALUES (9, 'A01', 10005, 1, 2500);
INSERT INTO ORDERDETAIL (ORDERDETAIL_ID, ITEM_ID, ORDER_ID, ORDERCOUNT, ORDERPRICE) VALUES (10, 'A17', 10005, 1, 0);
INSERT INTO ORDERDETAIL (ORDERDETAIL_ID, ITEM_ID, ORDER_ID, ORDERCOUNT, ORDERPRICE) VALUES (11, 'A01', 10006, 1, 2500);
INSERT INTO ORDERDETAIL (ORDERDETAIL_ID, ITEM_ID, ORDER_ID, ORDERCOUNT, ORDERPRICE) VALUES (12, 'A16', 10006, 1, 0);
INSERT INTO ORDERDETAIL (ORDERDETAIL_ID, ITEM_ID, ORDER_ID, ORDERCOUNT, ORDERPRICE) VALUES (13, 'A15', 10006, 1, 400);
INSERT INTO ORDERDETAIL (ORDERDETAIL_ID, ITEM_ID, ORDER_ID, ORDERCOUNT, ORDERPRICE) VALUES (14, 'A02', 10007, 1, 1200);
INSERT INTO ORDERDETAIL (ORDERDETAIL_ID, ITEM_ID, ORDER_ID, ORDERCOUNT, ORDERPRICE) VALUES (15, 'A15', 10007, 1, 400);
INSERT INTO ORDERDETAIL (ORDERDETAIL_ID, ITEM_ID, ORDER_ID, ORDERCOUNT, ORDERPRICE) VALUES (16, 'A12', 10008, 1, 1350);
INSERT INTO ORDERDETAIL (ORDERDETAIL_ID, ITEM_ID, ORDER_ID, ORDERCOUNT, ORDERPRICE) VALUES (17, 'A14', 10008, 1, 400);
|
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 22, 2022 at 11:44 AM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 8.0.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `admin_page`
--
-- --------------------------------------------------------
--
-- Table structure for table `crud`
--
CREATE TABLE `crud` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`barcode` varchar(11) NOT NULL,
`price` decimal(10,0) NOT NULL,
`expiry` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `crud`
--
INSERT INTO `crud` (`id`, `name`, `barcode`, `price`, `expiry`) VALUES
(3, 'bread', '87', '9', '2021-10-10'),
(7, 'bandaids', '7654', '100', '2022-08-15');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `crud`
--
ALTER TABLE `crud`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `crud`
--
ALTER TABLE `crud`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
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 */;
|
SELECT ProductName FROM Products Inner Join Categories ON Products.CategoryID=Categories.CategoryID WHERE CategoryName='Seafood' |
ALTER TABLE canvas_school_template ADD (is_default NUMBER DEFAULT 0 NOT NULL);
ALTER TABLE bulk_canvas_course_crtn_job ADD (template_canvas_course_id NUMBER);
|
CREATE USER IF NOT EXISTS 'quantica_usr'@'%';
ALTER USER 'quantica_usr'@'%' IDENTIFIED BY 'quantica_psw' ;
GRANT ALL ON `db-quantica-core`.* TO 'quantica_usr'@'%';
FLUSH PRIVILEGES; |
<reponame>ishita02jn/TriumbBackend<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 07, 2020 at 03:33 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `triumbdb`
--
-- --------------------------------------------------------
--
-- Table structure for table `failed_jobs`
--
CREATE TABLE `failed_jobs` (
`id` bigint(20) UNSIGNED NOT NULL,
`connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
`queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `images`
--
CREATE TABLE `images` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`image` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `images`
--
INSERT INTO `images` (`id`, `name`, `image`, `created_at`, `updated_at`) VALUES
(1, '<NAME>', 'uploads/images/1580923436.jpg', '2020-02-05 11:53:56', '2020-02-05 11:53:56'),
(2, '<NAME>', 'uploads/images/1580923452.jpg', '2020-02-05 11:54:12', '2020-02-05 11:54:12'),
(3, 'Siddhant', 'uploads/images/1580923902.jpg', '2020-02-05 12:01:43', '2020-02-05 12:01:43'),
(4, 'Ishita', 'uploads/images/1580924165.png', '2020-02-05 12:06:05', '2020-02-05 12:06:05'),
(5, 'Ishita', 'uploads/images/1580924281.png', '2020-02-05 12:08:01', '2020-02-05 12:08:01'),
(6, '<NAME>', 'uploads/images/1580924457.jpg', '2020-02-05 12:10:57', '2020-02-05 12:10:57'),
(7, '<NAME>', 'uploads/images/1580924749.png', '2020-02-05 12:15:49', '2020-02-05 12:15:49'),
(8, '<NAME>', 'uploads/images/1580924774.jpg', '2020-02-05 12:16:14', '2020-02-05 12:16:14'),
(9, '<NAME>', 'uploads/images/1580925521.jpg', '2020-02-05 12:28:41', '2020-02-05 12:28:41');
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2019_08_19_000000_create_failed_jobs_table', 1),
(2, '2020_02_05_033658_create_images_table', 1);
-- --------------------------------------------------------
--
-- Table structure for table `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, '<NAME>', '<EMAIL>', NULL, '$2y$10$4RHaoV8t2cOhCE/Wiyk7FOI31dTvJCe0wYvNqnko69AN9A/hXFS9W', NULL, '2020-02-05 11:48:02', '2020-02-05 11:48:02');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `images`
--
ALTER TABLE `images`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `images`
--
ALTER TABLE `images`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` bigint(20) 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>pmichna/materialized_view_example
SELECT users.id AS user_id, permissions.name AS permission_name
FROM users
JOIN user_permission_groups ON user_permission_groups.user_id = users.id
JOIN permission_groups ON permission_groups.id = user_permission_groups.permission_group_id
JOIN permission_associations ON permission_associations.permission_group_id = permission_groups.id
JOIN permissions ON permission_associations.permission_id = permissions.id
GROUP BY users.id, permissions.name;
|
<gh_stars>1-10
drop table if exists output.kid_ethnicity;
-- calculate probability of ethnicity (E) given surname (S) and census tract and year (T)
-- know P(E|S) from census surname data, know P(E|T) from american commnuity survey
-- assuming surname and tract and independent conditioned on ethnicity
-- i.e. P(E,S,T) = P(S|E)P(T|E)*P(E)
-- then P(E|S,T) is proportional to P(E|S)P(E|T)/P(E)
-- where P(E) is just the national ethnicity distribution which we've hardcoded
-- TODO: use age-specific ethnicity stats from ACS
create table output.kid_ethnicity as (
with ethnicity as (
select distinct on (kid_id)
kid_id,
s.surname is null surname_null,
s.ethnicity surname_ethnicity,
coalesce(acs.race_prop_white*s.pct_white/100, acs.race_prop_white, s.pct_white/100)/.774 p_white,
coalesce(acs.race_prop_black*s.pct_black/100, acs.race_prop_black, s.pct_black/100)/.132 p_black,
coalesce(acs.race_prop_asian*s.pct_api/100, acs.race_prop_asian, s.pct_api/100)/.054 p_asian,
coalesce(acs.race_prop_hispanic*s.pct_hispanic/100, acs.race_prop_hispanic, s.pct_hispanic/100)/.174 p_hispanic
from aux.kids k
left join input.surnames s on k.last_name = s.surname
left join output.kid_addresses using (kid_id)
left join aux.addresses a using (address_id)
left join output.acs on
acs.census_tract_id = a.census_tract_id::decimal and
-- get appropriate year between 2009 and 2014
acs.year = least (2014,
greatest(extract(year from k.date_of_birth), 2009))
order by kid_id, address_min_date asc
)
select e.*,
CASE
WHEN e.p_white > greatest(e.p_black, e.p_hispanic, e.p_asian, 0) THEN 'white'
WHEN e.p_black > greatest(e.p_hispanic, e.p_asian, 0) THEN 'black'
WHEN e.p_hispanic > greatest(e.p_asian,0) THEN 'hispanic'
WHEN e.p_asian > 0 THEN 'asian'
ELSE null
END as kid_ethnicity
from ethnicity e
);
|
DROP TABLE IF EXISTS `NServiceBusPoCdb`.`Clubs`;
CREATE TABLE `NServiceBusPoCdb`.`Clubs` (
`ClubId` int(11) NOT NULL,
`ClubName` varchar(45) NOT NULL,
`Location` varchar(200) DEFAULT NULL,
`LimitDateChild` int(11) NOT NULL,
`Contact` varchar(15) DEFAULT NULL,
`NumberOfCoach` int(11) NOT NULL,
PRIMARY KEY (`ClubId`),
UNIQUE KEY `ClubName_Location_UNIQUE` (`ClubName`,`Location`)
);
INSERT INTO `NServiceBusPoCdb`.`Clubs`
(`ClubId`,
`ClubName`,
`Location`,
`LimitDateChild`,
`Contact`,
`NumberOfCoach`)
VALUES
(0,
'Avon',
'The Clubhouse, Station Road, Bristol, Avon, BS34 6HW',
10,
'01454888069',
3);
|
USE CursoSQL
GO
DECLARE @Descricao VARCHAR (50) = 'TV'
DECLARE @IdEstoque INT = 1
DECLARE @Quantidade INT = 5
BEGIN
IF NOT EXISTS (SELECT * FROM Estoque
WHERE IdEstoque = @IdEstoque)
BEGIN
INSERT INTO Estoque (
IdEstoque,
Descricao,
Quantidade
)
VALUES (
@IdEstoque,
@Descricao,
@Quantidade
)
END
END |
BEGIN;
insert into routeid_dirtag (route_id,dirtag) values ('3715','88_IB01');
insert into routeid_dirtag (route_id,dirtag) values ('3715','88_IB02');
insert into routeid_dirtag (route_id,dirtag) values ('3715','88_OB');
insert into routeid_dirtag (route_id,dirtag) values ('3699','44_IB9AV1');
insert into routeid_dirtag (route_id,dirtag) values ('3699','44_IB_R');
insert into routeid_dirtag (route_id,dirtag) values ('3699','44_IB_TT');
insert into routeid_dirtag (route_id,dirtag) values ('3699','44_OB_FH');
insert into routeid_dirtag (route_id,dirtag) values ('3699','44_OB_R');
insert into routeid_dirtag (route_id,dirtag) values ('3699','44_OB_TT');
insert into routeid_dirtag (route_id,dirtag) values ('3716','89_IB');
insert into routeid_dirtag (route_id,dirtag) values ('3716','89_OB');
insert into routeid_dirtag (route_id,dirtag) values ('1082','82X_IB');
insert into routeid_dirtag (route_id,dirtag) values ('1081','81X_IB');
insert into routeid_dirtag (route_id,dirtag) values ('1080','80X_IB');
insert into routeid_dirtag (route_id,dirtag) values ('3694','37_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3694','37_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3694','37_IB4');
insert into routeid_dirtag (route_id,dirtag) values ('3694','37_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3694','37_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('3694','37_OB4');
insert into routeid_dirtag (route_id,dirtag) values ('4004','K__OWLIB1');
insert into routeid_dirtag (route_id,dirtag) values ('4004','K__OWLIB2');
insert into routeid_dirtag (route_id,dirtag) values ('4004','K__OWLOB1');
insert into routeid_dirtag (route_id,dirtag) values ('4004','K__OWLOB2');
insert into routeid_dirtag (route_id,dirtag) values ('3717','90_IB');
insert into routeid_dirtag (route_id,dirtag) values ('3717','90_OB');
insert into routeid_dirtag (route_id,dirtag) values ('3709','66_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3709','66_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3686','27_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3686','27_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3686','27_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3686','27_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('3678','17_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3678','17_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3679','18_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3679','18_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3725','F__IBCHUR');
insert into routeid_dirtag (route_id,dirtag) values ('3725','F__IBCTRO');
insert into routeid_dirtag (route_id,dirtag) values ('3725','F__IBVN');
insert into routeid_dirtag (route_id,dirtag) values ('3725','F__OBCTRO');
insert into routeid_dirtag (route_id,dirtag) values ('3725','F__OBNOE');
insert into routeid_dirtag (route_id,dirtag) values ('3725','F__OBVN');
insert into routeid_dirtag (route_id,dirtag) values ('3673','09_IB_1');
insert into routeid_dirtag (route_id,dirtag) values ('3673','09_IB_2');
insert into routeid_dirtag (route_id,dirtag) values ('3673','09_IB_7');
insert into routeid_dirtag (route_id,dirtag) values ('3673','09_IB_8');
insert into routeid_dirtag (route_id,dirtag) values ('3673','09_IB_9');
insert into routeid_dirtag (route_id,dirtag) values ('3673','09_OB_1');
insert into routeid_dirtag (route_id,dirtag) values ('3673','09_OB_5');
insert into routeid_dirtag (route_id,dirtag) values ('3673','09_OB_6');
insert into routeid_dirtag (route_id,dirtag) values ('3671','05_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3671','05_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3671','05_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('3671','05_IB4');
insert into routeid_dirtag (route_id,dirtag) values ('3671','05_IB5');
insert into routeid_dirtag (route_id,dirtag) values ('3671','05_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3671','05_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('3671','05_OB3');
insert into routeid_dirtag (route_id,dirtag) values ('3671','05_OB4');
insert into routeid_dirtag (route_id,dirtag) values ('3671','05_OB5');
insert into routeid_dirtag (route_id,dirtag) values ('3671','05_OB6');
insert into routeid_dirtag (route_id,dirtag) values ('3671','05_OB7');
insert into routeid_dirtag (route_id,dirtag) values ('3676','14_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3676','14_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3676','14_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('3676','14_IB5');
insert into routeid_dirtag (route_id,dirtag) values ('3676','14_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3676','14_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('3676','14_OB3');
insert into routeid_dirtag (route_id,dirtag) values ('3676','14_OB4');
insert into routeid_dirtag (route_id,dirtag) values ('3676','14_OB6');
insert into routeid_dirtag (route_id,dirtag) values ('3710','67_IB01');
insert into routeid_dirtag (route_id,dirtag) values ('3710','67_IB02');
insert into routeid_dirtag (route_id,dirtag) values ('3710','67_OB01');
insert into routeid_dirtag (route_id,dirtag) values ('3710','67_OB02');
insert into routeid_dirtag (route_id,dirtag) values ('3674','10_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3674','10_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3675','12_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3675','12_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3675','12_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('3675','12_IB4');
insert into routeid_dirtag (route_id,dirtag) values ('3675','12_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3675','12_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('3675','12_OB3');
insert into routeid_dirtag (route_id,dirtag) values ('1199','M___IB3');
insert into routeid_dirtag (route_id,dirtag) values ('1199','M___IB4');
insert into routeid_dirtag (route_id,dirtag) values ('1199','M___IBWP1');
insert into routeid_dirtag (route_id,dirtag) values ('1199','M___IBWP2');
insert into routeid_dirtag (route_id,dirtag) values ('1199','M___OB1');
insert into routeid_dirtag (route_id,dirtag) values ('1199','M___OB4');
insert into routeid_dirtag (route_id,dirtag) values ('1199','M___OBWP1');
insert into routeid_dirtag (route_id,dirtag) values ('1198','L__IBWP1');
insert into routeid_dirtag (route_id,dirtag) values ('1198','L___IB1');
insert into routeid_dirtag (route_id,dirtag) values ('1198','L___OB1');
insert into routeid_dirtag (route_id,dirtag) values ('1198','L___OBWP');
insert into routeid_dirtag (route_id,dirtag) values ('4003','T__OWLNB1');
insert into routeid_dirtag (route_id,dirtag) values ('4003','T__OWLSB1');
insert into routeid_dirtag (route_id,dirtag) values ('4003','T__OWLSB2');
insert into routeid_dirtag (route_id,dirtag) values ('3690','31_IB1_M');
insert into routeid_dirtag (route_id,dirtag) values ('3690','31_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3690','31_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3690','31_OB2MB');
insert into routeid_dirtag (route_id,dirtag) values ('3690','31_OB3B');
insert into routeid_dirtag (route_id,dirtag) values ('3691','33__IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3691','33__IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3691','33__IB3');
insert into routeid_dirtag (route_id,dirtag) values ('3691','33__OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3691','33__OB2');
insert into routeid_dirtag (route_id,dirtag) values ('3691','33__OB3');
insert into routeid_dirtag (route_id,dirtag) values ('3692','35_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('3692','35_OB3');
insert into routeid_dirtag (route_id,dirtag) values ('3693','36_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3693','36_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3693','36_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3693','36_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('1072','71L_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('1072','71L_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3696','39_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3696','39_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3696','39_OB');
insert into routeid_dirtag (route_id,dirtag) values ('1071','71_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('1071','71_IB6');
insert into routeid_dirtag (route_id,dirtag) values ('1071','71_OB3');
insert into routeid_dirtag (route_id,dirtag) values ('1071','71__OB6');
insert into routeid_dirtag (route_id,dirtag) values ('1111','09X__IB');
insert into routeid_dirtag (route_id,dirtag) values ('1111','09X__IBS');
insert into routeid_dirtag (route_id,dirtag) values ('1111','09X___OB');
insert into routeid_dirtag (route_id,dirtag) values ('1111','09X___OBS');
insert into routeid_dirtag (route_id,dirtag) values ('1110','09BX_IB');
insert into routeid_dirtag (route_id,dirtag) values ('1110','09BX_OB');
insert into routeid_dirtag (route_id,dirtag) values ('1038','38AX_IB');
insert into routeid_dirtag (route_id,dirtag) values ('1038','38AX_OB');
insert into routeid_dirtag (route_id,dirtag) values ('1039','38BX_IB');
insert into routeid_dirtag (route_id,dirtag) values ('1039','38BX_OB');
insert into routeid_dirtag (route_id,dirtag) values ('1115','14L_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('1115','14L_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('1115','14L_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('1115','14L_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('1114','14X_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('1114','14X_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3732','38L_IB');
insert into routeid_dirtag (route_id,dirtag) values ('3732','38L_OB');
insert into routeid_dirtag (route_id,dirtag) values ('1032','31BX_IB');
insert into routeid_dirtag (route_id,dirtag) values ('1032','31BX_OB');
insert into routeid_dirtag (route_id,dirtag) values ('1033','01AX_IB');
insert into routeid_dirtag (route_id,dirtag) values ('1033','01AX_OB');
insert into routeid_dirtag (route_id,dirtag) values ('1030','30_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('1030','30_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('1030','30_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('1030','30_IB4');
insert into routeid_dirtag (route_id,dirtag) values ('1030','30_IB5');
insert into routeid_dirtag (route_id,dirtag) values ('1030','30_IB7');
insert into routeid_dirtag (route_id,dirtag) values ('1030','30_IB8');
insert into routeid_dirtag (route_id,dirtag) values ('1030','30_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('1030','30_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('1030','30_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('1030','30_OB3');
insert into routeid_dirtag (route_id,dirtag) values ('1030','30_OB4');
insert into routeid_dirtag (route_id,dirtag) values ('1030','30_OB5');
insert into routeid_dirtag (route_id,dirtag) values ('1030','30_OB6');
insert into routeid_dirtag (route_id,dirtag) values ('1030','30_OB6');
insert into routeid_dirtag (route_id,dirtag) values ('1030','30_OB7');
insert into routeid_dirtag (route_id,dirtag) values ('1017','16BX_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('1017','16BX_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('1034','01BX_IB');
insert into routeid_dirtag (route_id,dirtag) values ('1034','01BX_OB');
insert into routeid_dirtag (route_id,dirtag) values ('1094','J__IB1');
insert into routeid_dirtag (route_id,dirtag) values ('1094','J__IB2');
insert into routeid_dirtag (route_id,dirtag) values ('1094','J__IB3');
insert into routeid_dirtag (route_id,dirtag) values ('1094','J__IB4');
insert into routeid_dirtag (route_id,dirtag) values ('1094','J__IBMRKT');
insert into routeid_dirtag (route_id,dirtag) values ('1094','J__IBNOE');
insert into routeid_dirtag (route_id,dirtag) values ('1094','J__IBNS');
insert into routeid_dirtag (route_id,dirtag) values ('1094','J__OB4');
insert into routeid_dirtag (route_id,dirtag) values ('1094','J__OB5');
insert into routeid_dirtag (route_id,dirtag) values ('1094','J__OB6');
insert into routeid_dirtag (route_id,dirtag) values ('1094','J__OBGNVA');
insert into routeid_dirtag (route_id,dirtag) values ('1094','J__OBNS');
insert into routeid_dirtag (route_id,dirtag) values ('3698','43_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3698','43_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3698','43_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3698','43_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('3891','48_IB_01');
insert into routeid_dirtag (route_id,dirtag) values ('3891','48_IB_02');
insert into routeid_dirtag (route_id,dirtag) values ('3891','48_IB_03');
insert into routeid_dirtag (route_id,dirtag) values ('3891','48_IB_04');
insert into routeid_dirtag (route_id,dirtag) values ('3891','48_OB_01');
insert into routeid_dirtag (route_id,dirtag) values ('3891','48_OB_02');
insert into routeid_dirtag (route_id,dirtag) values ('3891','48_OB_03');
insert into routeid_dirtag (route_id,dirtag) values ('3891','48_OB_04');
insert into routeid_dirtag (route_id,dirtag) values ('3731','30X_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3731','30X_OB');
insert into routeid_dirtag (route_id,dirtag) values ('1093','N__IB3');
insert into routeid_dirtag (route_id,dirtag) values ('1093','N__IB5');
insert into routeid_dirtag (route_id,dirtag) values ('1093','N__IBEM6');
insert into routeid_dirtag (route_id,dirtag) values ('1093','N__IBEMKI');
insert into routeid_dirtag (route_id,dirtag) values ('1093','N__IBJU4T');
insert into routeid_dirtag (route_id,dirtag) values ('1093','N__IBNS');
insert into routeid_dirtag (route_id,dirtag) values ('1093','N__OB1');
insert into routeid_dirtag (route_id,dirtag) values ('1093','N__OB2');
insert into routeid_dirtag (route_id,dirtag) values ('1093','N__OB4EMB');
insert into routeid_dirtag (route_id,dirtag) values ('1093','N__OB4TJU');
insert into routeid_dirtag (route_id,dirtag) values ('1093','N__OBKIEM');
insert into routeid_dirtag (route_id,dirtag) values ('1093','N__OBNS');
insert into routeid_dirtag (route_id,dirtag) values ('3712','76_IB');
insert into routeid_dirtag (route_id,dirtag) values ('3712','76_OB');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_IB02');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_IB03');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_IB04');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_IB05');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_IB06');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_IB07');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_IB08');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_IB09');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_IB10');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_IB11');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_OB01');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_OB02');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_OB04');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_OB05');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_OB06');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_OB09');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_OB10');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_OB11');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_OB13');
insert into routeid_dirtag (route_id,dirtag) values ('3669','01_OB14');
insert into routeid_dirtag (route_id,dirtag) values ('3718','91_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3718','91_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3718','91_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3718','91_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('3718','91_OB3');
insert into routeid_dirtag (route_id,dirtag) values ('3688','29_IB01');
insert into routeid_dirtag (route_id,dirtag) values ('3688','29_IB02');
insert into routeid_dirtag (route_id,dirtag) values ('3688','29_IB03');
insert into routeid_dirtag (route_id,dirtag) values ('3688','29_IB04');
insert into routeid_dirtag (route_id,dirtag) values ('3688','29_IB05');
insert into routeid_dirtag (route_id,dirtag) values ('3688','29_IB06');
insert into routeid_dirtag (route_id,dirtag) values ('3688','29_IB07');
insert into routeid_dirtag (route_id,dirtag) values ('3688','29_IB11');
insert into routeid_dirtag (route_id,dirtag) values ('3688','29_IB12');
insert into routeid_dirtag (route_id,dirtag) values ('3688','29_IB16');
insert into routeid_dirtag (route_id,dirtag) values ('3688','29_OB01');
insert into routeid_dirtag (route_id,dirtag) values ('3688','29_OB02');
insert into routeid_dirtag (route_id,dirtag) values ('3688','29_OB03');
insert into routeid_dirtag (route_id,dirtag) values ('3688','29_OB03');
insert into routeid_dirtag (route_id,dirtag) values ('3688','29_OB05');
insert into routeid_dirtag (route_id,dirtag) values ('3688','29_OB07');
insert into routeid_dirtag (route_id,dirtag) values ('3688','29_OB09');
insert into routeid_dirtag (route_id,dirtag) values ('3702','49_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3702','49_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3702','49_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('3702','49_IB4');
insert into routeid_dirtag (route_id,dirtag) values ('3702','49_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3702','49_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('3702','49_OB3');
insert into routeid_dirtag (route_id,dirtag) values ('3703','52_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3703','52_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3703','52_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3703','52_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('3700','47_IB');
insert into routeid_dirtag (route_id,dirtag) values ('3700','47_OB');
insert into routeid_dirtag (route_id,dirtag) values ('3727','108_IB01');
insert into routeid_dirtag (route_id,dirtag) values ('3727','108_IB03');
insert into routeid_dirtag (route_id,dirtag) values ('3727','108_OB01');
insert into routeid_dirtag (route_id,dirtag) values ('3727','108_OB02');
insert into routeid_dirtag (route_id,dirtag) values ('3706','56_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3706','56_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3706','56_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3706','56_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('1016','16AX_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('1016','16AX_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('3704','53_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3704','53_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3704','53_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('3704','53_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3704','53_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('3705','54_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3705','54_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('3705','54_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('1041','41_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('1041','41_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('1041','41_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('1041','41_IB4');
insert into routeid_dirtag (route_id,dirtag) values ('1041','41_IB7');
insert into routeid_dirtag (route_id,dirtag) values ('1041','41_IB8');
insert into routeid_dirtag (route_id,dirtag) values ('1041','41_IB9');
insert into routeid_dirtag (route_id,dirtag) values ('1041','41_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('1041','41_OB3');
insert into routeid_dirtag (route_id,dirtag) values ('1041','41_OB5');
insert into routeid_dirtag (route_id,dirtag) values ('1041','41_OB6');
insert into routeid_dirtag (route_id,dirtag) values ('1041','41_OB7');
insert into routeid_dirtag (route_id,dirtag) values ('1031','31AX_IB');
insert into routeid_dirtag (route_id,dirtag) values ('1031','31AX_OB');
insert into routeid_dirtag (route_id,dirtag) values ('1020','41_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('1020','41_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('1020','41_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('1020','41_IB4');
insert into routeid_dirtag (route_id,dirtag) values ('1020','41_IB7');
insert into routeid_dirtag (route_id,dirtag) values ('1020','41_IB8');
insert into routeid_dirtag (route_id,dirtag) values ('1020','41_IB9');
insert into routeid_dirtag (route_id,dirtag) values ('1020','41_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('1020','41_OB3');
insert into routeid_dirtag (route_id,dirtag) values ('1020','41_OB5');
insert into routeid_dirtag (route_id,dirtag) values ('1020','41_OB6');
insert into routeid_dirtag (route_id,dirtag) values ('1020','41_OB7');
insert into routeid_dirtag (route_id,dirtag) values ('1045','45_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('1045','45_IB6');
insert into routeid_dirtag (route_id,dirtag) values ('1045','45_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('1045','45_OB4');
insert into routeid_dirtag (route_id,dirtag) values ('3683','23_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3683','23_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3683','23_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('3683','23_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3683','23_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('3682','22_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3682','22_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3682','22_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('3682','22_IB5');
insert into routeid_dirtag (route_id,dirtag) values ('3682','22_IB6');
insert into routeid_dirtag (route_id,dirtag) values ('3682','22_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3682','22_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('3682','22_OB3');
insert into routeid_dirtag (route_id,dirtag) values ('3682','22_OB6');
insert into routeid_dirtag (route_id,dirtag) values ('3682','22_OB9');
insert into routeid_dirtag (route_id,dirtag) values ('3681','21_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3681','21_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3681','21_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3681','21_OB3');
insert into routeid_dirtag (route_id,dirtag) values ('3680','19_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3680','19_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3680','19_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3680','19_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('1029','28L_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('1029','28L_OB4');
insert into routeid_dirtag (route_id,dirtag) values ('1028','28_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('1028','28_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('1028','28_IB4');
insert into routeid_dirtag (route_id,dirtag) values ('1028','28_IB5');
insert into routeid_dirtag (route_id,dirtag) values ('1028','28_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('1028','28_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('3685','26_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3685','26_OB3');
insert into routeid_dirtag (route_id,dirtag) values ('3685','26_OB4');
insert into routeid_dirtag (route_id,dirtag) values ('3684','24_IB0');
insert into routeid_dirtag (route_id,dirtag) values ('3684','24_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3684','24_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3684','24_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('3684','24_IB4');
insert into routeid_dirtag (route_id,dirtag) values ('3684','24_IB5');
insert into routeid_dirtag (route_id,dirtag) values ('3684','24_IB6');
insert into routeid_dirtag (route_id,dirtag) values ('3684','24_IB7');
insert into routeid_dirtag (route_id,dirtag) values ('3684','24_IB8');
insert into routeid_dirtag (route_id,dirtag) values ('3684','24_IB9');
insert into routeid_dirtag (route_id,dirtag) values ('3684','24_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3684','24_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('3684','24_OB3');
insert into routeid_dirtag (route_id,dirtag) values ('3684','24_OB3');
insert into routeid_dirtag (route_id,dirtag) values ('3684','24_OB4');
insert into routeid_dirtag (route_id,dirtag) values ('3684','24_OB5');
insert into routeid_dirtag (route_id,dirtag) values ('3684','24_OB6');
insert into routeid_dirtag (route_id,dirtag) values ('1106','T__OWLNB1');
insert into routeid_dirtag (route_id,dirtag) values ('1106','T__OWLSB1');
insert into routeid_dirtag (route_id,dirtag) values ('1106','T__OWLSB2');
insert into routeid_dirtag (route_id,dirtag) values ('1104','M__OWLOB1');
insert into routeid_dirtag (route_id,dirtag) values ('1105','N__OWLIB1');
insert into routeid_dirtag (route_id,dirtag) values ('1105','N__OWLIB2');
insert into routeid_dirtag (route_id,dirtag) values ('1105','N__OWLIB3');
insert into routeid_dirtag (route_id,dirtag) values ('1105','N__OWLIB3');
insert into routeid_dirtag (route_id,dirtag) values ('1105','N__OWLOB1');
insert into routeid_dirtag (route_id,dirtag) values ('1105','N__OWLOB2');
insert into routeid_dirtag (route_id,dirtag) values ('1102','K__OWLIB1');
insert into routeid_dirtag (route_id,dirtag) values ('1102','K__OWLIB2');
insert into routeid_dirtag (route_id,dirtag) values ('1102','K__OWLOB1');
insert into routeid_dirtag (route_id,dirtag) values ('1102','K__OWLOB2');
insert into routeid_dirtag (route_id,dirtag) values ('1103','L__OWLIB1');
insert into routeid_dirtag (route_id,dirtag) values ('1103','L__OWLOB1');
insert into routeid_dirtag (route_id,dirtag) values ('1103','L__OWLOB2');
insert into routeid_dirtag (route_id,dirtag) values ('3868','38_IB1');
insert into routeid_dirtag (route_id,dirtag) values ('3868','38_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('3868','38_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('3868','38_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('3868','38_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('3868','38_OB3');
insert into routeid_dirtag (route_id,dirtag) values ('3868','38_OB4');
insert into routeid_dirtag (route_id,dirtag) values ('3868','38_OB5');
insert into routeid_dirtag (route_id,dirtag) values ('1007','07_IB4');
insert into routeid_dirtag (route_id,dirtag) values ('1007','07_IB7');
insert into routeid_dirtag (route_id,dirtag) values ('1007','07_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('1007','07_OB7');
insert into routeid_dirtag (route_id,dirtag) values ('1006','06_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('1006','06_IB5');
insert into routeid_dirtag (route_id,dirtag) values ('1006','06_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('1006','06_OB4');
insert into routeid_dirtag (route_id,dirtag) values ('1004','04_IB1_M');
insert into routeid_dirtag (route_id,dirtag) values ('1004','04_IB3');
insert into routeid_dirtag (route_id,dirtag) values ('1004','04_OB1');
insert into routeid_dirtag (route_id,dirtag) values ('1004','04_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('1004','04_OB3');
insert into routeid_dirtag (route_id,dirtag) values ('1003','03_IB1_M');
insert into routeid_dirtag (route_id,dirtag) values ('1003','03_OB1_M');
insert into routeid_dirtag (route_id,dirtag) values ('1003','03_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('1002','02_IB1_M');
insert into routeid_dirtag (route_id,dirtag) values ('1002','02_IB2');
insert into routeid_dirtag (route_id,dirtag) values ('1002','02_OB1_M');
insert into routeid_dirtag (route_id,dirtag) values ('1002','02_OB2');
insert into routeid_dirtag (route_id,dirtag) values ('1109','09AX_IB');
insert into routeid_dirtag (route_id,dirtag) values ('1109','09AX_OB');
COMMIT;
|
<filename>YuGiOh.Database/Sql/YuGiOh/Functions/Insert Or Get Support.sql<gh_stars>10-100
create or replace function insert_or_get_support(input varchar)
returns setof integer
as $$
begin
return query
with new_support as (
insert into supports(name) values(input)
on conflict do nothing
returning id
)
select * from new_support
union
select id from supports where name = input;
end;
$$
language plpgsql; |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 25, 2018 at 05:45 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.13
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: `geekboard`
--
-- --------------------------------------------------------
--
-- Table structure for table `auth_users`
--
CREATE TABLE `auth_users` (
`id` int(11) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`full_name` varchar(150) NOT NULL,
`date_joined` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `job_applications`
--
CREATE TABLE `job_applications` (
`id` int(11) NOT NULL,
`job_id` int(11) NOT NULL,
`applied_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`full_name` varchar(100) NOT NULL,
`email` varchar(150) NOT NULL,
`phone` varchar(50) NOT NULL,
`cover_letter` text NOT NULL,
`coding_task_solution` text NOT NULL,
`status` varchar(100) DEFAULT NULL,
`message` text
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `job_details`
--
CREATE TABLE `job_details` (
`id` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`details` text NOT NULL,
`coding_task` text NOT NULL,
`posted_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`company` varchar(255) NOT NULL,
`location` tinytext NOT NULL,
`posted_by` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `auth_users`
--
ALTER TABLE `auth_users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `email` (`email`);
--
-- Indexes for table `job_applications`
--
ALTER TABLE `job_applications`
ADD PRIMARY KEY (`id`),
ADD KEY `job_id` (`job_id`);
--
-- Indexes for table `job_details`
--
ALTER TABLE `job_details`
ADD PRIMARY KEY (`id`),
ADD KEY `posted_by` (`posted_by`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `auth_users`
--
ALTER TABLE `auth_users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `job_applications`
--
ALTER TABLE `job_applications`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `job_details`
--
ALTER TABLE `job_details`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `job_applications`
--
ALTER TABLE `job_applications`
ADD CONSTRAINT `job_applications_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `job_details` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `job_details`
--
ALTER TABLE `job_details`
ADD CONSTRAINT `job_details_ibfk_1` FOREIGN KEY (`posted_by`) REFERENCES `auth_users` (`email`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
drop table if exists mps_twitter;
create table mps_twitter
(
name text,
screen_name text,
party text,
constituency text,
followers text,
new_followers text
);
|
<gh_stars>10-100
----functions----
DROP FUNCTION IF EXISTS istore_length(bigistore);
----
DROP FUNCTION IF EXISTS istore_length(istore);
|
SELECT
local.denom_cost -
((global.pcn_10th * local.denom_quantity * IF(local.num_quantity > 0, (local.num_cost / local.num_quantity), global.cost_per_num))
+ ((local.denom_quantity - (local.denom_quantity * global.pcn_10th))
* IF((local.denom_quantity - COALESCE(local.num_quantity, 0)) = 0, global.cost_per_denom, ((local.denom_cost - COALESCE(local.num_cost, 0)) / (local.denom_quantity - COALESCE(local.num_quantity, 0))))
)
) AS cost_savings_10,
local.denom_cost -
((global.pcn_20th * local.denom_quantity * IF(local.num_quantity > 0, (local.num_cost / local.num_quantity), global.cost_per_num))
+ ((local.denom_quantity - (local.denom_quantity * global.pcn_20th))
* IF((local.denom_quantity - COALESCE(local.num_quantity, 0)) = 0, global.cost_per_denom, ((local.denom_cost - COALESCE(local.num_cost, 0)) / (local.denom_quantity - COALESCE(local.num_quantity, 0))))
)
) AS cost_savings_20,
local.denom_cost -
((global.pcn_30th * local.denom_quantity * IF(local.num_quantity > 0, (local.num_cost / local.num_quantity), global.cost_per_num))
+ ((local.denom_quantity - (local.denom_quantity * global.pcn_30th))
* IF((local.denom_quantity - COALESCE(local.num_quantity, 0)) = 0, global.cost_per_denom, ((local.denom_cost - COALESCE(local.num_cost, 0)) / (local.denom_quantity - COALESCE(local.num_quantity, 0))))
)
) AS cost_savings_30,
local.denom_cost -
((global.pcn_40th * local.denom_quantity * IF(local.num_quantity > 0, (local.num_cost / local.num_quantity), global.cost_per_num))
+ ((local.denom_quantity - (local.denom_quantity * global.pcn_40th))
* IF((local.denom_quantity - COALESCE(local.num_quantity, 0)) = 0, global.cost_per_denom, ((local.denom_cost - COALESCE(local.num_cost, 0)) / (local.denom_quantity - COALESCE(local.num_quantity, 0))))
)
) AS cost_savings_40,
local.denom_cost -
((global.pcn_50th * local.denom_quantity * IF(local.num_quantity > 0, (local.num_cost / local.num_quantity), global.cost_per_num))
+ ((local.denom_quantity - (local.denom_quantity * global.pcn_50th))
* IF((local.denom_quantity - COALESCE(local.num_quantity, 0)) = 0, global.cost_per_denom, ((local.denom_cost - COALESCE(local.num_cost, 0)) / (local.denom_quantity - COALESCE(local.num_quantity, 0))))
)
) AS cost_savings_50,
local.denom_cost -
((global.pcn_60th * local.denom_quantity * IF(local.num_quantity > 0, (local.num_cost / local.num_quantity), global.cost_per_num))
+ ((local.denom_quantity - (local.denom_quantity * global.pcn_60th))
* IF((local.denom_quantity - COALESCE(local.num_quantity, 0)) = 0, global.cost_per_denom, ((local.denom_cost - COALESCE(local.num_cost, 0)) / (local.denom_quantity - COALESCE(local.num_quantity, 0))))
)
) AS cost_savings_60,
local.denom_cost -
((global.pcn_70th * local.denom_quantity * IF(local.num_quantity > 0, (local.num_cost / local.num_quantity), global.cost_per_num))
+ ((local.denom_quantity - (local.denom_quantity * global.pcn_70th))
* IF((local.denom_quantity - COALESCE(local.num_quantity, 0)) = 0, global.cost_per_denom, ((local.denom_cost - COALESCE(local.num_cost, 0)) / (local.denom_quantity - COALESCE(local.num_quantity, 0))))
)
) AS cost_savings_70,
local.denom_cost -
((global.pcn_80th * local.denom_quantity * IF(local.num_quantity > 0, (local.num_cost / local.num_quantity), global.cost_per_num))
+ ((local.denom_quantity - (local.denom_quantity * global.pcn_80th))
* IF((local.denom_quantity - COALESCE(local.num_quantity, 0)) = 0, global.cost_per_denom, ((local.denom_cost - COALESCE(local.num_cost, 0)) / (local.denom_quantity - COALESCE(local.num_quantity, 0))))
)
) AS cost_savings_80,
local.denom_cost -
((global.pcn_90th * local.denom_quantity * IF(local.num_quantity > 0, (local.num_cost / local.num_quantity), global.cost_per_num))
+ ((local.denom_quantity - (local.denom_quantity * global.pcn_90th))
* IF((local.denom_quantity - COALESCE(local.num_quantity, 0)) = 0, global.cost_per_denom, ((local.denom_cost - COALESCE(local.num_cost, 0)) / (local.denom_quantity - COALESCE(local.num_quantity, 0))))
)
) AS cost_savings_90,
local.*
FROM
{measures}.pcn_data_{measure_id} AS local
LEFT JOIN
{measures}.global_data_{measure_id} global
ON
(global.month = local.month)
|
<gh_stars>10-100
-- file:tstypes.sql ln:98 expect:true
SELECT 'a b:89 ca:23A,64b cb:80c d:34c'::tsvector @@ 'd:AC & c:*C' as "true"
|
-- 2018-10-15T16:43:54.734
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Table (LoadSeq,AccessLevel,AD_Client_ID,CreatedBy,IsActive,Created,Updated,IsSecurityEnabled,IsDeleteable,IsHighVolume,IsView,ImportTable,IsChangeLog,ReplicationType,CopyColumnsFromTable,ACTriggerLength,UpdatedBy,IsAutocomplete,IsDLM,Description,AD_Org_ID,AD_Table_ID,Name,EntityType,TableName,PersonalDataCategory,IsEnableRemoteCacheInvalidation) VALUES (0,'1',0,100,'Y',TO_TIMESTAMP('2018-10-15 16:43:54','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2018-10-15 16:43:54','YYYY-MM-DD HH24:MI:SS'),'N','Y','N','N','N','N','L','N',0,100,'N','N','Cofigs for http://www.forum-datenaustausch.ch',0,541145,'HC_Forum_Datenaustausch','de.metas.vertical.healthcare.forum_datenaustausch_ch','HC_Forum_Datenaustausch','NP','N')
;
-- 2018-10-15T16:43:54.746
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=541145 AND NOT EXISTS (SELECT 1 FROM AD_Table_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Table_ID=t.AD_Table_ID)
;
-- 2018-10-15T16:43:54.941
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Sequence (CurrentNext,IsAudited,StartNewYear,IsActive,IsTableID,Created,CreatedBy,IsAutoSequence,StartNo,IncrementNo,CurrentNextSys,Updated,UpdatedBy,AD_Sequence_ID,Description,AD_Client_ID,Name,AD_Org_ID) VALUES (1000000,'N','N','Y','Y',TO_TIMESTAMP('2018-10-15 16:43:54','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000000,1,50000,TO_TIMESTAMP('2018-10-15 16:43:54','YYYY-MM-DD HH24:MI:SS'),100,554727,'Table HC_Forum_Datenaustausch',0,'HC_Forum_Datenaustausch',0)
;
-- 2018-10-15T16:44:03.030
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Reference_ID,FieldLength,Version,IsKey,IsParent,IsTranslated,IsIdentifier,SeqNo,AD_Client_ID,IsActive,Created,CreatedBy,IsUpdateable,IsSelectionColumn,IsSyncDatabase,IsAlwaysUpdateable,IsAllowLogging,IsEncrypted,Updated,UpdatedBy,AD_Table_ID,Help,AD_Column_ID,IsMandatory,Description,AD_Org_ID,AD_Element_ID,EntityType,Name,ColumnName) VALUES (19,10,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-10-15 16:44:02','YYYY-MM-DD HH24:MI:SS'),100,'N','N','Y','N','Y','N',TO_TIMESTAMP('2018-10-15 16:44:02','YYYY-MM-DD HH24:MI:SS'),100,541145,'Ein Mandant ist eine Firma oder eine juristische Person. Sie können keine Daten über Mandanten hinweg verwenden. .',563274,'Y','Mandant für diese Installation.',0,102,'de.metas.vertical.healthcare.forum_datenaustausch_ch','Mandant','AD_Client_ID')
;
-- 2018-10-15T16:44:03.032
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=563274 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- 2018-10-15T16:44:03.194
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Reference_ID,FieldLength,Version,IsKey,IsParent,IsTranslated,IsIdentifier,SeqNo,AD_Client_ID,IsActive,Created,CreatedBy,IsUpdateable,IsSelectionColumn,IsSyncDatabase,IsAlwaysUpdateable,IsAllowLogging,IsEncrypted,Updated,UpdatedBy,AD_Table_ID,Help,AD_Column_ID,IsMandatory,Description,AD_Org_ID,AD_Element_ID,EntityType,Name,ColumnName) VALUES (19,10,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-10-15 16:44:03','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','Y','N','Y','N',TO_TIMESTAMP('2018-10-15 16:44:03','YYYY-MM-DD HH24:MI:SS'),100,541145,'Eine Organisation ist ein Bereich ihres Mandanten - z.B. Laden oder Abteilung. Sie können Daten über Organisationen hinweg gemeinsam verwenden.',563275,'Y','Organisatorische Einheit des Mandanten',0,113,'de.metas.vertical.healthcare.forum_datenaustausch_ch','Sektion','AD_Org_ID')
;
-- 2018-10-15T16:44:03.195
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=563275 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- 2018-10-15T16:44:03.330
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Reference_ID,FieldLength,Version,IsKey,IsParent,IsTranslated,IsIdentifier,SeqNo,AD_Client_ID,IsActive,Created,CreatedBy,IsUpdateable,IsSelectionColumn,IsSyncDatabase,IsAlwaysUpdateable,IsAllowLogging,IsEncrypted,Updated,UpdatedBy,AD_Table_ID,Help,AD_Column_ID,IsMandatory,Description,AD_Org_ID,AD_Element_ID,EntityType,Name,ColumnName) VALUES (16,29,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-10-15 16:44:03','YYYY-MM-DD HH24:MI:SS'),100,'N','N','Y','N','N','N',TO_TIMESTAMP('2018-10-15 16:44:03','YYYY-MM-DD HH24:MI:SS'),100,541145,'Das Feld Erstellt zeigt an, zu welchem Datum dieser Eintrag erstellt wurde.',563276,'Y','Datum, an dem dieser Eintrag erstellt wurde',0,245,'de.metas.vertical.healthcare.forum_datenaustausch_ch','Erstellt','Created')
;
-- 2018-10-15T16:44:03.333
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=563276 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- 2018-10-15T16:44:03.447
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Reference_ID,FieldLength,Version,IsKey,IsParent,IsTranslated,IsIdentifier,SeqNo,AD_Client_ID,IsActive,Created,CreatedBy,IsUpdateable,IsSelectionColumn,IsSyncDatabase,IsAlwaysUpdateable,IsAllowLogging,IsEncrypted,Updated,UpdatedBy,AD_Table_ID,Help,AD_Reference_Value_ID,AD_Column_ID,IsMandatory,Description,AD_Org_ID,AD_Element_ID,EntityType,Name,ColumnName) VALUES (18,10,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-10-15 16:44:03','YYYY-MM-DD HH24:MI:SS'),100,'N','N','Y','N','N','N',TO_TIMESTAMP('2018-10-15 16:44:03','YYYY-MM-DD HH24:MI:SS'),100,541145,'Das Feld Erstellt durch zeigt an, welcher Nutzer diesen Eintrag erstellt hat.',110,563277,'Y','Nutzer, der diesen Eintrag erstellt hat',0,246,'de.metas.vertical.healthcare.forum_datenaustausch_ch','Erstellt durch','CreatedBy')
;
-- 2018-10-15T16:44:03.449
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=563277 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- 2018-10-15T16:44:03.602
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Reference_ID,FieldLength,Version,IsKey,IsParent,IsTranslated,IsIdentifier,SeqNo,AD_Client_ID,IsActive,Created,CreatedBy,IsUpdateable,IsSelectionColumn,IsSyncDatabase,IsAlwaysUpdateable,IsAllowLogging,IsEncrypted,Updated,UpdatedBy,AD_Table_ID,Help,AD_Column_ID,IsMandatory,Description,AD_Org_ID,AD_Element_ID,EntityType,Name,ColumnName) VALUES (20,1,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-10-15 16:44:03','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','Y','N',TO_TIMESTAMP('2018-10-15 16:44:03','YYYY-MM-DD HH24:MI:SS'),100,541145,'Es gibt zwei Möglichkeiten, einen Datensatz nicht mehr verfügbar zu machen: einer ist, ihn zu löschen; der andere, ihn zu deaktivieren. Ein deaktivierter Eintrag ist nicht mehr für eine Auswahl verfügbar, aber verfügbar für die Verwendung in Berichten. Es gibt zwei Gründe, Datensätze zu deaktivieren und nicht zu löschen: (1) Das System braucht den Datensatz für Revisionszwecke. (2) Der Datensatz wird von anderen Datensätzen referenziert. Z.B. können Sie keinen Geschäftspartner löschen, wenn es Rechnungen für diesen Geschäftspartner gibt. Sie deaktivieren den Geschäftspartner und verhindern, dass dieser Eintrag in zukünftigen Vorgängen verwendet wird.',563278,'Y','Der Eintrag ist im System aktiv',0,348,'de.metas.vertical.healthcare.forum_datenaustausch_ch','Aktiv','IsActive')
;
-- 2018-10-15T16:44:03.604
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=563278 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- 2018-10-15T16:44:03.697
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Reference_ID,FieldLength,Version,IsKey,IsParent,IsTranslated,IsIdentifier,SeqNo,AD_Client_ID,IsActive,Created,CreatedBy,IsUpdateable,IsSelectionColumn,IsSyncDatabase,IsAlwaysUpdateable,IsAllowLogging,IsEncrypted,Updated,UpdatedBy,AD_Table_ID,Help,AD_Column_ID,IsMandatory,Description,AD_Org_ID,AD_Element_ID,EntityType,Name,ColumnName) VALUES (16,29,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-10-15 16:44:03','YYYY-MM-DD HH24:MI:SS'),100,'N','N','Y','N','N','N',TO_TIMESTAMP('2018-10-15 16:44:03','YYYY-MM-DD HH24:MI:SS'),100,541145,'Aktualisiert zeigt an, wann dieser Eintrag aktualisiert wurde.',563279,'Y','Datum, an dem dieser Eintrag aktualisiert wurde',0,607,'de.metas.vertical.healthcare.forum_datenaustausch_ch','Aktualisiert','Updated')
;
-- 2018-10-15T16:44:03.698
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=563279 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- 2018-10-15T16:44:03.849
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Reference_ID,FieldLength,Version,IsKey,IsParent,IsTranslated,IsIdentifier,SeqNo,AD_Client_ID,IsActive,Created,CreatedBy,IsUpdateable,IsSelectionColumn,IsSyncDatabase,IsAlwaysUpdateable,IsAllowLogging,IsEncrypted,Updated,UpdatedBy,AD_Table_ID,Help,AD_Reference_Value_ID,AD_Column_ID,IsMandatory,Description,AD_Org_ID,AD_Element_ID,EntityType,Name,ColumnName) VALUES (18,10,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-10-15 16:44:03','YYYY-MM-DD HH24:MI:SS'),100,'N','N','Y','N','N','N',TO_TIMESTAMP('2018-10-15 16:44:03','YYYY-MM-DD HH24:MI:SS'),100,541145,'Aktualisiert durch zeigt an, welcher Nutzer diesen Eintrag aktualisiert hat.',110,563280,'Y','Nutzer, der diesen Eintrag aktualisiert hat',0,608,'de.metas.vertical.healthcare.forum_datenaustausch_ch','Aktualisiert durch','UpdatedBy')
;
-- 2018-10-15T16:44:03.851
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=563280 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- 2018-10-15T16:44:03.954
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Element (AD_Client_ID,IsActive,Created,CreatedBy,PrintName,Updated,UpdatedBy,AD_Element_ID,AD_Org_ID,Name,ColumnName,EntityType) VALUES (0,'Y',TO_TIMESTAMP('2018-10-15 16:44:03','YYYY-MM-DD HH24:MI:SS'),100,'HC_Forum_Datenaustausch',TO_TIMESTAMP('2018-10-15 16:44:03','YYYY-MM-DD HH24:MI:SS'),100,544450,0,'HC_Forum_Datenaustausch','HC_Forum_Datenaustausch_ID','de.metas.vertical.healthcare.forum_datenaustausch_ch')
;
-- 2018-10-15T16:44:03.957
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, PrintName,PO_Description,PO_Help,PO_Name,PO_PrintName,Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.PrintName,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=544450 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- 2018-10-15T16:44:04.071
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Reference_ID,FieldLength,Version,IsKey,IsParent,IsTranslated,IsIdentifier,SeqNo,AD_Client_ID,IsActive,Created,CreatedBy,IsUpdateable,IsSelectionColumn,IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Updated,UpdatedBy,AD_Table_ID,AD_Column_ID,IsMandatory,AD_Org_ID,AD_Element_ID,EntityType,Name,ColumnName) VALUES (13,10,0,'Y','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-10-15 16:44:03','YYYY-MM-DD HH24:MI:SS'),100,'N','N','Y','N','N',TO_TIMESTAMP('2018-10-15 16:44:03','YYYY-MM-DD HH24:MI:SS'),100,541145,563281,'Y',0,544450,'de.metas.vertical.healthcare.forum_datenaustausch_ch','HC_Forum_Datenaustausch','HC_Forum_Datenaustausch_ID')
;
-- 2018-10-15T16:44:04.075
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=563281 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- 2018-10-15T16:45:14.451
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Element (AD_Client_ID,IsActive,Created,CreatedBy,PrintName,Updated,UpdatedBy,AD_Element_ID,AD_Org_ID,Name,ColumnName,EntityType) VALUES (0,'Y',TO_TIMESTAMP('2018-10-15 16:45:14','YYYY-MM-DD HH24:MI:SS'),100,'Export version',TO_TIMESTAMP('2018-10-15 16:45:14','YYYY-MM-DD HH24:MI:SS'),100,544451,0,'Export version','ExportVersion','de.metas.vertical.healthcare.forum_datenaustausch_ch')
;
-- 2018-10-15T16:45:14.452
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, PrintName,PO_Description,PO_Help,PO_Name,PO_PrintName,Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.PrintName,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=544451 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- 2018-10-15T16:45:39.205
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element SET PrintName='Export XML Version', Name='Export XML Version', ColumnName='ExportXmlVersion',Updated=TO_TIMESTAMP('2018-10-15 16:45:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=544451
;
-- 2018-10-15T16:45:39.208
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET ColumnName='ExportXmlVersion', Name='Export XML Version', Description=NULL, Help=NULL WHERE AD_Element_ID=544451
;
-- 2018-10-15T16:45:39.209
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Process_Para SET ColumnName='ExportXmlVersion', Name='Export XML Version', Description=NULL, Help=NULL, AD_Element_ID=544451 WHERE UPPER(ColumnName)='EXPORTXMLVERSION' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- 2018-10-15T16:45:39.211
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Process_Para SET ColumnName='ExportXmlVersion', Name='Export XML Version', Description=NULL, Help=NULL WHERE AD_Element_ID=544451 AND IsCentrallyMaintained='Y'
;
-- 2018-10-15T16:45:39.212
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field SET Name='Export XML Version', Description=NULL, Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=544451) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 544451)
;
-- 2018-10-15T16:45:39.225
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_PrintFormatItem pi SET PrintName='Export XML Version', Name='Export XML Version' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=544451)
;
-- 2018-10-15T16:45:54.720
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2018-10-15 16:45:54','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Export XML Version',PrintName='Export XML Version' WHERE AD_Element_ID=544451 AND AD_Language='de_CH'
;
-- 2018-10-15T16:45:54.732
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(544451,'de_CH')
;
-- 2018-10-15T16:46:07.160
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2018-10-15 16:46:07','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Export XML version',PrintName='Export XML version' WHERE AD_Element_ID=544451 AND AD_Language='en_US'
;
-- 2018-10-15T16:46:07.170
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(544451,'en_US')
;
-- 2018-10-15T16:46:44.398
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Reference (AD_Client_ID,IsActive,Created,CreatedBy,IsOrderByValue,Updated,UpdatedBy,AD_Reference_ID,ValidationType,Name,AD_Org_ID,EntityType) VALUES (0,'Y',TO_TIMESTAMP('2018-10-15 16:46:44','YYYY-MM-DD HH24:MI:SS'),100,'N',TO_TIMESTAMP('2018-10-15 16:46:44','YYYY-MM-DD HH24:MI:SS'),100,540921,'L','ExportXmlVersion',0,'de.metas.vertical.healthcare.forum_datenaustausch_ch')
;
-- 2018-10-15T16:46:44.400
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=540921 AND NOT EXISTS (SELECT 1 FROM AD_Reference_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Reference_ID=t.AD_Reference_ID)
;
-- 2018-10-15T16:47:45.153
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Ref_List (AD_Reference_ID,AD_Client_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Ref_List_ID,ValueName,AD_Org_ID,Name,Value,EntityType) VALUES (540921,0,'Y',TO_TIMESTAMP('2018-10-15 16:47:45','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-10-15 16:47:45','YYYY-MM-DD HH24:MI:SS'),100,541748,'v440',0,'4.4','4.4','de.metas.vertical.healthcare.forum_datenaustausch_ch')
;
-- 2018-10-15T16:47:45.155
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=541748 AND NOT EXISTS (SELECT 1 FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID)
;
-- 2018-10-15T16:48:14.852
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Reference_ID,FieldLength,Version,IsKey,IsParent,IsTranslated,IsIdentifier,SeqNo,AD_Client_ID,IsActive,Created,CreatedBy,IsUpdateable,DDL_NoForeignKey,IsSelectionColumn,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,IsEncrypted,Updated,UpdatedBy,IsAdvancedText,IsLazyLoading,AD_Table_ID,IsCalculated,AD_Reference_Value_ID,AD_Column_ID,IsDimension,IsMandatory,IsStaleable,IsUseDocSequence,IsRangeFilter,IsShowFilterIncrementButtons,IsDLMPartitionBoundary,IsGenericZoomKeyColumn,SelectionColumnSeqNo,AD_Org_ID,AD_Element_ID,EntityType,IsForceIncludeInGeneratedModel,IsGenericZoomOrigin,Name,ColumnName) VALUES (17,5,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-10-15 16:48:14','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N','N','N','N','Y','N',TO_TIMESTAMP('2018-10-15 16:48:14','YYYY-MM-DD HH24:MI:SS'),100,'N','N',541145,'N',540921,563282,'N','Y','N','N','N','N','N','N',0,0,544451,'de.metas.vertical.healthcare.forum_datenaustausch_ch','N','N','Export XML Version','ExportXmlVersion')
;
-- 2018-10-15T16:48:14.854
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=563282 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- 2018-10-15T16:50:31.716
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
--/* DDL */ CREATE TABLE public.HC_Forum_Datenaustausch (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, Created TIMESTAMP WITH TIME ZONE NOT NULL, CreatedBy NUMERIC(10) NOT NULL, ExportXmlVersion VARCHAR(5) NOT NULL, HC_Forum_Datenaustausch_ID NUMERIC(10) NOT NULL, IsActive CHAR(1) CHECK (IsActive IN ('Y','N')) NOT NULL, Updated TIMESTAMP WITH TIME ZONE NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, CONSTRAINT HC_Forum_Datenaustausch_Key PRIMARY KEY (HC_Forum_Datenaustausch_ID))
--;
-- 2018-10-15T16:51:32.143
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Window (AD_Client_ID,IsActive,Created,CreatedBy,WindowType,Processing,IsSOTrx,WinHeight,WinWidth,IsBetaFunctionality,IsDefault,Updated,UpdatedBy,IsOneInstanceOnly,AD_Window_ID,Help,InternalName,AD_Org_ID,Name,EntityType,IsEnableRemoteCacheInvalidation) VALUES (0,'Y',TO_TIMESTAMP('2018-10-15 16:51:31','YYYY-MM-DD HH24:MI:SS'),100,'M','N','Y',0,0,'N','N',TO_TIMESTAMP('2018-10-15 16:51:31','YYYY-MM-DD HH24:MI:SS'),100,'N',540490,'http://www.forum-datenaustausch.ch','HC_Forum_Datenaustausch',0,'Forum Datenaustausch','de.metas.vertical.healthcare.forum_datenaustausch_ch','N')
;
-- 2018-10-15T16:51:32.147
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Window_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=540490 AND NOT EXISTS (SELECT 1 FROM AD_Window_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Window_ID=t.AD_Window_ID)
;
-- 2018-10-15T16:52:01.288
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Tab (Created,HasTree,AD_Window_ID,SeqNo,IsSingleRow,AD_Client_ID,Updated,IsActive,CreatedBy,UpdatedBy,IsInfoTab,IsTranslationTab,IsReadOnly,Processing,IsSortTab,ImportFields,TabLevel,IsInsertRecord,IsAdvancedTab,IsRefreshAllOnActivate,IsSearchActive,IsSearchCollapsed,IsQueryOnLoad,IsGridModeOnly,AD_Table_ID,AD_Tab_ID,IsGenericZoomTarget,IsCheckParentsChanged,MaxQueryRecords,AD_Org_ID,Name,EntityType) VALUES (TO_TIMESTAMP('2018-10-15 16:52:01','YYYY-MM-DD HH24:MI:SS'),'N',540490,10,'N',0,TO_TIMESTAMP('2018-10-15 16:52:01','YYYY-MM-DD HH24:MI:SS'),'Y',100,100,'N','N','N','N','N','N',0,'Y','N','N','Y','Y','Y','N',541145,541327,'N','Y',0,0,'Konfig','de.metas.vertical.healthcare.forum_datenaustausch_ch')
;
-- 2018-10-15T16:52:01.291
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=541327 AND NOT EXISTS (SELECT 1 FROM AD_Tab_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Tab_ID=t.AD_Tab_ID)
;
-- 2018-10-15T16:52:16.504
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Table SET Name='HC_Forum_Datenaustausch_Config', TableName='HC_Forum_Datenaustausch_Config',Updated=TO_TIMESTAMP('2018-10-15 16:52:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=541145
;
-- 2018-10-15T16:52:16.508
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Sequence SET Name='HC_Forum_Datenaustausch_Config',Updated=TO_TIMESTAMP('2018-10-15 16:52:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Sequence_ID=554727
;
-- 2018-10-15T16:52:23.308
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Table SET IsEnableRemoteCacheInvalidation='Y',Updated=TO_TIMESTAMP('2018-10-15 16:52:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=541145
;
-- 2018-10-15T16:56:59.702
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ CREATE TABLE public.HC_Forum_Datenaustausch_Config (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, Created TIMESTAMP WITH TIME ZONE NOT NULL, CreatedBy NUMERIC(10) NOT NULL, ExportXmlVersion VARCHAR(5) NOT NULL, HC_Forum_Datenaustausch_ID NUMERIC(10) NOT NULL, IsActive CHAR(1) CHECK (IsActive IN ('Y','N')) NOT NULL, Updated TIMESTAMP WITH TIME ZONE NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, CONSTRAINT HC_Forum_Datenaustausch_Config_Key PRIMARY KEY (HC_Forum_Datenaustausch_ID))
;
-- 2018-10-15T16:58:35.605
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Table SET AD_Window_ID=540490,Updated=TO_TIMESTAMP('2018-10-15 16:58:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=541145
;
-- 2018-10-15T16:58:44.786
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field (AD_Tab_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,IsActive,Created,CreatedBy,IsReadOnly,Updated,UpdatedBy,Help,AD_Field_ID,IsDisplayedGrid,AD_Column_ID,Description,AD_Org_ID,Name,EntityType) VALUES (541327,'N',10,'N','N','N','N',0,'Y',TO_TIMESTAMP('2018-10-15 16:58:44','YYYY-MM-DD HH24:MI:SS'),100,'N',TO_TIMESTAMP('2018-10-15 16:58:44','YYYY-MM-DD HH24:MI:SS'),100,'Ein Mandant ist eine Firma oder eine juristische Person. Sie können keine Daten über Mandanten hinweg verwenden. .',569317,'N',563274,'Mandant für diese Installation.',0,'Mandant','de.metas.vertical.healthcare.forum_datenaustausch_ch')
;
-- 2018-10-15T16:58:44.788
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=569317 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- 2018-10-15T16:58:44.915
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field (AD_Tab_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,IsActive,Created,CreatedBy,IsReadOnly,Updated,UpdatedBy,Help,AD_Field_ID,IsDisplayedGrid,AD_Column_ID,Description,AD_Org_ID,Name,EntityType) VALUES (541327,'N',10,'N','N','N','N',0,'Y',TO_TIMESTAMP('2018-10-15 16:58:44','YYYY-MM-DD HH24:MI:SS'),100,'N',TO_TIMESTAMP('2018-10-15 16:58:44','YYYY-MM-DD HH24:MI:SS'),100,'Eine Organisation ist ein Bereich ihres Mandanten - z.B. Laden oder Abteilung. Sie können Daten über Organisationen hinweg gemeinsam verwenden.',569318,'N',563275,'Organisatorische Einheit des Mandanten',0,'Sektion','de.metas.vertical.healthcare.forum_datenaustausch_ch')
;
-- 2018-10-15T16:58:44.916
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=569318 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- 2018-10-15T16:58:45.008
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field (AD_Tab_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,IsActive,Created,CreatedBy,IsReadOnly,Updated,UpdatedBy,Help,AD_Field_ID,IsDisplayedGrid,AD_Column_ID,Description,AD_Org_ID,Name,EntityType) VALUES (541327,'N',1,'N','N','N','N',0,'Y',TO_TIMESTAMP('2018-10-15 16:58:44','YYYY-MM-DD HH24:MI:SS'),100,'N',TO_TIMESTAMP('2018-10-15 16:58:44','YYYY-MM-DD HH24:MI:SS'),100,'Es gibt zwei Möglichkeiten, einen Datensatz nicht mehr verfügbar zu machen: einer ist, ihn zu löschen; der andere, ihn zu deaktivieren. Ein deaktivierter Eintrag ist nicht mehr für eine Auswahl verfügbar, aber verfügbar für die Verwendung in Berichten. Es gibt zwei Gründe, Datensätze zu deaktivieren und nicht zu löschen: (1) Das System braucht den Datensatz für Revisionszwecke. (2) Der Datensatz wird von anderen Datensätzen referenziert. Z.B. können Sie keinen Geschäftspartner löschen, wenn es Rechnungen für diesen Geschäftspartner gibt. Sie deaktivieren den Geschäftspartner und verhindern, dass dieser Eintrag in zukünftigen Vorgängen verwendet wird.',569319,'N',563278,'Der Eintrag ist im System aktiv',0,'Aktiv','de.metas.vertical.healthcare.forum_datenaustausch_ch')
;
-- 2018-10-15T16:58:45.010
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=569319 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- 2018-10-15T16:58:45.144
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field (AD_Tab_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,IsActive,Created,CreatedBy,IsReadOnly,Updated,UpdatedBy,AD_Field_ID,IsDisplayedGrid,AD_Column_ID,AD_Org_ID,Name,EntityType) VALUES (541327,'N',10,'N','N','N','N',0,'Y',TO_TIMESTAMP('2018-10-15 16:58:45','YYYY-MM-DD HH24:MI:SS'),100,'N',TO_TIMESTAMP('2018-10-15 16:58:45','YYYY-MM-DD HH24:MI:SS'),100,569320,'N',563281,0,'HC_Forum_Datenaustausch','de.metas.vertical.healthcare.forum_datenaustausch_ch')
;
-- 2018-10-15T16:58:45.146
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=569320 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- 2018-10-15T16:58:45.277
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field (AD_Tab_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,IsActive,Created,CreatedBy,IsReadOnly,Updated,UpdatedBy,AD_Field_ID,IsDisplayedGrid,AD_Column_ID,AD_Org_ID,Name,EntityType) VALUES (541327,'N',5,'N','N','N','N',0,'Y',TO_TIMESTAMP('2018-10-15 16:58:45','YYYY-MM-DD HH24:MI:SS'),100,'N',TO_TIMESTAMP('2018-10-15 16:58:45','YYYY-MM-DD HH24:MI:SS'),100,569321,'N',563282,0,'Export XML Version','de.metas.vertical.healthcare.forum_datenaustausch_ch')
;
-- 2018-10-15T16:58:45.278
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=569321 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- 2018-10-15T16:59:01.886
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field SET IsDisplayed='Y', IsDisplayedGrid='Y',Updated=TO_TIMESTAMP('2018-10-15 16:59:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=569319
;
-- 2018-10-15T16:59:08.072
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field SET IsDisplayed='Y', IsDisplayedGrid='Y',Updated=TO_TIMESTAMP('2018-10-15 16:59:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=569321
;
-- 2018-10-15T17:00:45.075
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Menu (AD_Window_ID,Action,AD_Client_ID,CreatedBy,IsActive,Created,IsSummary,IsSOTrx,IsReadOnly,Updated,UpdatedBy,AD_Menu_ID,IsCreateNew,InternalName,AD_Org_ID,Name,EntityType) VALUES (540490,'W',0,100,'Y',TO_TIMESTAMP('2018-10-15 17:00:44','YYYY-MM-DD HH24:MI:SS'),'N','N','N',TO_TIMESTAMP('2018-10-15 17:00:44','YYYY-MM-DD HH24:MI:SS'),100,541145,'N','HC_Forum_Datenaustausch',0,'Forum Datenaustausch','de.metas.vertical.healthcare.forum_datenaustausch_ch')
;
-- 2018-10-15T17:00:45.078
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,WEBUI_NameBrowse,WEBUI_NameNew,WEBUI_NameNewBreadcrumb,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Description,t.WEBUI_NameBrowse,t.WEBUI_NameNew,t.WEBUI_NameNewBreadcrumb,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=541145 AND NOT EXISTS (SELECT 1 FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID)
;
-- 2018-10-15T17:00:45.081
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', now(), 100, now(), 100,t.AD_Tree_ID, 541145, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.AD_Table_ID=116 AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=541145)
;
-- 2018-10-15T17:00:45.215
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_TreeNodeMM SET Parent_ID=1000069, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=540996 AND AD_Tree_ID=10
;
-- 2018-10-15T17:00:45.217
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_TreeNodeMM SET Parent_ID=1000069, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=541009 AND AD_Tree_ID=10
;
-- 2018-10-15T17:00:45.219
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_TreeNodeMM SET Parent_ID=1000069, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=541145 AND AD_Tree_ID=10
;
-- 2018-10-15T17:01:03.685
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_TreeNodeMM SET Parent_ID=1000077, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=540998 AND AD_Tree_ID=10
;
-- 2018-10-15T17:01:03.687
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_TreeNodeMM SET Parent_ID=1000077, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=541145 AND AD_Tree_ID=10
;
-- 2018-10-15T17:01:03.689
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_TreeNodeMM SET Parent_ID=1000077, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=540825 AND AD_Tree_ID=10
;
-- 2018-10-15T17:01:06.938
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_TreeNodeMM SET Parent_ID=1000077, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=540998 AND AD_Tree_ID=10
;
-- 2018-10-15T17:01:06.941
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_TreeNodeMM SET Parent_ID=1000077, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=540825 AND AD_Tree_ID=10
;
-- 2018-10-15T17:01:06.943
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_TreeNodeMM SET Parent_ID=1000077, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=541145 AND AD_Tree_ID=10
;
-- 2018-10-15T17:06:26.881
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_JavaClass_Type (Created,CreatedBy,IsActive,AD_JavaClass_Type_ID,Updated,UpdatedBy,Classname,AD_Client_ID,InternalName,AD_Org_ID,Name,EntityType) VALUES (TO_TIMESTAMP('2018-10-15 17:06:26','YYYY-MM-DD HH24:MI:SS'),100,'Y',540041,TO_TIMESTAMP('2018-10-15 17:06:26','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.vertical.healthcare_ch.forum_datenaustausch_ch.invoice_xversion.CrossVersionRequestConverter',0,'de.metas.vertical.healthcare_ch.forum_datenaustausch_ch.invoice_xversion.CrossVersionRequestConverte',0,'Forum Datenaustausch invoice request converter','de.metas.vertical.healthcare.forum_datenaustausch_ch')
;
-- 2018-10-16T06:39:52.987
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_EntityType SET ModelPackage='de.metas.vertical.healthcare.forum_datenaustausch_ch.commons.model',Updated=TO_TIMESTAMP('2018-10-16 06:39:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_EntityType_ID=540237
;
-- 2018-10-16T06:45:54.573
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Reference_ID,FieldLength,Version,IsKey,IsParent,IsTranslated,IsIdentifier,SeqNo,AD_Client_ID,IsActive,Created,CreatedBy,IsUpdateable,DDL_NoForeignKey,IsSelectionColumn,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,IsEncrypted,Updated,UpdatedBy,IsAdvancedText,IsLazyLoading,AD_Table_ID,IsCalculated,Help,AD_Column_ID,IsDimension,IsMandatory,IsStaleable,IsUseDocSequence,IsRangeFilter,IsShowFilterIncrementButtons,IsDLMPartitionBoundary,IsGenericZoomKeyColumn,Description,SelectionColumnSeqNo,AD_Org_ID,AD_Element_ID,EntityType,IsForceIncludeInGeneratedModel,IsGenericZoomOrigin,Name,ColumnName) VALUES (30,10,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-10-16 06:45:54','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N','N','N','Y','Y','N',TO_TIMESTAMP('2018-10-16 06:45:54','YYYY-MM-DD HH24:MI:SS'),100,'N','N',541145,'N','Ein Geschäftspartner ist jemand, mit dem Sie interagieren. Dies kann Lieferanten, Kunden, Mitarbeiter oder Handelsvertreter umfassen.',563283,'N','N','N','N','N','N','N','N','Bezeichnet einen Geschäftspartner',0,0,187,'de.metas.vertical.healthcare.forum_datenaustausch_ch','N','N','Geschäftspartner','C_BPartner_ID')
;
-- 2018-10-16T06:45:54.576
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=563283 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- 2018-10-16T06:45:57.668
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ SELECT public.db_alter_table('HC_Forum_Datenaustausch_Config','ALTER TABLE public.HC_Forum_Datenaustausch_Config ADD COLUMN C_BPartner_ID NUMERIC(10)')
;
-- 2018-10-16T06:45:57.697
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE HC_Forum_Datenaustausch_Config ADD CONSTRAINT CBPartner_HCForumDatenaustauschConfig FOREIGN KEY (C_BPartner_ID) REFERENCES public.C_BPartner DEFERRABLE INITIALLY DEFERRED
;
-- 2018-10-16T07:06:52.625
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Index_Table (CreatedBy,Processing,Created,AD_Client_ID,IsActive,IsUnique,WhereClause,AD_Table_ID,Updated,UpdatedBy,AD_Index_Table_ID,AD_Org_ID,Name,EntityType) VALUES (100,'N',TO_TIMESTAMP('2018-10-16 07:06:52','YYYY-MM-DD HH24:MI:SS'),0,'Y','Y','IsAyctive=''Y''',541145,TO_TIMESTAMP('2018-10-16 07:06:52','YYYY-MM-DD HH24:MI:SS'),100,540453,0,'HC_Forum_Datenaustausch_Config_UC','de.metas.vertical.healthcare.forum_datenaustausch_ch')
;
-- 2018-10-16T07:06:52.629
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Index_Table_Trl (AD_Language,AD_Index_Table_ID, ErrorMsg, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Index_Table_ID, t.ErrorMsg, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Index_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Index_Table_ID=540453 AND NOT EXISTS (SELECT 1 FROM AD_Index_Table_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Index_Table_ID=t.AD_Index_Table_ID)
;
-- 2018-10-16T07:07:32.663
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Index_Column (Created,CreatedBy,Updated,AD_Client_ID,AD_Index_Table_ID,IsActive,AD_Column_ID,SeqNo,UpdatedBy,AD_Index_Column_ID,ColumnSQL,AD_Org_ID,EntityType) VALUES (TO_TIMESTAMP('2018-10-16 07:07:32','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-10-16 07:07:32','YYYY-MM-DD HH24:MI:SS'),0,540453,'Y',563283,10,100,540896,'COLALESCE(C_BPartner_ID,0)',0,'de.metas.vertical.healthcare.forum_datenaustausch_ch')
;
-- 2018-10-16T07:07:41.506
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Index_Table SET WhereClause='IsActive=''Y''',Updated=TO_TIMESTAMP('2018-10-16 07:07:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Index_Table_ID=540453
;
-- 2018-10-16T07:07:56.321
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Index_Column SET ColumnSQL='COALESCE(C_BPartner_ID,0)',Updated=TO_TIMESTAMP('2018-10-16 07:07:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Index_Column_ID=540896
;
-- 2018-10-16T07:07:58.024
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
CREATE UNIQUE INDEX HC_Forum_Datenaustausch_Config_UC ON HC_Forum_Datenaustausch_Config (COALESCE(C_BPartner_ID,0)) WHERE IsActive='Y'
;
-- 2018-10-16T08:21:33.034
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2018-10-16 08:21:33','YYYY-MM-DD HH24:MI:SS'),Description='',Help='' WHERE AD_Element_ID=3020 AND AD_Language='fr_CH'
;
-- 2018-10-16T08:21:33.043
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(3020,'fr_CH')
;
-- 2018-10-16T08:21:48.884
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Element_Trl WHERE AD_Element_ID=3020 AND AD_Language='fr_CH'
;
-- 2018-10-16T08:21:48.918
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Element_Trl WHERE AD_Element_ID=3020 AND AD_Language='it_CH'
;
-- 2018-10-16T08:21:48.992
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Element_Trl WHERE AD_Element_ID=3020 AND AD_Language='en_GB'
;
-- 2018-10-16T08:21:54.772
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2018-10-16 08:21:54','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Description='',Help='' WHERE AD_Element_ID=3020 AND AD_Language='de_CH'
;
-- 2018-10-16T08:21:54.778
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(3020,'de_CH')
;
-- 2018-10-16T08:21:59.537
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2018-10-16 08:21:59','YYYY-MM-DD HH24:MI:SS'),Name='Status' WHERE AD_Element_ID=3020 AND AD_Language='en_US'
;
-- 2018-10-16T08:21:59.540
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(3020,'en_US')
;
-- 2018-10-16T08:34:04.974
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_JavaClass_Type WHERE AD_JavaClass_Type_ID=540041
;
-- 2018-10-16T08:38:49.028
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Val_Rule SET Code='AD_AttachmentEntry_ID IN (
select r.AD_AttachmentEntry_ID
from AD_Attachment_MultiRef r
where r.AD_Table_ID=get_Table_ID(''C_DataImport'') and r.Record_ID=@C_DataImport_ID@ )',Updated=TO_TIMESTAMP('2018-10-16 08:38:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=540389
;
|
<gh_stars>1-10
-- $ID$
-- TPC-H/TPC-R Shipping Priority Query (Q3)
-- Functional Query Definition
-- Approved February 1998
select top 10
l_orderkey,
sum(l_extendedprice * (1 - l_discount)) as revenue,
o_orderdate,
o_shippriority
from
customer,
orders,
lineitem
where
c_mktsegment = 'AUTOMOBILE'
and c_custkey = o_custkey
and l_orderkey = o_orderkey
and o_orderdate < convert(date,'1995-03-01')
and l_shipdate > convert(date,'1995-03-01')
group by
l_orderkey,
o_orderdate,
o_shippriority
order by
revenue desc,
o_orderdate;
|
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id SERIAL PRIMARY KEY,
firstname VARCHAR NOT NULL,
lastname VARCHAR NOT NULL,
email VARCHAR NOT NULL,
password VARCHAR NOT NULL,
imageurl VARCHAR,
bio VARCHAR,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
DROP TABLE IF EXISTS password_reset_codes;
CREATE TABLE password_reset_codes(
id SERIAL PRIMARY KEY,
email VARCHAR NOT NULL,
code VARCHAR NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
DROP TABLE IF EXISTS friendships;
CREATE TABLE friendships(
id SERIAL PRIMARY KEY,
senderid INT NOT NULL REFERENCES users(id),
receiverid INT NOT NULL REFERENCES users(id),
accepted BOOLEAN DEFAULT false,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
DROP TABLE IF EXISTS chat;
CREATE TABLE chat (
id SERIAL PRIMARY KEY,
messagebody TEXT NOT NULL,
senderid INT NOT NULL REFERENCES users(id),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
|
-- This file was last modified at 2021.12.06 18:25 by <NAME>.
-- This is free and unencumbered software released into the public domain.
-- For more information, please refer to <http://unlicense.org>
-- alter_user.sql
GRANT ALL PRIVILEGES ON DATABASE dbuser TO db;
ALTER USER dbuser PASSWORD 'password';
ALTER USER dbuser SUPERUSER;
|
-- :name all_users :many
select * from users;
-- :name check_for_user :one
select * from users where username = :username
-- :name create_user :insert
insert into users (username, email, hashpass) values (:username, :email, :hashpass)
-- :name authenticate_user :many
select username from users where (username = :username and hashpass = :hashpass)
-- :name check_users_followers :many
select follower from userfollowers where followee = :followee
-- :name check_following_users :many
select followee from userfollowers where follower = :follower
-- :name start_following_user :insert
insert into userfollowers (followee, follower) values (:followee, :follower)
-- :name stop_following
delete from userfollowers where followee = :followee and follower = :follower
-- :name check_if_following :one
select * from userfollowers where followee = :followee and follower = :follower |
<filename>src/main/resources/META-INF/load.sql<gh_stars>1-10
-- SQL statements to populate the database
|
<reponame>h4ck3rm1k3/S2RDF
SELECT tab2.a1 AS a1 , tab5.a2 AS a2 , tab4.movie AS movie , tab0.name1 AS name1 , tab1.name2 AS name2
FROM (SELECT sub AS a1
FROM rdf__type$$3$$
WHERE obj = '<wikicategory_English_film_actors>'
) tab2
JOIN (SELECT sub AS a1 , obj AS name1
FROM skos__prefLabel$$1$$
) tab0
ON(tab2.a1=tab0.a1)
JOIN (SELECT sub AS a1 , obj AS movie
FROM _L_actedIn_B_$$5$$
) tab4
ON(tab0.a1=tab4.a1)
JOIN (SELECT obj AS movie , sub AS a2
FROM _L_actedIn_B_$$6$$
) tab5
ON(tab4.movie=tab5.movie)
JOIN (SELECT sub AS a2
FROM rdf__type$$4$$
WHERE obj = '<wikicategory_English_film_actors>'
) tab3
ON(tab5.a2=tab3.a2)
JOIN (SELECT sub AS a2 , obj AS name2
FROM skos__prefLabel$$2$$
) tab1
ON(tab3.a2=tab1.a2)
WHERE (tab2.a1 != tab5.a2)
++++++Tables Statistic
_L_actedIn_B_$$6$$ 0 VP _L_actedIn_B_/
VP <actedIn> 127513
SS <actedIn><skos__prefLabel> 127513 1.0
SS <actedIn><rdf__type> 127513 1.0
------
rdf__type$$3$$ 2 SS rdf__type/_L_actedIn_B_
VP <rdf__type> 61165359
SS <rdf__type><skos__prefLabel> 61159360 1.0
SS <rdf__type><actedIn> 832287 0.01
------
skos__prefLabel$$1$$ 2 SS skos__prefLabel/_L_actedIn_B_
VP <skos__prefLabel> 2954875
SS <skos__prefLabel><rdf__type> 2886010 0.98
SS <skos__prefLabel><actedIn> 26665 0.01
------
skos__prefLabel$$2$$ 2 SS skos__prefLabel/_L_actedIn_B_
VP <skos__prefLabel> 2954875
SS <skos__prefLabel><rdf__type> 2886010 0.98
SS <skos__prefLabel><actedIn> 26665 0.01
------
_L_actedIn_B_$$5$$ 0 VP _L_actedIn_B_/
VP <actedIn> 127513
SS <actedIn><skos__prefLabel> 127513 1.0
SS <actedIn><rdf__type> 127513 1.0
------
rdf__type$$4$$ 2 SS rdf__type/_L_actedIn_B_
VP <rdf__type> 61165359
SS <rdf__type><skos__prefLabel> 61159360 1.0
SS <rdf__type><actedIn> 832287 0.01
------
|
INSERT INTO algotrading.assets (is_native,token_name,token_code,token_asset_id,token_network) VALUES
(1,'Algorand','ALGO',0,'mainnet'),
(0,'USDC','USDC',31566704,'mainnet'),
(0,'Tether USDt','USDt',312769,'mainnet'),
(1,'Algorand','ALGO',0,'testnet'),
(0,'USDC','USDC',10458941,'testnet'),
(0,'Tether USDt','USDt',26837931,'testnet'); |
/* Copyright 2016 OpenMarket Ltd
*
* 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 local_media_repository_url_cache(
url TEXT, -- the URL being cached
response_code INTEGER, -- the HTTP response code of this download attempt
etag TEXT, -- the etag header of this response
expires INTEGER, -- the number of ms this response was valid for
og TEXT, -- cache of the OG metadata of this URL as JSON
media_id TEXT, -- the media_id, if any, of the URL's content in the repo
download_ts BIGINT -- the timestamp of this download attempt
);
CREATE INDEX local_media_repository_url_cache_by_url_download_ts
ON local_media_repository_url_cache(url, download_ts);
|
<gh_stars>0
CREATE TABLE [dbo].[FinancialTransactionAccount] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[AccountNumber] VARCHAR (255) NULL,
[AgreementId] INT NULL,
[BalanceId] INT NULL,
[BalanceDate] DATE NULL,
[CalculateBalance] BIT NULL,
[PaymentDueId] INT NULL,
[DueDate] DATE NULL,
[FinancialAccountId] INT NULL,
[FinancialAccountType] VARCHAR (255) NULL,
[CreatedAt] DATETIME NOT NULL,
[UpdatedAt] DATETIME NOT NULL,
PRIMARY KEY CLUSTERED ([Id] ASC)
);
|
<filename>human.sql
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 01, 2019 at 06:37 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.1.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `human`
--
-- --------------------------------------------------------
--
-- Table structure for table `advertisement`
--
CREATE TABLE `advertisement` (
`id` int(11) NOT NULL COMMENT 'รหส',
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'หัวข้อข่าวประชาสัมพันธ์',
`detail` longtext COLLATE utf8_unicode_ci NOT NULL COMMENT 'รายละเอียดประชาสัมพันธ์',
`create_by` bigint(20) DEFAULT NULL COMMENT 'สร้างโดย',
`create_date` datetime DEFAULT NULL COMMENT 'สร้างวันที่',
`photo` varchar(255) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
--
-- Dumping data for table `advertisement`
--
INSERT INTO `advertisement` (`id`, `title`, `detail`, `create_by`, `create_date`, `photo`) VALUES
(4, 'สำนักวิทยบริการและเทคโนโลยีสารสนเทศ', '<p>สำนักวิทยบริการและเทคโนโลยีสารสนเทศ อาคารบรรณราชนครินทร์ (ห้องสมุด) เปิดบริการล่วง 20.00 น.</p>\r\n', 3, '2019-04-30 14:26:47', '1556609207.jpg'),
(5, 'ประกาศหยุดให้บริการ 6-8 เมษายน 2562', '<h1>ร่วมสืบสานประเพณี สงกรานต์</h1>\r\n\r\n<p>ร่วมกิจกรรม สรงน้ำพระ อาคารบรรณราชนครินทร์ (ห้องสมุด) ชั้น 1 มหาวิทยาลัยราชภัฏสกลนคร</p>\r\n', 3, '2019-04-30 14:18:50', '1556608730.jpg'),
(6, 'ประกาศหยุด', '<h1>ประกาศเรื่องปิดปรับปรุง ดูแล รักษาเครื่องแม่ข่ายที่ให้บริการ</h1>\r\n\r\n<p>สำนักวิทยบริการและเทคโนโลยีสารสนเทศเนื่องจากฮาร์ดดิสก์ (Hard Disk) ของเครื่องแม่ข่ายที่ให้บริการ เกิดความเสียหายจากการประมวลผลงานสารสนเทศภายใน<br />\r\nดั้งนั้น เพื่อความเสถียรภาพของเครื่องแม่ข่ายที่ให้บริการ จะทำการปิดปรับปรุง ดูแล รักษาเครื่องแม่ข่ายที่ให้บริการตั้งแต่วันที่ 26 เมษายน 2562 เวลา 18.00 น. ถึง วันที่ 28 เมษายน 2562 เวลา 18.00 น.<br />\r\nจึงทำให้ไม่สามารถเข้าใช้งานระบบภายในที่ให้บริการในช่วงเวลาดังกล่าวได้ ประกอบด้วย<br />\r\n1. ระบบเว็บไซต์มหาวิทยาลัยราชภัฏสกลนคร<br />\r\n2. ระบบเว็บไซต์อาจารย์<br />\r\n3. เว็บไซต์หน่วยงาน<br />\r\n4. ระบบจองเลขหนังสือพัสดุ<br />\r\n5. ระบบแฟ้มสะสมงานบุคลากร<br />\r\n6. ระบบบริหารงบประมาณ<br />\r\n7. ระบบจองเลขที่หนังสือราชการภายนอกและเลขที่คำสั่งออนไลน์<br />\r\n8. ระบบบริหารวัสดุ<br />\r\n9. ระบบจัดการเรียนการสอนออนไลน์<br />\r\n10. ระบบไฟล์</p>\r\n\r\n<p>ขออภัยในความไม่สดวกมา ณ ที่นี้</p>\r\n', 3, '2019-04-30 14:17:58', '1556608678.jpg'),
(7, 'งานสัปดาห์ห้องสมุด2562 ', '<h3>ขอเชิญ เข้าร่วม “ งานสัปดาห์ห้องสมุด2562 ” ระหว่างวันที่ 5 – 7 มีนาคม 2562 ณ อาคารบรรณราชนครินทร์ และ อาคารศูนย์ภาษาและคอมพิวเตอร์</h3>\r\n\r\n<h3><strong>กิจกรรมภายในงาน</strong><br />\r\n<strong>การบรรยายทางวิชาการ</strong><br />\r\n<strong>การประดิษฐ์สมุดทำมือ</strong><br />\r\n<strong>กิจกรรมห้องสมุดมนุษย์ (Human Library)</strong><br />\r\n<strong>กิจกรรม แชะ โชว์ แชร์ ภาพถ่ายห้องสมุด</strong><br />\r\n<strong>กิจกรรมห้องสมุดสัมพันธ์</strong><br />\r\n<strong>SNRU Book & ICT Fair 2019</strong><br />\r\n<strong>การแข่งขัน E-Sport</strong><br />\r\n<strong>ชมดนตรีโฟล์กซอง</strong><br />\r\n<strong>(พร้อมรางวัลสำหรับผู้เข้าร่วมกิจกรรมอีกมากมาย)</strong></h3>\r\n\r\n<p><img alt=\"\" src=\"http://storage.humanlibrary.local/uploads//1556608980_poster2.jpg\" style=\"height:351px; width:248px\" /></p>\r\n\r\n<h3> </h3>\r\n', 3, '2019-04-30 14:24:15', '1556609056.jpg'),
(8, 'ประกาศพิธีพระราชทานปริญญบัตร', '<p>???????? กำหนดการงานพิธีพระราชทานปริญญาบัตร ปี พ.ศ.2562 <br />\r\n<a href=\"http://reg.snru.ac.th/reg/?fbclid=IwAR2CdOzZT2RnDPMH_T5Am5RvManX7a03RpvBkZjdG-amsqe_pQ8cFDe3tZU\" target=\"_blank\">http://reg.snru.ac.th/reg/</a> รายชื่อบัณฑิต มหาบัณฑิต และดุษฎีบัณฑิต มหาวิทยาลัยราชภัฏสกลนคร (ช่วงฝึกซ้อม)????‍????????‍????</p>\r\n', 3, '2019-08-16 15:08:21', '1565942901.jpg');
-- --------------------------------------------------------
--
-- Table structure for table `assessment_form`
--
CREATE TABLE `assessment_form` (
`id` int(11) NOT NULL COMMENT 'รหัส',
`title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'หัวข้อแปบประเมิน',
`explanation` text COLLATE utf8_unicode_ci COMMENT 'คำชี้แจง',
`create_date` date DEFAULT NULL COMMENT 'วันที่สร้าง',
`create_by` bigint(20) DEFAULT NULL COMMENT 'สร้างโดย',
`detail` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
--
-- Dumping data for table `assessment_form`
--
INSERT INTO `assessment_form` (`id`, `title`, `explanation`, `create_date`, `create_by`, `detail`) VALUES
(2, 'โครงการห้องสมุดมนุษย์ (Human Library) เรื่อง มนต์เสน่ห์ผ้าย้อมคราม by ครามฮัก', 'คำชี้แจง 1. ข้อมูลที่ได้จากแบบประเมินนี้จะนำไปใช้ในการพัฒนาการจัดการโครงการครั้งต่อไป<br>\r\n 2. โปรดตอบแบบประเมินตามความคิดเห็นที่สร้างสรรค์อย่างแท้จริง<br>\r\n 3. ทุกความคิดเห็นของท่านเป็นส่วนหนึ่งที่จะพัฒนาสำนักวิทยบริการและเทคโนโลยีสารสนเทศต่อไป<br>', '2019-04-07', 1, '<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/lai0VGzWRrM\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>');
-- --------------------------------------------------------
--
-- Table structure for table `assessment_form_l1`
--
CREATE TABLE `assessment_form_l1` (
`id` int(11) NOT NULL COMMENT 'รหัส',
`p_id` int(11) DEFAULT NULL COMMENT 'รหัสฟอร์มแบบประเมิน',
`sex` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'เพศ',
`status` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'สถานะ',
`status_other` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'อื่นๆ',
`department` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'หน่วยงานที่สังกัด',
`department_other` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'อื่นๆ'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
--
-- Dumping data for table `assessment_form_l1`
--
INSERT INTO `assessment_form_l1` (`id`, `p_id`, `sex`, `status`, `status_other`, `department`, `department_other`) VALUES
(1, NULL, '', '', '', '', '');
-- --------------------------------------------------------
--
-- Table structure for table `assessment_form_l2`
--
CREATE TABLE `assessment_form_l2` (
`id` int(11) NOT NULL COMMENT 'รหัสแปบบประเมิน',
`p_id` int(11) NOT NULL COMMENT 'รหัสแบบประเมิน',
`one` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '1. ความรู้ที่ได้รับจากการเข้าร่วมเปิดอ่านหนังสือมีชีวิต (Living book)',
`two` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '2. เนื้อหาของหนังสือมีชีวิตมีความน่าสนใจ',
`three` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '3. หนังสือมีชีวิต (Living book) ถ่ายทอดเนื้อหาได้ชัดเจน',
`four` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '4. หนังสือมีชีวิต (Living book) ถ่ายทอดเนื้อหาได้อย่างน่าสนใจ',
`five` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '5. การจัดโครงการห้องสมุดมนุษย์ (Human Library) มีประโยชน์',
`six` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '6. การจัดโครงการห้องสมุดมนุษย์ (Human Library) มีความเหมาะสม',
`seven` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '7. บรรยากาศในการจัดงานในครั้งนี้มีความเหมาะสม',
`eight` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '8. สามารถนำความรู้ที่ได้รับไปประยุกต์ใช้ในการปฏิบัติงานและการดำเนินชีวิตประจำวันได้',
`nine` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '9. อยากให้มีการจัดกิจกรรมนี้อีก'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
-- --------------------------------------------------------
--
-- Table structure for table `assessment_form_l3`
--
CREATE TABLE `assessment_form_l3` (
`id` int(11) NOT NULL COMMENT 'รหัสแปบบประเมิน',
`p_id` int(11) DEFAULT NULL COMMENT 'รหัสแปบบประเมินหลัก',
`one` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'ข้อเสนอแนะเพิ่มเติมอื่น ๆ (โปรดระบุ)',
`two` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'หัวข้อที่ท่านสนใจที่จะร่วมกิจกรรมครั้งต่อไป (โปรดระบุ)'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
-- --------------------------------------------------------
--
-- Table structure for table `banners`
--
CREATE TABLE `banners` (
`id` int(11) NOT NULL,
`photo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'รูปภาพ',
`detail` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'รายละเอียด',
`forder` int(11) DEFAULT NULL COMMENT 'ลำดับที่',
`create_by` bigint(20) DEFAULT NULL COMMENT 'สร้างโดย',
`create_date` datetime DEFAULT NULL COMMENT 'สร้างเมื่อวันที่',
`url` varchar(255) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `banners`
--
INSERT INTO `banners` (`id`, `photo`, `detail`, `forder`, `create_by`, `create_date`, `url`) VALUES
(4, '1556607837.jpg', '', 1, 3, '2019-04-30 14:03:57', '/site/news-detail?id=5'),
(5, '1556607958.jpg', '', 2, 3, '2019-04-30 14:05:58', '/site/news-detail?id=4'),
(6, '1556608937.jpg', '', 3, 3, '2019-04-30 14:22:17', '/site/news-detail?id=6');
-- --------------------------------------------------------
--
-- Table structure for table `book`
--
CREATE TABLE `book` (
`id` int(11) NOT NULL COMMENT 'รหัสการบรรยาย',
`title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'หัวข้อการบรรยาย',
`detail` longtext COLLATE utf8_unicode_ci COMMENT 'รายละเอียดการบรรยาย',
`user_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'ชื่อผู้บรรยาย',
`user_image` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'รูปภาพผู้บรรยาย',
`date` datetime DEFAULT NULL COMMENT 'เวลาจัดการการบรรยาย',
`create_by` bigint(20) DEFAULT NULL COMMENT 'สร้างโดย',
`create_date` datetime DEFAULT NULL COMMENT 'สร้างเมื่อ',
`forder` int(11) DEFAULT NULL COMMENT 'ลำดับที่',
`time_start` time DEFAULT NULL COMMENT 'เวลาจัดกิจกรรม',
`time_stop` time DEFAULT NULL COMMENT 'ถึงเวลา',
`location` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'สถานที่จัดงาน'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
--
-- Dumping data for table `book`
--
INSERT INTO `book` (`id`, `title`, `detail`, `user_name`, `user_image`, `date`, `create_by`, `create_date`, `forder`, `time_start`, `time_stop`, `location`) VALUES
(2, 'บรรยายวิชาการ เรื่อง ฝันให้ไกลไปให้ถึง ด้วยทักษะการอ่านและการเรียนรู้', '<p> </p>\r\n\r\n<p> </p>\r\n', 'รศ.ดร.น้ำทิพย์ วิภาวิน มหาวิทยาลัยสุโขทัยธรรมาธิราช', '1554875288.jpg', '2019-03-06 00:00:00', 3, '2019-04-30 13:14:32', 1, '09:07:25', NULL, 'ณ ห้องประชุมสัตตบงกช อาคารศูนย์ภาษาและคอมพิวเตอร์ มหาวิทยาลัยราชภัฏสกลนคร'),
(3, 'กิจกรรม Human Library เรื่อง เปิดช่องทางธุรกิจภูหวานคอฟฟี่ ', '<p>วันที่ 5 มีนาคม 2562 เวลา 10.00-12.00 น. วิทยากรโดยคุณกรรณิกา จันทร์พา เจ้าของร้านภูหวาน ห้องสัตตบงกช อาคารศูนย์ภาษาและคอมพิวเตอร์</p>\r\n', 'วิทยากรโดยคุณกรรณิกา จันทร์พา', '1554876736.jpg', '2019-03-05 00:00:00', 3, '2019-04-10 14:25:26', 2, NULL, NULL, NULL),
(4, 'การปลูกพืชแบบผสมผสาน', '<p>เวลาจัดกิจกรรม : อังคาร 20 ธันวาคม 2016 , 09:00:00</p>\r\n\r\n<p>การปลูกพืชแบบผสมผสาน ไม่มีคำจำกัดความเพราะสามารถแตกแขนงออกได้หลายแบบไม่มีการเจาะลงชนิดของพืชที่สามารถปลูกแต่การทำเกษตรแบบผสมผสานนั้น ภายในแปลงปลูกควรมีพืชพันธ์นานาชนิดมีความร่มรื่น เย็นสบาย เพื่อให้พืชหลายชนิดมีการเอื้อเฟื้อต่อกันได้มากที่สุด โดยส่วนใหญ่แล้วพืชพันธ์ที่พบภายในสวน มีทั้งไม้ผล ไม้ยืนต้น พืชผักสมุนไพร ผักพื้นบ้าน ผักป่า ผักสวนครัว และอื่นๆ ที่สามารถนำมาใช้ประโยชน์ได้ทุกอย่าง รวมทั้ง การเลี้ยงกุ้งหอย ปู ปลาในบ่อเดียวกัน เรียกได้ว่าเป็นการผสมผสานทุกสิ่งทุกอย่าง ในพื้นที่จำกัดได้อย่างลงตัว และที่สำคัญสามารถพึ่งพาตนเองได้อย่างยั่งยืน เป็นวิธีทำการเกษตรที่มีการเพาะปลูกและเลี้ยงสัตว์หลายๆ ชนิดอยู่พื้นที่เดียวกัน มีการนำวัสดุเหลือใช้จากการผลิตหนึ่ง เพื่อใช้ประโยชน์อย่างครบวงจร โดยทั่วไปการผลิตแบบนี้มักเป็นรูปแบบการเกษตรประเภททำเพื่อพอกินพอใช้ ทำโดยสมาชิกในครัวเรือนพอมีเหลือจึงขาย ซึ่งการเกษตรแบบนี้จัดเป็นการเกษตรแบบดั้งเดิม ที่เกษตรกรสามารถมีชีวิตอยู่ได้อย่างพอเพียงแต่อาจไม่เหมาะกับสภาพเศรษฐกิจในปัจจุบัน เนื่องจากเกษตรกรจำเป็นต้องมีรายได้หลักเพื่อใช้จ่ายภายในครอบครัว รวมทั้งเพื่อการศึกษาของบุตรหลาน ค่าใช้จ่ายเพื่อรักษาพยาบาลเมื่อยามเจ็บป่วย หลักการสำคัญของการผลิตแบบนี้คือ การรักษาสมดุลของระบบนิเวศ ลดการใช้สารเคมีการเกษตรหรือใช้แนวทางเลือกอื่นในการป้องกันกำจัดศัตรูพืช ซึ่งการเกษตรแบบนี้ถ้าได้รับการพัฒนาให้เหมาะสมจะเกิดประโยชน์แก่เกษตรกรทำให้มีงานทำตลอดปี</p>\r\n', 'ดร.นฤทธิ์ คำธิศรี', '1555599786.jpg', '2016-12-20 00:00:00', 3, '2019-05-23 14:34:21', 3, '09:00:00', NULL, ' ชั้น 1 อาคารบรรณราชนครินทร์');
-- --------------------------------------------------------
--
-- Table structure for table `events`
--
CREATE TABLE `events` (
`id` int(11) NOT NULL COMMENT 'รหัสกิจกรรม',
`title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'ชื่อกิจกรรม',
`detail` text COLLATE utf8_unicode_ci COMMENT 'รายละเอียดกิจกรรม',
`create_at` int(255) DEFAULT NULL COMMENT 'สร้างโดย',
`create_date` datetime DEFAULT NULL COMMENT 'วันที่จัดกิจกรรม',
`update_at` int(11) DEFAULT NULL COMMENT 'แก้ไขโดย',
`update_date` datetime DEFAULT NULL COMMENT 'แก้ไขเมื่อวันที่',
`rstat` int(11) DEFAULT NULL COMMENT 'สถานะ',
`forder` int(11) DEFAULT NULL COMMENT 'เรียงลำดับ',
`event_type` int(11) DEFAULT NULL COMMENT 'ประเภทกิจกรรม',
`file` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'ภาพขนาดเล็ก',
`time_start` time NOT NULL,
`user_name` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
`location` varchar(255) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
--
-- Dumping data for table `events`
--
INSERT INTO `events` (`id`, `title`, `detail`, `create_at`, `create_date`, `update_at`, `update_date`, `rstat`, `forder`, `event_type`, `file`, `time_start`, `user_name`, `location`) VALUES
(1554881043, 'กิจกรรม Human Library เรื่อง เปิดช่องทางธุรกิจภูหวานคอฟฟี่ ', '', 3, '2019-04-10 00:00:00', NULL, '2019-08-16 16:44:57', 1, 4, 1, '1554881043.jpg', '09:30:00', '', ''),
(1556260612, 'ปราชญ์เดินดิน วิถีลูกอีสาน', '<p>“ เรื่อง : ปราชญ์เดินดิน วิถีลูกอีสาน ”</p>\r\n\r\n<p>สถานที่จัดกิจกรรม : ชั้น 1 อาคารบรรณราชนครินทร์ (ศูนย์วิทยบริการ)</p>\r\n\r\n<p>เวลาจัดกิจกรรม : พุธ 22 เมษายน 2015 , 09:00:00</p>\r\n\r\n<p> </p>\r\n', 1, '2015-04-22 00:00:00', NULL, '2019-08-26 14:14:46', 1, 1, 1, '1565680765.jpg', '09:00:00', 'รศ.ดร.น้ำทิพย์ วิภาวิน ', 'ชั้น 1 อาคารบรรณราชนครินทร์ (ศูนย์วิทยบริการ)'),
(1565947890, 'ผ้าคราม', '<p>“ เรื่อง : ผ้าคราม ”</p>\r\n\r\n<p>สถานที่จัดกิจกรรม : ชั้น 1 อาคารบรรณราชนครินทร์ (ศูนย์วิทยบริการ)</p>\r\n\r\n<p>เวลาจัดกิจกรรม : ศุกร์ 5 มิถุนายน 2015 , 09:00:00</p>\r\n', 3, '2015-06-05 00:00:00', NULL, '2019-08-16 16:44:48', 1, 2, 1, '1565947890.jpg', '16:29:05', 'ผศ.อนุรัตน์ สายทอง', 'ชั้น 1 อาคารบรรณราชนครินทร์ (ศูนย์วิทยบริการ)'),
(1565948477, 'เล่าขานตำนานเมืองสกลนคร', '<p><a href=\"http://human.snru.ac.th/register/22\">พระมหาคาวี ญาณสาโร</a></p>\r\n\r\n<p>“ เรื่อง : เล่าขานตำนานเมืองสกลนคร ”</p>\r\n\r\n<p>สถานที่จัดกิจกรรม : อาคารศูนย์ภาษาและคอมพิวเตอร์</p>\r\n\r\n<p>เวลาจัดกิจกรรม : พุธ 7 กุมภาพันธ์ 2018 , 09:30:00</p>\r\n', 3, '2018-02-07 00:00:00', NULL, '2019-08-16 16:45:05', 1, 3, 1, '1565948490.jpg', '09:30:00', 'พระมหาคาวี ญาณสาโร', 'อาคารศูนย์ภาษาและคอมพิวเตอร์');
-- --------------------------------------------------------
--
-- Table structure for table `files`
--
CREATE TABLE `files` (
`id` bigint(20) NOT NULL COMMENT 'รหัสไฟล์',
`event_id` bigint(20) DEFAULT NULL COMMENT 'ชื่อกิจกรรม',
`file_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'ชื่อไฟล์',
`file_name_origin` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'ชื่อไฟล์ต้นฉบับ',
`forder` int(11) DEFAULT NULL COMMENT 'เรียงลำดับไฟล์',
`created_by` int(11) DEFAULT NULL COMMENT 'สร้างโดย'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
--
-- Dumping data for table `files`
--
INSERT INTO `files` (`id`, `event_id`, `file_name`, `file_name_origin`, `forder`, `created_by`) VALUES
(155488106259, 1554881043, '20190410_142422_900.jpg', 'IMG_0563.JPG', 99941, 3),
(1554881061291, 1554881043, '20190410_142421_494.jpg', 'IMG_0553.JPG', 99944, 3),
(1554881061786, 1554881043, '20190410_142421_500.jpg', 'IMG_0545.JPG', 99945, 3),
(1554881062727, 1554881043, '20190410_142422_278.jpg', 'IMG_0550.JPG', 99943, 3),
(1554881062776, 1554881043, '20190410_142422_804.jpg', 'IMG_0552.JPG', 99942, 3),
(1554881062960, 1554881043, '20190410_142422_963.jpg', 'IMG_0566.JPG', 99940, 3),
(1554881063115, 1554881043, '20190410_142423_361.jpg', 'IMG_0595.JPG', 99937, 3),
(1554881063420, 1554881043, '20190410_142423_626.jpg', 'IMG_0571.JPG', 99938, 3),
(1554881063515, 1554881043, '20190410_142423_980.jpg', 'IMG_0567.JPG', 99939, 3),
(1556601241458, 1556260612, '20190430_121401_864.mp4', 'edit01.mp4', 99936, 3),
(1556601302431, 1556260612, '20190430_121502_36.mp4', 'edit02.mp4', 99935, 3),
(1565681166524, 1556260612, '20190813_142606_593.jpg', '2.jpg', 100000, 2),
(1565948104925, 1565947890, '20190816_163504_234.mp4', 'Human Library . 1.mp4', 99934, 3),
(1565948828387, 1565947890, '20190816_164708_407.mp4', 'Human Library . 2.mp4', 99933, 3);
-- --------------------------------------------------------
--
-- Table structure for table `info`
--
CREATE TABLE `info` (
`id` int(11) NOT NULL COMMENT 'รหัสผู้จัดทำ',
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'ชื่อผู้จัดทำ',
`detail` longtext COLLATE utf8_unicode_ci COMMENT 'รายละเอียดผู้จัดทำ'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
--
-- Dumping data for table `info`
--
INSERT INTO `info` (`id`, `name`, `detail`) VALUES
(2, 'นางสาวกัญญาพร มาตราช', '<p>รหัสนักศึกษา 58102105207</p>\r\n\r\n<p>สาขาวิชา วิทยาการคอมพิวเตอร์ หมู่ 2 คณะวิทยาศาสตร์และเทคโนโลยี</p>\r\n\r\n<p>มหาวิทยาลัยราชภัฏสกลนคร</p>\r\n');
-- --------------------------------------------------------
--
-- Table structure for table `migration`
--
CREATE TABLE `migration` (
`version` varchar(180) COLLATE utf8_unicode_ci NOT NULL,
`apply_time` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
--
-- Dumping data for table `migration`
--
INSERT INTO `migration` (`version`, `apply_time`) VALUES
('m000000_000000_base', 1553559729),
('m130524_201442_init', 1553559745);
-- --------------------------------------------------------
--
-- Table structure for table `register_form`
--
CREATE TABLE `register_form` (
`id` int(11) NOT NULL,
`user_id` bigint(20) DEFAULT NULL COMMENT 'รหัสผู้ใช้',
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'ชื่อนามสกุล',
`tel` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'เบอร์โทรศัพท์',
`user_type` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'ประเภทผู้ใช้',
`department` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'หน่วยงาน',
`email` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'อีเมล์',
`event_id` int(11) NOT NULL,
`create_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
--
-- Dumping data for table `register_form`
--
INSERT INTO `register_form` (`id`, `user_id`, `name`, `tel`, `user_type`, `department`, `email`, `event_id`, `create_date`) VALUES
(1, 6, 'กัญญาพร มาตราช', '1234323456', 'อาจารย์', 'บัณฑิตวิทยาลัย', '<EMAIL>', 1556260612, '2019-08-04 22:45:40'),
(2, 7, 'คมสันต์ กัปโก', '0957628400', 'นักศึกษา', 'คณะมนุษย์ศาสตร์และสังคมศาสตร์', '<EMAIL>', 1556260612, '2019-08-20 11:12:36');
-- --------------------------------------------------------
--
-- Table structure for table `roles`
--
CREATE TABLE `roles` (
`id` int(11) NOT NULL COMMENT 'รหัสบทบาท',
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'ชื่อบทบาท'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
--
-- Dumping data for table `roles`
--
INSERT INTO `roles` (`id`, `name`) VALUES
(1, 'ผู้ดูแลระบบ'),
(2, 'เจ้าหน้าที่ห้องสมุด (บรรณารักษ์)'),
(3, 'สมาชิก');
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE `user` (
`id` int(11) NOT NULL,
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'ชื่อผู้ใช้',
`password` varchar(32) COLLATE utf8_unicode_ci NOT NULL COMMENT 'รหัสผ่าน',
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'อีเมล',
`status` int(6) NOT NULL DEFAULT '10',
`created_at` int(11) DEFAULT NULL COMMENT 'สร้างโดย',
`updated_at` int(11) DEFAULT NULL COMMENT 'แก้ไขโดย',
`firstname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'ชื่อ',
`lastname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'นามสกุล',
`tel` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'เบอร์โทรศัพท์',
`role` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'บทบาท'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`id`, `username`, `password`, `email`, `status`, `created_at`, `updated_at`, `firstname`, `lastname`, `tel`, `role`) VALUES
(2, 'user1', '1234', '<EMAIL>', 10, NULL, NULL, 'user1', 'user1', '0650859480', '[\"2\"]'),
(3, 'admin', '123456', '<EMAIL>', 10, NULL, NULL, 'Admin', 'Service', '0650859480', '[\"1\"]'),
(6, 'fah', '36987', '<EMAIL>', 10, NULL, NULL, 'ฟ้า', 'มาตราช', '0982035215', '[\"3\"]'),
(7, 'kom', '9632147', '<EMAIL>', 10, NULL, NULL, 'ฟ้า', 'กัญ', '0987542803', '[\"3\"]');
-- --------------------------------------------------------
--
-- Table structure for table `view_count`
--
CREATE TABLE `view_count` (
`id` int(11) NOT NULL,
`count` bigint(20) DEFAULT NULL COMMENT 'จำนวนการเข้าชม'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
--
-- Dumping data for table `view_count`
--
INSERT INTO `view_count` (`id`, `count`) VALUES
(1, 265);
-- --------------------------------------------------------
--
-- Table structure for table `view_count_video`
--
CREATE TABLE `view_count_video` (
`id` int(11) NOT NULL,
`count` bigint(20) DEFAULT NULL COMMENT 'จำนวนการเข้าชม',
`video_id` int(11) DEFAULT NULL COMMENT 'รหัสวีดีโอ'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
--
-- Dumping data for table `view_count_video`
--
INSERT INTO `view_count_video` (`id`, `count`, `video_id`) VALUES
(1554793768, 1, 2147483647),
(1554793772, 1, 2147483647),
(1554793776, 1, 2147483647),
(1554793778, 1, 2147483647),
(1556601337, 1, 2147483647),
(1556607611, 1, 2147483647),
(1565931013, 1, 2147483647),
(1565931033, 1, 2147483647),
(1565931065, 1, 2147483647),
(1565931069, 1, 2147483647),
(1565931089, 1, 2147483647),
(1565931261, 1, 2147483647),
(1565931342, 1, 2147483647),
(1565932193, 1, 2147483647),
(1565932198, 1, 2147483647),
(1565932205, 1, 2147483647),
(1565932213, 1, 2147483647),
(1565963400, 1, 2147483647),
(1566803798, 1, 2147483647);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `advertisement`
--
ALTER TABLE `advertisement`
ADD PRIMARY KEY (`id`) USING BTREE;
--
-- Indexes for table `assessment_form`
--
ALTER TABLE `assessment_form`
ADD PRIMARY KEY (`id`) USING BTREE;
--
-- Indexes for table `assessment_form_l1`
--
ALTER TABLE `assessment_form_l1`
ADD PRIMARY KEY (`id`) USING BTREE;
--
-- Indexes for table `assessment_form_l2`
--
ALTER TABLE `assessment_form_l2`
ADD PRIMARY KEY (`id`) USING BTREE;
--
-- Indexes for table `assessment_form_l3`
--
ALTER TABLE `assessment_form_l3`
ADD PRIMARY KEY (`id`) USING BTREE;
--
-- Indexes for table `banners`
--
ALTER TABLE `banners`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `book`
--
ALTER TABLE `book`
ADD PRIMARY KEY (`id`) USING BTREE;
--
-- Indexes for table `events`
--
ALTER TABLE `events`
ADD PRIMARY KEY (`id`) USING BTREE;
--
-- Indexes for table `files`
--
ALTER TABLE `files`
ADD PRIMARY KEY (`id`) USING BTREE;
--
-- Indexes for table `info`
--
ALTER TABLE `info`
ADD PRIMARY KEY (`id`) USING BTREE;
--
-- Indexes for table `migration`
--
ALTER TABLE `migration`
ADD PRIMARY KEY (`version`) USING BTREE;
--
-- Indexes for table `register_form`
--
ALTER TABLE `register_form`
ADD PRIMARY KEY (`id`) USING BTREE;
--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
ADD PRIMARY KEY (`id`) USING BTREE;
--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`id`) USING BTREE,
ADD UNIQUE KEY `username` (`username`) USING BTREE,
ADD UNIQUE KEY `email` (`email`) USING BTREE;
--
-- Indexes for table `view_count`
--
ALTER TABLE `view_count`
ADD PRIMARY KEY (`id`) USING BTREE;
--
-- Indexes for table `view_count_video`
--
ALTER TABLE `view_count_video`
ADD PRIMARY KEY (`id`) USING BTREE;
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `advertisement`
--
ALTER TABLE `advertisement`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'รหส', AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `assessment_form`
--
ALTER TABLE `assessment_form`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'รหัส', AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `assessment_form_l1`
--
ALTER TABLE `assessment_form_l1`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'รหัส', AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `assessment_form_l2`
--
ALTER TABLE `assessment_form_l2`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'รหัสแปบบประเมิน';
--
-- AUTO_INCREMENT for table `assessment_form_l3`
--
ALTER TABLE `assessment_form_l3`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'รหัสแปบบประเมิน';
--
-- AUTO_INCREMENT for table `banners`
--
ALTER TABLE `banners`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `book`
--
ALTER TABLE `book`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'รหัสการบรรยาย', AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `files`
--
ALTER TABLE `files`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'รหัสไฟล์', AUTO_INCREMENT=1565948828388;
--
-- AUTO_INCREMENT for table `info`
--
ALTER TABLE `info`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'รหัสผู้จัดทำ', AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `register_form`
--
ALTER TABLE `register_form`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'รหัสบทบาท', AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
PRAGMA foreign_keys=on;
drop table if exists animals;
drop table if exists breeds;
drop table if exists owners;
create table breeds(
name text primary key
);
insert into breeds (name) values('Golden Retriever');
create table owners(
id integer primary key autoincrement,
name text not null,
address text,
phone_no text
);
insert into owners (name, address, phone_no) values('<NAME>', '<NAME>', '9191919191');
create table animals(
id integer primary key autoincrement,
name text,
breed text not null references breeds,
owner integer references owners
);
--select(currval('breeds_id_seq')), --select(currval('animals_id_seq'))
insert into animals(name, breed, owner) values ('Tareco',
'Golden Retriever',
1
)
|
-- MODULE MPB008R repetition
-- SQL Test Suite, V6.0, Interactive SQL, mpb008r.sql
-- 59-byte ID
-- TEd Version #
-- AUTHORIZATION SULLIVAN1
SELECT USER FROM HU.ECCO;
-- RERUN if USER value does not match preceding AUTHORIZATION comment
COMMIT WORK;
-- date_time print
-- TEST:0517 Transaction serializability: Twins Problem!
-- Synchronize typing with MPA008R, by pausing at the designated "sync point".
-- Do not continue past the sync point until MPA008R has reached
-- a sync point with the same number.
-- Do not WAIT !!!
-- Begin before MPA008R
INSERT INTO TTT VALUES (3,'B');
-- PASS:0517 If ERROR, unique constraint, 0 rows inserted?
COMMIT WORK;
-- **** sync point #1 ****
-- WAIT !!!
-- Verify that MPA008R has DELETEd FROM TTT WHERE ANUM = 3
-- **** sync point #2 ****
-- NOTE:0517 It is OK for only one of the INSERT or COMMIT to fail.
INSERT INTO TTT VALUES (3,'B');
-- PASS:0517 If ERROR, unique constraint or serialization failure?
-- PASS:0517 If 0 rows inserted?
-- **** Tell MPA008R to ROLLBACK if this INSERT "hangs"
COMMIT WORK;
-- PASS:0517 If ERROR, unique constraint or serialization failure?
-- PASS:0517 If previous INSERT failed or 0 rows COMMITted?
-- **** sync point #3 ****
-- WAIT !!!
-- Verify that MPA008R has completed the first transaction
-- for SELECT/DELETE/INSERT with a COMMIT or ROLLBACK.
-- **** sync point #4 ****
-- WAIT !!!
-- Verify that MPA008R has DELETEd from TTT WHERE ANUM = 3;
-- **** sync point #5 ****
-- NOTE:0517 It is OK for only one of the INSERT or COMMIT to fail.
INSERT INTO TTT VALUES (3,'B');
-- PASS:0517 If ERROR, unique constraint or serialization failure?
-- PASS:0517 If 0 rows inserted?
-- **** Issue a CANCEL or BREAK (^C) if this INSERT "hangs"
COMMIT WORK;
-- PASS:0517 If ERROR, unique constraint or serialization failure?
-- PASS:0517 If previous INSERT failed or 0 rows COMMITted?
-- **** sync point #6 ****
-- *************************************************////END-OF-MODULE
|
-- @testpoint:opengauss关键字raw(非保留),作为模式名
--关键字不带引号-成功
drop schema if exists raw;
create schema raw;
drop schema raw;
--关键字带双引号-成功
drop schema if exists "raw";
create schema "raw";
drop schema "raw";
--关键字带单引号-合理报错
drop schema if exists 'raw';
--关键字带反引号-合理报错
drop schema if exists `raw`;
|
<filename>db/seeds.sql<gh_stars>0
INSERT INTO department (department_name)
VALUES
('Management'),
('Front of House'),
('Back of House');
INSERT INTO manager (first_name, last_name)
VALUES
('Gil', 'Bry'),
('Co', 'Knee'),
('Gar', 'Cris');
INSERT INTO job (title, salary, department_id)
VALUES
('General Manager', '20', '1'),
('Assisant Manager', '18' '1'),
('Captain', '15', '2'),
('Server', '12', '2'),
('Chef', '20', '3'),
('Sous Chef', '18', '3'),
('Cook', '15', '3');
INSERT INTO employee (first_name, last_name, role_id, manager_id)
VALUES
('Co', 'Knee', '1', '1'),
('Bur', 'Jut', '1', '1'),
('Ani', 'Ric', '2', '2'),
('Zin', 'Sei', '2', '2'),
('Lolo', 'Frek', '2', '2'),
('Effe', 'Rus', '2', '2'),
('Thand', 'Ong', '2' '2'),
('Vid', 'Arn', '2', '2'),
('Ela', 'Gor', '2', '2'),
('Gar', 'Cris', '3', '1'),
('Teo', 'Tef', '3', '3'),
('Na', 'Imis', '3', '3'),
('Ave', 'Mey', '3', '3'),
('Deg', 'Lung', '3', '3'),
('Dam', 'Egs', '3', '3');
('Arc', 'Uly', '3', '3'),
('Ick', 'Mel', '3', '3'); |
--------------------
---- DISTINCT ------
--------------------
/*
1. Use DISTINCT to test if there are any accounts
associated with more than one region.
*/
SELECT DISTINCT a.name AS account,
r.name AS region
FROM accounts a
JOIN sales_reps s
ON a.sales_rep_id = s.id
JOIN region r
ON s.region_id = r.id
ORDER BY account;
2. Have any sales reps worked on more than one account?
SELECT DISTINCT s.name AS sales_reps,
a.name AS account
FROM accounts a
JOIN sales_reps s
ON a.sales_rep_id = s.id
ORDER BY sales_reps;
--------------------
---- HAVING --------
--------------------
--1. How many of the sales reps have more than 5 accounts that they manage?
SELECT COUNT(*) AS how_man_sales_rep_have_more_than_5_accounts
FROM (
SELECT s.name AS sales_rep,
COUNT(*) AS account_num
FROM accounts a
JOIN sales_reps s
ON a.sales_rep_id = s.id
GROUP BY sales_rep
HAVING COUNT(*) > 5
ORDER BY account_num) AS Table1;
--2. How many accounts have more than 20 orders?
SELECT COUNT(*) AS how_man_accounts_have_more_than_20_orders
FROM (
SELECT a.name AS account,
COUNT(*) AS order_num
FROM accounts a
JOIN orders o
ON o.account_id = a.id
GROUP BY account
HAVING COUNT(*) > 20
ORDER BY order_num) AS Table1;
--3. Which account has the most orders?
SELECT Table1.account AS which_account_has_the_most_order,
Table1.order_num
FROM (
SELECT a.name AS account,
COUNT(*) AS order_num
FROM accounts a
JOIN orders o
ON o.account_id = a.id
GROUP BY account
HAVING COUNT(*) > 20
ORDER BY order_num DESC) AS Table1
LIMIT 1;
--4. Which accounts spent more than 30,000 usd total across all orders?
SELECT a.name AS account,
SUM(o.total_amt_usd) AS usd_total
FROM accounts a
JOIN orders o
ON o.account_id = a.id
GROUP BY account
HAVING SUM(o.total_amt_usd) > 30000
ORDER BY usd_total DESC;
--5. Which accounts spent less than 1,000 usd total across all orders?
SELECT a.name AS account,
SUM(o.total_amt_usd) AS usd_total
FROM accounts a
JOIN orders o
ON o.account_id = a.id
GROUP BY account
HAVING SUM(o.total_amt_usd) < 1000
ORDER BY usd_total DESC;
--6. Which account has spent the most with us?
SELECT Table1.account, Table1.usd_total
FROM (
SELECT a.name AS account,
SUM(o.total_amt_usd) AS usd_total
FROM accounts a
JOIN orders o
ON o.account_id = a.id
GROUP BY account
ORDER BY usd_total DESC) AS Table1
LIMIT 1;
--7. Which account has spent the least with us?
SELECT Table1.account, Table1.usd_total
FROM (
SELECT a.name AS account,
SUM(o.total_amt_usd) AS usd_total
FROM accounts a
JOIN orders o
ON o.account_id = a.id
GROUP BY account
ORDER BY usd_total) AS Table1
LIMIT 1;
/*
8. Which accounts used facebook
as a jchannel to contact customers more than 6 times?
*/
SELECT a.name AS account,
COUNT(*) AS contact_customer
FROM accounts a
JOIN web_events w
ON a.id = w.account_id
WHERE w.channel = 'facebook'
GROUP BY account
HAVING COUNT(*) > 6
ORDER BY contact_customer;
--9. Which account used facebook most as a channel?
SELECT Table1.account, Table1.contact_customer
FROM (
SELECT a.name AS account,
COUNT(*) AS contact_customer
FROM accounts a
JOIN web_events w
ON a.id = w.account_id
WHERE w.channel = 'facebook'
GROUP BY account
HAVING COUNT(*) > 6
ORDER BY contact_customer DESC) AS Table1
LIMIT 1;
--10. Which channel was most frequently used by most accounts?
SELECT a.id, a.name, w.channel, COUNT(*) AS num_of_channel_used
FROM accounts a
JOIN web_events w
ON a.id = w.account_id
GROUP BY a.id, a.name, w.channel
ORDER BY num_of_channel_used DESC
LIMIT 10;
--------------------
---- DATE ----------
--------------------
/*
1. Find the sales in terms of total dollars for all orders in each year,
ordered from greatest to least.
Do you notice any trends in the yearly sales totals?
*/
SELECT DATE_PART('year', o.occurred_at) AS year,
SUM(o.total_amt_usd) AS total_dollars
FROM orders o
GROUP BY year
ORDER BY total_dollars DESC;
/*
2. Which month did Parch & Posey have the greatest sales
in terms of total dollars? Are all months evenly represented by the dataset?
*/
SELECT DATE_PART('month', o.occurred_at) AS month,
SUM(o.total_amt_usd) AS total_dollars
FROM orders o
WHERE o.occurred_at BETWEEN '2014-01-01' AND '2017-01-01'
GROUP BY month
ORDER BY total_dollars DESC;
/*
3. Which year did Parch & Posey have the greatest sales
in terms of total number of orders?
Are all years evenly represented by the dataset?
*/
SELECT DATE_PART('year', o.occurred_at) AS year,
COUNT(*) AS total_order
FROM orders o
GROUP BY 1
ORDER BY 2 DESC;
/*
4. Which month did Parch & Posey have the greatest sales
in terms of total number of orders?
Are all months evenly represented by the dataset?
*/
SELECT DATE_PART('month', o.occurred_at) AS month,
COUNT(*) AS total_order
FROM orders o
WHERE o.occurred_at BETWEEN '2014-01-01' AND '2017-01-01'
GROUP BY month
ORDER BY total_order DESC;
5. In which month of which year did Walmart spend the most
on gloss paper in terms of dollars?
SELECT a.name,
DATE_PART('month', o.occurred_at) AS month,
SUM(o.gloss_amt_usd) AS total_spend_on_gloss_paper
FROM orders o
JOIN accounts a
ON a.id = o.account_id
WHERE a.name = 'Walmart'
GROUP BY month, a.name
ORDER BY total_spend_on_gloss_paper DESC;
--------------------
---- CASE ----------
--------------------
/*
1. Write a query to display for each order, the account ID,
total amount of the order, and the level of the order - ‘Large’ or ’Small’
- depending on if the order is $3000 or more, or smaller than $3000.
*/
SELECT account_id, total,
CASE WHEN total >= 3000 THEN 'Large'
WHEN total < 3000 THEN 'Small' END
AS level_of_order
FROM orders;
/*
2. Write a query to display the number of orders in each of three categories,
based on the total number of items in each order.
The three categories are:
'At Least 2000', 'Between 1000 and 2000' and 'Less than 1000'.
*/
SELECT account_id, total,
CASE WHEN total >= 2000 THEN 'At Least 2000'
WHEN total >= 1000 AND total < 2000 THEN 'Between 1000 and 2000'
WHEN total < 1000 THEN 'Less than 1000' END
AS level_of_order
FROM orders;
/*
3. We would like to understand 3 different levels of customers
based on the amount associated with their purchases.
The top level includes anyone with a Lifetime Value
(total sales of all orders) greater than 200,000 usd.
The second level is between 200,000 and 100,000 usd.
The lowest level is anyone under 100,000 usd.
Provide a table that includes the level associated with each account.
You should provide the account name,
the total sales of all orders for the customer, and the level.
Order with the top spending customers listed first.
*/
SELECT a.name AS customer,
SUM(o.total_amt_usd) AS total_usd,
CASE WHEN SUM(o.total_amt_usd) > 200000 THEN 'top level'
WHEN SUM(o.total_amt_usd) BETWEEN 100000 AND 200000 THEN 'second level'
WHEN SUM(o.total_amt_usd) < 100000 THEN 'lowest level' END
AS level
FROM orders o
JOIN accounts a
ON o.account_id = a.id
GROUP BY customer
ORDER BY SUM(o.total_amt_usd) DESC;
/*
4. We would now like to perform a similar calculation to the first,
but we want to obtain the total amount spent by customers only in 2016 and 2017.
Keep the same levels as in the previous question.
Order with the top spending customers listed first.
*/
SELECT a.name AS customer,
SUM(o.total_amt_usd) AS total_usd,
CASE WHEN SUM(o.total_amt_usd) > 200000 THEN 'top level'
WHEN SUM(o.total_amt_usd) BETWEEN 100000 AND 200000 THEN 'second level'
WHEN SUM(o.total_amt_usd) < 100000 THEN 'lowest level' END
AS level
FROM orders o
JOIN accounts a
ON o.account_id = a.id
WHERE occurred_at BETWEEN '2016-01-01' AND '2017-12-31'
GROUP BY 1
ORDER BY 2 DESC;
/*
5. We would like to identify top performing sales reps,
which are sales reps associated with more than 200 orders.
Create a table with the sales rep name, the total number of orders,
and a column with top or not depending on if they have more than 200 orders.
Place the top sales people first in your final table.
*/
SELECT s.name AS sales_rep,
COUNT(*) AS order_num,
CASE WHEN COUNT(*) > 200 THEN 'top'
WHEN COUNT(*) <= 200 THEN 'not' END
AS level
FROM orders o
JOIN accounts a
ON a.id = o.account_id
JOIN sales_reps s
ON s.id = a.sales_rep_id
GROUP BY 1
ORDER BY 2 DESC;
/*
6. The previous didn't account for the middle,
nor the dollar amount associated with the sales.
Management decides they want to see these characteristics represented as well.
We would like to identify top performing sales reps,
which are sales reps associated with more than 200 orders or
more than 750000 in total sales.
The middle group has any rep with more than 150 orders or 500000 in sales.
Create a table with the sales rep name, the total number of orders,
total sales across all orders, and a column with top, middle,
or low depending on this criteria.
Place the top sales people based on dollar amount of sales first
in your final table. You might see a few upset sales people by this criteria!
*/
SELECT s.name AS sales_rep,
COUNT(*) AS order_num,
SUM(o.total_amt_usd) AS total_usd,
CASE WHEN COUNT(*) > 200 OR SUM(o.total_amt_usd) > 750000 THEN 'top'
WHEN COUNT(*) > 150 OR SUM(o.total_amt_usd) > 500000 THEN 'middle'
ELSE 'low' END
AS level
FROM orders o
JOIN accounts a
ON a.id = o.account_id
JOIN sales_reps s
ON s.id = a.sales_rep_id
GROUP BY 1
ORDER BY 3 DESC;
|
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 03-02-2016 a las 12:53:32
-- Versión del servidor: 5.5.46-0ubuntu0.14.04.2
-- Versión de PHP: 5.5.9-1ubuntu4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Base de datos: `app_ventas`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `juegos`
--
CREATE TABLE IF NOT EXISTS `juegos` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nombre` varchar(150) NOT NULL,
`descripcion` varchar(300) NOT NULL,
`año_creacion` year(4) NOT NULL,
`creador` varchar(150) NOT NULL,
`add_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`estado` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
--
-- Volcado de datos para la tabla `juegos`
--
INSERT INTO `juegos` (`id`, `nombre`, `descripcion`, `año_creacion`, `creador`, `add_date`, `estado`) VALUES
(1, 'Singularity', 'Es un nombre que ha sonado con fuerza estos últimos días. El trabajo de Raven Software, lleno de secretismo durante meses y meses, por fin ha visto la luz al final del túnel. El resultado es el de un juego de acción en primera persona que intenta diferenciarse de los reyes del género. Y también de t', 2010, 'Activision', '2016-02-03 16:09:58', 1),
(2, 'Fallout 1 ', 'Tiene lugar en el año 2161 en el sur de California en unos Estados Unidos que se han visto envueltos en una guerra nuclear mundial, lo que ha degenerado en un mundo post-apocalíptico al mejor estilo Mad Max. El protagonista es un habitante de uno de los bunkers anti-nucleares (conocidos como Vaults)', 1997, 'Interplay Productions', '2016-02-03 16:11:04', 1),
(3, 'The Last Of Us', 'Videojuego de acción con tintes de survival horror que nos presenta un escenario en el que la población ha sido diezmada por una terrible plaga. Los supervivientes se están matando entre sí por la comida y las armas. Joel, y Ellie un valiente adolescente, deberán colaborar si quieren sobrevivir en u', 2013, 'Naughty Dog', '2016-02-03 16:11:04', 1);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `platos`
--
CREATE TABLE IF NOT EXISTS `platos` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nombre` varchar(150) NOT NULL,
`descripcion` varchar(500) NOT NULL,
`precio` decimal(10,0) NOT NULL,
`stock` int(11) NOT NULL,
`fecha` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`estado` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;
--
-- Volcado de datos para la tabla `platos`
--
INSERT INTO `platos` (`id`, `nombre`, `descripcion`, `precio`, `stock`, `fecha`, `estado`) VALUES
(1, 'lomo saltado', '', 15, 5, '2016-02-03 17:28:17', 1),
(2, 'causa rellena', '', 5, 15, '2016-02-03 17:28:17', 1),
(3, 'ceviche', '', 20, 10, '2016-02-03 17:33:25', 1),
(4, 'tacu tacu', '', 10, 4, '2016-02-03 17:33:25', 1),
(5, 'estofado de pollo', '', 7, 15, '2016-02-03 17:33:25', 1),
(6, 'picarones', '', 5, 20, '2016-02-03 17:33:25', 1),
(7, 'anticuchos', '', 5, 25, '2016-02-03 17:33:25', 1),
(8, 'cuy chactado', '', 30, 5, '2016-02-03 17:36:02', 1),
(9, 'mazomorra morada', '', 3, 20, '2016-02-03 17:36:02', 1),
(10, 'arroz con leche', '', 3, 20, '2016-02-03 17:36:02', 1);
/*!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 */;
|
SELECT
`t`.`name` AS `team_name`,
`a`.`name` AS `address_name`,
CHAR_LENGTH(`a`.`name`) AS `count_of_characters`
FROM
`teams` AS `t`
LEFT JOIN
`offices` AS `off` ON `t`.`office_id` = `off`.`id`
LEFT JOIN
`addresses` AS `a` ON `a`.`id` = `off`.`address_id`
WHERE
`off`.`website` IS NOT NULL
ORDER BY `team_name` , `address_name`; |
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Aug 05, 2018 at 05:56 AM
-- Server version: 5.7.21
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `googlemap`
--
-- --------------------------------------------------------
--
-- Table structure for table `gmaps_geocache`
--
CREATE TABLE `gmaps_geocache` (
`id` int(10) UNSIGNED NOT NULL,
`address` text COLLATE utf8mb4_unicode_ci NOT NULL,
`latitude` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`longitude` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `gmaps_geocache`
--
INSERT INTO `gmaps_geocache` (`id`, `address`, `latitude`, `longitude`, `created_at`, `updated_at`) VALUES
(1, 'sydney airport,sydney', '-33.9399228', '151.1752764', NULL, NULL),
(2, 'kogarah golf club,sydney', '-33.935002', '151.1602508', NULL, NULL),
(3, 'the lakes golf club,sydney', '-33.9335896', '151.2123797', NULL, NULL),
(4, 'flyover simpang polda,palembang city', '-2.9607063', '104.7383389', NULL, NULL),
(5, 'vr gallery,palembang city', '-2.9925686', '104.7268432', NULL, NULL),
(6, 'toko baju zaviera khanza,palembang city', '-2.992796', '104.7268574', NULL, NULL),
(7, 'griya agung,palembang city', '-2.9723305', '104.7273264', NULL, NULL),
(8, 'pempek beringin amaris,palembang city', '-2.9629356', '104.7364379', NULL, NULL),
(9, 'bakso selera 02 \"kak salim\",palembang city', '-2.9705417', '104.7314179', NULL, NULL),
(10, 'bank bni demang lebar daun,palembang city', '-2.9753499', '104.7263377', NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2018_08_02_041816_create_gmaps_geocache_table', 1);
-- --------------------------------------------------------
--
-- Table structure for table `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `gmaps_geocache`
--
ALTER TABLE `gmaps_geocache`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `gmaps_geocache`
--
ALTER TABLE `gmaps_geocache`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
<reponame>nf-framework/nf-back-dbfw
{
"schema": "nfc",
"tablename": "options",
"comment": "Системные опции",
"cols": [
{
"name": "caption",
"datatype": "varchar",
"datatype_length": "300",
"datatype_full": "character varying(300)",
"required": true,
"default_value": null,
"comment": "Наименование",
"fk_tablename": null,
"column_id": 2
},
{
"name": "code",
"datatype": "varchar",
"datatype_length": "60",
"datatype_full": "character varying(60)",
"required": true,
"default_value": null,
"comment": "Код",
"fk_tablename": null,
"column_id": 1
},
{
"name": "datatype",
"datatype": "int8",
"datatype_length": null,
"datatype_full": "bigint",
"required": true,
"default_value": null,
"comment": "Тип данных",
"fk_tablename": "nfc.datatypes",
"column_id": 4
},
{
"name": "mdl",
"datatype": "varchar",
"datatype_length": "30",
"datatype_full": "character varying(30)",
"required": true,
"default_value": null,
"comment": "Модуль",
"fk_tablename": "nfc.modulelist",
"column_id": 7
},
{
"name": "multi_val",
"datatype": "bool",
"datatype_length": null,
"datatype_full": "boolean",
"required": true,
"default_value": null,
"comment": "Возможность указания множества значений. В таком случае сохраняться будет в виде массива",
"fk_tablename": null,
"column_id": 8
},
{
"name": "note",
"datatype": "text",
"datatype_length": null,
"datatype_full": "text",
"required": false,
"default_value": null,
"comment": "Примечание",
"fk_tablename": null,
"column_id": 3
},
{
"name": "val",
"datatype": "text",
"datatype_length": null,
"datatype_full": "text",
"required": false,
"default_value": null,
"comment": "Значение",
"fk_tablename": null,
"column_id": 5
},
{
"name": "val_limits",
"datatype": "jsonb",
"datatype_length": null,
"datatype_full": "jsonb",
"required": false,
"default_value": null,
"comment": "Ограничения для значения",
"fk_tablename": null,
"column_id": 6
}
],
"cons": [
{
"name": "ch4options8caption",
"schema": "nfc",
"type": "c",
"update_rule": null,
"delete_rule": null,
"condition": "((caption)::text = btrim((caption)::text))",
"definition": "CHECK (caption::text = btrim(caption::text))",
"r_schema": null,
"r_tablename": null,
"r_columnname": null,
"columns": "caption",
"comment": null,
"deferrable": null
},
{
"name": "ch4options8code",
"schema": "nfc",
"type": "c",
"update_rule": null,
"delete_rule": null,
"condition": "(((code)::text = btrim((code)::text)) AND ((code)::text ~ '^[0-9a-zA-Z._]+$'::text))",
"definition": "CHECK (code::text = btrim(code::text) AND code::text ~ '^[0-9a-zA-Z._]+$'::text)",
"r_schema": null,
"r_tablename": null,
"r_columnname": null,
"columns": "code",
"comment": null,
"deferrable": null
},
{
"name": "fk4options8datatype",
"schema": "nfc",
"type": "f",
"update_rule": "a",
"delete_rule": "a",
"condition": null,
"definition": "FOREIGN KEY (datatype) REFERENCES nfc.datatypes(id)",
"r_schema": "nfc",
"r_tablename": "datatypes",
"r_columnname": "id",
"columns": "datatype",
"comment": null,
"deferrable": null
},
{
"name": "fk4options8mdl",
"schema": "nfc",
"type": "f",
"update_rule": "a",
"delete_rule": "a",
"condition": null,
"definition": "FOREIGN KEY (mdl) REFERENCES nfc.modulelist(code)",
"r_schema": "nfc",
"r_tablename": "modulelist",
"r_columnname": "code",
"columns": "mdl",
"comment": null,
"deferrable": null
},
{
"name": "pk4options",
"schema": "nfc",
"type": "p",
"update_rule": null,
"delete_rule": null,
"condition": null,
"definition": "PRIMARY KEY (code)",
"r_schema": null,
"r_tablename": null,
"r_columnname": null,
"columns": "code",
"comment": null,
"deferrable": null
},
{
"name": "uk4options8code",
"schema": "nfc",
"type": "u",
"update_rule": null,
"delete_rule": null,
"condition": null,
"definition": "UNIQUE (code)",
"r_schema": null,
"r_tablename": null,
"r_columnname": null,
"columns": "code",
"comment": null,
"deferrable": null
}
],
"indx": [
{
"name": "i4options8datatype",
"schema": "nfc",
"columns": [
{
"name": "datatype",
"nulls": "last",
"order": "asc",
"collate": null
}
],
"is_unique": false,
"method": "btree",
"tablespace": null,
"definition": "CREATE INDEX i4options8datatype ON nfc.options USING btree (datatype)"
},
{
"name": "i4options8mdl",
"schema": "nfc",
"columns": [
{
"name": "mdl",
"nulls": "last",
"order": "asc",
"collate": "pg_catalog.\"default\""
}
],
"is_unique": false,
"method": "btree",
"tablespace": null,
"definition": "CREATE INDEX i4options8mdl ON nfc.options USING btree (mdl)"
}
]
} |
/*
IF EXISTS (SELECT name FROM sysobjects WHERE (name = 'WorkQueueGetWorkUserView_InsertUpdate' AND type = 'P'))
DROP PROCEDURE dbo.WorkQueueGetWorkUserView_InsertUpdate
GO
*/
CREATE PROCEDURE dbo.WorkQueueGetWorkUserView_InsertUpdate
/* STORED PROCEDURE - INPUTS (BEGIN) */
@workQueueId BIGINT,
@securityAuthorityId BIGINT,
@userAccountId VARCHAR (060),
@userAccountName VARCHAR (060),
@userDisplayName VARCHAR (060),
@workQueueViewId BIGINT,
@modifiedAuthorityName VARCHAR (060),
@modifiedAccountId VARCHAR (060),
@modifiedAccountName VARCHAR (060)
/* STORED PROCEDURE - INPUTS ( END ) */
/* STORED PROCEDURE - OUTPUTS (BEGIN) */
-- EXAMPLE: @MYOUTPUT VARCHAR (20) OUTPUT -- A VARIABLE DECLARATION FOR RETURN VALUE
/* STORED PROCEDURE - OUTPUTS ( END ) */
AS
BEGIN
/* STORED PROCEDURE (BEGIN) */
/* LOCAL VARIABLES (BEGIN) */
/* LOCAL VARIABLES ( END ) */
IF EXISTS (SELECT * FROM dbo.WorkQueueGetWorkUserView WHERE WorkQueueId = @workQueueId AND SecurityAuthorityId = @securityAuthorityId AND UserAccountId = @userAccountId)
BEGIN
-- EXISTING RECORD, UPDATE
UPDATE dbo.WorkQueueGetWorkUserView
SET
UserAccountName = @userAccountName,
UserDisplayName = @userDisplayName,
WorkQueueViewId = @workQueueViewId,
ModifiedAuthorityName = @modifiedAuthorityName,
ModifiedAccountId = @modifiedAccountId,
ModifiedAccountName = @modifiedAccountName,
ModifiedDate = GETDATE ()
WHERE
WorkQueueId = @workQueueId AND SecurityAuthorityId = @securityAuthorityId AND UserAccountId = @userAccountId
END
ELSE -- NO EXISTING RECORD, INSERT NEW
BEGIN
INSERT INTO WorkQueueGetWorkUserView (
WorkQueueId, SecurityAuthorityId, UserAccountId, UserAccountName, UserDisplayName, WorkQueueViewId,
CreateAuthorityName, CreateAccountId, CreateAccountName, CreateDate,
ModifiedAuthorityName, ModifiedAccountId, ModifiedAccountName, ModifiedDate)
VALUES (
@workQueueId, @securityAuthorityId, @userAccountId, @userAccountName, @userDisplayName, @workQueueViewId,
@modifiedAuthorityName, @modifiedAccountId, @modifiedAccountName, GETDATE (),
@modifiedAuthorityName, @modifiedAccountId, @modifiedAccountName, GETDATE ())
END
/* STORED PROCEDURE ( END ) */
END
GO
/*
GRANT EXECUTE ON dbo.WorkQueueGetWorkUserView_InsertUpdate TO PUBLIC
GO
*/ |
<reponame>jantonv/XCoLab
-- Content articles
update xcolab_ContentArticleVersion set content = replace(content,'http://climatecolab.org','https://www.climatecolab.org');
update xcolab_ContentArticleVersion set content = replace(content,'http://www.climatecolab.org','https://www.climatecolab.org');
update xcolab_ContentArticleVersion set content = replace(content,'https://climatecolab.org','https://www.climatecolab.org');
update xcolab_ContentArticleVersion set content = replace(content,'http://i.imgur.com','https://i.imgur.com');
update xcolab_ContentArticleVersion set content = replace(content,'http://imgur.com','https://i.imgur.com');
update xcolab_ContentArticleVersion set content = replace(content,'http://youtube.com','https://www.youtube.com');
update xcolab_ContentArticleVersion set content = replace(content,'http://energy.mit.edu','https://energy.mit.edu');
update xcolab_ContentArticleVersion set content = replace(content,'http://lae.mit.edu','https://lae.mit.edu');
update xcolab_ContentArticleVersion set content = replace(content,'http://static3.businessinsider.com','https://static3.businessinsider.com');
-- Comments
update comment_Comment set content = replace(content,'http://climatecolab.org','https://www.climatecolab.org');
update comment_Comment set content = replace(content,'http://www.climatecolab.org','https://www.climatecolab.org');
update comment_Comment set content = replace(content,'https://climatecolab.org','https://www.climatecolab.org');
update comment_Comment set content = replace(content,'http://i.imgur.com','https://i.imgur.com');
update comment_Comment set content = replace(content,'http://imgur.com','https://i.imgur.com');
update comment_Comment set content = replace(content,'http://youtube.com','https://www.youtube.com');
update comment_Comment set content = replace(content,'http://energy.mit.edu','https://energy.mit.edu');
update comment_Comment set content = replace(content,'http://lae.mit.edu','https://lae.mit.edu');
update comment_Comment set content = replace(content,'http://static3.businessinsider.com','https://static3.businessinsider.com');
-- Proposal content
update xcolab_ProposalAttribute set stringValue = replace(stringValue,'http://climatecolab.org','https://www.climatecolab.org') where length(stringValue) > 20;
update xcolab_ProposalAttribute set stringValue = replace(stringValue,'http://www.climatecolab.org','https://www.climatecolab.org') where length(stringValue) > 20;
update xcolab_ProposalAttribute set stringValue = replace(stringValue,'https://climatecolab.org','https://www.climatecolab.org') where length(stringValue) > 20;
update xcolab_ProposalAttribute set stringValue = replace(stringValue,'http://i.imgur.com','https://i.imgur.com') where length(stringValue) > 20;
update xcolab_ProposalAttribute set stringValue = replace(stringValue,'http://imgur.com','https://i.imgur.com') where length(stringValue) > 20;
update xcolab_ProposalAttribute set stringValue = replace(stringValue,'http://youtube.com','https://www.youtube.com') where length(stringValue) > 20;
update xcolab_ProposalAttribute set stringValue = replace(stringValue,'http://energy.mit.edu','https://energy.mit.edu') where length(stringValue) > 20;
update xcolab_ProposalAttribute set stringValue = replace(stringValue,'http://lae.mit.edu','https://lae.mit.edu') where length(stringValue) > 20;
update xcolab_ProposalAttribute set stringValue = replace(stringValue,'http://static3.businessinsider.com','https://static3.businessinsider.com') where length(stringValue) > 20;
|
CREATE TABLE [dbo].[meridians] (
[meridian_id] TINYINT NOT NULL,
[meridian_name] VARCHAR (50) NOT NULL,
[meridian_order] TINYINT NOT NULL
);
|
--Create new license role action mapping
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,
CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) VALUES (NEXTVAL('SEQ_EG_ACTION'),'Create New License Application',
'/license/create',null,(select id from EG_MODULE WHERE name = 'Trade License Transactions'),1,
'Create New License Application','t','tl',0,1,now(),1,now(),(select id from eg_module where name = 'Trade License'));
INSERT INTO EG_ROLEACTION (actionid,roleid) SELECT DISTINCT (SELECT id FROM eg_action WHERE name='Create New License Application'),
roleid FROM EG_ROLEACTION WHERE actionid in(SELECT id FROM eg_action WHERE name='Create New License');
--License Approval role action mapping
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,
CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) VALUES (NEXTVAL('SEQ_EG_ACTION'),'Show License Application for Approver',
'/license/update/',null,(select id from EG_MODULE WHERE name = 'Trade License'),1,
'Show License Application for Approver','f','tl',0,1,now(),1,now(),(select id from eg_module where name = 'Trade License'));
INSERT INTO EG_ROLEACTION (actionid,roleid) SELECT DISTINCT (SELECT id FROM eg_action WHERE name='Show License Application for Approver'),
roleid FROM EG_ROLEACTION WHERE actionid in(SELECT id FROM eg_action WHERE name='View Trade License for Approval');
--forward License role action mapping
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,
CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) VALUES (NEXTVAL('SEQ_EG_ACTION'),'Forward New License Application',
'/license/update/forward/',null,(select id from EG_MODULE WHERE name = 'Trade License'),1,
'Forward New License Application','f','tl',0,1,now(),1,now(),(select id from eg_module where name = 'Trade License'));
INSERT INTO EG_ROLEACTION (actionid,roleid) SELECT DISTINCT (SELECT id FROM eg_action WHERE name='Forward New License Application'),
roleid FROM EG_ROLEACTION WHERE actionid in(SELECT id FROM eg_action WHERE name='NewTradeLicense-approve');
--license approve role action mapping
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,
CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) VALUES (NEXTVAL('SEQ_EG_ACTION'),'Approve New License Application',
'/license/update/approve/',null,(select id from EG_MODULE WHERE name = 'Trade License'),1,
'Approve New License Application','f','tl',0,1,now(),1,now(),(select id from eg_module where name = 'Trade License'));
INSERT INTO EG_ROLEACTION (actionid,roleid) SELECT DISTINCT (SELECT id FROM eg_action WHERE name='Approve New License Application'),
roleid FROM EG_ROLEACTION WHERE actionid in(SELECT id FROM eg_action WHERE name='NewTradeLicense-approve');
--license reject role action mapping
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,
CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) VALUES (NEXTVAL('SEQ_EG_ACTION'),'Reject New License Application',
'/license/update/reject/',null,(select id from EG_MODULE WHERE name = 'Trade License'),1,
'Reject New License Application','f','tl',0,1,now(),1,now(),(select id from eg_module where name = 'Trade License'));
INSERT INTO EG_ROLEACTION (actionid,roleid) SELECT DISTINCT (SELECT id FROM eg_action WHERE name='Reject New License Application'),
roleid FROM EG_ROLEACTION WHERE actionid in(SELECT id FROM eg_action WHERE name='NewTradeLicense-approve');
--license cancel role action mapping
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,
CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) VALUES (NEXTVAL('SEQ_EG_ACTION'),'Cancel New License Application',
'/license/update/cancel/',null,(select id from EG_MODULE WHERE name = 'Trade License'),1,
'Cancel New License Application','f','tl',0,1,now(),1,now(),(select id from eg_module where name = 'Trade License'));
INSERT INTO EG_ROLEACTION (actionid,roleid) SELECT DISTINCT (SELECT id FROM eg_action WHERE name='Cancel New License Application'),
roleid FROM EG_ROLEACTION WHERE actionid in(SELECT id FROM eg_action WHERE name='NewTradeLicense-approve');
--license certificate preview before digisign
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,
CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) VALUES (NEXTVAL('SEQ_EG_ACTION'),'License Application Certificate Preview',
'/license/update/preview/',null,(select id from EG_MODULE WHERE name = 'Trade License'),1,
'License Application Certificate Preview','f','tl',0,1,now(),1,now(),(select id from eg_module where name = 'Trade License'));
INSERT INTO EG_ROLEACTION (actionid,roleid) SELECT DISTINCT (SELECT id FROM eg_action WHERE name='License Application Certificate Preview'),
roleid FROM EG_ROLEACTION WHERE actionid in(SELECT id FROM eg_action WHERE name='NewTradeLicense-approve');
--digital sign license application
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,
CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) VALUES (NEXTVAL('SEQ_EG_ACTION'),'Digitaly Sign New License Application',
'/license/update/sign',null,(select id from EG_MODULE WHERE name = 'Trade License'),1,
'Digitaly Sign New License Application','f','tl',0,1,now(),1,now(),(select id from eg_module where name = 'Trade License'));
INSERT INTO EG_ROLEACTION (actionid,roleid) SELECT DISTINCT (SELECT id FROM eg_action WHERE name='Digitaly Sign New License Application'),
roleid FROM EG_ROLEACTION WHERE actionid in(SELECT id FROM eg_action WHERE name='NewTradeLicense-approve');
--license application acknowledgment
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,
CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) VALUES (NEXTVAL('SEQ_EG_ACTION'),'License Application Success Acknowledgment',
'/license/success/acknowledgement/',null,(select id from EG_MODULE WHERE name = 'Trade License'),1,
'License Application Success Acknowledgment','f','tl',0,1,now(),1,now(),(select id from eg_module where name = 'Trade License'));
INSERT INTO EG_ROLEACTION (actionid,roleid) SELECT DISTINCT (SELECT id FROM eg_action WHERE name='License Application Success Acknowledgment'),
roleid FROM EG_ROLEACTION WHERE actionid in(SELECT id FROM eg_action WHERE name='Create New License');
--license application provisional certificate from application
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,
CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) VALUES (NEXTVAL('SEQ_EG_ACTION'),'License Application Provisional Certificate',
'/license/update/generateCertificate/',null,(select id from EG_MODULE WHERE name = 'Trade License'),1,
'License Application Provisional Certificate','f','tl',0,1,now(),1,now(),(select id from eg_module where name = 'Trade License'));
INSERT INTO EG_ROLEACTION (actionid,roleid) SELECT DISTINCT
(SELECT id FROM eg_action WHERE name='License Application Provisional Certificate'),
roleid FROM EG_ROLEACTION WHERE actionid in(SELECT id FROM eg_action WHERE name='NewTradeLicense-approve');
-- create new license application portal service
INSERT INTO EGP_PORTALSERVICE (id,module,code,sla,version,url,isactive,name,userservice,businessuserservice,helpdoclink,
createdby,createddate,lastmodifieddate,lastmodifiedby) values(nextval('seq_egp_portalservice'),
(select id from eg_module where name='Trade License'),'Apply for New License',null,0,'/tl/license/create','true',
'Apply for New License','true','true',null,(select id from eg_user where username='system'),now(),now(),
(select id from eg_user where username='system'));
--license Fee collection
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,
CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) VALUES (NEXTVAL('SEQ_EG_ACTION'),'License Fee Verification',
'/license/fee/verification/',null,(select id from EG_MODULE WHERE name = 'Trade License'),1,
'License Fee Verification','f','tl',0,1,now(),1,now(),(select id from eg_module where name = 'Trade License'));
INSERT INTO EG_ROLEACTION (actionid,roleid) SELECT (SELECT id FROM eg_action WHERE name='License Fee Verification'),
id from eg_role where name in('Collection Operator','SYSTEM');
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,
CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) VALUES (NEXTVAL('SEQ_EG_ACTION'),'License Fee Collection',
'/license/fee/collection/',null,(select id from EG_MODULE WHERE name = 'Trade License'),1,
'License Fee Collection','f','tl',0,1,now(),1,now(),(select id from eg_module where name = 'Trade License'));
INSERT INTO EG_ROLEACTION (actionid,roleid) SELECT (SELECT id FROM eg_action WHERE name='License Fee Collection'),
id from eg_role where name in('Collection Operator','SYSTEM');
INSERT INTO EG_FEATURE_ACTION (action,feature) VALUES ((select id FROM eg_action WHERE name ='License Fee Collection'),
(select feature FROM EG_FEATURE_ACTION WHERE action in(select id from eg_action where name='Trade License Bill Collect')));
INSERT INTO EG_FEATURE_ACTION (action,feature) VALUES ((select id FROM eg_action WHERE name ='License Fee Verification'),
(select feature FROM EG_FEATURE_ACTION WHERE action in(select id from eg_action where name='Trade License Bill Collect')));
--license final certificate from search
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,
CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) VALUES (NEXTVAL('SEQ_EG_ACTION'),'License Final Certificate',
'/license/certificate/original/',null,(select id from EG_MODULE WHERE name = 'Trade License'),1,
'License Final Certificate','f','tl',0,1,now(),1,now(),(select id from eg_module where name = 'Trade License'));
INSERT INTO EG_ROLEACTION (actionid,roleid) SELECT DISTINCT (SELECT id FROM eg_action WHERE name='License Final Certificate'),
roleid FROM EG_ROLEACTION WHERE actionid in(SELECT id FROM eg_action WHERE name='View Trade License Generate Certificate');
INSERT INTO EG_FEATURE_ACTION (action,feature) VALUES ((select id FROM eg_action WHERE name ='License Final Certificate'),
(select feature FROM EG_FEATURE_ACTION WHERE action in(select id from eg_action where name='View Trade License Generate Certificate')));
--license provisional certificate from search
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,
CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) VALUES (NEXTVAL('SEQ_EG_ACTION'),'License Provisional Certificate',
'/license/certificate/provisional/',null,(select id from EG_MODULE WHERE name = 'Trade License'),1,
'License Provisional Certificate','f','tl',0,1,now(),1,now(),(select id from eg_module where name = 'Trade License'));
INSERT INTO EG_ROLEACTION (actionid,roleid) SELECT DISTINCT (SELECT id FROM eg_action WHERE name='License Provisional Certificate'),
roleid FROM EG_ROLEACTION WHERE actionid in(SELECT id FROM eg_action WHERE name='Generate Provisional Certificate');
INSERT INTO EG_FEATURE_ACTION (action,feature) VALUES ((select id FROM eg_action WHERE name ='License Provisional Certificate'),
(select feature FROM EG_FEATURE_ACTION WHERE action in(select id from eg_action where name='Generate Provisional Certificate')));
--print acknowledgement
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,
CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) VALUES (NEXTVAL('SEQ_EG_ACTION'),'Print License Acknowledgement',
'/license/print/ack',null,(select id from EG_MODULE WHERE name = 'Trade License'),1,
'Print License Acknowledgement','f','tl',0,1,now(),1,now(),(select id from eg_module where name = 'Trade License'));
INSERT INTO EG_ROLEACTION (actionid,roleid) VALUES ((SELECT id FROM eg_action WHERE name='Print License Acknowledgement'),
(select id FROM eg_role where name='CSC Operator'));
--feature for new license
INSERT INTO EG_FEATURE (id,name,description,module,version,enabled) VALUES
(nextval('SEQ_EG_FEATURE'),'Create License Application','Create License Application',
(select id from eg_module where name='Trade License'),0,true);
INSERT INTO EG_FEATURE_ACTION (feature,action) select(select id FROM EG_FEATURE WHERE name ='Create License Application'),
id FROM eg_action WHERE name in('Create New License Application','License Application Success Acknowledgment','Load Block By Locality',
'getWardsByLocality','LicenseSubcategoryByCategory','LicenseSubcategoryDetailByFeeType');
--feature for license approval
INSERT INTO EG_FEATURE (id,name,description,module,version,enabled) VALUES
(nextval('SEQ_EG_FEATURE'),'New License Application Approval','New License Application Approval',
(select id from eg_module where name='Trade License'),0,true);
INSERT INTO EG_FEATURE_ACTION (feature,action) select(select id FROM EG_FEATURE WHERE name ='New License Application Approval'),
id FROM eg_action WHERE name in('Show License Application for Approver','Forward New License Application',
'Approve New License Application','Reject New License Application','Cancel New License Application','License Application Certificate Preview',
'License Application Provisional Certificate','Digitaly Sign New License Application','View License Success',
'Load Block By Locality','getWardsByLocality','LicenseSubcategoryByCategory','LicenseSubcategoryDetailByFeeType',
'View Support Documents','License DCB View','Reassignment','AjaxDesignationsByDepartmentWithDesignation',
'AjaxApproverByDesignationAndDepartment');
update eg_wf_matrix set currentstate='Start' where additionalrule ='CSCOPERATORNEWLICENSE' and department ='PUBLIC HEALTH AND SANITATION' ;
update eg_wf_matrix set currentstate='Start' where additionalrule ='CSCOPERATORRENEWLICENSE' and department ='PUBLIC HEALTH AND SANITATION' ;
update egp_portalservice set isactive =false where code ='Create New License' and module in(select id from eg_module where name='Trade License');
update eg_action set enabled =false where name='Create New License' and contextroot='tl';
update eg_feature set enabled =false where name in('Create New License','License Approval') and
module=(select id from eg_module where name='Trade License'); |
<filename>script/package/pkg_util.body.sql
CREATE OR REPLACE PACKAGE BODY LOG_AUDIT.PKG_UTIL IS
FUNCTION F_SPLIT(P_TEXT IN VARCHAR2) RETURN T_SPLITED_STR
PIPELINED IS
LIST R_SPLITED_STR;
BEGIN
FOR i in (
WITH CTE AS (SELECT P_TEXT temp FROM DUAL)
SELECT ROWNUM AS ID, TRIM(REGEXP_SUBSTR(temp, '[^,^\.]+', 1, level)) AS TEXT
FROM CTE
CONNECT BY level <= REGEXP_COUNT(temp, '[^,^\.]+')
) loop
LIST.ID := i.ID;
LIST.TEXT := i.TEXT;
pipe row(LIST);
end loop;
return;
exception
when no_data_needed then
return;
END F_SPLIT;
FUNCTION F_SPLIT_DISTINCT(P_TEXT IN VARCHAR2) RETURN T_SPLITED_STR
PIPELINED IS
LIST R_SPLITED_STR;
BEGIN
FOR i in (
WITH CTE AS(
SELECT ID,TEXT FROM TABLE(LOG_AUDIT.PKG_UTIL.F_SPLIT(P_TEXT))
)
SELECT ROWNUM AS ID,TEXT
FROM CTE C
WHERE ID=(SELECT MIN(ID) FROM CTE CT WHERE C.TEXT=CT.TEXT)
) loop
LIST.ID := i.ID;
LIST.TEXT := i.TEXT;
pipe row(LIST);
end loop;
return;
exception
when no_data_needed then
return;
END F_SPLIT_DISTINCT;
FUNCTION F_XML_BEAUTIFY(P_XML IN XMLTYPE) RETURN clob IS
text clob;
BEGIN
SELECT XMLSERIALIZE(DOCUMENT P_XML AS CLOB INDENT SIZE = 2)
into text
FROM DUAL;
return text;
exception
when others then
return null;
END;
END PKG_UTIL;
|
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 01, 2019 at 12:25 PM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `canteen_management`
--
-- --------------------------------------------------------
--
-- Table structure for table `ingredient_details`
--
CREATE TABLE `ingredient_details` (
`ingredients_id` int(11) NOT NULL,
`sales_product_id` int(11) NOT NULL,
`product_code` varchar(25) NOT NULL,
`quantity` double NOT NULL COMMENT 'Required quantity',
`uom` varchar(11) NOT NULL COMMENT 'Unit of Measurement',
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL,
`modified_on` datetime NOT NULL DEFAULT '0000-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
`modified_by` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `ingredient_details`
--
INSERT INTO `ingredient_details` (`ingredients_id`, `sales_product_id`, `product_code`, `quantity`, `uom`, `status`, `created_on`, `created_by`, `modified_on`, `modified_by`) VALUES
(33, 3, 'VEG0040', 0.1, 'KG', 1, '2019-10-24 11:48:01', 1, '0000-01-01 00:00:00', NULL),
(32, 2, 'VEG0043', 0.05, 'KG', 1, '2019-10-24 11:47:52', 1, '0000-01-01 00:00:00', NULL),
(31, 2, 'RICE01', 0.2, 'KG', 1, '2019-10-24 11:47:52', 1, '0000-01-01 00:00:00', NULL),
(30, 2, 'VEG0029', 0.1, 'KG', 1, '2019-10-24 11:47:52', 1, '0000-01-01 00:00:00', NULL),
(29, 2, 'HERB0007', 0.02, 'KG', 1, '2019-10-24 11:47:52', 1, '0000-01-01 00:00:00', NULL),
(54, 5, 'VEG0029', 0.038, 'KG', 1, '2019-10-24 12:02:39', 1, '0000-01-01 00:00:00', NULL),
(26, 1, 'FLDR0001', 1, 'L', 1, '2019-10-24 11:47:18', 1, '0000-01-01 00:00:00', NULL),
(28, 2, 'ODEN0004', 0.1, 'L', 1, '2019-10-24 11:47:52', 1, '0000-01-01 00:00:00', NULL),
(35, 4, 'VEG0043', 0.05, 'KG', 1, '2019-10-24 11:48:04', 1, '0000-01-01 00:00:00', NULL),
(34, 4, 'RICE01', 0.2, 'KG', 1, '2019-10-24 11:48:04', 1, '0000-01-01 00:00:00', NULL),
(53, 5, 'VEG0026', 0.3, 'KG', 1, '2019-10-24 12:02:39', 1, '0000-01-01 00:00:00', NULL),
(52, 5, 'HERB0007', 0.03, 'KG', 1, '2019-10-24 12:02:39', 1, '0000-01-01 00:00:00', NULL),
(51, 5, 'HERB0005', 0.05, 'KG', 1, '2019-10-24 12:02:39', 1, '0000-01-01 00:00:00', NULL),
(50, 5, 'ODEN0007', 0.05, 'L', 1, '2019-10-24 12:02:39', 1, '0000-01-01 00:00:00', NULL),
(49, 5, 'HERB0004', 0.05, 'KG', 1, '2019-10-24 12:02:39', 1, '0000-01-01 00:00:00', NULL),
(48, 5, 'ODEN0004', 0.45, 'L', 1, '2019-10-24 12:02:39', 1, '0000-01-01 00:00:00', NULL),
(47, 5, 'HERB0001', 0.03, 'KG', 1, '2019-10-24 12:02:39', 1, '0000-01-01 00:00:00', NULL),
(46, 5, 'RCGR0001', 0.35, 'KG', 1, '2019-10-24 12:02:39', 1, '0000-01-01 00:00:00', NULL),
(55, 5, 'VEG0043', 0.1, 'KG', 1, '2019-10-24 12:02:39', 1, '0000-01-01 00:00:00', NULL),
(75, 6, 'VEG0043', 0.05, 'KG', 1, '2019-10-29 07:51:34', 8, '0000-01-01 00:00:00', NULL),
(74, 6, 'NSDF0009', 0.05, 'KG', 1, '2019-10-29 07:51:34', 8, '0000-01-01 00:00:00', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `invoice_details`
--
CREATE TABLE `invoice_details` (
`invoice_id` int(11) NOT NULL,
`store_code` varchar(25) NOT NULL,
`supplier_id` int(11) NOT NULL,
`invoice_number` varchar(50) NOT NULL,
`invoice_date` date NOT NULL,
`total_amount` float NOT NULL,
`paid_amount` float NOT NULL DEFAULT '0',
`currency` varchar(10) NOT NULL DEFAULT 'INR',
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `invoice_details`
--
INSERT INTO `invoice_details` (`invoice_id`, `store_code`, `supplier_id`, `invoice_number`, `invoice_date`, `total_amount`, `paid_amount`, `currency`, `status`, `created_on`, `created_by`) VALUES
(1, 'STR001', 4, '116322', '2019-09-30', 3800, 3300, 'INR', 1, '2019-10-04 06:58:23', 4),
(2, 'STR001', 4, '10190190', '2019-10-01', 750, 500, 'INR', 1, '2019-10-04 06:58:23', 3),
(3, 'STR001', 4, '30020020', '2019-10-04', 110, 110, 'INR', 1, '2019-10-04 07:28:51', 3),
(4, 'STR001', 2, '100100123', '2019-10-04', 1000, 503, 'INR', 1, '2019-10-04 07:35:10', 4),
(5, 'STR001', 1, '10001000', '2019-10-04', 1000, 0, 'INR', 1, '2019-10-04 07:37:13', 3),
(55, 'STR003', 4, '234234234', '2019-10-19', 120, 0, 'INR', 1, '2019-10-19 07:52:44', 3),
(59, 'STR003', 4, '5445344', '2019-10-23', 800, 0, 'INR', 1, '2019-10-23 10:04:10', 3),
(7, 'STR001', 1, '100001', '2019-10-08', 346, 0, 'INR', 1, '2019-10-08 10:00:20', 3),
(8, 'STR001', 1, '100002', '2019-10-08', 5000, 0, 'INR', 1, '2019-10-08 10:07:02', 3),
(9, 'STR001', 1, '1003', '2019-10-08', 750, 0, 'INR', 1, '2019-10-08 10:30:17', 3),
(10, 'STR001', 1, '1004', '2019-10-08', 350, 0, 'INR', 1, '2019-10-08 11:00:09', 3),
(11, 'STR001', 1, '1001', '2019-10-08', 100, 0, 'INR', 1, '2019-10-08 11:34:13', 3),
(12, 'STR001', 1, '1005', '2019-10-08', 800, 0, 'INR', 1, '2019-10-08 11:39:21', 3),
(13, 'STR001', 5, '1006', '2019-10-08', 500, 0, 'INR', 1, '2019-10-08 11:59:35', 3),
(14, 'STR001', 1, '1007', '2019-10-08', 450, 0, 'INR', 1, '2019-10-08 12:07:08', 3),
(15, 'STR001', 1, '1008', '2019-10-08', 870, 850, 'INR', 1, '2019-10-08 12:10:51', 3),
(16, 'STR001', 2, '100010', '2019-10-09', 4500, 0, 'INR', 1, '2019-10-09 04:57:11', 3),
(17, 'STR001', 2, '100011', '2019-10-09', 3350, 0, 'INR', 1, '2019-10-09 04:59:36', 3),
(54, 'STR003', 4, '191221321', '2019-10-19', 115, 0, 'INR', 1, '2019-10-19 07:44:36', 3),
(19, 'STR002', 1, '1000130', '2019-10-09', 6700, 3700, 'INR', 1, '2019-10-09 05:37:38', 3),
(53, 'STR003', 1, '335586624', '2019-10-17', 450, 250, 'INR', 1, '2019-10-17 05:38:55', 3),
(58, 'STR003', 4, '34234', '2019-10-23', 1200, 0, 'INR', 1, '2019-10-23 10:03:25', 3),
(25, 'STR001', 1, '100012', '2019-10-09', 1430, 0, 'INR', 1, '2019-10-09 09:18:56', 3),
(24, 'STR001', 2, '100013', '2019-10-09', 1100, 0, 'INR', 1, '2019-10-09 08:53:40', 3),
(26, 'STR001', 5, '100014', '2019-10-09', 500, 0, 'INR', 1, '2019-10-09 09:22:47', 3),
(27, 'STR001', 4, '100015', '2019-10-09', 350, 0, 'INR', 1, '2019-10-09 09:24:48', 3),
(57, 'STR003', 1, '2123213', '2019-10-23', 5120, 1320, 'INR', 1, '2019-10-23 10:01:49', 3),
(28, 'STR001', 1, '100016', '2019-10-10', 400, 0, 'INR', 1, '2019-10-10 04:57:14', 3),
(29, 'STR001', 2, '100017', '2019-10-10', 750, 0, 'INR', 1, '2019-10-10 05:04:33', 3),
(30, 'STR001', 4, '100018', '2019-10-10', 1200, 0, 'INR', 1, '2019-10-10 05:07:32', 3),
(31, 'STR001', 4, '100019', '2019-10-10', 560, 0, 'INR', 1, '2019-10-10 05:12:28', 3),
(32, 'STR001', 2, '100020', '2019-10-10', 100, 0, 'INR', 1, '2019-10-10 05:17:17', 3),
(33, 'STR001', 6, '100021', '2019-10-10', 1710, 0, 'INR', 1, '2019-10-10 05:26:07', 3),
(34, 'STR001', 1, '100022', '2019-10-10', 200, 0, 'INR', 1, '2019-10-10 05:30:26', 3),
(35, 'STR001', 4, '100023', '2019-10-10', 200, 0, 'INR', 1, '2019-10-10 05:32:43', 3),
(36, 'STR001', 1, '100024', '2019-10-10', 100, 0, 'INR', 1, '2019-10-10 05:35:52', 3),
(37, 'STR001', 1, '100025', '2019-10-10', 90, 0, 'INR', 1, '2019-10-10 06:16:42', 3),
(38, 'STR001', 1, '100026', '2019-10-10', 100, 0, 'INR', 1, '2019-10-10 06:18:12', 3),
(39, 'STR001', 2, '100027', '2019-10-10', 100, 0, 'INR', 1, '2019-10-10 06:20:35', 3),
(40, 'STR001', 2, '100028', '2019-10-10', 180, 0, 'INR', 1, '2019-10-10 06:21:20', 3),
(41, 'STR001', 2, '100029', '2019-10-10', 190, 0, 'INR', 1, '2019-10-10 06:24:34', 3),
(51, 'STR003', 3, '3356858', '2019-10-16', 1530, 0, 'INR', 1, '2019-10-16 11:09:49', 3),
(50, 'STR003', 1, '335445', '2019-10-16', 1650, 350, 'INR', 1, '2019-10-16 11:07:30', 3),
(49, 'STR003', 4, '33562855', '2019-10-16', 2375, 0, 'INR', 1, '2019-10-16 10:27:15', 3),
(48, 'STR003', 2, '33256898', '2019-10-16', 3850, 1050, 'INR', 1, '2019-10-16 10:26:10', 3),
(47, 'STR003', 4, '3312312', '2019-10-14', 2000, 0, 'INR', 1, '2019-10-16 10:19:19', 3),
(56, 'STR003', 4, '231', '2019-10-19', 24, 0, 'INR', 1, '2019-10-19 07:57:04', 3),
(60, 'STR003', 4, '234111', '2019-10-23', 75, 0, 'INR', 1, '2019-10-23 10:09:44', 3),
(61, 'STR001', 1, '100010190190', '2019-10-29', 2000, 0, 'INR', 1, '2019-10-29 04:41:31', 3);
-- --------------------------------------------------------
--
-- Table structure for table `locker`
--
CREATE TABLE `locker` (
`locker_id` int(11) NOT NULL,
`date_field` date NOT NULL,
`bill_id` varchar(255) NOT NULL,
`no_of_locker` int(11) NOT NULL,
`rent` int(11) NOT NULL,
`total_amnt` int(11) NOT NULL,
`payment_mode` varchar(255) NOT NULL,
`locker_no` text NOT NULL,
`rent_amnt` int(11) NOT NULL,
`discount_amnt` int(11) NOT NULL,
`checked_token` text NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modified_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `locker`
--
INSERT INTO `locker` (`locker_id`, `date_field`, `bill_id`, `no_of_locker`, `rent`, `total_amnt`, `payment_mode`, `locker_no`, `rent_amnt`, `discount_amnt`, `checked_token`, `status`, `created_on`, `modified_on`) VALUES
(1, '2019-10-04', 'MAHLOCKER0001', 9, 720, 1080, 'cash', '301,302,303,326,327,328,351,352,353', 80, 120, '["301","302","303","326","327","328","351","352","353"]', 0, '2019-10-04 11:28:13', '2019-10-08 06:00:16'),
(2, '2019-10-04', 'MAHLOCKER0002', 9, 720, 1080, 'cash', '426,427,428,451,452,453,476,477,478', 80, 120, '["426","427","428","451","452","453","476","477","478"]', 1, '2019-10-04 11:28:42', '2019-10-04 11:28:42'),
(11, '2019-10-11', 'MAHLOCKER0006', 9, 720, 1080, 'cash', '301,302,303,326,327,328,351,352,353', 80, 120, '["301","302","303","326","327","328","351","352","353"]', 0, '2019-10-11 03:37:03', '2019-10-11 03:37:16'),
(10, '2019-10-09', 'MAHLOCKER0005', 28, 2240, 3360, 'cash', '456,457,458,459,460,461,462,481,482,483,484,485,486,487,506,507,508,509,510,511,512,531,532,533,534,535,536,537', 80, 120, '["456","457","458","459","460","461","462","481","482","483","484","485","486","487","506","507","508","509","510","511","512","531","532","533","534","535","536","537"]', 1, '2019-10-09 04:10:46', '2019-10-09 04:10:46'),
(9, '2019-10-08', 'MAHLOCKER0004', 14, 1120, 1680, 'cash', '309,310,334,335,359,360,361,362,363,384,385,386,387,388', 80, 120, '["309","310","334","335","359","360","361","362","363","384","385","386","387","388"]', 1, '2019-10-08 05:59:28', '2019-10-08 05:59:28'),
(8, '2019-10-04', 'MAHLOCKER0003', 87, 6960, 10440, 'cash', '601,602,603,604,605,606,607,608,609,610,611,612,626,627,628,629,630,631,632,633,634,635,636,637,651,653,654,655,656,657,658,659,660,661,662,676,680,681,682,683,684,685,686,687,701,702,703,705,706,707,708,709,710,711,712,726,727,732,733,734,735,736,737,751,752,753,754,755,756,757,758,759,760,761,762,776,777,778,779,780,781,782,783,784,785,786,787', 80, 120, '["601","602","603","604","605","606","607","608","609","610","611","612","626","627","628","629","630","631","632","633","634","635","636","637","651","653","654","655","656","657","658","659","660","661","662","676","680","681","682","683","684","685","686","687","701","702","703","705","706","707","708","709","710","711","712","726","727","732","733","734","735","736","737","751","752","753","754","755","756","757","758","759","760","761","762","776","777","778","779","780","781","782","783","784","785","786","787"]', 0, '2019-10-04 11:53:47', '2019-10-08 06:00:29'),
(12, '2019-10-11', 'MAHLOCKER0007', 32, 2560, 3840, 'cash', '301,302,303,304,305,328,329,330,353,354,355,378,379,380,730,731,732,733,734,735,755,756,757,758,759,760,780,781,782,783,784,785', 80, 120, '["301","302","303","304","305","328","329","330","353","354","355","378","379","380","730","731","732","733","734","735","755","756","757","758","759","760","780","781","782","783","784","785"]', 1, '2019-10-11 03:37:56', '2019-10-11 03:37:56'),
(13, '2019-10-17', 'MAHLOCKER0008', 34, 2720, 4080, 'cash', '392,393,395,396,416,417,418,419,420,421,422,441,442,443,444,445,446,447,466,467,468,469,470,471,472,492,493,494,495,496,518,519,520,544', 80, 120, '["392","393","395","396","416","417","418","419","420","421","422","441","442","443","444","445","446","447","466","467","468","469","470","471","472","492","493","494","495","496","518","519","520","544"]', 0, '2019-10-17 04:59:56', '2019-10-17 05:01:06'),
(14, '2019-10-19', 'MAHLOCKER0009', 3, 240, 360, 'cash', '406,407,408', 80, 120, '["406","407","408"]', 0, '2019-10-19 12:14:58', '2019-10-19 12:15:45'),
(15, '2019-11-01', 'MAHLOCKER0010', 2, 160, 240, 'cash', '326,327', 80, 120, '["326","327"]', 1, '2019-11-01 06:18:00', '2019-11-01 06:18:00'),
(16, '2019-11-01', 'MAHLOCKER0011', 4, 320, 480, 'cash', '501,502,503,504', 80, 120, '["501","502","503","504"]', 1, '2019-11-01 06:18:32', '2019-11-01 06:18:32'),
(17, '2019-11-01', 'MAHLOCKER0012', 2, 160, 240, 'cash', '406,407', 80, 120, '["406","407"]', 1, '2019-11-01 06:40:52', '2019-11-01 06:40:52'),
(18, '2019-11-01', 'MAHLOCKER0013', 2, 160, 240, 'cash', '306,307', 80, 120, '["306","307"]', 1, '2019-11-01 06:50:13', '2019-11-01 06:50:13'),
(19, '2019-11-01', 'MAHLOCKER0014', 1, 80, 120, 'card', '357', 80, 120, '["357"]', 1, '2019-11-01 06:50:28', '2019-11-01 06:50:28'),
(20, '2019-11-01', 'MAHLOCKER0015', 1, 80, 120, 'cash', '435', 80, 120, '["435"]', 1, '2019-11-01 06:53:34', '2019-11-01 06:53:34'),
(21, '2019-11-01', 'MAHLOCKER0016', 4, 320, 480, 'cash', '576,577,601,602', 80, 120, '["576","577","601","602"]', 1, '2019-11-01 06:57:18', '2019-11-01 06:57:18'),
(22, '2019-11-01', 'MAHLOCKER0017', 2, 160, 240, 'cash', '312,337', 80, 120, '["312","337"]', 1, '2019-11-01 06:58:37', '2019-11-01 06:58:37'),
(23, '2019-11-01', 'MAHLOCKER0018', 1, 80, 120, 'cash', '308', 80, 120, '["308"]', 1, '2019-11-01 07:01:22', '2019-11-01 07:01:22'),
(24, '2019-11-01', 'MAHLOCKER0019', 2, 160, 240, 'cash', '529,554', 80, 120, '["529","554"]', 1, '2019-11-01 07:02:20', '2019-11-01 07:02:20'),
(25, '2019-11-01', 'MAHLOCKER0020', 4, 320, 480, 'cash', '408,409,410,411', 80, 120, '["408","409","410","411"]', 0, '2019-11-01 07:03:48', '2019-11-01 08:19:36'),
(26, '2019-11-01', 'MAHLOCKER0021', 8, 640, 960, 'cash', '331,332,333,356,358,381,382,383', 80, 120, '["331","332","333","356","358","381","382","383"]', 1, '2019-11-01 07:04:49', '2019-11-01 07:04:49'),
(27, '2019-11-01', 'MAHLOCKER0022', 1, 80, 120, 'cash', '351', 80, 120, '["351"]', 1, '2019-11-01 07:35:19', '2019-11-01 07:35:19'),
(28, '2019-11-01', 'MAHLOCKER0023', 1, 80, 120, 'card', '352', 80, 120, '["352"]', 0, '2019-11-01 07:36:16', '2019-11-01 07:36:32'),
(29, '2019-11-01', 'MAHLOCKER0024', 1, 80, 120, 'cash', '404', 80, 120, '["404"]', 1, '2019-11-01 08:19:07', '2019-11-01 08:19:07');
-- --------------------------------------------------------
--
-- Table structure for table `menu_details`
--
CREATE TABLE `menu_details` (
`menu_id` int(11) NOT NULL,
`order_no` int(11) NOT NULL,
`menu_type` int(11) NOT NULL,
`menu_icon` varchar(50) DEFAULT NULL,
`menu_name` varchar(255) NOT NULL,
`menu_url` varchar(255) NOT NULL,
`parent_id` int(11) NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) DEFAULT NULL,
`modified_on` datetime NOT NULL DEFAULT '0000-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
`modified_by` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `menu_details`
--
INSERT INTO `menu_details` (`menu_id`, `order_no`, `menu_type`, `menu_icon`, `menu_name`, `menu_url`, `parent_id`, `status`, `created_on`, `created_by`, `modified_on`, `modified_by`) VALUES
(1, 1, 0, 'fa fa-dashboard', 'Dashboard', 'index', 0, 1, '2019-07-12 22:42:25', 1, '2019-10-01 11:10:26', 1),
(2, 12, 0, 'fa fa-cog', 'Test Main Menu', '', 0, 1, '2019-07-13 01:18:31', 1, '2019-10-01 17:28:43', 1),
(34, 3, 1, NULL, 'Sales Reports', 'sales_reports', 31, 1, '2019-09-30 09:33:46', 1, '2019-10-01 10:03:29', NULL),
(6, 10, 0, 'fa fa-user', 'Users', '', 0, 1, '2019-07-13 01:52:56', 1, '2019-10-01 17:20:38', 1),
(7, 5, 0, 'fa fa-database', 'Products', '', 0, 1, '2019-07-13 01:53:27', 1, '2019-10-01 17:23:29', 1),
(8, 2, 0, 'fa fa-building', 'Store', 'store_details', 0, 1, '2019-07-13 01:53:39', 1, '2019-10-01 17:22:57', 1),
(9, 11, 0, 'fa fa-bars', 'Menus', '', 0, 1, '2019-07-13 01:53:53', 1, '2019-10-01 17:26:45', 1),
(10, 1, 1, '', 'User Details', 'user_details', 6, 1, '2019-07-13 02:17:30', 1, '2019-10-01 16:58:23', 1),
(11, 2, 1, NULL, 'Menu Details', 'menu_details', 9, 1, '2019-07-13 03:26:49', 1, '2019-10-01 17:26:45', 1),
(12, 2, 1, NULL, 'User Role', 'user_role', 6, 1, '2019-07-13 03:26:49', 1, '2019-10-01 16:58:23', NULL),
(33, 2, 1, NULL, 'Payment Reports', 'payment_reports', 31, 1, '2019-09-30 09:33:23', 1, '2019-10-01 10:03:29', NULL),
(32, 1, 1, NULL, 'Purchase Reports', 'purchase_reports', 31, 1, '2019-09-30 09:33:01', 1, '2019-10-01 10:03:29', NULL),
(31, 9, 0, 'fa fa-bar-chart', 'Reports', '', 0, 1, '2019-09-30 09:27:24', 1, '2019-10-01 17:21:03', 1),
(30, 1, 1, '', 'Sales Details', 'sales', 28, 1, '2019-09-30 09:26:43', 1, '2019-10-29 16:13:03', 8),
(27, 2, 1, NULL, 'Invoice / Payment', 'invoice_payment', 24, 1, '2019-09-30 09:15:47', 1, '2019-10-04 12:25:26', 1),
(28, 8, 0, 'fa fa-money', 'Sales', '', 0, 1, '2019-09-30 09:18:19', 1, '2019-10-01 17:21:43', 1),
(29, 2, 1, '', 'Stock of Sales', 'stock_sales', 28, 1, '2019-09-30 09:25:50', 1, '2019-10-29 16:16:09', 8),
(22, 3, 0, 'fa fa-home', 'Stall', 'stall_details', 0, 1, '2019-07-15 23:15:49', 1, '2019-10-01 17:23:06', 1),
(23, 4, 0, 'fa fa-users', 'Supplier', 'supplier_details', 0, 1, '2019-09-09 03:45:43', 1, '2019-10-01 17:23:18', 1),
(24, 6, 0, 'fa fa-suitcase', 'Purchase', '', 0, 1, '2019-09-09 03:46:07', 1, '2019-10-01 17:23:58', 1),
(26, 2, 1, NULL, 'Menu Preference', 'menu_preference', 9, 1, '2019-09-13 07:14:02', 1, '2019-10-01 17:26:45', NULL),
(35, 1, 1, NULL, 'Purchase Details', 'purchase', 24, 1, '2019-09-30 09:39:33', 1, '2019-10-03 12:21:39', NULL),
(36, 5, 1, NULL, 'Stock of Store', 'stock_of_store', 24, 1, '2019-09-30 09:41:19', 1, '2019-10-04 11:50:10', NULL),
(37, 3, 1, NULL, 'Movement Tracker', 'movement_tracker', 24, 1, '2019-09-30 09:41:50', 1, '2019-10-01 10:03:29', NULL),
(38, 6, 1, NULL, 'Stock of Stall', 'stock_of_stall', 24, 1, '2019-09-30 09:42:11', 1, '2019-10-04 11:50:12', 1),
(39, 2, 1, '', 'Product Category', 'product_category', 7, 1, '2019-09-30 09:49:09', 1, '2019-10-01 13:27:00', 1),
(40, 1, 1, '', 'Product Details', 'product_details', 7, 1, '2019-09-30 09:49:34', 1, '2019-10-01 13:26:50', 1),
(41, 3, 1, NULL, 'Sales Products', 'sales_products', 7, 1, '2019-09-30 09:50:05', 1, '2019-10-01 10:03:29', NULL),
(42, 4, 1, NULL, 'Ingredients', 'ingredients', 7, 0, '2019-09-30 09:50:29', 1, '2019-10-04 11:58:11', NULL),
(43, 4, 1, NULL, 'Wastage Product', 'wastage', 24, 1, '2019-09-30 09:42:11', 1, '2019-10-04 11:48:55', NULL),
(50, 2, 1, '', 'Payment by Supplier', 'payment_by_supplier', 24, 1, '2019-10-08 06:40:46', 1, '2019-10-08 12:11:10', 1),
(44, 1, 1, '', 'Test Sub Menu1', '', 2, 1, '2019-10-01 11:59:10', 1, '0000-01-01 00:00:00', NULL),
(45, 2, 1, '', 'Test Sub Menu2', '', 2, 1, '2019-10-01 11:59:46', 1, '0000-01-01 00:00:00', NULL),
(46, 1, 2, '', 'Test Inner Sub1 Menu1', 'tesr', 44, 1, '2019-10-01 12:00:20', 1, '2019-10-10 09:04:43', 7),
(47, 2, 2, '', 'Test Inner Sub1 Menu2', '', 44, 1, '2019-10-01 12:00:30', 1, '2019-10-08 10:03:37', 1),
(48, 1, 2, '', 'Test Inner Sub2 Menu1', 'index', 45, 1, '2019-10-01 12:03:26', 1, '2019-10-09 11:14:22', 7),
(49, 2, 2, '', 'Test Inner Sub2 Menu2', 'index', 45, 1, '2019-10-01 12:03:38', 1, '2019-10-09 17:44:56', 7),
(51, 4, 1, '', 'Sales Products for Stall', 'stall_products', 7, 1, '2019-10-09 06:17:02', 7, '2019-10-10 10:50:00', 1),
(52, 11, 0, 'fa fa-lock', 'Locker', 'locker', 0, 1, '2019-11-01 05:14:57', 1, '0000-01-01 00:00:00', NULL),
(53, 11, 0, 'fa fa-ticket', 'Theme Park', 'ticket_entry', 0, 1, '2019-11-01 05:15:46', 1, '0000-01-01 00:00:00', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `menu_preference`
--
CREATE TABLE `menu_preference` (
`preference_id` int(11) NOT NULL,
`user_type` varchar(50) NOT NULL,
`user_role` varchar(55) NOT NULL,
`menu_preference` text,
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) DEFAULT NULL,
`modified_on` datetime NOT NULL DEFAULT '0000-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
`modified_by` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `menu_preference`
--
INSERT INTO `menu_preference` (`preference_id`, `user_type`, `user_role`, `menu_preference`, `status`, `created_on`, `created_by`, `modified_on`, `modified_by`) VALUES
(1, 'root_admin', 'developer', NULL, 1, '2019-07-13 07:37:00', 1, '0000-01-01 00:00:00', NULL),
(2, 'super_admin', 'admin', '{"1":"index","8":"store_details","22":"stall_details","23":"supplier_details","7":{"40":"product_details","39":"product_category","41":"sales_products","51":"stall_products"},"24":{"35":"purchase","27":"invoice_payment","50":"payment_by_supplier","37":"movement_tracker","43":"wastage","36":"stock_of_store","38":"stock_of_stall"},"28":{"30":"sales","29":"stock_of_sales"},"31":{"32":"purchase_reports","33":"payment_reports","34":"sales_reports"},"6":{"10":"user_details","12":"user_role"},"9":{"11":"menu_details","26":"menu_preference"}}', 1, '2019-07-13 09:12:23', 1, '2019-10-17 12:28:34', NULL),
(3, 'store', 'manager', '{"1":"index","8":"store_details","22":"stall_details","23":"supplier_details","7":{"51":"stall_products"},"24":{"35":"purchase","27":"invoice_payment","50":"payment_by_supplier","37":"movement_tracker","43":"wastage","36":"stock_of_store","38":"stock_of_stall"},"28":{"30":"sales","29":"stock_of_sales"},"31":{"32":"purchase_reports","33":"payment_reports","34":"sales_reports"}}', 1, '2019-07-15 04:37:36', 1, '2019-10-22 16:51:03', NULL),
(4, 'stall', 'operator', '{"1":"index","24":{"43":"wastage","38":"stock_of_stall"},"28":{"30":"sales","29":"stock_sales"},"52":"locker","53":"ticket_entry"}', 1, '2019-07-15 04:37:40', 1, '2019-11-01 10:46:02', NULL),
(7, 'super_admin', 'MD', '{"1":"index"}', 1, '2019-09-18 11:57:03', 1, '0000-01-01 00:00:00', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `movement_tracker`
--
CREATE TABLE `movement_tracker` (
`movement_id` int(11) NOT NULL,
`movement_date` date NOT NULL,
`store_code` varchar(25) NOT NULL,
`stall_code` varchar(25) NOT NULL,
`product_code` varchar(25) NOT NULL,
`quantity` double NOT NULL,
`uom` varchar(11) NOT NULL COMMENT 'Unit of Measurement',
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL COMMENT 'Purchased by'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `movement_tracker`
--
INSERT INTO `movement_tracker` (`movement_id`, `movement_date`, `store_code`, `stall_code`, `product_code`, `quantity`, `uom`, `status`, `created_on`, `created_by`) VALUES
(66, '2019-10-23', 'STR003', 'STR003STL002', 'ODEN0004', 2, 'L', 1, '2019-10-23 10:06:02', 3),
(65, '2019-10-23', 'STR003', 'STR003STL002', 'HERB0004', 2, 'KG', 1, '2019-10-23 10:06:02', 3),
(10, '2019-10-14', 'STR001', 'STR001STL001', 'VEG005', 10, 'NOs', 1, '2019-10-14 09:51:52', 3),
(9, '2019-10-14', 'STR001', 'STR001STL001', 'CORN01', 100, 'KG', 1, '2019-10-14 09:51:52', 3),
(8, '2019-10-11', 'STR001', 'STR001STL001', 'RICE01', 20, 'KG', 1, '2019-10-11 09:09:28', 3),
(6, '2019-10-11', 'STR001', 'STR001STL001', 'RICE01', 25, 'KG', 1, '2019-10-11 04:36:40', 3),
(64, '2019-10-23', 'STR003', 'STR003STL002', 'LAYS02', 5, 'NOs', 1, '2019-10-23 09:03:37', 3),
(63, '2019-10-23', 'STR003', 'STR003STL002', 'RICE02', 10, 'KG', 1, '2019-10-23 09:03:37', 3),
(62, '2019-10-23', 'STR003', 'STR003STL002', 'SUGAR001', 10, 'NOs', 1, '2019-10-23 09:03:37', 3),
(61, '2019-10-22', 'STR001', 'STR001STL002', 'CORN01', 50, 'KG', 1, '2019-10-22 04:47:38', 3),
(60, '2019-10-18', 'STR003', 'STR003STL002', 'CORN01', 35, 'NOs', 1, '2019-10-18 10:35:02', 3),
(56, '2019-10-16', 'STR003', 'STR003STL003', 'CORN01', 5, 'NOs', 1, '2019-10-16 11:05:41', 3),
(57, '2019-10-16', 'STR003', 'STR003STL003', 'RICE02', 5, 'KG', 1, '2019-10-16 11:05:41', 3),
(54, '2019-10-16', 'STR003', 'STR003STL003', 'CORN01', 5, 'NOs', 1, '2019-10-16 11:04:54', 3),
(55, '2019-10-16', 'STR003', 'STR003STL003', 'RICE02', 5, 'KG', 1, '2019-10-16 11:04:54', 3),
(52, '2019-10-16', 'STR003', 'STR003STL003', 'CORN01', 5, 'NOs', 1, '2019-10-16 11:04:03', 3),
(53, '2019-10-16', 'STR003', 'STR003STL003', 'RICE02', 5, 'KG', 1, '2019-10-16 11:04:03', 3),
(59, '2019-10-18', 'STR003', 'STR003STL002', 'RICE02', 10, 'KG', 1, '2019-10-18 10:35:02', 3),
(58, '2019-10-18', 'STR003', 'STR003STL003', 'RICE02', 10, 'KG', 1, '2019-10-18 10:33:08', 3),
(67, '2019-10-23', 'STR003', 'STR003STL002', 'ODEN0007', 2, 'L', 1, '2019-10-23 10:06:02', 3),
(68, '2019-10-23', 'STR003', 'STR003STL002', 'HERB0001', 2, 'KG', 1, '2019-10-23 10:06:02', 3),
(69, '2019-10-23', 'STR003', 'STR003STL002', 'HERB0007', 2, 'KG', 1, '2019-10-23 10:06:02', 3),
(70, '2019-10-23', 'STR003', 'STR003STL002', 'VEG0043', 5, 'KG', 1, '2019-10-23 10:06:02', 3),
(71, '2019-10-23', 'STR003', 'STR003STL002', 'VEG0029', 5, 'KG', 1, '2019-10-23 10:06:02', 3),
(72, '2019-10-23', 'STR003', 'STR003STL002', 'RCGR0001', 10, 'KG', 1, '2019-10-23 10:06:02', 3),
(73, '2019-10-23', 'STR003', 'STR003STL002', 'VEG0026', 10, 'KG', 1, '2019-10-23 10:06:02', 3),
(74, '2019-10-23', 'STR003', 'STR003STL002', 'HERB0005', 2, 'KG', 1, '2019-10-23 10:10:05', 3),
(75, '2019-10-23', 'STR003', 'STR003STL003', 'HERB0005', 2, 'KG', 1, '2019-10-23 10:10:33', 3),
(76, '2019-10-23', 'STR001', 'STR001STL001', 'RICE01', 50, 'KG', 1, '2019-10-23 10:48:12', 3),
(77, '2019-10-23', 'STR001', 'STR001STL001', 'SUGAR001', 20, 'NOs', 1, '2019-10-23 10:48:33', 3),
(78, '2019-10-23', 'STR001', 'STR001STL001', 'VEG001', 10, 'KG', 1, '2019-10-23 10:49:03', 3),
(79, '2019-10-23', 'STR001', 'STR001STL001', 'VEG001', 10, 'KG', 1, '2019-10-23 10:49:04', 3),
(80, '2019-10-23', 'STR001', 'STR001STL001', 'VEG005', 10, 'NOs', 1, '2019-10-23 10:50:12', 3),
(81, '2019-10-29', 'STR001', 'STR001STL001', 'FLDR0001', 50, 'L', 1, '2019-10-29 04:41:53', 3);
-- --------------------------------------------------------
--
-- Table structure for table `payment_details`
--
CREATE TABLE `payment_details` (
`payment_id` int(11) NOT NULL,
`store_code` varchar(25) NOT NULL,
`supplier_id` int(11) NOT NULL,
`invoice_number` varchar(50) NOT NULL,
`payment_date` date NOT NULL,
`amount` float NOT NULL,
`currency` varchar(10) NOT NULL DEFAULT 'INR',
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `payment_details`
--
INSERT INTO `payment_details` (`payment_id`, `store_code`, `supplier_id`, `invoice_number`, `payment_date`, `amount`, `currency`, `status`, `created_on`, `created_by`) VALUES
(1, 'STR001', 4, '116322', '2019-09-30', 500, 'INR', 1, '2019-10-04 07:27:16', 3),
(2, 'STR001', 4, '10190190', '2019-10-01', 500, 'INR', 1, '2019-10-04 07:27:16', 3),
(3, 'STR001', 4, '116322', '2019-10-01', 500, 'INR', 1, '2019-10-04 07:27:16', 3),
(4, 'STR001', 4, '116322', '2019-10-04', 1000, 'INR', 1, '2019-10-04 12:40:11', 1),
(5, 'STR001', 4, '116322', '2019-10-04', 1000, 'INR', 1, '2019-10-04 12:41:55', 1),
(6, 'STR001', 4, '116322', '2019-10-04', 300, 'INR', 1, '2019-10-04 12:42:22', 1),
(7, 'STR001', 2, '100100123', '2019-10-08', 500, 'INR', 1, '2019-10-08 04:47:51', 1),
(11, 'STR001', 2, '100100123', '2019-10-08', 1, 'INR', 1, '2019-10-08 06:19:42', 1),
(10, 'STR001', 2, '100100123', '2019-10-08', 1, 'INR', 1, '2019-10-08 06:19:00', 1),
(12, 'STR001', 2, '100100123', '2019-10-08', 1, 'INR', 1, '2019-10-08 06:19:57', 1),
(13, 'STR002', 4, '7234234', '2019-10-08', 500, 'INR', 1, '2019-10-08 08:47:22', 1),
(14, 'STR002', 4, '7234234', '2019-10-08', 800, 'INR', 1, '2019-10-08 08:47:51', 4),
(15, 'STR001', 1, '1008', '2019-10-09', 850, 'INR', 1, '2019-10-09 04:44:39', 3),
(16, 'STR002', 1, '1000130', '2019-10-09', 3700, 'INR', 1, '2019-10-09 06:55:23', 3),
(25, 'STR003', 2, '33256898', '2019-10-17', 100, 'INR', 1, '2019-10-17 05:33:25', 1),
(27, 'STR003', 1, '2123213', '2019-10-25', 600, 'INR', 1, '2019-10-25 10:24:35', 3),
(26, 'STR003', 1, '2123213', '2019-10-25', 520, 'INR', 1, '2019-10-25 10:17:29', 3),
(23, 'STR003', 2, '33256898', '2019-10-17', 850, 'INR', 1, '2019-10-17 05:31:38', 1),
(24, 'STR003', 2, '33256898', '2019-10-17', 100, 'INR', 1, '2019-10-17 05:31:46', 1),
(28, 'STR003', 1, '335586624', '2019-10-25', 50, 'INR', 1, '2019-10-25 10:24:35', 3),
(29, 'STR003', 1, '335445', '2019-10-25', 150, 'INR', 1, '2019-10-25 10:24:35', 3),
(30, 'STR003', 2, '33256899', '2019-10-25', 2800, 'INR', 1, '2019-10-25 10:41:40', 3),
(31, 'STR003', 2, '33256899', '2019-10-25', 2800, 'INR', 1, '2019-10-25 10:42:03', 3),
(32, 'STR003', 2, '33256899', '2019-10-25', 800, 'INR', 1, '2019-10-25 10:44:17', 3),
(33, 'STR003', 4, '5445345', '2019-10-25', 800, 'INR', 1, '2019-10-25 10:44:36', 3),
(34, 'STR003', 4, '34235', '2019-10-25', 1200, 'INR', 1, '2019-10-25 10:44:36', 3),
(35, 'STR003', 4, '234112', '2019-10-25', 75, 'INR', 1, '2019-10-25 10:44:36', 3),
(36, 'STR003', 4, '234234235', '2019-10-25', 120, 'INR', 1, '2019-10-25 10:44:36', 3),
(37, 'STR003', 4, '232', '2019-10-25', 24, 'INR', 1, '2019-10-25 10:44:36', 3),
(38, 'STR003', 4, '191221322', '2019-10-25', 115, 'INR', 1, '2019-10-25 10:44:36', 3),
(39, 'STR003', 4, '33562856', '2019-10-25', 2375, 'INR', 1, '2019-10-25 10:44:36', 3),
(40, 'STR003', 4, '3312313', '2019-10-25', 2000, 'INR', 1, '2019-10-25 10:44:36', 3),
(41, 'STR003', 2, '33256899', '2019-10-25', 2800, 'INR', 1, '2019-10-25 10:44:49', 3),
(42, 'STR003', 4, '5445345', '2019-10-25', 800, 'INR', 1, '2019-10-25 10:44:59', 3),
(43, 'STR003', 4, '34235', '2019-10-25', 1200, 'INR', 1, '2019-10-25 10:44:59', 3),
(44, 'STR003', 4, '234112', '2019-10-25', 75, 'INR', 1, '2019-10-25 10:44:59', 3),
(45, 'STR003', 4, '234234235', '2019-10-25', 120, 'INR', 1, '2019-10-25 10:44:59', 3),
(46, 'STR003', 4, '232', '2019-10-25', 24, 'INR', 1, '2019-10-25 10:44:59', 3),
(47, 'STR003', 4, '191221322', '2019-10-25', 115, 'INR', 1, '2019-10-25 10:44:59', 3),
(48, 'STR003', 4, '33562856', '2019-10-25', 2375, 'INR', 1, '2019-10-25 10:44:59', 3),
(49, 'STR003', 4, '3312313', '2019-10-25', 2000, 'INR', 1, '2019-10-25 10:44:59', 3),
(50, 'STR003', 1, '2123213', '2019-10-25', 100, 'INR', 1, '2019-10-25 10:46:08', 3),
(51, 'STR003', 1, '335586624', '2019-10-25', 100, 'INR', 1, '2019-10-25 10:46:08', 3),
(52, 'STR003', 1, '335445', '2019-10-25', 100, 'INR', 1, '2019-10-25 10:46:08', 3),
(53, 'STR003', 1, '2123213', '2019-10-25', 100, 'INR', 1, '2019-10-25 10:50:16', 3),
(54, 'STR003', 1, '335586624', '2019-10-25', 100, 'INR', 1, '2019-10-25 10:50:16', 3),
(55, 'STR003', 1, '335445', '2019-10-25', 100, 'INR', 1, '2019-10-25 10:50:16', 3);
-- --------------------------------------------------------
--
-- Table structure for table `product_category`
--
CREATE TABLE `product_category` (
`category_id` int(11) NOT NULL,
`product_category` varchar(100) NOT NULL,
`short_name` varchar(10) NOT NULL,
`category_details` text,
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL COMMENT 'Created user ID',
`modified_on` datetime NOT NULL DEFAULT '0000-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
`modified_by` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `product_category`
--
INSERT INTO `product_category` (`category_id`, `product_category`, `short_name`, `category_details`, `status`, `created_on`, `created_by`, `modified_on`, `modified_by`) VALUES
(1, 'Vegetable', 'VEG', ' 1111', 1, '2019-10-21 06:34:23', 1, '2019-10-25 10:55:32', 1),
(2, 'Fruits', 'FRUIT', NULL, 1, '2019-10-21 06:34:23', 1, '2019-10-22 16:56:10', NULL),
(3, 'Herbs', 'HERB', NULL, 1, '2019-10-21 06:34:23', 1, '2019-10-22 16:56:10', NULL),
(4, 'Lentils & Beans', 'LEBE', NULL, 1, '2019-10-21 06:34:23', 1, '2019-10-22 16:56:10', NULL),
(5, 'Flour', 'FLOUR', NULL, 1, '2019-10-21 06:34:23', 1, '2019-10-22 16:56:10', NULL),
(6, 'Rice & Grains', 'RCGR', NULL, 1, '2019-10-21 06:34:23', 1, '2019-10-22 16:56:10', NULL),
(7, 'Nuts, Seeds, Dried fruits', 'NSDF', NULL, 1, '2019-10-21 06:34:23', 1, '2019-10-22 16:56:10', NULL),
(8, 'Dairy', 'DAIRY', NULL, 1, '2019-10-21 06:34:23', 1, '2019-10-22 16:56:10', NULL),
(9, 'Baking items', 'BAK', NULL, 1, '2019-10-21 06:34:23', 1, '2019-10-22 16:56:10', NULL),
(10, 'Odds & Ends', 'ODEN', NULL, 1, '2019-10-21 06:34:23', 1, '2019-10-23 12:29:59', NULL),
(11, 'Drinks', 'DRINK', NULL, 1, '2019-10-22 01:49:49', 1, '2019-10-22 16:56:10', NULL),
(12, 'Fats and Oils', 'FAOIL', NULL, 1, '2019-10-22 02:04:04', 1, '2019-10-22 16:56:10', NULL),
(13, 'Spices', 'SPICE', NULL, 1, '2019-10-22 03:16:40', 1, '2019-10-22 16:56:10', NULL),
(14, 'Fluid and Drinks', 'FLDR', NULL, 1, '2019-09-23 03:11:37', 1, '0000-01-01 00:00:00', NULL),
(15, 'Snacks', 'SNACK', NULL, 1, '2019-09-23 03:11:37', 1, '2019-10-23 10:11:11', NULL),
(16, 'Medicine', 'MEDI', NULL, 0, '2019-09-23 03:11:37', 1, '0000-01-01 00:00:00', NULL),
(17, 'Health Care', 'HEALTH', NULL, 0, '2019-09-23 03:11:37', 1, '0000-01-01 00:00:00', NULL),
(18, 'Personal Care', 'PERS', NULL, 0, '2019-09-23 03:11:37', 1, '0000-01-01 00:00:00', NULL),
(19, 'Home Cleaner', 'HOME', NULL, 0, '2019-09-23 03:11:37', 1, '0000-01-01 00:00:00', NULL),
(20, 'Bathroom Cleaner', 'BATH', NULL, 0, '2019-09-23 03:11:37', 1, '0000-01-01 00:00:00', NULL),
(21, 'Baby Care', 'BABY', NULL, 0, '2019-09-26 06:00:35', 1, '0000-01-01 00:00:00', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `product_details`
--
CREATE TABLE `product_details` (
`product_id` int(11) NOT NULL,
`product_code` varchar(50) NOT NULL,
`product_name` varchar(100) NOT NULL,
`brand_name` varchar(100) DEFAULT NULL,
`product_type` varchar(100) DEFAULT NULL,
`category_id` int(11) NOT NULL,
`conversion_value` float DEFAULT '0' COMMENT 'Value Per Unit',
`uom` varchar(10) NOT NULL COMMENT 'Unit of measurement',
`description` text,
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL,
`modified_on` datetime NOT NULL DEFAULT '0000-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
`modified_by` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `product_details`
--
INSERT INTO `product_details` (`product_id`, `product_code`, `product_name`, `brand_name`, `product_type`, `category_id`, `conversion_value`, `uom`, `description`, `status`, `created_on`, `created_by`, `modified_on`, `modified_by`) VALUES
(1, 'RICE01', 'Rice', 'Basmathi', 'Rice', 1, 1, 'KG', 'First Quality', 1, '2019-09-23 07:43:41', 1, '2019-10-23 17:22:19', 8),
(2, 'RICE02', 'Rice', NULL, 'Rice', 1, 0, 'KG', '-', 0, '2019-09-23 07:54:40', 1, '2019-10-22 17:18:27', 8),
(3, 'RICE03', 'Rice', 'Chennai Gate', '<NAME>', 1, 0, 'KG', 'Healthy and without stones..', 0, '2019-09-23 07:54:40', 1, '2019-10-22 17:11:00', 8),
(4, 'RICE04', 'Rice', 'Annapoorna', 'Ponni', 1, 0, 'KG', '-', 0, '2019-09-23 07:54:40', 1, '2019-10-22 17:11:04', NULL),
(5, 'RICE05', 'Rice', 'Chennai Gate', 'Ponni', 1, 0, 'KG', 'High quality without stones and clean with healthy food..', 0, '2019-09-23 07:54:40', 1, '2019-10-22 17:11:09', NULL),
(10, 'LEBE16', 'Corn', NULL, '', 4, 4.5, 'NOs', '', 0, '2019-09-26 11:36:29', 1, '2019-10-23 18:03:23', 1),
(6, 'SUGAR001', 'Ice Cream (Vennila)', NULL, NULL, 1, 0, 'NOs', ' First Quality', 1, '2019-09-26 07:22:39', 0, '2019-10-23 18:03:23', NULL),
(7, 'VEG001', 'Tomoto', '', '', 1, 0, 'KG', 'Vennila', 0, '2019-09-26 09:56:36', 0, '2019-10-24 16:31:59', 8),
(8, 'VEG002', 'VEGETABLES', NULL, NULL, 2, 0, 'KG', ' sdfsdf sdfsdf', 0, '2019-09-26 10:36:27', 0, '2019-10-22 17:18:05', NULL),
(12, 'VEG005', 'Coconut', NULL, '', 2, 0, 'NOs', ' cvbcvbcvb', 1, '2019-09-26 12:55:07', 1, '2019-10-23 18:03:23', 8),
(311, 'FLDR0001', 'Water Bottle', 'Bisleri', '1L ', 14, 0, 'L', ' ', 1, '2019-10-24 11:35:10', 1, '2019-10-24 17:14:48', 1),
(303, 'VEG0046', 'Chips', 'KurKur', 'Hot', 1, 0, 'KG', ' Testing comments for Kurkur', 1, '2019-10-24 04:35:42', 1, '0000-01-01 00:00:00', NULL),
(24, 'LAYS01', 'Lay\'s chips', '', 'Onion', 15, 0, 'NOs', ' ', 1, '2019-10-11 05:35:10', 1, '2019-10-25 11:44:40', 1),
(224, 'LEBE0011', 'Vatana (Green or white peas)', NULL, NULL, 4, 0, 'KG', NULL, 0, '2019-10-22 11:37:57', 1, '2019-10-22 18:24:29', NULL),
(35, 'LAYS02', 'Lay\'s Chips', '', 'Potato', 15, 0, 'NOs', ' ', 1, '2019-10-11 07:01:07', 1, '2019-10-23 18:03:23', 1),
(223, 'LEBE0010', '<NAME> (Split black lentils)', NULL, NULL, 4, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(222, 'LEBE0009', 'Toor dal (Split pegion peas)', NULL, NULL, 4, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(221, 'LEBE0008', 'Rajma (Red kidney beans)', NULL, NULL, 4, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(220, 'LEBE0007', 'Moth beans', NULL, NULL, 4, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(219, 'LEBE0006', 'Moong dal chilka (Yellow lentils w/ skin)', NULL, NULL, 4, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(218, 'LEBE0005', 'Masoor dal (Split red lentils)', NULL, NULL, 4, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(217, 'LEBE0004', 'Lobia (Black eyed peas)', NULL, NULL, 4, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(216, 'LEBE0003', 'Kala chana (Black chickpeas)', NULL, NULL, 4, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(215, 'LEBE0002', 'Kabuli chana (Chole, White chickpeas)', NULL, NULL, 4, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(214, 'LEBE0001', 'Chana dal (Split bengal gram)', NULL, NULL, 4, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(213, 'HERB0008', 'Parsley', NULL, NULL, 3, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(212, 'HERB0007', 'Mint', NULL, NULL, 3, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(211, 'HERB0006', 'Green garlic (Chives)', '', '', 3, 0, 'KG', '', 1, '2019-10-22 11:37:57', 1, '2019-10-23 12:06:17', 1),
(210, 'HERB0005', 'Ginger', NULL, NULL, 3, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(209, 'HERB0004', 'Garlic', NULL, NULL, 3, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(208, 'HERB0003', 'Dill (Suvai)', '', '', 3, 0, 'KG', '', 1, '2019-10-22 11:37:57', 1, '2019-10-22 18:22:30', 1),
(207, 'HERB0002', 'Curry leaves', NULL, NULL, 3, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(206, 'HERB0001', 'Cilantro (Coriander leaves)', NULL, NULL, 3, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(205, 'FRUIT0016', 'Watermelon', NULL, NULL, 2, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:13:46', NULL),
(204, 'FRUIT0015', 'Strawberry', NULL, NULL, 2, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:13:46', NULL),
(203, 'FRUIT0014', 'Raw mango (Green mango)', '', '', 2, 0, 'KG', '', 1, '2019-10-22 11:37:57', 1, '2019-10-22 18:19:54', 1),
(202, 'FRUIT0013', 'Pomegranate', NULL, NULL, 2, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:13:46', NULL),
(201, 'FRUIT0012', 'Pineapple', NULL, NULL, 2, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:13:46', NULL),
(200, 'FRUIT0011', 'Papaya', NULL, NULL, 2, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:13:46', NULL),
(199, 'FRUIT0010', 'Orange', NULL, NULL, 2, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:13:46', NULL),
(198, 'FRUIT0009', 'Mango', NULL, NULL, 2, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:13:46', NULL),
(197, 'FRUIT0008', 'Lemon', NULL, NULL, 2, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:13:46', NULL),
(196, 'FRUIT0007', 'Kiwi', NULL, NULL, 2, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:13:46', NULL),
(195, 'FRUIT0006', 'Grapes', NULL, NULL, 2, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:13:46', NULL),
(194, 'FRUIT0005', 'Chikoo', NULL, NULL, 2, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:13:46', NULL),
(193, 'FRUIT0004', 'Cantaloupe (Musk melon)', NULL, NULL, 2, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:13:46', NULL),
(192, 'FRUIT0003', 'Blueberry', NULL, NULL, 2, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:13:46', NULL),
(191, 'FRUIT0002', 'Banana', NULL, NULL, 2, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:13:46', NULL),
(190, 'FRUIT0001', 'Apple', NULL, NULL, 2, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:13:46', NULL),
(189, 'VEG0045', 'Zuchhini', NULL, NULL, 1, 0, 'KG', NULL, 0, '2019-10-22 11:37:57', 1, '2019-10-22 17:25:58', NULL),
(188, 'VEG0044', 'Yam', '', '', 1, 0, 'KG', '', 1, '2019-10-22 11:37:57', 1, '2019-10-23 10:16:59', 8),
(187, 'VEG0043', 'Tomatoes', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(186, 'VEG0042', 'Taro roots (Arbi)', NULL, NULL, 1, 0, 'KG', NULL, 0, '2019-10-22 11:37:57', 1, '2019-10-22 17:27:17', NULL),
(185, 'VEG0041', 'Sweet potatoes', '', '', 1, 0, 'KG', '', 1, '2019-10-22 11:37:57', 1, '2019-10-22 18:16:44', 1),
(184, 'VEG0040', 'Corn', '', '', 1, 0, 'KG', '', 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:30:44', 1),
(183, 'VEG0039', 'Surti papdi (Valor, sem papdi)', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(182, 'VEG0038', 'Spinach (Palak)', NULL, NULL, 1, 0, 'KG', NULL, 0, '2019-10-22 11:37:57', 1, '2019-10-22 17:39:08', NULL),
(181, 'VEG0037', 'Shallots', NULL, NULL, 1, 0, 'KG', NULL, 0, '2019-10-22 11:37:57', 1, '2019-10-22 17:35:22', NULL),
(180, 'VEG0036', 'Red pepper', NULL, NULL, 1, 0, 'KG', NULL, 0, '2019-10-22 11:37:57', 1, '2019-10-22 17:35:16', NULL),
(179, 'VEG0035', 'Raw banana (Green banana)', '', '', 1, 0, 'KG', '', 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:44:06', 1),
(178, 'VEG0034', 'Radish (Mooli)', '', '', 1, 0, 'KG', '', 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:40:09', 1),
(177, 'VEG0033', 'Purple yam (Ratalu)', '', '', 1, 0, 'KG', '', 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:44:21', 1),
(176, 'VEG0032', 'Pumpkin', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(175, 'VEG0031', 'Potato (Aloo)', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(174, 'VEG0030', 'Pointed gourd (Parwal)', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(173, 'VEG0029', 'Onion (Pyaz)', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(172, 'VEG0028', 'Ladies finger (Okra / Bhindi)', '', '', 1, 0, 'KG', '', 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:47:13', 1),
(171, 'VEG0027', 'Mustard (Sarson)', '', '', 1, 0, 'KG', '', 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:50:00', 1),
(170, 'VEG0026', 'Mushrooms', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(169, 'VEG0025', 'Mini vine sweet peppers', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(168, 'VEG0024', 'Long beans', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(167, 'VEG0023', 'Lilva (fresh tuvar dana)', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(166, 'VEG0022', 'Ivy gourd (Tindora, Tendli)', '', '', 1, 0, 'KG', '', 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:54:27', 1),
(165, 'VEG0021', 'Green peas', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(164, 'VEG0020', 'Green onion (Spring onions)', NULL, NULL, 1, 0, 'KG', NULL, 0, '2019-10-22 11:37:57', 1, '2019-10-22 17:56:04', NULL),
(163, 'VEG0019', 'Green beans (French beans)', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(162, 'VEG0018', 'Mesta leaves (Gongura)', '', '', 1, 0, 'KG', '', 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:57:17', 1),
(161, 'VEG0017', 'Fenugreek (Methi patta)', '', '', 1, 0, 'KG', '', 1, '2019-10-22 11:37:57', 1, '2019-10-22 17:58:04', 1),
(160, 'VEG0016', 'Baby eggplant', '', '', 1, 0, 'KG', '', 1, '2019-10-22 11:37:57', 1, '2019-10-22 18:11:34', 1),
(159, 'VEG0015', 'Cucumber', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(158, 'VEG0014', 'Cluster beans (Gawar)', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(157, 'VEG0013', 'Celery', NULL, NULL, 1, 0, 'KG', NULL, 0, '2019-10-22 11:37:57', 1, '2019-10-22 17:59:36', NULL),
(156, 'VEG0012', 'Cauliflower (Gobi)', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(155, 'VEG0011', 'Carrot (Gajar)', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(154, 'VEG0010', 'Cabbage (Patta Gobhi)', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(153, 'VEG0009', 'Bottle gourd (Lauki, Doodhi) ', '', '', 1, 0, 'KG', '', 1, '2019-10-22 11:37:57', 1, '2019-10-22 18:01:03', 1),
(152, 'VEG0008', 'Bitter gourd (Karela)', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(151, 'VEG0007', 'Bell pepper (Capsicum)', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(150, 'VEG0006', 'Beetroot leaves', NULL, NULL, 1, 0, 'KG', NULL, 0, '2019-10-22 11:37:57', 1, '2019-10-22 18:02:15', NULL),
(149, 'VEG0005', 'Beetroot', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(148, 'VEG0004', 'Baby potatoes', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(147, 'VEG0003', 'Eggplant', NULL, NULL, 1, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(146, 'VEG0002', 'Avocado', NULL, NULL, 1, 0, 'KG', NULL, 0, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(145, 'VEG0001', 'Asparagus', NULL, NULL, 1, 0, 'KG', NULL, 0, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(225, 'LEBE0012', 'Whole masoor dal', NULL, NULL, 4, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(226, 'LEBE0013', 'Whole moong dal', NULL, NULL, 4, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(227, 'LEBE0014', 'Whole urad dal (Black lentils)', NULL, NULL, 4, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(228, 'LEBE0015', 'Yellow moong dal', NULL, NULL, 4, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(229, 'FLOUR0001', 'All purpose flour (Maida)', NULL, NULL, 5, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(230, 'FLOUR0002', 'Amranth flour (Rajgire ka atta)', NULL, NULL, 5, 0, 'KG', NULL, 0, '2019-10-22 11:37:57', 1, '2019-10-22 18:31:10', NULL),
(231, 'FLOUR0003', 'Buckwheat flour (Kuttu ka atta)', NULL, NULL, 5, 0, 'KG', NULL, 0, '2019-10-22 11:37:57', 1, '2019-10-22 18:31:41', NULL),
(232, 'FLOUR0004', 'Gram flour (Besan)', NULL, NULL, 5, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(233, 'FLOUR0005', 'Millet flour (Bajra atta)', NULL, NULL, 5, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(234, 'FLOUR0006', 'Rice flour (Chawal ka atta)', NULL, NULL, 5, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(235, 'FLOUR0007', 'Water chestnut flour (Singare ka atta)', NULL, NULL, 5, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(236, 'FLOUR0008', 'Whole wheat flour (Chapati atta)', NULL, NULL, 5, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(237, 'FLOUR0009', 'Yellow corn flour (Makki ka atta)', NULL, NULL, 5, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(238, 'RCGR0001', 'Basmati rice', NULL, NULL, 6, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(239, 'RCGR0002', 'Broken wheat (Dalia)', NULL, NULL, 6, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(240, 'RCGR0003', 'Noodles', NULL, NULL, 6, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(241, 'RCGR0004', 'Oats', NULL, NULL, 6, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(242, 'RCGR0005', 'Pasta', NULL, NULL, 6, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(243, 'RCGR0006', 'Phool makhana', NULL, NULL, 6, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(244, 'RCGR0007', 'Poha', NULL, NULL, 6, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(245, 'RCGR0008', 'Puffed rice', NULL, NULL, 6, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(246, 'RCGR0009', 'Quinoa', NULL, NULL, 6, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(247, 'RCGR0010', 'Rice', NULL, NULL, 6, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(248, 'RCGR0011', 'Sabudana', NULL, NULL, 6, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(249, 'RCGR0012', 'Semolina (rava, sooji)', '', '', 6, 0, 'KG', '', 1, '2019-10-22 11:37:57', 1, '2019-10-24 10:26:06', 1),
(250, 'RCGR0013', 'Vermicelli', NULL, NULL, 6, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(251, 'RCGR0014', 'Vrat ke chawal (barnyard millet)', NULL, NULL, 6, 0, 'KG', NULL, 1, '2019-10-22 11:37:57', 1, '0000-01-01 00:00:00', NULL),
(252, 'NSDF0001', 'Almonds', NULL, NULL, 7, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(253, 'NSDF0002', 'Basil seeds (Sabja)', NULL, NULL, 7, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(254, 'NSDF0003', 'Cashew nuts', NULL, NULL, 7, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(255, 'NSDF0004', 'Coconut (dry)', NULL, NULL, 7, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(256, 'NSDF0005', 'Coconut (fresh)', NULL, NULL, 7, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(257, 'NSDF0006', 'Dates', NULL, NULL, 7, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(258, 'NSDF0007', 'Dried figs', NULL, NULL, 7, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(259, 'NSDF0008', 'Macadamia nuts', NULL, NULL, 7, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(260, 'NSDF0009', 'Peanuts', NULL, NULL, 7, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(261, 'NSDF0010', 'Pistachio', NULL, NULL, 7, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(262, 'NSDF0011', 'Poppy seeds', NULL, NULL, 7, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(263, 'NSDF0012', 'Raisins', NULL, NULL, 7, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(264, 'NSDF0013', 'Sesame seeds', NULL, NULL, 7, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(265, 'NSDF0014', 'Tamarind', NULL, NULL, 7, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(266, 'NSDF0015', 'Walnuts', NULL, NULL, 7, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(267, 'DAIRY0001', 'Cheese', NULL, NULL, 8, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(268, 'DAIRY0002', 'Cream cheese', NULL, NULL, 8, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(269, 'DAIRY0003', 'Heavy whipping cream', NULL, NULL, 8, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(270, 'DAIRY0004', 'Khoya (mawa)', NULL, NULL, 8, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(271, 'DAIRY0005', 'Milk', NULL, NULL, 8, 0, 'L', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(272, 'DAIRY0006', 'Milk powder', NULL, NULL, 8, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(273, 'DAIRY0007', 'Paneer', NULL, NULL, 8, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(274, 'DAIRY0008', 'Yogurt', NULL, NULL, 8, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(275, 'BAK0001', 'All purpose flour', '', '', 9, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '2019-10-24 15:05:57', 1),
(276, 'BAK0002', 'Brown sugar', NULL, NULL, 9, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(277, 'BAK0003', 'Butter', NULL, NULL, 9, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(278, 'BAK0004', 'Chocolate chips', '', '', 9, 0, 'KG', '', 1, '2019-10-22 11:38:09', 1, '2019-10-22 18:33:06', 1),
(279, 'BAK0005', 'Cocoa powder', NULL, NULL, 9, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(280, 'BAK0006', 'Molasses', NULL, NULL, 9, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(281, 'BAK0007', 'Powdered sugar', NULL, NULL, 9, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(282, 'BAK0008', 'Semi sweet chocolate', NULL, NULL, 9, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(283, 'BAK0009', 'Sugar', NULL, NULL, 9, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(284, 'BAK0010', 'Sweetened condensed milk', NULL, NULL, 9, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(285, 'BAK0011', 'Unsweetened chocolate', NULL, NULL, 9, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(286, 'BAK0012', 'White chocolate', NULL, NULL, 9, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(287, 'ODEN0001', 'Applesauce', NULL, NULL, 10, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(288, 'ODEN0002', 'Boondi', NULL, NULL, 10, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(289, 'ODEN0003', 'Bread', NULL, NULL, 10, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(290, 'ODEN0004', 'Coconut milk', NULL, NULL, 10, 0, 'L', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(291, 'ODEN0005', 'Coffee Been', NULL, NULL, 10, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(292, 'ODEN0006', 'Cornflakes', NULL, NULL, 10, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(293, 'ODEN0007', 'Ghee', NULL, NULL, 10, 0, 'L', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(294, 'ODEN0008', 'Ginger powder', NULL, NULL, 10, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(295, 'ODEN0009', 'Jaggery', NULL, NULL, 10, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(296, 'ODEN0010', 'Nutella', NULL, NULL, 10, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(297, 'ODEN0011', 'Oreo', NULL, NULL, 10, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(298, 'ODEN0012', 'Peanut butter', NULL, NULL, 10, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(299, 'ODEN0013', 'Roohafza', NULL, NULL, 10, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(300, 'ODEN0014', 'Sev', NULL, NULL, 10, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(301, 'ODEN0015', 'Tofu', NULL, NULL, 10, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(302, 'ODEN0016', 'Tutti fruitti', NULL, NULL, 10, 0, 'KG', NULL, 1, '2019-10-22 11:38:09', 1, '0000-01-01 00:00:00', NULL),
(312, 'FLDR0002', 'Water Bottle', '', '20L', 14, 0, 'L', ' ', 1, '2019-10-24 11:37:58', 1, '2019-10-24 17:15:04', 1);
-- --------------------------------------------------------
--
-- Table structure for table `purchase_details`
--
CREATE TABLE `purchase_details` (
`purchase_id` int(11) NOT NULL,
`invoice_number` varchar(50) NOT NULL,
`purchase_date` date NOT NULL,
`store_code` varchar(50) NOT NULL,
`supplier_id` int(11) NOT NULL,
`product_code` varchar(50) NOT NULL,
`quantity` float NOT NULL,
`uom` varchar(10) NOT NULL COMMENT 'Unit of measurement like kg, g, l, ml etc',
`amount` float NOT NULL,
`currency` varchar(10) NOT NULL DEFAULT 'INR',
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL,
`modified_on` datetime NOT NULL DEFAULT '0000-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
`modified_by` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `purchase_details`
--
INSERT INTO `purchase_details` (`purchase_id`, `invoice_number`, `purchase_date`, `store_code`, `supplier_id`, `product_code`, `quantity`, `uom`, `amount`, `currency`, `status`, `created_on`, `created_by`, `modified_on`, `modified_by`) VALUES
(100, '100015', '2019-10-09', 'STR001', 4, 'SUGAR001', 75, 'NOs', 350, 'INR', 1, '2019-10-09 09:24:48', 3, '2019-10-23 18:04:56', NULL),
(99, '100014', '2019-10-09', 'STR001', 5, 'SUGAR001', 100, 'NOs', 500, 'INR', 1, '2019-10-09 09:22:47', 3, '2019-10-23 18:04:56', NULL),
(98, '100012', '2019-10-09', 'STR001', 1, 'GREEN001010', 30, 'NOs', 780, 'INR', 1, '2019-10-09 09:18:56', 3, '2019-10-23 18:04:56', NULL),
(97, '100012', '2019-10-09', 'STR001', 1, 'CORN01', 10, 'KG', 650, 'INR', 1, '2019-10-09 09:18:56', 3, '2019-10-19 16:58:30', NULL),
(96, '100012', '2019-10-09', 'STR001', 1, 'GREEN001010', 30, 'NOs', 780, 'INR', 1, '2019-10-09 09:18:17', 3, '2019-10-23 18:04:56', NULL),
(93, '100013', '2019-10-09', 'STR001', 2, 'GREEN001010', 10, 'NOs', 750, 'INR', 1, '2019-10-09 08:53:40', 3, '2019-10-23 18:04:56', NULL),
(94, '100013', '2019-10-09', 'STR001', 2, 'CORN01', 5, 'KG', 350, 'INR', 1, '2019-10-09 08:53:40', 3, '2019-10-19 16:58:30', NULL),
(116, '100024', '2019-10-10', 'STR001', 1, 'RICE05', 10, 'KG', 100, 'INR', 1, '2019-10-10 05:35:52', 3, '2019-10-19 16:58:30', NULL),
(154, '191221321', '2019-10-19', 'STR003', 4, 'LAYS02', 20, '', 75, 'INR', 1, '2019-10-19 07:44:36', 3, '2019-10-19 16:58:30', NULL),
(115, '100023', '2019-10-10', 'STR001', 4, 'RICE05', 20, 'KG', 200, 'INR', 1, '2019-10-10 05:32:43', 3, '2019-10-19 16:58:30', NULL),
(110, '100020', '2019-10-10', 'STR001', 2, 'SUGAR001', 10, 'NOs', 100, 'INR', 1, '2019-10-10 05:18:41', 3, '2019-10-23 18:04:56', NULL),
(153, '191221321', '2019-10-19', 'STR003', 4, 'LAYS01', 10, 'NOs', 40, 'INR', 1, '2019-10-19 07:44:36', 3, '2019-10-23 18:04:56', NULL),
(71, '1001', '2019-10-08', 'STR001', 1, 'SUGAR001', 10, '5', 100, 'INR', 1, '2019-10-08 11:34:13', 3, '2019-10-19 16:58:30', NULL),
(72, '1001', '2019-10-08', 'STR001', 1, 'SUGAR001', 10, '5', 100, 'INR', 1, '2019-10-08 11:37:05', 3, '2019-10-19 16:58:30', NULL),
(152, '335586624', '2019-10-17', 'STR003', 1, 'SUGAR001', 100, 'NOs', 450, 'INR', 1, '2019-10-17 05:38:55', 3, '2019-10-23 18:04:56', NULL),
(150, '3356858', '2019-10-16', 'STR003', 3, 'LAYS02', 10, 'NOs', 30, 'INR', 1, '2019-10-16 11:09:49', 3, '2019-10-23 18:04:56', NULL),
(85, '1000130', '2019-10-09', 'STR002', 1, 'CORN01', 600, 'G', 200, 'INR', 1, '2019-10-09 05:37:38', 3, '2019-10-19 16:58:30', NULL),
(149, '3356858', '2019-10-16', 'STR003', 3, 'RICE01', 50, 'KG', 1500, 'INR', 1, '2019-10-16 11:09:49', 3, '2019-10-19 16:58:30', NULL),
(84, '1000130', '2019-10-09', 'STR002', 1, 'RICE01', 150, 'KG', 6500, 'INR', 1, '2019-10-09 05:37:38', 3, '2019-10-19 16:58:30', NULL),
(81, '100011', '2019-10-09', 'STR001', 2, 'GREEN001010', 50, 'NOs', 650, 'INR', 1, '2019-10-09 04:59:36', 3, '2019-10-23 18:04:56', NULL),
(82, '100011', '2019-10-09', 'STR001', 2, 'RICE01', 50, 'KG', 2700, 'INR', 1, '2019-10-09 04:59:36', 3, '2019-10-19 16:58:30', NULL),
(68, '1003', '2019-10-08', 'STR001', 1, 'VEG001', 10, '1', 300, 'INR', 1, '2019-10-08 10:30:17', 3, '2019-10-19 16:58:30', NULL),
(106, '100019', '2019-10-10', 'STR001', 4, 'VEG001', 50, 'KG', 560, 'INR', 1, '2019-10-10 05:12:28', 3, '2019-10-19 16:58:30', NULL),
(104, '100018', '2019-10-10', 'STR001', 4, 'RICE03', 30, 'KG', 1200, 'INR', 1, '2019-10-10 05:07:32', 3, '2019-10-19 16:58:30', NULL),
(102, '100017', '2019-10-10', 'STR001', 2, 'RICE02', 20, 'KG', 750, 'INR', 1, '2019-10-10 05:04:33', 3, '2019-10-19 16:58:30', NULL),
(101, '100016', '2019-10-10', 'STR001', 1, 'RICE01', 10, 'KG', 400, 'INR', 1, '2019-10-10 04:57:14', 3, '2019-10-19 16:58:30', NULL),
(70, '1004', '2019-10-08', 'STR001', 1, 'GREEN001010', 1, '1', 200, 'INR', 1, '2019-10-08 11:00:09', 3, '2019-10-19 16:58:30', NULL),
(80, '100010', '2019-10-09', 'STR001', 2, 'RICE01', 100, 'KG', 4500, 'INR', 1, '2019-10-09 04:57:11', 3, '2019-10-19 16:58:30', NULL),
(112, '100021', '2019-10-10', 'STR001', 6, 'RICE05', 20, 'KG', 1710, 'INR', 1, '2019-10-10 05:27:43', 3, '2019-10-19 16:58:30', NULL),
(114, '100022', '2019-10-10', 'STR001', 1, 'VEG005', 20, 'NOs', 200, 'INR', 1, '2019-10-10 05:30:26', 3, '2019-10-23 18:04:56', NULL),
(117, '100025', '2019-10-10', 'STR001', 1, 'RICE05', 10, 'KG', 90, 'INR', 1, '2019-10-10 06:16:42', 3, '2019-10-19 16:58:30', NULL),
(118, '100026', '2019-10-10', 'STR001', 1, 'RICE05', 10, 'KG', 100, 'INR', 1, '2019-10-10 06:18:12', 3, '2019-10-19 16:58:30', NULL),
(119, '100027', '2019-10-10', 'STR001', 2, 'RICE05', 10, 'KG', 100, 'INR', 1, '2019-10-10 06:20:35', 3, '2019-10-19 16:58:30', NULL),
(120, '100028', '2019-10-10', 'STR001', 2, 'RICE05', 20, 'KG', 180, 'INR', 1, '2019-10-10 06:21:20', 3, '2019-10-19 16:58:30', NULL),
(123, '100029', '2019-10-10', 'STR001', 2, 'RICE04', 20, 'KG', 190, 'INR', 1, '2019-10-10 06:24:34', 3, '2019-10-19 16:58:30', NULL),
(148, '335445', '2019-10-16', 'STR003', 1, 'CORN01', 50, 'NOs', 150, 'INR', 1, '2019-10-16 11:07:30', 3, '2019-10-23 18:04:56', NULL),
(147, '335445', '2019-10-16', 'STR003', 1, 'RICE01', 50, 'KG', 1500, 'INR', 1, '2019-10-16 11:07:30', 3, '2019-10-19 16:58:30', NULL),
(146, '33562855', '2019-10-16', 'STR003', 4, 'LAYS01', 25, 'NOs', 75, 'INR', 1, '2019-10-16 10:27:15', 3, '2019-10-23 18:04:56', NULL),
(144, '33562855', '2019-10-16', 'STR003', 4, 'RICE02', 100, 'KG', 2000, 'INR', 1, '2019-10-16 10:27:15', 3, '2019-10-19 16:58:30', NULL),
(145, '33562855', '2019-10-16', 'STR003', 4, 'CORN01', 100, 'NOs', 300, 'INR', 1, '2019-10-16 10:27:15', 3, '2019-10-23 18:04:56', NULL),
(158, '2123213', '2019-10-23', 'STR003', 1, 'ODEN0004', 10, 'L', 350, 'INR', 1, '2019-10-23 10:01:49', 3, '0000-01-01 00:00:00', NULL),
(143, '33256898', '2019-10-16', 'STR003', 2, 'LAYS02', 50, 'NOs', 200, 'INR', 1, '2019-10-16 10:26:10', 3, '2019-10-23 18:04:56', NULL),
(142, '33256898', '2019-10-16', 'STR003', 2, 'LAYS01', 50, 'NOs', 150, 'INR', 1, '2019-10-16 10:26:10', 3, '2019-10-23 18:04:56', NULL),
(140, '3312312', '2019-10-14', 'STR003', 4, 'RICE01', 50, 'KG', 2000, 'INR', 1, '2019-10-16 10:19:19', 3, '2019-10-19 16:58:30', NULL),
(141, '33256898', '2019-10-16', 'STR003', 2, 'RICE03', 100, 'KG', 3500, 'INR', 1, '2019-10-16 10:26:10', 3, '2019-10-19 16:58:30', NULL),
(155, '234234234', '2019-10-19', 'STR003', 4, 'LAYS01', 12, 'NOs', 40, 'INR', 1, '2019-10-19 07:52:44', 3, '2019-10-23 18:04:56', NULL),
(156, '234234234', '2019-10-19', 'STR003', 4, 'LAYS02', 20, 'NOs', 80, 'INR', 1, '2019-10-19 07:52:44', 3, '2019-10-23 18:04:56', NULL),
(157, '231', '2019-10-19', 'STR003', 4, 'RICE01', 1, 'KG', 12, 'INR', 1, '2019-10-19 07:57:04', 3, '2019-10-19 16:58:30', NULL),
(159, '2123213', '2019-10-23', 'STR003', 1, 'ODEN0007', 10, 'L', 300, 'INR', 1, '2019-10-23 10:01:49', 3, '0000-01-01 00:00:00', NULL),
(160, '2123213', '2019-10-23', 'STR003', 1, 'HERB0004', 10, 'KG', 100, 'INR', 1, '2019-10-23 10:01:49', 3, '0000-01-01 00:00:00', NULL),
(161, '2123213', '2019-10-23', 'STR003', 1, 'HERB0001', 10, 'KG', 120, 'INR', 1, '2019-10-23 10:01:49', 3, '0000-01-01 00:00:00', NULL),
(162, '2123213', '2019-10-23', 'STR003', 1, 'HERB0007', 10, 'KG', 50, 'INR', 1, '2019-10-23 10:01:49', 3, '0000-01-01 00:00:00', NULL),
(163, '2123213', '2019-10-23', 'STR003', 1, 'VEG0043', 20, 'KG', 500, 'INR', 1, '2019-10-23 10:01:49', 3, '0000-01-01 00:00:00', NULL),
(164, '2123213', '2019-10-23', 'STR003', 1, 'VEG0029', 50, 'KG', 1000, 'INR', 1, '2019-10-23 10:01:49', 3, '0000-01-01 00:00:00', NULL),
(165, '2123213', '2019-10-23', 'STR003', 1, 'RCGR0001', 50, 'KG', 1500, 'INR', 1, '2019-10-23 10:01:49', 3, '0000-01-01 00:00:00', NULL),
(166, '2123213', '2019-10-23', 'STR003', 1, 'VEG0026', 20, 'KG', 1200, 'INR', 1, '2019-10-23 10:01:49', 3, '0000-01-01 00:00:00', NULL),
(167, '34234', '2019-10-23', 'STR003', 4, 'RCGR0001', 50, 'KG', 1200, 'INR', 1, '2019-10-23 10:03:25', 3, '0000-01-01 00:00:00', NULL),
(168, '5445344', '2019-10-23', 'STR003', 4, 'VEG0026', 30, 'KG', 800, 'INR', 1, '2019-10-23 10:04:10', 3, '0000-01-01 00:00:00', NULL),
(169, '234111', '2019-10-23', 'STR003', 4, 'HERB0005', 10, 'KG', 75, 'INR', 1, '2019-10-23 10:09:44', 3, '0000-01-01 00:00:00', NULL),
(170, '100010190190', '2019-10-29', 'STR001', 1, 'FLDR0001', 100, 'L', 2000, 'INR', 1, '2019-10-29 04:41:31', 3, '0000-01-01 00:00:00', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `sales_details`
--
CREATE TABLE `sales_details` (
`sales_id` int(11) NOT NULL,
`order_number` varchar(55) NOT NULL,
`order_date` varchar(20) NOT NULL,
`sales_product_id` int(11) NOT NULL,
`unit_price` float NOT NULL,
`quantity` int(11) NOT NULL,
`amount` float NOT NULL,
`currency` varchar(10) NOT NULL DEFAULT 'INR',
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `sales_product_name`
--
CREATE TABLE `sales_product_name` (
`sales_product_id` int(11) NOT NULL,
`sales_product_name` varchar(100) NOT NULL,
`sales_product_type` varchar(100) DEFAULT NULL,
`min_quantity` int(11) NOT NULL DEFAULT '0',
`image` varchar(50) NOT NULL DEFAULT 's_product.jpg',
`price` int(11) NOT NULL COMMENT 'Price per unit',
`currency` varchar(10) NOT NULL DEFAULT 'INR',
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL,
`modified_on` datetime NOT NULL DEFAULT '0000-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
`modified_by` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `sales_product_name`
--
INSERT INTO `sales_product_name` (`sales_product_id`, `sales_product_name`, `sales_product_type`, `min_quantity`, `image`, `price`, `currency`, `status`, `created_on`, `created_by`, `modified_on`, `modified_by`) VALUES
(1, '1L Water Bottle', 'Mineral', 10, '5db17ceb1cfdb.jpg', 25, 'INR', 1, '2019-10-24 10:23:28', 1, '2019-10-24 17:17:18', NULL),
(2, 'Veg Fried Rice', 'Briyani', 10, '5db17e7326680.jpg', 100, 'INR', 1, '2019-10-24 10:35:31', 1, '2019-10-24 17:17:52', NULL),
(3, 'Pop Corn', 'Corn', 10, '5db17eeadafa2.jpg', 50, 'INR', 1, '2019-10-24 10:37:30', 1, '2019-10-24 17:18:01', NULL),
(4, 'Egg Fried Rice', 'Fried Rice', 10, '5db1854b52f2b.jpg', 55, 'INR', 1, '2019-10-24 11:04:43', 1, '2019-10-24 17:18:04', NULL),
(5, 'Mushroom Briyani', 'Chettinad', 10, '5db18a07516b5.jpg', 110, 'INR', 1, '2019-10-24 11:24:55', 1, '2019-10-24 17:20:18', NULL),
(6, 'Potato Flavour', 'Lays', 10, '5db7cdc07ff91.jpg', 10, 'INR', 1, '2019-10-29 05:27:28', 8, '0000-01-01 00:00:00', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `stall_details`
--
CREATE TABLE `stall_details` (
`stall_id` int(11) NOT NULL,
`store_code` varchar(50) NOT NULL,
`stall_code` varchar(50) NOT NULL,
`stall_name` varchar(100) NOT NULL,
`stall_phone` varchar(50) NOT NULL COMMENT 'One or more phone / mobile numbers ',
`status` tinyint(4) DEFAULT '1',
`created_on` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL,
`modified_on` datetime NOT NULL DEFAULT '0000-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
`modified_by` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `stall_details`
--
INSERT INTO `stall_details` (`stall_id`, `store_code`, `stall_code`, `stall_name`, `stall_phone`, `status`, `created_on`, `created_by`, `modified_on`, `modified_by`) VALUES
(39, 'STR001', 'STR001STL003', 'Stall A3', '88888888888', 1, '2019-10-19 02:08:08', 7, '2019-10-19 16:40:38', 1),
(36, 'STR003', 'STR003STL002', 'Stall C2', '88888888888', 1, '2019-10-17 01:49:09', 1, '2019-10-21 15:46:06', 1),
(35, 'STR003', 'STR003STL003', 'Stall C3', '9999999999', 1, '2019-10-10 06:06:02', 3, '2019-10-19 16:41:12', 1),
(34, 'STR002', 'STR002STL002', 'Stall B2', '9999999999', 1, '2019-10-10 06:05:11', 3, '2019-10-19 16:40:56', 1),
(33, 'STR001', 'STR001STL001', 'Stall A1', '9999999999', 1, '2019-10-10 06:03:29', 3, '2019-10-23 17:08:45', 3),
(38, 'STR001', 'STR001STL002', 'Stall A2', '88888888888', 1, '2019-10-19 02:08:00', 7, '2019-10-21 12:30:24', 3),
(37, 'STR004', 'STR004STL001', 'Stall D1', '9999999999', 1, '2019-10-17 22:59:38', 1, '2019-10-19 16:41:20', 1),
(40, 'STR001', 'STR001STL004', 'Stall A4', '88888888888', 1, '2019-10-19 03:53:31', 7, '2019-10-21 12:48:50', 3);
-- --------------------------------------------------------
--
-- Table structure for table `stock_of_sales_product`
--
CREATE TABLE `stock_of_sales_product` (
`sales_stock_id` int(11) NOT NULL,
`store_code` varchar(25) NOT NULL,
`stall_code` varchar(25) NOT NULL,
`sales_product_id` int(11) NOT NULL,
`quantity` double NOT NULL DEFAULT '0' COMMENT 'Available Quantity',
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL,
`modified_on` datetime NOT NULL DEFAULT '0000-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP COMMENT 'Last modified on',
`modified_by` int(11) DEFAULT NULL COMMENT 'Last modified by'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `stock_of_sales_product`
--
INSERT INTO `stock_of_sales_product` (`sales_stock_id`, `store_code`, `stall_code`, `sales_product_id`, `quantity`, `status`, `created_on`, `created_by`, `modified_on`, `modified_by`) VALUES
(1, 'STR003', 'STR003STL002', 2, 20, 1, '2019-10-23 10:38:27', 3, '2019-10-29 12:17:44', NULL),
(2, 'STR003', 'STR003STL003', 11, 0, 1, '2019-10-23 10:38:44', 3, '2019-10-24 09:49:01', NULL),
(23, 'STR001', 'STR001STL001', 3, 200, 1, '2019-10-29 05:28:11', 3, '2019-10-29 10:58:23', NULL),
(24, 'STR001', 'STR001STL001', 4, 385, 1, '2019-10-29 05:28:11', 3, '2019-10-29 10:58:23', NULL),
(25, 'STR001', 'STR001STL001', 5, -6, 1, '2019-10-29 05:28:11', 3, '2019-10-31 10:30:01', 5),
(21, 'STR001', 'STR001STL001', 1, 50, 1, '2019-10-29 05:28:11', 3, '2019-10-29 10:58:23', NULL),
(22, 'STR001', 'STR001STL001', 2, 385, 1, '2019-10-29 05:28:11', 3, '2019-10-29 10:58:23', NULL),
(26, 'STR001', 'STR001STL001', 6, 0, 1, '2019-10-29 05:28:11', 3, '2019-10-29 13:22:17', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `stock_of_stall_product`
--
CREATE TABLE `stock_of_stall_product` (
`stall_stock_id` int(11) NOT NULL,
`store_code` varchar(25) NOT NULL,
`stall_code` varchar(25) NOT NULL,
`product_code` varchar(25) NOT NULL,
`quantity` double NOT NULL COMMENT 'Available Stock',
`uom` varchar(10) NOT NULL COMMENT 'Unit of Measurement',
`conversed_quantity` double NOT NULL DEFAULT '0' COMMENT 'Multiple of this quantity with conversion value from Products',
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL COMMENT 'Purchased by',
`modified_on` datetime NOT NULL DEFAULT '0000-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP COMMENT 'Last modified on',
`modified_by` int(11) DEFAULT NULL COMMENT 'Last modified by'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `stock_of_stall_product`
--
INSERT INTO `stock_of_stall_product` (`stall_stock_id`, `store_code`, `stall_code`, `product_code`, `quantity`, `uom`, `conversed_quantity`, `status`, `created_on`, `created_by`, `modified_on`, `modified_by`) VALUES
(6, 'STR001', 'STR001STL001', 'VEG005', 18, 'NOs', 0, 1, '2019-10-14 09:51:52', 3, '2019-10-23 18:05:20', 3),
(4, 'STR001', 'STR001STL001', 'RICE01', 77, 'KG', 0, 1, '2019-10-11 04:36:40', 3, '2019-10-23 16:18:12', 3),
(20, 'STR001', 'STR001STL001', 'VEG0040', 20, 'NOs', 0, 1, '2019-10-18 10:35:02', 3, '2019-10-23 18:05:20', 3),
(11, 'STR001', 'STR001STL001', 'SUGAR001', 26, 'NOs', 0, 1, '2019-10-15 12:33:47', 4, '2019-10-23 18:05:20', 3),
(14, 'STR001', 'STR001STL001', 'LAYS01', 1, 'NOs', 0, 1, '2019-10-15 12:44:55', 4, '2019-10-23 18:05:20', 3),
(19, 'STR003', 'STR003STL003', 'RICE02', 23, 'KG', 0, 1, '2019-10-16 10:47:40', 3, '2019-10-19 17:04:45', 3),
(18, 'STR003', 'STR003STL003', 'CORN01', 15, 'NOs', 0, 1, '2019-10-16 10:47:40', 3, '2019-10-23 18:05:20', 3),
(23, 'STR003', 'STR003STL002', 'SUGAR001', 10, 'NOs', 0, 1, '2019-10-23 09:03:37', 3, '2019-10-23 18:05:20', NULL),
(24, 'STR003', 'STR003STL002', 'LAYS02', 5, 'NOs', 0, 1, '2019-10-23 09:03:37', 3, '2019-10-23 18:05:20', NULL),
(25, 'STR003', 'STR003STL002', 'HERB0004', 2, 'KG', 0, 1, '2019-10-23 10:06:02', 3, '0000-01-01 00:00:00', NULL),
(26, 'STR003', 'STR003STL002', 'ODEN0004', 2, 'L', 0, 1, '2019-10-23 10:06:02', 3, '0000-01-01 00:00:00', NULL),
(27, 'STR003', 'STR003STL002', 'ODEN0007', 2, 'L', 0, 1, '2019-10-23 10:06:02', 3, '0000-01-01 00:00:00', NULL),
(28, 'STR003', 'STR003STL002', 'HERB0001', 2, 'KG', 0, 1, '2019-10-23 10:06:02', 3, '0000-01-01 00:00:00', NULL),
(29, 'STR003', 'STR003STL002', 'HERB0007', 2, 'KG', 0, 1, '2019-10-23 10:06:02', 3, '0000-01-01 00:00:00', NULL),
(30, 'STR003', 'STR003STL002', 'VEG0043', 5, 'KG', 0, 1, '2019-10-23 10:06:02', 3, '0000-01-01 00:00:00', NULL),
(31, 'STR003', 'STR003STL002', 'VEG0029', 5, 'KG', 0, 1, '2019-10-23 10:06:02', 3, '0000-01-01 00:00:00', NULL),
(32, 'STR003', 'STR003STL002', 'RCGR0001', 10, 'KG', 0, 1, '2019-10-23 10:06:02', 3, '0000-01-01 00:00:00', NULL),
(33, 'STR003', 'STR003STL002', 'VEG0026', 10, 'KG', 0, 1, '2019-10-23 10:06:02', 3, '0000-01-01 00:00:00', NULL),
(34, 'STR003', 'STR003STL002', 'HERB0005', 2, 'KG', 0, 1, '2019-10-23 10:10:05', 3, '0000-01-01 00:00:00', NULL),
(35, 'STR003', 'STR003STL003', 'HERB0005', 2, 'KG', 0, 1, '2019-10-23 10:10:33', 3, '0000-01-01 00:00:00', NULL),
(37, 'STR001', 'STR001STL001', 'FLDR0001', 50, 'L', 0, 1, '2019-10-29 04:41:53', 3, '0000-01-01 00:00:00', NULL),
(36, 'STR001', 'STR001STL001', 'VEG001', 20, 'KG', 0, 1, '2019-10-23 10:49:03', 3, '2019-10-23 16:19:04', 3);
-- --------------------------------------------------------
--
-- Table structure for table `stock_of_store_product`
--
CREATE TABLE `stock_of_store_product` (
`store_stock_id` int(11) NOT NULL,
`store_code` varchar(25) NOT NULL,
`product_code` varchar(25) NOT NULL,
`quantity` double NOT NULL DEFAULT '0' COMMENT 'Available Stock',
`uom` varchar(10) NOT NULL COMMENT 'Unit of Measurement',
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL COMMENT 'Purchased by',
`modified_on` datetime NOT NULL DEFAULT '0000-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP COMMENT 'Last modified on',
`modified_by` int(11) DEFAULT NULL COMMENT 'Last modified by'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `stock_of_store_product`
--
INSERT INTO `stock_of_store_product` (`store_stock_id`, `store_code`, `product_code`, `quantity`, `uom`, `status`, `created_on`, `created_by`, `modified_on`, `modified_by`) VALUES
(1, 'STR001', 'RICE01', 260, 'KG', 1, '2019-10-03 07:56:29', 3, '2019-10-23 16:18:12', 3),
(4, 'STR001', 'CORN01', 125, 'KG', 1, '2019-10-08 13:16:16', 3, '2019-10-22 10:17:38', 3),
(3, 'STR001', 'GREEN001010', 390, 'NOs', 1, '2019-10-08 13:01:57', 3, '2019-10-23 18:05:35', NULL),
(5, 'STR002', 'RICE01', 150, 'KG', 1, '2019-10-09 05:37:38', 3, '2019-10-19 17:08:11', NULL),
(36, 'STR003', 'HERB0004', 8, 'KG', 1, '2019-10-23 10:01:49', 3, '2019-10-23 15:36:02', 3),
(9, 'STR001', 'SUGAR001', 165, 'NOs', 1, '2019-10-09 09:22:47', 3, '2019-10-23 18:05:35', 3),
(10, 'STR001', 'RICE02', 20, 'KG', 1, '2019-10-10 05:04:33', 3, '2019-10-19 17:08:11', NULL),
(11, 'STR001', 'RICE03', 30, 'KG', 1, '2019-10-10 05:07:32', 3, '2019-10-19 17:08:11', NULL),
(12, 'STR001', 'VEG001', 40, 'KG', 1, '2019-10-10 05:12:28', 3, '2019-10-23 16:19:03', 3),
(13, 'STR001', 'RICE05', 100, 'KG', 1, '2019-10-10 05:26:07', 3, '2019-10-19 17:08:11', NULL),
(14, 'STR001', 'VEG005', 10, 'NOs', 1, '2019-10-10 05:30:26', 3, '2019-10-23 18:05:35', 3),
(15, 'STR001', 'RICE04', 20, 'KG', 1, '2019-10-10 06:24:34', 3, '2019-10-19 17:08:11', NULL),
(33, 'STR003', 'SUGAR001', 90, 'NOs', 1, '2019-10-17 05:38:55', 3, '2019-10-23 18:05:35', 3),
(34, 'STR003', 'ODEN0004', 8, 'L', 1, '2019-10-23 10:01:49', 3, '2019-10-23 15:36:02', 3),
(31, 'STR003', 'CORN01', 35, 'NOs', 1, '2019-10-16 10:27:15', 3, '2019-10-23 18:05:35', 3),
(30, 'STR003', 'RICE02', 65, 'KG', 1, '2019-10-16 10:27:15', 3, '2019-10-23 14:33:37', 3),
(29, 'STR003', 'LAYS02', 95, 'NOs', 1, '2019-10-16 10:26:11', 3, '2019-10-23 18:05:35', 3),
(35, 'STR003', 'ODEN0007', 8, 'L', 1, '2019-10-23 10:01:49', 3, '2019-10-23 15:36:02', 3),
(28, 'STR003', 'LAYS01', 97, 'NOs', 1, '2019-10-16 10:26:10', 3, '2019-10-23 18:05:35', NULL),
(27, 'STR003', 'RICE03', 100, 'KG', 1, '2019-10-16 10:26:10', 3, '2019-10-19 17:08:11', NULL),
(26, 'STR003', 'RICE01', 151, 'KG', 1, '2019-10-16 10:19:19', 3, '2019-10-19 17:08:11', NULL),
(37, 'STR003', 'HERB0001', 8, 'KG', 1, '2019-10-23 10:01:49', 3, '2019-10-23 15:36:02', 3),
(38, 'STR003', 'HERB0007', 8, 'KG', 1, '2019-10-23 10:01:49', 3, '2019-10-23 15:36:02', 3),
(39, 'STR003', 'VEG0043', 15, 'KG', 1, '2019-10-23 10:01:49', 3, '2019-10-23 15:36:02', 3),
(40, 'STR003', 'VEG0029', 45, 'KG', 1, '2019-10-23 10:01:49', 3, '2019-10-23 15:36:02', 3),
(41, 'STR003', 'RCGR0001', 90, 'KG', 1, '2019-10-23 10:01:49', 3, '2019-10-23 15:36:02', 3),
(42, 'STR003', 'VEG0026', 40, 'KG', 1, '2019-10-23 10:01:49', 3, '2019-10-23 15:36:02', 3),
(43, 'STR003', 'HERB0005', 6, 'KG', 1, '2019-10-23 10:09:44', 3, '2019-10-23 15:40:33', 3),
(44, 'STR001', 'FLDR0001', 50, 'L', 1, '2019-10-29 04:41:31', 3, '2019-10-29 10:11:53', 3);
-- --------------------------------------------------------
--
-- Table structure for table `store_details`
--
CREATE TABLE `store_details` (
`store_id` int(11) NOT NULL,
`store_name` varchar(100) NOT NULL,
`store_code` varchar(50) NOT NULL,
`store_loc` varchar(100) NOT NULL,
`store_phone` varchar(50) NOT NULL COMMENT 'One or more phone / mobile numbers',
`store_email` varchar(255) NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL,
`modified_on` datetime NOT NULL DEFAULT '0000-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
`modified_by` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `store_details`
--
INSERT INTO `store_details` (`store_id`, `store_name`, `store_code`, `store_loc`, `store_phone`, `store_email`, `status`, `created_on`, `created_by`, `modified_on`, `modified_by`) VALUES
(1, 'Store A', 'STR001', 'Erode', '7777777777', '<EMAIL>', 1, '2019-07-04 06:18:44', 1, '2019-10-19 16:27:14', 8),
(2, 'Store B', 'STR002', 'Covai', '8878787998', '<EMAIL>', 1, '2019-07-05 04:15:29', 1, '2019-10-19 16:27:14', 8),
(3, 'Store C', 'STR003', 'Salem', '8884074278', '<EMAIL>', 1, '2019-07-11 22:53:02', 1, '2019-10-21 15:46:02', 8),
(4, 'Store D', 'STR004', 'Chennai', '8248182544', '<EMAIL>', 1, '2019-10-15 07:05:39', 8, '2019-10-19 16:27:14', 8),
(5, 'Store E', 'STR005', 'Erode', '9999999999', '<EMAIL>', 1, '2019-10-19 06:59:40', 7, '2019-10-19 16:21:34', 1),
(6, 'Store F', 'STR006', 'Namakkal', '8888888888', '<EMAIL>', 1, '2019-10-19 07:06:16', 7, '2019-10-19 16:22:15', 1);
-- --------------------------------------------------------
--
-- Table structure for table `supplier_details`
--
CREATE TABLE `supplier_details` (
`supplier_id` int(11) NOT NULL,
`supplier_name` varchar(255) NOT NULL,
`supplier_mobile` varchar(20) NOT NULL,
`supplier_address` text NOT NULL,
`supplier_city` varchar(55) NOT NULL,
`supplier_gst` varchar(55) NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '0',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` varchar(55) NOT NULL,
`modified_on` datetime NOT NULL DEFAULT '0000-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
`modified_by` varchar(55) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `supplier_details`
--
INSERT INTO `supplier_details` (`supplier_id`, `supplier_name`, `supplier_mobile`, `supplier_address`, `supplier_city`, `supplier_gst`, `status`, `created_on`, `created_by`, `modified_on`, `modified_by`) VALUES
(1, '<NAME>', '9798589500', '<NAME>', 'Salem', '68449899', 1, '2019-10-04 06:03:22', '', '2019-10-19 15:59:15', '7'),
(2, '<NAME>', '8884074278', '<EMAIL>', 'Salem', '1290490', 1, '2019-10-04 06:03:30', '', '2019-10-19 15:21:10', '8'),
(3, 'Moorthy', '8989898900', 'Erode', 'Coimbatore', '2019010', 1, '2019-10-04 06:03:33', '', '0000-01-01 00:00:00', '8'),
(4, 'RAMS', '8884074278', 'Erode', 'Salem', '2019014', 1, '2019-10-04 06:03:36', '8', '2019-10-21 12:53:41', '8'),
(5, 'Ramesh', '8884074278', 'Idappadi', 'Avinashi', '201901256', 1, '2019-10-04 06:03:39', '8', '0000-01-01 00:00:00', '8'),
(6, 'Mohan', '8884074278', 'Erode', 'Erode', '20190150', 1, '2019-10-04 06:03:43', '8', '0000-01-01 00:00:00', '8'),
(7, 'Arumugam', '77847484749', 'Bavani', 'Coimbatore East', '2894048', 1, '2019-10-04 11:16:35', '8', '2019-10-19 15:21:41', '8'),
(10, 'KANNAN DEPARTMENT ', '8526964132', 'Athani', 'Erode', '33333', 1, '2019-10-19 09:52:49', '7', '0000-01-01 00:00:00', ''),
(11, 'KANNAN DEPARTMENff', '8526964132', 'Athani', 'Erode', 'fff', 1, '2019-10-19 10:26:03', '7', '0000-01-01 00:00:00', '');
-- --------------------------------------------------------
--
-- Table structure for table `ticket_amnt`
--
CREATE TABLE `ticket_amnt` (
`ticket_amnt_id` int(11) NOT NULL,
`type` varchar(55) NOT NULL,
`audult` float NOT NULL,
`child` float NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL,
`modified_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `ticket_amnt`
--
INSERT INTO `ticket_amnt` (`ticket_amnt_id`, `type`, `audult`, `child`, `status`, `created_on`, `created_by`, `modified_on`) VALUES
(1, 'themepark', 600, 500, 1, '2019-09-25 11:24:57', 1, '2019-10-01 05:04:01'),
(2, 'locker', 80, 120, 1, '2019-09-25 11:24:57', 1, '2019-10-01 05:04:01');
-- --------------------------------------------------------
--
-- Table structure for table `ticket_entry`
--
CREATE TABLE `ticket_entry` (
`ticket_id` int(11) NOT NULL,
`bill_id` varchar(255) NOT NULL,
`print_date` date NOT NULL,
`ticket_type` varchar(255) NOT NULL,
`adult` int(11) NOT NULL,
`child` int(11) NOT NULL,
`adult_amnt` float NOT NULL,
`child_amnt` float NOT NULL,
`offer_amnt` float NOT NULL,
`total_amnt` float NOT NULL,
`payment_mode` varchar(255) NOT NULL,
`offer_usr_name` varchar(255) NOT NULL,
`offeer_position` varchar(255) NOT NULL,
`remanded_by` varchar(255) NOT NULL,
`modified_by` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`status` tinyint(4) NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `ticket_entry`
--
INSERT INTO `ticket_entry` (`ticket_id`, `bill_id`, `print_date`, `ticket_type`, `adult`, `child`, `adult_amnt`, `child_amnt`, `offer_amnt`, `total_amnt`, `payment_mode`, `offer_usr_name`, `offeer_position`, `remanded_by`, `modified_by`, `created_on`, `status`) VALUES
(1, 'MAHTHEME0001', '2019-10-08', '5D', 1, 1, 570, 475, 55, 1045, 'card', '', '', '', '2019-10-08 06:05:37', '2019-10-08 06:05:37', 1),
(2, 'MAHTHEME0002', '2019-10-09', '5D', 10, 10, 570, 475, 55, 10450, 'cash', '', '', '', '2019-10-09 04:09:34', '2019-10-09 04:09:34', 1),
(3, 'MAHTHEME0003', '2019-10-19', '5D', 0, 0, 570, 475, 55, 0, 'cash', '', '', '', '2019-10-19 12:17:12', '2019-10-19 12:17:12', 1),
(4, 'MAHTHEME0004', '2019-11-01', 'M', 10, 2, 600, 500, 0, 7000, 'cash', '', '', '', '2019-11-01 07:07:51', '2019-11-01 07:07:51', 1);
-- --------------------------------------------------------
--
-- Table structure for table `uom`
--
CREATE TABLE `uom` (
`uom_id` int(11) NOT NULL,
`uom` varchar(10) NOT NULL,
`description` varchar(255) DEFAULT NULL,
`status` tinyint(4) NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `uom`
--
INSERT INTO `uom` (`uom_id`, `uom`, `description`, `status`) VALUES
(1, 'KG', 'Kilogram', 1),
(2, 'L', 'Litter', 1),
(5, 'NOs', 'Numbers', 1);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`user_id` int(11) NOT NULL,
`name` varchar(50) NOT NULL,
`user_name` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`user_type` varchar(255) NOT NULL,
`role` varchar(50) NOT NULL,
`access_type` varchar(250) DEFAULT NULL COMMENT 'canteen, locker, theme_park',
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL,
`modified_on` datetime NOT NULL DEFAULT '0000-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
`modified_by` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`user_id`, `name`, `user_name`, `password`, `user_type`, `role`, `access_type`, `status`, `created_on`, `created_by`, `modified_on`, `modified_by`) VALUES
(1, 'Ramachandiran', 'ram', '<PASSWORD>', 'root_admin', 'developer', 'canteen', 1, '2019-07-04 06:41:57', 1, '2019-10-31 15:38:18', NULL),
(2, 'Ragunathan', 'admin', '21232<PASSWORD>', 'super_admin', 'admin', 'canteen', 1, '2019-07-04 11:48:44', 1, '2019-10-31 15:38:18', NULL),
(3, 'Store Manager1', 'store_manager1', '1d0258c2440a8d19e716292b231e3190', 'store', 'manager', 'canteen', 1, '2019-07-05 09:45:29', 1, '2019-10-31 15:38:18', NULL),
(4, 'Store Manager2', 'store_manager2', '1d0258c2440a8d19e716292b231e3190', 'store', 'manager', 'canteen', 1, '2019-07-04 06:41:57', 1, '2019-10-31 15:38:18', NULL),
(5, 'Stall Operator1', 'stall_operator1', '4b583376b2767b923c3e1da60d10de59', 'stall', 'operator', 'canteen', 1, '2019-07-11 11:53:11', 1, '2019-10-31 15:38:18', NULL),
(6, 'Stall Operator2', 'stall_operator2', '4b583376b2767b923c3e1da60d10de59', 'stall', 'operator', 'canteen', 1, '2019-07-11 12:19:59', 1, '2019-10-31 15:38:18', NULL),
(7, 'Manikandan', 'mani', '5e8edd851d2fdfbd7415232c67367cc3', 'root_admin', 'developer', 'canteen', 1, '2019-07-04 06:41:57', 1, '2019-10-31 15:38:18', NULL),
(8, 'Suresh', 'suresh', '5e8edd851d2fdfbd7415232c67367cc3', 'root_admin', 'developer', 'canteen', 1, '2019-07-04 06:41:57', 1, '2019-10-31 15:38:18', NULL),
(9, 'Ragunathan', 'ragu', '5e8edd851d2fdfbd7415232c67367cc3', 'root_admin', 'developer', 'canteen', 1, '2019-07-04 06:41:57', 1, '2019-10-31 15:38:18', NULL),
(10, 'Chandru', 'locker_operator1', '4b583376b2767b923c3e1da60d10de59', 'stall', 'operator', 'locker', 1, '2019-10-31 11:44:17', 1, '2019-11-01 11:37:48', NULL),
(11, 'Dharanishwar', 'park_operator1', '4b583376b2767b923c3e1da60d10de59', 'stall', 'operator', 'canteen,locker,theme_park', 1, '2019-10-31 11:45:37', 1, '2019-11-01 12:38:21', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `user_type`
--
CREATE TABLE `user_type` (
`user_type_id` int(11) NOT NULL,
`type` varchar(80) NOT NULL,
`role` varchar(25) NOT NULL,
`description` varchar(150) DEFAULT NULL,
`status` tinyint(4) NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `user_type`
--
INSERT INTO `user_type` (`user_type_id`, `type`, `role`, `description`, `status`) VALUES
(1, 'root_admin', 'developer', 'for developer', 1),
(2, 'super_admin', 'admin', 'for app administrator', 1),
(3, 'store', 'manager', 'for store managers', 1),
(4, 'stall', 'operator', 'for store operators', 1);
-- --------------------------------------------------------
--
-- Table structure for table `wastage`
--
CREATE TABLE `wastage` (
`wastage_id` int(11) NOT NULL,
`store_code` varchar(25) NOT NULL,
`stall_code` varchar(25) NOT NULL,
`product_code` varchar(50) NOT NULL,
`quantity_of_waste` double NOT NULL,
`uom` varchar(10) NOT NULL,
`approve_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=Pending, 1=Accepted, 2=Rejected',
`approved_by` int(11) DEFAULT NULL COMMENT 'Approved user ID',
`description` varchar(250) DEFAULT NULL,
`status` tinyint(4) NOT NULL DEFAULT '1',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL COMMENT 'Wastage entered user ID',
`modified_on` datetime NOT NULL DEFAULT '0000-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
`modified_by` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `wastage`
--
INSERT INTO `wastage` (`wastage_id`, `store_code`, `stall_code`, `product_code`, `quantity_of_waste`, `uom`, `approve_status`, `approved_by`, `description`, `status`, `created_on`, `created_by`, `modified_on`, `modified_by`) VALUES
(1, 'STR003', 'STR003STL003', 'RICE02', 2, 'KG', 0, NULL, NULL, 1, '2019-10-16 11:33:55', 5, '2019-10-23 10:49:20', 5),
(2, 'STR003', 'STR003STL002', 'RICE02', 1.5, 'KG', 0, NULL, NULL, 1, '2019-10-18 11:10:44', 5, '2019-10-23 10:52:18', 3),
(3, 'STR001', 'STR001STL001', 'CORN01', 4, 'NOs', 0, NULL, NULL, 1, '2019-10-16 06:41:52', 5, '2019-10-23 18:05:50', 3),
(4, 'STR001', 'STR001STL001', 'LAYS01', 2, 'NOs', 0, 3, NULL, 1, '2019-10-16 04:40:37', 5, '2019-10-23 18:05:50', 5),
(5, 'STR001', 'STR001STL001', 'VEG005', 2, 'NOs', 0, 3, NULL, 1, '2019-10-16 06:41:52', 5, '2019-10-23 18:05:50', 5),
(6, 'STR001', 'STR001STL001', 'SUGAR001', 7, 'NOs', 0, 3, NULL, 1, '2019-10-16 04:40:09', 5, '2019-10-23 18:05:50', 5),
(7, 'STR003', 'STR003STL003', 'RICE01', 2, 'KG', 0, NULL, NULL, 1, '2019-10-16 11:31:52', 5, '2019-10-23 10:52:11', 5),
(8, 'STR001', 'STR001STL001', 'LAYS01', 4, 'NOs', 0, NULL, NULL, 1, '2019-10-15 11:27:58', 5, '2019-10-23 18:05:50', 3),
(9, 'STR001', 'STR001STL001', 'RICE01', 6, 'KG', 0, NULL, NULL, 1, '2019-10-15 11:19:06', 5, '2019-10-23 10:52:04', 5),
(10, 'STR001', 'STR001STL001', 'CORN01', 4, 'KG', 0, NULL, NULL, 1, '2019-10-15 11:19:06', 5, '2019-10-23 10:51:46', 3),
(11, 'STR003', 'STR003STL002', 'CORN01', 1, 'NOs', 0, NULL, NULL, 1, '2019-10-18 11:10:44', 5, '2019-10-23 18:05:50', 3),
(12, 'STR001', 'STR001STL001', 'CORN01', 10, 'KG', 0, NULL, NULL, 1, '2019-10-19 12:09:16', 5, '2019-10-23 10:52:25', 3),
(13, 'STR003', 'STR003STL002', 'LAYS02', 1, 'NOs', 0, NULL, NULL, 1, '2019-10-24 05:08:26', 5, '0000-01-01 00:00:00', NULL);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `ingredient_details`
--
ALTER TABLE `ingredient_details`
ADD PRIMARY KEY (`ingredients_id`);
--
-- Indexes for table `invoice_details`
--
ALTER TABLE `invoice_details`
ADD PRIMARY KEY (`invoice_id`),
ADD UNIQUE KEY `invoice_number` (`invoice_number`);
--
-- Indexes for table `locker`
--
ALTER TABLE `locker`
ADD PRIMARY KEY (`locker_id`);
--
-- Indexes for table `menu_details`
--
ALTER TABLE `menu_details`
ADD PRIMARY KEY (`menu_id`);
--
-- Indexes for table `menu_preference`
--
ALTER TABLE `menu_preference`
ADD PRIMARY KEY (`preference_id`);
--
-- Indexes for table `movement_tracker`
--
ALTER TABLE `movement_tracker`
ADD PRIMARY KEY (`movement_id`) USING BTREE;
--
-- Indexes for table `payment_details`
--
ALTER TABLE `payment_details`
ADD PRIMARY KEY (`payment_id`);
--
-- Indexes for table `product_category`
--
ALTER TABLE `product_category`
ADD PRIMARY KEY (`category_id`),
ADD UNIQUE KEY `short_name` (`short_name`),
ADD UNIQUE KEY `product_category` (`product_category`);
--
-- Indexes for table `product_details`
--
ALTER TABLE `product_details`
ADD PRIMARY KEY (`product_id`),
ADD UNIQUE KEY `product_code` (`product_code`);
--
-- Indexes for table `purchase_details`
--
ALTER TABLE `purchase_details`
ADD PRIMARY KEY (`purchase_id`);
--
-- Indexes for table `sales_details`
--
ALTER TABLE `sales_details`
ADD PRIMARY KEY (`sales_id`);
--
-- Indexes for table `sales_product_name`
--
ALTER TABLE `sales_product_name`
ADD PRIMARY KEY (`sales_product_id`);
--
-- Indexes for table `stall_details`
--
ALTER TABLE `stall_details`
ADD PRIMARY KEY (`stall_id`),
ADD UNIQUE KEY `stall_code` (`stall_code`);
--
-- Indexes for table `stock_of_sales_product`
--
ALTER TABLE `stock_of_sales_product`
ADD PRIMARY KEY (`sales_stock_id`);
--
-- Indexes for table `stock_of_stall_product`
--
ALTER TABLE `stock_of_stall_product`
ADD PRIMARY KEY (`stall_stock_id`);
--
-- Indexes for table `stock_of_store_product`
--
ALTER TABLE `stock_of_store_product`
ADD PRIMARY KEY (`store_stock_id`);
--
-- Indexes for table `store_details`
--
ALTER TABLE `store_details`
ADD PRIMARY KEY (`store_id`),
ADD UNIQUE KEY `store_code` (`store_code`);
--
-- Indexes for table `supplier_details`
--
ALTER TABLE `supplier_details`
ADD PRIMARY KEY (`supplier_id`);
--
-- Indexes for table `ticket_amnt`
--
ALTER TABLE `ticket_amnt`
ADD PRIMARY KEY (`ticket_amnt_id`);
--
-- Indexes for table `ticket_entry`
--
ALTER TABLE `ticket_entry`
ADD PRIMARY KEY (`ticket_id`),
ADD UNIQUE KEY `bill_id` (`bill_id`);
--
-- Indexes for table `uom`
--
ALTER TABLE `uom`
ADD PRIMARY KEY (`uom_id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`user_id`),
ADD UNIQUE KEY `user_name` (`user_name`);
--
-- Indexes for table `user_type`
--
ALTER TABLE `user_type`
ADD PRIMARY KEY (`user_type_id`);
--
-- Indexes for table `wastage`
--
ALTER TABLE `wastage`
ADD PRIMARY KEY (`wastage_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `ingredient_details`
--
ALTER TABLE `ingredient_details`
MODIFY `ingredients_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=76;
--
-- AUTO_INCREMENT for table `invoice_details`
--
ALTER TABLE `invoice_details`
MODIFY `invoice_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=62;
--
-- AUTO_INCREMENT for table `locker`
--
ALTER TABLE `locker`
MODIFY `locker_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;
--
-- AUTO_INCREMENT for table `menu_details`
--
ALTER TABLE `menu_details`
MODIFY `menu_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=54;
--
-- AUTO_INCREMENT for table `menu_preference`
--
ALTER TABLE `menu_preference`
MODIFY `preference_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `movement_tracker`
--
ALTER TABLE `movement_tracker`
MODIFY `movement_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=82;
--
-- AUTO_INCREMENT for table `payment_details`
--
ALTER TABLE `payment_details`
MODIFY `payment_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=56;
--
-- AUTO_INCREMENT for table `product_category`
--
ALTER TABLE `product_category`
MODIFY `category_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT for table `product_details`
--
ALTER TABLE `product_details`
MODIFY `product_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=313;
--
-- AUTO_INCREMENT for table `purchase_details`
--
ALTER TABLE `purchase_details`
MODIFY `purchase_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=171;
--
-- AUTO_INCREMENT for table `sales_details`
--
ALTER TABLE `sales_details`
MODIFY `sales_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=68;
--
-- AUTO_INCREMENT for table `sales_product_name`
--
ALTER TABLE `sales_product_name`
MODIFY `sales_product_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `stall_details`
--
ALTER TABLE `stall_details`
MODIFY `stall_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=41;
--
-- AUTO_INCREMENT for table `stock_of_sales_product`
--
ALTER TABLE `stock_of_sales_product`
MODIFY `sales_stock_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;
--
-- AUTO_INCREMENT for table `stock_of_stall_product`
--
ALTER TABLE `stock_of_stall_product`
MODIFY `stall_stock_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=38;
--
-- AUTO_INCREMENT for table `stock_of_store_product`
--
ALTER TABLE `stock_of_store_product`
MODIFY `store_stock_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45;
--
-- AUTO_INCREMENT for table `store_details`
--
ALTER TABLE `store_details`
MODIFY `store_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `supplier_details`
--
ALTER TABLE `supplier_details`
MODIFY `supplier_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `ticket_amnt`
--
ALTER TABLE `ticket_amnt`
MODIFY `ticket_amnt_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `ticket_entry`
--
ALTER TABLE `ticket_entry`
MODIFY `ticket_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `uom`
--
ALTER TABLE `uom`
MODIFY `uom_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `user_type`
--
ALTER TABLE `user_type`
MODIFY `user_type_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `wastage`
--
ALTER TABLE `wastage`
MODIFY `wastage_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
CREATE TABLE users (
PRIMARY KEY (user_id),
user_id VARCHAR(255) NOT NULL,
age INT UNSIGNED,
calorie_goal INT UNSIGNED,
display_name VARCHAR(255),
height_inches INT UNSIGNED,
sex ENUM('Female', 'Male'),
weight_pounds INT UNSIGNED
);
CREATE TABLE exercise_records (
PRIMARY KEY (exercise_record_id),
FOREIGN KEY (user_id) REFERENCES users(user_id),
user_id VARCHAR(255) NOT NULL,
exercise_record_id INT UNSIGNED AUTO_INCREMENT NOT NULL,
calories INT UNSIGNED NOT NULL,
label VARCHAR(255),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
);
CREATE TABLE food_records (
PRIMARY KEY (food_record_id),
FOREIGN KEY (user_id) REFERENCES users(user_id),
user_id VARCHAR(255) NOT NULL,
food_record_id INT UNSIGNED AUTO_INCREMENT NOT NULL,
calories INT UNSIGNED NOT NULL,
label VARCHAR(255),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
); |
pg> \d country
| Column | Type | Modifiers |
|----------------+----------------+-----------|
| code | character(3) | not null |
| name | character vary | not null |
| continent | character vary | not null |
| region | character vary | not null |
| surfacearea | real | not null |
| indepyear | smallint | |
| population | integer | not null |
| lifeexpectancy | real | |
| gnp | numeric(10,2) | |
| gnpold | numeric(10,2) | |
| localname | character vary | not null |
| governmentform | character vary | not null |
| headofstate | character vary | |
| capital | integer | |
| code2 | character(2) | not null | |
-- This file should undo anything in `up.sql`
DROP INDEX blacklist_backend_type;
DROP INDEX blacklist_last_update;
DROP TABLE blacklist;
|
/*
==========================
Identify Blocking 1
==========================
This query looks for any queries that are not currently granted, then returns all other waits on that same object.
Returns no results if there are no blocked queries.
Example: if there is a queued query waiting on an exclusive lock on an object, any other lock on that object that
is currently granted is considered blocking that query.
*/
select * from sys.dm_pdw_waits
where object_name in (select object_name from sys.dm_pdw_waits where state != 'Granted')
order by object_name |
<gh_stars>1-10
-- Importance
IF NOT EXISTS (SELECT * FROM sys.sql_logins WHERE name = 'ImportantUser')
BEGIN
CREATE LOGIN [ImportantUser] WITH PASSWORD='<<PASSWORD>>'
END
;
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = 'ImportantUser')
BEGIN
CREATE USER [ImportantUser] FOR LOGIN [ImportantUser]
END
;
--DROP WORKLOAD CLASSIFIER wgcHighRole;
CREATE WORKLOAD CLASSIFIER wgcHighRoler
WITH (WORKLOAD_GROUP = 'staticrc20'
,MEMBERNAME = 'ImportantUser'
,IMPORTANCE = HIGH);
SELECT * FROM sys.workload_management_workload_classifiers |
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/log/Release_3_0_logs/KCIRB-778.sql
INSERT INTO PROTOCOL_ACTION_TYPE (PROTOCOL_ACTION_TYPE_CODE, DESCRIPTION, TRIGGER_SUBMISSION, TRIGGER_CORRESPONDENCE, FINAL_ACTION_FOR_BATCH_CORRESP, UPDATE_TIMESTAMP, UPDATE_USER, VER_NBR, OBJ_ID) VALUES ('308', 'Record Committee Decision', 'N', 'N', 'N', TO_DATE('07/22/2010', 'mm/DD/YYYY'), 'KRADEV', 1, 'EDA5D35B4B1742EB96A2E1C454851FB2');
COMMIT;
|
INSERT INTO dms SET (id, uid, username) VALUES (NULL, NULL, NULL);
|
<filename>tests/queries/0_stateless/02235_add_part_offset_virtual_column.sql
DROP TABLE IF EXISTS t_1;
DROP TABLE IF EXISTS t_random_1;
CREATE TABLE t_1
(
`order_0` UInt64,
`ordinary_1` UInt32,
`p_time` Date,
`computed` ALIAS 'computed_' || cast(`p_time` AS String),
`granule` MATERIALIZED cast(`order_0` / 0x2000 AS UInt64) % 3,
INDEX `index_granule` `granule` TYPE minmax GRANULARITY 1
)
ENGINE = MergeTree
PARTITION BY toYYYYMM(p_time)
ORDER BY order_0;
CREATE TABLE t_random_1
(
`ordinary_1` UInt32
)
ENGINE = GenerateRandom(1, 5, 3);
INSERT INTO t_1 select rowNumberInAllBlocks(), *, '1984-01-01' from t_random_1 limit 1000000;
OPTIMIZE TABLE t_1 FINAL;
SELECT COUNT(DISTINCT(_part)) FROM t_1;
SELECT min(_part_offset), max(_part_offset) FROM t_1;
SELECT count(*) FROM t_1 WHERE _part_offset != order_0;
SELECT count(*) FROM t_1 WHERE order_0 IN (SELECT toUInt64(rand64()%1000) FROM system.numbers limit 100) AND _part_offset != order_0;
SELECT count(*) FROM t_1 PREWHERE ordinary_1 > 5000 WHERE _part_offset != order_0;
SELECT order_0, _part_offset, _part FROM t_1 ORDER BY order_0 LIMIT 3;
SELECT order_0, _part_offset, _part FROM t_1 ORDER BY order_0 DESC LIMIT 3;
SELECT order_0, _part_offset, _part FROM t_1 WHERE order_0 <= 1 OR (order_0 BETWEEN 10000 AND 10002) OR order_0 >= 999998 ORDER BY order_0;
SELECT order_0, _part_offset, _part FROM t_1 WHERE order_0 <= 1 OR (order_0 BETWEEN 10000 AND 10002) OR order_0 >= 999998 ORDER BY order_0 DESC;
SELECT order_0, _part_offset, computed FROM t_1 ORDER BY order_0, _part_offset, computed LIMIT 3;
SELECT order_0, _part_offset, computed FROM t_1 ORDER BY order_0 DESC, _part_offset DESC, computed DESC LIMIT 3;
SELECT order_0, _part_offset, _part FROM t_1 WHERE order_0 <= 1 OR order_0 >= 999998 ORDER BY order_0 LIMIT 3;
SELECT 'SOME GRANULES FILTERED OUT';
SELECT count(*), sum(_part_offset), sum(order_0) from t_1 where granule == 0;
SELECT count(*), sum(_part_offset), sum(order_0) from t_1 where granule == 0 AND _part_offset < 100000;
SELECT count(*), sum(_part_offset), sum(order_0) from t_1 where granule == 0 AND _part_offset >= 100000;
SELECT 'PREWHERE';
SELECT count(*), sum(_part_offset), sum(order_0) from t_1 prewhere granule == 0 where _part_offset >= 100000;
SELECT count(*), sum(_part_offset), sum(order_0) from t_1 prewhere _part != '' where granule == 0; -- { serverError 10 }
SELECT count(*), sum(_part_offset), sum(order_0) from t_1 prewhere _part_offset > 100000 where granule == 0; -- { serverError 10 }
|
<filename>api/pkg/db/migrate/schema/migrations/000090_notifications_created_at.down.sql
ALTER TABLE notifications
DROP COLUMN created_at; |
<gh_stars>1-10
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.25)
# Database: cfadmin
# Generation Time: 2019-05-21 02:32:16 +0000
# ************************************************************
# Dump of table cfadmin_headers
# ------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `cfadmin_headers` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`name` varchar(255) NOT NULL COMMENT '头部名称',
`url` varchar(255) NOT NULL COMMENT '头部URL',
`create_at` int(11) unsigned NOT NULL COMMENT '创建时间',
`update_at` int(10) unsigned NOT NULL COMMENT '修改时间',
`active` tinyint(4) unsigned NOT NULL COMMENT '删除标志',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table cfadmin_menus
# ------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `cfadmin_menus` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`parent` int(11) unsigned NOT NULL,
`name` varchar(255) NOT NULL COMMENT '菜单名称',
`url` varchar(255) DEFAULT NULL COMMENT '菜单链接',
`icon` char(255) DEFAULT NULL COMMENT '菜单图标',
`create_at` int(11) unsigned NOT NULL COMMENT '创建时间',
`update_at` int(11) unsigned NOT NULL COMMENT '更新时间',
`active` tinyint(4) unsigned NOT NULL COMMENT '删除标志',
PRIMARY KEY (`id`),
KEY `com_index` (`active`,`url`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table cfadmin_permissions
# ------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `cfadmin_permissions` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`role_id` int(11) unsigned NOT NULL COMMENT '所属角色',
`menu_id` int(11) unsigned NOT NULL COMMENT '所属菜单',
`create_at` int(11) unsigned NOT NULL COMMENT '创建时间',
`update_at` int(11) unsigned NOT NULL COMMENT '修改时间',
`active` tinyint(4) unsigned NOT NULL COMMENT '是否启用',
PRIMARY KEY (`id`),
KEY `com_index` (`active`,`role_id`,`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table cfadmin_roles
# ------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `cfadmin_roles` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`name` varchar(255) NOT NULL COMMENT '角色名称',
`is_admin` tinyint(4) unsigned NOT NULL COMMENT '管理员标志',
`create_at` int(11) unsigned NOT NULL COMMENT '创建时间',
`update_at` int(1) unsigned NOT NULL COMMENT '修改时间',
`active` tinyint(4) unsigned NOT NULL COMMENT '删除标志',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table cfadmin_tokens
# ------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `cfadmin_tokens` (
`uid` int(11) unsigned NOT NULL COMMENT '用户ID',
`name` varchar(255) NOT NULL COMMENT '用户名称',
`token` varchar(255) NOT NULL COMMENT '用户TOKEN',
`create_at` int(11) unsigned NOT NULL COMMENT '登录时间',
PRIMARY KEY (`uid`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;
# Dump of table cfadmin_users
# ------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `cfadmin_users` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`name` varchar(255) NOT NULL COMMENT '用户名',
`username` varchar(255) NOT NULL COMMENT '用户账户',
`password` varchar(255) NOT NULL COMMENT '用户密码',
`email` varchar(255) NOT NULL COMMENT '用户邮箱',
`phone` bigint(11) unsigned NOT NULL COMMENT '用户手机',
`role` int(11) unsigned NOT NULL COMMENT '用户角色',
`create_at` int(11) unsigned NOT NULL COMMENT '创建时间',
`update_at` int(11) unsigned NOT NULL COMMENT '修改时间',
`active` tinyint(4) unsigned NOT NULL COMMENT '删除标志',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
<reponame>zionyun/cubrid-testcases
--Test retrieve data using case function
--+ holdcas on;
set system parameters 'dont_reuse_heap_file=yes';
set system parameters 'create_table_reuseoid=no';
create class tb ( id int);
insert into tb values(1);
select decode(1, 1, tb) from tb order by 1;
select decode(1, 1, class tb) from tb order by 1;
select case when 1=1 then db_user end from db_user order by 1;
select case 1 when 1 then db_user end from db_user order by 1;
select db_root to :x from db_root order by 1;
select nullif(null, db_user) from db_user order by 1;
select nullif(db_user, null) from db_user order by 1;
select nullif(null, :x) from db_user order by 1;
select nullif(:x, null) from db_user order by 1;
select nullif(db_user, :x) from db_user order by 1;
select nullif(:x, db_user) from db_user order by 1;
select coalesce(null, db_user) from db_user order by 1;
select coalesce(db_user, null) from db_user order by 1;
select coalesce(null, :x) from db_user order by 1;
select coalesce(:x, null) from db_user order by 1;
select coalesce(db_user, :x) from db_user order by 1;
select coalesce(:x, db_user) from db_user order by 1;
select nvl(null, db_user) from db_user order by 1;
select nvl(db_user, null) from db_user order by 1;
select nvl(null, :x) from db_user order by 1;
select nvl(:x, null) from db_user order by 1;
select nvl(db_user, :x) from db_user order by 1;
select nvl(:x, db_user) from db_user order by 1;
select nvl2(null, db_user, :x) from db_user order by 1;
select nvl2(null, :x, db_user) from db_user order by 1;
select nvl2(db_user, db_user, :x) from db_user order by 1;
select nvl2(db_user, :x, db_user) from db_user order by 1;
select nvl2(:x, db_user, null) from db_user order by 1;
select nvl2(:x, null, db_user) from db_user order by 1;
select nullif(null, tb) from tb order by 1;
select nullif(tb, null) from tb order by 1;
select nullif(null, (select tb from tb)) from tb order by 1;
select nullif((select tb from tb), null) from tb order by 1;
select nullif(tb, (select tb from tb)) from tb order by 1;
select nullif((select tb from tb), tb) from tb order by 1;
select coalesce(null, tb) from tb order by 1;
select coalesce(tb, null) from tb order by 1;
select coalesce(null, (select tb from tb)) from tb order by 1;
select coalesce((select tb from tb), null) from tb order by 1;
select coalesce(tb, (select tb from tb)) from tb order by 1;
select coalesce((select tb from tb), tb) from tb order by 1;
select nvl(null, tb) from tb order by 1;
select nvl(tb, null) from tb order by 1;
select nvl(null, (select tb from tb)) from tb order by 1;
select nvl((select tb from tb), null) from tb order by 1;
select nvl(tb, (select tb from tb)) from tb order by 1;
select nvl((select tb from tb), tb) from tb order by 1;
select nvl2(null, tb, (select tb from tb)) from tb order by 1;
select nvl2(null, (select tb from tb), tb) from tb order by 1;
select nvl2(tb, tb, (select tb from tb)) from tb order by 1;
select nvl2(tb, (select tb from tb), tb) from tb order by 1;
select nvl2((select tb from tb), tb, null) from tb order by 1;
select nvl2((select tb from tb), null, tb) from tb order by 1;
drop tb;
set system parameters 'dont_reuse_heap_file=no';
set system parameters 'create_table_reuseoid=yes';
--+ holdcas off;
|
<reponame>mtlankenau/employee-tracker
DROP DATABASE IF EXISTS employee_database;
CREATE DATABASE employee_database;
USE employee_database; |
<filename>src/fn__word_find.sql
/* leave this
l:see LICENSE file
g:utility
v:090815\s.zaglio: find a word in a sentence
t:print dbo.fn__word_find('convert(nvarchar,@test)','varchar',default,default) -->9
t:print dbo.fn__word_find('declare @test nvarchar(10)','varchar',default,default) -->15
t:print dbo.fn__word_find('varchar 10','varchar',default,default) ->1
t:print dbo.fn__word_find('set nvarchar 10','varchar',default,default) ->0
*/
CREATE function [dbo].[fn__word_find](
@sentence nvarchar(4000),
@word sysname,
@lt sysname=null,
@rt sysname=null
)
returns int
as
begin
declare @i int,@c nchar
declare @key sysname
declare @points sysname
if @sentence is null return null
select @points=' ([,])'
if @lt is null select @lt=@points+char(9)
if @rt is null select @rt=@points+char(13)
select @key='%'+replace(replace(@word,'_','[_]'),'%','[%]')+'%'
/* tests:
print patindex('%word%','wordcap') -->1
print patindex('%_word%','wordcap') -->0
print patindex('%_word%','inwordcap') -->2
print patindex('%word%','demoword') -->5
if substring('hello',6,1)='' print 'empty space' -->empty space
if substring('hello',-1,1)='' print 'empty space' -->empty space
*/
select @i=patindex(@key,@sentence)
if @i=0 return 0
select @c=substring(@sentence,@i+len(@word),1)
if @c!='' and charindex(@c,@rt)=0 return 0
select @c=substring(@sentence,@i-1,1)
if @c!='' and charindex(@c,@lt)=0 return 0
return @i
end -- function fn__word_find |
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.5
-- Dumped by pg_dump version 12.2
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
DROP DATABASE #DB_NAME#;
--
-- Name: #DB_NAME#; Type: DATABASE; Schema: -; Owner: #DB_OWNER#
--
CREATE DATABASE #DB_NAME# WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';
ALTER DATABASE #DB_NAME# OWNER TO #DB_OWNER#;
\connect #DB_NAME#
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: ban_banknote; Type: TABLE; Schema: public; Owner: #DB_OWNER#
--
CREATE TABLE public.ban_banknote (
ban_id integer NOT NULL,
ban_ser_id integer NOT NULL,
ban_cus_id integer NOT NULL,
ban_face_value real NOT NULL,
ban_mat_id integer,
ban_obverse_desc text,
ban_reverse_desc text,
ban_obverse_tags text,
ban_reverse_tags text,
ban_size_width integer,
ban_size_height integer,
ban_description text
);
ALTER TABLE public.ban_banknote OWNER TO #DB_OWNER#;
--
-- Name: ban_banknote_ban_id_seq; Type: SEQUENCE; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE public.ban_banknote ALTER COLUMN ban_id ADD GENERATED BY DEFAULT AS IDENTITY (
SEQUENCE NAME public.ban_banknote_ban_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
MAXVALUE 100000000
CACHE 1
);
--
-- Name: bit_item; Type: TABLE; Schema: public; Owner: #DB_OWNER#
--
CREATE TABLE public.bit_item (
bit_id integer NOT NULL,
bit_usr_id integer NOT NULL,
bit_bva_id integer NOT NULL,
bit_quantity integer NOT NULL,
bit_gra_grade text NOT NULL,
bit_price real NOT NULL,
bit_seller text,
bit_purchase_date text,
bit_description text
);
ALTER TABLE public.bit_item OWNER TO #DB_OWNER#;
--
-- Name: bit_item_bit_id_seq; Type: SEQUENCE; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE public.bit_item ALTER COLUMN bit_id ADD GENERATED BY DEFAULT AS IDENTITY (
SEQUENCE NAME public.bit_item_bit_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
MAXVALUE 100000000
CACHE 1
);
--
-- Name: bta_banknote_tag; Type: TABLE; Schema: public; Owner: #DB_OWNER#
--
CREATE TABLE public.bta_banknote_tag (
bta_id integer NOT NULL,
bta_ban_id integer NOT NULL,
bta_side text DEFAULT 'O'::text NOT NULL,
bta_tag text NOT NULL
);
ALTER TABLE public.bta_banknote_tag OWNER TO #DB_OWNER#;
--
-- Name: bta_banknote_tag_bta_id_seq; Type: SEQUENCE; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE public.bta_banknote_tag ALTER COLUMN bta_id ADD GENERATED BY DEFAULT AS IDENTITY (
SEQUENCE NAME public.bta_banknote_tag_bta_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
MAXVALUE 100000000
CACHE 1
);
--
-- Name: bva_variant; Type: TABLE; Schema: public; Owner: #DB_OWNER#
--
CREATE TABLE public.bva_variant (
bva_id integer NOT NULL,
bva_ban_id integer NOT NULL,
bva_issue_year integer NOT NULL,
bva_printed_date text,
bva_cat_id text NOT NULL,
bva_overstamped_id integer,
bva_not_issued integer DEFAULT 0 NOT NULL,
bva_pri_id integer,
bva_obverse_color text,
bva_reverse_color text,
bva_signature text,
bva_signature_ext text,
bva_watermark text,
bva_security_thread text,
bva_added_security text,
bva_is_specimen integer DEFAULT 0 NOT NULL,
bva_is_commemorative integer DEFAULT 0 NOT NULL,
bva_is_numis_product integer DEFAULT 0 NOT NULL,
bva_is_replacement integer DEFAULT 0 NOT NULL,
bva_is_error integer DEFAULT 0 NOT NULL,
bva_mintage integer,
bva_description text
);
ALTER TABLE public.bva_variant OWNER TO #DB_OWNER#;
--
-- Name: bva_variant_bva_id_seq; Type: SEQUENCE; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE public.bva_variant ALTER COLUMN bva_id ADD GENERATED BY DEFAULT AS IDENTITY (
SEQUENCE NAME public.bva_variant_bva_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
MAXVALUE 100000000
CACHE 1
);
--
-- Name: con_continent; Type: TABLE; Schema: public; Owner: #DB_OWNER#
--
CREATE TABLE public.con_continent (
con_id integer NOT NULL,
con_name text NOT NULL,
con_order integer
);
ALTER TABLE public.con_continent OWNER TO #DB_OWNER#;
--
-- Name: con_continent_con_id_seq; Type: SEQUENCE; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE public.con_continent ALTER COLUMN con_id ADD GENERATED BY DEFAULT AS IDENTITY (
SEQUENCE NAME public.con_continent_con_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
MAXVALUE 100
CACHE 1
);
--
-- Name: cur_currency; Type: TABLE; Schema: public; Owner: #DB_OWNER#
--
CREATE TABLE public.cur_currency (
cur_id integer NOT NULL,
cur_symbol text,
cur_name text NOT NULL,
cur_name_plural text,
cur_full_name text,
cur_start text NOT NULL,
cur_end text,
cur_successor integer,
cur_replacement_rate real,
cur_description text
);
ALTER TABLE public.cur_currency OWNER TO #DB_OWNER#;
--
-- Name: cur_currency_cur_id_seq; Type: SEQUENCE; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE public.cur_currency ALTER COLUMN cur_id ADD GENERATED BY DEFAULT AS IDENTITY (
SEQUENCE NAME public.cur_currency_cur_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
MAXVALUE 100000000
CACHE 1
);
--
-- Name: cus_currency_unit; Type: TABLE; Schema: public; Owner: #DB_OWNER#
--
CREATE TABLE public.cus_currency_unit (
cus_id integer NOT NULL,
cus_cur_id integer,
cus_value real NOT NULL,
cus_name text NOT NULL,
cus_name_plural text,
cus_abbreviation text
);
ALTER TABLE public.cus_currency_unit OWNER TO #DB_OWNER#;
--
-- Name: cus_currency_unit_cus_id_seq; Type: SEQUENCE; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE public.cus_currency_unit ALTER COLUMN cus_id ADD GENERATED BY DEFAULT AS IDENTITY (
SEQUENCE NAME public.cus_currency_unit_cus_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
MAXVALUE 100000000
CACHE 1
);
--
-- Name: gra_grade; Type: TABLE; Schema: public; Owner: #DB_OWNER#
--
CREATE TABLE public.gra_grade (
gra_value integer NOT NULL,
gra_grade text NOT NULL,
gra_name text NOT NULL,
gra_description text
);
ALTER TABLE public.gra_grade OWNER TO #DB_OWNER#;
--
-- Name: iss_issuer; Type: TABLE; Schema: public; Owner: #DB_OWNER#
--
CREATE TABLE public.iss_issuer (
iss_id integer NOT NULL,
iss_name text NOT NULL,
iss_description text,
iss_ter_id integer
);
ALTER TABLE public.iss_issuer OWNER TO #DB_OWNER#;
--
-- Name: iss_issuer_iss_id_seq; Type: SEQUENCE; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE public.iss_issuer ALTER COLUMN iss_id ADD GENERATED ALWAYS AS IDENTITY (
SEQUENCE NAME public.iss_issuer_iss_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
MAXVALUE 100000000
CACHE 1
);
--
-- Name: mat_material; Type: TABLE; Schema: public; Owner: #DB_OWNER#
--
CREATE TABLE public.mat_material (
mat_id integer NOT NULL,
mat_name text NOT NULL,
mat_description text
);
ALTER TABLE public.mat_material OWNER TO #DB_OWNER#;
--
-- Name: mat_material_mat_id_seq; Type: SEQUENCE; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE public.mat_material ALTER COLUMN mat_id ADD GENERATED ALWAYS AS IDENTITY (
SEQUENCE NAME public.mat_material_mat_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
MAXVALUE 100000000
CACHE 1
);
--
-- Name: pri_printer; Type: TABLE; Schema: public; Owner: #DB_OWNER#
--
CREATE TABLE public.pri_printer (
pri_id integer NOT NULL,
pri_name text NOT NULL,
pri_location text,
pri_description text
);
ALTER TABLE public.pri_printer OWNER TO #DB_OWNER#;
--
-- Name: pri_printer_pri_id_seq; Type: SEQUENCE; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE public.pri_printer ALTER COLUMN pri_id ADD GENERATED ALWAYS AS IDENTITY (
SEQUENCE NAME public.pri_printer_pri_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
MAXVALUE 100000000
CACHE 1
);
--
-- Name: ser_series; Type: TABLE; Schema: public; Owner: #DB_OWNER#
--
CREATE TABLE public.ser_series (
ser_id integer NOT NULL,
ser_cur_id integer NOT NULL,
ser_name text NOT NULL,
ser_start integer NOT NULL,
ser_end integer,
ser_iss_id integer NOT NULL,
ser_law_date text,
ser_description text,
ser_is_overstamped integer
);
ALTER TABLE public.ser_series OWNER TO #DB_OWNER#;
--
-- Name: ser_series_ser_id_seq; Type: SEQUENCE; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE public.ser_series ALTER COLUMN ser_id ADD GENERATED BY DEFAULT AS IDENTITY (
SEQUENCE NAME public.ser_series_ser_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
MAXVALUE 100000000
CACHE 1
);
--
-- Name: tec_territory_currency; Type: TABLE; Schema: public; Owner: #DB_OWNER#
--
CREATE TABLE public.tec_territory_currency (
tec_ter_id integer NOT NULL,
tec_cur_id integer NOT NULL,
tec_iso3 text,
tec_cur_type text NOT NULL,
tec_start text,
tec_end text,
tec_is_issuer integer NOT NULL,
tec_id integer NOT NULL
);
ALTER TABLE public.tec_territory_currency OWNER TO #DB_OWNER#;
--
-- Name: tec_territory_currency_tec_id_seq; Type: SEQUENCE; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE public.tec_territory_currency ALTER COLUMN tec_id ADD GENERATED BY DEFAULT AS IDENTITY (
SEQUENCE NAME public.tec_territory_currency_tec_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
MAXVALUE 100000000
CACHE 1
);
--
-- Name: ter_territory; Type: TABLE; Schema: public; Owner: #DB_OWNER#
--
CREATE TABLE public.ter_territory (
ter_id integer NOT NULL,
ter_con_id integer NOT NULL,
ter_tty_id integer NOT NULL,
ter_iso2 text,
ter_iso3 text,
ter_name text NOT NULL,
ter_official_name text,
ter_start integer NOT NULL,
ter_end integer,
ter_parent_country_id integer,
ter_successor_id text,
ter_description text
);
ALTER TABLE public.ter_territory OWNER TO #DB_OWNER#;
--
-- Name: ter_territory_ter_id_seq; Type: SEQUENCE; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE public.ter_territory ALTER COLUMN ter_id ADD GENERATED BY DEFAULT AS IDENTITY (
SEQUENCE NAME public.ter_territory_ter_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
MAXVALUE 100000000
CACHE 1
);
--
-- Name: tty_territory_type; Type: TABLE; Schema: public; Owner: #DB_OWNER#
--
CREATE TABLE public.tty_territory_type (
tty_id integer NOT NULL,
tty_name text NOT NULL,
tty_abbr text,
tty_desc text,
tty_order integer
);
ALTER TABLE public.tty_territory_type OWNER TO #DB_OWNER#;
--
-- Name: tty_territory_type_tty_id_seq; Type: SEQUENCE; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE public.tty_territory_type ALTER COLUMN tty_id ADD GENERATED BY DEFAULT AS IDENTITY (
SEQUENCE NAME public.tty_territory_type_tty_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
MAXVALUE 100
CACHE 1
);
--
-- Name: usr_user; Type: TABLE; Schema: public; Owner: #DB_OWNER#
--
CREATE TABLE public.usr_user (
usr_id integer NOT NULL,
usr_name text NOT NULL
);
ALTER TABLE public.usr_user OWNER TO #DB_OWNER#;
--
-- Name: usr_user_usr_id_seq; Type: SEQUENCE; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE public.usr_user ALTER COLUMN usr_id ADD GENERATED BY DEFAULT AS IDENTITY (
SEQUENCE NAME public.usr_user_usr_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
MAXVALUE 100000000
CACHE 1
);
-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- INSERT DATA
-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
--
-- Name: ban_banknote UNQ_KEY_BANKNOTE; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.ban_banknote
ADD CONSTRAINT "UNQ_KEY_BANKNOTE" UNIQUE (ban_ser_id, ban_cus_id, ban_face_value);
--
-- Name: ban_banknote ban_banknote_pkey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.ban_banknote
ADD CONSTRAINT ban_banknote_pkey PRIMARY KEY (ban_id);
--
-- Name: bit_item bit_item_pkey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.bit_item
ADD CONSTRAINT bit_item_pkey PRIMARY KEY (bit_id);
--
-- Name: bta_banknote_tag bta_banknote_tag_pkey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.bta_banknote_tag
ADD CONSTRAINT bta_banknote_tag_pkey PRIMARY KEY (bta_id);
--
-- Name: bva_variant bva_variant_pkey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.bva_variant
ADD CONSTRAINT bva_variant_pkey PRIMARY KEY (bva_id);
--
-- Name: con_continent con_continent_pkey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.con_continent
ADD CONSTRAINT con_continent_pkey PRIMARY KEY (con_id);
--
-- Name: cur_currency cur_currency_pkey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.cur_currency
ADD CONSTRAINT cur_currency_pkey PRIMARY KEY (cur_id);
--
-- Name: cus_currency_unit cus_currency_unit_pkey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.cus_currency_unit
ADD CONSTRAINT cus_currency_unit_pkey PRIMARY KEY (cus_id);
--
-- Name: gra_grade gra_grade_pkey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.gra_grade
ADD CONSTRAINT gra_grade_pkey PRIMARY KEY (gra_value);
--
-- Name: iss_issuer iss_issuer_pkey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.iss_issuer
ADD CONSTRAINT iss_issuer_pkey PRIMARY KEY (iss_id);
--
-- Name: iss_issuer iss_issuer_ukey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.iss_issuer
ADD CONSTRAINT iss_issuer_ukey UNIQUE (iss_name, iss_ter_id);
--
-- Name: mat_material mat_material_pkey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.mat_material
ADD CONSTRAINT mat_material_pkey PRIMARY KEY (mat_id);
--
-- Name: pri_printer pri_printer_pkey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.pri_printer
ADD CONSTRAINT pri_printer_pkey PRIMARY KEY (pri_id);
--
-- Name: ser_series ser_series_pkey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.ser_series
ADD CONSTRAINT ser_series_pkey PRIMARY KEY (ser_id);
--
-- Name: ser_series ser_series_ukey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.ser_series
ADD CONSTRAINT ser_series_ukey UNIQUE (ser_cur_id, ser_name);
--
-- Name: tec_territory_currency tec_territory_currency_pkey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.tec_territory_currency
ADD CONSTRAINT tec_territory_currency_pkey PRIMARY KEY (tec_id);
--
-- Name: tec_territory_currency tec_territory_currency_ukey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.tec_territory_currency
ADD CONSTRAINT tec_territory_currency_ukey UNIQUE (tec_ter_id, tec_cur_id, tec_start);
--
-- Name: ter_territory ter_territory_pkey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.ter_territory
ADD CONSTRAINT ter_territory_pkey PRIMARY KEY (ter_id);
--
-- Name: tty_territory_type tty_territory_type_pkey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.tty_territory_type
ADD CONSTRAINT tty_territory_type_pkey PRIMARY KEY (tty_id);
--
-- Name: usr_user usr_user_pkey; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.usr_user
ADD CONSTRAINT usr_user_pkey PRIMARY KEY (usr_id);
--
-- Name: usr_user usr_user_usr_name_key; Type: CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.usr_user
ADD CONSTRAINT usr_user_usr_name_key UNIQUE (usr_name);
--
-- Name: fki_FK_TER_ID; Type: INDEX; Schema: public; Owner: #DB_OWNER#
--
CREATE INDEX "fki_FK_TER_ID" ON public.iss_issuer USING btree (iss_ter_id);
--
-- Name: fki_bva_variant_bva_overstamped_id_fkey; Type: INDEX; Schema: public; Owner: #DB_OWNER#
--
CREATE INDEX fki_bva_variant_bva_overstamped_id_fkey ON public.bva_variant USING btree (bva_overstamped_id);
--
-- Name: ter_territory FK_CON_ID; Type: FK CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.ter_territory
ADD CONSTRAINT "FK_CON_ID" FOREIGN KEY (ter_con_id) REFERENCES public.con_continent(con_id);
--
-- Name: iss_issuer FK_TER_ID; Type: FK CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.iss_issuer
ADD CONSTRAINT "FK_TER_ID" FOREIGN KEY (iss_ter_id) REFERENCES public.ter_territory(ter_id);
--
-- Name: ter_territory FK_TTY_ID; Type: FK CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.ter_territory
ADD CONSTRAINT "FK_TTY_ID" FOREIGN KEY (ter_tty_id) REFERENCES public.tty_territory_type(tty_id);
--
-- Name: ban_banknote ban_banknote_ban_cus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.ban_banknote
ADD CONSTRAINT ban_banknote_ban_cus_id_fkey FOREIGN KEY (ban_cus_id) REFERENCES public.cus_currency_unit(cus_id);
--
-- Name: ban_banknote ban_banknote_ban_mat_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.ban_banknote
ADD CONSTRAINT ban_banknote_ban_mat_id_fkey FOREIGN KEY (ban_mat_id) REFERENCES public.mat_material(mat_id);
--
-- Name: ban_banknote ban_banknote_ban_ser_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.ban_banknote
ADD CONSTRAINT ban_banknote_ban_ser_id_fkey FOREIGN KEY (ban_ser_id) REFERENCES public.ser_series(ser_id);
--
-- Name: bit_item bit_item_bit_bva_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.bit_item
ADD CONSTRAINT bit_item_bit_bva_id_fkey FOREIGN KEY (bit_bva_id) REFERENCES public.bva_variant(bva_id);
--
-- Name: bta_banknote_tag bta_banknote_tag_bta_ban_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.bta_banknote_tag
ADD CONSTRAINT bta_banknote_tag_bta_ban_id_fkey FOREIGN KEY (bta_ban_id) REFERENCES public.ban_banknote(ban_id);
--
-- Name: bva_variant bva_variant_bva_ban_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.bva_variant
ADD CONSTRAINT bva_variant_bva_ban_id_fkey FOREIGN KEY (bva_ban_id) REFERENCES public.ban_banknote(ban_id);
--
-- Name: bva_variant bva_variant_bva_overstamped_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.bva_variant
ADD CONSTRAINT bva_variant_bva_overstamped_id_fkey FOREIGN KEY (bva_overstamped_id) REFERENCES public.bva_variant(bva_id);
--
-- Name: bva_variant bva_variant_bva_pri_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.bva_variant
ADD CONSTRAINT bva_variant_bva_pri_id_fkey FOREIGN KEY (bva_pri_id) REFERENCES public.pri_printer(pri_id);
--
-- Name: cus_currency_unit cus_currency_unit_cus_cur_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.cus_currency_unit
ADD CONSTRAINT cus_currency_unit_cus_cur_id_fkey FOREIGN KEY (cus_cur_id) REFERENCES public.cur_currency(cur_id);
--
-- Name: ser_series ser_series_ser_cur_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.ser_series
ADD CONSTRAINT ser_series_ser_cur_id_fkey FOREIGN KEY (ser_cur_id) REFERENCES public.cur_currency(cur_id);
--
-- Name: ser_series ser_series_ser_iss_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.ser_series
ADD CONSTRAINT ser_series_ser_iss_id_fkey FOREIGN KEY (ser_iss_id) REFERENCES public.iss_issuer(iss_id);
--
-- Name: tec_territory_currency tec_territory_currency_tec_cur_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.tec_territory_currency
ADD CONSTRAINT tec_territory_currency_tec_cur_id_fkey FOREIGN KEY (tec_cur_id) REFERENCES public.cur_currency(cur_id);
--
-- Name: tec_territory_currency tec_territory_currency_tec_ter_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: #DB_OWNER#
--
ALTER TABLE ONLY public.tec_territory_currency
ADD CONSTRAINT tec_territory_currency_tec_ter_id_fkey FOREIGN KEY (tec_ter_id) REFERENCES public.ter_territory(ter_id);
--
-- Name: SCHEMA public; Type: ACL; Schema: -; Owner: #DB_OWNER#
--
REVOKE ALL ON SCHEMA public FROM rdsadmin;
REVOKE ALL ON SCHEMA public FROM PUBLIC;
GRANT ALL ON SCHEMA public TO #DB_OWNER#;
GRANT ALL ON SCHEMA public TO PUBLIC;
--
-- Name: TABLE ban_banknote; Type: ACL; Schema: public; Owner: #DB_OWNER#
--
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE public.ban_banknote TO "BanknotesAPI";
--
-- Name: TABLE bit_item; Type: ACL; Schema: public; Owner: #DB_OWNER#
--
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE public.bit_item TO "BanknotesAPI";
--
-- Name: TABLE bta_banknote_tag; Type: ACL; Schema: public; Owner: #DB_OWNER#
--
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE public.bta_banknote_tag TO "BanknotesAPI";
--
-- Name: TABLE bva_variant; Type: ACL; Schema: public; Owner: #DB_OWNER#
--
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE public.bva_variant TO "BanknotesAPI";
--
-- Name: TABLE con_continent; Type: ACL; Schema: public; Owner: #DB_OWNER#
--
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE public.con_continent TO "BanknotesAPI";
--
-- Name: TABLE cur_currency; Type: ACL; Schema: public; Owner: #DB_OWNER#
--
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE public.cur_currency TO "BanknotesAPI";
--
-- Name: TABLE cus_currency_unit; Type: ACL; Schema: public; Owner: #DB_OWNER#
--
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE public.cus_currency_unit TO "BanknotesAPI";
--
-- Name: TABLE gra_grade; Type: ACL; Schema: public; Owner: #DB_OWNER#
--
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE public.gra_grade TO "BanknotesAPI";
--
-- Name: TABLE iss_issuer; Type: ACL; Schema: public; Owner: #DB_OWNER#
--
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE public.iss_issuer TO "BanknotesAPI";
--
-- Name: TABLE mat_material; Type: ACL; Schema: public; Owner: #DB_OWNER#
--
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE public.mat_material TO "BanknotesAPI";
--
-- Name: TABLE pri_printer; Type: ACL; Schema: public; Owner: #DB_OWNER#
--
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE public.pri_printer TO "BanknotesAPI";
--
-- Name: TABLE ser_series; Type: ACL; Schema: public; Owner: #DB_OWNER#
--
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE public.ser_series TO "BanknotesAPI";
--
-- Name: TABLE tec_territory_currency; Type: ACL; Schema: public; Owner: #DB_OWNER#
--
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE public.tec_territory_currency TO "BanknotesAPI";
--
-- Name: TABLE ter_territory; Type: ACL; Schema: public; Owner: #DB_OWNER#
--
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE public.ter_territory TO "BanknotesAPI";
--
-- Name: TABLE tty_territory_type; Type: ACL; Schema: public; Owner: #DB_OWNER#
--
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE public.tty_territory_type TO "BanknotesAPI";
--
-- Name: TABLE usr_user; Type: ACL; Schema: public; Owner: #DB_OWNER#
--
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE public.usr_user TO "BanknotesAPI";
|
<reponame>fg193/karyon
CREATE EXTENSION IF NOT EXISTS pg_trgm;
CREATE EXTENSION IF NOT EXISTS btree_gin;
CREATE TABLE IF NOT EXISTS
karyon_entity (
id BIGINT NOT NULL,
avatar_entity BIGINT,
owner_entity BIGINT NOT NULL,
editor_entity BIGINT NOT NULL,
viewer_entity BIGINT NOT NULL,
author_entity BIGINT NOT NULL,
create_time TIMESTAMP WITH TIME ZONE NOT NULL,
modify_time TIMESTAMP WITH TIME ZONE NOT NULL,
PRIMARY KEY(id)
);
CREATE INDEX IF NOT EXISTS
karyon_entity_idx_permission ON karyon_entity USING BTREE (
owner_entity,
editor_entity,
viewer_entity
);
CREATE TABLE IF NOT EXISTS
karyon_attr (
id BIGINT NOT NULL,
owner_entity BIGINT NOT NULL,
editor_entity BIGINT NOT NULL,
viewer_entity BIGINT NOT NULL,
author_entity BIGINT NOT NULL,
create_time TIMESTAMP WITH TIME ZONE NOT NULL,
modify_time TIMESTAMP WITH TIME ZONE NOT NULL,
PRIMARY KEY(id)
);
CREATE INDEX IF NOT EXISTS
karyon_attr_idx_permission ON karyon_attr USING BTREE (
owner_entity,
editor_entity,
viewer_entity
);
CREATE TABLE IF NOT EXISTS
karyon_i18n (
id BIGINT NOT NULL,
entity BIGINT NOT NULL,
attr BIGINT NOT NULL,
lang VARCHAR NOT NULL,
value VARCHAR NOT NULL,
UNIQUE(entity, attr, lang),
PRIMARY KEY(id)
);
CREATE INDEX IF NOT EXISTS
karyon_i18n_idx_entity_attr ON karyon_i18n USING BTREE (
entity ASC,
attr ASC
);
CREATE INDEX IF NOT EXISTS
karyon_i18n_idx_value_attr ON karyon_i18n USING GIN (
value GIN_TRGM_OPS,
attr INT8_OPS
);
CREATE TABLE IF NOT EXISTS karyon_link (
id BIGINT NOT NULL,
attr BIGINT NOT NULL,
src_entity BIGINT NOT NULL,
dest_entity BIGINT NOT NULL,
direct BOOLEAN NOT NULL,
ref_count BIGINT NOT NULL,
PRIMARY KEY(id)
);
-- where attr = x and src_entity = list_my_links
-- where attr = x and src_entity = proposed and dest_entity = proposed
CREATE UNIQUE INDEX IF NOT EXISTS
karyon_link_idx_attr_src_dest ON karyon_link USING BTREE (
attr ASC,
src_entity ASC,
dest_entity ASC
);
-- where src_entity = list_my_links and direct = true
CREATE INDEX IF NOT EXISTS
karyon_link_idx_src_direct ON karyon_link USING BTREE (
src_entity ASC,
direct DESC
);
-- where dest_entity = list_my_back_links
-- where dest_entity = list_my_back_links and attr = x
-- where dest_entity = list_my_back_links and attr = x and direct = true
CREATE INDEX IF NOT EXISTS
karyon_link_idx_dest_attr_direct ON karyon_link USING BTREE (
dest_entity ASC,
attr ASC,
direct DESC
);
|
<reponame>lee-amber-alex/Employee.Tracker
DROP DATABASE IF EXISTS cms_DB;
CREATE DATABASE cms_DB;
USE cms_DB;
CREATE TABLE department(
id INT AUTO_INCREMENT NOT NULL ,
dep_name VARCHAR(30) NOT NULL,
dep_manager VARCHAR(30) NOT NULL,
primary key(id),
);
CREATE TABLE roles(
id INT NOT NULL AUTO_INCREMENT,
roles VARCHAR(30) NOT NULL,
dep_id INT NOT NULL
primary key(id),
);
CREATE TABLE employees(
id INT NOT NULL AUTO_INCREMENT,
full_name VARCHAR(30) NOT NULL,
role_id INT NOT NULL,
manager_id INT NOT NULL,
primary key(id),
);
INSERT INTO department (dep_name)
VALUES ("Engineering");
INSERT INTO roles (roles)
VALUES ("Engineer");
INSERT INTO employees (full_name)
VALUES ("<NAME>");
|
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 03 Oca 2022, 15:54:47
-- Sunucu sürümü: 10.4.22-MariaDB
-- PHP Sürümü: 8.0.13
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 */;
--
-- Veritabanı: `app_receipt`
--
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `failed_jobs`
--
CREATE TABLE `failed_jobs` (
`id` bigint(20) UNSIGNED NOT NULL,
`uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
`queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Tablo döküm verisi `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(5, '2021_12_05_142318_products', 1),
(6, '2021_12_06_091618_receipt', 1),
(7, '2021_12_06_091838_receipts_products', 1);
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `personal_access_tokens`
--
CREATE TABLE `personal_access_tokens` (
`id` bigint(20) UNSIGNED NOT NULL,
`tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`tokenable_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
`abilities` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`last_used_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `products`
--
CREATE TABLE `products` (
`product_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Tablo döküm verisi `products`
--
INSERT INTO `products` (`product_id`, `name`) VALUES
(9, 'A5 40YP DKŞL PP KPK'),
(15, 'ABACILAR YUMURTA 15'),
(199, 'ABACILAR YUMURTLA L 3'),
(120, 'ACE ULTRA POWER JEL'),
(162, 'ACIK CEKIRDEK ADET'),
(180, 'ALGIDA CORNETTO ROSE'),
(179, 'ALGIDA KULAH MARAS U'),
(14, 'ALIŞVERİŞ POŞETİ'),
(88, 'ALPELLA CIKOLATALI G'),
(144, 'ALPELLA SUTLU CIKOLA'),
(129, '<NAME>'),
(136, '<NAME>'),
(27, '<NAME>'),
(146, 'AM<NAME>'),
(46, '<NAME>'),
(112, '<NAME>'),
(21, '<NAME>'),
(198, '<NAME>'),
(195, '<NAME>'),
(197, '<NAME>'),
(131, '<NAME>'),
(100, '<NAME>'),
(196, '<NAME>'),
(53, '<NAME>'),
(99, '<NAME>'),
(16, '<NAME>'),
(12, 'BLACK BRUIN 1 L'),
(109, 'BLACK BRUIN ENERJI I'),
(209, '<NAME>'),
(79, '<NAME>'),
(13, 'CAFEX250MLMOCHA'),
(192, 'CAMEL DEEP BLUE'),
(189, 'CAMEL WHITE PAKET'),
(143, '<NAME>'),
(55, '<NAME>'),
(167, '<NAME>'),
(185, '<NAME>'),
(205, '<NAME>'),
(203, '<NAME>'),
(160, '<NAME>'),
(118, '<NAME> 54'),
(111, 'CHESTERFIELD MODE NA'),
(51, 'CHESTERFIELD NAVY BL'),
(7, 'CHOCODANS 125 G'),
(174, 'CIHAN TUZ 1 5 KG'),
(32, 'COCA COLA 2 5 L'),
(93, 'COCA COLA 330 ML'),
(78, 'COCA COLA PET 1 5 LT'),
(59, 'COCA COLA PET 1 L'),
(47, '<NAME>'),
(5, 'DERBYSAMURA10LU'),
(68, '<NAME>'),
(98, '<NAME>'),
(117, 'DORITOS NACHO 121 GR'),
(6, 'DUAL USB KABLO 3352'),
(23, 'EKMEK NORMAL'),
(49, '<NAME> 20'),
(11, 'ETİ %27 A.FIS.ÇİK'),
(147, 'ETI BROWNI GOLD KAK.'),
(37, 'ETI BURCAK 140 GR.'),
(40, 'ETI BURCAK SUTLU CIK'),
(42, 'ETI BURCAK SUTLU KRE'),
(126, 'ETI CIN LOKMALIK 114'),
(97, 'ETI CRAX ACILI VE MI'),
(130, 'ETI CRAX CUBU<NAME>KE'),
(137, 'ETI HOSBES FINDIKLI'),
(124, 'ETI POP KEK MINI MUZ'),
(172, 'ETI POPKEK LIMONLU 6'),
(73, 'ETI TUTKU 100 G'),
(141, 'EVIN 5 LT AYCICEK YAG'),
(113, 'EVIN AYCICEKYAGI 1LT'),
(45, '<NAME>'),
(52, '<NAME> 250GR'),
(193, 'FAIRY PLATINIUM 33 LU'),
(30, '<NAME> 5 LI'),
(31, 'FANTA PORTAKAL PET 2'),
(157, '<NAME>'),
(164, 'FIRST CILEK 13.5 GR'),
(150, 'FUSE TEA ICE TEA SEF'),
(75, '<NAME>'),
(25, '<NAME> A'),
(177, '<NAME>'),
(70, 'HEAD SHO. KLAS. BAK. SA'),
(188, 'HEAD SHOULDERS IPEKSI'),
(191, '<NAME> SUC'),
(4, 'İKBAL SUCUK 400G'),
(86, 'INCI MISIR 450 G'),
(163, 'INDO MIE NOODLE KORI'),
(35, 'IPEK KEPEGE KARSI ET'),
(171, 'KAYSERI SEKER TOZ SE'),
(201, 'KEBIR TEREYAGI 500 G'),
(145, 'KENT D-RANGE BLUE LO'),
(102, '<NAME>'),
(95, '<NAME>DA 200 ML'),
(114, 'L M RED LABEL KISA B'),
(29, 'LARK BLUE KISA'),
(44, 'LARK BLUE LONG PAKET'),
(175, '<NAME>'),
(87, '<NAME>'),
(182, 'LINK CILEK'),
(186, 'LIPTON YEL. LABEL CAY'),
(90, 'LIPTON YELLOW LABEL'),
(121, '<NAME>'),
(1, 'MARET SOSIS 300G'),
(28, 'MARLBORA 100 S PAKET'),
(24, 'MARLBORA EDGE BLUE P'),
(110, 'MARLBORO BOX PAKET'),
(94, 'MARLBORO EDGE BLUE P'),
(33, 'MARLBORO EDGE KS RCB'),
(91, 'MARLBORO <NAME>'),
(194, '<NAME>'),
(81, 'MICRO 0 7 UC'),
(20, '<NAME>'),
(61, '<NAME>'),
(123, 'MIS AYRAN 1 5 LT'),
(50, 'MIS EZINE INEK PEYNI'),
(133, 'MIS HOMOJEN YOGURT 3'),
(56, 'MIS MEYVE NEKTARI KA'),
(207, 'MIS MEYVE NEKTARI SE'),
(139, 'MIS MUZLU SUT 250 ML'),
(122, 'MIS S<NAME>'),
(178, 'MIS SU<NAME>'),
(200, '<NAME>'),
(66, '<NAME>'),
(43, '<NAME>'),
(115, '<NAME>'),
(74, '<NAME>'),
(3, '<NAME> 280G'),
(135, '<NAME>'),
(26, 'NESCAFE 3 U 1 ARADA'),
(85, '<NAME>'),
(67, 'NESTLE SALEP 17 G'),
(116, '<NAME>'),
(183, 'ORKID ULTRA GECE 6 L'),
(161, '<NAME> UZUN TEK'),
(71, '<NAME>'),
(101, 'OZMO FUN FIGURLU CIK'),
(170, '<NAME>'),
(104, '<NAME>'),
(154, '<NAME>'),
(8, 'PARLIEMENT KISA'),
(72, '<NAME>'),
(165, '<NAME> KEK 200'),
(82, '<NAME> 2 5 L'),
(152, '<NAME> 330'),
(158, '<NAME> 2*4'),
(134, '<NAME> 3'),
(149, '<NAME>'),
(18, '<NAME>'),
(63, '<NAME>'),
(84, '<NAME>NU 25'),
(48, 'PRINGLES HOT&SPICY 1'),
(77, 'REXONA EXTRA COOL SP'),
(10, 'ROLLER KALEM 3LÜ NOT'),
(173, '<NAME> D'),
(58, 'RUFFLES ORIGINALS 10'),
(155, 'RUFFLESS KETCAP AROM'),
(2, '<NAME>'),
(159, '<NAME>'),
(92, 'SIRMA SU 0.5 LT'),
(125, '<NAME>'),
(132, 'SPRITE PET 1 LT'),
(190, 'SUTAS LABNE 200GR'),
(80, 'SUTAS MUZLU SUT ETIK'),
(60, 'SUTAS SUZME PEYNIR 5'),
(22, 'SUZZ AKTIF BULASIK D'),
(65, 'TAT MAYONEZ 330 GR'),
(184, 'TEKEL 2000 100 MM KIR'),
(187, 'TEKEL 2000 UZUN MAVI'),
(54, 'TEMPO FINGER BISKUVI'),
(127, '<NAME>'),
(168, '<NAME>00GR'),
(103, '<NAME>'),
(64, '<NAME>'),
(96, '<NAME>'),
(17, '<NAME>'),
(202, '<NAME> 17CC'),
(176, '<NAME>'),
(107, '<NAME>'),
(119, '<NAME>'),
(41, '<NAME>'),
(36, '<NAME>'),
(34, '<NAME>'),
(89, '<NAME>'),
(128, '<NAME>'),
(62, '<NAME>'),
(208, '<NAME>'),
(76, '<NAME> 80'),
(106, '<NAME>'),
(39, '<NAME>'),
(166, '<NAME>'),
(38, '<NAME>.'),
(108, '<NAME>'),
(105, '<NAME>'),
(181, '<NAME>'),
(151, '<NAME>'),
(206, '<NAME>'),
(138, '<NAME>'),
(19, '<NAME>'),
(156, '<NAME>'),
(83, '<NAME>'),
(148, '<NAME>'),
(153, '<NAME>'),
(69, 'VICEROY NAVY KS RC B'),
(57, '<NAME>'),
(142, '<NAME>'),
(140, '<NAME>'),
(204, 'WINSTON SLENDER 7 PA'),
(169, '<NAME>');
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `receipt`
--
CREATE TABLE `receipt` (
`receipt_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Tablo döküm verisi `receipt`
--
INSERT INTO `receipt` (`receipt_id`) VALUES
(1),
(2),
(3),
(4),
(5),
(6),
(7),
(8),
(9),
(10),
(11),
(12),
(13),
(14),
(15),
(16),
(17),
(18),
(19),
(20),
(21),
(22),
(23),
(24),
(25),
(26),
(27),
(28),
(29),
(30),
(31),
(32),
(33),
(34),
(35),
(36),
(37),
(38),
(39),
(40),
(41),
(42),
(43),
(44),
(45),
(46),
(47),
(48),
(49),
(50),
(51),
(52),
(53),
(54),
(55),
(56),
(57),
(58),
(59),
(60),
(61),
(62),
(63),
(64),
(65),
(66),
(67),
(68),
(69),
(70),
(71),
(72),
(73),
(74),
(75),
(76),
(77),
(78),
(79),
(80),
(81),
(82),
(83),
(84),
(85),
(86),
(87),
(88),
(89),
(90),
(91),
(92),
(93),
(94),
(95),
(96),
(97),
(98),
(99),
(100),
(101),
(102),
(103),
(104),
(105),
(106),
(107),
(108),
(109),
(110),
(111),
(112),
(113),
(114),
(115),
(116),
(117),
(118),
(119),
(120),
(121),
(122),
(123),
(124),
(125),
(126),
(127),
(128),
(129),
(130),
(131),
(132),
(133),
(134),
(135),
(136),
(137),
(138),
(139),
(140),
(141),
(142),
(143),
(144),
(145),
(146),
(147),
(148),
(149),
(150),
(151),
(152),
(153),
(154),
(155),
(156),
(157),
(158),
(159),
(160),
(161),
(162),
(163),
(164),
(165),
(166),
(167),
(168),
(169),
(170),
(171),
(172),
(173),
(174),
(175),
(176),
(177),
(178),
(179),
(180),
(181),
(182),
(183),
(184),
(185),
(186),
(187),
(188),
(189),
(190),
(191),
(192),
(193),
(194),
(195),
(196),
(197),
(198),
(199),
(200),
(201),
(202),
(203),
(204),
(205),
(206),
(207),
(208),
(209),
(210),
(211),
(212),
(213),
(214),
(215),
(216),
(217),
(218),
(219),
(220),
(221),
(222),
(223),
(224),
(225),
(226),
(227),
(228),
(229),
(230),
(231),
(232),
(233),
(234),
(235),
(236),
(237),
(238),
(239),
(240),
(241),
(242),
(243),
(244),
(245),
(246),
(247),
(248),
(249),
(250),
(251),
(252),
(253),
(254),
(255),
(256),
(257),
(258),
(259),
(260),
(261),
(262),
(263),
(264),
(265),
(266),
(267),
(268),
(269),
(270),
(271),
(272),
(273),
(274),
(275),
(276),
(277),
(278),
(279),
(280),
(281),
(282),
(283),
(284),
(285),
(286),
(287),
(288),
(289),
(290),
(291),
(292),
(293),
(294),
(295),
(296),
(297),
(298),
(299),
(300),
(301),
(302),
(303),
(304),
(305),
(306),
(307),
(308),
(309),
(310),
(311),
(312),
(313),
(314),
(315),
(316),
(317),
(318),
(319),
(320),
(321),
(322),
(323),
(324),
(325),
(326),
(327),
(328),
(329),
(330),
(331),
(332),
(333),
(334),
(335),
(336),
(337),
(338),
(339),
(340),
(341),
(342),
(343),
(344),
(345),
(346),
(347),
(348),
(349),
(350),
(351),
(352),
(353),
(354),
(355),
(356),
(357),
(358),
(359),
(360),
(361),
(362),
(363),
(364),
(365),
(366),
(367),
(368),
(369),
(370),
(371),
(372),
(373),
(374),
(375),
(376),
(377),
(378),
(379),
(380),
(381),
(382),
(383),
(384),
(385),
(386),
(387),
(388),
(389),
(390),
(391),
(392),
(393),
(394),
(395),
(396),
(397),
(398),
(399),
(400),
(401),
(402),
(403),
(404),
(405),
(406),
(407),
(408),
(409),
(410),
(411),
(412),
(413),
(414),
(415),
(416),
(417),
(418),
(419),
(420),
(421),
(422),
(423),
(424),
(425),
(426),
(427),
(428),
(429),
(430),
(431),
(432),
(433),
(434),
(435),
(436),
(437),
(438),
(439),
(440),
(441),
(442),
(443),
(444),
(445),
(446),
(447),
(448),
(449),
(450),
(451),
(452),
(453),
(454),
(455),
(456),
(457),
(458),
(459),
(460),
(461),
(462);
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `receipts_products`
--
CREATE TABLE `receipts_products` (
`id` bigint(20) UNSIGNED NOT NULL,
`product` bigint(20) UNSIGNED NOT NULL,
`receipt` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Tablo döküm verisi `receipts_products`
--
INSERT INTO `receipts_products` (`id`, `product`, `receipt`) VALUES
(1, 1, 1),
(2, 2, 1),
(3, 3, 1),
(4, 4, 2),
(5, 15, 3),
(6, 16, 3),
(7, 17, 3),
(8, 18, 3),
(9, 19, 4),
(10, 22, 5),
(11, 23, 5),
(12, 24, 6),
(13, 25, 6),
(14, 26, 7),
(15, 27, 7),
(16, 28, 7),
(17, 29, 8),
(18, 30, 8),
(19, 31, 9),
(20, 32, 9),
(21, 33, 9),
(22, 34, 9),
(23, 43, 10),
(24, 44, 10),
(25, 45, 10),
(26, 46, 11),
(27, 47, 11),
(28, 48, 11),
(29, 49, 11),
(30, 50, 12),
(31, 51, 13),
(32, 52, 13),
(33, 53, 13),
(34, 54, 14),
(35, 55, 14),
(36, 56, 14),
(37, 57, 15),
(38, 58, 15),
(39, 59, 15),
(40, 60, 16),
(41, 61, 17),
(42, 62, 17),
(43, 63, 17),
(44, 64, 17),
(45, 65, 18),
(46, 66, 19),
(47, 67, 20),
(48, 68, 20),
(49, 69, 20),
(50, 70, 21),
(51, 71, 21),
(52, 72, 22),
(53, 73, 22),
(54, 15, 23),
(55, 60, 23),
(56, 74, 24),
(57, 75, 24),
(58, 76, 24),
(59, 77, 25),
(60, 78, 26),
(61, 79, 26),
(62, 78, 27),
(63, 79, 27),
(64, 8, 28),
(65, 80, 28),
(66, 81, 29),
(67, 82, 30),
(68, 82, 31),
(69, 83, 31),
(70, 84, 32),
(71, 26, 32),
(72, 85, 33),
(73, 86, 34),
(74, 87, 34),
(75, 82, 34),
(76, 88, 34),
(77, 89, 34),
(78, 90, 34),
(79, 57, 35),
(80, 91, 35),
(81, 92, 35),
(82, 93, 35),
(83, 94, 36),
(84, 25, 36),
(85, 95, 37),
(86, 96, 37),
(87, 97, 37),
(88, 95, 38),
(89, 96, 38),
(90, 97, 38),
(91, 30, 38),
(92, 98, 39),
(93, 31, 39),
(94, 23, 39),
(95, 24, 39),
(96, 99, 40),
(97, 58, 40),
(98, 100, 40),
(99, 101, 40),
(100, 102, 40),
(101, 104, 41),
(102, 105, 42),
(103, 106, 42),
(104, 107, 42),
(105, 108, 42),
(106, 19, 42),
(107, 109, 42),
(108, 110, 43),
(109, 111, 43),
(110, 53, 43),
(111, 112, 43),
(112, 113, 44),
(113, 114, 44),
(114, 23, 44),
(115, 115, 45),
(116, 24, 45),
(117, 116, 45),
(118, 117, 46),
(119, 118, 46),
(120, 119, 46),
(121, 8, 47),
(122, 120, 47),
(123, 121, 47),
(124, 122, 48),
(125, 123, 48),
(126, 124, 49),
(127, 125, 49),
(128, 126, 49),
(129, 127, 49),
(130, 128, 49),
(131, 88, 49),
(132, 102, 49),
(133, 130, 49),
(134, 58, 49),
(135, 131, 50),
(136, 48, 51),
(137, 46, 51),
(138, 47, 51),
(139, 49, 51),
(140, 132, 52),
(141, 133, 52),
(142, 23, 52),
(143, 33, 53),
(144, 131, 53),
(145, 134, 53),
(146, 135, 54),
(147, 23, 54),
(148, 28, 54),
(149, 23, 55),
(150, 133, 55),
(151, 136, 55),
(152, 137, 55),
(153, 108, 55),
(154, 138, 55),
(155, 139, 55),
(156, 140, 56),
(157, 141, 56),
(158, 140, 57),
(159, 141, 57),
(160, 30, 57),
(161, 14, 57),
(162, 142, 58),
(163, 143, 58),
(164, 26, 58),
(165, 144, 58),
(166, 145, 59),
(167, 33, 59),
(168, 146, 60),
(169, 147, 61),
(170, 148, 61),
(171, 149, 62),
(172, 150, 63),
(173, 42, 64),
(174, 151, 64),
(175, 152, 64),
(176, 153, 65),
(177, 154, 65),
(178, 155, 66),
(179, 73, 66),
(180, 156, 66),
(181, 113, 67),
(182, 157, 67),
(183, 158, 67),
(184, 159, 67),
(185, 160, 67),
(186, 161, 68),
(187, 95, 68),
(188, 143, 68),
(189, 162, 68),
(190, 161, 69),
(191, 95, 69),
(192, 143, 69),
(193, 162, 69),
(194, 8, 69),
(195, 23, 70),
(196, 164, 70),
(197, 165, 71),
(198, 166, 71),
(199, 91, 71),
(200, 167, 72),
(201, 168, 72),
(202, 169, 72),
(203, 170, 72),
(204, 171, 72),
(205, 172, 72),
(206, 119, 72),
(207, 144, 72),
(208, 167, 73),
(209, 168, 73),
(210, 169, 73),
(211, 170, 73),
(212, 171, 73),
(213, 172, 73),
(214, 119, 73),
(215, 144, 73),
(216, 131, 73),
(217, 173, 74),
(218, 23, 74),
(219, 14, 74),
(220, 174, 75),
(221, 175, 75),
(222, 176, 75),
(223, 177, 75),
(224, 178, 76),
(225, 15, 76),
(226, 179, 77),
(227, 180, 77),
(228, 179, 78),
(229, 180, 78),
(230, 26, 78),
(231, 181, 79),
(232, 92, 79),
(233, 70, 79),
(234, 182, 79),
(235, 183, 80),
(236, 23, 80),
(237, 59, 80),
(238, 184, 81),
(239, 8, 81),
(240, 23, 81),
(241, 185, 82),
(242, 186, 82),
(243, 187, 82),
(244, 14, 82),
(245, 188, 83),
(246, 189, 83),
(247, 145, 84),
(248, 190, 84),
(249, 191, 84),
(250, 57, 85),
(251, 187, 85),
(252, 192, 85),
(253, 193, 86),
(254, 57, 86),
(255, 50, 86),
(256, 51, 86),
(257, 194, 86),
(258, 14, 86),
(259, 195, 87),
(260, 23, 87),
(261, 14, 87),
(262, 196, 88),
(263, 197, 88),
(264, 198, 88),
(265, 199, 88),
(266, 57, 88),
(267, 200, 88),
(268, 201, 89),
(269, 202, 89),
(270, 203, 89),
(271, 57, 90),
(272, 204, 90),
(273, 57, 91),
(274, 204, 91),
(275, 142, 91),
(276, 205, 92),
(277, 163, 92),
(278, 14, 92),
(279, 207, 93),
(280, 54, 93),
(281, 72, 93),
(282, 208, 93),
(283, 206, 93),
(284, 57, 93),
(285, 119, 93),
(286, 151, 94),
(287, 192, 94),
(288, 114, 94),
(289, 36, 95),
(290, 132, 96),
(291, 124, 96),
(292, 24, 96),
(293, 127, 96),
(294, 88, 96),
(295, 66, 97),
(296, 156, 97),
(297, 202, 97),
(298, 57, 97),
(299, 138, 97),
(300, 66, 97),
(301, 10, 98),
(302, 196, 98),
(303, 19, 98),
(304, 34, 98),
(305, 140, 99),
(306, 61, 99),
(307, 71, 99),
(308, 153, 99),
(309, 205, 99),
(310, 11, 100),
(311, 111, 100),
(312, 24, 100),
(313, 42, 100),
(314, 95, 100),
(315, 115, 100),
(316, 177, 100),
(317, 45, 101),
(318, 141, 101),
(319, 180, 101),
(320, 108, 101),
(321, 165, 101),
(322, 21, 102),
(323, 65, 102),
(324, 7, 102),
(325, 86, 102),
(326, 84, 102),
(327, 163, 102),
(328, 97, 102),
(329, 11, 102),
(330, 175, 102),
(331, 3, 103),
(332, 96, 104),
(333, 88, 104),
(334, 205, 105),
(335, 133, 105),
(336, 105, 105),
(337, 162, 106),
(338, 138, 106),
(339, 128, 107),
(340, 7, 107),
(341, 145, 107),
(342, 62, 107),
(343, 92, 107),
(344, 112, 107),
(345, 123, 108),
(346, 49, 108),
(347, 65, 109),
(348, 77, 109),
(349, 70, 110),
(350, 141, 110),
(351, 185, 110),
(352, 2, 111),
(353, 151, 111),
(354, 159, 111),
(355, 25, 111),
(356, 32, 111),
(357, 158, 111),
(358, 130, 111),
(359, 160, 111),
(360, 81, 111),
(361, 89, 112),
(362, 61, 112),
(363, 82, 112),
(364, 80, 112),
(365, 174, 112),
(366, 68, 113),
(367, 145, 113),
(368, 20, 113),
(369, 57, 113),
(370, 32, 114),
(371, 208, 114),
(372, 190, 115),
(373, 186, 115),
(374, 77, 115),
(375, 23, 115),
(376, 161, 115),
(377, 41, 115),
(378, 117, 115),
(379, 170, 115),
(380, 121, 115),
(381, 58, 115),
(382, 96, 116),
(383, 172, 116),
(384, 19, 116),
(385, 116, 116),
(386, 22, 116),
(387, 119, 116),
(388, 22, 116),
(389, 6, 116),
(390, 168, 116),
(391, 11, 117),
(392, 87, 117),
(393, 49, 117),
(394, 144, 117),
(395, 25, 117),
(396, 16, 117),
(397, 129, 117),
(398, 99, 118),
(399, 81, 118),
(400, 45, 118),
(401, 59, 118),
(402, 183, 118),
(403, 150, 118),
(404, 198, 119),
(405, 129, 119),
(406, 61, 119),
(407, 176, 119),
(408, 86, 119),
(409, 167, 119),
(410, 7, 119),
(411, 140, 120),
(412, 112, 120),
(413, 41, 120),
(414, 153, 120),
(415, 103, 120),
(416, 148, 120),
(417, 202, 120),
(418, 6, 121),
(419, 5, 121),
(420, 199, 121),
(421, 148, 121),
(422, 3, 122),
(423, 18, 122),
(424, 42, 122),
(425, 19, 122),
(426, 208, 122),
(427, 138, 122),
(428, 46, 123),
(429, 154, 123),
(430, 91, 123),
(431, 99, 123),
(432, 156, 124),
(433, 205, 125),
(434, 166, 125),
(435, 43, 125),
(436, 199, 126),
(437, 8, 126),
(438, 100, 127),
(439, 181, 127),
(440, 15, 127),
(441, 147, 128),
(442, 86, 129),
(443, 29, 129),
(444, 137, 129),
(445, 139, 130),
(446, 92, 130),
(447, 18, 130),
(448, 154, 130),
(449, 104, 130),
(450, 128, 131),
(451, 42, 131),
(452, 72, 132),
(453, 162, 132),
(454, 163, 133),
(455, 53, 134),
(456, 31, 134),
(457, 85, 134),
(458, 194, 134),
(459, 124, 134),
(460, 67, 135),
(461, 108, 136),
(462, 190, 136),
(463, 200, 136),
(464, 139, 136),
(465, 140, 136),
(466, 167, 137),
(467, 162, 137),
(468, 2, 137),
(469, 95, 138),
(470, 129, 139),
(471, 32, 139),
(472, 170, 139),
(473, 94, 139),
(474, 15, 139),
(475, 52, 139),
(476, 76, 140),
(477, 72, 140),
(478, 32, 140),
(479, 136, 140),
(480, 50, 140),
(481, 59, 140),
(482, 31, 140),
(483, 58, 141),
(484, 85, 141),
(485, 109, 142),
(486, 145, 142),
(487, 187, 142),
(488, 82, 143),
(489, 68, 143),
(490, 26, 143),
(491, 138, 143),
(492, 147, 143),
(493, 202, 143),
(494, 198, 143),
(495, 138, 144),
(496, 173, 145),
(497, 18, 145),
(498, 29, 146),
(499, 157, 146),
(500, 138, 146),
(501, 105, 146),
(502, 40, 146),
(503, 118, 146),
(504, 162, 146),
(505, 114, 147),
(506, 108, 147),
(507, 13, 147),
(508, 52, 147),
(509, 133, 147),
(510, 24, 147),
(511, 1, 148),
(512, 182, 148),
(513, 47, 148),
(514, 117, 148),
(515, 195, 148),
(516, 109, 148),
(517, 53, 149),
(518, 178, 149),
(519, 42, 149),
(520, 46, 150),
(521, 107, 150),
(522, 132, 151),
(523, 54, 151),
(524, 200, 152),
(525, 97, 152),
(526, 11, 153),
(527, 165, 153),
(528, 206, 153),
(529, 201, 153),
(530, 177, 154),
(531, 196, 154),
(532, 135, 155),
(533, 22, 155),
(534, 190, 155),
(535, 119, 155),
(536, 139, 156),
(537, 124, 156),
(538, 12, 157),
(539, 55, 157),
(540, 112, 157),
(541, 172, 157),
(542, 60, 157),
(543, 66, 157),
(544, 62, 158),
(545, 45, 158),
(546, 175, 158),
(547, 153, 158),
(548, 123, 158),
(549, 31, 158),
(550, 166, 159),
(551, 118, 159),
(552, 189, 159),
(553, 186, 159),
(554, 132, 159),
(555, 1, 159),
(556, 63, 160),
(557, 57, 160),
(558, 117, 160),
(559, 96, 160),
(560, 12, 161),
(561, 43, 161),
(562, 153, 161),
(563, 72, 162),
(564, 148, 162),
(565, 61, 163),
(566, 177, 163),
(567, 82, 163),
(568, 183, 163),
(569, 44, 163),
(570, 69, 163),
(571, 45, 164),
(572, 205, 164),
(573, 109, 164),
(574, 71, 164),
(575, 88, 164),
(576, 157, 164),
(577, 123, 165),
(578, 198, 165),
(579, 165, 165),
(580, 150, 165),
(581, 180, 165),
(582, 126, 166),
(583, 46, 167),
(584, 172, 167),
(585, 4, 167),
(586, 57, 167),
(587, 167, 167),
(588, 164, 167),
(589, 153, 167),
(590, 195, 168),
(591, 156, 168),
(592, 43, 168),
(593, 144, 168),
(594, 95, 169),
(595, 115, 169),
(596, 176, 169),
(597, 64, 169),
(598, 124, 169),
(599, 156, 169),
(600, 140, 169),
(601, 66, 170),
(602, 44, 170),
(603, 10, 170),
(604, 137, 170),
(605, 65, 170),
(606, 63, 170),
(607, 32, 170),
(608, 179, 171),
(609, 73, 171),
(610, 48, 171),
(611, 50, 171),
(612, 187, 172),
(613, 65, 172),
(614, 118, 172),
(615, 131, 172),
(616, 6, 172),
(617, 187, 173),
(618, 69, 173),
(619, 6, 173),
(620, 64, 173),
(621, 146, 174),
(622, 116, 174),
(623, 205, 174),
(624, 95, 175),
(625, 154, 175),
(626, 185, 175),
(627, 108, 175),
(628, 46, 175),
(629, 93, 176),
(630, 108, 177),
(631, 116, 177),
(632, 63, 178),
(633, 177, 178),
(634, 127, 179),
(635, 67, 179),
(636, 144, 179),
(637, 38, 179),
(638, 208, 179),
(639, 122, 179),
(640, 205, 179),
(641, 25, 180),
(642, 142, 180),
(643, 45, 180),
(644, 197, 181),
(645, 119, 181),
(646, 37, 181),
(647, 205, 182),
(648, 145, 182),
(649, 192, 182),
(650, 170, 182),
(651, 102, 183),
(652, 125, 184),
(653, 99, 184),
(654, 60, 184),
(655, 175, 184),
(656, 192, 184),
(657, 146, 184),
(658, 18, 184),
(659, 167, 185),
(660, 195, 186),
(661, 140, 186),
(662, 10, 186),
(663, 66, 187),
(664, 26, 187),
(665, 75, 187),
(666, 112, 187),
(667, 29, 187),
(668, 37, 188),
(669, 37, 188),
(670, 72, 188),
(671, 55, 188),
(672, 28, 189),
(673, 198, 189),
(674, 196, 189),
(675, 74, 189),
(676, 3, 189),
(677, 205, 190),
(678, 20, 190),
(679, 160, 191),
(680, 89, 192),
(681, 131, 192),
(682, 161, 192),
(683, 26, 192),
(684, 96, 192),
(685, 49, 193),
(686, 76, 193),
(687, 197, 193),
(688, 146, 193),
(689, 24, 193),
(690, 109, 194),
(691, 58, 194),
(692, 11, 194),
(693, 166, 194),
(694, 170, 194),
(695, 48, 195),
(696, 162, 195),
(697, 88, 195),
(698, 207, 195),
(699, 18, 196),
(700, 13, 196),
(701, 147, 196),
(702, 53, 196),
(703, 128, 196),
(704, 56, 197),
(705, 51, 197),
(706, 135, 197),
(707, 123, 198),
(708, 1, 199),
(709, 26, 199),
(710, 157, 200),
(711, 145, 201),
(712, 160, 201),
(713, 168, 201),
(714, 12, 201),
(715, 2, 201),
(716, 91, 201),
(717, 158, 202),
(718, 166, 202),
(719, 169, 202),
(720, 149, 202),
(721, 120, 203),
(722, 17, 203),
(723, 118, 203),
(724, 105, 203),
(725, 194, 203),
(726, 22, 204),
(727, 182, 204),
(728, 119, 205),
(729, 5, 205),
(730, 121, 205),
(731, 41, 206),
(732, 89, 206),
(733, 81, 206),
(734, 55, 206),
(735, 117, 206),
(736, 86, 206),
(737, 158, 206),
(738, 201, 207),
(739, 205, 207),
(740, 89, 208),
(741, 122, 208),
(742, 88, 208),
(743, 72, 208),
(744, 44, 209),
(745, 74, 210),
(746, 54, 211),
(747, 44, 211),
(748, 62, 211),
(749, 185, 212),
(750, 153, 212),
(751, 203, 212),
(752, 181, 212),
(753, 137, 212),
(754, 62, 212),
(755, 85, 213),
(756, 154, 213),
(757, 143, 213),
(758, 57, 213),
(759, 166, 214),
(760, 31, 214),
(761, 19, 214),
(762, 89, 215),
(763, 160, 216),
(764, 208, 216),
(765, 198, 216),
(766, 23, 217),
(767, 196, 217),
(768, 144, 217),
(769, 195, 217),
(770, 7, 217),
(771, 87, 217),
(772, 206, 217),
(773, 100, 218),
(774, 79, 219),
(775, 59, 219),
(776, 191, 219),
(777, 159, 219),
(778, 50, 219),
(779, 52, 219),
(780, 25, 220),
(781, 112, 220),
(782, 76, 220),
(783, 183, 220),
(784, 72, 220),
(785, 91, 220),
(786, 123, 221),
(787, 171, 221),
(788, 115, 221),
(789, 146, 221),
(790, 190, 221),
(791, 61, 221),
(792, 32, 222),
(793, 46, 222),
(794, 142, 222),
(795, 180, 222),
(796, 125, 222),
(797, 126, 223),
(798, 85, 223),
(799, 110, 223),
(800, 143, 223),
(801, 165, 224),
(802, 14, 224),
(803, 66, 224),
(804, 155, 225),
(805, 175, 225),
(806, 168, 225),
(807, 58, 225),
(808, 183, 225),
(809, 191, 225),
(810, 65, 226),
(811, 79, 226),
(812, 204, 226),
(813, 117, 226),
(814, 139, 227),
(815, 144, 227),
(816, 132, 227),
(817, 156, 228),
(818, 108, 228),
(819, 25, 228),
(820, 77, 228),
(821, 100, 229),
(822, 119, 229),
(823, 54, 230),
(824, 98, 230),
(825, 37, 230),
(826, 29, 230),
(827, 79, 230),
(828, 166, 231),
(829, 192, 231),
(830, 11, 231),
(831, 76, 232),
(832, 34, 232),
(833, 2, 232),
(834, 143, 233),
(835, 96, 233),
(836, 57, 233),
(837, 117, 233),
(838, 29, 233),
(839, 182, 234),
(840, 94, 235),
(841, 47, 235),
(842, 51, 235),
(843, 87, 235),
(844, 16, 235),
(845, 51, 235),
(846, 128, 235),
(847, 100, 236),
(848, 61, 236),
(849, 63, 236),
(850, 86, 236),
(851, 150, 236),
(852, 87, 237),
(853, 90, 237),
(854, 62, 237),
(855, 71, 238),
(856, 28, 238),
(857, 122, 238),
(858, 68, 238),
(859, 17, 238),
(860, 91, 238),
(861, 28, 239),
(862, 127, 239),
(863, 33, 239),
(864, 20, 240),
(865, 130, 240),
(866, 200, 240),
(867, 93, 240),
(868, 139, 240),
(869, 40, 241),
(870, 131, 241),
(871, 69, 241),
(872, 48, 241),
(873, 129, 241),
(874, 36, 241),
(875, 140, 242),
(876, 77, 242),
(877, 100, 242),
(878, 70, 242),
(879, 24, 242),
(880, 189, 242),
(881, 143, 242),
(882, 128, 243),
(883, 115, 243),
(884, 179, 243),
(885, 111, 243),
(886, 103, 243),
(887, 78, 244),
(888, 166, 244),
(889, 119, 245),
(890, 157, 245),
(891, 165, 246),
(892, 203, 246),
(893, 29, 247),
(894, 121, 247),
(895, 131, 247),
(896, 156, 247),
(897, 180, 247),
(898, 181, 247),
(899, 6, 248),
(900, 114, 248),
(901, 148, 248),
(902, 113, 248),
(903, 182, 248),
(904, 194, 249),
(905, 175, 249),
(906, 172, 249),
(907, 75, 249),
(908, 55, 250),
(909, 65, 250),
(910, 28, 250),
(911, 34, 251),
(912, 21, 251),
(913, 180, 251),
(914, 66, 252),
(915, 137, 252),
(916, 88, 252),
(917, 175, 252),
(918, 119, 252),
(919, 123, 252),
(920, 89, 252),
(921, 178, 253),
(922, 169, 253),
(923, 22, 253),
(924, 137, 253),
(925, 13, 253),
(926, 99, 254),
(927, 127, 254),
(928, 69, 254),
(929, 74, 255),
(930, 167, 255),
(931, 186, 255),
(932, 175, 255),
(933, 40, 255),
(934, 41, 256),
(935, 197, 256),
(936, 133, 257),
(937, 45, 257),
(938, 5, 258),
(939, 115, 258),
(940, 96, 259),
(941, 170, 259),
(942, 165, 259),
(943, 104, 260),
(944, 78, 260),
(945, 20, 260),
(946, 54, 260),
(947, 34, 260),
(948, 21, 260),
(949, 156, 260),
(950, 52, 261),
(951, 187, 262),
(952, 7, 263),
(953, 170, 264),
(954, 94, 264),
(955, 84, 265),
(956, 29, 265),
(957, 168, 265),
(958, 43, 265),
(959, 169, 266),
(960, 167, 266),
(961, 95, 266),
(962, 47, 266),
(963, 41, 266),
(964, 54, 266),
(965, 206, 267),
(966, 169, 267),
(967, 127, 267),
(968, 168, 267),
(969, 92, 268),
(970, 95, 268),
(971, 94, 268),
(972, 33, 268),
(973, 166, 268),
(974, 69, 268),
(975, 6, 268),
(976, 99, 269),
(977, 148, 269),
(978, 154, 269),
(979, 33, 269),
(980, 85, 269),
(981, 200, 270),
(982, 49, 271),
(983, 126, 271),
(984, 85, 271),
(985, 56, 271),
(986, 6, 271),
(987, 183, 272),
(988, 158, 273),
(989, 12, 274),
(990, 196, 274),
(991, 15, 274),
(992, 144, 274),
(993, 144, 274),
(994, 19, 274),
(995, 108, 274),
(996, 101, 275),
(997, 176, 275),
(998, 164, 275),
(999, 119, 275),
(1000, 132, 275),
(1001, 42, 275),
(1002, 176, 276),
(1003, 71, 276),
(1004, 60, 276),
(1005, 7, 276),
(1006, 73, 277),
(1007, 204, 277),
(1008, 146, 277),
(1009, 165, 277),
(1010, 132, 277),
(1011, 157, 277),
(1012, 185, 277),
(1013, 138, 278),
(1014, 156, 278),
(1015, 75, 279),
(1016, 144, 279),
(1017, 183, 280),
(1018, 56, 281),
(1019, 143, 281),
(1020, 177, 281),
(1021, 61, 281),
(1022, 26, 281),
(1023, 43, 281),
(1024, 60, 282),
(1025, 195, 283),
(1026, 112, 283),
(1027, 4, 283),
(1028, 62, 283),
(1029, 22, 283),
(1030, 141, 283),
(1031, 190, 284),
(1032, 151, 284),
(1033, 43, 285),
(1034, 35, 285),
(1035, 10, 285),
(1036, 30, 286),
(1037, 171, 286),
(1038, 17, 286),
(1039, 197, 287),
(1040, 108, 287),
(1041, 38, 287),
(1042, 166, 287),
(1043, 55, 287),
(1044, 203, 287),
(1045, 201, 288),
(1046, 132, 288),
(1047, 28, 289),
(1048, 9, 290),
(1049, 50, 290),
(1050, 124, 291),
(1051, 58, 291),
(1052, 161, 291),
(1053, 138, 291),
(1054, 134, 292),
(1055, 142, 293),
(1056, 97, 293),
(1057, 137, 293),
(1058, 129, 293),
(1059, 45, 293),
(1060, 30, 293),
(1061, 183, 293),
(1062, 48, 294),
(1063, 192, 294),
(1064, 102, 294),
(1065, 82, 294),
(1066, 40, 294),
(1067, 1, 295),
(1068, 175, 295),
(1069, 81, 295),
(1070, 205, 296),
(1071, 36, 296),
(1072, 164, 296),
(1073, 158, 296),
(1074, 26, 296),
(1075, 10, 297),
(1076, 145, 297),
(1077, 187, 297),
(1078, 176, 297),
(1079, 100, 298),
(1080, 192, 298),
(1081, 67, 298),
(1082, 12, 299),
(1083, 121, 299),
(1084, 174, 299),
(1085, 63, 299),
(1086, 115, 300),
(1087, 81, 300),
(1088, 168, 300),
(1089, 75, 300),
(1090, 137, 300),
(1091, 189, 300),
(1092, 37, 300),
(1093, 41, 301),
(1094, 92, 302),
(1095, 26, 302),
(1096, 123, 302),
(1097, 173, 302),
(1098, 167, 302),
(1099, 5, 302),
(1100, 184, 302),
(1101, 157, 303),
(1102, 187, 303),
(1103, 5, 304),
(1104, 38, 304),
(1105, 120, 304),
(1106, 41, 304),
(1107, 150, 304),
(1108, 165, 305),
(1109, 4, 305),
(1110, 147, 305),
(1111, 145, 306),
(1112, 7, 306),
(1113, 191, 306),
(1114, 148, 306),
(1115, 146, 306),
(1116, 52, 307),
(1117, 144, 307),
(1118, 84, 307),
(1119, 25, 307),
(1120, 6, 307),
(1121, 166, 308),
(1122, 121, 309),
(1123, 87, 309),
(1124, 185, 310),
(1125, 157, 310),
(1126, 105, 310),
(1127, 41, 310),
(1128, 139, 311),
(1129, 49, 311),
(1130, 166, 311),
(1131, 35, 311),
(1132, 172, 311),
(1133, 76, 312),
(1134, 106, 312),
(1135, 18, 312),
(1136, 78, 312),
(1137, 153, 313),
(1138, 196, 313),
(1139, 77, 314),
(1140, 97, 315),
(1141, 168, 315),
(1142, 200, 315),
(1143, 81, 316),
(1144, 4, 316),
(1145, 191, 316),
(1146, 167, 316),
(1147, 3, 316),
(1148, 202, 316),
(1149, 13, 317),
(1150, 48, 317),
(1151, 167, 317),
(1152, 61, 317),
(1153, 174, 318),
(1154, 126, 319),
(1155, 119, 319),
(1156, 23, 319),
(1157, 161, 319),
(1158, 2, 319),
(1159, 187, 319),
(1160, 185, 320),
(1161, 26, 320),
(1162, 61, 321),
(1163, 159, 321),
(1164, 29, 321),
(1165, 180, 322),
(1166, 155, 322),
(1167, 25, 322),
(1168, 139, 323),
(1169, 115, 323),
(1170, 114, 323),
(1171, 196, 324),
(1172, 15, 324),
(1173, 37, 324),
(1174, 115, 324),
(1175, 137, 324),
(1176, 83, 324),
(1177, 124, 325),
(1178, 126, 325),
(1179, 123, 325),
(1180, 157, 325),
(1181, 4, 325),
(1182, 189, 325),
(1183, 4, 326),
(1184, 48, 326),
(1185, 105, 326),
(1186, 18, 326),
(1187, 33, 326),
(1188, 159, 326),
(1189, 46, 327),
(1190, 97, 327),
(1191, 118, 328),
(1192, 35, 328),
(1193, 56, 328),
(1194, 24, 328),
(1195, 137, 328),
(1196, 67, 328),
(1197, 89, 329),
(1198, 192, 329),
(1199, 121, 329),
(1200, 104, 329),
(1201, 155, 330),
(1202, 35, 330),
(1203, 81, 330),
(1204, 102, 330),
(1205, 65, 331),
(1206, 208, 331),
(1207, 76, 331),
(1208, 92, 331),
(1209, 101, 331),
(1210, 84, 332),
(1211, 161, 332),
(1212, 50, 332),
(1213, 109, 332),
(1214, 79, 333),
(1215, 164, 333),
(1216, 116, 333),
(1217, 109, 333),
(1218, 166, 334),
(1219, 42, 334),
(1220, 130, 334),
(1221, 128, 334),
(1222, 14, 334),
(1223, 136, 334),
(1224, 201, 334),
(1225, 92, 335),
(1226, 40, 335),
(1227, 177, 335),
(1228, 187, 336),
(1229, 184, 336),
(1230, 75, 336),
(1231, 144, 336),
(1232, 143, 337),
(1233, 26, 337),
(1234, 182, 338),
(1235, 66, 338),
(1236, 73, 338),
(1237, 83, 338),
(1238, 21, 338),
(1239, 21, 338),
(1240, 90, 338),
(1241, 142, 339),
(1242, 158, 340),
(1243, 160, 340),
(1244, 202, 340),
(1245, 69, 340),
(1246, 82, 340),
(1247, 167, 340),
(1248, 158, 341),
(1249, 31, 341),
(1250, 91, 341),
(1251, 111, 341),
(1252, 102, 341),
(1253, 206, 341),
(1254, 91, 341),
(1255, 203, 342),
(1256, 187, 342),
(1257, 161, 342),
(1258, 113, 343),
(1259, 114, 343),
(1260, 54, 343),
(1261, 123, 344),
(1262, 143, 344),
(1263, 99, 344),
(1264, 27, 344),
(1265, 24, 344),
(1266, 32, 344),
(1267, 109, 344),
(1268, 189, 345),
(1269, 28, 345),
(1270, 11, 345),
(1271, 48, 345),
(1272, 149, 346),
(1273, 17, 346),
(1274, 107, 346),
(1275, 135, 346),
(1276, 83, 346),
(1277, 54, 346),
(1278, 26, 347),
(1279, 118, 348),
(1280, 160, 348),
(1281, 115, 348),
(1282, 33, 348),
(1283, 23, 349),
(1284, 33, 349),
(1285, 204, 349),
(1286, 21, 349),
(1287, 42, 349),
(1288, 137, 349),
(1289, 76, 350),
(1290, 55, 350),
(1291, 75, 350),
(1292, 174, 350),
(1293, 195, 350),
(1294, 48, 351),
(1295, 140, 351),
(1296, 129, 351),
(1297, 147, 351),
(1298, 5, 351),
(1299, 77, 351),
(1300, 162, 352),
(1301, 9, 352),
(1302, 147, 352),
(1303, 166, 352),
(1304, 185, 352),
(1305, 171, 353),
(1306, 15, 354),
(1307, 164, 354),
(1308, 174, 354),
(1309, 50, 354),
(1310, 196, 354),
(1311, 78, 355),
(1312, 62, 355),
(1313, 197, 355),
(1314, 83, 355),
(1315, 182, 356),
(1316, 189, 356),
(1317, 32, 356),
(1318, 95, 356),
(1319, 191, 356),
(1320, 148, 357),
(1321, 84, 357),
(1322, 69, 357),
(1323, 136, 357),
(1324, 69, 357),
(1325, 88, 358),
(1326, 88, 358),
(1327, 80, 358),
(1328, 116, 358),
(1329, 86, 358),
(1330, 32, 358),
(1331, 21, 358),
(1332, 116, 359),
(1333, 123, 359),
(1334, 17, 359),
(1335, 181, 359),
(1336, 32, 359),
(1337, 200, 360),
(1338, 191, 360),
(1339, 85, 360),
(1340, 24, 360),
(1341, 193, 361),
(1342, 9, 361),
(1343, 47, 361),
(1344, 135, 361),
(1345, 31, 361),
(1346, 113, 361),
(1347, 21, 362),
(1348, 116, 362),
(1349, 99, 362),
(1350, 80, 362),
(1351, 152, 362),
(1352, 3, 362),
(1353, 77, 362),
(1354, 96, 363),
(1355, 148, 363),
(1356, 41, 363),
(1357, 104, 363),
(1358, 109, 363),
(1359, 101, 364),
(1360, 182, 365),
(1361, 5, 365),
(1362, 150, 366),
(1363, 164, 367),
(1364, 82, 367),
(1365, 1, 367),
(1366, 113, 368),
(1367, 58, 369),
(1368, 114, 369),
(1369, 94, 369),
(1370, 48, 370),
(1371, 35, 371),
(1372, 98, 371),
(1373, 7, 372),
(1374, 12, 372),
(1375, 9, 372),
(1376, 39, 372),
(1377, 113, 372),
(1378, 84, 372),
(1379, 119, 372),
(1380, 159, 373),
(1381, 112, 373),
(1382, 52, 373),
(1383, 196, 373),
(1384, 128, 374),
(1385, 117, 374),
(1386, 136, 375),
(1387, 143, 375),
(1388, 54, 375),
(1389, 10, 375),
(1390, 53, 375),
(1391, 203, 376),
(1392, 166, 376),
(1393, 79, 376),
(1394, 160, 376),
(1395, 182, 376),
(1396, 65, 376),
(1397, 118, 377),
(1398, 98, 377),
(1399, 134, 377),
(1400, 138, 377),
(1401, 108, 378),
(1402, 48, 378),
(1403, 84, 378),
(1404, 198, 378),
(1405, 4, 378),
(1406, 65, 379),
(1407, 94, 379),
(1408, 181, 379),
(1409, 130, 379),
(1410, 29, 380),
(1411, 85, 380),
(1412, 198, 380),
(1413, 32, 381),
(1414, 130, 381),
(1415, 91, 381),
(1416, 130, 381),
(1417, 61, 381),
(1418, 160, 381),
(1419, 108, 381),
(1420, 128, 382),
(1421, 16, 382),
(1422, 167, 382),
(1423, 32, 382),
(1424, 30, 382),
(1425, 120, 382),
(1426, 103, 382),
(1427, 114, 382),
(1428, 155, 382),
(1429, 172, 383),
(1430, 10, 383),
(1431, 68, 383),
(1432, 192, 384),
(1433, 88, 384),
(1434, 195, 384),
(1435, 58, 384),
(1436, 156, 384),
(1437, 193, 385),
(1438, 144, 385),
(1439, 97, 385),
(1440, 126, 385),
(1441, 166, 385),
(1442, 45, 385),
(1443, 73, 386),
(1444, 156, 386),
(1445, 183, 386),
(1446, 199, 386),
(1447, 107, 387),
(1448, 18, 387),
(1449, 132, 387),
(1450, 2, 388),
(1451, 120, 388),
(1452, 198, 388),
(1453, 80, 388),
(1454, 59, 389),
(1455, 22, 389),
(1456, 116, 389),
(1457, 149, 389),
(1458, 13, 389),
(1459, 207, 389),
(1460, 77, 389),
(1461, 71, 390),
(1462, 207, 390),
(1463, 103, 390),
(1464, 146, 391),
(1465, 164, 391),
(1466, 78, 391),
(1467, 1, 391),
(1468, 198, 392),
(1469, 110, 392),
(1470, 168, 392),
(1471, 51, 392),
(1472, 34, 392),
(1473, 176, 392),
(1474, 194, 392),
(1475, 72, 392),
(1476, 77, 392),
(1477, 206, 393),
(1478, 1, 393),
(1479, 108, 393),
(1480, 155, 394),
(1481, 201, 394),
(1482, 91, 394),
(1483, 159, 394),
(1484, 194, 394),
(1485, 62, 394),
(1486, 148, 394),
(1487, 50, 394),
(1488, 198, 395),
(1489, 166, 395),
(1490, 196, 395),
(1491, 28, 396),
(1492, 1, 396),
(1493, 65, 396),
(1494, 63, 396),
(1495, 50, 396),
(1496, 62, 396),
(1497, 46, 397),
(1498, 200, 397),
(1499, 177, 397),
(1500, 8, 397),
(1501, 76, 397),
(1502, 190, 397),
(1503, 107, 397),
(1504, 180, 397),
(1505, 169, 398),
(1506, 95, 398),
(1507, 84, 398),
(1508, 124, 398),
(1509, 192, 398),
(1510, 185, 398),
(1511, 33, 398),
(1512, 172, 398),
(1513, 185, 398),
(1514, 19, 399),
(1515, 194, 399),
(1516, 49, 399),
(1517, 89, 400),
(1518, 147, 401),
(1519, 9, 401),
(1520, 85, 402),
(1521, 21, 402),
(1522, 76, 402),
(1523, 53, 402),
(1524, 96, 402),
(1525, 15, 402),
(1526, 18, 403),
(1527, 175, 403),
(1528, 140, 403),
(1529, 132, 403),
(1530, 180, 403),
(1531, 191, 404),
(1532, 76, 404),
(1533, 81, 404),
(1534, 203, 405),
(1535, 116, 405),
(1536, 4, 405),
(1537, 93, 405),
(1538, 133, 405),
(1539, 203, 405),
(1540, 35, 405),
(1541, 93, 405),
(1542, 100, 406),
(1543, 36, 407),
(1544, 206, 407),
(1545, 151, 407),
(1546, 112, 407),
(1547, 49, 408),
(1548, 146, 408),
(1549, 173, 408),
(1550, 23, 408),
(1551, 42, 408),
(1552, 101, 408),
(1553, 208, 408),
(1554, 186, 408),
(1555, 184, 409),
(1556, 33, 409),
(1557, 186, 409),
(1558, 174, 410),
(1559, 63, 410),
(1560, 126, 410),
(1561, 106, 410),
(1562, 171, 410),
(1563, 94, 410),
(1564, 56, 411),
(1565, 169, 411),
(1566, 23, 411),
(1567, 98, 411),
(1568, 150, 411),
(1569, 9, 412),
(1570, 45, 412),
(1571, 77, 412),
(1572, 92, 412),
(1573, 173, 412),
(1574, 11, 412),
(1575, 164, 412),
(1576, 184, 412),
(1577, 56, 413),
(1578, 21, 413),
(1579, 171, 413),
(1580, 4, 413),
(1581, 65, 413),
(1582, 136, 413),
(1583, 41, 413),
(1584, 15, 413),
(1585, 115, 414),
(1586, 12, 414),
(1587, 171, 414),
(1588, 196, 414),
(1589, 151, 414),
(1590, 140, 414),
(1591, 152, 414),
(1592, 89, 414),
(1593, 192, 415),
(1594, 175, 415),
(1595, 151, 415),
(1596, 10, 415),
(1597, 85, 415),
(1598, 121, 416),
(1599, 111, 416),
(1600, 97, 416),
(1601, 37, 416),
(1602, 172, 416),
(1603, 106, 416),
(1604, 103, 416),
(1605, 92, 416),
(1606, 193, 417),
(1607, 57, 417),
(1608, 132, 417),
(1609, 148, 418),
(1610, 84, 418),
(1611, 67, 418),
(1612, 152, 418),
(1613, 85, 419),
(1614, 40, 419),
(1615, 12, 419),
(1616, 191, 419),
(1617, 50, 419),
(1618, 63, 420),
(1619, 1, 420),
(1620, 89, 420),
(1621, 149, 420),
(1622, 118, 420),
(1623, 58, 421),
(1624, 195, 421),
(1625, 65, 421),
(1626, 196, 421),
(1627, 164, 421),
(1628, 188, 421),
(1629, 134, 421),
(1630, 118, 421),
(1631, 130, 421),
(1632, 103, 422),
(1633, 44, 422),
(1634, 203, 422),
(1635, 35, 423),
(1636, 27, 423),
(1637, 91, 423),
(1638, 129, 423),
(1639, 33, 423),
(1640, 72, 424),
(1641, 48, 424),
(1642, 106, 424),
(1643, 9, 424),
(1644, 7, 424),
(1645, 18, 424),
(1646, 60, 425),
(1647, 12, 425),
(1648, 72, 425),
(1649, 141, 425),
(1650, 60, 425),
(1651, 142, 425),
(1652, 104, 426),
(1653, 159, 426),
(1654, 6, 426),
(1655, 148, 426),
(1656, 162, 426),
(1657, 48, 427),
(1658, 146, 427),
(1659, 138, 427),
(1660, 196, 427),
(1661, 193, 427),
(1662, 141, 427),
(1663, 187, 427),
(1664, 187, 428),
(1665, 6, 428),
(1666, 150, 428),
(1667, 176, 428),
(1668, 35, 428),
(1669, 134, 428),
(1670, 23, 429),
(1671, 160, 429),
(1672, 176, 429),
(1673, 139, 429),
(1674, 137, 429),
(1675, 165, 429),
(1676, 111, 429),
(1677, 73, 429),
(1678, 160, 430),
(1679, 28, 430),
(1680, 24, 430),
(1681, 1, 430),
(1682, 90, 430),
(1683, 16, 430),
(1684, 50, 431),
(1685, 106, 431),
(1686, 55, 431),
(1687, 11, 431),
(1688, 157, 431),
(1689, 80, 431),
(1690, 70, 431),
(1691, 14, 432),
(1692, 50, 432),
(1693, 191, 432),
(1694, 59, 432),
(1695, 129, 433),
(1696, 14, 433),
(1697, 22, 433),
(1698, 60, 433),
(1699, 47, 433),
(1700, 59, 434),
(1701, 198, 434),
(1702, 24, 434),
(1703, 124, 434),
(1704, 112, 434),
(1705, 153, 434),
(1706, 98, 434),
(1707, 122, 434),
(1708, 91, 434),
(1709, 93, 435),
(1710, 176, 436),
(1711, 207, 436),
(1712, 112, 436),
(1713, 174, 436),
(1714, 67, 437),
(1715, 141, 437),
(1716, 163, 437),
(1717, 109, 438),
(1718, 96, 438),
(1719, 144, 439),
(1720, 24, 439),
(1721, 168, 440),
(1722, 200, 440),
(1723, 122, 440),
(1724, 125, 440),
(1725, 17, 440),
(1726, 84, 440),
(1727, 197, 440),
(1728, 8, 441),
(1729, 125, 441),
(1730, 5, 441),
(1731, 80, 441),
(1732, 95, 441),
(1733, 123, 442),
(1734, 49, 442),
(1735, 133, 442),
(1736, 110, 442),
(1737, 184, 442),
(1738, 141, 443),
(1739, 194, 443),
(1740, 150, 443),
(1741, 116, 443),
(1742, 136, 443),
(1743, 180, 443),
(1744, 148, 443),
(1745, 174, 444),
(1746, 88, 444),
(1747, 152, 444),
(1748, 143, 445),
(1749, 151, 446),
(1750, 151, 446),
(1751, 4, 446),
(1752, 63, 446),
(1753, 153, 446),
(1754, 197, 446),
(1755, 78, 446),
(1756, 165, 447),
(1757, 110, 447),
(1758, 189, 447),
(1759, 183, 447),
(1760, 2, 448),
(1761, 119, 448),
(1762, 110, 449),
(1763, 146, 449),
(1764, 115, 450),
(1765, 36, 450),
(1766, 72, 451),
(1767, 61, 451),
(1768, 1, 451),
(1769, 128, 451),
(1770, 178, 451),
(1771, 107, 452),
(1772, 94, 453),
(1773, 137, 453),
(1774, 158, 453),
(1775, 128, 453),
(1776, 61, 453),
(1777, 143, 453),
(1778, 36, 454),
(1779, 127, 454),
(1780, 171, 454),
(1781, 63, 454),
(1782, 34, 454),
(1783, 21, 454),
(1784, 145, 454),
(1785, 7, 454),
(1786, 83, 455),
(1787, 95, 455),
(1788, 200, 455),
(1789, 127, 455),
(1790, 79, 455),
(1791, 48, 456),
(1792, 68, 456),
(1793, 125, 456),
(1794, 207, 456),
(1795, 100, 456),
(1796, 86, 457),
(1797, 168, 457),
(1798, 164, 458),
(1799, 157, 458),
(1800, 143, 458),
(1801, 70, 458),
(1802, 66, 459),
(1803, 133, 459),
(1804, 79, 459),
(1805, 121, 459),
(1806, 157, 459),
(1807, 93, 459),
(1808, 53, 459),
(1809, 209, 460),
(1810, 8, 460),
(1811, 9, 460),
(1812, 177, 461),
(1813, 171, 461),
(1814, 94, 461),
(1815, 95, 461),
(1816, 68, 461),
(1817, 129, 461),
(1818, 163, 461),
(1819, 76, 462),
(1820, 188, 462),
(1821, 50, 462),
(1822, 151, 462),
(1823, 129, 462);
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `users`
--
CREATE TABLE `users` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dökümü yapılmış tablolar için indeksler
--
--
-- Tablo için indeksler `failed_jobs`
--
ALTER TABLE `failed_jobs`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);
--
-- Tablo için indeksler `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Tablo için indeksler `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`);
--
-- Tablo için indeksler `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`);
--
-- Tablo için indeksler `products`
--
ALTER TABLE `products`
ADD PRIMARY KEY (`product_id`),
ADD UNIQUE KEY `products_name_unique` (`name`);
--
-- Tablo için indeksler `receipt`
--
ALTER TABLE `receipt`
ADD PRIMARY KEY (`receipt_id`);
--
-- Tablo için indeksler `receipts_products`
--
ALTER TABLE `receipts_products`
ADD PRIMARY KEY (`id`),
ADD KEY `receipts_products_product_foreign` (`product`),
ADD KEY `receipts_products_receipt_foreign` (`receipt`);
--
-- Tablo için indeksler `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`);
--
-- Dökümü yapılmış tablolar için AUTO_INCREMENT değeri
--
--
-- Tablo için AUTO_INCREMENT değeri `failed_jobs`
--
ALTER TABLE `failed_jobs`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- Tablo için AUTO_INCREMENT değeri `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- Tablo için AUTO_INCREMENT değeri `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- Tablo için AUTO_INCREMENT değeri `products`
--
ALTER TABLE `products`
MODIFY `product_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=210;
--
-- Tablo için AUTO_INCREMENT değeri `receipt`
--
ALTER TABLE `receipt`
MODIFY `receipt_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=463;
--
-- Tablo için AUTO_INCREMENT değeri `receipts_products`
--
ALTER TABLE `receipts_products`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1824;
--
-- Tablo için AUTO_INCREMENT değeri `users`
--
ALTER TABLE `users`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- Dökümü yapılmış tablolar için kısıtlamalar
--
--
-- Tablo kısıtlamaları `receipts_products`
--
ALTER TABLE `receipts_products`
ADD CONSTRAINT `receipts_products_product_foreign` FOREIGN KEY (`product`) REFERENCES `products` (`product_id`) ON DELETE CASCADE,
ADD CONSTRAINT `receipts_products_receipt_foreign` FOREIGN KEY (`receipt`) REFERENCES `receipt` (`receipt_id`) ON DELETE CASCADE;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
USE [ReadingXML]
GO
/****** Object: Table [dbo].[Authors] Script Date: 11/27/2016 16:05:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Authors](
[au_id] [nvarchar](50) NULL,
[au_lname] [nvarchar](50) NULL,
[phone] [nvarchar](50) NULL,
[address] [nvarchar](50) NULL,
[city] [nvarchar](50) NULL,
[state] [nvarchar](2) NULL,
[zip] [nvarchar](10) NULL,
[contract] [bit] NULL
) ON [PRIMARY]
GO
|
INSERT INTO blog.hibernate_sequence (next_val) VALUES (48);
INSERT INTO blog.hibernate_sequence (next_val) VALUES (48);
INSERT INTO blog.hibernate_sequence (next_val) VALUES (48);
INSERT INTO blog.hibernate_sequence (next_val) VALUES (48);
INSERT INTO blog.hibernate_sequence (next_val) VALUES (48); |
<reponame>pierresebastien/TourDeFrance<gh_stars>0
CREATE TABLE "versions"
(
"major" integer,
"minor" integer,
"patch" integer,
PRIMARY KEY("major", "minor", "patch")
);
CREATE TABLE "config"
(
"key" citext NOT NULL,
"value" text NULL,
"default_value" text NULL,
"display_name" text NULL,
"description" text NULL,
"validation_regex" text NULL,
"type" text NOT NULL,
"order" integer NOT NULL,
"dangerous" boolean NOT NULL,
"id" uuid PRIMARY KEY,
"creation_date" timestamp NOT NULL,
"last_update_date" timestamp NOT NULL,
"last_update_by" text NULL
);
CREATE UNIQUE INDEX uidx_config_key ON "config" ("key" ASC);
CREATE TABLE "users"
(
"username" citext NOT NULL,
"password" text NULL,
"salt" text NULL,
"first_name" citext NULL,
"last_name" citext NULL,
"gender" text NOT NULL,
"birth_date" timestamp NULL,
"email" citext NULL,
"is_administrator" boolean NOT NULL,
"is_blocked" boolean NOT NULL,
"is_disabled" boolean NOT NULL,
"last_password_change_date" timestamp NOT NULL,
"previous_passwords" text NULL,
"require_new_password_at_logon" boolean NOT NULL,
"number_of_failed_attempts" integer NOT NULL,
"api_key" citext NULL,
"height" numeric(38,6) NULL,
"weight" numeric(38,6) NULL,
"id" uuid PRIMARY KEY,
"creation_date" timestamp NOT NULL,
"last_update_date" timestamp NOT NULL,
"last_update_by" text NULL
);
CREATE UNIQUE INDEX uidx_users_username ON "users" ("username" ASC);
CREATE TABLE "global_mail_templates"
(
"template" text NULL,
"name" citext NULL,
"id" uuid PRIMARY KEY,
"creation_date" timestamp NOT NULL,
"last_update_date" timestamp NOT NULL,
"last_update_by" text NULL
);
CREATE UNIQUE INDEX uidx_global_mail_templates_name ON "global_mail_templates" ("name" ASC);
CREATE TABLE "mail_templates"
(
"global_mail_template_id" uuid NOT NULL,
"default_mail_template_id" uuid NULL,
"type" text NULL,
"subject_template" text NULL,
"title_template" text NULL,
"sub_title_template" text NULL,
"body_template" text NULL,
"footer_template" text NULL,
"number_of_override" integer NULL,
"owner" uuid NOT NULL,
"name" citext NULL,
"id" uuid PRIMARY KEY,
"creation_date" timestamp NOT NULL,
"last_update_date" timestamp NOT NULL,
"last_update_by" text NULL,
CONSTRAINT "FK_mail_templates_global_mail_templates_global_mail_template_id" FOREIGN KEY ("global_mail_template_id") REFERENCES "global_mail_templates" ("id"),
CONSTRAINT "FK_mail_templates_mail_templates_default_mail_template_id" FOREIGN KEY ("default_mail_template_id") REFERENCES "mail_templates" ("id"),
CONSTRAINT "FK_mail_templates_users_owner" FOREIGN KEY ("owner") REFERENCES "users" ("id")
);
CREATE UNIQUE INDEX uidx_mail_templates_name ON "mail_templates" ("name" ASC);
CREATE TABLE "drinks"
(
"alcohol_by_volume" numeric(38,6) NULL,
"volume" numeric(38,6) NULL,
"owner" uuid NOT NULL,
"name" citext NULL,
"id" uuid PRIMARY KEY,
"creation_date" timestamp NOT NULL,
"last_update_date" timestamp NOT NULL,
"last_update_by" text NULL,
CONSTRAINT "FK_drinks_users_owner" FOREIGN KEY ("owner") REFERENCES "users" ("id")
);
CREATE UNIQUE INDEX uidx_drinks_name ON "drinks" ("name" ASC);
CREATE TABLE "sub_drinks"
(
"drink_id" uuid NOT NULL,
"sub_drink_id" uuid NOT NULL,
"volume" numeric(38,6) NOT NULL,
"id" uuid PRIMARY KEY,
"creation_date" timestamp NOT NULL,
"last_update_date" timestamp NOT NULL,
"last_update_by" text NULL,
CONSTRAINT "FK_sub_drinks_drinks_drink_id" FOREIGN KEY ("drink_id") REFERENCES "drinks" ("id"),
CONSTRAINT "FK_sub_drinks_drinks_sub_drink_id" FOREIGN KEY ("sub_drink_id") REFERENCES "drinks" ("id")
);
CREATE TABLE "stages"
(
"duration" integer NOT NULL,
"owner" uuid NOT NULL,
"name" citext NULL,
"id" uuid PRIMARY KEY,
"creation_date" timestamp NOT NULL,
"last_update_date" timestamp NOT NULL,
"last_update_by" text NULL,
CONSTRAINT "FK_stages_users_owner" FOREIGN KEY ("owner") REFERENCES "users" ("id")
);
CREATE UNIQUE INDEX uidx_stages_name ON "stages" ("name" ASC);
CREATE TABLE "stage_drinks"
(
"stage_id" uuid NOT NULL,
"drink_id" uuid NOT NULL,
"order" integer NOT NULL,
"overrided_volume" numeric(38,6) NULL,
"number_to_drink" integer NOT NULL,
"type" text NULL,
"id" uuid PRIMARY KEY,
"creation_date" timestamp NOT NULL,
"last_update_date" timestamp NOT NULL,
"last_update_by" text NULL,
CONSTRAINT "FK_stage_drinks_stages_stage_id" FOREIGN KEY ("stage_id") REFERENCES "stages" ("id"),
CONSTRAINT "FK_stage_drinks_races_race_id" FOREIGN KEY ("drink_id") REFERENCES "drinks" ("id")
);
CREATE TABLE "races"
(
"owner" uuid NOT NULL,
"name" citext NULL,
"id" uuid PRIMARY KEY,
"creation_date" timestamp NOT NULL,
"last_update_date" timestamp NOT NULL,
"last_update_by" text NULL,
CONSTRAINT "FK_races_users_owner" FOREIGN KEY ("owner") REFERENCES "users" ("id")
);
CREATE UNIQUE INDEX uidx_races_name ON "races" ("name" ASC);
CREATE TABLE "race_stages"
(
"stage_id" uuid NOT NULL,
"race_id" uuid NOT NULL,
"order" integer NOT NULL,
"id" uuid PRIMARY KEY,
"creation_date" timestamp NOT NULL,
"last_update_date" timestamp NOT NULL,
"last_update_by" text NULL,
CONSTRAINT "FK_race_stages_stages_stage_id" FOREIGN KEY ("stage_id") REFERENCES "stages" ("id"),
CONSTRAINT "FK_race_stages_races_race_id" FOREIGN KEY ("race_id") REFERENCES "races" ("id")
);
CREATE TABLE "teams"
(
"logo" bytea NULL,
"owner" uuid NOT NULL,
"name" citext NULL,
"id" uuid PRIMARY KEY,
"creation_date" timestamp NOT NULL,
"last_update_date" timestamp NOT NULL,
"last_update_by" text NULL,
CONSTRAINT "FK_teams_users_owner" FOREIGN KEY ("owner") REFERENCES "users" ("id")
);
CREATE UNIQUE INDEX uidx_teams_name ON "teams" ("name" ASC);
CREATE TABLE "riders"
(
"first_name" citext NULL,
"last_name" citext NULL,
"gender" text NOT NULL,
"birth_date" timestamp NULL,
"nationality" text NULL,
"height" numeric(38,6) NULL,
"weight" numeric(38,6) NULL,
"picture" bytea NULL,
"team_id" uuid NOT NULL,
"owner" uuid NOT NULL,
"id" uuid PRIMARY KEY,
"creation_date" timestamp NOT NULL,
"last_update_date" timestamp NOT NULL,
"last_update_by" text NULL,
CONSTRAINT "FK_riders_teams_team_id" FOREIGN KEY ("team_id") REFERENCES "teams" ("id"),
CONSTRAINT "FK_riders_users_owner" FOREIGN KEY ("owner") REFERENCES "users" ("id")
);
CREATE TABLE "games"
(
"race_id" uuid NOT NULL,
"status" text NOT NULL,
"is_strict" boolean NOT NULL,
"auto_pause" boolean NOT NULL,
"owner" uuid NOT NULL,
"id" uuid PRIMARY KEY,
"creation_date" timestamp NOT NULL,
"last_update_date" timestamp NOT NULL,
"last_update_by" text NULL,
CONSTRAINT "FK_games_races_race_id" FOREIGN KEY ("race_id") REFERENCES "races" ("id"),
CONSTRAINT "FK_games_users_owner" FOREIGN KEY ("owner") REFERENCES "users" ("id")
);
CREATE TABLE "players"
(
"nickname" citext NULL,
"first_name" citext NULL,
"last_name" citext NULL,
"gender" text NOT NULL,
"birth_date" timestamp NULL,
"height" numeric(38,6) NULL,
"weight" numeric(38,6) NULL,
"owner" uuid NOT NULL,
"id" uuid PRIMARY KEY,
"creation_date" timestamp NOT NULL,
"last_update_date" timestamp NOT NULL,
"last_update_by" text NULL,
CONSTRAINT "FK_players_users_owner" FOREIGN KEY ("owner") REFERENCES "users" ("id")
);
CREATE UNIQUE INDEX uidx_players_nickname ON "players" ("nickname" ASC);
CREATE UNIQUE INDEX uidx_players_first_name_last_name ON "players" ("first_name", "last_name" ASC);
CREATE TABLE "game_participants"
(
"game_id" uuid NOT NULL,
"player_id" uuid NULL,
"user_id" uuid NULL,
"team_id" uuid NOT NULL,
"rider_id" uuid NULL,
"id" uuid PRIMARY KEY,
"creation_date" timestamp NOT NULL,
"last_update_date" timestamp NOT NULL,
"last_update_by" text NULL,
CONSTRAINT "FK_game_participants_games_game_id" FOREIGN KEY ("game_id") REFERENCES "games" ("id"),
CONSTRAINT "FK_game_participants_players_player_id" FOREIGN KEY ("player_id") REFERENCES "players" ("id"),
CONSTRAINT "FK_game_participants_users_user_id" FOREIGN KEY ("user_id") REFERENCES "users" ("id"),
CONSTRAINT "FK_game_participants_teams_team_id" FOREIGN KEY ("team_id") REFERENCES "teams" ("id"),
CONSTRAINT "FK_game_participants_riders_rider_id" FOREIGN KEY ("rider_id") REFERENCES "riders" ("id")
);
CREATE TABLE "logs"
(
"game_id" uuid NULL,
"user_id" uuid NULL,
"game_participant_id" uuid NULL,
"date" timestamp NOT NULL,
"type" text NOT NULL,
"parameters" text NULL,
"id" uuid PRIMARY KEY,
"creation_date" timestamp NOT NULL,
"last_update_date" timestamp NOT NULL,
"last_update_by" text NULL,
CONSTRAINT "FK_logs_games_game_id" FOREIGN KEY ("game_id") REFERENCES "games" ("id"),
CONSTRAINT "FK_logs_users_user_id" FOREIGN KEY ("user_id") REFERENCES "users" ("id"),
CONSTRAINT "FK_logs_game_participants_game_participant_id" FOREIGN KEY ("game_participant_id") REFERENCES "game_participants" ("id")
);
CREATE TABLE "scores"
(
"game_participant_id" uuid NOT NULL,
"stage_id" uuid NOT NULL,
"drink_id" uuid NOT NULL,
"number" integer NOT NULL,
"id" uuid PRIMARY KEY,
"creation_date" timestamp NOT NULL,
"last_update_date" timestamp NOT NULL,
"last_update_by" text NULL,
CONSTRAINT "FK_scores_game_participants_game_participant_id" FOREIGN KEY ("game_participant_id") REFERENCES "game_participants" ("id"),
CONSTRAINT "FK_scores_stages_stage_id" FOREIGN KEY ("stage_id") REFERENCES "stages" ("id"),
CONSTRAINT "FK_scores_drinks_drink_id" FOREIGN KEY ("drink_id") REFERENCES "drinks" ("id")
); |
CREATE TABLE PerfmonMessage (
Id VARCHAR(30) NOT NULL PRIMARY KEY,
Words VARCHAR(512),
Numbers VARCHAR(512),
Alpha VARCHAR(512)
);
|
<reponame>Medicyl/MedEasy<filename>medeasy.sql
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 15, 2018 at 07:46 PM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.6.23
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: `medeasy`
--
-- --------------------------------------------------------
--
-- Table structure for table `product`
--
CREATE TABLE `product` (
`p_id` int(11) NOT NULL,
`p_name` varchar(50) NOT NULL,
`p_alt_name` varchar(50) NOT NULL,
`p_mfg_date` date NOT NULL,
`p_exp_date` date NOT NULL,
`p_hsn_code` varchar(20) NOT NULL,
`p_description` varchar(1000) NOT NULL,
`p_quantity` int(11) NOT NULL,
`p_type` varchar(20) NOT NULL,
`p_presc` int(11) NOT NULL,
`p_price` int(11) NOT NULL,
`p_image` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `product`
--
INSERT INTO `product` (`p_id`, `p_name`, `p_alt_name`, `p_mfg_date`, `p_exp_date`, `p_hsn_code`, `p_description`, `p_quantity`, `p_type`, `p_presc`, `p_price`, `p_image`) VALUES
(1, 'Crocin', 'cr', '2018-08-01', '2020-08-02', '123', 'Paracetamol', 5, 'tablet', 0, 20, 'http://4.imimg.com/data4/TY/FX/GLADMIN-185846/crocin-advance-tablet-250x250.jpg'),
(2, 'Saridon', 'sar', '2018-08-01', '2020-07-05', '1234', 'Headache', 10, 'tablet', 0, 10, 'https://5.imimg.com/data5/KX/QL/GLADMIN-2123920/saridon-250x250.jpg'),
(3, 'CoughQ', 'cog', '2017-08-02', '2020-08-02', '12345', 'Cold', 14, 'Liquid', 1, 100, 'https://5.imimg.com/data5/LQ/DO/MY-8336070/zyrocold-cough-syrup-250x250.jpg'),
(4, 'CoughQ', 'cq', '2018-10-11', '2018-10-27', '486486', 'Coughq is good for cold.', 100, 'tablet', 0, 30, 'https://3.imimg.com/data3/GU/LG/MY-7821106/azitro-500mg-tablet-250x250.jpg'),
(5, 'dettol', 'dettolantiseptic', '2018-10-12', '2018-10-31', '4165', 'Antiseptic', 789, 'liquid', 0, 50, 'https://5.imimg.com/data5/CL/KF/MY-10537017/liquid-handwash-250x250.jpg'),
(6, 'dettol', 'dettolantiseptic', '2018-10-12', '2018-10-31', '4165', 'Antiseptic', 789, 'liquid', 1, 45, 'https://5.imimg.com/data5/BS/HH/MY-27129570/dettol-aloe-liquid-handwash-250x250.png'),
(7, 'moov', 'moovointment', '2018-10-02', '2018-10-19', '5145', 'Ointment', 54, 'cream', 0, 20, 'https://5.imimg.com/data5/QP/BQ/GLADMIN-9989194/moov-cream-backpain-specialist-10g-250x250.jpg'),
(8, '<NAME>', 'zbalm', '2018-10-23', '2018-10-31', '153', 'Balm', 54, 'cream', 0, 30, 'https://3.imimg.com/data3/VL/RQ/MY-3394706/zandu-balm-25-ml-250x250.jpg'),
(9, 'eno', 'eno', '2018-09-12', '2018-10-19', '4164', 'Eno is used for gastric diseases.', 16, 'powder', 0, 5, 'https://5.imimg.com/data5/AG/TT/MY-25574894/eno-orange-sachet-5gm-250x250.png'),
(10, 'relispray', 'Relispray', '2018-10-03', '2018-10-26', '54165', 'Used for pain relief.', 55, 'Spray', 0, 60, 'https://3.imimg.com/data3/CF/NU/MY-2529238/relispray-pain-relief-spray-250x250.jpg');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`u_id` int(11) NOT NULL,
`u_fname` varchar(20) NOT NULL,
`u_lname` varchar(20) NOT NULL,
`u_type` int(11) NOT NULL,
`u_mail` varchar(100) NOT NULL,
`u_phone` int(11) NOT NULL,
`u_password` varchar(256) NOT NULL,
`u_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`u_birth` date NOT NULL,
`u_propic` varchar(20) DEFAULT NULL,
`u_gender` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`u_id`, `u_fname`, `u_lname`, `u_type`, `u_mail`, `u_phone`, `u_password`, `u_timestamp`, `u_birth`, `u_propic`, `u_gender`) VALUES
(1, 'Mihir', '', 1, '<EMAIL>', 100, 'mihir', '2018-08-14 10:03:35', '1998-05-05', 'none', 0),
(2, 'Priyam', '', 1, '<EMAIL>', 101, 'priyam', '2018-08-14 10:05:35', '1998-05-26', 'none', 0),
(3, 'Devansh', '', 1, '<EMAIL>', 102, 'devansh', '2018-08-14 10:08:14', '1998-07-15', 'none', 0),
(4, 'Sharvai', '', 0, '<EMAIL>', 103, 'sharvai', '2018-08-14 10:08:14', '1998-04-22', 'none', 0),
(5, 'Amit', '', 0, '<EMAIL>', 104, 'amit', '2018-08-14 10:09:11', '1998-02-10', 'none', 0),
(16, 'A', 'b', 0, '<EMAIL>', 464151, '$2y$15$kilfqkh9cTUS2VykS5mwY.wyaM8qDFc5MMWoSA8xp7e0G7uFcMnH6', '2018-09-17 18:11:56', '2014-02-02', NULL, 0),
(18, 'bechohsdj', 'bejkbfkrbfgkjrb', 0, '<EMAIL>', 123456789, '$2y$15$oIbpI4EyBbjYYgRe65YKPuZLOoBfOQgPaqrH2wQecSZOVfuuhjrGW', '2018-10-14 17:00:58', '2015-10-09', NULL, 1),
(19, 'ADMIN', 'Medeasy', 0, '<EMAIL>', 1111222233, '$2y$15$JQIRua.WCQ1Q2JiAFsSALOvLTlIe6pXtG71yRnFbQn8rf8lrJ3w0y', '2018-10-13 09:23:17', '2016-11-01', NULL, 0);
-- --------------------------------------------------------
--
-- Table structure for table `user_cart`
--
CREATE TABLE `user_cart` (
`cart_id` int(11) NOT NULL,
`p_id` int(11) NOT NULL,
`u_id` int(11) NOT NULL,
`total_amt` int(11) NOT NULL,
`payment` int(11) NOT NULL,
`payment_type` varchar(50) NOT NULL,
`dis_amt` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `user_cart`
--
INSERT INTO `user_cart` (`cart_id`, `p_id`, `u_id`, `total_amt`, `payment`, `payment_type`, `dis_amt`) VALUES
(1, 1, 1, 20, 1, 'Credit Card', 5),
(2, 2, 2, 10, 1, 'Cash', 3),
(3, 3, 3, 20, 1, 'Credit Card', 10);
-- --------------------------------------------------------
--
-- Table structure for table `user_med_rep`
--
CREATE TABLE `user_med_rep` (
`umr_id` int(11) NOT NULL,
`u_id` int(11) NOT NULL,
`report_files` varchar(100) NOT NULL,
`disease` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `product`
--
ALTER TABLE `product`
ADD PRIMARY KEY (`p_id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`u_id`),
ADD KEY `ind2` (`u_fname`),
ADD KEY `ind1` (`u_phone`),
ADD KEY `ind3` (`u_fname`,`u_phone`);
--
-- Indexes for table `user_cart`
--
ALTER TABLE `user_cart`
ADD PRIMARY KEY (`cart_id`),
ADD KEY `u_id` (`u_id`),
ADD KEY `p_id` (`p_id`);
--
-- Indexes for table `user_med_rep`
--
ALTER TABLE `user_med_rep`
ADD PRIMARY KEY (`umr_id`),
ADD KEY `u_id` (`u_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `product`
--
ALTER TABLE `product`
MODIFY `p_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `u_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;
--
-- AUTO_INCREMENT for table `user_cart`
--
ALTER TABLE `user_cart`
MODIFY `cart_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `user_med_rep`
--
ALTER TABLE `user_med_rep`
MODIFY `umr_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `user_cart`
--
ALTER TABLE `user_cart`
ADD CONSTRAINT `user_cart_ibfk_1` FOREIGN KEY (`u_id`) REFERENCES `users` (`u_id`) ON UPDATE CASCADE,
ADD CONSTRAINT `user_cart_ibfk_2` FOREIGN KEY (`p_id`) REFERENCES `product` (`p_id`) ON UPDATE CASCADE;
--
-- Constraints for table `user_med_rep`
--
ALTER TABLE `user_med_rep`
ADD CONSTRAINT `user_med_rep_ibfk_1` FOREIGN KEY (`u_id`) REFERENCES `users` (`u_id`) ON UPDATE CASCADE;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
create table users (
user_id serial primary key
, login varchar(50) unique
, email varchar(50) unique
, password varchar(256)
, enabled boolean
, admin boolean
, last_login timestamp without time zone default (now() at time zone 'utc')
, data json -- dont know maybe will have user preferences and stuff like that ;)
); |
BEGIN;
ALTER TABLE sessions
DROP CONSTRAINT active_must_have_join_id;
COMMIT;
|
--
-- CzechIdM 8 Flyway script
-- BCV solutions s.r.o.
--
-- empty script - fill up missed version
|
INSERT INTO public.lineitem VALUES (5921955, 131403, 3917, 4, 36, 51638.40, 0.00, 0.06, 'R', 'F', '1993-07-06', '1993-06-28', '1993-07-09', 'DELIVER IN PERSON ', 'REG AIR ', ' slyly unusual deposits against the pen');
INSERT INTO public.lineitem VALUES (77191, 59441, 6957, 5, 39, 54617.16, 0.00, 0.02, 'A', 'F', '1992-07-22', '1992-07-27', '1992-08-12', 'NONE ', 'MAIL ', ' furiously even deposits');
INSERT INTO public.lineitem VALUES (5175712, 174153, 4154, 2, 19, 23315.85, 0.03, 0.03, 'R', 'F', '1992-10-17', '1992-11-28', '1992-11-09', 'NONE ', 'FOB ', ' regular packages are requests.');
INSERT INTO public.lineitem VALUES (3355618, 81117, 6134, 2, 22, 24158.42, 0.03, 0.06, 'R', 'F', '1994-07-18', '1994-06-06', '1994-08-08', 'DELIVER IN PERSON ', 'FOB ', 'r accounts. slyly ironic instructions c');
INSERT INTO public.lineitem VALUES (262338, 18418, 3421, 2, 48, 64147.68, 0.02, 0.03, 'N', 'O', '1998-03-15', '1998-03-22', '1998-03-31', 'NONE ', 'TRUCK ', 'ts. special, bold grouches haggle ');
INSERT INTO public.lineitem VALUES (5075776, 199682, 4721, 4, 17, 30288.56, 0.00, 0.02, 'N', 'O', '1995-10-04', '1995-10-17', '1995-10-19', 'NONE ', 'RAIL ', 'c accounts impress quickly among the regula');
INSERT INTO public.lineitem VALUES (3369760, 180591, 5628, 1, 37, 61848.83, 0.06, 0.07, 'N', 'O', '1995-07-14', '1995-07-17', '1995-07-22', 'NONE ', 'SHIP ', 'ding requests after the special pinto');
INSERT INTO public.lineitem VALUES (4119777, 109844, 7375, 6, 46, 85276.64, 0.02, 0.05, 'R', 'F', '1992-10-13', '1992-11-03', '1992-10-28', 'NONE ', 'FOB ', 'slyly. furiously ironic');
INSERT INTO public.lineitem VALUES (2009857, 197531, 5089, 2, 34, 55370.02, 0.06, 0.08, 'N', 'O', '1997-07-11', '1997-08-06', '1997-07-31', 'NONE ', 'RAIL ', 'y silent m');
INSERT INTO public.lineitem VALUES (1167523, 95770, 789, 3, 28, 49441.56, 0.06, 0.02, 'N', 'O', '1995-09-05', '1995-09-28', '1995-09-19', 'COLLECT COD ', 'FOB ', 'ependencies. slyly ');
INSERT INTO public.lineitem VALUES (1040868, 53489, 8500, 3, 30, 43274.40, 0.01, 0.01, 'R', 'F', '1994-09-21', '1994-09-08', '1994-10-15', 'NONE ', 'TRUCK ', ' bold foxes cajole fur');
INSERT INTO public.lineitem VALUES (2341477, 15791, 3295, 7, 2, 3413.58, 0.04, 0.08, 'N', 'O', '1997-04-30', '1997-06-17', '1997-05-23', 'DELIVER IN PERSON ', 'REG AIR ', ' slyly regular accounts wake qui');
INSERT INTO public.lineitem VALUES (1067680, 191652, 1653, 2, 38, 66258.70, 0.08, 0.00, 'R', 'F', '1995-03-12', '1995-02-24', '1995-04-05', 'COLLECT COD ', 'TRUCK ', ' excuses. b');
INSERT INTO public.lineitem VALUES (1621829, 82514, 7531, 5, 1, 1496.51, 0.08, 0.07, 'A', 'F', '1993-08-04', '1993-06-16', '1993-08-20', 'NONE ', 'FOB ', 'cies sleep furiously. silent ');
INSERT INTO public.lineitem VALUES (4172320, 181461, 6498, 4, 8, 12339.68, 0.03, 0.05, 'R', 'F', '1993-11-24', '1993-10-09', '1993-11-26', 'TAKE BACK RETURN ', 'MAIL ', 'nder carefully at the regular deposits');
INSERT INTO public.lineitem VALUES (4412643, 36786, 6787, 6, 29, 49960.62, 0.01, 0.05, 'N', 'O', '1996-10-15', '1996-12-06', '1996-10-21', 'COLLECT COD ', 'MAIL ', 'fily unusual dependencies wake c');
INSERT INTO public.lineitem VALUES (4411200, 169148, 1665, 5, 33, 40165.62, 0.07, 0.06, 'A', 'F', '1992-09-17', '1992-09-16', '1992-09-29', 'NONE ', 'MAIL ', 'according to the carefully even de');
INSERT INTO public.lineitem VALUES (519334, 105875, 8386, 7, 29, 54545.23, 0.00, 0.05, 'R', 'F', '1994-09-26', '1994-10-17', '1994-09-30', 'COLLECT COD ', 'SHIP ', 'fully quickly ironic deposits;');
INSERT INTO public.lineitem VALUES (784224, 191052, 6091, 5, 12, 13716.60, 0.10, 0.02, 'R', 'F', '1992-08-24', '1992-07-14', '1992-08-28', 'COLLECT COD ', 'REG AIR ', 'out the even');
INSERT INTO public.lineitem VALUES (1245569, 107878, 389, 3, 44, 82978.28, 0.10, 0.07, 'A', 'F', '1993-07-10', '1993-08-02', '1993-07-12', 'NONE ', 'MAIL ', 'ding to the regu');
INSERT INTO public.lineitem VALUES (5264098, 95111, 5112, 3, 50, 55305.50, 0.05, 0.08, 'N', 'O', '1997-04-04', '1997-04-05', '1997-04-23', 'COLLECT COD ', 'SHIP ', 'the final, i');
INSERT INTO public.lineitem VALUES (380772, 56723, 4239, 2, 17, 28555.24, 0.07, 0.01, 'R', 'F', '1992-06-05', '1992-06-30', '1992-06-18', 'COLLECT COD ', 'RAIL ', '. unusual pinto beans are above the reque');
INSERT INTO public.lineitem VALUES (4032962, 183202, 8239, 3, 45, 57834.00, 0.04, 0.04, 'N', 'O', '1997-05-15', '1997-07-26', '1997-05-31', 'DELIVER IN PERSON ', 'SHIP ', 'wake furiously careful');
INSERT INTO public.lineitem VALUES (1929538, 128145, 658, 1, 2, 2346.28, 0.06, 0.04, 'N', 'O', '1998-06-27', '1998-06-08', '1998-07-02', 'NONE ', 'REG AIR ', 'e carefully across the carefull');
INSERT INTO public.lineitem VALUES (811623, 150879, 5910, 1, 39, 75264.93, 0.04, 0.02, 'N', 'O', '1998-01-06', '1997-11-26', '1998-02-02', 'NONE ', 'TRUCK ', 'ar dependencies. quickly iro');
INSERT INTO public.lineitem VALUES (1072385, 144944, 2487, 1, 35, 69612.90, 0.06, 0.06, 'N', 'O', '1998-05-22', '1998-05-11', '1998-06-02', 'DELIVER IN PERSON ', '<NAME> ', 'slyly even packag');
INSERT INTO public.lineitem VALUES (1314343, 140739, 740, 3, 10, 17797.30, 0.09, 0.02, 'N', 'O', '1997-11-20', '1997-12-24', '1997-12-06', 'DELIVER IN PERSON ', 'SHIP ', 'ainst the carefully regular foxes print f');
INSERT INTO public.lineitem VALUES (2775172, 72825, 347, 1, 9, 16180.38, 0.09, 0.00, 'N', 'O', '1997-06-24', '1997-05-10', '1997-07-07', 'DELIVER IN PERSON ', 'MAIL ', 'st silent, pend');
INSERT INTO public.lineitem VALUES (1618279, 60434, 5447, 7, 26, 36255.18, 0.07, 0.02, 'N', 'O', '1995-11-08', '1995-11-08', '1995-11-22', 'COLLECT COD ', 'RAIL ', 'instructions after the slyly final accou');
INSERT INTO public.lineitem VALUES (2241762, 45249, 258, 3, 37, 44186.88, 0.10, 0.07, 'A', 'F', '1992-09-17', '1992-08-24', '1992-09-23', 'NONE ', 'RAIL ', 'its. idle, even ');
INSERT INTO public.lineitem VALUES (5068645, 181644, 4163, 1, 13, 22433.32, 0.10, 0.06, 'N', 'O', '1997-04-21', '1997-03-27', '1997-05-06', 'TAKE BACK RETURN ', 'REG AIR ', 'hely after the eve');
INSERT INTO public.lineitem VALUES (4468644, 134288, 9315, 4, 5, 6611.40, 0.03, 0.05, 'N', 'O', '1995-11-13', '1996-01-17', '1995-11-15', 'COLLECT COD ', 'MAIL ', ' instructions cajole sl');
INSERT INTO public.lineitem VALUES (2102977, 18747, 3750, 3, 16, 26651.84, 0.02, 0.08, 'N', 'O', '1997-06-13', '1997-06-20', '1997-06-22', 'TAKE BACK RETURN ', 'RAIL ', ', ironic excuses maintain fluffily blithe');
|
<reponame>LeanSama10/basketball<filename>cstv/load_cstv_games.sql<gh_stars>10-100
begin;
drop table if exists cstv.games;
create table cstv.games (
event_id integer,
primary key (event_id)
);
copy cstv.games from '/tmp/game.csv' with delimiter as ',' csv header quote as '"';
--alter table ncaa.games add column game_id serial primary key;
commit;
|
SELECT * FROM people FETCH FIRST 10 ROWS ONLY; |
-- file:rowsecurity.sql ln:1795 expect:true
CREATE POLICY p4 ON rls_tbl FOR DELETE USING (c1 <= 3)
|
<gh_stars>10-100
-- file:boolean.sql ln:143 expect:true
SELECT '' AS f_4, BOOLTBL2.* FROM BOOLTBL2
|
SET @sName = 'bx_acl';
-- FORMS
DELETE FROM `sys_form_inputs` WHERE `object`='bx_acl_price' AND `name` IN ('period', 'period_unit', 'price');
INSERT INTO `sys_form_inputs` (`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES
('bx_acl_price', @sName, 'period', '', '', 0, 'text', '_bx_acl_form_price_input_sys_period', '_bx_acl_form_price_input_period', '_bx_acl_form_price_input_inf_period', 1, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
('bx_acl_price', @sName, 'period_unit', '', '#!bx_acl_period_units', 0, 'select', '_bx_acl_form_price_input_sys_period_unit', '_bx_acl_form_price_input_period_unit', '_bx_acl_form_price_input_inf_period_unit', 1, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
('bx_acl_price', @sName, 'price', '', '', 0, 'text', '_bx_acl_form_price_input_sys_price', '_bx_acl_form_price_input_price', '_bx_acl_form_price_input_inf_price', 1, 0, 0, '', '', '', '', '', '', 'Float', '', 1, 0);
-- GRIDS
UPDATE `sys_objects_grid` SET `source`='SELECT `tlp`.*, `tl`.`Name` AS `level_name`, `tl`.`Icon` AS `level_icon` FROM `bx_acl_level_prices` AS `tlp` LEFT JOIN `sys_acl_levels` AS `tl` ON `tlp`.`level_id`=`tl`.`ID` WHERE `tl`.`Active`=''yes'' AND `tl`.`Purchasable`=''yes'' ' WHERE `object`='bx_acl_view';
DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_acl_view');
INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
('bx_acl_view', 'level_icon', '_bx_acl_grid_column_level_icon', '5%', 0, 0, '', 1),
('bx_acl_view', 'level_name', '_bx_acl_grid_column_level_name', '25%', 1, 32, '', 2),
('bx_acl_view', 'price', '_bx_acl_grid_column_price', '10%', 0, 16, '', 3),
('bx_acl_view', 'period', '_bx_acl_grid_column_period', '15%', 0, 16, '', 4),
('bx_acl_view', 'trial', '_bx_acl_grid_column_trial', '15%', 0, 16, '', 5),
('bx_acl_view', 'actions', '', '30%', 0, '', '', 6);
DELETE FROM `sys_grid_actions` WHERE `object`='bx_acl_view' AND `name`='choose';
INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
('bx_acl_view', 'single', 'choose', '_bx_acl_grid_action_choose', 'check-square-o', 0, 0, 3); |
<reponame>smith750/kc
TRUNCATE TABLE KRIM_AFLTN_TYP_T DROP STORAGE
/
INSERT INTO KRIM_AFLTN_TYP_T (ACTV_IND,AFLTN_TYP_CD,DISPLAY_SORT_CD,EMP_AFLTN_TYP_IND,LAST_UPDT_DT,NM,OBJ_ID,VER_NBR)
VALUES ('Y','AFLT','d','N',TO_DATE( '20081113140630', 'YYYYMMDDHH24MISS' ),'Affiliate','5B97C50B03736110E0404F8189D85213',1)
/
INSERT INTO KRIM_AFLTN_TYP_T (ACTV_IND,AFLTN_TYP_CD,DISPLAY_SORT_CD,EMP_AFLTN_TYP_IND,LAST_UPDT_DT,NM,OBJ_ID,VER_NBR)
VALUES ('Y','FCLTY','b','Y',TO_DATE( '20081113140630', 'YYYYMMDDHH24MISS' ),'Faculty','5B97C50B03746110E0404F8189D85213',1)
/
INSERT INTO KRIM_AFLTN_TYP_T (ACTV_IND,AFLTN_TYP_CD,DISPLAY_SORT_CD,EMP_AFLTN_TYP_IND,LAST_UPDT_DT,NM,OBJ_ID,VER_NBR)
VALUES ('Y','STAFF','c','Y',TO_DATE( '20081113140630', 'YYYYMMDDHH24MISS' ),'Staff','5B97C50B03756110E0404F8189D85213',1)
/
INSERT INTO KRIM_AFLTN_TYP_T (ACTV_IND,AFLTN_TYP_CD,DISPLAY_SORT_CD,EMP_AFLTN_TYP_IND,LAST_UPDT_DT,NM,OBJ_ID,VER_NBR)
VALUES ('Y','STDNT','a','N',TO_DATE( '20081113140630', 'YYYYMMDDHH24MISS' ),'Student','5B97C50B03766110E0404F8189D85213',1)
/
|
CREATE TABLE IF NOT EXISTS vets (
id SERIAL PRIMARY KEY,
first_name VARCHAR(30),
last_name VARCHAR(30)
);
CREATE INDEX IF NOT EXISTS vets_idx1 on vets (
last_name
);
CREATE TABLE IF NOT EXISTS specialties (
id SERIAL PRIMARY KEY,
name VARCHAR(80)
);
CREATE INDEX IF NOT EXISTS specialties_idx1 on specialties (
name
);
CREATE TABLE IF NOT EXISTS vet_specialties (
vet_id INTEGER NOT NULL REFERENCES vets(id),
specialty_id INTEGER NOT NULL REFERENCES specialties(id),
UNIQUE (vet_id,specialty_id)
);
CREATE TABLE IF NOT EXISTS types (
id SERIAL PRIMARY KEY,
name VARCHAR(80)
);
CREATE INDEX IF NOT EXISTS types_idx1 on types (
name
);
CREATE TABLE IF NOT EXISTS owners (
id SERIAL PRIMARY KEY,
first_name VARCHAR(30),
last_name VARCHAR(30),
address VARCHAR(255),
city VARCHAR(80),
telephone VARCHAR(20)
);
CREATE INDEX IF NOT EXISTS owners_idx1 on owners (
last_name
);
CREATE TABLE IF NOT EXISTS pets (
id SERIAL PRIMARY KEY,
name VARCHAR(30),
birth_date DATE,
type_id INTEGER NOT NULL REFERENCES types(id),
owner_id INTEGER NOT NULL REFERENCES owners(id)
);
CREATE INDEX IF NOT EXISTS pets_idx1 on pets (
name
);
CREATE TABLE IF NOT EXISTS visits (
id SERIAL PRIMARY KEY,
pet_id INTEGER NOT NULL REFERENCES pets(id),
visit_date DATE,
description VARCHAR(255)
);
|
<filename>Hackerrank/SQL/S0014.sql
/*https://www.hackerrank.com/challenges/weather-observation-station-9/problem*/
SELECT DISTINCT CITY FROM STATION WHERE CITY REGEXP '^[^AEIOU]';
|
-- MySQL dump 10.13 Distrib 5.5.29, for osx10.6 (i386)
--
-- Host: 127.0.0.1 Database: opensource
-- ------------------------------------------------------
-- Server version 5.5.29
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `CronJob`
--
DROP TABLE IF EXISTS `CronJob`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CronJob` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`command` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`job_interval` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
`nextRun` datetime NOT NULL,
`enabled` tinyint(1) NOT NULL,
`mostRecentRun_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UNIQ_522A03F614691BE8` (`mostRecentRun_id`),
CONSTRAINT `FK_522A03F614691BE8` FOREIGN KEY (`mostRecentRun_id`) REFERENCES `CronJobResult` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `CronJob`
--
LOCK TABLES `CronJob` WRITE;
/*!40000 ALTER TABLE `CronJob` DISABLE KEYS */;
/*!40000 ALTER TABLE `CronJob` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `CronJobResult`
--
DROP TABLE IF EXISTS `CronJobResult`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CronJobResult` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`job_id` int(11) DEFAULT NULL,
`runAt` datetime NOT NULL,
`runTime` double NOT NULL,
`result` int(11) NOT NULL,
`output` longtext COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
KEY `IDX_301AF175BE04EA9` (`job_id`),
CONSTRAINT `FK_301AF175BE04EA9` FOREIGN KEY (`job_id`) REFERENCES `CronJob` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `CronJobResult`
--
LOCK TABLES `CronJobResult` WRITE;
/*!40000 ALTER TABLE `CronJobResult` DISABLE KEYS */;
/*!40000 ALTER TABLE `CronJobResult` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `account`
--
DROP TABLE IF EXISTS `account`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `account` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`sort_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`id_account_type` int(11) DEFAULT NULL,
`street1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`street2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`id_country` int(11) DEFAULT NULL,
`postcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`county` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`town` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`telephone` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`balance` decimal(10,0) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `account`
--
LOCK TABLES `account` WRITE;
/*!40000 ALTER TABLE `account` DISABLE KEYS */;
/*!40000 ALTER TABLE `account` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `account_transaction`
--
DROP TABLE IF EXISTS `account_transaction`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `account_transaction` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_account` int(11) DEFAULT NULL,
`id_direction` int(11) DEFAULT NULL,
`timestamp` datetime DEFAULT NULL,
`amount` decimal(10,0) DEFAULT NULL,
`description` longtext COLLATE utf8_unicode_ci,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `account_transaction`
--
LOCK TABLES `account_transaction` WRITE;
/*!40000 ALTER TABLE `account_transaction` DISABLE KEYS */;
/*!40000 ALTER TABLE `account_transaction` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `admin`
--
DROP TABLE IF EXISTS `admin`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admin` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`firstname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`lastname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`salt` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`hourly` decimal(10,0) DEFAULT NULL,
`ip` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
`ipend` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `admin`
--
LOCK TABLES `admin` WRITE;
/*!40000 ALTER TABLE `admin` DISABLE KEYS */;
/*!40000 ALTER TABLE `admin` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `admin_failed_login`
--
DROP TABLE IF EXISTS `admin_failed_login`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admin_failed_login` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ip` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
`time` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `admin_failed_login`
--
LOCK TABLES `admin_failed_login` WRITE;
/*!40000 ALTER TABLE `admin_failed_login` DISABLE KEYS */;
/*!40000 ALTER TABLE `admin_failed_login` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `admin_permission`
--
DROP TABLE IF EXISTS `admin_permission`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admin_permission` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_admin` int(11) DEFAULT NULL,
`id_page` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `admin_permission`
--
LOCK TABLES `admin_permission` WRITE;
/*!40000 ALTER TABLE `admin_permission` DISABLE KEYS */;
/*!40000 ALTER TABLE `admin_permission` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `admin_session`
--
DROP TABLE IF EXISTS `admin_session`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admin_session` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user` int(11) NOT NULL,
`ip` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
`time` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `admin_session`
--
LOCK TABLES `admin_session` WRITE;
/*!40000 ALTER TABLE `admin_session` DISABLE KEYS */;
/*!40000 ALTER TABLE `admin_session` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `automation_group`
--
DROP TABLE IF EXISTS `automation_group`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `automation_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`url` longtext COLLATE utf8_unicode_ci,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `automation_group`
--
LOCK TABLES `automation_group` WRITE;
/*!40000 ALTER TABLE `automation_group` DISABLE KEYS */;
/*!40000 ALTER TABLE `automation_group` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `automation_group_field`
--
DROP TABLE IF EXISTS `automation_group_field`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `automation_group_field` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_automation_group` int(11) DEFAULT NULL,
`id_product_field` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `automation_group_field`
--
LOCK TABLES `automation_group_field` WRITE;
/*!40000 ALTER TABLE `automation_group_field` DISABLE KEYS */;
/*!40000 ALTER TABLE `automation_group_field` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_contact`
--
DROP TABLE IF EXISTS `client_contact`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_contact` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_client` int(11) DEFAULT NULL,
`firstname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`lastname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_contact`
--
LOCK TABLES `client_contact` WRITE;
/*!40000 ALTER TABLE `client_contact` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_contact` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_contact_permission`
--
DROP TABLE IF EXISTS `client_contact_permission`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_contact_permission` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_client_contact` int(11) DEFAULT NULL,
`id_page` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_contact_permission`
--
LOCK TABLES `client_contact_permission` WRITE;
/*!40000 ALTER TABLE `client_contact_permission` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_contact_permission` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_credit_note`
--
DROP TABLE IF EXISTS `client_credit_note`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_credit_note` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_client` int(11) DEFAULT NULL,
`amount` decimal(10,0) DEFAULT NULL,
`note` longtext COLLATE utf8_unicode_ci,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_credit_note`
--
LOCK TABLES `client_credit_note` WRITE;
/*!40000 ALTER TABLE `client_credit_note` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_credit_note` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_email`
--
DROP TABLE IF EXISTS `client_email`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_email` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_client` int(11) NOT NULL,
`subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`timestamp` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_email`
--
LOCK TABLES `client_email` WRITE;
/*!40000 ALTER TABLE `client_email` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_email` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_estimate`
--
DROP TABLE IF EXISTS `client_estimate`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_estimate` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_client` int(11) NOT NULL,
`subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`issue_date` date DEFAULT NULL,
`due_date` date DEFAULT NULL,
`hash` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL,
`discount` decimal(10,0) DEFAULT NULL,
`tax` int(11) DEFAULT NULL,
`notes` longtext COLLATE utf8_unicode_ci,
`status` int(11) DEFAULT NULL,
`invoice_status` int(11) DEFAULT NULL,
`total_amount` decimal(10,0) DEFAULT NULL,
`total_payment` decimal(10,0) DEFAULT NULL,
`number` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`invoiced` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_estimate`
--
LOCK TABLES `client_estimate` WRITE;
/*!40000 ALTER TABLE `client_estimate` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_estimate` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_estimate_item`
--
DROP TABLE IF EXISTS `client_estimate_item`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_estimate_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_type` int(11) NOT NULL,
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`quantity` double NOT NULL,
`unit_price` decimal(10,0) NOT NULL,
`id_estimate` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_estimate_item`
--
LOCK TABLES `client_estimate_item` WRITE;
/*!40000 ALTER TABLE `client_estimate_item` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_estimate_item` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_estimate_purchase`
--
DROP TABLE IF EXISTS `client_estimate_purchase`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_estimate_purchase` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_estimate` int(11) DEFAULT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`purchase_date` date DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_estimate_purchase`
--
LOCK TABLES `client_estimate_purchase` WRITE;
/*!40000 ALTER TABLE `client_estimate_purchase` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_estimate_purchase` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_estimate_purchase_file`
--
DROP TABLE IF EXISTS `client_estimate_purchase_file`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_estimate_purchase_file` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_estimate_purchase` int(11) DEFAULT NULL,
`file` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`size` decimal(5,3) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_estimate_purchase_file`
--
LOCK TABLES `client_estimate_purchase_file` WRITE;
/*!40000 ALTER TABLE `client_estimate_purchase_file` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_estimate_purchase_file` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_invoice`
--
DROP TABLE IF EXISTS `client_invoice`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_invoice` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_client` int(11) NOT NULL,
`subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`issue_date` date DEFAULT NULL,
`due_date` date DEFAULT NULL,
`hash` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL,
`discount` decimal(10,0) DEFAULT NULL,
`tax` int(11) DEFAULT NULL,
`notes` longtext COLLATE utf8_unicode_ci,
`status` int(11) DEFAULT NULL,
`total_amount` decimal(11,2) DEFAULT NULL,
`total_payment` decimal(11,2) DEFAULT NULL,
`number` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`access_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`reminder_sent_at` datetime DEFAULT NULL,
`viewed_by_client` tinyint(1) DEFAULT NULL,
`reminders` tinyint(1) DEFAULT NULL,
`overdue_notices` tinyint(1) DEFAULT NULL,
`id_client_product` int(11) DEFAULT NULL,
`id_recurring` int(11) DEFAULT NULL,
`id_product` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_invoice`
--
LOCK TABLES `client_invoice` WRITE;
/*!40000 ALTER TABLE `client_invoice` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_invoice` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_invoice_item`
--
DROP TABLE IF EXISTS `client_invoice_item`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_invoice_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_type` int(11) NOT NULL,
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`quantity` double NOT NULL,
`unit_price` decimal(11,2) NOT NULL,
`id_invoice` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_invoice_item`
--
LOCK TABLES `client_invoice_item` WRITE;
/*!40000 ALTER TABLE `client_invoice_item` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_invoice_item` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_invoice_purchase`
--
DROP TABLE IF EXISTS `client_invoice_purchase`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_invoice_purchase` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_invoice` int(11) DEFAULT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`purchase_date` date DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_invoice_purchase`
--
LOCK TABLES `client_invoice_purchase` WRITE;
/*!40000 ALTER TABLE `client_invoice_purchase` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_invoice_purchase` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_invoice_purchase_file`
--
DROP TABLE IF EXISTS `client_invoice_purchase_file`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_invoice_purchase_file` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_invoice_purchase` int(11) DEFAULT NULL,
`file` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`size` decimal(5,3) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_invoice_purchase_file`
--
LOCK TABLES `client_invoice_purchase_file` WRITE;
/*!40000 ALTER TABLE `client_invoice_purchase_file` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_invoice_purchase_file` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_log`
--
DROP TABLE IF EXISTS `client_log`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_type` int(11) DEFAULT NULL,
`id_client` int(11) DEFAULT NULL,
`timestamp` datetime DEFAULT NULL,
`description` longtext COLLATE utf8_unicode_ci,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_log`
--
LOCK TABLES `client_log` WRITE;
/*!40000 ALTER TABLE `client_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_log` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_note`
--
DROP TABLE IF EXISTS `client_note`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_note` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_client` int(11) DEFAULT NULL,
`timestamp` datetime DEFAULT NULL,
`subject` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`body` longtext COLLATE utf8_unicode_ci,
`is_encrypted` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_note`
--
LOCK TABLES `client_note` WRITE;
/*!40000 ALTER TABLE `client_note` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_note` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_payment`
--
DROP TABLE IF EXISTS `client_payment`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_payment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_gateway` int(11) NOT NULL,
`transaction` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`pay_date` datetime NOT NULL,
`amount` decimal(11,2) NOT NULL,
`fee` decimal(11,2) NOT NULL,
`id_estimate` int(11) DEFAULT NULL,
`id_type` int(11) DEFAULT NULL,
`id_account_transaction` int(11) DEFAULT NULL,
`id_invoice` int(11) DEFAULT NULL,
`status` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_payment`
--
LOCK TABLES `client_payment` WRITE;
/*!40000 ALTER TABLE `client_payment` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_payment` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_product`
--
DROP TABLE IF EXISTS `client_product`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_product` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_payment_term` int(11) NOT NULL,
`ip_address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`encrypted_username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`encrypted_password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`id_server` int(11) NOT NULL,
`cost` decimal(11,2) NOT NULL,
`id_schedule` int(11) NOT NULL,
`next_due` datetime NOT NULL,
`tax_group` int(11) NOT NULL,
`reminders` tinyint(1) NOT NULL,
`overdue_notices` tinyint(1) NOT NULL,
`id_product` int(11) NOT NULL,
`id_client` int(11) NOT NULL,
`status` int(11) NOT NULL,
`domain` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_product`
--
LOCK TABLES `client_product` WRITE;
/*!40000 ALTER TABLE `client_product` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_product` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_product_item`
--
DROP TABLE IF EXISTS `client_product_item`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_product_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_client_product` int(11) NOT NULL,
`details` longtext COLLATE utf8_unicode_ci NOT NULL COMMENT '(DC2Type:array)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_product_item`
--
LOCK TABLES `client_product_item` WRITE;
/*!40000 ALTER TABLE `client_product_item` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_product_item` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_project`
--
DROP TABLE IF EXISTS `client_project`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_project` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`status` int(11) DEFAULT NULL,
`id_client` int(11) NOT NULL,
`code` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL,
`budget` decimal(10,0) DEFAULT NULL,
`due_date` date DEFAULT NULL,
`id_type` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_project`
--
LOCK TABLES `client_project` WRITE;
/*!40000 ALTER TABLE `client_project` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_project` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_project_attachment`
--
DROP TABLE IF EXISTS `client_project_attachment`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_project_attachment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_project` int(11) DEFAULT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`timestamp` datetime DEFAULT NULL,
`file` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_project_attachment`
--
LOCK TABLES `client_project_attachment` WRITE;
/*!40000 ALTER TABLE `client_project_attachment` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_project_attachment` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_project_attachment_file`
--
DROP TABLE IF EXISTS `client_project_attachment_file`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_project_attachment_file` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_project_attachment` int(11) DEFAULT NULL,
`file` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`size` decimal(5,3) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_project_attachment_file`
--
LOCK TABLES `client_project_attachment_file` WRITE;
/*!40000 ALTER TABLE `client_project_attachment_file` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_project_attachment_file` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_project_task`
--
DROP TABLE IF EXISTS `client_project_task`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_project_task` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_project` int(11) DEFAULT NULL,
`id_work_type` int(11) DEFAULT NULL,
`subject` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`timestamp` datetime DEFAULT NULL,
`quantity` decimal(10,0) DEFAULT NULL,
`unit` int(11) DEFAULT NULL,
`unit_price` decimal(10,0) DEFAULT NULL,
`is_billable` tinyint(1) DEFAULT NULL,
`invoiced` tinyint(1) DEFAULT NULL,
`status` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_project_task`
--
LOCK TABLES `client_project_task` WRITE;
/*!40000 ALTER TABLE `client_project_task` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_project_task` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_project_tracking`
--
DROP TABLE IF EXISTS `client_project_tracking`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_project_tracking` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_project` int(11) NOT NULL,
`start` datetime NOT NULL,
`stop` datetime DEFAULT NULL,
`staff` int(11) NOT NULL,
`hourly` decimal(10,0) NOT NULL,
`invoiced` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_project_tracking`
--
LOCK TABLES `client_project_tracking` WRITE;
/*!40000 ALTER TABLE `client_project_tracking` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_project_tracking` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_recurring`
--
DROP TABLE IF EXISTS `client_recurring`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_recurring` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_client` int(11) NOT NULL,
`subject` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`id_schedule` int(11) NOT NULL,
`discount` decimal(10,0) NOT NULL,
`tax` int(11) NOT NULL,
`next_due` date NOT NULL,
`notes` longtext COLLATE utf8_unicode_ci,
`is_invoiced` tinyint(1) DEFAULT NULL,
`reminders` tinyint(1) DEFAULT NULL,
`overdue_notices` tinyint(1) DEFAULT NULL,
`id_product` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_recurring`
--
LOCK TABLES `client_recurring` WRITE;
/*!40000 ALTER TABLE `client_recurring` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_recurring` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client_recurring_item`
--
DROP TABLE IF EXISTS `client_recurring_item`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_recurring_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_type` int(11) DEFAULT NULL,
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`quantity` double NOT NULL,
`unit_price` decimal(11,2) NOT NULL,
`id_recurring` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client_recurring_item`
--
LOCK TABLES `client_recurring_item` WRITE;
/*!40000 ALTER TABLE `client_recurring_item` DISABLE KEYS */;
/*!40000 ALTER TABLE `client_recurring_item` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `config`
--
DROP TABLE IF EXISTS `config`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`install_directory` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`admin_directory` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`business_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`default_email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`licence_key` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
`client_language` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
`date_format` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
`currency_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL,
`billing_currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL,
`staff_ip_verification` tinyint(1) DEFAULT NULL,
`staff_multiple_logins` tinyint(1) DEFAULT NULL,
`staff_timeout` int(11) DEFAULT NULL,
`staff_login_notify` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`staff_login_fail_notify` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`recaptcha_public` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`recaptcha_private` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`staff_login_greylist` int(11) DEFAULT NULL,
`business_address` longtext COLLATE utf8_unicode_ci,
`invoice_notes` longtext COLLATE utf8_unicode_ci,
`payment_success_email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`payment_failure_email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`localkey` longtext COLLATE utf8_unicode_ci,
`id_default_work_type` int(11) DEFAULT NULL,
`default_tax` decimal(10,0) DEFAULT NULL,
`default_discount` decimal(10,0) DEFAULT NULL,
`version` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL,
`culture` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL,
`ticketImapHost` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`ticketImapUsername` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`ticketImapPassword` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`maxmindLicenseKey` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`maxmindRiskScoreThreshold` decimal(10,0) DEFAULT NULL,
`maxmind_enabled` tinyint(1) DEFAULT NULL,
`logo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`estimate_prefix` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`invoice_prefix` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`util_key` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`cpanel_api_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`cpanel_api_username` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`cpanel_api_password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`solusvm_api_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`solusvm_api_username` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`solusvm_api_password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`loggly_enabled` tinyint(1) DEFAULT NULL,
`loggly_consumer_key` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`loggly_consumer_secret` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`loggly_api_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`is_proforma_invoice_enabled` tinyint(1) NOT NULL DEFAULT '0',
`proforma_invoice_prefix` varchar(255) COLLATE utf8_unicode_ci DEFAULT 'PI',
`count_proforma_invoice` int(11) DEFAULT '1',
`count_proforma_paid_invoice` int(11) DEFAULT '1',
`is_enabled_drop_in` tinyint(1) NOT NULL DEFAULT '0',
`website` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`current_invoices` int(11) DEFAULT NULL,
`generate_invoice` int(11) DEFAULT NULL,
`invoice_email` longtext COLLATE utf8_unicode_ci,
`send_reminder` longtext COLLATE utf8_unicode_ci COMMENT '(DC2Type:array)',
`reminder_email` longtext COLLATE utf8_unicode_ci,
`send_overdue` longtext COLLATE utf8_unicode_ci COMMENT '(DC2Type:array)',
`daily_summary` tinyint(1) DEFAULT NULL,
`tos_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`privacy_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`default_phone` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`client_header` longtext COLLATE utf8_unicode_ci,
`client_footer` longtext COLLATE utf8_unicode_ci,
`client_menus` longtext COLLATE utf8_unicode_ci COMMENT '(DC2Type:array)',
`order_email` longtext COLLATE utf8_unicode_ci,
`suspend_after` int(11) DEFAULT NULL,
`terminate_after` int(11) DEFAULT NULL,
`overdue_email` longtext COLLATE utf8_unicode_ci,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `config`
--
LOCK TABLES `config` WRITE;
/*!40000 ALTER TABLE `config` DISABLE KEYS */;
INSERT INTO `config` VALUES (1,NULL,NULL,'Test Company','<EMAIL>',NULL,NULL,'d/m/Y',NULL,'GBP',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,'en-GB',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'PI',1,1,0,'change-me.com',NULL,7,NULL,'a:2:{i:0;i:2;i:1;i:4;}',NULL,'a:4:{i:0;i:1;i:1;i:3;i:2;i:5;i:3;i:7;}',0,NULL,NULL,NULL,'','','a:0:{}',NULL,NULL,NULL,NULL);
/*!40000 ALTER TABLE `config` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `country`
--
DROP TABLE IF EXISTS `country`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `country`
--
LOCK TABLES `country` WRITE;
/*!40000 ALTER TABLE `country` DISABLE KEYS */;
/*!40000 ALTER TABLE `country` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `country_tax`
--
DROP TABLE IF EXISTS `country_tax`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `country_tax` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_country` int(11) DEFAULT NULL,
`tax` decimal(10,0) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `country_tax`
--
LOCK TABLES `country_tax` WRITE;
/*!40000 ALTER TABLE `country_tax` DISABLE KEYS */;
/*!40000 ALTER TABLE `country_tax` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `email`
--
DROP TABLE IF EXISTS `email`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `email` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`subject` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`body` longtext COLLATE utf8_unicode_ci,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `email`
--
LOCK TABLES `email` WRITE;
/*!40000 ALTER TABLE `email` DISABLE KEYS */;
/*!40000 ALTER TABLE `email` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `logs`
--
DROP TABLE IF EXISTS `logs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `logs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_type` int(11) DEFAULT NULL,
`timestamp` datetime DEFAULT NULL,
`description` longtext COLLATE utf8_unicode_ci,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `logs`
--
LOCK TABLES `logs` WRITE;
/*!40000 ALTER TABLE `logs` DISABLE KEYS */;
INSERT INTO `logs` VALUES (1,2,'2014-05-07 22:18:58','IP: 127.0.0.1'),(2,2,'2014-05-07 22:19:14','IP: 127.0.0.1'),(3,2,'2014-05-07 22:22:29','IP: 127.0.0.1'),(4,2,'2014-05-07 22:22:43','IP: 127.0.0.1'),(5,2,'2014-05-07 22:28:09','IP: 127.0.0.1'),(6,1,'2014-05-07 22:31:37','IP: 127.0.0.1 / Email: <EMAIL>'),(7,1,'2014-05-07 22:43:20','IP: 127.0.0.1 / Email: <EMAIL>');
/*!40000 ALTER TABLE `logs` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `payment_gateways`
--
DROP TABLE IF EXISTS `payment_gateways`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `payment_gateways` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`safe_credentials` longtext COLLATE utf8_unicode_ci NOT NULL COMMENT '(DC2Type:array)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `payment_gateways`
--
LOCK TABLES `payment_gateways` WRITE;
/*!40000 ALTER TABLE `payment_gateways` DISABLE KEYS */;
/*!40000 ALTER TABLE `payment_gateways` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `permission_group`
--
DROP TABLE IF EXISTS `permission_group`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `permission_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`permissions` longtext COLLATE utf8_unicode_ci NOT NULL COMMENT '(DC2Type:array)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `permission_group`
--
LOCK TABLES `permission_group` WRITE;
/*!40000 ALTER TABLE `permission_group` DISABLE KEYS */;
/*!40000 ALTER TABLE `permission_group` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `physical_item`
--
DROP TABLE IF EXISTS `physical_item`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `physical_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`brand` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`model` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`stock` int(11) DEFAULT NULL,
`description` longtext COLLATE utf8_unicode_ci,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `physical_item`
--
LOCK TABLES `physical_item` WRITE;
/*!40000 ALTER TABLE `physical_item` DISABLE KEYS */;
/*!40000 ALTER TABLE `physical_item` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `physical_item_purchase`
--
DROP TABLE IF EXISTS `physical_item_purchase`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `physical_item_purchase` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_physical_item` int(11) DEFAULT NULL,
`id_supplier` int(11) DEFAULT NULL,
`date_in` datetime DEFAULT NULL,
`purchase_price` decimal(10,0) DEFAULT NULL,
`quantity` int(11) DEFAULT NULL,
`serial_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`is_purchased` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `physical_item_purchase`
--
LOCK TABLES `physical_item_purchase` WRITE;
/*!40000 ALTER TABLE `physical_item_purchase` DISABLE KEYS */;
/*!40000 ALTER TABLE `physical_item_purchase` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `physical_item_sold`
--
DROP TABLE IF EXISTS `physical_item_sold`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `physical_item_sold` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_physical_item` int(11) DEFAULT NULL,
`id_client` int(11) DEFAULT NULL,
`date_out` datetime DEFAULT NULL,
`sell_price` decimal(10,0) DEFAULT NULL,
`quantity` int(11) DEFAULT NULL,
`serial_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`invoiced` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `physical_item_sold`
--
LOCK TABLES `physical_item_sold` WRITE;
/*!40000 ALTER TABLE `physical_item_sold` DISABLE KEYS */;
/*!40000 ALTER TABLE `physical_item_sold` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `product`
--
DROP TABLE IF EXISTS `product`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `product` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`server_package` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`id_product_group` int(11) DEFAULT NULL,
`server_group` int(11) DEFAULT NULL,
`id_email` int(11) DEFAULT NULL,
`stock` int(11) DEFAULT NULL,
`id_payment_type` int(11) DEFAULT NULL,
`setup_fee_monthly` decimal(11,2) DEFAULT NULL,
`setup_fee_quarterly` decimal(11,2) DEFAULT NULL,
`setup_fee_semi_annually` decimal(11,2) DEFAULT NULL,
`setup_fee_annually` decimal(11,2) DEFAULT NULL,
`setup_fee_biennially` decimal(11,2) DEFAULT NULL,
`setup_fee_triennially` decimal(11,2) DEFAULT NULL,
`price_monthly` decimal(11,2) DEFAULT NULL,
`price_quarterly` decimal(11,2) DEFAULT NULL,
`price_semi_annually` decimal(11,2) DEFAULT NULL,
`price_annually` decimal(11,2) DEFAULT NULL,
`price_biennially` decimal(11,2) DEFAULT NULL,
`price_triennially` decimal(11,2) DEFAULT NULL,
`is_available` tinyint(1) DEFAULT NULL,
`id_type` int(11) DEFAULT NULL,
`is_redirect_unpaid_invoice` tinyint(1) DEFAULT NULL,
`trigger_create` int(11) DEFAULT NULL,
`tax_group` int(11) DEFAULT NULL,
`color` varchar(7) COLLATE utf8_unicode_ci DEFAULT NULL,
`module_settings` longtext COLLATE utf8_unicode_ci NOT NULL,
`features` longtext COLLATE utf8_unicode_ci NOT NULL COMMENT '(DC2Type:array)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `product`
--
LOCK TABLES `product` WRITE;
/*!40000 ALTER TABLE `product` DISABLE KEYS */;
/*!40000 ALTER TABLE `product` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `product_automation_group`
--
DROP TABLE IF EXISTS `product_automation_group`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `product_automation_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_product` int(11) DEFAULT NULL,
`id_automation_group` int(11) DEFAULT NULL,
`id_event` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `product_automation_group`
--
LOCK TABLES `product_automation_group` WRITE;
/*!40000 ALTER TABLE `product_automation_group` DISABLE KEYS */;
/*!40000 ALTER TABLE `product_automation_group` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `product_group`
--
DROP TABLE IF EXISTS `product_group`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `product_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`is_available` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `product_group`
--
LOCK TABLES `product_group` WRITE;
/*!40000 ALTER TABLE `product_group` DISABLE KEYS */;
/*!40000 ALTER TABLE `product_group` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `product_order`
--
DROP TABLE IF EXISTS `product_order`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `product_order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_product` int(11) DEFAULT NULL,
`id_client` int(11) DEFAULT NULL,
`timestamp` datetime DEFAULT NULL,
`status` int(11) DEFAULT NULL,
`order_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`client_product` int(11) DEFAULT NULL,
`maxmind_data` longtext COLLATE utf8_unicode_ci COMMENT '(DC2Type:array)',
`ip_address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`id_invoice` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `product_order`
--
LOCK TABLES `product_order` WRITE;
/*!40000 ALTER TABLE `product_order` DISABLE KEYS */;
/*!40000 ALTER TABLE `product_order` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `server`
--
DROP TABLE IF EXISTS `server`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `server` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`group_id` int(11) DEFAULT NULL,
`encrypted_ip` longtext COLLATE utf8_unicode_ci,
`encrypted_user` longtext COLLATE utf8_unicode_ci,
`encrypted_pass` longtext COLLATE utf8_unicode_ci,
`enabled` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `server`
--
LOCK TABLES `server` WRITE;
/*!40000 ALTER TABLE `server` DISABLE KEYS */;
/*!40000 ALTER TABLE `server` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `server_group`
--
DROP TABLE IF EXISTS `server_group`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `server_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`description` longtext COLLATE utf8_unicode_ci,
`type` int(11) NOT NULL,
`choice_logic` int(11) NOT NULL,
`primary_server` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `server_group`
--
LOCK TABLES `server_group` WRITE;
/*!40000 ALTER TABLE `server_group` DISABLE KEYS */;
/*!40000 ALTER TABLE `server_group` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `supplier`
--
DROP TABLE IF EXISTS `supplier`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `supplier` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`firstname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`lastname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`company` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`address1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`address2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`city` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`state` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`postcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`id_country` int(11) DEFAULT NULL,
`phone` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`status` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `supplier`
--
LOCK TABLES `supplier` WRITE;
/*!40000 ALTER TABLE `supplier` DISABLE KEYS */;
/*!40000 ALTER TABLE `supplier` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `supplier_purchase`
--
DROP TABLE IF EXISTS `supplier_purchase`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `supplier_purchase` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_supplier` int(11) DEFAULT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`purchase_date` date DEFAULT NULL,
`id_account_transaction` int(11) DEFAULT NULL,
`amount` decimal(11,2) DEFAULT NULL,
`nominal_code` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `supplier_purchase`
--
LOCK TABLES `supplier_purchase` WRITE;
/*!40000 ALTER TABLE `supplier_purchase` DISABLE KEYS */;
/*!40000 ALTER TABLE `supplier_purchase` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `supplier_purchase_file`
--
DROP TABLE IF EXISTS `supplier_purchase_file`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `supplier_purchase_file` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_purchase` int(11) DEFAULT NULL,
`file` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`size` decimal(5,3) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `supplier_purchase_file`
--
LOCK TABLES `supplier_purchase_file` WRITE;
/*!40000 ALTER TABLE `supplier_purchase_file` DISABLE KEYS */;
/*!40000 ALTER TABLE `supplier_purchase_file` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tax_group`
--
DROP TABLE IF EXISTS `tax_group`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tax_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`value` decimal(11,2) NOT NULL,
`countries` longtext COLLATE utf8_unicode_ci NOT NULL COMMENT '(DC2Type:array)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tax_group`
--
LOCK TABLES `tax_group` WRITE;
/*!40000 ALTER TABLE `tax_group` DISABLE KEYS */;
/*!40000 ALTER TABLE `tax_group` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user_widget`
--
DROP TABLE IF EXISTS `user_widget`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_widget` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_user` int(11) NOT NULL,
`id_widget` int(11) NOT NULL,
`state` longtext COLLATE utf8_unicode_ci,
`sort_order` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user_widget`
--
LOCK TABLES `user_widget` WRITE;
/*!40000 ALTER TABLE `user_widget` DISABLE KEYS */;
INSERT INTO `user_widget` VALUES (1,1,1,'1',6),(2,1,2,'2014',2),(3,1,3,'2014',4),(4,1,4,'1',8),(5,1,5,'1',10),(6,1,6,'2014',12),(7,1,7,'1',14);
/*!40000 ALTER TABLE `user_widget` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`username_canonical` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`email_canonical` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`enabled` tinyint(1) NOT NULL,
`salt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`last_login` datetime DEFAULT NULL,
`locked` tinyint(1) NOT NULL,
`expired` tinyint(1) NOT NULL,
`expires_at` datetime DEFAULT NULL,
`confirmation_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`password_requested_at` datetime DEFAULT NULL,
`roles` longtext COLLATE utf8_unicode_ci NOT NULL COMMENT '(DC2Type:array)',
`credentials_expired` tinyint(1) NOT NULL,
`credentials_expire_at` datetime DEFAULT NULL,
`firstname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`lastname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`company` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`address1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`address2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`city` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`state` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`postcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`id_country` int(11) DEFAULT NULL,
`phone` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`status` int(11) NOT NULL,
`default_hourly_rate` decimal(10,0) DEFAULT NULL,
`vat_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`has_admin` tinyint(1) NOT NULL,
`amount` int(11) DEFAULT NULL,
`permission_group` int(11) DEFAULT NULL,
`api_key` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`number` int(11) NOT NULL,
`createdAt` datetime DEFAULT NULL,
`updatedAt` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UNIQ_1483A5E992FC23A8` (`username_canonical`),
UNIQUE KEY `UNIQ_1483A5E9A0D96FBF` (`email_canonical`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `users`
--
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (1,'admin','admin','admin','admin',1,'g5sx90y5udc0sosc00g0kwo8g4og8ws','ZQG3WkyXXfM85694LqpKvBkZ5TOXnxNKxTsujmShtQycso16bpWT9qIbJh+jcktpboVbg/wFhHE/DyW3bJeh2Q==','2014-05-07 22:43:20',0,0,NULL,NULL,NULL,'a:1:{i:0;s:16:\"ROLE_SUPER_ADMIN\";}',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,0,NULL,NULL,NULL,0,NULL,NULL);
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2014-05-07 23:40:30
|
<filename>macros/get_automation_recipient_columns.sql<gh_stars>1-10
{% macro get_automation_recipient_columns() %}
{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt_utils.type_timestamp()},
{"name": "automation_email_id", "datatype": dbt_utils.type_string()},
{"name": "list_id", "datatype": dbt_utils.type_string()},
{"name": "member_id", "datatype": dbt_utils.type_string()}
] %}
{{ return(columns) }}
{% endmacro %} |
-- -------------------------------------------------------------------
-- @2020, Odysseus Data Services, Inc. All rights reserved
-- MIMIC IV CDM Conversion
-- -------------------------------------------------------------------
-- -------------------------------------------------------------------
-- Populate cdm_observation_period table
--
-- Dependencies: run after
-- cdm_visit_occurrence
-- all event tables
-- cdm_death
-- -------------------------------------------------------------------
-- -------------------------------------------------------------------
-- Known issues / Open points:
--
-- TRUNCATE TABLE is not supported, organize create or replace
-- -------------------------------------------------------------------
-- -------------------------------------------------------------------
-- tmp_observation_period_clean
-- -------------------------------------------------------------------
CREATE OR REPLACE TABLE `@etl_project`.@etl_dataset.tmp_observation_period_clean AS
SELECT
src.person_id AS person_id,
MIN(src.visit_start_date) AS start_date,
MAX(src.visit_end_date) AS end_date,
src.unit_id AS unit_id
FROM
`@etl_project`.@etl_dataset.cdm_visit_occurrence src
GROUP BY
src.person_id, src.unit_id
;
INSERT INTO `@etl_project`.@etl_dataset.tmp_observation_period_clean
SELECT
src.person_id AS person_id,
MIN(src.condition_start_date) AS start_date,
MAX(src.condition_end_date) AS end_date,
src.unit_id AS unit_id
FROM
`@etl_project`.@etl_dataset.cdm_condition_occurrence src
GROUP BY
src.person_id, src.unit_id
;
INSERT INTO `@etl_project`.@etl_dataset.tmp_observation_period_clean
SELECT
src.person_id AS person_id,
MIN(src.procedure_date) AS start_date,
MAX(src.procedure_date) AS end_date,
src.unit_id AS unit_id
FROM
`@etl_project`.@etl_dataset.cdm_procedure_occurrence src
GROUP BY
src.person_id, src.unit_id
;
INSERT INTO `@etl_project`.@etl_dataset.tmp_observation_period_clean
SELECT
src.person_id AS person_id,
MIN(src.drug_exposure_start_date) AS start_date,
MAX(src.drug_exposure_end_date) AS end_date,
src.unit_id AS unit_id
FROM
`@etl_project`.@etl_dataset.cdm_drug_exposure src
GROUP BY
src.person_id, src.unit_id
;
INSERT INTO `@etl_project`.@etl_dataset.tmp_observation_period_clean
SELECT
src.person_id AS person_id,
MIN(src.device_exposure_start_date) AS start_date,
MAX(src.device_exposure_end_date) AS end_date,
src.unit_id AS unit_id
FROM
`@etl_project`.@etl_dataset.cdm_device_exposure src
GROUP BY
src.person_id, src.unit_id
;
INSERT INTO `@etl_project`.@etl_dataset.tmp_observation_period_clean
SELECT
src.person_id AS person_id,
MIN(src.measurement_date) AS start_date,
MAX(src.measurement_date) AS end_date,
src.unit_id AS unit_id
FROM
`@etl_project`.@etl_dataset.cdm_measurement src
GROUP BY
src.person_id, src.unit_id
;
INSERT INTO `@etl_project`.@etl_dataset.tmp_observation_period_clean
SELECT
src.person_id AS person_id,
MIN(src.specimen_date) AS start_date,
MAX(src.specimen_date) AS end_date,
src.unit_id AS unit_id
FROM
`@etl_project`.@etl_dataset.cdm_specimen src
GROUP BY
src.person_id, src.unit_id
;
INSERT INTO `@etl_project`.@etl_dataset.tmp_observation_period_clean
SELECT
src.person_id AS person_id,
MIN(src.observation_date) AS start_date,
MAX(src.observation_date) AS end_date,
src.unit_id AS unit_id
FROM
`@etl_project`.@etl_dataset.cdm_observation src
GROUP BY
src.person_id, src.unit_id
;
INSERT INTO `@etl_project`.@etl_dataset.tmp_observation_period_clean
SELECT
src.person_id AS person_id,
MIN(src.death_date) AS start_date,
MAX(src.death_date) AS end_date,
src.unit_id AS unit_id
FROM
`@etl_project`.@etl_dataset.cdm_death src
GROUP BY
src.person_id, src.unit_id
;
-- -------------------------------------------------------------------
-- tmp_observation_period
-- -------------------------------------------------------------------
CREATE OR REPLACE TABLE `@etl_project`.@etl_dataset.tmp_observation_period AS
SELECT
src.person_id AS person_id,
MIN(src.start_date) AS start_date,
MAX(src.end_date) AS end_date,
src.unit_id AS unit_id
FROM
`@etl_project`.@etl_dataset.tmp_observation_period_clean src
GROUP BY
src.person_id, src.unit_id
;
-- -------------------------------------------------------------------
-- cdm_observation_period
-- -------------------------------------------------------------------
--HINT DISTRIBUTE_ON_KEY(person_id)
CREATE OR REPLACE TABLE `@etl_project`.@etl_dataset.cdm_observation_period
(
observation_period_id INT64 not null ,
person_id INT64 not null ,
observation_period_start_date DATE not null ,
observation_period_end_date DATE not null ,
period_type_concept_id INT64 not null ,
--
unit_id STRING,
load_table_id STRING,
load_row_id INT64,
trace_id STRING
)
;
INSERT INTO `@etl_project`.@etl_dataset.cdm_observation_period
SELECT
FARM_FINGERPRINT(GENERATE_UUID()) AS observation_period_id,
src.person_id AS person_id,
MIN(src.start_date) AS observation_period_start_date,
MAX(src.end_date) AS observation_period_end_date,
32828 AS period_type_concept_id, -- 32828 OMOP4976901 EHR episode record
--
'observation_period' AS unit_id,
'event tables' AS load_table_id,
0 AS load_row_id,
CAST(NULL AS STRING) AS trace_id
FROM
`@etl_project`.@etl_dataset.tmp_observation_period src
GROUP BY
src.person_id
;
-- -------------------------------------------------------------------
-- cleanup
-- -------------------------------------------------------------------
-- DROP TABLE IF EXISTS `@etl_project`.@etl_dataset.tmp_observation_period_clean;
-- DROP TABLE IF EXISTS `@etl_project`.@etl_dataset.tmp_observation_period;
|
<reponame>rodel-talampas/gpdb
------------------------------------------------------------------
-- gphdfs Protocol/Formatters
------------------------------------------------------------------
CREATE OR REPLACE FUNCTION pg_catalog.gphdfs_export(record) RETURNS bytea
AS '$libdir/gphdfs.so', 'gphdfsformatter_export'
LANGUAGE C STABLE;
CREATE OR REPLACE FUNCTION pg_catalog.gphdfs_import() RETURNS record
AS '$libdir/gphdfs.so', 'gphdfsformatter_import'
LANGUAGE C STABLE;
CREATE OR REPLACE FUNCTION pg_catalog.gphdfs_read() RETURNS integer
AS '$libdir/gphdfs.so', 'gphdfsprotocol_import'
LANGUAGE C STABLE;
CREATE OR REPLACE FUNCTION pg_catalog.gphdfs_write() RETURNS integer
AS '$libdir/gphdfs.so', 'gphdfsprotocol_export'
LANGUAGE C STABLE;
CREATE OR REPLACE FUNCTION pg_catalog.gphdfs_validate() RETURNS void
AS '$libdir/gphdfs.so', 'gphdfsprotocol_validate_urls'
LANGUAGE C STABLE;
CREATE TRUSTED PROTOCOL gphdfs (
writefunc = gphdfs_write,
readfunc = gphdfs_read,
validatorfunc = gphdfs_validate);
|
<gh_stars>1-10
DROP VIEW IF EXISTS view_beban_barang4_bkd;
CREATE VIEW view_beban_barang4_bkd AS
SELECT
*,
beban * harga AS jumlah_harga
FROM
view_beban_barang3_bkd
WHERE
1 = 1 AND
beban > 0 AND
id_skpd = 26;
GRANT ALL PRIVILEGES ON view_beban_barang4_bkd TO lap_bkd;
REVOKE INSERT, UPDATE, DELETE ON view_beban_barang4_bkd FROM lap_bkd;
|
INSERT INTO `city` (`id`, `name`, `lat`, `long`, `created_at`) VALUES
(1, 'Абакан', '52.6517296', '90.0885929', '2021-02-20 16:01:30'),
(2, 'Анадырь', '53.7223661', '91.4437792', '2021-02-20 16:01:30'),
(3, 'Архангельск', '53.6778096', '53.6473115', '2021-02-20 16:01:31'),
(4, 'Астрахань', '44.8679931', '38.1618437', '2021-02-20 16:01:31'),
(5, 'Барнаул', '55.8997600', '53.9221149', '2021-02-20 16:01:31'),
(6, 'Белгород', '56.5232645', '52.9942570', '2021-02-20 16:01:31'),
(7, 'Биробиджан', '44.8783715', '39.1901720', '2021-02-20 16:01:31'),
(8, 'Благовещенск', '54.8599054', '53.0745505', '2021-02-20 16:01:31'),
(9, 'Брянск', '47.1120631', '39.4232597', '2021-02-20 16:01:31'),
(10, '<NAME>', '51.1785658', '90.5984511', '2021-02-20 16:01:31'),
(11, 'Владивосток', '47.2676075', '39.8755485', '2021-02-20 16:01:31'),
(12, 'Владикавказ', '43.0416151', '44.2198622', '2021-02-20 16:01:31'),
(13, 'Владимир', '57.8475542', '61.6693934', '2021-02-20 16:01:31'),
(14, 'Волгоград', '54.8398179', '46.5721423', '2021-02-20 16:01:31'),
(15, 'Вологда', '58.6094885', '125.3816689', '2021-02-20 16:01:31'),
(16, 'Воронеж', '52.4920914', '82.7794145', '2021-02-20 16:01:31'),
(17, 'Горно-Алтайск', '56.3919652', '38.7110350', '2021-02-20 16:01:31'),
(18, 'Грозный', '59.1613773', '57.5764851', '2021-02-20 16:01:31'),
(19, 'Екатеринбург', '50.8973664', '142.1579322', '2021-02-20 16:01:31'),
(20, 'Иваново', '50.6299932', '38.6881776', '2021-02-20 16:01:31'),
(21, 'Ижевск', '54.5083788', '37.0478910', '2021-02-20 16:01:31'),
(22, 'Иркутск', '55.5550493', '98.6644106', '2021-02-20 16:01:31'),
(23, 'Йошкар-Ола', '44.6764419', '34.4100387', '2021-02-20 16:01:31'),
(24, 'Казань', '54.9013662', '52.2970654', '2021-02-20 16:01:31'),
(25, 'Калининград', '50.2345017', '136.8791135', '2021-02-20 16:01:31'),
(26, 'Калуга', '64.7314347', '177.5015752', '2021-02-20 16:01:31'),
(27, 'Кемерово', '44.8950777', '37.3163142', '2021-02-20 16:01:31'),
(28, 'Киров', '52.5448102', '103.8885385', '2021-02-20 16:01:31'),
(29, 'Кострома', '56.6507072', '32.2621196', '2021-02-20 16:01:31'),
(30, 'Красногорск', '56.0787179', '86.0202207', '2021-02-20 16:01:31'),
(31, 'Краснодар', '46.7132526', '142.5265052', '2021-02-20 16:01:31'),
(32, 'Красноярск', '67.5678295', '33.4067218', '2021-02-20 16:01:31'),
(33, 'Курган', '55.5276336', '37.0651105', '2021-02-20 16:01:31'),
(34, 'Курск', '44.4585239', '39.7300092', '2021-02-20 16:01:31'),
(35, 'Кызыл', '56.6945341', '60.8343825', '2021-02-20 16:01:31'),
(36, 'Липецк', '43.2918071', '45.8724383', '2021-02-20 16:01:31'),
(37, 'Магадан', '54.8465693', '46.2412736', '2021-02-20 16:01:31'),
(38, 'Магас', '43.1756719', '44.2955701', '2021-02-20 16:01:31'),
(39, 'Майкоп', '55.3947544', '43.8407855', '2021-02-20 16:01:32'),
(40, 'Махачкала', '51.9387813', '43.4997558', '2021-02-20 16:01:32'),
(41, 'Москва', '45.0010338', '41.1323920', '2021-02-20 16:01:32'),
(42, 'Москва', '46.1059247', '33.6910325', '2021-02-20 16:01:32'),
(43, 'Мурманск', '44.1620800', '133.2696220', '2021-02-20 16:01:32'),
(44, 'Нальчик', '56.0913636', '49.8770441', '2021-02-20 16:01:32'),
(45, 'Нарьян-Мар', '43.3500530', '132.1596594', '2021-02-20 16:01:32'),
(46, 'Нижний Новгород', '54.3472901', '93.4356543', '2021-02-20 16:01:32'),
(47, 'Новосибирск', '57.3384162', '61.8946599', '2021-02-20 16:01:32'),
(48, 'Омск', '64.5392985', '40.5170083', '2021-02-20 16:01:32'),
(49, 'Орёл', '57.0052428', '61.4581071', '2021-02-20 16:01:32'),
(50, 'Оренбург', '56.9908444', '86.1765724', '2021-02-20 16:01:32'),
(51, 'Пенза', '46.3655808', '48.0559979', '2021-02-20 16:01:32'),
(52, 'Пермь', '51.8736331', '45.0003199', '2021-02-20 16:01:32'),
(53, 'Петрозаводск', '48.2753078', '46.1906741', '2021-02-20 16:01:32'),
(54, 'Петропавловск-Камчатский', '56.2538662', '90.4794900', '2021-02-20 16:01:32'),
(55, 'Псков', '54.9907105', '57.2783704', '2021-02-20 16:01:32'),
(56, 'Ростов-на-Дону', '59.3893090', '35.9378318', '2021-02-20 16:01:32'),
(57, 'Рязань', '51.7113066', '105.8673633', '2021-02-20 16:01:32'),
(58, 'Салехард', '54.4063588', '53.2457946', '2021-02-20 16:01:32'),
(59, 'Самара', '54.3866976', '20.6418545', '2021-02-20 16:01:32'),
(60, 'Санкт-Петербург', '51.5231282', '104.1485752', '2021-02-20 16:01:32'),
(61, 'Саранск', '52.5912632', '58.3111995', '2021-02-20 16:01:32'),
(62, 'Саратов', '54.9406759', '58.8051085', '2021-02-20 16:01:32'),
(63, 'Севастополь', '43.6820621', '43.5345627', '2021-02-20 16:01:32'),
(64, 'Симферополь', '55.1773652', '36.6567255', '2021-02-20 16:01:32'),
(65, 'Смоленск', '52.0222694', '47.7828146', '2021-02-20 16:01:32'),
(66, 'Ставрополь', '56.4949932', '43.5758953', '2021-02-20 16:01:32'),
(67, 'Сыктывкар', '55.7963352', '37.9381413', '2021-02-20 16:01:32'),
(68, 'Тамбов', '51.5389502', '43.1839828', '2021-02-20 16:01:32'),
(69, 'Тверь', '51.5822063', '116.6380088', '2021-02-20 16:01:32'),
(70, 'Томск', '54.6514128', '19.9141911', '2021-02-20 16:01:32'),
(71, 'Тула', '55.3515917', '78.3465012', '2021-02-20 16:01:32'),
(72, 'Тюмень', '53.3481145', '83.7798362', '2021-02-20 16:01:32'),
(73, 'Улан-Удэ', '53.6534563', '47.1180805', '2021-02-20 16:01:32'),
(74, 'Ульяновск', '47.1383210', '39.7508382', '2021-02-20 16:01:32'),
(75, 'Уфа', '44.7513880', '33.8750341', '2021-02-20 16:01:32'),
(76, 'Хабаровск', '57.7861144', '36.6903445', '2021-02-20 16:01:32'),
(77, 'Ханты-Мансийск', '48.1769480', '40.8033169', '2021-02-20 16:01:32'),
(78, 'Чебоксары', '58.8415212', '50.8461002', '2021-02-20 16:01:32'),
(79, 'Челябинск', '50.5977351', '36.5858236', '2021-02-20 16:01:33'),
(80, 'Черкесск', '54.1033832', '54.1111878', '2021-02-20 16:01:33'),
(81, 'Чита', '53.8113348', '36.1383153', '2021-02-20 16:01:33'),
(82, 'Элиста', '52.9641169', '43.4185003', '2021-02-20 16:01:33'),
(83, 'Южно-Сахалинск', '54.4221442', '86.3036438', '2021-02-20 16:01:33'),
(84, 'Якутск', '50.9212235', '128.4738742', '2021-02-20 16:01:33'),
(85, 'Ярославль', '45.0571581', '34.5998775', '2021-02-20 16:01:33');
|
<filename>sql/_03_object_oriented/_02_collection_type/_001_class/cases/1006.sql
--Create a class with collection type:sequence
create class t1(c1 sequence integer, c2 sequence varchar(10),
c3 sequence date, c4 sequence char(2),
c5 sequence timestamp, c6 sequence bit(8));
insert into t1 values({1,2,3},{'abc','xxx','yyy','xxx'},
{date'05/12/2008', date'05/11/2008',date'05/11/2008'},
{'xx','yy','zz','xx','yy'},
{TIMESTAMP '01/31/1994 8:15:00 pm',
TIMESTAMP '01/31/1994 8:15:00 pm',
TIMESTAMP '01/21/1992 12:00:00 am'},
{B'0001',B'0010',B'0010'});
select * from t1;
drop class t1; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.