sql
stringlengths 6
1.05M
|
|---|
<reponame>imfantuan/bytebase
-- 0010 is reserved for workspace, but is not implemented yet.
|
<filename>fixtures/doctests/docguide/003/input.sql
sudo port install docbook-xml-4.5 docbook-xsl fop
|
<gh_stars>1-10
--[er]test insert with auto_increment keyword and without column list in insert statement
create class tb(
col1 int auto_increment primary key,
col2 varchar(20),
col3 varchar(20)
);
insert into tb values('aaa1', 'bbb1');
insert into tb values('aaa2', 'bbb2');
insert into tb values('aaa3', 'bbb3');
select * from tb;
drop class tb;
|
<reponame>Joao-MRCS-Martins/MIEIC_BDAD_PROJ<filename>Queries/gatilho1_verifica.sql
.mode columns
.headers on
.nullvalue NULL
select id as PontoTroca, totalLivros as Total
from PontoTroca
where PontoTroca = 3;
INSERT INTO Dadiva (id, data, livro, utilizador, pontoTroca) VALUES (20, '2019/05/21', 20, 10, 3);
INSERT INTO Emprestimo (id, dataInicio, dataDevolucao, feedback, rate, comentario, livro, utilizador, pontoRequisicao, pontoEntrega)
VALUES (15, "2019/05/21", "2019/06/08", "Very nice service", 0, "Better than the tv-show", 10, 16, 2, 3);
INSERT INTO Emprestimo (id, dataInicio, dataDevolucao, feedback, rate, comentario, livro, utilizador, pontoRequisicao, pontoEntrega)
VALUES (16, "2019/05/21", NULL, NULL, NULL, NULL, 12, 16, 2, NULL);
UPDATE Emprestimo
SET pontoEntrega = 3,
dataDevolucao = "2019/06/01",
feedback = "Liked it a lot",
rate = 4,
comentario = "Excellent story"
WHERE id = 16;
select id as PontoTroca, totalLivros as Total
from PontoTroca
where PontoTroca = 3;
|
ALTER TABLE wards ALTER COLUMN hospital_name DROP NOT NULL;
|
<gh_stars>0
USE "SoftUni";
SELECT
[FirstName]
FROM
"Employees"
WHERE
([DepartmentID] IN (3, 10)) AND
( CAST((FORMAT([HireDate], 'yyyy')) AS INT) BETWEEN 1995 AND 2005);
|
<reponame>Bidulman/bidoyon-plus
SELECT id, juice, used_apples FROM squeezes WHERE id=?;
|
<reponame>ADA-Inc/autentication-web
REM ******************************************************************
REM Fecha : 08/05/2018
REM Realizado por : <NAME>
REM Base de Datos : FS_AUWEB_US
REM Script : Paquetes
REM ******************************************************************
PROMPT US_QVPUSR.sql...
@@US_QVPUSR.sql
PROMPT MO_QVMODU.sql...
@@MO_QVMODU.sql
PROMPT US_QVPSNA.sql...
@@US_QVPSNA.sql
PROMPT US_QVROLL.sql...
@@US_QVROLL.sql
PROMPT US_QVUSER.sql...
@@US_QVUSER.sql
PROMPT US_QPSNA.sql...
@@US_QPSNA.sql
PROMPT US_QROLL.sql...
@@US_QROLL.sql
PROMPT MO_QMODU.sql...
@@MO_QMODU.sql
PROMPT US_QUSER.sql...
@@US_QUSER.sql
PROMPT US_QFPUSR.sql...
@@US_QFPUSR.sql
PROMPT MO_QFROMO.sql...
@@MO_QFROMO.sql
PROMPT PC_API_WEB.sql...
@@PC_API_WEB.sql
|
-- Link to the problem statement : https://www.leetfree.com/problems/find-cumulative-salary-of-an-employee.html#
-- The Employee table holds the salary information in a year.
-- Write a SQL to get the cumulative sum of an employee's salary over a period of 3 months but exclude the most recent month.
-- The result should be displayed by 'Id' ascending, and then by 'Month' descending.
-- Postgresql
-- Assuming following is the table and data
CREATE TABLE employee (
id int NULL,
"month" int NULL,
salary int NULL
);
INSERT INTO employee (id, "month", salary) VALUES(1, 1, 20);
INSERT INTO employee (id, "month", salary) VALUES(2, 1, 20);
INSERT INTO employee (id, "month", salary) VALUES(1, 2, 30);
INSERT INTO employee (id, "month", salary) VALUES(2, 2, 30);
INSERT INTO employee (id, "month", salary) VALUES(3, 2, 40);
INSERT INTO employee (id, "month", salary) VALUES(1, 3, 40);
INSERT INTO employee (id, "month", salary) VALUES(3, 3, 60);
INSERT INTO employee (id, "month", salary) VALUES(1, 4, 60);
INSERT INTO employee (id, "month", salary) VALUES(3, 4, 70);
-- Query Solution
select aux.id, aux.month, aux.sal from
(select id, month, sum(salary)
over (Partition by id order by id asc, month asc) sal,
max(month) over (Partition by id) maxmonth
from employee order by id asc, month desc) aux
where maxmonth != month
|
SELECT `Device`.`id`, `Device`.`name`, `Device`.`description`, `Device`.`mode`, `Device`.`state`, `Device`.`manualStart`,
`Device`.`manualDuration`, `Device`.`manualSolenoid`, `Device`.`pumpSolenoid`,
`Device`.`softwareVersion`, `Device`.`createdAt`, `Device`.`updatedAt`,
`schedules`.`id` AS `schedules.id`, `schedules`.`name` AS `schedules.name`,
`schedules`.`start` AS `schedules.start`,
`schedules`.`duration` AS `schedules.duration`,
`schedules`.`repeat` AS `schedules.repeat`,
`schedules`.`interval` AS `schedules.interval`,
`schedules`.`enabled` AS `schedules.enabled`,
`schedules`.`createdAt` AS `schedules.createdAt`,
`schedules`.`updatedAt` AS `schedules.updatedAt`,
`schedules`.`deviceId` AS `schedules.deviceId`
FROM `Devices` AS `Device`
LEFT OUTER JOIN `Schedules` AS `schedules` ON `Device`.`id` = `schedules`.`deviceId`
WHERE `Device`.`id` = '1';
|
<reponame>fisuda/tutorials.PEP-Proxy
-- MySQL dump 10.13 Distrib 5.7.22, for Linux (x86_64)
--
-- Host: localhost Database: idm
-- ------------------------------------------------------
-- Server version 5.7.22
/*!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 `SequelizeMeta`
--
CREATE DATABASE idm;
USE idm
DROP TABLE IF EXISTS `SequelizeMeta`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SequelizeMeta` (
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`name`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `SequelizeMeta`
--
LOCK TABLES `SequelizeMeta` WRITE;
/*!40000 ALTER TABLE `SequelizeMeta` DISABLE KEYS */;
INSERT INTO `SequelizeMeta` VALUES ('201802190000-CreateUserTable.js'),('201802190003-CreateUserRegistrationProfileTable.js'),('201802190005-CreateOrganizationTable.js'),('201802190008-CreateOAuthClientTable.js'),('201802190009-CreateUserAuthorizedApplicationTable.js'),('201802190010-CreateRoleTable.js'),('201802190015-CreatePermissionTable.js'),('201802190020-CreateRoleAssignmentTable.js'),('201802190025-CreateRolePermissionTable.js'),('201802190030-CreateUserOrganizationTable.js'),('201802190035-CreateIotTable.js'),('201802190040-CreatePepProxyTable.js'),('201802190045-CreateAuthZForceTable.js'),('201802190050-CreateAuthTokenTable.js'),('201802190060-CreateOAuthAuthorizationCodeTable.js'),('201802190065-CreateOAuthAccessTokenTable.js'),('201802190070-CreateOAuthRefreshTokenTable.js'),('201802190075-CreateOAuthScopeTable.js'),('20180405125424-CreateUserTourAttribute.js'),('20180612134640-CreateEidasTable.js');
/*!40000 ALTER TABLE `SequelizeMeta` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `auth_token`
--
DROP TABLE IF EXISTS `auth_token`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auth_token` (
`access_token` varchar(255) NOT NULL,
`expires` datetime DEFAULT NULL,
`valid` tinyint(1) DEFAULT NULL,
`user_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`pep_proxy_id` varchar(255) DEFAULT NULL,
PRIMARY KEY (`access_token`),
UNIQUE KEY `access_token` (`access_token`),
KEY `user_id` (`user_id`),
KEY `pep_proxy_id` (`pep_proxy_id`),
CONSTRAINT `auth_token_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE,
CONSTRAINT `auth_token_ibfk_2` FOREIGN KEY (`pep_proxy_id`) REFERENCES `pep_proxy` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `auth_token`
--
LOCK TABLES `auth_token` WRITE;
/*!40000 ALTER TABLE `auth_token` DISABLE KEYS */;
INSERT INTO `auth_token` VALUES
('aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa','2036-07-30 12:04:45',1,'aaaaaaaa-good-0000-0000-000000000000',NULL),
('bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb','2036-07-30 12:38:13',1,'bbbbbbbb-good-0000-0000-000000000000',NULL),
('cccccccc-cccc-cccc-cccc-cccccccccccc','2036-07-31 09:36:13',1,'cccccccc-good-0000-0000-000000000000',NULL),
('51f2e380-c959-4dee-a0af-380f730137c3','2036-07-30 13:02:37',1,'admin',NULL);
/*!40000 ALTER TABLE `auth_token` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `authzforce`
--
DROP TABLE IF EXISTS `authzforce`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `authzforce` (
`az_domain` varchar(255) NOT NULL,
`policy` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`version` int(11) DEFAULT NULL,
`oauth_client_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
PRIMARY KEY (`az_domain`),
KEY `oauth_client_id` (`oauth_client_id`),
CONSTRAINT `authzforce_ibfk_1` FOREIGN KEY (`oauth_client_id`) REFERENCES `oauth_client` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `authzforce`
--
LOCK TABLES `authzforce` WRITE;
/*!40000 ALTER TABLE `authzforce` DISABLE KEYS */;
/*!40000 ALTER TABLE `authzforce` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `eidas_credentials`
--
DROP TABLE IF EXISTS `eidas_credentials`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `eidas_credentials` (
`id` char(36) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`support_contact_person_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`support_contact_person_surname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`support_contact_person_email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`support_contact_person_telephone_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`support_contact_person_company` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`technical_contact_person_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`technical_contact_person_surname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`technical_contact_person_email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`technical_contact_person_telephone_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`technical_contact_person_company` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`organization_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`organization_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`oauth_client_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`organization_nif` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`sp_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`attributes_list` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`id`),
UNIQUE KEY `oauth_client_id` (`oauth_client_id`),
CONSTRAINT `eidas_credentials_ibfk_1` FOREIGN KEY (`oauth_client_id`) REFERENCES `oauth_client` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `eidas_credentials`
--
LOCK TABLES `eidas_credentials` WRITE;
/*!40000 ALTER TABLE `eidas_credentials` DISABLE KEYS */;
/*!40000 ALTER TABLE `eidas_credentials` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `iot`
--
DROP TABLE IF EXISTS `iot`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `iot` (
`id` varchar(255) NOT NULL,
`password` varchar(40) DEFAULT NULL,
`salt` varchar(40) DEFAULT NULL,
`oauth_client_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `oauth_client_id` (`oauth_client_id`),
CONSTRAINT `iot_ibfk_1` FOREIGN KEY (`oauth_client_id`) REFERENCES `oauth_client` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `iot`
--
LOCK TABLES `iot` WRITE;
/*!40000 ALTER TABLE `iot` DISABLE KEYS */;
INSERT INTO `iot` VALUES ('iot_sensor_00000000-0000-0000-0000-000000000000','e9f7c64ec2895eec281f8fd36e588d1bc762bcca',NULL,'tutorial-dckr-site-0000-xpresswebapp');
/*!40000 ALTER TABLE `iot` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `oauth_access_token`
--
DROP TABLE IF EXISTS `oauth_access_token`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_access_token` (
`access_token` varchar(255) NOT NULL,
`expires` datetime DEFAULT NULL,
`scope` varchar(255) DEFAULT NULL,
`refresh_token` varchar(255) DEFAULT NULL,
`valid` tinyint(1) DEFAULT NULL,
`extra` json DEFAULT NULL,
`oauth_client_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`user_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`iot_id` varchar(255) DEFAULT NULL,
`authorization_code` varchar(255) DEFAULT NULL,
PRIMARY KEY (`access_token`),
UNIQUE KEY `access_token` (`access_token`),
KEY `oauth_client_id` (`oauth_client_id`),
KEY `user_id` (`user_id`),
KEY `iot_id` (`iot_id`),
CONSTRAINT `oauth_access_token_ibfk_1` FOREIGN KEY (`oauth_client_id`) REFERENCES `oauth_client` (`id`) ON DELETE CASCADE,
CONSTRAINT `oauth_access_token_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE,
CONSTRAINT `oauth_access_token_ibfk_3` FOREIGN KEY (`iot_id`) REFERENCES `iot` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `oauth_access_token`
--
LOCK TABLES `oauth_access_token` WRITE;
/*!40000 ALTER TABLE `oauth_access_token` DISABLE KEYS */;
INSERT INTO `oauth_access_token` VALUES
('<KEY>','2016-07-30 12:14:21',NULL,NULL,NULL,NULL,'8ca60ce9-32f9-42d6-a013-a19b3af0c13d','admin',NULL,NULL),
('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa','2016-07-30 12:14:21',NULL,NULL,NULL,NULL,'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa','alice',NULL,NULL),
('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb','2016-07-30 12:14:21',NULL,NULL,NULL,NULL,'bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb','bob',NULL,NULL),
('cccccccccccccccccccccccccccccccccccccccc','2016-07-30 12:14:21',NULL,NULL,NULL,NULL,'cccccccc-cccc-cccc-cccc-cccccccccccc','charlie',NULL,NULL),
('d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1','2016-07-30 12:14:21',NULL,NULL,NULL,NULL,'d1d1d1d1-dddd-dddd-dddd-d1d1d1d1d1d1','detective1',NULL,NULL),
('d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2','2016-07-30 12:14:21',NULL,NULL,NULL,NULL,'d2d2d2d2-dddd-dddd-dddd-d2d2d2d2d2d2','detective2',NULL,NULL),
('m1m1m1m1m1m1m1m1m1m1m1m1m1m1m1m1m1m1m1m1','2016-07-30 12:14:21',NULL,NULL,NULL,NULL,'m1m1m1m1-mmmm-mmmm-mmmm-m1m1m1m1m1m1','manager1',NULL,NULL),
('m2m2m2m2m2m2m2m2m2m2m2m2m2m2m2m2m2m2m2m2','2016-07-30 12:14:21',NULL,NULL,NULL,NULL,'m2m2m2m2-mmmm-mmmm-mmmm-m2m2m2m2m2m2','manager2',NULL,NULL);
/*!40000 ALTER TABLE `oauth_access_token` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `oauth_authorization_code`
--
DROP TABLE IF EXISTS `oauth_authorization_code`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_authorization_code` (
`authorization_code` varchar(256) NOT NULL,
`expires` datetime DEFAULT NULL,
`redirect_uri` varchar(2000) DEFAULT NULL,
`scope` varchar(255) DEFAULT NULL,
`valid` tinyint(1) DEFAULT NULL,
`extra` json DEFAULT NULL,
`oauth_client_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`user_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
PRIMARY KEY (`authorization_code`),
UNIQUE KEY `authorization_code` (`authorization_code`),
KEY `oauth_client_id` (`oauth_client_id`),
KEY `user_id` (`user_id`),
CONSTRAINT `oauth_authorization_code_ibfk_1` FOREIGN KEY (`oauth_client_id`) REFERENCES `oauth_client` (`id`) ON DELETE CASCADE,
CONSTRAINT `oauth_authorization_code_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `oauth_authorization_code`
--
LOCK TABLES `oauth_authorization_code` WRITE;
/*!40000 ALTER TABLE `oauth_authorization_code` DISABLE KEYS */;
/*!40000 ALTER TABLE `oauth_authorization_code` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `oauth_client`
--
DROP TABLE IF EXISTS `oauth_client`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_client` (
`id` char(36) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
`secret` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`url` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`redirect_uri` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`redirect_sign_out_uri` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`image` varchar(255) DEFAULT 'default',
`grant_type` varchar(255) DEFAULT NULL,
`response_type` varchar(255) DEFAULT NULL,
`client_type` varchar(15) DEFAULT NULL,
`scope` varchar(80) DEFAULT NULL,
`extra` json DEFAULT NULL,
`token_types` varchar(2000) DEFAULT 'bearer',
`jwt_secret` varchar(2000) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `oauth_client`
--
LOCK TABLES `oauth_client` WRITE;
/*!40000 ALTER TABLE `oauth_client` DISABLE KEYS */;
INSERT INTO `oauth_client` VALUES
('tutorial-dckr-site-0000-xpresswebapp','FIWARE Tutorial',
'FIWARE Application protected by OAuth2 and Keyrock', 'tutorial-dckr-site-0000-clientsecret',
'http://localhost:3000','http://localhost:3000/login',NULL,'default',
'authorization_code,implicit,password,client_credentials,refresh_token','code',NULL,NULL,NULL,'bearer,permanent', NULL),
('trusted-dckr-app-0000-000000000000','Trusted Application',
'Second application protected by OAuth2 and Keyrock','trusted-dckr-app-0000-clientsecret',
'','',NULL,'default',
'password','code',NULL,NULL,NULL,'bearer', NULL);
/*!40000 ALTER TABLE `oauth_client` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `oauth_refresh_token`
--
DROP TABLE IF EXISTS `oauth_refresh_token`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_refresh_token` (
`refresh_token` varchar(256) NOT NULL,
`expires` datetime DEFAULT NULL,
`scope` varchar(255) DEFAULT NULL,
`oauth_client_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`user_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`iot_id` varchar(255) DEFAULT NULL,
`valid` tinyint(1) DEFAULT NULL,
`authorization_code` varchar(255) DEFAULT NULL,
PRIMARY KEY (`refresh_token`),
UNIQUE KEY `refresh_token` (`refresh_token`),
KEY `oauth_client_id` (`oauth_client_id`),
KEY `user_id` (`user_id`),
KEY `iot_id` (`iot_id`),
CONSTRAINT `oauth_refresh_token_ibfk_1` FOREIGN KEY (`oauth_client_id`) REFERENCES `oauth_client` (`id`) ON DELETE CASCADE,
CONSTRAINT `oauth_refresh_token_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE,
CONSTRAINT `oauth_refresh_token_ibfk_3` FOREIGN KEY (`iot_id`) REFERENCES `iot` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `oauth_refresh_token`
--
LOCK TABLES `oauth_refresh_token` WRITE;
/*!40000 ALTER TABLE `oauth_refresh_token` DISABLE KEYS */;
INSERT INTO `oauth_refresh_token` VALUES ('<PASSWORD>','2018-08-13 11:14:21',NULL,'8ca60ce9-32f9-42d6-a013-a19b3af0c13d','admin',NULL, NULL,NULL);
/*!40000 ALTER TABLE `oauth_refresh_token` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `oauth_scope`
--
DROP TABLE IF EXISTS `oauth_scope`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_scope` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`scope` varchar(255) DEFAULT NULL,
`is_default` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `oauth_scope`
--
LOCK TABLES `oauth_scope` WRITE;
/*!40000 ALTER TABLE `oauth_scope` DISABLE KEYS */;
/*!40000 ALTER TABLE `oauth_scope` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `organization`
--
DROP TABLE IF EXISTS `organization`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `organization` (
`id` char(36) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
`website` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`image` varchar(255) DEFAULT 'default',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `organization`
--
LOCK TABLES `organization` WRITE;
/*!40000 ALTER TABLE `organization` DISABLE KEYS */;
INSERT INTO `organization` VALUES
('security-team-0000-0000-000000000000','Security','Security Group for Store Detectives',NULL,'default'),
('managers-team-0000-0000-000000000000','Management','Management Group for Store Managers',NULL,'default');
/*!40000 ALTER TABLE `organization` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `pep_proxy`
--
DROP TABLE IF EXISTS `pep_proxy`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pep_proxy` (
`id` varchar(255) NOT NULL,
`password` varchar(40) DEFAULT NULL,
`salt` varchar(40) DEFAULT NULL,
`oauth_client_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `oauth_client_id` (`oauth_client_id`),
CONSTRAINT `pep_proxy_ibfk_1` FOREIGN KEY (`oauth_client_id`) REFERENCES `oauth_client` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `pep_proxy`
--
LOCK TABLES `pep_proxy` WRITE;
/*!40000 ALTER TABLE `pep_proxy` DISABLE KEYS */;
INSERT INTO `pep_proxy` VALUES ('pep_proxy_00000000-0000-0000-0000-000000000000','e9f7c64ec2895eec281f8fd36e588d1bc762bcca',NULL,'tutorial-dckr-site-0000-xpresswebapp');
/*!40000 ALTER TABLE `pep_proxy` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `permission`
--
DROP TABLE IF EXISTS `permission`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `permission` (
`id` char(36) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
`is_internal` tinyint(1) DEFAULT '0',
`action` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`resource` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`xml` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
`oauth_client_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`is_regex` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `oauth_client_id` (`oauth_client_id`),
CONSTRAINT `permission_ibfk_1` FOREIGN KEY (`oauth_client_id`) REFERENCES `oauth_client` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `permission`
--
LOCK TABLES `permission` WRITE;
/*!40000 ALTER TABLE `permission` DISABLE KEYS */;
INSERT INTO `permission` VALUES
('1','Get and assign all internal application roles',NULL,1,NULL,NULL,NULL,'idm_admin_app',0),
('2','Manage the application',NULL,1,NULL,NULL,NULL,'idm_admin_app',0),
('3','Manage roles',NULL,1,NULL,NULL,NULL,'idm_admin_app',0),
('4','Manage authorizations',NULL,1,NULL,NULL,NULL,'idm_admin_app',0),
('5','Get and assign all public application roles',NULL,1,NULL,NULL,NULL,'idm_admin_app',0),
('6','Get and assign only public owned roles',NULL,1,NULL,NULL,NULL,'idm_admin_app',0),
('increase-stck-0000-0000-000000000000','Order Stock','Increase Stock Count',0,'GET','/app/order-stock',NULL,'tutorial-dckr-site-0000-xpresswebapp',0),
('entrance-open-0000-0000-000000000000','Unlock','Unlock main entrance',0,'POST','/door/unlock',NULL,'tutorial-dckr-site-0000-xpresswebapp',0),
('alrmbell-ring-0000-0000-000000000000','Ring Alarm Bell',NULL,0,'POST','/bell/ring',NULL,'tutorial-dckr-site-0000-xpresswebapp',0),
('pricechg-stck-0000-0000-000000000000','Access Price Changes',NULL,0,'GET','/app/price-change',NULL,'tutorial-dckr-site-0000-xpresswebapp',0);
/*!40000 ALTER TABLE `permission` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `role`
--
DROP TABLE IF EXISTS `role`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `role` (
`id` char(36) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_internal` tinyint(1) DEFAULT '0',
`oauth_client_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `oauth_client_id` (`oauth_client_id`),
CONSTRAINT `role_ibfk_1` FOREIGN KEY (`oauth_client_id`) REFERENCES `oauth_client` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `role`
--
LOCK TABLES `role` WRITE;
/*!40000 ALTER TABLE `role` DISABLE KEYS */;
INSERT INTO `role` VALUES
('security-role-0000-0000-000000000000','Security Team',0,'tutorial-dckr-site-0000-xpresswebapp'),
('managers-role-0000-0000-000000000000','Management',0,'tutorial-dckr-site-0000-xpresswebapp'),
('provider','Provider',1,'idm_admin_app'),('purchaser','Purchaser',1,'idm_admin_app');
/*!40000 ALTER TABLE `role` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `role_assignment`
--
DROP TABLE IF EXISTS `role_assignment`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `role_assignment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`role_organization` varchar(255) DEFAULT NULL,
`oauth_client_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`role_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`organization_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`user_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `oauth_client_id` (`oauth_client_id`),
KEY `role_id` (`role_id`),
KEY `organization_id` (`organization_id`),
KEY `user_id` (`user_id`),
CONSTRAINT `role_assignment_ibfk_1` FOREIGN KEY (`oauth_client_id`) REFERENCES `oauth_client` (`id`) ON DELETE CASCADE,
CONSTRAINT `role_assignment_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE CASCADE,
CONSTRAINT `role_assignment_ibfk_3` FOREIGN KEY (`organization_id`) REFERENCES `organization` (`id`) ON DELETE CASCADE,
CONSTRAINT `role_assignment_ibfk_4` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `role_assignment`
--
LOCK TABLES `role_assignment` WRITE;
/*!40000 ALTER TABLE `role_assignment` DISABLE KEYS */;
INSERT INTO `role_assignment` VALUES
(1,NULL,'8ca60ce9-32f9-42d6-a013-a19b3af0c13d','provider',NULL,'96154659-cb3b-4d2d-afef-18d6aec0518e'),
(2,'member','<PASSWORD>-42d6-a013-a19<PASSWORD>','provider','74f5299e-3247-468c-affb-957cda03f0c4',NULL),
(3,NULL,'222eda27-958b-4f0c-a5cb-e4114fb170c3','provider',NULL,'admin'),
(4,NULL,'222eda27-958b-4f0c-a5cb-e4114fb170c3','provider',NULL,'96154659-cb3b-4d2d-afef-18d6aec0518e'),
(5,NULL,'tutorial-dckr-site-0000-xpresswebapp','provider',NULL,'aaaaaaaa-good-0000-0000-000000000000'),
(6,NULL,'trusted-dckr-app-0000-000000000000','provider',NULL,'aaaaaaaa-good-0000-0000-000000000000'),
(10,NULL,'tutorial-dckr-site-0000-xpresswebapp','security-role-0000-0000-000000000000',NULL,'cccccccc-good-0000-0000-000000000000'),
(11,'member','tutorial-dckr-site-0000-xpresswebapp','security-role-0000-0000-000000000000','security-team-0000-0000-000000000000',NULL),
(12,NULL,'tutorial-dckr-site-0000-xpresswebapp','managers-role-0000-0000-000000000000',NULL,'bbbbbbbb-good-0000-0000-000000000000'),
(13,'member','tutorial-dckr-site-0000-xpresswebapp','managers-role-0000-0000-000000000000','managers-team-0000-0000-000000000000',NULL);
/*!40000 ALTER TABLE `role_assignment` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `role_permission`
--
DROP TABLE IF EXISTS `role_permission`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `role_permission` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`role_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`permission_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `role_id` (`role_id`),
KEY `permission_id` (`permission_id`),
CONSTRAINT `role_permission_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE CASCADE,
CONSTRAINT `role_permission_ibfk_2` FOREIGN KEY (`permission_id`) REFERENCES `permission` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `role_permission`
--
LOCK TABLES `role_permission` WRITE;
/*!40000 ALTER TABLE `role_permission` DISABLE KEYS */;
INSERT INTO `role_permission` VALUES
(1,'provider','1'),(2,'provider','2'),(3,'provider','3'),(4,'provider','4'),(5,'provider','5'),(6,'provider','6'),
(7,'purchaser','5'),
(8,'security-role-0000-0000-000000000000','alrmbell-ring-0000-0000-000000000000'),
(9,'security-role-0000-0000-000000000000','entrance-open-0000-0000-000000000000'),
(10,'managers-role-0000-0000-000000000000','alrmbell-ring-0000-0000-000000000000'),
(11,'managers-role-0000-0000-000000000000','increase-stck-0000-0000-000000000000'),
(12,'managers-role-0000-0000-000000000000','pricechg-stck-0000-0000-000000000000');
/*!40000 ALTER TABLE `role_permission` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `trusted_application`
--
DROP TABLE IF EXISTS `trusted_application`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `trusted_application` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`oauth_client_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`trusted_oauth_client_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `oauth_client_id` (`oauth_client_id`),
KEY `trusted_oauth_client_id` (`trusted_oauth_client_id`),
CONSTRAINT `trusted_application_ibfk_1` FOREIGN KEY (`oauth_client_id`) REFERENCES `oauth_client` (`id`) ON DELETE CASCADE,
CONSTRAINT `trusted_application_ibfk_2` FOREIGN KEY (`trusted_oauth_client_id`) REFERENCES `oauth_client` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `trusted_application`
--
LOCK TABLES `trusted_application` WRITE;
/*!40000 ALTER TABLE `trusted_application` DISABLE KEYS */;
INSERT INTO `trusted_application` VALUES
(1,'tutorial-dckr-site-0000-xpresswebapp','trusted-dckr-app-0000-000000000000');
/*!40000 ALTER TABLE `trusted_application` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user`
--
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user` (
`id` char(36) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`username` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
`website` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`image` varchar(255) DEFAULT 'default',
`gravatar` tinyint(1) DEFAULT '0',
`email` varchar(255) DEFAULT NULL,
`password` varchar(40) DEFAULT NULL,
`salt` varchar(40) DEFAULT NULL,
`date_password` datetime DEFAULT NULL,
`enabled` tinyint(1) DEFAULT '0',
`admin` tinyint(1) DEFAULT '0',
`extra` varchar(255) DEFAULT NULL,
`scope` varchar(80) DEFAULT NULL,
`starters_tour_ended` tinyint(1) DEFAULT '0',
`eidas_id` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user`
--
LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` VALUES
('aaaaaaaa-good-0000-0000-000000000000','alice', 'Alice is the admin',NULL,'default',0,'<EMAIL>','<PASSWORD>', '<PASSWORD>', '2018-07-30 11:41:14',1,1,NULL,NULL,0,NULL),
('bbbbbbbb-good-0000-0000-000000000000','bob','Bob is the regional manager',NULL,'default',0,'<EMAIL>','<PASSWORD>', 'fbba54b6750b16e8', '2018-07-30 11:41:14',1,0,NULL,NULL,0,NULL),
('cccccccc-good-0000-0000-000000000000','charlie','Charlie is head of security',NULL,'default',0,'<EMAIL>','<PASSWORD>', 'fbba54b6750b16e8', '2018-07-30 11:41:14',1,0,NULL,NULL,0,NULL),
('manager1-good-0000-0000-000000000000','manager1','Manager works for Bob',NULL,'default',0,'<EMAIL>','<PASSWORD>', 'fbba54b6750b16e8', '2018-07-30 11:41:14',1,0,NULL,NULL,0,NULL),
('manager2-good-0000-0000-000000000000','manager2','Manager works for Bob',NULL,'default',0,'<EMAIL>','<PASSWORD>', 'fbba54b6750b16e8', '2018-07-30 11:41:14',1,0,NULL,NULL,0,NULL),
('detective1-good-0000-0000-000000000000','detective1','Detective works for Charlie',NULL,'default',0,'<EMAIL>','<PASSWORD>', 'fbba54b6750b16e8', '2018-07-30 11:41:14',1,0,NULL,NULL,0,NULL),
('detective2-good-0000-0000-000000000000','detective2','Detective works for Charlie',NULL,'default',0,'<EMAIL>','<PASSWORD>', 'fbba54b6750b16e8', '2018-07-30 11:41:14',1,0,NULL,NULL,0,NULL),
('eve-evil-0000-0000-000000000000','eve','Eve the Eavesdropper',NULL,'default',0,'<EMAIL>','<PASSWORD>', 'fbba54b6750b16e8', '2018-07-30 11:41:14',1,0,NULL,NULL,0,NULL),
('mallory-evil-0000-0000-000000000000','mallory','Mallory the malicious attacker',NULL,'default',0,'<EMAIL>','<PASSWORD>', 'fbba54b6750b16e8', '2018-07-30 11:41:14',1,0,NULL,NULL,0,NULL),
('rob-evil-0000-0000-000000000000','rob','<NAME>' ,NULL,'default',0,'<EMAIL>','89e48c55e4e4b3b86141fb15f5e6abf70f8c32c0', 'fbba54b6750b16e8', '2018-07-30 11:41:14',1,0,NULL,NULL,0,NULL);/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user_authorized_application`
--
DROP TABLE IF EXISTS `user_authorized_application`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_authorized_application` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`oauth_client_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`shared_attributes` char(255) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`login_date` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `oauth_client_id` (`oauth_client_id`),
CONSTRAINT `user_authorized_application_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE,
CONSTRAINT `user_authorized_application_ibfk_2` FOREIGN KEY (`oauth_client_id`) REFERENCES `oauth_client` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user_authorized_application`
--
LOCK TABLES `user_authorized_application` WRITE;
/*!40000 ALTER TABLE `user_authorized_application` DISABLE KEYS */;
INSERT INTO `user_authorized_application` VALUES
(1,'admin','8ca60ce9-32f9-42d6-a013-a19b3af0c13d', NULL, NULL);
/*!40000 ALTER TABLE `user_authorized_application` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user_organization`
--
DROP TABLE IF EXISTS `user_organization`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_organization` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`role` varchar(10) DEFAULT NULL,
`user_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`organization_id` char(36) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `organization_id` (`organization_id`),
CONSTRAINT `user_organization_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE,
CONSTRAINT `user_organization_ibfk_2` FOREIGN KEY (`organization_id`) REFERENCES `organization` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user_organization`
--
LOCK TABLES `user_organization` WRITE;
/*!40000 ALTER TABLE `user_organization` DISABLE KEYS */;
INSERT INTO `user_organization` VALUES
(2,'owner', 'aaaaaaaa-good-0000-0000-000000000000','security-team-0000-0000-000000000000'),
(3,'owner', 'aaaaaaaa-good-0000-0000-000000000000','managers-team-0000-0000-000000000000'),
(4,'owner', 'bbbbbbbb-good-0000-0000-000000000000','managers-team-0000-0000-000000000000'),
(5,'member','manager1-good-0000-0000-000000000000','managers-team-0000-0000-000000000000'),
(6,'member','manager2-good-0000-0000-000000000000','managers-team-0000-0000-000000000000'),
(7,'owner', 'cccccccc-good-0000-0000-000000000000','security-team-0000-0000-000000000000'),
(8,'member','detective1-good-0000-0000-000000000000','security-team-0000-0000-000000000000'),
(9,'member','detective2-good-0000-0000-000000000000','security-team-0000-0000-000000000000');
/*!40000 ALTER TABLE `user_organization` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user_registration_profile`
--
DROP TABLE IF EXISTS `user_registration_profile`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_registration_profile` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`activation_key` varchar(255) DEFAULT NULL,
`activation_expires` datetime DEFAULT NULL,
`reset_key` varchar(255) DEFAULT NULL,
`reset_expires` datetime DEFAULT NULL,
`verification_key` varchar(255) DEFAULT NULL,
`verification_expires` datetime DEFAULT NULL,
`user_email` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `user_email` (`user_email`),
CONSTRAINT `user_registration_profile_ibfk_1` FOREIGN KEY (`user_email`) REFERENCES `user` (`email`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user_registration_profile`
--
LOCK TABLES `user_registration_profile` WRITE;
/*!40000 ALTER TABLE `user_registration_profile` DISABLE KEYS */;
INSERT INTO `user_registration_profile` VALUES (1,'b26roiin0r','2018-07-31 10:03:53',NULL,NULL,NULL,NULL,'<EMAIL>');
/*!40000 ALTER TABLE `user_registration_profile` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-08-10 9:03:58
|
create table component_menu_icons
(
id varchar2(64) default sys_guid() not null primary key,
icon varchar2(64) not null unique,
created_by varchar2(100) not null,
created_date timestamp default current_timestamp not null
);
create table component_menus
(
id varchar2(64) default sys_guid() not null primary key,
title varchar2(255),
path varchar2(255),
icon_id varchar2(64),
is_menu number(1) default 0 not null,
created_by varchar2(100) not null,
created_date timestamp default current_timestamp not null,
module varchar2(64) not null,
parent_id varchar2(64),
constraint uq_menu unique (path, module, parent_id)
);
alter table component_menus
add constraint fk_menus_url_parent_id foreign key (parent_id)
references component_menus (id) on delete cascade;
create table component_menu_map_by_role
(
id varchar2(64) default sys_guid() not null primary key,
role_id int not null,
menu_id varchar2(64) not null,
created_by varchar2(100) not null,
created_date timestamp default current_timestamp not null
);
alter table component_menu_map_by_role
add constraint fk_menu_map_role_id foreign key (role_id)
references AUTH_ROLES (id) on delete cascade;
alter table component_menu_map_by_role
add constraint fk_menu_map_menu_id foreign key (menu_id)
references component_menus (id) on delete cascade;
|
<reponame>dvsa/poc-new-selenium<filename>src/server/resources/queries/vehicle/VEHICLE_REG_DANGEROUS_MANUAL_EURW.sql
select veh.registration, rfrc.comment
from vehicle veh, mot_test_current mtc, mot_test_current_rfr_map rfr, mot_test_rfr_map_comment rfrc
where veh.registration is not null
and mtc.vehicle_id = veh.id
and rfr.id = rfrc.id
and mtc.prs_mot_test_id is null -- only shows tests that do not have a Pass after Rectification at Station
and mtc.id = rfr.mot_test_id
and rfr.failure_dangerous = 1 -- shows results for tests that fail for a dangerous reason
and rfr.rfr_type_id = 6 -- manually entered defect
and mtc.status_id = 5 -- Failed test
and mtc.mot_test_type_id = 1 -- Normal test
and mtc.completed_date > str_to_date('20/05/2018', '%d/%m/%Y') -- competed mot tests before EURW changes
limit 1
|
DROP DATABASE IF EXISTS schooldb;
CREATE DATABASE IF NOT EXISTS schooldb;
USE schooldb;
CREATE TABLE IF NOT EXISTS Student (
ssn VARCHAR(11) NOT NULL PRIMARY KEY,
f_name VARCHAR(20) NOT NULL,
l_name VARCHAR(20) NOT NULL,
phone VARCHAR(10),
city VARCHAR(20) NOT NULL,
zip VARCHAR(5) NOT NULL
);
CREATE TABLE IF NOT EXISTS Course (
number VARCHAR(3) NOT NULL PRIMARY KEY,
name VARCHAR(30) NOT NULL,
room INT NOT NULL
);
CREATE TABLE IF NOT EXISTS Enrolls_in (
ssn VARCHAR(11) NOT NULL,
class VARCHAR(3) NOT NULL,
score FLOAT,
CONSTRAINT pk_enroll PRIMARY KEY (ssn,class)
);
|
<filename>modules/auth/pgFunctions/auth.current_user_has_proofed_provider.function.sql
-- current_user_has_proofed_provider function checks if a user has a proofed AuthFactor with the given provider-name
CREATE OR REPLACE FUNCTION _auth.current_user_has_proofed_provider(i_provider TEXT) RETURNS BOOLEAN AS $$
DECLARE
v_transaction_token_secret TEXT;
v_transaction_token TEXT;
v_parts TEXT[];
v_user_id TEXT;
v_provider_set TEXT;
v_timestamp BIGINT;
v_signature TEXT;
v_payload TEXT;
v_query TEXT;
v_has_proofed_provider BOOLEAN;
BEGIN
-- Get required values from Auth-table
SELECT value INTO v_transaction_token_secret FROM _auth."Settings" WHERE key = 'transaction_token_secret';
-- Read the transaction_token from local variable.
v_transaction_token := current_setting('auth.transaction_token', true);
-- Checks that the local variable is not null
IF v_transaction_token IS NULL THEN
RAISE EXCEPTION 'AUTH.THROW.AUTHENTICATION_ERROR';
END IF;
-- Split the token into its parts.
v_parts := regexp_split_to_array(v_transaction_token, ';');
-- A transaction_token needs to have 4 parts
IF array_length(v_parts, 1) != 4 THEN
RAISE EXCEPTION 'AUTH.THROW.AUTHENTICATION_ERROR';
END IF;
-- Write parts into function-variables
v_timestamp := v_parts[1];
v_user_id := v_parts[2];
v_provider_set := v_parts[3];
v_signature := v_parts[4];
-- Check if the variables are not null
IF v_user_id IS NULL OR v_provider_set IS NULL OR v_timestamp IS NULL OR v_signature IS NULL THEN
RAISE EXCEPTION 'AUTH.THROW.AUTHENTICATION_ERROR';
END IF;
-- Recreate the signature-payload to verify token
v_payload := v_timestamp || ';' || v_user_id || ';' || v_provider_set || ';' || txid_current() || v_transaction_token_secret;
-- Hash payload and check if it matches the token-signature
IF v_signature = encode(digest(v_payload, 'sha256'), 'hex') THEN
v_query := $tok$ SELECT COALESCE((SELECT "proofedAt" IS NOT NULL FROM _auth."AuthFactor" WHERE "deletedAt" IS NULL AND "userAuthenticationId" = (SELECT "id" FROM _auth."UserAuthentication" WHERE "userId" = %L) AND "provider" = %L), FALSE); $tok$;
EXECUTE format(v_query, v_user_id, i_provider) INTO v_has_proofed_provider;
return v_has_proofed_provider;
END IF;
-- Raise exeption because the token is not valid.
RAISE EXCEPTION 'AUTH.THROW.AUTHENTICATION_ERROR';
END;
$$ LANGUAGE plpgsql SECURITY DEFINER STABLE;
|
<gh_stars>1-10
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW [tSQLt].[Private_SysTypes] AS SELECT * FROM sys.types AS T;
GO
|
-- migrate:up
CREATE TABLE public.owners (
id bigint NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
resolver public.repo_resolver NOT NULL,
slug public.citext NOT NULL,
name text,
description text,
extra jsonb DEFAULT '{}'::jsonb NOT NULL,
shards_count integer,
dependents_count integer,
transitive_dependents_count integer,
dev_dependents_count integer,
transitive_dependencies_count integer,
dev_dependencies_count integer,
dependencies_count integer,
popularity real,
created_at timestamp with time zone DEFAULT now() NOT NULL,
updated_at timestamp with time zone DEFAULT now() NOT NULL
);
CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.owners FOR EACH ROW EXECUTE PROCEDURE public.trigger_set_timestamp();
CREATE UNIQUE INDEX owners_resolver_slug_idx ON public.owners USING btree (resolver, slug);
ALTER TABLE owners
ADD CONSTRAINT owners_resolver_slug_uniq UNIQUE USING INDEX owners_resolver_slug_idx;
ALTER TABLE repos
ADD COLUMN owner_id bigint REFERENCES owners(id);
CREATE TABLE public.owner_metrics (
id bigint NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
owner_id bigint NOT NULL,
shards_count integer NOT NULL,
dependents_count integer NOT NULL,
transitive_dependents_count integer NOT NULL,
dev_dependents_count integer NOT NULL,
transitive_dependencies_count integer NOT NULL,
dev_dependencies_count integer NOT NULL,
dependencies_count integer NOT NULL,
popularity real NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL
);
ALTER TABLE ONLY public.owner_metrics
ADD CONSTRAINT owner_metrics_owner_id_fkey FOREIGN KEY (owner_id) REFERENCES public.owners(id) ON DELETE CASCADE DEFERRABLE;
CREATE OR REPLACE FUNCTION public.owner_metrics_calculate(curr_owner_id bigint) RETURNS void
LANGUAGE plpgsql
AS $$
DECLARE
aggregated_popularity real;
local_dev_dependencies_count integer;
BEGIN
CREATE TEMPORARY TABLE owned_shards
AS
SELECT
shard_id AS id
FROM repos
WHERE owner_id = curr_owner_id
AND repos.role = 'canonical'
;
CREATE TEMPORARY TABLE dependents
AS
SELECT
d.shard_id, depends_on, scope
FROM
shard_dependencies d
JOIN owned_shards
ON depends_on = owned_shards.id
;
CREATE TEMPORARY TABLE tmp_dependencies
AS
SELECT
d.shard_id, depends_on, scope
FROM
shard_dependencies d
JOIN owned_shards
ON shard_id = owned_shards.id
;
SELECT
SUM(popularity) INTO aggregated_popularity
FROM
shard_metrics_current
JOIN owned_shards
ON owned_shards.id = shard_metrics_current.shard_id
;
SELECT
COUNT(DISTINCT depends_on) INTO local_dev_dependencies_count
FROM
tmp_dependencies
WHERE
scope <> 'runtime'
;
UPDATE owners
SET
shards_count = (
SELECT
COUNT(*)
FROM
owned_shards
),
dependents_count = (
SELECT
COUNT(DISTINCT shard_id)
FROM
dependents
WHERE
scope = 'runtime'
),
dev_dependents_count = (
SELECT
COUNT(DISTINCT shard_id)
FROM
dependents
WHERE
scope <> 'runtime'
),
transitive_dependents_count = tdc.transitive_dependents_count,
dependencies_count = (
SELECT
COUNT(DISTINCT depends_on)
FROM
tmp_dependencies
WHERE
scope = 'runtime'
),
dev_dependencies_count = local_dev_dependencies_count,
transitive_dependencies_count = (
WITH RECURSIVE transitive_dependencies AS (
SELECT
shard_id, depends_on
FROM
tmp_dependencies
WHERE
scope = 'runtime'
UNION
SELECT
d.shard_id, d.depends_on
FROM
shard_dependencies d
INNER JOIN
transitive_dependencies ON transitive_dependencies.depends_on = d.shard_id AND d.scope = 'runtime'
)
SELECT
COUNT(*)
FROM
(
SELECT DISTINCT
depends_on
FROM
transitive_dependencies
) AS d
),
popularity = POWER(
POWER(COALESCE(tdc.transitive_dependents_count, 0) + 1, 1.2) *
POWER(COALESCE(local_dev_dependencies_count, 0) + 1, 0.6) *
POWER(COALESCE(aggregated_popularity, 0) + 1, 1.2),
1.0/3.0
)
FROM
(
WITH RECURSIVE transitive_dependents AS (
SELECT
shard_id, depends_on
FROM
dependents
WHERE
scope = 'runtime'
UNION
SELECT
d.shard_id, d.depends_on
FROM
shard_dependencies d
INNER JOIN
transitive_dependents ON transitive_dependents.shard_id = d.depends_on AND d.scope = 'runtime'
)
SELECT
COUNT(*) AS transitive_dependents_count
FROM
(
SELECT DISTINCT
shard_id
FROM
transitive_dependents
) AS d
) AS tdc
WHERE
id = curr_owner_id
;
INSERT INTO owner_metrics
(
owner_id,
shards_count,
dependents_count, dev_dependents_count, transitive_dependents_count,
dependencies_count, dev_dependencies_count, transitive_dependencies_count,
popularity
)
SELECT
id,
shards_count,
dependents_count, dev_dependents_count, transitive_dependents_count,
dependencies_count, dev_dependencies_count, transitive_dependencies_count,
popularity
FROM
owners
WHERE id = curr_owner_id;
DROP TABLE dependents;
DROP TABLE tmp_dependencies;
DROP TABLE owned_shards;
END;
$$;
-- migrate:down
DROP FUNCTION public.owner_metrics_calculate;
ALTER TABLE repos DROP COLUMN owner_id;
DROP TABLE owner_metrics;
DROP TABLE owners;
|
<filename>src/ResourceFirstTranslations.Database/Tables/Languages.sql
CREATE TABLE [dbo].[Languages] (
[Culture] NVARCHAR (10) NOT NULL,
[Description] NVARCHAR (255) NOT NULL,
CONSTRAINT [PK_Languages] PRIMARY KEY CLUSTERED ([Culture] ASC)
);
|
<reponame>ministryofjustice/prison-api
create or replace package api_owner.api_case_notes
as
function show_version return varchar2;
procedure get_case_notes_since(p_from_timestamp in timestamp,
p_case_note_type in offender_case_notes.case_note_type%type default null,
p_case_note_sub_type in offender_case_notes.case_note_sub_type%type default null,
p_case_note_csr out sys_refcursor);
procedure get_all_case_notes_since(p_from_timestamp in timestamp,
p_case_note_csr out sys_refcursor);
procedure get_offender_case_notes(p_noms_id in offenders.offender_id_display%type,
p_from_timestamp in timestamp default null,
p_case_note_csr out sys_refcursor);
end api_case_notes;
/
sho err
create or replace package body api_owner.api_case_notes
as
-- =============================================================
v_version CONSTANT VARCHAR2 ( 60 ) := '1.0 18-Jul-2017';
-- =============================================================
/*
MODIFICATION HISTORY
-------------------------------------------------------------------------------
Person Date Version Comments
--------- ----------- --------- ----------------------------------------
<NAME> 15-Nov-2016 1.0 Initial version
*/
function show_version return varchar2
is
begin
return ( v_version );
end show_version;
procedure get_case_notes_since(p_from_timestamp in timestamp,
p_case_note_type in offender_case_notes.case_note_type%type default null,
p_case_note_sub_type in offender_case_notes.case_note_sub_type%type default null,
p_case_note_csr out sys_refcursor)
is
begin
open p_case_note_csr for
select o.offender_id_display,
oc.offender_book_id,
ob.agy_loc_id,
oc.case_note_id,
to_date(to_char(oc.contact_date,'yyyymmdd')||
to_char(oc.contact_time,'hh24miss'),
'yyyymmddhh24miss') contact_datetime,
oc.case_note_type,
oc.case_note_sub_type,
oc.staff_id,
initcap (sm.last_name) || ', ' || initcap (sm.first_name) staff_name,
oc.case_note_text,
oc.amendment_flag,
oc.audit_timestamp
from offender_case_notes oc
join offender_bookings ob
on ob.offender_book_id = oc.offender_book_id
join offenders o
on o.offender_id = ob.offender_id
join staff_members sm
on sm.staff_id = oc.staff_id
where oc.audit_timestamp >= p_from_timestamp
and oc.case_note_type = p_case_note_type
and oc.case_note_sub_type = p_case_note_sub_type
order by oc.audit_timestamp ;
end get_case_notes_since;
procedure get_all_case_notes_since(p_from_timestamp in timestamp,
p_case_note_csr out sys_refcursor)
is
begin
open p_case_note_csr for
select o.offender_id_display,
oc.offender_book_id,
ob.agy_loc_id,
oc.case_note_id,
to_date(to_char(oc.contact_date,'yyyymmdd')||
to_char(oc.contact_time,'hh24miss'),
'yyyymmddhh24miss') contact_datetime,
oc.case_note_type,
oc.case_note_sub_type,
oc.staff_id,
initcap (sm.last_name) || ', ' || initcap (sm.first_name) staff_name,
oc.case_note_text,
oc.amendment_flag,
oc.audit_timestamp
from offender_case_notes oc
join offender_bookings ob
on ob.offender_book_id = oc.offender_book_id
join offenders o
on o.offender_id = ob.offender_id
join staff_members sm
on sm.staff_id = oc.staff_id
where oc.audit_timestamp >= p_from_timestamp
order by oc.audit_timestamp ;
end get_all_case_notes_since;
procedure get_offender_case_notes(p_noms_id in offenders.offender_id_display%type,
p_from_timestamp in timestamp default null,
p_case_note_csr out sys_refcursor)
is
v_noms_id offenders.offender_id_display%type;
v_root_offender_id offender_bookings.root_offender_id%type;
v_offender_book_id offender_bookings.offender_book_id%type;
v_agy_loc_id offender_bookings.agy_loc_id%type;
begin
v_noms_id := p_noms_id;
core_utils.get_offender_ids(p_root_offender_id => v_root_offender_id,
p_noms_id => v_noms_id,
p_agy_loc_id => v_agy_loc_id,
p_offender_book_id => v_offender_book_id);
if p_from_timestamp is null then
open p_case_note_csr
for select p_noms_id offender_id_display,
v_offender_book_id offender_book_id,
v_agy_loc_id agy_loc_id,
oc.case_note_id,
to_date(to_char(oc.contact_date,'yyyymmdd')||
to_char(oc.contact_time,'hh24miss'),
'yyyymmddhh24miss') contact_datetime,
oc.case_note_type,
oc.case_note_sub_type,
oc.staff_id,
initcap (sm.last_name) || ', ' || initcap (sm.first_name) staff_name,
oc.case_note_text,
oc.amendment_flag,
oc.audit_timestamp
from offender_case_notes oc
join staff_members sm
on sm.staff_id = oc.staff_id
where oc.offender_book_id = v_offender_book_id
order by oc.contact_date, oc.contact_time;
else
open p_case_note_csr
for select p_noms_id offender_id_display,
v_offender_book_id offender_book_id,
v_agy_loc_id agy_loc_id,
oc.case_note_id,
to_date(to_char(oc.contact_date,'yyyymmdd')||
to_char(oc.contact_time,'hh24miss'),
'yyyymmddhh24miss') contact_datetime,
oc.case_note_type,
oc.case_note_sub_type,
oc.staff_id,
initcap (sm.last_name) || ', ' || initcap (sm.first_name) staff_name,
oc.case_note_text,
oc.amendment_flag,
oc.audit_timestamp
from offender_case_notes oc
join staff_members sm
on sm.staff_id = oc.staff_id
where oc.offender_book_id = v_offender_book_id
and oc.audit_timestamp >= p_from_timestamp
order by oc.contact_date, oc.contact_time;
end if;
end get_offender_case_notes;
end api_case_notes;
/
sho err
|
<filename>mbdata/sql/CreateTriggers.sql
\set ON_ERROR_STOP 1
BEGIN;
CREATE TRIGGER b_upd_area BEFORE UPDATE ON area
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_area_alias BEFORE UPDATE ON area_alias
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_area_tag BEFORE UPDATE ON area_tag
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER search_hint BEFORE UPDATE OR INSERT ON area_alias
FOR EACH ROW EXECUTE PROCEDURE simplify_search_hints(3);
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON area_alias
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON area
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER a_ins_artist AFTER INSERT ON artist
FOR EACH ROW EXECUTE PROCEDURE a_ins_artist();
CREATE TRIGGER b_upd_artist BEFORE UPDATE ON artist
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_artist_credit_name BEFORE UPDATE ON artist_credit_name
FOR EACH ROW EXECUTE PROCEDURE b_upd_artist_credit_name();
CREATE TRIGGER b_del_artist_special BEFORE DELETE ON artist
FOR EACH ROW WHEN (OLD.id IN (1, 2)) EXECUTE PROCEDURE deny_special_purpose_deletion();
CREATE TRIGGER end_area_implies_ended BEFORE UPDATE OR INSERT ON artist
FOR EACH ROW EXECUTE PROCEDURE end_area_implies_ended();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON artist
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON artist_alias
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER b_upd_artist_alias BEFORE UPDATE ON artist_alias
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER replace_old_sub_on_add BEFORE INSERT ON editor_subscribe_collection
FOR EACH ROW EXECUTE PROCEDURE replace_old_sub_on_add();
CREATE TRIGGER del_collection_sub_on_delete BEFORE DELETE ON editor_collection
FOR EACH ROW EXECUTE PROCEDURE del_collection_sub_on_delete();
CREATE TRIGGER del_collection_sub_on_private BEFORE UPDATE ON editor_collection
FOR EACH ROW EXECUTE PROCEDURE del_collection_sub_on_private();
CREATE TRIGGER restore_collection_sub_on_public AFTER UPDATE ON editor_collection
FOR EACH ROW EXECUTE PROCEDURE restore_collection_sub_on_public();
CREATE TRIGGER search_hint BEFORE UPDATE OR INSERT ON artist_alias
FOR EACH ROW EXECUTE PROCEDURE simplify_search_hints(3);
CREATE TRIGGER b_upd_artist_tag BEFORE UPDATE ON artist_tag
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_editor BEFORE UPDATE ON editor
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER a_ins_editor AFTER INSERT ON editor
FOR EACH ROW EXECUTE PROCEDURE a_ins_editor();
CREATE TRIGGER check_editor_name BEFORE UPDATE OR INSERT ON editor
FOR EACH ROW EXECUTE PROCEDURE check_editor_name();
CREATE TRIGGER a_ins_event AFTER INSERT ON event
FOR EACH ROW EXECUTE PROCEDURE a_ins_event();
CREATE TRIGGER b_upd_event BEFORE UPDATE ON event
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON event
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER b_upd_event_alias BEFORE UPDATE ON event_alias
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON event_alias
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER search_hint BEFORE UPDATE OR INSERT ON event_alias
FOR EACH ROW EXECUTE PROCEDURE simplify_search_hints(2);
CREATE TRIGGER b_upd_event_tag BEFORE UPDATE ON event_tag
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_genre BEFORE UPDATE ON genre
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON genre_alias
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER b_upd_genre_alias BEFORE UPDATE ON genre_alias
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER search_hint BEFORE UPDATE OR INSERT ON genre_alias
FOR EACH ROW EXECUTE PROCEDURE simplify_search_hints(2);
CREATE TRIGGER b_upd_instrument BEFORE UPDATE ON instrument
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON instrument_alias
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER b_upd_instrument_alias BEFORE UPDATE ON instrument_alias
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_instrument_tag BEFORE UPDATE ON instrument_tag
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER search_hint BEFORE UPDATE OR INSERT ON instrument_alias
FOR EACH ROW EXECUTE PROCEDURE simplify_search_hints(2);
CREATE TRIGGER b_upd_l_area_area BEFORE UPDATE ON l_area_area
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER a_ins_l_area_area AFTER INSERT ON l_area_area
FOR EACH ROW EXECUTE PROCEDURE a_ins_l_area_area_mirror();
CREATE TRIGGER a_upd_l_area_area AFTER UPDATE ON l_area_area
FOR EACH ROW EXECUTE PROCEDURE a_upd_l_area_area_mirror();
CREATE TRIGGER a_del_l_area_area AFTER DELETE ON l_area_area
FOR EACH ROW EXECUTE PROCEDURE a_del_l_area_area_mirror();
CREATE TRIGGER b_upd_l_area_artist BEFORE UPDATE ON l_area_artist
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_area_event BEFORE UPDATE ON l_area_event
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_area_genre BEFORE UPDATE ON l_area_genre
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_area_instrument BEFORE UPDATE ON l_area_instrument
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_area_label BEFORE UPDATE ON l_area_label
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_area_mood BEFORE UPDATE ON l_area_mood
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_area_place BEFORE UPDATE ON l_area_place
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_area_recording BEFORE UPDATE ON l_area_recording
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_area_release BEFORE UPDATE ON l_area_release
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_area_release_group BEFORE UPDATE ON l_area_release_group
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_area_url BEFORE UPDATE ON l_area_url
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_area_work BEFORE UPDATE ON l_area_work
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_artist_artist BEFORE UPDATE ON l_artist_artist
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_artist_event BEFORE UPDATE ON l_artist_event
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_artist_genre BEFORE UPDATE ON l_artist_genre
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_artist_instrument BEFORE UPDATE ON l_artist_instrument
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_artist_label BEFORE UPDATE ON l_artist_label
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_artist_mood BEFORE UPDATE ON l_artist_mood
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_artist_place BEFORE UPDATE ON l_artist_place
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_artist_recording BEFORE UPDATE ON l_artist_recording
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_artist_release BEFORE UPDATE ON l_artist_release
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_artist_release_group BEFORE UPDATE ON l_artist_release_group
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_artist_url BEFORE UPDATE ON l_artist_url
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_artist_work BEFORE UPDATE ON l_artist_work
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_event_event BEFORE UPDATE ON l_event_event
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_event_genre BEFORE UPDATE ON l_event_genre
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_event_instrument BEFORE UPDATE ON l_event_instrument
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_event_label BEFORE UPDATE ON l_event_label
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_event_mood BEFORE UPDATE ON l_event_mood
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_event_place BEFORE UPDATE ON l_event_place
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_event_recording BEFORE UPDATE ON l_event_recording
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_event_release BEFORE UPDATE ON l_event_release
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_event_release_group BEFORE UPDATE ON l_event_release_group
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_event_url BEFORE UPDATE ON l_event_url
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_event_work BEFORE UPDATE ON l_event_work
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_genre_genre BEFORE UPDATE ON l_genre_genre
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_genre_instrument BEFORE UPDATE ON l_genre_instrument
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_genre_label BEFORE UPDATE ON l_genre_label
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_genre_mood BEFORE UPDATE ON l_genre_mood
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_genre_place BEFORE UPDATE ON l_genre_place
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_genre_recording BEFORE UPDATE ON l_genre_recording
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_genre_release BEFORE UPDATE ON l_genre_release
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_genre_release_group BEFORE UPDATE ON l_genre_release_group
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_genre_url BEFORE UPDATE ON l_genre_url
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_genre_work BEFORE UPDATE ON l_genre_work
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_instrument_instrument BEFORE UPDATE ON l_instrument_instrument
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_instrument_label BEFORE UPDATE ON l_instrument_label
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_instrument_mood BEFORE UPDATE ON l_instrument_mood
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_instrument_place BEFORE UPDATE ON l_instrument_place
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_instrument_recording BEFORE UPDATE ON l_instrument_recording
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_instrument_release BEFORE UPDATE ON l_instrument_release
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_instrument_release_group BEFORE UPDATE ON l_instrument_release_group
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_instrument_url BEFORE UPDATE ON l_instrument_url
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_instrument_work BEFORE UPDATE ON l_instrument_work
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_label_label BEFORE UPDATE ON l_label_label
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_label_mood BEFORE UPDATE ON l_label_mood
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_label_place BEFORE UPDATE ON l_label_place
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_label_recording BEFORE UPDATE ON l_label_recording
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_label_release BEFORE UPDATE ON l_label_release
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_label_release_group BEFORE UPDATE ON l_label_release_group
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_label_url BEFORE UPDATE ON l_label_url
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_label_work BEFORE UPDATE ON l_label_work
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_mood_mood BEFORE UPDATE ON l_mood_mood
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_mood_place BEFORE UPDATE ON l_mood_place
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_mood_recording BEFORE UPDATE ON l_mood_recording
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_mood_release BEFORE UPDATE ON l_mood_release
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_mood_release_group BEFORE UPDATE ON l_mood_release_group
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_mood_url BEFORE UPDATE ON l_mood_url
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_mood_work BEFORE UPDATE ON l_mood_work
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_place_place BEFORE UPDATE ON l_place_place
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_place_recording BEFORE UPDATE ON l_place_recording
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_place_release BEFORE UPDATE ON l_place_release
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_place_release_group BEFORE UPDATE ON l_place_release_group
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_place_url BEFORE UPDATE ON l_place_url
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_place_work BEFORE UPDATE ON l_place_work
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_recording_recording BEFORE UPDATE ON l_recording_recording
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_recording_release BEFORE UPDATE ON l_recording_release
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_recording_release_group BEFORE UPDATE ON l_recording_release_group
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_recording_url BEFORE UPDATE ON l_recording_url
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_recording_work BEFORE UPDATE ON l_recording_work
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_release_release BEFORE UPDATE ON l_release_release
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_release_release_group BEFORE UPDATE ON l_release_release_group
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_release_url BEFORE UPDATE ON l_release_url
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_release_work BEFORE UPDATE ON l_release_work
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_release_group_release_group BEFORE UPDATE ON l_release_group_release_group
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_release_group_url BEFORE UPDATE ON l_release_group_url
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_release_group_work BEFORE UPDATE ON l_release_group_work
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_url_url BEFORE UPDATE ON l_url_url
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_url_work BEFORE UPDATE ON l_url_work
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_l_work_work BEFORE UPDATE ON l_work_work
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER a_ins_label AFTER INSERT ON label
FOR EACH ROW EXECUTE PROCEDURE a_ins_label();
CREATE TRIGGER b_del_label_special BEFORE DELETE ON label
FOR EACH ROW WHEN (OLD.id IN (1, 3267)) EXECUTE PROCEDURE deny_special_purpose_deletion();
CREATE TRIGGER b_upd_label BEFORE UPDATE ON label
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON label
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON label_alias
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER b_upd_label_alias BEFORE UPDATE ON label_alias
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER search_hint BEFORE UPDATE OR INSERT ON label_alias
FOR EACH ROW EXECUTE PROCEDURE simplify_search_hints(2);
CREATE TRIGGER b_upd_label_tag BEFORE UPDATE ON label_tag
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON link
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER deny_deprecated BEFORE INSERT ON link
FOR EACH ROW EXECUTE PROCEDURE deny_deprecated_links();
CREATE TRIGGER check_has_dates BEFORE UPDATE OR INSERT ON link
FOR EACH ROW EXECUTE PROCEDURE check_has_dates();
CREATE TRIGGER b_upd_link BEFORE UPDATE ON link
FOR EACH ROW EXECUTE PROCEDURE b_upd_link();
CREATE TRIGGER b_ins_link_attribute BEFORE INSERT ON link_attribute
FOR EACH ROW EXECUTE PROCEDURE prevent_invalid_attributes();
CREATE TRIGGER b_upd_link_attribute BEFORE UPDATE ON link_attribute
FOR EACH ROW EXECUTE PROCEDURE b_upd_link_attribute();
CREATE TRIGGER b_upd_link_attribute_credit BEFORE UPDATE ON link_attribute_credit
FOR EACH ROW EXECUTE PROCEDURE b_upd_link_attribute_credit();
CREATE TRIGGER b_upd_link_attribute_text_value BEFORE UPDATE ON link_attribute_text_value
FOR EACH ROW EXECUTE PROCEDURE b_upd_link_attribute_text_value();
CREATE TRIGGER b_upd_link_attribute_type BEFORE UPDATE ON link_attribute_type
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_link_type BEFORE UPDATE ON link_type
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_link_type_attribute_type BEFORE UPDATE ON link_type_attribute_type
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_medium BEFORE UPDATE ON medium
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_medium_cdtoc BEFORE UPDATE ON medium_cdtoc
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_mood BEFORE UPDATE ON mood
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON mood_alias
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER b_upd_mood_alias BEFORE UPDATE ON mood_alias
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER search_hint BEFORE UPDATE OR INSERT ON mood_alias
FOR EACH ROW EXECUTE PROCEDURE simplify_search_hints(2);
CREATE TRIGGER a_ins_place AFTER INSERT ON place
FOR EACH ROW EXECUTE PROCEDURE a_ins_place();
CREATE TRIGGER b_upd_place BEFORE UPDATE ON place
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON place
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON place_alias
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER b_upd_place_alias BEFORE UPDATE ON place_alias
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER search_hint BEFORE UPDATE OR INSERT ON place_alias
FOR EACH ROW EXECUTE PROCEDURE simplify_search_hints(2);
CREATE TRIGGER b_upd_place_tag BEFORE UPDATE ON place_tag
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER a_ins_recording AFTER INSERT ON recording
FOR EACH ROW EXECUTE PROCEDURE a_ins_recording();
CREATE TRIGGER b_upd_recording BEFORE UPDATE ON recording
FOR EACH ROW EXECUTE PROCEDURE b_upd_recording();
CREATE TRIGGER a_upd_recording AFTER UPDATE ON recording
FOR EACH ROW EXECUTE PROCEDURE a_upd_recording();
CREATE TRIGGER a_del_recording AFTER DELETE ON recording
FOR EACH ROW EXECUTE PROCEDURE a_del_recording();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON recording_alias
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER b_upd_recording_alias BEFORE UPDATE ON recording_alias
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER search_hint BEFORE UPDATE OR INSERT ON recording_alias
FOR EACH ROW EXECUTE PROCEDURE simplify_search_hints(2);
CREATE TRIGGER b_upd_recording_tag BEFORE UPDATE ON recording_tag
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER a_ins_release AFTER INSERT ON release
FOR EACH ROW EXECUTE PROCEDURE a_ins_release();
CREATE TRIGGER a_upd_release AFTER UPDATE ON release
FOR EACH ROW EXECUTE PROCEDURE a_upd_release();
CREATE TRIGGER a_del_release AFTER DELETE ON release
FOR EACH ROW EXECUTE PROCEDURE a_del_release();
CREATE TRIGGER b_upd_release BEFORE UPDATE ON release
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON release_alias
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER b_upd_release_alias BEFORE UPDATE ON release_alias
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER search_hint BEFORE UPDATE OR INSERT ON release_alias
FOR EACH ROW EXECUTE PROCEDURE simplify_search_hints(2);
CREATE TRIGGER a_ins_release_event AFTER INSERT ON release_country
FOR EACH ROW EXECUTE PROCEDURE a_ins_release_event();
CREATE TRIGGER a_upd_release_event AFTER UPDATE ON release_country
FOR EACH ROW EXECUTE PROCEDURE a_upd_release_event();
CREATE TRIGGER a_del_release_event AFTER DELETE ON release_country
FOR EACH ROW EXECUTE PROCEDURE a_del_release_event();
CREATE TRIGGER a_ins_release_event AFTER INSERT ON release_unknown_country
FOR EACH ROW EXECUTE PROCEDURE a_ins_release_event();
CREATE TRIGGER a_upd_release_event AFTER UPDATE ON release_unknown_country
FOR EACH ROW EXECUTE PROCEDURE a_upd_release_event();
CREATE TRIGGER a_del_release_event AFTER DELETE ON release_unknown_country
FOR EACH ROW EXECUTE PROCEDURE a_del_release_event();
CREATE TRIGGER b_upd_release_label BEFORE UPDATE ON release_label
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER a_ins_release_label AFTER INSERT ON release_label
FOR EACH ROW EXECUTE PROCEDURE a_ins_release_label();
CREATE TRIGGER a_upd_release_label AFTER UPDATE ON release_label
FOR EACH ROW EXECUTE PROCEDURE a_upd_release_label();
CREATE TRIGGER a_del_release_label AFTER DELETE ON release_label
FOR EACH ROW EXECUTE PROCEDURE a_del_release_label();
CREATE TRIGGER a_ins_release_group AFTER INSERT ON release_group
FOR EACH ROW EXECUTE PROCEDURE a_ins_release_group();
CREATE TRIGGER a_upd_release_group AFTER UPDATE ON release_group
FOR EACH ROW EXECUTE PROCEDURE a_upd_release_group();
CREATE TRIGGER a_del_release_group AFTER DELETE ON release_group
FOR EACH ROW EXECUTE PROCEDURE a_del_release_group();
CREATE TRIGGER b_upd_release_group BEFORE UPDATE ON release_group
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER a_ins_release_group_secondary_type_join AFTER INSERT ON release_group_secondary_type_join
FOR EACH ROW EXECUTE PROCEDURE a_ins_release_group_secondary_type_join();
CREATE TRIGGER a_del_release_group_secondary_type_join AFTER DELETE ON release_group_secondary_type_join
FOR EACH ROW EXECUTE PROCEDURE a_del_release_group_secondary_type_join();
CREATE TRIGGER b_upd_release_group_secondary_type_join BEFORE UPDATE ON release_group_secondary_type_join
FOR EACH ROW EXECUTE PROCEDURE b_upd_release_group_secondary_type_join();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON release_group_alias
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER b_upd_release_group_alias BEFORE UPDATE ON release_group_alias
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER search_hint BEFORE UPDATE OR INSERT ON release_group_alias
FOR EACH ROW EXECUTE PROCEDURE simplify_search_hints(2);
CREATE TRIGGER b_upd_release_group_tag BEFORE UPDATE ON release_group_tag
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_series BEFORE UPDATE ON series
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_series_alias BEFORE UPDATE ON series_alias
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_series_tag BEFORE UPDATE ON series_tag
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON series_alias
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER search_hint BEFORE UPDATE OR INSERT ON series_alias
FOR EACH ROW EXECUTE PROCEDURE simplify_search_hints(2);
CREATE TRIGGER b_upd_tag_relation BEFORE UPDATE ON tag_relation
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER a_ins_track AFTER INSERT ON track
FOR EACH ROW EXECUTE PROCEDURE a_ins_track();
CREATE TRIGGER a_upd_track AFTER UPDATE ON track
FOR EACH ROW EXECUTE PROCEDURE a_upd_track();
CREATE TRIGGER a_del_track AFTER DELETE ON track
FOR EACH ROW EXECUTE PROCEDURE a_del_track();
CREATE TRIGGER b_upd_track BEFORE UPDATE ON track
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE CONSTRAINT TRIGGER remove_orphaned_tracks
AFTER DELETE OR UPDATE ON track DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE delete_orphaned_recordings();
CREATE TRIGGER b_upd_url BEFORE UPDATE ON url
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER a_ins_work AFTER INSERT ON work
FOR EACH ROW EXECUTE PROCEDURE a_ins_work();
CREATE TRIGGER b_upd_work BEFORE UPDATE ON work
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER b_upd_work_alias BEFORE UPDATE ON work_alias
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER end_date_implies_ended BEFORE UPDATE OR INSERT ON work_alias
FOR EACH ROW EXECUTE PROCEDURE end_date_implies_ended();
CREATE TRIGGER search_hint BEFORE UPDATE OR INSERT ON work_alias
FOR EACH ROW EXECUTE PROCEDURE simplify_search_hints(2);
CREATE TRIGGER b_upd_work_tag BEFORE UPDATE ON work_tag
FOR EACH ROW EXECUTE PROCEDURE b_upd_last_updated_table();
CREATE TRIGGER inserting_edits_requires_confirmed_email_address BEFORE INSERT ON edit
FOR EACH ROW EXECUTE PROCEDURE inserting_edits_requires_confirmed_email_address();
CREATE TRIGGER a_upd_edit AFTER UPDATE ON edit
FOR EACH ROW EXECUTE PROCEDURE a_upd_edit();
CREATE TRIGGER a_ins_edit_artist BEFORE INSERT ON edit_artist
FOR EACH ROW EXECUTE PROCEDURE b_ins_edit_materialize_status();
CREATE TRIGGER a_ins_edit_artist BEFORE INSERT ON edit_label
FOR EACH ROW EXECUTE PROCEDURE b_ins_edit_materialize_status();
CREATE TRIGGER a_ins_instrument AFTER INSERT ON instrument
FOR EACH ROW EXECUTE PROCEDURE a_ins_instrument();
CREATE TRIGGER a_upd_instrument AFTER UPDATE ON instrument
FOR EACH ROW EXECUTE PROCEDURE a_upd_instrument();
CREATE TRIGGER a_del_instrument AFTER DELETE ON instrument
FOR EACH ROW EXECUTE PROCEDURE a_del_instrument();
CREATE TRIGGER a_ins_edit_note AFTER INSERT ON edit_note
FOR EACH ROW EXECUTE PROCEDURE a_ins_edit_note();
CREATE TRIGGER a_ins_alternative_release AFTER INSERT ON alternative_release
FOR EACH ROW EXECUTE PROCEDURE a_ins_alternative_release_or_track();
CREATE TRIGGER a_ins_alternative_track AFTER INSERT ON alternative_track
FOR EACH ROW EXECUTE PROCEDURE a_ins_alternative_release_or_track();
CREATE TRIGGER a_upd_alternative_release AFTER UPDATE ON alternative_release
FOR EACH ROW EXECUTE PROCEDURE a_upd_alternative_release_or_track();
CREATE TRIGGER a_upd_alternative_track AFTER UPDATE ON alternative_track
FOR EACH ROW EXECUTE PROCEDURE a_upd_alternative_release_or_track();
CREATE TRIGGER a_del_alternative_release AFTER DELETE ON alternative_release
FOR EACH ROW EXECUTE PROCEDURE a_del_alternative_release_or_track();
CREATE TRIGGER a_del_alternative_track AFTER DELETE ON alternative_track
FOR EACH ROW EXECUTE PROCEDURE a_del_alternative_release_or_track();
CREATE TRIGGER a_ins_alternative_medium_track AFTER INSERT ON alternative_medium_track
FOR EACH ROW EXECUTE PROCEDURE a_ins_alternative_medium_track();
CREATE TRIGGER a_upd_alternative_medium_track AFTER UPDATE ON alternative_medium_track
FOR EACH ROW EXECUTE PROCEDURE a_upd_alternative_medium_track();
CREATE TRIGGER a_del_alternative_medium_track AFTER DELETE ON alternative_medium_track
FOR EACH ROW EXECUTE PROCEDURE a_del_alternative_medium_track();
CREATE TRIGGER ensure_area_attribute_type_allows_text BEFORE INSERT OR UPDATE ON area_attribute
FOR EACH ROW EXECUTE PROCEDURE ensure_area_attribute_type_allows_text();
CREATE TRIGGER ensure_artist_attribute_type_allows_text BEFORE INSERT OR UPDATE ON artist_attribute
FOR EACH ROW EXECUTE PROCEDURE ensure_artist_attribute_type_allows_text();
CREATE TRIGGER ensure_event_attribute_type_allows_text BEFORE INSERT OR UPDATE ON event_attribute
FOR EACH ROW EXECUTE PROCEDURE ensure_event_attribute_type_allows_text();
CREATE TRIGGER ensure_instrument_attribute_type_allows_text BEFORE INSERT OR UPDATE ON instrument_attribute
FOR EACH ROW EXECUTE PROCEDURE ensure_instrument_attribute_type_allows_text();
CREATE TRIGGER ensure_label_attribute_type_allows_text BEFORE INSERT OR UPDATE ON label_attribute
FOR EACH ROW EXECUTE PROCEDURE ensure_label_attribute_type_allows_text();
CREATE TRIGGER ensure_medium_attribute_type_allows_text BEFORE INSERT OR UPDATE ON medium_attribute
FOR EACH ROW EXECUTE PROCEDURE ensure_medium_attribute_type_allows_text();
CREATE TRIGGER ensure_place_attribute_type_allows_text BEFORE INSERT OR UPDATE ON place_attribute
FOR EACH ROW EXECUTE PROCEDURE ensure_place_attribute_type_allows_text();
CREATE TRIGGER ensure_recording_attribute_type_allows_text BEFORE INSERT OR UPDATE ON recording_attribute
FOR EACH ROW EXECUTE PROCEDURE ensure_recording_attribute_type_allows_text();
CREATE TRIGGER ensure_release_attribute_type_allows_text BEFORE INSERT OR UPDATE ON release_attribute
FOR EACH ROW EXECUTE PROCEDURE ensure_release_attribute_type_allows_text();
CREATE TRIGGER ensure_release_group_attribute_type_allows_text BEFORE INSERT OR UPDATE ON release_group_attribute
FOR EACH ROW EXECUTE PROCEDURE ensure_release_group_attribute_type_allows_text();
CREATE TRIGGER ensure_series_attribute_type_allows_text BEFORE INSERT OR UPDATE ON series_attribute
FOR EACH ROW EXECUTE PROCEDURE ensure_series_attribute_type_allows_text();
CREATE TRIGGER ensure_work_attribute_type_allows_text BEFORE INSERT OR UPDATE ON work_attribute
FOR EACH ROW EXECUTE PROCEDURE ensure_work_attribute_type_allows_text();
--------------------------------------------------------------------------------
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_area_area DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_area_artist DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_area_event DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_area_instrument DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_area_genre DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_area_label DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_area_mood DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_area_place DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_area_recording DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_area_release DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_area_release_group DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_area_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_area_work DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_artist_artist DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_artist_event DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_artist_genre DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_artist_instrument DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_artist_label DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_artist_mood DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_artist_place DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_artist_recording DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_artist_release DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_artist_release_group DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_artist_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_artist_work DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_event_event DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_event_genre DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_event_instrument DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_event_label DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_event_mood DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_event_place DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_event_recording DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_event_release DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_event_release_group DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_event_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_event_work DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_genre_genre DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_genre_instrument DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_genre_label DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_genre_mood DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_genre_place DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_genre_recording DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_genre_release DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_genre_release_group DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_genre_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_genre_work DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_instrument_instrument DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_instrument_label DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_instrument_mood DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_instrument_place DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_instrument_recording DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_instrument_release DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_instrument_release_group DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_instrument_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_instrument_work DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_label_label DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_label_mood DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_label_place DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_label_recording DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_label_release DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_label_release_group DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_label_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_label_work DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_mood_mood DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_mood_place DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_mood_recording DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_mood_release DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_mood_release_group DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_mood_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_mood_work DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_place_place DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_place_recording DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_place_release DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_place_release_group DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_place_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_place_work DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_recording_recording DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_recording_release DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_recording_release_group DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_recording_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_recording_work DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_release_release DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_release_release_group DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_release_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_release_work DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_release_group_release_group DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_release_group_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_release_group_work DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_url_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_url_work DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
CREATE CONSTRAINT TRIGGER remove_unused_links
AFTER DELETE OR UPDATE ON l_work_work DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_links();
--------------------------------------------------------------------------------
CREATE CONSTRAINT TRIGGER url_gc_a_upd_url
AFTER UPDATE ON url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_upd_l_area_url
AFTER UPDATE ON l_area_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_del_l_area_url
AFTER DELETE ON l_area_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_upd_l_artist_url
AFTER UPDATE ON l_artist_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_del_l_artist_url
AFTER DELETE ON l_artist_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_upd_l_event_url
AFTER UPDATE ON l_event_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_del_l_event_url
AFTER DELETE ON l_event_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_upd_l_genre_url
AFTER UPDATE ON l_genre_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_del_l_genre_url
AFTER DELETE ON l_genre_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_upd_l_instrument_url
AFTER UPDATE ON l_instrument_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_del_l_instrument_url
AFTER DELETE ON l_instrument_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_upd_l_label_url
AFTER UPDATE ON l_label_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_del_l_label_url
AFTER DELETE ON l_label_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_upd_l_mood_url
AFTER UPDATE ON l_mood_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_del_l_mood_url
AFTER DELETE ON l_mood_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_upd_l_place_url
AFTER UPDATE ON l_place_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_del_l_place_url
AFTER DELETE ON l_place_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_upd_l_recording_url
AFTER UPDATE ON l_recording_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_del_l_recording_url
AFTER DELETE ON l_recording_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_upd_l_release_url
AFTER UPDATE ON l_release_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_del_l_release_url
AFTER DELETE ON l_release_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_upd_l_release_group_url
AFTER UPDATE ON l_release_group_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_del_l_release_group_url
AFTER DELETE ON l_release_group_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_upd_l_series_url
AFTER UPDATE ON l_series_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_del_l_series_url
AFTER DELETE ON l_series_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_upd_l_url_url
AFTER UPDATE ON l_url_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_del_l_url_url
AFTER DELETE ON l_url_url DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_upd_l_url_work
AFTER UPDATE ON l_url_work DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
CREATE CONSTRAINT TRIGGER url_gc_a_del_l_url_work
AFTER DELETE ON l_url_work DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE remove_unused_url();
--------------------------------------------------------------------------------
CREATE CONSTRAINT TRIGGER delete_unused_tag
AFTER INSERT ON tag DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE trg_delete_unused_tag();
CREATE CONSTRAINT TRIGGER delete_unused_tag
AFTER DELETE ON area_tag DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE trg_delete_unused_tag_ref();
CREATE CONSTRAINT TRIGGER delete_unused_tag
AFTER DELETE ON artist_tag DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE trg_delete_unused_tag_ref();
CREATE CONSTRAINT TRIGGER delete_unused_tag
AFTER DELETE ON event_tag DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE trg_delete_unused_tag_ref();
CREATE CONSTRAINT TRIGGER delete_unused_tag
AFTER DELETE ON instrument_tag DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE trg_delete_unused_tag_ref();
CREATE CONSTRAINT TRIGGER delete_unused_tag
AFTER DELETE ON label_tag DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE trg_delete_unused_tag_ref();
CREATE CONSTRAINT TRIGGER delete_unused_tag
AFTER DELETE ON place_tag DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE trg_delete_unused_tag_ref();
CREATE CONSTRAINT TRIGGER delete_unused_tag
AFTER DELETE ON recording_tag DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE trg_delete_unused_tag_ref();
CREATE CONSTRAINT TRIGGER delete_unused_tag
AFTER DELETE ON release_group_tag DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE trg_delete_unused_tag_ref();
CREATE CONSTRAINT TRIGGER delete_unused_tag
AFTER DELETE ON release_tag DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE trg_delete_unused_tag_ref();
CREATE CONSTRAINT TRIGGER delete_unused_tag
AFTER DELETE ON series_tag DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE trg_delete_unused_tag_ref();
CREATE CONSTRAINT TRIGGER delete_unused_tag
AFTER DELETE ON work_tag DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE trg_delete_unused_tag_ref();
--------------------------------------------------------------------------------
CREATE CONSTRAINT TRIGGER apply_artist_release_group_pending_updates
AFTER INSERT OR UPDATE OR DELETE ON release DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE apply_artist_release_group_pending_updates();
CREATE CONSTRAINT TRIGGER apply_artist_release_pending_updates
AFTER INSERT OR UPDATE OR DELETE ON release DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE apply_artist_release_pending_updates();
CREATE CONSTRAINT TRIGGER apply_artist_release_pending_updates
AFTER INSERT OR UPDATE OR DELETE ON release_country DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE apply_artist_release_pending_updates();
CREATE CONSTRAINT TRIGGER apply_artist_release_pending_updates
AFTER INSERT OR UPDATE OR DELETE ON release_first_release_date DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE apply_artist_release_pending_updates();
CREATE CONSTRAINT TRIGGER apply_artist_release_group_pending_updates
AFTER INSERT OR UPDATE OR DELETE ON release_group DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE apply_artist_release_group_pending_updates();
CREATE CONSTRAINT TRIGGER apply_artist_release_group_pending_updates
AFTER UPDATE ON release_group_meta DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE apply_artist_release_group_pending_updates();
CREATE CONSTRAINT TRIGGER apply_artist_release_group_pending_updates
AFTER INSERT OR DELETE ON release_group_secondary_type_join DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE apply_artist_release_group_pending_updates();
CREATE CONSTRAINT TRIGGER apply_artist_release_pending_updates
AFTER INSERT OR UPDATE OR DELETE ON release_label DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE apply_artist_release_pending_updates();
CREATE CONSTRAINT TRIGGER apply_artist_release_group_pending_updates
AFTER INSERT OR UPDATE OR DELETE ON track DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE apply_artist_release_group_pending_updates();
CREATE CONSTRAINT TRIGGER apply_artist_release_pending_updates
AFTER INSERT OR UPDATE OR DELETE ON track DEFERRABLE INITIALLY DEFERRED
FOR EACH ROW EXECUTE PROCEDURE apply_artist_release_pending_updates();
--------------------------------------------------------------------------------
CREATE TRIGGER update_aggregate_rating_for_insert AFTER INSERT ON artist_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_insert('artist');
CREATE TRIGGER update_aggregate_rating_for_update AFTER UPDATE ON artist_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_update('artist');
CREATE TRIGGER update_aggregate_rating_for_delete AFTER DELETE ON artist_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_delete('artist');
CREATE TRIGGER update_aggregate_rating_for_insert AFTER INSERT ON event_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_insert('event');
CREATE TRIGGER update_aggregate_rating_for_update AFTER UPDATE ON event_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_update('event');
CREATE TRIGGER update_aggregate_rating_for_delete AFTER DELETE ON event_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_delete('event');
CREATE TRIGGER update_aggregate_rating_for_insert AFTER INSERT ON label_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_insert('label');
CREATE TRIGGER update_aggregate_rating_for_update AFTER UPDATE ON label_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_update('label');
CREATE TRIGGER update_aggregate_rating_for_delete AFTER DELETE ON label_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_delete('label');
CREATE TRIGGER update_aggregate_rating_for_insert AFTER INSERT ON place_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_insert('place');
CREATE TRIGGER update_aggregate_rating_for_update AFTER UPDATE ON place_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_update('place');
CREATE TRIGGER update_aggregate_rating_for_delete AFTER DELETE ON place_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_delete('place');
CREATE TRIGGER update_aggregate_rating_for_insert AFTER INSERT ON recording_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_insert('recording');
CREATE TRIGGER update_aggregate_rating_for_update AFTER UPDATE ON recording_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_update('recording');
CREATE TRIGGER update_aggregate_rating_for_delete AFTER DELETE ON recording_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_delete('recording');
CREATE TRIGGER update_aggregate_rating_for_insert AFTER INSERT ON release_group_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_insert('release_group');
CREATE TRIGGER update_aggregate_rating_for_update AFTER UPDATE ON release_group_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_update('release_group');
CREATE TRIGGER update_aggregate_rating_for_delete AFTER DELETE ON release_group_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_delete('release_group');
CREATE TRIGGER update_aggregate_rating_for_insert AFTER INSERT ON work_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_insert('work');
CREATE TRIGGER update_aggregate_rating_for_update AFTER UPDATE ON work_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_update('work');
CREATE TRIGGER update_aggregate_rating_for_delete AFTER DELETE ON work_rating_raw
FOR EACH ROW EXECUTE PROCEDURE update_aggregate_rating_for_raw_delete('work');
CREATE TRIGGER update_counts_for_insert AFTER INSERT ON area_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_insert('area');
CREATE TRIGGER update_counts_for_update AFTER UPDATE ON area_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_update('area');
CREATE TRIGGER update_counts_for_delete AFTER DELETE ON area_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_delete('area');
CREATE TRIGGER update_counts_for_insert AFTER INSERT ON artist_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_insert('artist');
CREATE TRIGGER update_counts_for_update AFTER UPDATE ON artist_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_update('artist');
CREATE TRIGGER update_counts_for_delete AFTER DELETE ON artist_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_delete('artist');
CREATE TRIGGER update_counts_for_insert AFTER INSERT ON event_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_insert('event');
CREATE TRIGGER update_counts_for_update AFTER UPDATE ON event_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_update('event');
CREATE TRIGGER update_counts_for_delete AFTER DELETE ON event_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_delete('event');
CREATE TRIGGER update_counts_for_insert AFTER INSERT ON instrument_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_insert('instrument');
CREATE TRIGGER update_counts_for_update AFTER UPDATE ON instrument_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_update('instrument');
CREATE TRIGGER update_counts_for_delete AFTER DELETE ON instrument_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_delete('instrument');
CREATE TRIGGER update_counts_for_insert AFTER INSERT ON label_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_insert('label');
CREATE TRIGGER update_counts_for_update AFTER UPDATE ON label_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_update('label');
CREATE TRIGGER update_counts_for_delete AFTER DELETE ON label_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_delete('label');
CREATE TRIGGER update_counts_for_insert AFTER INSERT ON place_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_insert('place');
CREATE TRIGGER update_counts_for_update AFTER UPDATE ON place_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_update('place');
CREATE TRIGGER update_counts_for_delete AFTER DELETE ON place_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_delete('place');
CREATE TRIGGER update_counts_for_insert AFTER INSERT ON recording_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_insert('recording');
CREATE TRIGGER update_counts_for_update AFTER UPDATE ON recording_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_update('recording');
CREATE TRIGGER update_counts_for_delete AFTER DELETE ON recording_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_delete('recording');
CREATE TRIGGER update_counts_for_insert AFTER INSERT ON release_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_insert('release');
CREATE TRIGGER update_counts_for_update AFTER UPDATE ON release_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_update('release');
CREATE TRIGGER update_counts_for_delete AFTER DELETE ON release_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_delete('release');
CREATE TRIGGER update_counts_for_insert AFTER INSERT ON release_group_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_insert('release_group');
CREATE TRIGGER update_counts_for_update AFTER UPDATE ON release_group_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_update('release_group');
CREATE TRIGGER update_counts_for_delete AFTER DELETE ON release_group_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_delete('release_group');
CREATE TRIGGER update_counts_for_insert AFTER INSERT ON series_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_insert('series');
CREATE TRIGGER update_counts_for_update AFTER UPDATE ON series_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_update('series');
CREATE TRIGGER update_counts_for_delete AFTER DELETE ON series_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_delete('series');
CREATE TRIGGER update_counts_for_insert AFTER INSERT ON work_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_insert('work');
CREATE TRIGGER update_counts_for_update AFTER UPDATE ON work_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_update('work');
CREATE TRIGGER update_counts_for_delete AFTER DELETE ON work_tag_raw
FOR EACH ROW EXECUTE PROCEDURE update_tag_counts_for_raw_delete('work');
COMMIT;
-- vi: set ts=4 sw=4 et :
|
<reponame>jkvetina/BUG
prompt --application/pages/page_groups
begin
-- Manifest
-- PAGE GROUPS: 700
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2020.10.01'
,p_release=>'20.2.0.00.20'
,p_default_workspace_id=>9526531750928358
,p_default_application_id=>700
,p_default_id_offset=>28323188538908472
,p_default_owner=>'DEV'
);
wwv_flow_api.create_page_group(
p_id=>wwv_flow_api.id(13240277659338518)
,p_group_name=>'APEX'
);
wwv_flow_api.create_page_group(
p_id=>wwv_flow_api.id(64766608684607384)
,p_group_name=>'DASHBOARD'
);
wwv_flow_api.create_page_group(
p_id=>wwv_flow_api.id(63772249988014549)
,p_group_name=>'INTERNAL'
);
wwv_flow_api.create_page_group(
p_id=>wwv_flow_api.id(10896609966906033)
,p_group_name=>'OBJECTS'
);
wwv_flow_api.create_page_group(
p_id=>wwv_flow_api.id(10819719419852508)
,p_group_name=>'UPLOADER'
);
wwv_flow_api.create_page_group(
p_id=>wwv_flow_api.id(9619968066909198)
,p_group_name=>'USER'
);
wwv_flow_api.component_end;
end;
/
|
<filename>extra/src/test/java/tk/mybatis/mapper/additional/select/CreateDB.sql
drop table book if exists;
create table book (
id integer NOT NULL PRIMARY KEY,
name varchar(32),
price integer,
published date
);
INSERT INTO book VALUES (1, 'JavaStarter1', '50', '2015-11-11');
INSERT INTO book VALUES (2, 'JavaStarter2', '50', '2015-11-11');
INSERT INTO book VALUES (3, 'Java3', '80', '2017-11-11');
INSERT INTO book VALUES (4, 'Java4', '100', '2019-11-11');
|
<gh_stars>0
# --- Sample dataset
# --- !Ups
insert into style (id,name) values (1, 'Bungalow');
insert into style (id,name) values (2, 'Cottage');
insert into style (id,name) values (3, 'Semi-detached House');
insert into style (id,name) values (4, 'Detached House');
insert into style (id,name) values (5, 'Studio Apartment');
insert into style (id,name) values (6, 'Loft Apartment');
insert into style (id,name) values (7, 'Railroad Apartment');
|
/* name: GetPosts :many */
SELECT
*
FROM
posts
WHERE
deleted_at IS NULL AND
posts.user_level <= ?
ORDER BY
posts.id DESC
LIMIT 50;
/* name: GetImagePosts :many */
SELECT
*
FROM
posts
WHERE
content_type = "image"
ORDER BY
posts.id DESC ;
/* name: Search :many */
SELECT
p.*
FROM
posts p
LEFT JOIN
post_tags pt
ON
p.id = pt.post_id
LEFT JOIN
tags t
ON
pt.tag_id = t.id
WHERE
t.name = ?;
/* name: GetNewerPosts :many */
SELECT
*
FROM
posts
WHERE
deleted_at IS NULL AND
posts.id >= ? AND
posts.user_level <= ?
ORDER BY
posts.id
LIMIT ?;
/* name: GetOlderPosts :many */
SELECT
*
FROM
posts
WHERE
deleted_at IS NULL AND
posts.id <= ? AND
posts.user_level <= ?
ORDER BY
posts.id DESC
LIMIT ?;
/* name: GetAllPosts :many */
SELECT
*
FROM
posts;
/* name: GetPost :one */
SELECT
*
FROM
posts
WHERE
posts.id = ? AND
deleted_at IS NULL AND
posts.user_level <= ?;
/* name: UpdatePostFiles :exec */
UPDATE
posts
SET
filename = ?,
thumbnail_filename = ?
WHERE
id = ?;
/* name: UpdatePostHashes :exec */
UPDATE
posts
SET
p_hash_0 = ?,
p_hash_1 = ?,
p_hash_2 = ?,
p_hash_3 = ?
WHERE
id = ?;
/* name: GetPostsByUser :many */
SELECT
*
FROM
posts
WHERE
user_name = ? AND
deleted_at IS NULL AND
posts.user_level <= ?
ORDER BY posts.id DESC;
/* name: CreatePost :execresult */
INSERT INTO posts
(
url,
filename,
thumbnail_filename,
user_name,
content_type,
p_hash_0,
p_hash_1,
p_hash_2,
p_hash_3,
uploaded_filename
)
VALUES
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
/* name: GetPossibleDuplicatePosts :many */
SELECT
posts.*,
(
bit_count(? ^ p_hash_0) +
bit_count(? ^ p_hash_1) +
bit_count(? ^ p_hash_2) +
bit_count(? ^ p_hash_3)
) as hamming_distance
from posts
WHERE
deleted_at IS NULL
having hamming_distance < 50
order by hamming_distance desc;
/* name: DeletePost :exec */
UPDATE posts
SET deleted_at = NOW()
WHERE
id = ?;
/* name: GetVotedPosts :many */
SELECT
p.*,
IFNULL(pv.upvoted, 0) as upvoted
FROM
posts p
LEFT JOIN ( SELECT * FROM post_votes WHERE user_id = ? ) AS pv ON pv.post_id = p.id
WHERE
p.deleted_at IS NULL AND
p.user_level <= ?
ORDER BY p.id DESC;
/* name: GetVotedPost :one */
SELECT
p.*,
IFNULL(pv.upvoted, 0) as upvoted
FROM
posts p
LEFT JOIN post_votes AS pv ON pv.post_id = p.id
AND pv.user_id = ? AND
p.user_level <= ?
WHERE
p.deleted_at IS NULL AND
p.id = ?;
|
/****** Object: Table [dbo].[FailedNodes] Script Date: 1/16/2015 1:40:37 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[FailedNodes](
[PartitionKey] [nvarchar](50) NOT NULL,
[RowKey] [nvarchar](50) NOT NULL,
[Timestamp] [datetime2](7) NOT NULL,
[CreatedOn] [datetime2](7) NOT NULL,
[MachineName] [nvarchar](50) NOT NULL,
[DomainName] [nvarchar](50) NOT NULL,
[Cause] [text] NOT NULL,
CONSTRAINT [PK_FailedNode] PRIMARY KEY CLUSTERED
(
[PartitionKey] ASC,
[RowKey] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[FailedNodes] ADD CONSTRAINT [DF_FailedNodes_Timestamp] DEFAULT (sysutcdatetime()) FOR [Timestamp]
GO
ALTER TABLE [dbo].[FailedNodes] ADD CONSTRAINT [DF_FailedNodes_CreatedOn] DEFAULT (sysutcdatetime()) FOR [CreatedOn]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'holds the domain name e.g. ad.infosys.com' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FailedNodes', @level2type=N'COLUMN',@level2name=N'PartitionKey'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'hosting machine name e.g. punhjw166142d' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FailedNodes', @level2type=N'COLUMN',@level2name=N'RowKey'
GO
|
select 1;
CREATE USER knowint WITH PASSWORD '<PASSWORD>';
DROP DATABASE if exists gokbg3dev;
CREATE DATABASE gokbg3dev;
GRANT ALL PRIVILEGES ON DATABASE gokbg3dev to knowint;
|
CREATE OR REPLACE VIEW XXHR_BUSINESS_GROUPS_VL AS
SELECT
O.ORGANIZATION_ID ,
OTL.NAME ,
O.DATE_FROM ,
O.DATE_TO
FROM
HR_ALL_ORGANIZATION_UNITS O ,
HR_ALL_ORGANIZATION_UNITS_TL OTL ,
HR_ORGANIZATION_INFORMATION O2 ,
HR_ORGANIZATION_INFORMATION O3 ,
HR_ORGANIZATION_INFORMATION O4
WHERE
O.ORGANIZATION_ID = OTL.ORGANIZATION_ID
AND O.ORGANIZATION_ID = O2.ORGANIZATION_ID (+)
AND O.ORGANIZATION_ID = O3.ORGANIZATION_ID
AND O.ORGANIZATION_ID = O4.ORGANIZATION_ID
AND O3.ORG_INFORMATION_CONTEXT = 'Business Group Information'
AND O2.ORG_INFORMATION_CONTEXT (+) = 'Work Day Information'
AND O4.ORG_INFORMATION_CONTEXT = 'CLASS'
AND O4.ORG_INFORMATION1 = 'HR_BG'
and o4.org_information2 = 'Y'
AND (o.date_to IS NULL OR o.date_to > SYSDATE);
|
<filename>resources/3dcitydb/postgresql/SCHEMA/SCHEMA.sql
-- 3D City Database - The Open Source CityGML Database
-- http://www.3dcitydb.org/
--
-- Copyright 2013 - 2016
-- Chair of Geoinformatics
-- Technical University of Munich, Germany
-- https://www.gis.bgu.tum.de/
--
-- The 3D City Database is jointly developed with the following
-- cooperation partners:
--
-- virtualcitySYSTEMS GmbH, Berlin <http://www.virtualcitysystems.de/>
-- M.O.S.S. Computer Grafik Systeme GmbH, Taufkirchen <http://www.moss.de/>
--
-- 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.
--
-- Database creation must be done outside an multicommand file.
-- These commands were put in this file only for convenience.
-- -- object: "3DCityDB_v3.3" | type: DATABASE --
-- -- DROP DATABASE IF EXISTS "3DCityDB_v3.3";
-- CREATE DATABASE "3DCityDB_v3.3"
-- ENCODING = 'UTF8'
-- TABLESPACE = pg_default
-- OWNER = postgres
-- ;
-- -- ddl-end --
--
-- object: citydb | type: SCHEMA --
-- DROP SCHEMA IF EXISTS citydb CASCADE;
CREATE SCHEMA citydb;
-- ddl-end --
-- SET search_path TO pg_catalog,public,citydb;
-- ddl-end --
-- object: postgis | type: EXTENSION --
-- DROP EXTENSION IF EXISTS postgis CASCADE;
--CREATE EXTENSION postgis
-- WITH SCHEMA public;
-- ddl-end --
--COMMENT ON EXTENSION postgis IS 'PostGIS geometry, geography, and raster spatial types and functions';
-- ddl-end --
-- object: citydb.citymodel_seq | type: SEQUENCE --
-- DROP SEQUENCE IF EXISTS citydb.citymodel_seq CASCADE;
CREATE SEQUENCE citydb.citymodel_seq
INCREMENT BY 1
MINVALUE 0
MAXVALUE 2147483647
START WITH 1
CACHE 1
NO CYCLE
OWNED BY NONE;
-- ddl-end --
-- object: citydb.cityobject_seq | type: SEQUENCE --
-- DROP SEQUENCE IF EXISTS citydb.cityobject_seq CASCADE;
CREATE SEQUENCE citydb.cityobject_seq
INCREMENT BY 1
MINVALUE 0
MAXVALUE 2147483647
START WITH 1
CACHE 1
NO CYCLE
OWNED BY NONE;
-- ddl-end --
-- object: citydb.cityobject_member | type: TABLE --
-- DROP TABLE IF EXISTS citydb.cityobject_member CASCADE;
CREATE TABLE citydb.cityobject_member(
citymodel_id integer NOT NULL,
cityobject_id integer NOT NULL,
CONSTRAINT cityobject_member_pk PRIMARY KEY (citymodel_id,cityobject_id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.external_ref_seq | type: SEQUENCE --
-- DROP SEQUENCE IF EXISTS citydb.external_ref_seq CASCADE;
CREATE SEQUENCE citydb.external_ref_seq
INCREMENT BY 1
MINVALUE 0
MAXVALUE 2147483647
START WITH 1
CACHE 1
NO CYCLE
OWNED BY NONE;
-- ddl-end --
-- object: citydb.generalization | type: TABLE --
-- DROP TABLE IF EXISTS citydb.generalization CASCADE;
CREATE TABLE citydb.generalization(
cityobject_id integer NOT NULL,
generalizes_to_id integer NOT NULL,
CONSTRAINT generalization_pk PRIMARY KEY (cityobject_id,generalizes_to_id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.surface_geometry_seq | type: SEQUENCE --
-- DROP SEQUENCE IF EXISTS citydb.surface_geometry_seq CASCADE;
CREATE SEQUENCE citydb.surface_geometry_seq
INCREMENT BY 1
MINVALUE 0
MAXVALUE 2147483647
START WITH 1
CACHE 1
NO CYCLE
OWNED BY NONE;
-- ddl-end --
-- object: citydb.cityobjectgroup | type: TABLE --
-- DROP TABLE IF EXISTS citydb.cityobjectgroup CASCADE;
CREATE TABLE citydb.cityobjectgroup(
id integer NOT NULL,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
brep_id integer,
other_geom geometry(GEOMETRYZ),
parent_cityobject_id integer,
CONSTRAINT cityobjectgroup_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.group_to_cityobject | type: TABLE --
-- DROP TABLE IF EXISTS citydb.group_to_cityobject CASCADE;
CREATE TABLE citydb.group_to_cityobject(
cityobject_id integer NOT NULL,
cityobjectgroup_id integer NOT NULL,
role character varying(256),
CONSTRAINT group_to_cityobject_pk PRIMARY KEY (cityobject_id,cityobjectgroup_id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.database_srs | type: TABLE --
-- DROP TABLE IF EXISTS citydb.database_srs CASCADE;
CREATE TABLE citydb.database_srs(
srid integer NOT NULL,
gml_srs_name character varying(1000),
CONSTRAINT database_srs_pk PRIMARY KEY (srid)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.objectclass | type: TABLE --
-- DROP TABLE IF EXISTS citydb.objectclass CASCADE;
CREATE TABLE citydb.objectclass(
id integer NOT NULL,
classname character varying(256),
superclass_id integer,
CONSTRAINT objectclass_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.implicit_geometry_seq | type: SEQUENCE --
-- DROP SEQUENCE IF EXISTS citydb.implicit_geometry_seq CASCADE;
CREATE SEQUENCE citydb.implicit_geometry_seq
INCREMENT BY 1
MINVALUE 0
MAXVALUE 2147483647
START WITH 1
CACHE 1
NO CYCLE
OWNED BY NONE;
-- ddl-end --
-- object: citydb.city_furniture | type: TABLE --
-- DROP TABLE IF EXISTS citydb.city_furniture CASCADE;
CREATE TABLE citydb.city_furniture(
id integer NOT NULL,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
lod1_terrain_intersection geometry(MULTILINESTRINGZ),
lod2_terrain_intersection geometry(MULTILINESTRINGZ),
lod3_terrain_intersection geometry(MULTILINESTRINGZ),
lod4_terrain_intersection geometry(MULTILINESTRINGZ),
lod1_brep_id integer,
lod2_brep_id integer,
lod3_brep_id integer,
lod4_brep_id integer,
lod1_other_geom geometry(GEOMETRYZ),
lod2_other_geom geometry(GEOMETRYZ),
lod3_other_geom geometry(GEOMETRYZ),
lod4_other_geom geometry(GEOMETRYZ),
lod1_implicit_rep_id integer,
lod2_implicit_rep_id integer,
lod3_implicit_rep_id integer,
lod4_implicit_rep_id integer,
lod1_implicit_ref_point geometry(POINTZ),
lod2_implicit_ref_point geometry(POINTZ),
lod3_implicit_ref_point geometry(POINTZ),
lod4_implicit_ref_point geometry(POINTZ),
lod1_implicit_transformation character varying(1000),
lod2_implicit_transformation character varying(1000),
lod3_implicit_transformation character varying(1000),
lod4_implicit_transformation character varying(1000),
CONSTRAINT city_furniture_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.cityobject_genericatt_seq | type: SEQUENCE --
-- DROP SEQUENCE IF EXISTS citydb.cityobject_genericatt_seq CASCADE;
CREATE SEQUENCE citydb.cityobject_genericatt_seq
INCREMENT BY 1
MINVALUE 0
MAXVALUE 2147483647
START WITH 1
CACHE 1
NO CYCLE
OWNED BY NONE;
-- ddl-end --
-- object: citydb.generic_cityobject | type: TABLE --
-- DROP TABLE IF EXISTS citydb.generic_cityobject CASCADE;
CREATE TABLE citydb.generic_cityobject(
id integer NOT NULL,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
lod0_terrain_intersection geometry(MULTILINESTRINGZ),
lod1_terrain_intersection geometry(MULTILINESTRINGZ),
lod2_terrain_intersection geometry(MULTILINESTRINGZ),
lod3_terrain_intersection geometry(MULTILINESTRINGZ),
lod4_terrain_intersection geometry(MULTILINESTRINGZ),
lod0_brep_id integer,
lod1_brep_id integer,
lod2_brep_id integer,
lod3_brep_id integer,
lod4_brep_id integer,
lod0_other_geom geometry(GEOMETRYZ),
lod1_other_geom geometry(GEOMETRYZ),
lod2_other_geom geometry(GEOMETRYZ),
lod3_other_geom geometry(GEOMETRYZ),
lod4_other_geom geometry(GEOMETRYZ),
lod0_implicit_rep_id integer,
lod1_implicit_rep_id integer,
lod2_implicit_rep_id integer,
lod3_implicit_rep_id integer,
lod4_implicit_rep_id integer,
lod0_implicit_ref_point geometry(POINTZ),
lod1_implicit_ref_point geometry(POINTZ),
lod2_implicit_ref_point geometry(POINTZ),
lod3_implicit_ref_point geometry(POINTZ),
lod4_implicit_ref_point geometry(POINTZ),
lod0_implicit_transformation character varying(1000),
lod1_implicit_transformation character varying(1000),
lod2_implicit_transformation character varying(1000),
lod3_implicit_transformation character varying(1000),
lod4_implicit_transformation character varying(1000),
CONSTRAINT generic_cityobject_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.address_seq | type: SEQUENCE --
-- DROP SEQUENCE IF EXISTS citydb.address_seq CASCADE;
CREATE SEQUENCE citydb.address_seq
INCREMENT BY 1
MINVALUE 0
MAXVALUE 2147483647
START WITH 1
CACHE 1
NO CYCLE
OWNED BY NONE;
-- ddl-end --
-- object: citydb.address_to_building | type: TABLE --
-- DROP TABLE IF EXISTS citydb.address_to_building CASCADE;
CREATE TABLE citydb.address_to_building(
building_id integer NOT NULL,
address_id integer NOT NULL,
CONSTRAINT address_to_building_pk PRIMARY KEY (building_id,address_id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.building | type: TABLE --
-- DROP TABLE IF EXISTS citydb.building CASCADE;
CREATE TABLE citydb.building(
id integer NOT NULL,
building_parent_id integer,
building_root_id integer,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
year_of_construction date,
year_of_demolition date,
roof_type character varying(256),
roof_type_codespace character varying(4000),
measured_height double precision,
measured_height_unit character varying(4000),
storeys_above_ground numeric(8,0),
storeys_below_ground numeric(8,0),
storey_heights_above_ground character varying(4000),
storey_heights_ag_unit character varying(4000),
storey_heights_below_ground character varying(4000),
storey_heights_bg_unit character varying(4000),
lod1_terrain_intersection geometry(MULTILINESTRINGZ),
lod2_terrain_intersection geometry(MULTILINESTRINGZ),
lod3_terrain_intersection geometry(MULTILINESTRINGZ),
lod4_terrain_intersection geometry(MULTILINESTRINGZ),
lod2_multi_curve geometry(MULTILINESTRINGZ),
lod3_multi_curve geometry(MULTILINESTRINGZ),
lod4_multi_curve geometry(MULTILINESTRINGZ),
lod0_footprint_id integer,
lod0_roofprint_id integer,
lod1_multi_surface_id integer,
lod2_multi_surface_id integer,
lod3_multi_surface_id integer,
lod4_multi_surface_id integer,
lod1_solid_id integer,
lod2_solid_id integer,
lod3_solid_id integer,
lod4_solid_id integer,
CONSTRAINT building_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.building_furniture | type: TABLE --
-- DROP TABLE IF EXISTS citydb.building_furniture CASCADE;
CREATE TABLE citydb.building_furniture(
id integer NOT NULL,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
room_id integer NOT NULL,
lod4_brep_id integer,
lod4_other_geom geometry(GEOMETRYZ),
lod4_implicit_rep_id integer,
lod4_implicit_ref_point geometry(POINTZ),
lod4_implicit_transformation character varying(1000),
CONSTRAINT building_furniture_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.building_installation | type: TABLE --
-- DROP TABLE IF EXISTS citydb.building_installation CASCADE;
CREATE TABLE citydb.building_installation(
id integer NOT NULL,
objectclass_id integer,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
building_id integer,
room_id integer,
lod2_brep_id integer,
lod3_brep_id integer,
lod4_brep_id integer,
lod2_other_geom geometry(GEOMETRYZ),
lod3_other_geom geometry(GEOMETRYZ),
lod4_other_geom geometry(GEOMETRYZ),
lod2_implicit_rep_id integer,
lod3_implicit_rep_id integer,
lod4_implicit_rep_id integer,
lod2_implicit_ref_point geometry(POINTZ),
lod3_implicit_ref_point geometry(POINTZ),
lod4_implicit_ref_point geometry(POINTZ),
lod2_implicit_transformation character varying(1000),
lod3_implicit_transformation character varying(1000),
lod4_implicit_transformation character varying(1000),
CONSTRAINT building_installation_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.opening | type: TABLE --
-- DROP TABLE IF EXISTS citydb.opening CASCADE;
CREATE TABLE citydb.opening(
id integer NOT NULL,
objectclass_id integer,
address_id integer,
lod3_multi_surface_id integer,
lod4_multi_surface_id integer,
lod3_implicit_rep_id integer,
lod4_implicit_rep_id integer,
lod3_implicit_ref_point geometry(POINTZ),
lod4_implicit_ref_point geometry(POINTZ),
lod3_implicit_transformation character varying(1000),
lod4_implicit_transformation character varying(1000),
CONSTRAINT opening_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.opening_to_them_surface | type: TABLE --
-- DROP TABLE IF EXISTS citydb.opening_to_them_surface CASCADE;
CREATE TABLE citydb.opening_to_them_surface(
opening_id integer NOT NULL,
thematic_surface_id integer NOT NULL,
CONSTRAINT opening_to_them_surface_pk PRIMARY KEY (opening_id,thematic_surface_id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.room | type: TABLE --
-- DROP TABLE IF EXISTS citydb.room CASCADE;
CREATE TABLE citydb.room(
id integer NOT NULL,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
building_id integer NOT NULL,
lod4_multi_surface_id integer,
lod4_solid_id integer,
CONSTRAINT room_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.thematic_surface | type: TABLE --
-- DROP TABLE IF EXISTS citydb.thematic_surface CASCADE;
CREATE TABLE citydb.thematic_surface(
id integer NOT NULL,
objectclass_id integer,
building_id integer,
room_id integer,
building_installation_id integer,
lod2_multi_surface_id integer,
lod3_multi_surface_id integer,
lod4_multi_surface_id integer,
CONSTRAINT thematic_surface_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.appearance_seq | type: SEQUENCE --
-- DROP SEQUENCE IF EXISTS citydb.appearance_seq CASCADE;
CREATE SEQUENCE citydb.appearance_seq
INCREMENT BY 1
MINVALUE 0
MAXVALUE 2147483647
START WITH 1
CACHE 1
NO CYCLE
OWNED BY NONE;
-- ddl-end --
-- object: citydb.surface_data_seq | type: SEQUENCE --
-- DROP SEQUENCE IF EXISTS citydb.surface_data_seq CASCADE;
CREATE SEQUENCE citydb.surface_data_seq
INCREMENT BY 1
MINVALUE 0
MAXVALUE 2147483647
START WITH 1
CACHE 1
NO CYCLE
OWNED BY NONE;
-- ddl-end --
-- object: citydb.textureparam | type: TABLE --
-- DROP TABLE IF EXISTS citydb.textureparam CASCADE;
CREATE TABLE citydb.textureparam(
surface_geometry_id integer NOT NULL,
is_texture_parametrization numeric,
world_to_texture character varying(1000),
texture_coordinates geometry(POLYGON),
surface_data_id integer NOT NULL,
CONSTRAINT textureparam_pk PRIMARY KEY (surface_geometry_id,surface_data_id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.appear_to_surface_data | type: TABLE --
-- DROP TABLE IF EXISTS citydb.appear_to_surface_data CASCADE;
CREATE TABLE citydb.appear_to_surface_data(
surface_data_id integer NOT NULL,
appearance_id integer NOT NULL,
CONSTRAINT appear_to_surface_data_pk PRIMARY KEY (surface_data_id,appearance_id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.breakline_relief | type: TABLE --
-- DROP TABLE IF EXISTS citydb.breakline_relief CASCADE;
CREATE TABLE citydb.breakline_relief(
id integer NOT NULL,
ridge_or_valley_lines geometry(MULTILINESTRINGZ),
break_lines geometry(MULTILINESTRINGZ),
CONSTRAINT breakline_relief_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.masspoint_relief | type: TABLE --
-- DROP TABLE IF EXISTS citydb.masspoint_relief CASCADE;
CREATE TABLE citydb.masspoint_relief(
id integer NOT NULL,
relief_points geometry(MULTIPOINTZ),
CONSTRAINT masspoint_relief_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.relief_component | type: TABLE --
-- DROP TABLE IF EXISTS citydb.relief_component CASCADE;
CREATE TABLE citydb.relief_component(
id integer NOT NULL,
objectclass_id integer,
lod numeric,
extent geometry(POLYGON),
CONSTRAINT relief_component_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100),
CONSTRAINT relief_comp_lod_chk CHECK (((lod >= (0)::numeric) AND (lod < (5)::numeric)))
);
-- ddl-end --
-- object: citydb.relief_feat_to_rel_comp | type: TABLE --
-- DROP TABLE IF EXISTS citydb.relief_feat_to_rel_comp CASCADE;
CREATE TABLE citydb.relief_feat_to_rel_comp(
relief_component_id integer NOT NULL,
relief_feature_id integer NOT NULL,
CONSTRAINT relief_feat_to_rel_comp_pk PRIMARY KEY (relief_component_id,relief_feature_id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.relief_feature | type: TABLE --
-- DROP TABLE IF EXISTS citydb.relief_feature CASCADE;
CREATE TABLE citydb.relief_feature(
id integer NOT NULL,
lod numeric,
CONSTRAINT relief_feature_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100),
CONSTRAINT relief_feat_lod_chk CHECK (((lod >= (0)::numeric) AND (lod < (5)::numeric)))
);
-- ddl-end --
-- object: citydb.tin_relief | type: TABLE --
-- DROP TABLE IF EXISTS citydb.tin_relief CASCADE;
CREATE TABLE citydb.tin_relief(
id integer NOT NULL,
max_length double precision,
max_length_unit character varying(4000),
stop_lines geometry(MULTILINESTRINGZ),
break_lines geometry(MULTILINESTRINGZ),
control_points geometry(MULTIPOINTZ),
surface_geometry_id integer,
CONSTRAINT tin_relief_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.transportation_complex | type: TABLE --
-- DROP TABLE IF EXISTS citydb.transportation_complex CASCADE;
CREATE TABLE citydb.transportation_complex(
id integer NOT NULL,
objectclass_id integer,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
lod0_network geometry(GEOMETRYZ),
lod1_multi_surface_id integer,
lod2_multi_surface_id integer,
lod3_multi_surface_id integer,
lod4_multi_surface_id integer,
CONSTRAINT transportation_complex_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.traffic_area | type: TABLE --
-- DROP TABLE IF EXISTS citydb.traffic_area CASCADE;
CREATE TABLE citydb.traffic_area(
id integer NOT NULL,
objectclass_id integer,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
surface_material character varying(256),
surface_material_codespace character varying(4000),
lod2_multi_surface_id integer,
lod3_multi_surface_id integer,
lod4_multi_surface_id integer,
transportation_complex_id integer NOT NULL,
CONSTRAINT traffic_area_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.land_use | type: TABLE --
-- DROP TABLE IF EXISTS citydb.land_use CASCADE;
CREATE TABLE citydb.land_use(
id integer NOT NULL,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
lod0_multi_surface_id integer,
lod1_multi_surface_id integer,
lod2_multi_surface_id integer,
lod3_multi_surface_id integer,
lod4_multi_surface_id integer,
CONSTRAINT land_use_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.plant_cover | type: TABLE --
-- DROP TABLE IF EXISTS citydb.plant_cover CASCADE;
CREATE TABLE citydb.plant_cover(
id integer NOT NULL,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
average_height double precision,
average_height_unit character varying(4000),
lod1_multi_surface_id integer,
lod2_multi_surface_id integer,
lod3_multi_surface_id integer,
lod4_multi_surface_id integer,
lod1_multi_solid_id integer,
lod2_multi_solid_id integer,
lod3_multi_solid_id integer,
lod4_multi_solid_id integer,
CONSTRAINT plant_cover_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.solitary_vegetat_object | type: TABLE --
-- DROP TABLE IF EXISTS citydb.solitary_vegetat_object CASCADE;
CREATE TABLE citydb.solitary_vegetat_object(
id integer NOT NULL,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
species character varying(1000),
species_codespace character varying(4000),
height double precision,
height_unit character varying(4000),
trunk_diameter double precision,
trunk_diameter_unit character varying(4000),
crown_diameter double precision,
crown_diameter_unit character varying(4000),
lod1_brep_id integer,
lod2_brep_id integer,
lod3_brep_id integer,
lod4_brep_id integer,
lod1_other_geom geometry(GEOMETRYZ),
lod2_other_geom geometry(GEOMETRYZ),
lod3_other_geom geometry(GEOMETRYZ),
lod4_other_geom geometry(GEOMETRYZ),
lod1_implicit_rep_id integer,
lod2_implicit_rep_id integer,
lod3_implicit_rep_id integer,
lod4_implicit_rep_id integer,
lod1_implicit_ref_point geometry(POINTZ),
lod2_implicit_ref_point geometry(POINTZ),
lod3_implicit_ref_point geometry(POINTZ),
lod4_implicit_ref_point geometry(POINTZ),
lod1_implicit_transformation character varying(1000),
lod2_implicit_transformation character varying(1000),
lod3_implicit_transformation character varying(1000),
lod4_implicit_transformation character varying(1000),
CONSTRAINT solitary_veg_object_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.waterbody | type: TABLE --
-- DROP TABLE IF EXISTS citydb.waterbody CASCADE;
CREATE TABLE citydb.waterbody(
id integer NOT NULL,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
lod0_multi_curve geometry(MULTILINESTRINGZ),
lod1_multi_curve geometry(MULTILINESTRINGZ),
lod0_multi_surface_id integer,
lod1_multi_surface_id integer,
lod1_solid_id integer,
lod2_solid_id integer,
lod3_solid_id integer,
lod4_solid_id integer,
CONSTRAINT waterbody_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.waterbod_to_waterbnd_srf | type: TABLE --
-- DROP TABLE IF EXISTS citydb.waterbod_to_waterbnd_srf CASCADE;
CREATE TABLE citydb.waterbod_to_waterbnd_srf(
waterboundary_surface_id integer NOT NULL,
waterbody_id integer NOT NULL,
CONSTRAINT waterbod_to_waterbnd_pk PRIMARY KEY (waterboundary_surface_id,waterbody_id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.waterboundary_surface | type: TABLE --
-- DROP TABLE IF EXISTS citydb.waterboundary_surface CASCADE;
CREATE TABLE citydb.waterboundary_surface(
id integer NOT NULL,
objectclass_id integer,
water_level character varying(256),
water_level_codespace character varying(4000),
lod2_surface_id integer,
lod3_surface_id integer,
lod4_surface_id integer,
CONSTRAINT waterboundary_surface_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.raster_relief | type: TABLE --
-- DROP TABLE IF EXISTS citydb.raster_relief CASCADE;
CREATE TABLE citydb.raster_relief(
id integer NOT NULL,
raster_uri character varying(4000),
coverage_id integer,
CONSTRAINT raster_relief_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.tunnel | type: TABLE --
-- DROP TABLE IF EXISTS citydb.tunnel CASCADE;
CREATE TABLE citydb.tunnel(
id integer NOT NULL,
tunnel_parent_id integer,
tunnel_root_id integer,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
year_of_construction date,
year_of_demolition date,
lod1_terrain_intersection geometry(MULTILINESTRINGZ),
lod2_terrain_intersection geometry(MULTILINESTRINGZ),
lod3_terrain_intersection geometry(MULTILINESTRINGZ),
lod4_terrain_intersection geometry(MULTILINESTRINGZ),
lod2_multi_curve geometry(MULTILINESTRINGZ),
lod3_multi_curve geometry(MULTILINESTRINGZ),
lod4_multi_curve geometry(MULTILINESTRINGZ),
lod1_multi_surface_id integer,
lod2_multi_surface_id integer,
lod3_multi_surface_id integer,
lod4_multi_surface_id integer,
lod1_solid_id integer,
lod2_solid_id integer,
lod3_solid_id integer,
lod4_solid_id integer,
CONSTRAINT tunnel_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.tunnel_open_to_them_srf | type: TABLE --
-- DROP TABLE IF EXISTS citydb.tunnel_open_to_them_srf CASCADE;
CREATE TABLE citydb.tunnel_open_to_them_srf(
tunnel_opening_id integer NOT NULL,
tunnel_thematic_surface_id integer NOT NULL,
CONSTRAINT tunnel_open_to_them_srf_pk PRIMARY KEY (tunnel_opening_id,tunnel_thematic_surface_id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.tunnel_hollow_space | type: TABLE --
-- DROP TABLE IF EXISTS citydb.tunnel_hollow_space CASCADE;
CREATE TABLE citydb.tunnel_hollow_space(
id integer NOT NULL,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
tunnel_id integer NOT NULL,
lod4_multi_surface_id integer,
lod4_solid_id integer,
CONSTRAINT tunnel_hollow_space_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.tunnel_thematic_surface | type: TABLE --
-- DROP TABLE IF EXISTS citydb.tunnel_thematic_surface CASCADE;
CREATE TABLE citydb.tunnel_thematic_surface(
id integer NOT NULL,
objectclass_id integer,
tunnel_id integer,
tunnel_hollow_space_id integer,
tunnel_installation_id integer,
lod2_multi_surface_id integer,
lod3_multi_surface_id integer,
lod4_multi_surface_id integer,
CONSTRAINT tunnel_thematic_surface_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.tex_image_seq | type: SEQUENCE --
-- DROP SEQUENCE IF EXISTS citydb.tex_image_seq CASCADE;
CREATE SEQUENCE citydb.tex_image_seq
INCREMENT BY 1
MINVALUE 0
MAXVALUE 2147483647
START WITH 1
CACHE 1
NO CYCLE
OWNED BY NONE;
-- ddl-end --
-- object: citydb.tunnel_opening | type: TABLE --
-- DROP TABLE IF EXISTS citydb.tunnel_opening CASCADE;
CREATE TABLE citydb.tunnel_opening(
id integer NOT NULL,
objectclass_id integer,
lod3_multi_surface_id integer,
lod4_multi_surface_id integer,
lod3_implicit_rep_id integer,
lod4_implicit_rep_id integer,
lod3_implicit_ref_point geometry(POINTZ),
lod4_implicit_ref_point geometry(POINTZ),
lod3_implicit_transformation character varying(1000),
lod4_implicit_transformation character varying(1000),
CONSTRAINT tunnel_opening_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.tunnel_installation | type: TABLE --
-- DROP TABLE IF EXISTS citydb.tunnel_installation CASCADE;
CREATE TABLE citydb.tunnel_installation(
id integer NOT NULL,
objectclass_id integer,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
tunnel_id integer,
tunnel_hollow_space_id integer,
lod2_brep_id integer,
lod3_brep_id integer,
lod4_brep_id integer,
lod2_other_geom geometry(GEOMETRYZ),
lod3_other_geom geometry(GEOMETRYZ),
lod4_other_geom geometry(GEOMETRYZ),
lod2_implicit_rep_id integer,
lod3_implicit_rep_id integer,
lod4_implicit_rep_id integer,
lod2_implicit_ref_point geometry(POINTZ),
lod3_implicit_ref_point geometry(POINTZ),
lod4_implicit_ref_point geometry(POINTZ),
lod2_implicit_transformation character varying(1000),
lod3_implicit_transformation character varying(1000),
lod4_implicit_transformation character varying(1000),
CONSTRAINT tunnel_installation_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.tunnel_furniture | type: TABLE --
-- DROP TABLE IF EXISTS citydb.tunnel_furniture CASCADE;
CREATE TABLE citydb.tunnel_furniture(
id integer NOT NULL,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
tunnel_hollow_space_id integer NOT NULL,
lod4_brep_id integer,
lod4_other_geom geometry(GEOMETRYZ),
lod4_implicit_rep_id integer,
lod4_implicit_ref_point geometry(POINTZ),
lod4_implicit_transformation character varying(1000),
CONSTRAINT tunnel_furniture_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.bridge | type: TABLE --
-- DROP TABLE IF EXISTS citydb.bridge CASCADE;
CREATE TABLE citydb.bridge(
id integer NOT NULL,
bridge_parent_id integer,
bridge_root_id integer,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
year_of_construction date,
year_of_demolition date,
is_movable numeric,
lod1_terrain_intersection geometry(MULTILINESTRINGZ),
lod2_terrain_intersection geometry(MULTILINESTRINGZ),
lod3_terrain_intersection geometry(MULTILINESTRINGZ),
lod4_terrain_intersection geometry(MULTILINESTRINGZ),
lod2_multi_curve geometry(MULTILINESTRINGZ),
lod3_multi_curve geometry(MULTILINESTRINGZ),
lod4_multi_curve geometry(MULTILINESTRINGZ),
lod1_multi_surface_id integer,
lod2_multi_surface_id integer,
lod3_multi_surface_id integer,
lod4_multi_surface_id integer,
lod1_solid_id integer,
lod2_solid_id integer,
lod3_solid_id integer,
lod4_solid_id integer,
CONSTRAINT bridge_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.bridge_furniture | type: TABLE --
-- DROP TABLE IF EXISTS citydb.bridge_furniture CASCADE;
CREATE TABLE citydb.bridge_furniture(
id integer NOT NULL,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
bridge_room_id integer NOT NULL,
lod4_brep_id integer,
lod4_other_geom geometry(GEOMETRYZ),
lod4_implicit_rep_id integer,
lod4_implicit_ref_point geometry(POINTZ),
lod4_implicit_transformation character varying(1000),
CONSTRAINT bridge_furniture_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.bridge_installation | type: TABLE --
-- DROP TABLE IF EXISTS citydb.bridge_installation CASCADE;
CREATE TABLE citydb.bridge_installation(
id integer NOT NULL,
objectclass_id integer,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
bridge_id integer,
bridge_room_id integer,
lod2_brep_id integer,
lod3_brep_id integer,
lod4_brep_id integer,
lod2_other_geom geometry(GEOMETRYZ),
lod3_other_geom geometry(GEOMETRYZ),
lod4_other_geom geometry(GEOMETRYZ),
lod2_implicit_rep_id integer,
lod3_implicit_rep_id integer,
lod4_implicit_rep_id integer,
lod2_implicit_ref_point geometry(POINTZ),
lod3_implicit_ref_point geometry(POINTZ),
lod4_implicit_ref_point geometry(POINTZ),
lod2_implicit_transformation character varying(1000),
lod3_implicit_transformation character varying(1000),
lod4_implicit_transformation character varying(1000),
CONSTRAINT bridge_installation_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.bridge_opening | type: TABLE --
-- DROP TABLE IF EXISTS citydb.bridge_opening CASCADE;
CREATE TABLE citydb.bridge_opening(
id integer NOT NULL,
objectclass_id integer,
address_id integer,
lod3_multi_surface_id integer,
lod4_multi_surface_id integer,
lod3_implicit_rep_id integer,
lod4_implicit_rep_id integer,
lod3_implicit_ref_point geometry(POINTZ),
lod4_implicit_ref_point geometry(POINTZ),
lod3_implicit_transformation character varying(1000),
lod4_implicit_transformation character varying(1000),
CONSTRAINT bridge_opening_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.bridge_open_to_them_srf | type: TABLE --
-- DROP TABLE IF EXISTS citydb.bridge_open_to_them_srf CASCADE;
CREATE TABLE citydb.bridge_open_to_them_srf(
bridge_opening_id integer NOT NULL,
bridge_thematic_surface_id integer NOT NULL,
CONSTRAINT bridge_open_to_them_srf_pk PRIMARY KEY (bridge_opening_id,bridge_thematic_surface_id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.bridge_room | type: TABLE --
-- DROP TABLE IF EXISTS citydb.bridge_room CASCADE;
CREATE TABLE citydb.bridge_room(
id integer NOT NULL,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
bridge_id integer NOT NULL,
lod4_multi_surface_id integer,
lod4_solid_id integer,
CONSTRAINT bridge_room_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.bridge_thematic_surface | type: TABLE --
-- DROP TABLE IF EXISTS citydb.bridge_thematic_surface CASCADE;
CREATE TABLE citydb.bridge_thematic_surface(
id integer NOT NULL,
objectclass_id integer,
bridge_id integer,
bridge_room_id integer,
bridge_installation_id integer,
bridge_constr_element_id integer,
lod2_multi_surface_id integer,
lod3_multi_surface_id integer,
lod4_multi_surface_id integer,
CONSTRAINT bridge_thematic_surface_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.bridge_constr_element | type: TABLE --
-- DROP TABLE IF EXISTS citydb.bridge_constr_element CASCADE;
CREATE TABLE citydb.bridge_constr_element(
id integer NOT NULL,
class character varying(256),
class_codespace character varying(4000),
function character varying(1000),
function_codespace character varying(4000),
usage character varying(1000),
usage_codespace character varying(4000),
bridge_id integer,
lod1_terrain_intersection geometry(MULTILINESTRINGZ),
lod2_terrain_intersection geometry(MULTILINESTRINGZ),
lod3_terrain_intersection geometry(MULTILINESTRINGZ),
lod4_terrain_intersection geometry(MULTILINESTRINGZ),
lod1_brep_id integer,
lod2_brep_id integer,
lod3_brep_id integer,
lod4_brep_id integer,
lod1_other_geom geometry(GEOMETRYZ),
lod2_other_geom geometry(GEOMETRYZ),
lod3_other_geom geometry(GEOMETRYZ),
lod4_other_geom geometry(GEOMETRYZ),
lod1_implicit_rep_id integer,
lod2_implicit_rep_id integer,
lod3_implicit_rep_id integer,
lod4_implicit_rep_id integer,
lod1_implicit_ref_point geometry(POINTZ),
lod2_implicit_ref_point geometry(POINTZ),
lod3_implicit_ref_point geometry(POINTZ),
lod4_implicit_ref_point geometry(POINTZ),
lod1_implicit_transformation character varying(1000),
lod2_implicit_transformation character varying(1000),
lod3_implicit_transformation character varying(1000),
lod4_implicit_transformation character varying(1000),
CONSTRAINT bridge_constr_element_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.address_to_bridge | type: TABLE --
-- DROP TABLE IF EXISTS citydb.address_to_bridge CASCADE;
CREATE TABLE citydb.address_to_bridge(
bridge_id integer NOT NULL,
address_id integer NOT NULL,
CONSTRAINT address_to_bridge_pk PRIMARY KEY (bridge_id,address_id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.grid_coverage_seq | type: SEQUENCE --
-- DROP SEQUENCE IF EXISTS citydb.grid_coverage_seq CASCADE;
CREATE SEQUENCE citydb.grid_coverage_seq
INCREMENT BY 1
MINVALUE 0
MAXVALUE 2147483647
START WITH 1
CACHE 1
NO CYCLE
OWNED BY NONE;
-- ddl-end --
-- object: citydb.cityobject | type: TABLE --
-- DROP TABLE IF EXISTS citydb.cityobject CASCADE;
CREATE TABLE citydb.cityobject(
id integer NOT NULL DEFAULT nextval('citydb.cityobject_seq'::regclass),
objectclass_id integer NOT NULL,
gmlid character varying(256),
gmlid_codespace varchar(1000),
name character varying(1000),
name_codespace character varying(4000),
description character varying(4000),
envelope geometry(POLYGONZ),
creation_date timestamp with time zone,
termination_date timestamp with time zone,
relative_to_terrain character varying(256),
relative_to_water character varying(256),
last_modification_date timestamp with time zone,
updating_person character varying(256),
reason_for_update character varying(4000),
lineage character varying(256),
xml_source text,
CONSTRAINT cityobject_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.appearance | type: TABLE --
-- DROP TABLE IF EXISTS citydb.appearance CASCADE;
CREATE TABLE citydb.appearance(
id integer NOT NULL DEFAULT nextval('citydb.appearance_seq'::regclass),
gmlid character varying(256),
gmlid_codespace varchar(1000),
name character varying(1000),
name_codespace character varying(4000),
description character varying(4000),
theme character varying(256),
citymodel_id integer,
cityobject_id integer,
CONSTRAINT appearance_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.implicit_geometry | type: TABLE --
-- DROP TABLE IF EXISTS citydb.implicit_geometry CASCADE;
CREATE TABLE citydb.implicit_geometry(
id integer NOT NULL DEFAULT nextval('citydb.implicit_geometry_seq'::regclass),
mime_type character varying(256),
reference_to_library character varying(4000),
library_object bytea,
relative_brep_id integer,
relative_other_geom geometry(GEOMETRYZ),
CONSTRAINT implicit_geometry_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.surface_geometry | type: TABLE --
-- DROP TABLE IF EXISTS citydb.surface_geometry CASCADE;
CREATE TABLE citydb.surface_geometry(
id integer NOT NULL DEFAULT nextval('citydb.surface_geometry_seq'::regclass),
gmlid character varying(256),
gmlid_codespace varchar(1000),
parent_id integer,
root_id integer,
is_solid numeric,
is_composite numeric,
is_triangulated numeric,
is_xlink numeric,
is_reverse numeric,
solid_geometry geometry(POLYHEDRALSURFACEZ),
geometry geometry(POLYGONZ),
implicit_geometry geometry(POLYGONZ),
cityobject_id integer,
CONSTRAINT surface_geometry_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.address | type: TABLE --
-- DROP TABLE IF EXISTS citydb.address CASCADE;
CREATE TABLE citydb.address(
id integer NOT NULL DEFAULT nextval('citydb.address_seq'::regclass),
gmlid varchar(256),
gmlid_codespace varchar(1000),
street character varying(1000),
house_number character varying(256),
po_box character varying(256),
zip_code character varying(256),
city character varying(256),
state character varying(256),
country character varying(256),
multi_point geometry(MULTIPOINTZ),
xal_source text,
CONSTRAINT address_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.surface_data | type: TABLE --
-- DROP TABLE IF EXISTS citydb.surface_data CASCADE;
CREATE TABLE citydb.surface_data(
id integer NOT NULL DEFAULT nextval('citydb.surface_data_seq'::regclass),
gmlid character varying(256),
gmlid_codespace varchar(1000),
name character varying(1000),
name_codespace character varying(4000),
description character varying(4000),
is_front numeric,
objectclass_id integer,
x3d_shininess double precision,
x3d_transparency double precision,
x3d_ambient_intensity double precision,
x3d_specular_color character varying(256),
x3d_diffuse_color character varying(256),
x3d_emissive_color character varying(256),
x3d_is_smooth numeric,
tex_image_id integer,
tex_texture_type character varying(256),
tex_wrap_mode character varying(256),
tex_border_color character varying(256),
gt_prefer_worldfile numeric,
gt_orientation character varying(256),
gt_reference_point geometry(POINT),
CONSTRAINT surface_data_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.citymodel | type: TABLE --
-- DROP TABLE IF EXISTS citydb.citymodel CASCADE;
CREATE TABLE citydb.citymodel(
id integer NOT NULL DEFAULT nextval('citydb.citymodel_seq'::regclass),
gmlid character varying(256),
gmlid_codespace varchar(1000),
name character varying(1000),
name_codespace character varying(4000),
description character varying(4000),
envelope geometry(POLYGONZ),
creation_date timestamp with time zone,
termination_date timestamp with time zone,
last_modification_date timestamp with time zone,
updating_person character varying(256),
reason_for_update character varying(4000),
lineage character varying(256),
CONSTRAINT citymodel_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.cityobject_genericattrib | type: TABLE --
-- DROP TABLE IF EXISTS citydb.cityobject_genericattrib CASCADE;
CREATE TABLE citydb.cityobject_genericattrib(
id integer NOT NULL DEFAULT nextval('citydb.cityobject_genericatt_seq'::regclass),
parent_genattrib_id integer,
root_genattrib_id integer,
attrname character varying(256) NOT NULL,
datatype integer,
strval character varying(4000),
intval integer,
realval double precision,
urival character varying(4000),
dateval timestamp with time zone,
unit character varying(4000),
genattribset_codespace character varying(4000),
blobval bytea,
geomval geometry(GEOMETRYZ),
surface_geometry_id integer,
cityobject_id integer NOT NULL,
CONSTRAINT cityobj_genericattrib_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.external_reference | type: TABLE --
-- DROP TABLE IF EXISTS citydb.external_reference CASCADE;
CREATE TABLE citydb.external_reference(
id integer NOT NULL DEFAULT nextval('citydb.external_ref_seq'::regclass),
infosys character varying(4000),
name character varying(4000),
uri character varying(4000),
cityobject_id integer NOT NULL,
CONSTRAINT external_reference_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.tex_image | type: TABLE --
-- DROP TABLE IF EXISTS citydb.tex_image CASCADE;
CREATE TABLE citydb.tex_image(
id integer NOT NULL DEFAULT nextval('citydb.tex_image_seq'::regclass),
tex_image_uri character varying(4000),
tex_image_data bytea,
tex_mime_type character varying(256),
tex_mime_type_codespace character varying(4000),
CONSTRAINT tex_image_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: citydb.grid_coverage | type: TABLE --
-- DROP TABLE IF EXISTS citydb.grid_coverage CASCADE;
CREATE TABLE citydb.grid_coverage(
id integer NOT NULL DEFAULT nextval('citydb.grid_coverage_seq'::regclass),
rasterproperty raster,
CONSTRAINT grid_coverage_pk PRIMARY KEY (id)
WITH (FILLFACTOR = 100)
);
-- ddl-end --
-- object: cityobject_member_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.cityobject_member_fkx CASCADE;
CREATE INDEX cityobject_member_fkx ON citydb.cityobject_member
USING btree
(
cityobject_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: cityobject_member_fkx1 | type: INDEX --
-- DROP INDEX IF EXISTS citydb.cityobject_member_fkx1 CASCADE;
CREATE INDEX cityobject_member_fkx1 ON citydb.cityobject_member
USING btree
(
citymodel_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: general_cityobject_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.general_cityobject_fkx CASCADE;
CREATE INDEX general_cityobject_fkx ON citydb.generalization
USING btree
(
cityobject_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: general_generalizes_to_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.general_generalizes_to_fkx CASCADE;
CREATE INDEX general_generalizes_to_fkx ON citydb.generalization
USING btree
(
generalizes_to_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: group_brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.group_brep_fkx CASCADE;
CREATE INDEX group_brep_fkx ON citydb.cityobjectgroup
USING btree
(
brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: group_xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.group_xgeom_spx CASCADE;
CREATE INDEX group_xgeom_spx ON citydb.cityobjectgroup
USING gist
(
other_geom
);
-- ddl-end --
-- object: group_parent_cityobj_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.group_parent_cityobj_fkx CASCADE;
CREATE INDEX group_parent_cityobj_fkx ON citydb.cityobjectgroup
USING btree
(
parent_cityobject_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: group_to_cityobject_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.group_to_cityobject_fkx CASCADE;
CREATE INDEX group_to_cityobject_fkx ON citydb.group_to_cityobject
USING btree
(
cityobject_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: group_to_cityobject_fkx1 | type: INDEX --
-- DROP INDEX IF EXISTS citydb.group_to_cityobject_fkx1 CASCADE;
CREATE INDEX group_to_cityobject_fkx1 ON citydb.group_to_cityobject
USING btree
(
cityobjectgroup_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: objectclass_superclass_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.objectclass_superclass_fkx CASCADE;
CREATE INDEX objectclass_superclass_fkx ON citydb.objectclass
USING btree
(
superclass_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: city_furn_lod1terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod1terr_spx CASCADE;
CREATE INDEX city_furn_lod1terr_spx ON citydb.city_furniture
USING gist
(
lod1_terrain_intersection
);
-- ddl-end --
-- object: city_furn_lod2terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod2terr_spx CASCADE;
CREATE INDEX city_furn_lod2terr_spx ON citydb.city_furniture
USING gist
(
lod2_terrain_intersection
);
-- ddl-end --
-- object: city_furn_lod3terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod3terr_spx CASCADE;
CREATE INDEX city_furn_lod3terr_spx ON citydb.city_furniture
USING gist
(
lod3_terrain_intersection
);
-- ddl-end --
-- object: city_furn_lod4terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod4terr_spx CASCADE;
CREATE INDEX city_furn_lod4terr_spx ON citydb.city_furniture
USING gist
(
lod4_terrain_intersection
);
-- ddl-end --
-- object: city_furn_lod1brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod1brep_fkx CASCADE;
CREATE INDEX city_furn_lod1brep_fkx ON citydb.city_furniture
USING btree
(
lod1_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: city_furn_lod2brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod2brep_fkx CASCADE;
CREATE INDEX city_furn_lod2brep_fkx ON citydb.city_furniture
USING btree
(
lod2_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: city_furn_lod3brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod3brep_fkx CASCADE;
CREATE INDEX city_furn_lod3brep_fkx ON citydb.city_furniture
USING btree
(
lod3_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: city_furn_lod4brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod4brep_fkx CASCADE;
CREATE INDEX city_furn_lod4brep_fkx ON citydb.city_furniture
USING btree
(
lod4_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: city_furn_lod1xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod1xgeom_spx CASCADE;
CREATE INDEX city_furn_lod1xgeom_spx ON citydb.city_furniture
USING gist
(
lod1_other_geom
);
-- ddl-end --
-- object: city_furn_lod2xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod2xgeom_spx CASCADE;
CREATE INDEX city_furn_lod2xgeom_spx ON citydb.city_furniture
USING gist
(
lod2_other_geom
);
-- ddl-end --
-- object: city_furn_lod3xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod3xgeom_spx CASCADE;
CREATE INDEX city_furn_lod3xgeom_spx ON citydb.city_furniture
USING gist
(
lod3_other_geom
);
-- ddl-end --
-- object: city_furn_lod4xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod4xgeom_spx CASCADE;
CREATE INDEX city_furn_lod4xgeom_spx ON citydb.city_furniture
USING gist
(
lod4_other_geom
);
-- ddl-end --
-- object: city_furn_lod1impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod1impl_fkx CASCADE;
CREATE INDEX city_furn_lod1impl_fkx ON citydb.city_furniture
USING btree
(
lod1_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: city_furn_lod2impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod2impl_fkx CASCADE;
CREATE INDEX city_furn_lod2impl_fkx ON citydb.city_furniture
USING btree
(
lod2_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: city_furn_lod3impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod3impl_fkx CASCADE;
CREATE INDEX city_furn_lod3impl_fkx ON citydb.city_furniture
USING btree
(
lod3_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: city_furn_lod4impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod4impl_fkx CASCADE;
CREATE INDEX city_furn_lod4impl_fkx ON citydb.city_furniture
USING btree
(
lod4_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: city_furn_lod1refpnt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod1refpnt_spx CASCADE;
CREATE INDEX city_furn_lod1refpnt_spx ON citydb.city_furniture
USING gist
(
lod1_implicit_ref_point
);
-- ddl-end --
-- object: city_furn_lod2refpnt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod2refpnt_spx CASCADE;
CREATE INDEX city_furn_lod2refpnt_spx ON citydb.city_furniture
USING gist
(
lod2_implicit_ref_point
);
-- ddl-end --
-- object: city_furn_lod3refpnt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod3refpnt_spx CASCADE;
CREATE INDEX city_furn_lod3refpnt_spx ON citydb.city_furniture
USING gist
(
lod3_implicit_ref_point
);
-- ddl-end --
-- object: city_furn_lod4refpnt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.city_furn_lod4refpnt_spx CASCADE;
CREATE INDEX city_furn_lod4refpnt_spx ON citydb.city_furniture
USING gist
(
lod4_implicit_ref_point
);
-- ddl-end --
-- object: gen_object_lod0terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod0terr_spx CASCADE;
CREATE INDEX gen_object_lod0terr_spx ON citydb.generic_cityobject
USING gist
(
lod0_terrain_intersection
);
-- ddl-end --
-- object: gen_object_lod1terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod1terr_spx CASCADE;
CREATE INDEX gen_object_lod1terr_spx ON citydb.generic_cityobject
USING gist
(
lod1_terrain_intersection
);
-- ddl-end --
-- object: gen_object_lod2terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod2terr_spx CASCADE;
CREATE INDEX gen_object_lod2terr_spx ON citydb.generic_cityobject
USING gist
(
lod2_terrain_intersection
);
-- ddl-end --
-- object: gen_object_lod3terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod3terr_spx CASCADE;
CREATE INDEX gen_object_lod3terr_spx ON citydb.generic_cityobject
USING gist
(
lod3_terrain_intersection
);
-- ddl-end --
-- object: gen_object_lod4terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod4terr_spx CASCADE;
CREATE INDEX gen_object_lod4terr_spx ON citydb.generic_cityobject
USING gist
(
lod4_terrain_intersection
);
-- ddl-end --
-- object: gen_object_lod0brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod0brep_fkx CASCADE;
CREATE INDEX gen_object_lod0brep_fkx ON citydb.generic_cityobject
USING btree
(
lod0_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: gen_object_lod1brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod1brep_fkx CASCADE;
CREATE INDEX gen_object_lod1brep_fkx ON citydb.generic_cityobject
USING btree
(
lod1_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: gen_object_lod2brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod2brep_fkx CASCADE;
CREATE INDEX gen_object_lod2brep_fkx ON citydb.generic_cityobject
USING btree
(
lod2_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: gen_object_lod3brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod3brep_fkx CASCADE;
CREATE INDEX gen_object_lod3brep_fkx ON citydb.generic_cityobject
USING btree
(
lod3_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: gen_object_lod4brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod4brep_fkx CASCADE;
CREATE INDEX gen_object_lod4brep_fkx ON citydb.generic_cityobject
USING btree
(
lod4_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: gen_object_lod0xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod0xgeom_spx CASCADE;
CREATE INDEX gen_object_lod0xgeom_spx ON citydb.generic_cityobject
USING gist
(
lod0_other_geom
);
-- ddl-end --
-- object: gen_object_lod1xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod1xgeom_spx CASCADE;
CREATE INDEX gen_object_lod1xgeom_spx ON citydb.generic_cityobject
USING gist
(
lod1_other_geom
);
-- ddl-end --
-- object: gen_object_lod2xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod2xgeom_spx CASCADE;
CREATE INDEX gen_object_lod2xgeom_spx ON citydb.generic_cityobject
USING gist
(
lod2_other_geom
);
-- ddl-end --
-- object: gen_object_lod3xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod3xgeom_spx CASCADE;
CREATE INDEX gen_object_lod3xgeom_spx ON citydb.generic_cityobject
USING gist
(
lod3_other_geom
);
-- ddl-end --
-- object: gen_object_lod4xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod4xgeom_spx CASCADE;
CREATE INDEX gen_object_lod4xgeom_spx ON citydb.generic_cityobject
USING gist
(
lod4_other_geom
);
-- ddl-end --
-- object: gen_object_lod0impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod0impl_fkx CASCADE;
CREATE INDEX gen_object_lod0impl_fkx ON citydb.generic_cityobject
USING btree
(
lod0_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: gen_object_lod1impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod1impl_fkx CASCADE;
CREATE INDEX gen_object_lod1impl_fkx ON citydb.generic_cityobject
USING btree
(
lod1_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: gen_object_lod2impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod2impl_fkx CASCADE;
CREATE INDEX gen_object_lod2impl_fkx ON citydb.generic_cityobject
USING btree
(
lod2_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: gen_object_lod3impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod3impl_fkx CASCADE;
CREATE INDEX gen_object_lod3impl_fkx ON citydb.generic_cityobject
USING btree
(
lod3_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: gen_object_lod4impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod4impl_fkx CASCADE;
CREATE INDEX gen_object_lod4impl_fkx ON citydb.generic_cityobject
USING btree
(
lod4_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: gen_object_lod0refpnt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod0refpnt_spx CASCADE;
CREATE INDEX gen_object_lod0refpnt_spx ON citydb.generic_cityobject
USING gist
(
lod0_implicit_ref_point
);
-- ddl-end --
-- object: gen_object_lod1refpnt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod1refpnt_spx CASCADE;
CREATE INDEX gen_object_lod1refpnt_spx ON citydb.generic_cityobject
USING gist
(
lod1_implicit_ref_point
);
-- ddl-end --
-- object: gen_object_lod2refpnt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod2refpnt_spx CASCADE;
CREATE INDEX gen_object_lod2refpnt_spx ON citydb.generic_cityobject
USING gist
(
lod2_implicit_ref_point
);
-- ddl-end --
-- object: gen_object_lod3refpnt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod3refpnt_spx CASCADE;
CREATE INDEX gen_object_lod3refpnt_spx ON citydb.generic_cityobject
USING gist
(
lod3_implicit_ref_point
);
-- ddl-end --
-- object: gen_object_lod4refpnt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.gen_object_lod4refpnt_spx CASCADE;
CREATE INDEX gen_object_lod4refpnt_spx ON citydb.generic_cityobject
USING gist
(
lod4_implicit_ref_point
);
-- ddl-end --
-- object: address_to_building_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.address_to_building_fkx CASCADE;
CREATE INDEX address_to_building_fkx ON citydb.address_to_building
USING btree
(
address_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: address_to_building_fkx1 | type: INDEX --
-- DROP INDEX IF EXISTS citydb.address_to_building_fkx1 CASCADE;
CREATE INDEX address_to_building_fkx1 ON citydb.address_to_building
USING btree
(
building_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: building_parent_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_parent_fkx CASCADE;
CREATE INDEX building_parent_fkx ON citydb.building
USING btree
(
building_parent_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: building_root_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_root_fkx CASCADE;
CREATE INDEX building_root_fkx ON citydb.building
USING btree
(
building_root_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: building_lod1terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_lod1terr_spx CASCADE;
CREATE INDEX building_lod1terr_spx ON citydb.building
USING gist
(
lod1_terrain_intersection
);
-- ddl-end --
-- object: building_lod2terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_lod2terr_spx CASCADE;
CREATE INDEX building_lod2terr_spx ON citydb.building
USING gist
(
lod2_terrain_intersection
);
-- ddl-end --
-- object: building_lod3terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_lod3terr_spx CASCADE;
CREATE INDEX building_lod3terr_spx ON citydb.building
USING gist
(
lod3_terrain_intersection
);
-- ddl-end --
-- object: building_lod4terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_lod4terr_spx CASCADE;
CREATE INDEX building_lod4terr_spx ON citydb.building
USING gist
(
lod4_terrain_intersection
);
-- ddl-end --
-- object: building_lod2curve_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_lod2curve_spx CASCADE;
CREATE INDEX building_lod2curve_spx ON citydb.building
USING gist
(
lod2_multi_curve
);
-- ddl-end --
-- object: building_lod3curve_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_lod3curve_spx CASCADE;
CREATE INDEX building_lod3curve_spx ON citydb.building
USING gist
(
lod3_multi_curve
);
-- ddl-end --
-- object: building_lod4curve_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_lod4curve_spx CASCADE;
CREATE INDEX building_lod4curve_spx ON citydb.building
USING gist
(
lod4_multi_curve
);
-- ddl-end --
-- object: building_lod0footprint_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_lod0footprint_fkx CASCADE;
CREATE INDEX building_lod0footprint_fkx ON citydb.building
USING btree
(
lod0_footprint_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: building_lod0roofprint_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_lod0roofprint_fkx CASCADE;
CREATE INDEX building_lod0roofprint_fkx ON citydb.building
USING btree
(
lod0_roofprint_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: building_lod1msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_lod1msrf_fkx CASCADE;
CREATE INDEX building_lod1msrf_fkx ON citydb.building
USING btree
(
lod1_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: building_lod2msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_lod2msrf_fkx CASCADE;
CREATE INDEX building_lod2msrf_fkx ON citydb.building
USING btree
(
lod2_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: building_lod3msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_lod3msrf_fkx CASCADE;
CREATE INDEX building_lod3msrf_fkx ON citydb.building
USING btree
(
lod3_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: building_lod4msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_lod4msrf_fkx CASCADE;
CREATE INDEX building_lod4msrf_fkx ON citydb.building
USING btree
(
lod4_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: building_lod1solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_lod1solid_fkx CASCADE;
CREATE INDEX building_lod1solid_fkx ON citydb.building
USING btree
(
lod1_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: building_lod2solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_lod2solid_fkx CASCADE;
CREATE INDEX building_lod2solid_fkx ON citydb.building
USING btree
(
lod2_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: building_lod3solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_lod3solid_fkx CASCADE;
CREATE INDEX building_lod3solid_fkx ON citydb.building
USING btree
(
lod3_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: building_lod4solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.building_lod4solid_fkx CASCADE;
CREATE INDEX building_lod4solid_fkx ON citydb.building
USING btree
(
lod4_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bldg_furn_room_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_furn_room_fkx CASCADE;
CREATE INDEX bldg_furn_room_fkx ON citydb.building_furniture
USING btree
(
room_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bldg_furn_lod4brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_furn_lod4brep_fkx CASCADE;
CREATE INDEX bldg_furn_lod4brep_fkx ON citydb.building_furniture
USING btree
(
lod4_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bldg_furn_lod4xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_furn_lod4xgeom_spx CASCADE;
CREATE INDEX bldg_furn_lod4xgeom_spx ON citydb.building_furniture
USING gist
(
lod4_other_geom
);
-- ddl-end --
-- object: bldg_furn_lod4impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_furn_lod4impl_fkx CASCADE;
CREATE INDEX bldg_furn_lod4impl_fkx ON citydb.building_furniture
USING btree
(
lod4_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bldg_furn_lod4refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_furn_lod4refpt_spx CASCADE;
CREATE INDEX bldg_furn_lod4refpt_spx ON citydb.building_furniture
USING gist
(
lod4_implicit_ref_point
);
-- ddl-end --
-- object: bldg_inst_objclass_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_inst_objclass_fkx CASCADE;
CREATE INDEX bldg_inst_objclass_fkx ON citydb.building_installation
USING btree
(
objectclass_id ASC NULLS LAST
);
-- ddl-end --
-- object: bldg_inst_building_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_inst_building_fkx CASCADE;
CREATE INDEX bldg_inst_building_fkx ON citydb.building_installation
USING btree
(
building_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bldg_inst_room_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_inst_room_fkx CASCADE;
CREATE INDEX bldg_inst_room_fkx ON citydb.building_installation
USING btree
(
room_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bldg_inst_lod2brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_inst_lod2brep_fkx CASCADE;
CREATE INDEX bldg_inst_lod2brep_fkx ON citydb.building_installation
USING btree
(
lod2_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bldg_inst_lod3brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_inst_lod3brep_fkx CASCADE;
CREATE INDEX bldg_inst_lod3brep_fkx ON citydb.building_installation
USING btree
(
lod3_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bldg_inst_lod4brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_inst_lod4brep_fkx CASCADE;
CREATE INDEX bldg_inst_lod4brep_fkx ON citydb.building_installation
USING btree
(
lod4_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bldg_inst_lod2xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_inst_lod2xgeom_spx CASCADE;
CREATE INDEX bldg_inst_lod2xgeom_spx ON citydb.building_installation
USING gist
(
lod2_other_geom
);
-- ddl-end --
-- object: bldg_inst_lod3xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_inst_lod3xgeom_spx CASCADE;
CREATE INDEX bldg_inst_lod3xgeom_spx ON citydb.building_installation
USING gist
(
lod3_other_geom
);
-- ddl-end --
-- object: bldg_inst_lod4xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_inst_lod4xgeom_spx CASCADE;
CREATE INDEX bldg_inst_lod4xgeom_spx ON citydb.building_installation
USING gist
(
lod4_other_geom
);
-- ddl-end --
-- object: bldg_inst_lod2impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_inst_lod2impl_fkx CASCADE;
CREATE INDEX bldg_inst_lod2impl_fkx ON citydb.building_installation
USING btree
(
lod2_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bldg_inst_lod3impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_inst_lod3impl_fkx CASCADE;
CREATE INDEX bldg_inst_lod3impl_fkx ON citydb.building_installation
USING btree
(
lod3_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bldg_inst_lod4impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_inst_lod4impl_fkx CASCADE;
CREATE INDEX bldg_inst_lod4impl_fkx ON citydb.building_installation
USING btree
(
lod4_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bldg_inst_lod2refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_inst_lod2refpt_spx CASCADE;
CREATE INDEX bldg_inst_lod2refpt_spx ON citydb.building_installation
USING gist
(
lod2_implicit_ref_point
);
-- ddl-end --
-- object: bldg_inst_lod3refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_inst_lod3refpt_spx CASCADE;
CREATE INDEX bldg_inst_lod3refpt_spx ON citydb.building_installation
USING gist
(
lod3_implicit_ref_point
);
-- ddl-end --
-- object: bldg_inst_lod4refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bldg_inst_lod4refpt_spx CASCADE;
CREATE INDEX bldg_inst_lod4refpt_spx ON citydb.building_installation
USING gist
(
lod4_implicit_ref_point
);
-- ddl-end --
-- object: opening_objectclass_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.opening_objectclass_fkx CASCADE;
CREATE INDEX opening_objectclass_fkx ON citydb.opening
USING btree
(
objectclass_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: opening_address_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.opening_address_fkx CASCADE;
CREATE INDEX opening_address_fkx ON citydb.opening
USING btree
(
address_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: opening_lod3msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.opening_lod3msrf_fkx CASCADE;
CREATE INDEX opening_lod3msrf_fkx ON citydb.opening
USING btree
(
lod3_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: opening_lod4msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.opening_lod4msrf_fkx CASCADE;
CREATE INDEX opening_lod4msrf_fkx ON citydb.opening
USING btree
(
lod4_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: opening_lod3impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.opening_lod3impl_fkx CASCADE;
CREATE INDEX opening_lod3impl_fkx ON citydb.opening
USING btree
(
lod3_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: opening_lod4impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.opening_lod4impl_fkx CASCADE;
CREATE INDEX opening_lod4impl_fkx ON citydb.opening
USING btree
(
lod4_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: opening_lod3refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.opening_lod3refpt_spx CASCADE;
CREATE INDEX opening_lod3refpt_spx ON citydb.opening
USING gist
(
lod3_implicit_ref_point
);
-- ddl-end --
-- object: opening_lod4refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.opening_lod4refpt_spx CASCADE;
CREATE INDEX opening_lod4refpt_spx ON citydb.opening
USING gist
(
lod4_implicit_ref_point
);
-- ddl-end --
-- object: open_to_them_surface_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.open_to_them_surface_fkx CASCADE;
CREATE INDEX open_to_them_surface_fkx ON citydb.opening_to_them_surface
USING btree
(
opening_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: open_to_them_surface_fkx1 | type: INDEX --
-- DROP INDEX IF EXISTS citydb.open_to_them_surface_fkx1 CASCADE;
CREATE INDEX open_to_them_surface_fkx1 ON citydb.opening_to_them_surface
USING btree
(
thematic_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: room_building_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.room_building_fkx CASCADE;
CREATE INDEX room_building_fkx ON citydb.room
USING btree
(
building_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: room_lod4msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.room_lod4msrf_fkx CASCADE;
CREATE INDEX room_lod4msrf_fkx ON citydb.room
USING btree
(
lod4_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: room_lod4solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.room_lod4solid_fkx CASCADE;
CREATE INDEX room_lod4solid_fkx ON citydb.room
USING btree
(
lod4_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: them_surface_objclass_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.them_surface_objclass_fkx CASCADE;
CREATE INDEX them_surface_objclass_fkx ON citydb.thematic_surface
USING btree
(
objectclass_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: them_surface_building_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.them_surface_building_fkx CASCADE;
CREATE INDEX them_surface_building_fkx ON citydb.thematic_surface
USING btree
(
building_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: them_surface_room_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.them_surface_room_fkx CASCADE;
CREATE INDEX them_surface_room_fkx ON citydb.thematic_surface
USING btree
(
room_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: them_surface_bldg_inst_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.them_surface_bldg_inst_fkx CASCADE;
CREATE INDEX them_surface_bldg_inst_fkx ON citydb.thematic_surface
USING btree
(
building_installation_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: them_surface_lod2msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.them_surface_lod2msrf_fkx CASCADE;
CREATE INDEX them_surface_lod2msrf_fkx ON citydb.thematic_surface
USING btree
(
lod2_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: them_surface_lod3msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.them_surface_lod3msrf_fkx CASCADE;
CREATE INDEX them_surface_lod3msrf_fkx ON citydb.thematic_surface
USING btree
(
lod3_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: them_surface_lod4msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.them_surface_lod4msrf_fkx CASCADE;
CREATE INDEX them_surface_lod4msrf_fkx ON citydb.thematic_surface
USING btree
(
lod4_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: texparam_geom_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.texparam_geom_fkx CASCADE;
CREATE INDEX texparam_geom_fkx ON citydb.textureparam
USING btree
(
surface_geometry_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: texparam_surface_data_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.texparam_surface_data_fkx CASCADE;
CREATE INDEX texparam_surface_data_fkx ON citydb.textureparam
USING btree
(
surface_data_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: app_to_surf_data_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.app_to_surf_data_fkx CASCADE;
CREATE INDEX app_to_surf_data_fkx ON citydb.appear_to_surface_data
USING btree
(
surface_data_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: app_to_surf_data_fkx1 | type: INDEX --
-- DROP INDEX IF EXISTS citydb.app_to_surf_data_fkx1 CASCADE;
CREATE INDEX app_to_surf_data_fkx1 ON citydb.appear_to_surface_data
USING btree
(
appearance_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: breakline_ridge_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.breakline_ridge_spx CASCADE;
CREATE INDEX breakline_ridge_spx ON citydb.breakline_relief
USING gist
(
ridge_or_valley_lines
);
-- ddl-end --
-- object: breakline_break_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.breakline_break_spx CASCADE;
CREATE INDEX breakline_break_spx ON citydb.breakline_relief
USING gist
(
break_lines
);
-- ddl-end --
-- object: masspoint_relief_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.masspoint_relief_spx CASCADE;
CREATE INDEX masspoint_relief_spx ON citydb.masspoint_relief
USING gist
(
relief_points
);
-- ddl-end --
-- object: relief_comp_objclass_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.relief_comp_objclass_fkx CASCADE;
CREATE INDEX relief_comp_objclass_fkx ON citydb.relief_component
USING btree
(
objectclass_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: relief_comp_extent_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.relief_comp_extent_spx CASCADE;
CREATE INDEX relief_comp_extent_spx ON citydb.relief_component
USING gist
(
extent
);
-- ddl-end --
-- object: rel_feat_to_rel_comp_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.rel_feat_to_rel_comp_fkx CASCADE;
CREATE INDEX rel_feat_to_rel_comp_fkx ON citydb.relief_feat_to_rel_comp
USING btree
(
relief_component_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: rel_feat_to_rel_comp_fkx1 | type: INDEX --
-- DROP INDEX IF EXISTS citydb.rel_feat_to_rel_comp_fkx1 CASCADE;
CREATE INDEX rel_feat_to_rel_comp_fkx1 ON citydb.relief_feat_to_rel_comp
USING btree
(
relief_feature_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tin_relief_geom_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tin_relief_geom_fkx CASCADE;
CREATE INDEX tin_relief_geom_fkx ON citydb.tin_relief
USING btree
(
surface_geometry_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tin_relief_stop_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tin_relief_stop_spx CASCADE;
CREATE INDEX tin_relief_stop_spx ON citydb.tin_relief
USING gist
(
stop_lines
);
-- ddl-end --
-- object: tin_relief_break_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tin_relief_break_spx CASCADE;
CREATE INDEX tin_relief_break_spx ON citydb.tin_relief
USING gist
(
break_lines
);
-- ddl-end --
-- object: tin_relief_crtlpts_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tin_relief_crtlpts_spx CASCADE;
CREATE INDEX tin_relief_crtlpts_spx ON citydb.tin_relief
USING gist
(
control_points
);
-- ddl-end --
-- object: tran_complex_objclass_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tran_complex_objclass_fkx CASCADE;
CREATE INDEX tran_complex_objclass_fkx ON citydb.transportation_complex
USING btree
(
objectclass_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tran_complex_lod0net_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tran_complex_lod0net_spx CASCADE;
CREATE INDEX tran_complex_lod0net_spx ON citydb.transportation_complex
USING gist
(
lod0_network
);
-- ddl-end --
-- object: tran_complex_lod1msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tran_complex_lod1msrf_fkx CASCADE;
CREATE INDEX tran_complex_lod1msrf_fkx ON citydb.transportation_complex
USING btree
(
lod1_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tran_complex_lod2msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tran_complex_lod2msrf_fkx CASCADE;
CREATE INDEX tran_complex_lod2msrf_fkx ON citydb.transportation_complex
USING btree
(
lod2_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tran_complex_lod3msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tran_complex_lod3msrf_fkx CASCADE;
CREATE INDEX tran_complex_lod3msrf_fkx ON citydb.transportation_complex
USING btree
(
lod3_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tran_complex_lod4msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tran_complex_lod4msrf_fkx CASCADE;
CREATE INDEX tran_complex_lod4msrf_fkx ON citydb.transportation_complex
USING btree
(
lod4_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: traffic_area_objclass_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.traffic_area_objclass_fkx CASCADE;
CREATE INDEX traffic_area_objclass_fkx ON citydb.traffic_area
USING btree
(
objectclass_id ASC NULLS LAST
);
-- ddl-end --
-- object: traffic_area_lod2msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.traffic_area_lod2msrf_fkx CASCADE;
CREATE INDEX traffic_area_lod2msrf_fkx ON citydb.traffic_area
USING btree
(
lod2_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: traffic_area_lod3msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.traffic_area_lod3msrf_fkx CASCADE;
CREATE INDEX traffic_area_lod3msrf_fkx ON citydb.traffic_area
USING btree
(
lod3_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: traffic_area_lod4msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.traffic_area_lod4msrf_fkx CASCADE;
CREATE INDEX traffic_area_lod4msrf_fkx ON citydb.traffic_area
USING btree
(
lod4_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: traffic_area_trancmplx_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.traffic_area_trancmplx_fkx CASCADE;
CREATE INDEX traffic_area_trancmplx_fkx ON citydb.traffic_area
USING btree
(
transportation_complex_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: land_use_lod0msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.land_use_lod0msrf_fkx CASCADE;
CREATE INDEX land_use_lod0msrf_fkx ON citydb.land_use
USING btree
(
lod0_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: land_use_lod1msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.land_use_lod1msrf_fkx CASCADE;
CREATE INDEX land_use_lod1msrf_fkx ON citydb.land_use
USING btree
(
lod1_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: land_use_lod2msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.land_use_lod2msrf_fkx CASCADE;
CREATE INDEX land_use_lod2msrf_fkx ON citydb.land_use
USING btree
(
lod2_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: land_use_lod3msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.land_use_lod3msrf_fkx CASCADE;
CREATE INDEX land_use_lod3msrf_fkx ON citydb.land_use
USING btree
(
lod3_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: land_use_lod4msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.land_use_lod4msrf_fkx CASCADE;
CREATE INDEX land_use_lod4msrf_fkx ON citydb.land_use
USING btree
(
lod4_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: plant_cover_lod1msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.plant_cover_lod1msrf_fkx CASCADE;
CREATE INDEX plant_cover_lod1msrf_fkx ON citydb.plant_cover
USING btree
(
lod1_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: plant_cover_lod2msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.plant_cover_lod2msrf_fkx CASCADE;
CREATE INDEX plant_cover_lod2msrf_fkx ON citydb.plant_cover
USING btree
(
lod2_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: plant_cover_lod3msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.plant_cover_lod3msrf_fkx CASCADE;
CREATE INDEX plant_cover_lod3msrf_fkx ON citydb.plant_cover
USING btree
(
lod3_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: plant_cover_lod4msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.plant_cover_lod4msrf_fkx CASCADE;
CREATE INDEX plant_cover_lod4msrf_fkx ON citydb.plant_cover
USING btree
(
lod4_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: plant_cover_lod1msolid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.plant_cover_lod1msolid_fkx CASCADE;
CREATE INDEX plant_cover_lod1msolid_fkx ON citydb.plant_cover
USING btree
(
lod1_multi_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: plant_cover_lod2msolid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.plant_cover_lod2msolid_fkx CASCADE;
CREATE INDEX plant_cover_lod2msolid_fkx ON citydb.plant_cover
USING btree
(
lod2_multi_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: plant_cover_lod3msolid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.plant_cover_lod3msolid_fkx CASCADE;
CREATE INDEX plant_cover_lod3msolid_fkx ON citydb.plant_cover
USING btree
(
lod3_multi_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: plant_cover_lod4msolid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.plant_cover_lod4msolid_fkx CASCADE;
CREATE INDEX plant_cover_lod4msolid_fkx ON citydb.plant_cover
USING btree
(
lod4_multi_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: sol_veg_obj_lod1brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.sol_veg_obj_lod1brep_fkx CASCADE;
CREATE INDEX sol_veg_obj_lod1brep_fkx ON citydb.solitary_vegetat_object
USING btree
(
lod1_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: sol_veg_obj_lod2brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.sol_veg_obj_lod2brep_fkx CASCADE;
CREATE INDEX sol_veg_obj_lod2brep_fkx ON citydb.solitary_vegetat_object
USING btree
(
lod2_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: sol_veg_obj_lod3brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.sol_veg_obj_lod3brep_fkx CASCADE;
CREATE INDEX sol_veg_obj_lod3brep_fkx ON citydb.solitary_vegetat_object
USING btree
(
lod3_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: sol_veg_obj_lod4brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.sol_veg_obj_lod4brep_fkx CASCADE;
CREATE INDEX sol_veg_obj_lod4brep_fkx ON citydb.solitary_vegetat_object
USING btree
(
lod4_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: sol_veg_obj_lod1xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.sol_veg_obj_lod1xgeom_spx CASCADE;
CREATE INDEX sol_veg_obj_lod1xgeom_spx ON citydb.solitary_vegetat_object
USING gist
(
lod1_other_geom
);
-- ddl-end --
-- object: sol_veg_obj_lod2xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.sol_veg_obj_lod2xgeom_spx CASCADE;
CREATE INDEX sol_veg_obj_lod2xgeom_spx ON citydb.solitary_vegetat_object
USING gist
(
lod2_other_geom
);
-- ddl-end --
-- object: sol_veg_obj_lod3xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.sol_veg_obj_lod3xgeom_spx CASCADE;
CREATE INDEX sol_veg_obj_lod3xgeom_spx ON citydb.solitary_vegetat_object
USING gist
(
lod3_other_geom
);
-- ddl-end --
-- object: sol_veg_obj_lod4xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.sol_veg_obj_lod4xgeom_spx CASCADE;
CREATE INDEX sol_veg_obj_lod4xgeom_spx ON citydb.solitary_vegetat_object
USING gist
(
lod4_other_geom
);
-- ddl-end --
-- object: sol_veg_obj_lod1impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.sol_veg_obj_lod1impl_fkx CASCADE;
CREATE INDEX sol_veg_obj_lod1impl_fkx ON citydb.solitary_vegetat_object
USING btree
(
lod1_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: sol_veg_obj_lod2impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.sol_veg_obj_lod2impl_fkx CASCADE;
CREATE INDEX sol_veg_obj_lod2impl_fkx ON citydb.solitary_vegetat_object
USING btree
(
lod2_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: sol_veg_obj_lod3impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.sol_veg_obj_lod3impl_fkx CASCADE;
CREATE INDEX sol_veg_obj_lod3impl_fkx ON citydb.solitary_vegetat_object
USING btree
(
lod3_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: sol_veg_obj_lod4impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.sol_veg_obj_lod4impl_fkx CASCADE;
CREATE INDEX sol_veg_obj_lod4impl_fkx ON citydb.solitary_vegetat_object
USING btree
(
lod4_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: sol_veg_obj_lod1refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.sol_veg_obj_lod1refpt_spx CASCADE;
CREATE INDEX sol_veg_obj_lod1refpt_spx ON citydb.solitary_vegetat_object
USING gist
(
lod1_implicit_ref_point
);
-- ddl-end --
-- object: sol_veg_obj_lod2refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.sol_veg_obj_lod2refpt_spx CASCADE;
CREATE INDEX sol_veg_obj_lod2refpt_spx ON citydb.solitary_vegetat_object
USING gist
(
lod2_implicit_ref_point
);
-- ddl-end --
-- object: sol_veg_obj_lod3refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.sol_veg_obj_lod3refpt_spx CASCADE;
CREATE INDEX sol_veg_obj_lod3refpt_spx ON citydb.solitary_vegetat_object
USING gist
(
lod3_implicit_ref_point
);
-- ddl-end --
-- object: sol_veg_obj_lod4refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.sol_veg_obj_lod4refpt_spx CASCADE;
CREATE INDEX sol_veg_obj_lod4refpt_spx ON citydb.solitary_vegetat_object
USING gist
(
lod4_implicit_ref_point
);
-- ddl-end --
-- object: waterbody_lod0curve_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.waterbody_lod0curve_spx CASCADE;
CREATE INDEX waterbody_lod0curve_spx ON citydb.waterbody
USING gist
(
lod0_multi_curve
);
-- ddl-end --
-- object: waterbody_lod1curve_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.waterbody_lod1curve_spx CASCADE;
CREATE INDEX waterbody_lod1curve_spx ON citydb.waterbody
USING gist
(
lod1_multi_curve
);
-- ddl-end --
-- object: waterbody_lod0msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.waterbody_lod0msrf_fkx CASCADE;
CREATE INDEX waterbody_lod0msrf_fkx ON citydb.waterbody
USING btree
(
lod0_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: waterbody_lod1msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.waterbody_lod1msrf_fkx CASCADE;
CREATE INDEX waterbody_lod1msrf_fkx ON citydb.waterbody
USING btree
(
lod1_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: waterbody_lod1solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.waterbody_lod1solid_fkx CASCADE;
CREATE INDEX waterbody_lod1solid_fkx ON citydb.waterbody
USING btree
(
lod1_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: waterbody_lod2solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.waterbody_lod2solid_fkx CASCADE;
CREATE INDEX waterbody_lod2solid_fkx ON citydb.waterbody
USING btree
(
lod2_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: waterbody_lod3solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.waterbody_lod3solid_fkx CASCADE;
CREATE INDEX waterbody_lod3solid_fkx ON citydb.waterbody
USING btree
(
lod3_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: waterbody_lod4solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.waterbody_lod4solid_fkx CASCADE;
CREATE INDEX waterbody_lod4solid_fkx ON citydb.waterbody
USING btree
(
lod4_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: waterbod_to_waterbnd_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.waterbod_to_waterbnd_fkx CASCADE;
CREATE INDEX waterbod_to_waterbnd_fkx ON citydb.waterbod_to_waterbnd_srf
USING btree
(
waterboundary_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: waterbod_to_waterbnd_fkx1 | type: INDEX --
-- DROP INDEX IF EXISTS citydb.waterbod_to_waterbnd_fkx1 CASCADE;
CREATE INDEX waterbod_to_waterbnd_fkx1 ON citydb.waterbod_to_waterbnd_srf
USING btree
(
waterbody_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: waterbnd_srf_objclass_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.waterbnd_srf_objclass_fkx CASCADE;
CREATE INDEX waterbnd_srf_objclass_fkx ON citydb.waterboundary_surface
USING btree
(
objectclass_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: waterbnd_srf_lod2srf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.waterbnd_srf_lod2srf_fkx CASCADE;
CREATE INDEX waterbnd_srf_lod2srf_fkx ON citydb.waterboundary_surface
USING btree
(
lod2_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: waterbnd_srf_lod3srf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.waterbnd_srf_lod3srf_fkx CASCADE;
CREATE INDEX waterbnd_srf_lod3srf_fkx ON citydb.waterboundary_surface
USING btree
(
lod3_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: waterbnd_srf_lod4srf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.waterbnd_srf_lod4srf_fkx CASCADE;
CREATE INDEX waterbnd_srf_lod4srf_fkx ON citydb.waterboundary_surface
USING btree
(
lod4_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: raster_relief_coverage_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.raster_relief_coverage_fkx CASCADE;
CREATE INDEX raster_relief_coverage_fkx ON citydb.raster_relief
USING btree
(
coverage_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_parent_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_parent_fkx CASCADE;
CREATE INDEX tunnel_parent_fkx ON citydb.tunnel
USING btree
(
tunnel_parent_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_root_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_root_fkx CASCADE;
CREATE INDEX tunnel_root_fkx ON citydb.tunnel
USING btree
(
tunnel_root_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_lod1terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_lod1terr_spx CASCADE;
CREATE INDEX tunnel_lod1terr_spx ON citydb.tunnel
USING gist
(
lod1_terrain_intersection
);
-- ddl-end --
-- object: tunnel_lod2terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_lod2terr_spx CASCADE;
CREATE INDEX tunnel_lod2terr_spx ON citydb.tunnel
USING gist
(
lod2_terrain_intersection
);
-- ddl-end --
-- object: tunnel_lod3terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_lod3terr_spx CASCADE;
CREATE INDEX tunnel_lod3terr_spx ON citydb.tunnel
USING gist
(
lod3_terrain_intersection
);
-- ddl-end --
-- object: tunnel_lod4terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_lod4terr_spx CASCADE;
CREATE INDEX tunnel_lod4terr_spx ON citydb.tunnel
USING gist
(
lod4_terrain_intersection
);
-- ddl-end --
-- object: tunnel_lod2curve_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_lod2curve_spx CASCADE;
CREATE INDEX tunnel_lod2curve_spx ON citydb.tunnel
USING gist
(
lod2_multi_curve
);
-- ddl-end --
-- object: tunnel_lod3curve_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_lod3curve_spx CASCADE;
CREATE INDEX tunnel_lod3curve_spx ON citydb.tunnel
USING gist
(
lod3_multi_curve
);
-- ddl-end --
-- object: tunnel_lod4curve_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_lod4curve_spx CASCADE;
CREATE INDEX tunnel_lod4curve_spx ON citydb.tunnel
USING gist
(
lod4_multi_curve
);
-- ddl-end --
-- object: tunnel_lod1msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_lod1msrf_fkx CASCADE;
CREATE INDEX tunnel_lod1msrf_fkx ON citydb.tunnel
USING btree
(
lod1_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_lod2msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_lod2msrf_fkx CASCADE;
CREATE INDEX tunnel_lod2msrf_fkx ON citydb.tunnel
USING btree
(
lod2_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_lod3msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_lod3msrf_fkx CASCADE;
CREATE INDEX tunnel_lod3msrf_fkx ON citydb.tunnel
USING btree
(
lod3_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_lod4msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_lod4msrf_fkx CASCADE;
CREATE INDEX tunnel_lod4msrf_fkx ON citydb.tunnel
USING btree
(
lod4_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_lod1solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_lod1solid_fkx CASCADE;
CREATE INDEX tunnel_lod1solid_fkx ON citydb.tunnel
USING btree
(
lod1_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_lod2solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_lod2solid_fkx CASCADE;
CREATE INDEX tunnel_lod2solid_fkx ON citydb.tunnel
USING btree
(
lod2_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_lod3solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_lod3solid_fkx CASCADE;
CREATE INDEX tunnel_lod3solid_fkx ON citydb.tunnel
USING btree
(
lod3_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_lod4solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_lod4solid_fkx CASCADE;
CREATE INDEX tunnel_lod4solid_fkx ON citydb.tunnel
USING btree
(
lod4_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tun_open_to_them_srf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tun_open_to_them_srf_fkx CASCADE;
CREATE INDEX tun_open_to_them_srf_fkx ON citydb.tunnel_open_to_them_srf
USING btree
(
tunnel_opening_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tun_open_to_them_srf_fkx1 | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tun_open_to_them_srf_fkx1 CASCADE;
CREATE INDEX tun_open_to_them_srf_fkx1 ON citydb.tunnel_open_to_them_srf
USING btree
(
tunnel_thematic_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tun_hspace_tunnel_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tun_hspace_tunnel_fkx CASCADE;
CREATE INDEX tun_hspace_tunnel_fkx ON citydb.tunnel_hollow_space
USING btree
(
tunnel_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tun_hspace_lod4msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tun_hspace_lod4msrf_fkx CASCADE;
CREATE INDEX tun_hspace_lod4msrf_fkx ON citydb.tunnel_hollow_space
USING btree
(
lod4_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tun_hspace_lod4solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tun_hspace_lod4solid_fkx CASCADE;
CREATE INDEX tun_hspace_lod4solid_fkx ON citydb.tunnel_hollow_space
USING btree
(
lod4_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tun_them_srf_objclass_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tun_them_srf_objclass_fkx CASCADE;
CREATE INDEX tun_them_srf_objclass_fkx ON citydb.tunnel_thematic_surface
USING btree
(
objectclass_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tun_them_srf_tunnel_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tun_them_srf_tunnel_fkx CASCADE;
CREATE INDEX tun_them_srf_tunnel_fkx ON citydb.tunnel_thematic_surface
USING btree
(
tunnel_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tun_them_srf_hspace_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tun_them_srf_hspace_fkx CASCADE;
CREATE INDEX tun_them_srf_hspace_fkx ON citydb.tunnel_thematic_surface
USING btree
(
tunnel_hollow_space_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tun_them_srf_tun_inst_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tun_them_srf_tun_inst_fkx CASCADE;
CREATE INDEX tun_them_srf_tun_inst_fkx ON citydb.tunnel_thematic_surface
USING btree
(
tunnel_installation_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tun_them_srf_lod2msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tun_them_srf_lod2msrf_fkx CASCADE;
CREATE INDEX tun_them_srf_lod2msrf_fkx ON citydb.tunnel_thematic_surface
USING btree
(
lod2_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tun_them_srf_lod3msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tun_them_srf_lod3msrf_fkx CASCADE;
CREATE INDEX tun_them_srf_lod3msrf_fkx ON citydb.tunnel_thematic_surface
USING btree
(
lod3_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tun_them_srf_lod4msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tun_them_srf_lod4msrf_fkx CASCADE;
CREATE INDEX tun_them_srf_lod4msrf_fkx ON citydb.tunnel_thematic_surface
USING btree
(
lod4_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_open_objclass_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_open_objclass_fkx CASCADE;
CREATE INDEX tunnel_open_objclass_fkx ON citydb.tunnel_opening
USING btree
(
objectclass_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_open_lod3msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_open_lod3msrf_fkx CASCADE;
CREATE INDEX tunnel_open_lod3msrf_fkx ON citydb.tunnel_opening
USING btree
(
lod3_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_open_lod4msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_open_lod4msrf_fkx CASCADE;
CREATE INDEX tunnel_open_lod4msrf_fkx ON citydb.tunnel_opening
USING btree
(
lod4_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_open_lod3impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_open_lod3impl_fkx CASCADE;
CREATE INDEX tunnel_open_lod3impl_fkx ON citydb.tunnel_opening
USING btree
(
lod3_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_open_lod4impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_open_lod4impl_fkx CASCADE;
CREATE INDEX tunnel_open_lod4impl_fkx ON citydb.tunnel_opening
USING btree
(
lod4_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_open_lod3refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_open_lod3refpt_spx CASCADE;
CREATE INDEX tunnel_open_lod3refpt_spx ON citydb.tunnel_opening
USING gist
(
lod3_implicit_ref_point
);
-- ddl-end --
-- object: tunnel_open_lod4refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_open_lod4refpt_spx CASCADE;
CREATE INDEX tunnel_open_lod4refpt_spx ON citydb.tunnel_opening
USING gist
(
lod4_implicit_ref_point
);
-- ddl-end --
-- object: tunnel_inst_objclass_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_inst_objclass_fkx CASCADE;
CREATE INDEX tunnel_inst_objclass_fkx ON citydb.tunnel_installation
USING btree
(
objectclass_id ASC NULLS LAST
);
-- ddl-end --
-- object: tunnel_inst_tunnel_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_inst_tunnel_fkx CASCADE;
CREATE INDEX tunnel_inst_tunnel_fkx ON citydb.tunnel_installation
USING btree
(
tunnel_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_inst_hspace_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_inst_hspace_fkx CASCADE;
CREATE INDEX tunnel_inst_hspace_fkx ON citydb.tunnel_installation
USING btree
(
tunnel_hollow_space_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_inst_lod2brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_inst_lod2brep_fkx CASCADE;
CREATE INDEX tunnel_inst_lod2brep_fkx ON citydb.tunnel_installation
USING btree
(
lod2_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_inst_lod3brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_inst_lod3brep_fkx CASCADE;
CREATE INDEX tunnel_inst_lod3brep_fkx ON citydb.tunnel_installation
USING btree
(
lod3_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_inst_lod4brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_inst_lod4brep_fkx CASCADE;
CREATE INDEX tunnel_inst_lod4brep_fkx ON citydb.tunnel_installation
USING btree
(
lod4_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_inst_lod2xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_inst_lod2xgeom_spx CASCADE;
CREATE INDEX tunnel_inst_lod2xgeom_spx ON citydb.tunnel_installation
USING gist
(
lod2_other_geom
);
-- ddl-end --
-- object: tunnel_inst_lod3xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_inst_lod3xgeom_spx CASCADE;
CREATE INDEX tunnel_inst_lod3xgeom_spx ON citydb.tunnel_installation
USING gist
(
lod3_other_geom
);
-- ddl-end --
-- object: tunnel_inst_lod4xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_inst_lod4xgeom_spx CASCADE;
CREATE INDEX tunnel_inst_lod4xgeom_spx ON citydb.tunnel_installation
USING gist
(
lod4_other_geom
);
-- ddl-end --
-- object: tunnel_inst_lod2impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_inst_lod2impl_fkx CASCADE;
CREATE INDEX tunnel_inst_lod2impl_fkx ON citydb.tunnel_installation
USING btree
(
lod2_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_inst_lod3impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_inst_lod3impl_fkx CASCADE;
CREATE INDEX tunnel_inst_lod3impl_fkx ON citydb.tunnel_installation
USING btree
(
lod3_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_inst_lod4impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_inst_lod4impl_fkx CASCADE;
CREATE INDEX tunnel_inst_lod4impl_fkx ON citydb.tunnel_installation
USING btree
(
lod4_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_inst_lod2refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_inst_lod2refpt_spx CASCADE;
CREATE INDEX tunnel_inst_lod2refpt_spx ON citydb.tunnel_installation
USING gist
(
lod2_implicit_ref_point
);
-- ddl-end --
-- object: tunnel_inst_lod3refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_inst_lod3refpt_spx CASCADE;
CREATE INDEX tunnel_inst_lod3refpt_spx ON citydb.tunnel_installation
USING gist
(
lod3_implicit_ref_point
);
-- ddl-end --
-- object: tunnel_inst_lod4refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_inst_lod4refpt_spx CASCADE;
CREATE INDEX tunnel_inst_lod4refpt_spx ON citydb.tunnel_installation
USING gist
(
lod4_implicit_ref_point
);
-- ddl-end --
-- object: tunnel_furn_hspace_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_furn_hspace_fkx CASCADE;
CREATE INDEX tunnel_furn_hspace_fkx ON citydb.tunnel_furniture
USING btree
(
tunnel_hollow_space_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_furn_lod4brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_furn_lod4brep_fkx CASCADE;
CREATE INDEX tunnel_furn_lod4brep_fkx ON citydb.tunnel_furniture
USING btree
(
lod4_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_furn_lod4xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_furn_lod4xgeom_spx CASCADE;
CREATE INDEX tunnel_furn_lod4xgeom_spx ON citydb.tunnel_furniture
USING gist
(
lod4_other_geom
);
-- ddl-end --
-- object: tunnel_furn_lod4impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_furn_lod4impl_fkx CASCADE;
CREATE INDEX tunnel_furn_lod4impl_fkx ON citydb.tunnel_furniture
USING btree
(
lod4_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: tunnel_furn_lod4refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.tunnel_furn_lod4refpt_spx CASCADE;
CREATE INDEX tunnel_furn_lod4refpt_spx ON citydb.tunnel_furniture
USING gist
(
lod4_implicit_ref_point
);
-- ddl-end --
-- object: bridge_parent_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_parent_fkx CASCADE;
CREATE INDEX bridge_parent_fkx ON citydb.bridge
USING btree
(
bridge_parent_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_root_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_root_fkx CASCADE;
CREATE INDEX bridge_root_fkx ON citydb.bridge
USING btree
(
bridge_root_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_lod1terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_lod1terr_spx CASCADE;
CREATE INDEX bridge_lod1terr_spx ON citydb.bridge
USING gist
(
lod1_terrain_intersection
);
-- ddl-end --
-- object: bridge_lod2terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_lod2terr_spx CASCADE;
CREATE INDEX bridge_lod2terr_spx ON citydb.bridge
USING gist
(
lod2_terrain_intersection
);
-- ddl-end --
-- object: bridge_lod3terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_lod3terr_spx CASCADE;
CREATE INDEX bridge_lod3terr_spx ON citydb.bridge
USING gist
(
lod3_terrain_intersection
);
-- ddl-end --
-- object: bridge_lod4terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_lod4terr_spx CASCADE;
CREATE INDEX bridge_lod4terr_spx ON citydb.bridge
USING gist
(
lod4_terrain_intersection
);
-- ddl-end --
-- object: bridge_lod2curve_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_lod2curve_spx CASCADE;
CREATE INDEX bridge_lod2curve_spx ON citydb.bridge
USING gist
(
lod2_multi_curve
);
-- ddl-end --
-- object: bridge_lod3curve_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_lod3curve_spx CASCADE;
CREATE INDEX bridge_lod3curve_spx ON citydb.bridge
USING gist
(
lod3_multi_curve
);
-- ddl-end --
-- object: bridge_lod4curve_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_lod4curve_spx CASCADE;
CREATE INDEX bridge_lod4curve_spx ON citydb.bridge
USING gist
(
lod4_multi_curve
);
-- ddl-end --
-- object: bridge_lod1msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_lod1msrf_fkx CASCADE;
CREATE INDEX bridge_lod1msrf_fkx ON citydb.bridge
USING btree
(
lod1_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_lod2msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_lod2msrf_fkx CASCADE;
CREATE INDEX bridge_lod2msrf_fkx ON citydb.bridge
USING btree
(
lod2_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_lod3msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_lod3msrf_fkx CASCADE;
CREATE INDEX bridge_lod3msrf_fkx ON citydb.bridge
USING btree
(
lod3_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_lod4msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_lod4msrf_fkx CASCADE;
CREATE INDEX bridge_lod4msrf_fkx ON citydb.bridge
USING btree
(
lod4_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_lod1solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_lod1solid_fkx CASCADE;
CREATE INDEX bridge_lod1solid_fkx ON citydb.bridge
USING btree
(
lod1_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_lod2solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_lod2solid_fkx CASCADE;
CREATE INDEX bridge_lod2solid_fkx ON citydb.bridge
USING btree
(
lod2_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_lod3solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_lod3solid_fkx CASCADE;
CREATE INDEX bridge_lod3solid_fkx ON citydb.bridge
USING btree
(
lod3_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_lod4solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_lod4solid_fkx CASCADE;
CREATE INDEX bridge_lod4solid_fkx ON citydb.bridge
USING btree
(
lod4_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_furn_brd_room_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_furn_brd_room_fkx CASCADE;
CREATE INDEX bridge_furn_brd_room_fkx ON citydb.bridge_furniture
USING btree
(
bridge_room_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_furn_lod4brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_furn_lod4brep_fkx CASCADE;
CREATE INDEX bridge_furn_lod4brep_fkx ON citydb.bridge_furniture
USING btree
(
lod4_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_furn_lod4xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_furn_lod4xgeom_spx CASCADE;
CREATE INDEX bridge_furn_lod4xgeom_spx ON citydb.bridge_furniture
USING gist
(
lod4_other_geom
);
-- ddl-end --
-- object: bridge_furn_lod4impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_furn_lod4impl_fkx CASCADE;
CREATE INDEX bridge_furn_lod4impl_fkx ON citydb.bridge_furniture
USING btree
(
lod4_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_furn_lod4refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_furn_lod4refpt_spx CASCADE;
CREATE INDEX bridge_furn_lod4refpt_spx ON citydb.bridge_furniture
USING gist
(
lod4_implicit_ref_point
);
-- ddl-end --
-- object: bridge_inst_objclass_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_inst_objclass_fkx CASCADE;
CREATE INDEX bridge_inst_objclass_fkx ON citydb.bridge_installation
USING btree
(
objectclass_id ASC NULLS LAST
);
-- ddl-end --
-- object: bridge_inst_bridge_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_inst_bridge_fkx CASCADE;
CREATE INDEX bridge_inst_bridge_fkx ON citydb.bridge_installation
USING btree
(
bridge_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_inst_brd_room_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_inst_brd_room_fkx CASCADE;
CREATE INDEX bridge_inst_brd_room_fkx ON citydb.bridge_installation
USING btree
(
bridge_room_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_inst_lod2brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_inst_lod2brep_fkx CASCADE;
CREATE INDEX bridge_inst_lod2brep_fkx ON citydb.bridge_installation
USING btree
(
lod2_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_inst_lod3brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_inst_lod3brep_fkx CASCADE;
CREATE INDEX bridge_inst_lod3brep_fkx ON citydb.bridge_installation
USING btree
(
lod3_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_inst_lod4brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_inst_lod4brep_fkx CASCADE;
CREATE INDEX bridge_inst_lod4brep_fkx ON citydb.bridge_installation
USING btree
(
lod4_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_inst_lod2xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_inst_lod2xgeom_spx CASCADE;
CREATE INDEX bridge_inst_lod2xgeom_spx ON citydb.bridge_installation
USING gist
(
lod2_other_geom
);
-- ddl-end --
-- object: bridge_inst_lod3xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_inst_lod3xgeom_spx CASCADE;
CREATE INDEX bridge_inst_lod3xgeom_spx ON citydb.bridge_installation
USING gist
(
lod3_other_geom
);
-- ddl-end --
-- object: bridge_inst_lod4xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_inst_lod4xgeom_spx CASCADE;
CREATE INDEX bridge_inst_lod4xgeom_spx ON citydb.bridge_installation
USING gist
(
lod4_other_geom
);
-- ddl-end --
-- object: bridge_inst_lod2impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_inst_lod2impl_fkx CASCADE;
CREATE INDEX bridge_inst_lod2impl_fkx ON citydb.bridge_installation
USING btree
(
lod2_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_inst_lod3impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_inst_lod3impl_fkx CASCADE;
CREATE INDEX bridge_inst_lod3impl_fkx ON citydb.bridge_installation
USING btree
(
lod3_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_inst_lod4impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_inst_lod4impl_fkx CASCADE;
CREATE INDEX bridge_inst_lod4impl_fkx ON citydb.bridge_installation
USING btree
(
lod4_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_inst_lod2refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_inst_lod2refpt_spx CASCADE;
CREATE INDEX bridge_inst_lod2refpt_spx ON citydb.bridge_installation
USING gist
(
lod2_implicit_ref_point
);
-- ddl-end --
-- object: bridge_inst_lod3refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_inst_lod3refpt_spx CASCADE;
CREATE INDEX bridge_inst_lod3refpt_spx ON citydb.bridge_installation
USING gist
(
lod3_implicit_ref_point
);
-- ddl-end --
-- object: bridge_inst_lod4refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_inst_lod4refpt_spx CASCADE;
CREATE INDEX bridge_inst_lod4refpt_spx ON citydb.bridge_installation
USING gist
(
lod4_implicit_ref_point
);
-- ddl-end --
-- object: bridge_open_objclass_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_open_objclass_fkx CASCADE;
CREATE INDEX bridge_open_objclass_fkx ON citydb.bridge_opening
USING btree
(
objectclass_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_open_address_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_open_address_fkx CASCADE;
CREATE INDEX bridge_open_address_fkx ON citydb.bridge_opening
USING btree
(
address_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_open_lod3msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_open_lod3msrf_fkx CASCADE;
CREATE INDEX bridge_open_lod3msrf_fkx ON citydb.bridge_opening
USING btree
(
lod3_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_open_lod4msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_open_lod4msrf_fkx CASCADE;
CREATE INDEX bridge_open_lod4msrf_fkx ON citydb.bridge_opening
USING btree
(
lod4_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_open_lod3impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_open_lod3impl_fkx CASCADE;
CREATE INDEX bridge_open_lod3impl_fkx ON citydb.bridge_opening
USING btree
(
lod3_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_open_lod4impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_open_lod4impl_fkx CASCADE;
CREATE INDEX bridge_open_lod4impl_fkx ON citydb.bridge_opening
USING btree
(
lod4_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_open_lod3refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_open_lod3refpt_spx CASCADE;
CREATE INDEX bridge_open_lod3refpt_spx ON citydb.bridge_opening
USING gist
(
lod3_implicit_ref_point
);
-- ddl-end --
-- object: bridge_open_lod4refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_open_lod4refpt_spx CASCADE;
CREATE INDEX bridge_open_lod4refpt_spx ON citydb.bridge_opening
USING gist
(
lod4_implicit_ref_point
);
-- ddl-end --
-- object: brd_open_to_them_srf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.brd_open_to_them_srf_fkx CASCADE;
CREATE INDEX brd_open_to_them_srf_fkx ON citydb.bridge_open_to_them_srf
USING btree
(
bridge_opening_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: brd_open_to_them_srf_fkx1 | type: INDEX --
-- DROP INDEX IF EXISTS citydb.brd_open_to_them_srf_fkx1 CASCADE;
CREATE INDEX brd_open_to_them_srf_fkx1 ON citydb.bridge_open_to_them_srf
USING btree
(
bridge_thematic_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_room_bridge_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_room_bridge_fkx CASCADE;
CREATE INDEX bridge_room_bridge_fkx ON citydb.bridge_room
USING btree
(
bridge_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_room_lod4msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_room_lod4msrf_fkx CASCADE;
CREATE INDEX bridge_room_lod4msrf_fkx ON citydb.bridge_room
USING btree
(
lod4_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_room_lod4solid_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_room_lod4solid_fkx CASCADE;
CREATE INDEX bridge_room_lod4solid_fkx ON citydb.bridge_room
USING btree
(
lod4_solid_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: brd_them_srf_objclass_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.brd_them_srf_objclass_fkx CASCADE;
CREATE INDEX brd_them_srf_objclass_fkx ON citydb.bridge_thematic_surface
USING btree
(
objectclass_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: brd_them_srf_bridge_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.brd_them_srf_bridge_fkx CASCADE;
CREATE INDEX brd_them_srf_bridge_fkx ON citydb.bridge_thematic_surface
USING btree
(
bridge_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: brd_them_srf_brd_room_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.brd_them_srf_brd_room_fkx CASCADE;
CREATE INDEX brd_them_srf_brd_room_fkx ON citydb.bridge_thematic_surface
USING btree
(
bridge_room_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: brd_them_srf_brd_inst_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.brd_them_srf_brd_inst_fkx CASCADE;
CREATE INDEX brd_them_srf_brd_inst_fkx ON citydb.bridge_thematic_surface
USING btree
(
bridge_installation_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: brd_them_srf_brd_const_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.brd_them_srf_brd_const_fkx CASCADE;
CREATE INDEX brd_them_srf_brd_const_fkx ON citydb.bridge_thematic_surface
USING btree
(
bridge_constr_element_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: brd_them_srf_lod2msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.brd_them_srf_lod2msrf_fkx CASCADE;
CREATE INDEX brd_them_srf_lod2msrf_fkx ON citydb.bridge_thematic_surface
USING btree
(
lod2_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: brd_them_srf_lod3msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.brd_them_srf_lod3msrf_fkx CASCADE;
CREATE INDEX brd_them_srf_lod3msrf_fkx ON citydb.bridge_thematic_surface
USING btree
(
lod3_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: brd_them_srf_lod4msrf_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.brd_them_srf_lod4msrf_fkx CASCADE;
CREATE INDEX brd_them_srf_lod4msrf_fkx ON citydb.bridge_thematic_surface
USING btree
(
lod4_multi_surface_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_constr_bridge_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_constr_bridge_fkx CASCADE;
CREATE INDEX bridge_constr_bridge_fkx ON citydb.bridge_constr_element
USING btree
(
bridge_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_constr_lod1terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_constr_lod1terr_spx CASCADE;
CREATE INDEX bridge_constr_lod1terr_spx ON citydb.bridge_constr_element
USING gist
(
lod1_terrain_intersection
);
-- ddl-end --
-- object: bridge_constr_lod2terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_constr_lod2terr_spx CASCADE;
CREATE INDEX bridge_constr_lod2terr_spx ON citydb.bridge_constr_element
USING gist
(
lod2_terrain_intersection
);
-- ddl-end --
-- object: bridge_constr_lod3terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_constr_lod3terr_spx CASCADE;
CREATE INDEX bridge_constr_lod3terr_spx ON citydb.bridge_constr_element
USING gist
(
lod3_terrain_intersection
);
-- ddl-end --
-- object: bridge_constr_lod4terr_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_constr_lod4terr_spx CASCADE;
CREATE INDEX bridge_constr_lod4terr_spx ON citydb.bridge_constr_element
USING gist
(
lod4_terrain_intersection
);
-- ddl-end --
-- object: bridge_constr_lod1brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_constr_lod1brep_fkx CASCADE;
CREATE INDEX bridge_constr_lod1brep_fkx ON citydb.bridge_constr_element
USING btree
(
lod1_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_constr_lod2brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_constr_lod2brep_fkx CASCADE;
CREATE INDEX bridge_constr_lod2brep_fkx ON citydb.bridge_constr_element
USING btree
(
lod2_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_constr_lod3brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_constr_lod3brep_fkx CASCADE;
CREATE INDEX bridge_constr_lod3brep_fkx ON citydb.bridge_constr_element
USING btree
(
lod3_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_constr_lod4brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_constr_lod4brep_fkx CASCADE;
CREATE INDEX bridge_constr_lod4brep_fkx ON citydb.bridge_constr_element
USING btree
(
lod4_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_const_lod1xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_const_lod1xgeom_spx CASCADE;
CREATE INDEX bridge_const_lod1xgeom_spx ON citydb.bridge_constr_element
USING gist
(
lod1_other_geom
);
-- ddl-end --
-- object: bridge_const_lod2xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_const_lod2xgeom_spx CASCADE;
CREATE INDEX bridge_const_lod2xgeom_spx ON citydb.bridge_constr_element
USING gist
(
lod2_other_geom
);
-- ddl-end --
-- object: bridge_const_lod3xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_const_lod3xgeom_spx CASCADE;
CREATE INDEX bridge_const_lod3xgeom_spx ON citydb.bridge_constr_element
USING gist
(
lod3_other_geom
);
-- ddl-end --
-- object: bridge_const_lod4xgeom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_const_lod4xgeom_spx CASCADE;
CREATE INDEX bridge_const_lod4xgeom_spx ON citydb.bridge_constr_element
USING gist
(
lod4_other_geom
);
-- ddl-end --
-- object: bridge_constr_lod1impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_constr_lod1impl_fkx CASCADE;
CREATE INDEX bridge_constr_lod1impl_fkx ON citydb.bridge_constr_element
USING btree
(
lod1_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_constr_lod2impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_constr_lod2impl_fkx CASCADE;
CREATE INDEX bridge_constr_lod2impl_fkx ON citydb.bridge_constr_element
USING btree
(
lod2_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_constr_lod3impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_constr_lod3impl_fkx CASCADE;
CREATE INDEX bridge_constr_lod3impl_fkx ON citydb.bridge_constr_element
USING btree
(
lod3_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_constr_lod4impl_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_constr_lod4impl_fkx CASCADE;
CREATE INDEX bridge_constr_lod4impl_fkx ON citydb.bridge_constr_element
USING btree
(
lod4_implicit_rep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: bridge_const_lod1refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_const_lod1refpt_spx CASCADE;
CREATE INDEX bridge_const_lod1refpt_spx ON citydb.bridge_constr_element
USING gist
(
lod1_implicit_ref_point
);
-- ddl-end --
-- object: bridge_const_lod2refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_const_lod2refpt_spx CASCADE;
CREATE INDEX bridge_const_lod2refpt_spx ON citydb.bridge_constr_element
USING gist
(
lod2_implicit_ref_point
);
-- ddl-end --
-- object: bridge_const_lod3refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_const_lod3refpt_spx CASCADE;
CREATE INDEX bridge_const_lod3refpt_spx ON citydb.bridge_constr_element
USING gist
(
lod3_implicit_ref_point
);
-- ddl-end --
-- object: bridge_const_lod4refpt_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.bridge_const_lod4refpt_spx CASCADE;
CREATE INDEX bridge_const_lod4refpt_spx ON citydb.bridge_constr_element
USING gist
(
lod4_implicit_ref_point
);
-- ddl-end --
-- object: address_to_bridge_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.address_to_bridge_fkx CASCADE;
CREATE INDEX address_to_bridge_fkx ON citydb.address_to_bridge
USING btree
(
address_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: address_to_bridge_fkx1 | type: INDEX --
-- DROP INDEX IF EXISTS citydb.address_to_bridge_fkx1 CASCADE;
CREATE INDEX address_to_bridge_fkx1 ON citydb.address_to_bridge
USING btree
(
bridge_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: cityobject_inx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.cityobject_inx CASCADE;
CREATE INDEX cityobject_inx ON citydb.cityobject
USING btree
(
gmlid ASC NULLS LAST,
gmlid_codespace
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: cityobject_objectclass_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.cityobject_objectclass_fkx CASCADE;
CREATE INDEX cityobject_objectclass_fkx ON citydb.cityobject
USING btree
(
objectclass_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: cityobject_envelope_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.cityobject_envelope_spx CASCADE;
CREATE INDEX cityobject_envelope_spx ON citydb.cityobject
USING gist
(
envelope
);
-- ddl-end --
-- object: appearance_inx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.appearance_inx CASCADE;
CREATE INDEX appearance_inx ON citydb.appearance
USING btree
(
gmlid ASC NULLS LAST,
gmlid_codespace
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: appearance_theme_inx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.appearance_theme_inx CASCADE;
CREATE INDEX appearance_theme_inx ON citydb.appearance
USING btree
(
theme ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: appearance_citymodel_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.appearance_citymodel_fkx CASCADE;
CREATE INDEX appearance_citymodel_fkx ON citydb.appearance
USING btree
(
citymodel_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: appearance_cityobject_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.appearance_cityobject_fkx CASCADE;
CREATE INDEX appearance_cityobject_fkx ON citydb.appearance
USING btree
(
cityobject_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: implicit_geom_ref2lib_inx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.implicit_geom_ref2lib_inx CASCADE;
CREATE INDEX implicit_geom_ref2lib_inx ON citydb.implicit_geometry
USING btree
(
reference_to_library ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: implicit_geom_brep_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.implicit_geom_brep_fkx CASCADE;
CREATE INDEX implicit_geom_brep_fkx ON citydb.implicit_geometry
USING btree
(
relative_brep_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: surface_geom_inx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.surface_geom_inx CASCADE;
CREATE INDEX surface_geom_inx ON citydb.surface_geometry
USING btree
(
gmlid ASC NULLS LAST,
gmlid_codespace
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: surface_geom_parent_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.surface_geom_parent_fkx CASCADE;
CREATE INDEX surface_geom_parent_fkx ON citydb.surface_geometry
USING btree
(
parent_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: surface_geom_root_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.surface_geom_root_fkx CASCADE;
CREATE INDEX surface_geom_root_fkx ON citydb.surface_geometry
USING btree
(
root_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: surface_geom_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.surface_geom_spx CASCADE;
CREATE INDEX surface_geom_spx ON citydb.surface_geometry
USING gist
(
geometry
);
-- ddl-end --
-- object: surface_geom_solid_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.surface_geom_solid_spx CASCADE;
CREATE INDEX surface_geom_solid_spx ON citydb.surface_geometry
USING gist
(
solid_geometry
);
-- ddl-end --
-- object: surface_geom_cityobj_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.surface_geom_cityobj_fkx CASCADE;
CREATE INDEX surface_geom_cityobj_fkx ON citydb.surface_geometry
USING btree
(
cityobject_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: surface_data_inx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.surface_data_inx CASCADE;
CREATE INDEX surface_data_inx ON citydb.surface_data
USING btree
(
gmlid ASC NULLS LAST,
gmlid_codespace
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: surface_data_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.surface_data_spx CASCADE;
CREATE INDEX surface_data_spx ON citydb.surface_data
USING gist
(
gt_reference_point
);
-- ddl-end --
-- object: surface_data_objclass_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.surface_data_objclass_fkx CASCADE;
CREATE INDEX surface_data_objclass_fkx ON citydb.surface_data
USING btree
(
objectclass_id ASC NULLS LAST
);
-- ddl-end --
-- object: surface_data_tex_image_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.surface_data_tex_image_fkx CASCADE;
CREATE INDEX surface_data_tex_image_fkx ON citydb.surface_data
USING btree
(
tex_image_id ASC NULLS LAST
);
-- ddl-end --
-- object: citymodel_inx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.citymodel_inx CASCADE;
CREATE INDEX citymodel_inx ON citydb.citymodel
USING btree
(
gmlid ASC NULLS LAST,
gmlid_codespace
);
-- ddl-end --
-- object: genericattrib_parent_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.genericattrib_parent_fkx CASCADE;
CREATE INDEX genericattrib_parent_fkx ON citydb.cityobject_genericattrib
USING btree
(
parent_genattrib_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: genericattrib_root_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.genericattrib_root_fkx CASCADE;
CREATE INDEX genericattrib_root_fkx ON citydb.cityobject_genericattrib
USING btree
(
root_genattrib_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: genericattrib_geom_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.genericattrib_geom_fkx CASCADE;
CREATE INDEX genericattrib_geom_fkx ON citydb.cityobject_genericattrib
USING btree
(
surface_geometry_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: genericattrib_cityobj_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.genericattrib_cityobj_fkx CASCADE;
CREATE INDEX genericattrib_cityobj_fkx ON citydb.cityobject_genericattrib
USING btree
(
cityobject_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: ext_ref_cityobject_fkx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.ext_ref_cityobject_fkx CASCADE;
CREATE INDEX ext_ref_cityobject_fkx ON citydb.external_reference
USING btree
(
cityobject_id ASC NULLS LAST
) WITH (FILLFACTOR = 90);
-- ddl-end --
-- object: grid_coverage_raster_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.grid_coverage_raster_spx CASCADE;
CREATE INDEX grid_coverage_raster_spx ON citydb.grid_coverage
USING gist
(
(ST_ConvexHull(rasterproperty))
);
-- ddl-end --
-- object: cityobject_lineage_inx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.cityobject_lineage_inx CASCADE;
CREATE INDEX cityobject_lineage_inx ON citydb.cityobject
USING btree
(
lineage ASC NULLS LAST
);
-- ddl-end --
-- object: citymodel_envelope_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.citymodel_envelope_spx CASCADE;
CREATE INDEX citymodel_envelope_spx ON citydb.citymodel
USING gist
(
envelope
);
-- ddl-end --
-- object: address_inx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.address_inx CASCADE;
CREATE INDEX address_inx ON citydb.address
USING btree
(
gmlid ASC NULLS LAST,
gmlid_codespace
);
-- ddl-end --
-- object: address_point_spx | type: INDEX --
-- DROP INDEX IF EXISTS citydb.address_point_spx CASCADE;
CREATE INDEX address_point_spx ON citydb.address
USING gist
(
multi_point
);
-- ddl-end --
-- object: cityobject_member_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.cityobject_member DROP CONSTRAINT IF EXISTS cityobject_member_fk CASCADE;
ALTER TABLE citydb.cityobject_member ADD CONSTRAINT cityobject_member_fk FOREIGN KEY (cityobject_id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: cityobject_member_fk1 | type: CONSTRAINT --
-- ALTER TABLE citydb.cityobject_member DROP CONSTRAINT IF EXISTS cityobject_member_fk1 CASCADE;
ALTER TABLE citydb.cityobject_member ADD CONSTRAINT cityobject_member_fk1 FOREIGN KEY (citymodel_id)
REFERENCES citydb.citymodel (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: general_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.generalization DROP CONSTRAINT IF EXISTS general_cityobject_fk CASCADE;
ALTER TABLE citydb.generalization ADD CONSTRAINT general_cityobject_fk FOREIGN KEY (cityobject_id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: general_generalizes_to_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.generalization DROP CONSTRAINT IF EXISTS general_generalizes_to_fk CASCADE;
ALTER TABLE citydb.generalization ADD CONSTRAINT general_generalizes_to_fk FOREIGN KEY (generalizes_to_id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: group_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.cityobjectgroup DROP CONSTRAINT IF EXISTS group_cityobject_fk CASCADE;
ALTER TABLE citydb.cityobjectgroup ADD CONSTRAINT group_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: group_brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.cityobjectgroup DROP CONSTRAINT IF EXISTS group_brep_fk CASCADE;
ALTER TABLE citydb.cityobjectgroup ADD CONSTRAINT group_brep_fk FOREIGN KEY (brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: group_parent_cityobj_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.cityobjectgroup DROP CONSTRAINT IF EXISTS group_parent_cityobj_fk CASCADE;
ALTER TABLE citydb.cityobjectgroup ADD CONSTRAINT group_parent_cityobj_fk FOREIGN KEY (parent_cityobject_id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: group_to_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.group_to_cityobject DROP CONSTRAINT IF EXISTS group_to_cityobject_fk CASCADE;
ALTER TABLE citydb.group_to_cityobject ADD CONSTRAINT group_to_cityobject_fk FOREIGN KEY (cityobject_id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: group_to_cityobject_fk1 | type: CONSTRAINT --
-- ALTER TABLE citydb.group_to_cityobject DROP CONSTRAINT IF EXISTS group_to_cityobject_fk1 CASCADE;
ALTER TABLE citydb.group_to_cityobject ADD CONSTRAINT group_to_cityobject_fk1 FOREIGN KEY (cityobjectgroup_id)
REFERENCES citydb.cityobjectgroup (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: objectclass_superclass_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.objectclass DROP CONSTRAINT IF EXISTS objectclass_superclass_fk CASCADE;
ALTER TABLE citydb.objectclass ADD CONSTRAINT objectclass_superclass_fk FOREIGN KEY (superclass_id)
REFERENCES citydb.objectclass (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: city_furn_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.city_furniture DROP CONSTRAINT IF EXISTS city_furn_cityobject_fk CASCADE;
ALTER TABLE citydb.city_furniture ADD CONSTRAINT city_furn_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: city_furn_lod1brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.city_furniture DROP CONSTRAINT IF EXISTS city_furn_lod1brep_fk CASCADE;
ALTER TABLE citydb.city_furniture ADD CONSTRAINT city_furn_lod1brep_fk FOREIGN KEY (lod1_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: city_furn_lod2brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.city_furniture DROP CONSTRAINT IF EXISTS city_furn_lod2brep_fk CASCADE;
ALTER TABLE citydb.city_furniture ADD CONSTRAINT city_furn_lod2brep_fk FOREIGN KEY (lod2_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: city_furn_lod3brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.city_furniture DROP CONSTRAINT IF EXISTS city_furn_lod3brep_fk CASCADE;
ALTER TABLE citydb.city_furniture ADD CONSTRAINT city_furn_lod3brep_fk FOREIGN KEY (lod3_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: city_furn_lod4brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.city_furniture DROP CONSTRAINT IF EXISTS city_furn_lod4brep_fk CASCADE;
ALTER TABLE citydb.city_furniture ADD CONSTRAINT city_furn_lod4brep_fk FOREIGN KEY (lod4_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: city_furn_lod1impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.city_furniture DROP CONSTRAINT IF EXISTS city_furn_lod1impl_fk CASCADE;
ALTER TABLE citydb.city_furniture ADD CONSTRAINT city_furn_lod1impl_fk FOREIGN KEY (lod1_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: city_furn_lod2impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.city_furniture DROP CONSTRAINT IF EXISTS city_furn_lod2impl_fk CASCADE;
ALTER TABLE citydb.city_furniture ADD CONSTRAINT city_furn_lod2impl_fk FOREIGN KEY (lod2_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: city_furn_lod3impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.city_furniture DROP CONSTRAINT IF EXISTS city_furn_lod3impl_fk CASCADE;
ALTER TABLE citydb.city_furniture ADD CONSTRAINT city_furn_lod3impl_fk FOREIGN KEY (lod3_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: city_furn_lod4impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.city_furniture DROP CONSTRAINT IF EXISTS city_furn_lod4impl_fk CASCADE;
ALTER TABLE citydb.city_furniture ADD CONSTRAINT city_furn_lod4impl_fk FOREIGN KEY (lod4_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: gen_object_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.generic_cityobject DROP CONSTRAINT IF EXISTS gen_object_cityobject_fk CASCADE;
ALTER TABLE citydb.generic_cityobject ADD CONSTRAINT gen_object_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: gen_object_lod0brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.generic_cityobject DROP CONSTRAINT IF EXISTS gen_object_lod0brep_fk CASCADE;
ALTER TABLE citydb.generic_cityobject ADD CONSTRAINT gen_object_lod0brep_fk FOREIGN KEY (lod0_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: gen_object_lod1brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.generic_cityobject DROP CONSTRAINT IF EXISTS gen_object_lod1brep_fk CASCADE;
ALTER TABLE citydb.generic_cityobject ADD CONSTRAINT gen_object_lod1brep_fk FOREIGN KEY (lod1_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: gen_object_lod2brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.generic_cityobject DROP CONSTRAINT IF EXISTS gen_object_lod2brep_fk CASCADE;
ALTER TABLE citydb.generic_cityobject ADD CONSTRAINT gen_object_lod2brep_fk FOREIGN KEY (lod2_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: gen_object_lod3brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.generic_cityobject DROP CONSTRAINT IF EXISTS gen_object_lod3brep_fk CASCADE;
ALTER TABLE citydb.generic_cityobject ADD CONSTRAINT gen_object_lod3brep_fk FOREIGN KEY (lod3_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: gen_object_lod4brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.generic_cityobject DROP CONSTRAINT IF EXISTS gen_object_lod4brep_fk CASCADE;
ALTER TABLE citydb.generic_cityobject ADD CONSTRAINT gen_object_lod4brep_fk FOREIGN KEY (lod4_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: gen_object_lod0impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.generic_cityobject DROP CONSTRAINT IF EXISTS gen_object_lod0impl_fk CASCADE;
ALTER TABLE citydb.generic_cityobject ADD CONSTRAINT gen_object_lod0impl_fk FOREIGN KEY (lod0_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: gen_object_lod1impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.generic_cityobject DROP CONSTRAINT IF EXISTS gen_object_lod1impl_fk CASCADE;
ALTER TABLE citydb.generic_cityobject ADD CONSTRAINT gen_object_lod1impl_fk FOREIGN KEY (lod1_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: gen_object_lod2impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.generic_cityobject DROP CONSTRAINT IF EXISTS gen_object_lod2impl_fk CASCADE;
ALTER TABLE citydb.generic_cityobject ADD CONSTRAINT gen_object_lod2impl_fk FOREIGN KEY (lod2_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: gen_object_lod3impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.generic_cityobject DROP CONSTRAINT IF EXISTS gen_object_lod3impl_fk CASCADE;
ALTER TABLE citydb.generic_cityobject ADD CONSTRAINT gen_object_lod3impl_fk FOREIGN KEY (lod3_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: gen_object_lod4impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.generic_cityobject DROP CONSTRAINT IF EXISTS gen_object_lod4impl_fk CASCADE;
ALTER TABLE citydb.generic_cityobject ADD CONSTRAINT gen_object_lod4impl_fk FOREIGN KEY (lod4_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: address_to_building_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.address_to_building DROP CONSTRAINT IF EXISTS address_to_building_fk CASCADE;
ALTER TABLE citydb.address_to_building ADD CONSTRAINT address_to_building_fk FOREIGN KEY (address_id)
REFERENCES citydb.address (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: address_to_building_fk1 | type: CONSTRAINT --
-- ALTER TABLE citydb.address_to_building DROP CONSTRAINT IF EXISTS address_to_building_fk1 CASCADE;
ALTER TABLE citydb.address_to_building ADD CONSTRAINT address_to_building_fk1 FOREIGN KEY (building_id)
REFERENCES citydb.building (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: building_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building DROP CONSTRAINT IF EXISTS building_cityobject_fk CASCADE;
ALTER TABLE citydb.building ADD CONSTRAINT building_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: building_parent_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building DROP CONSTRAINT IF EXISTS building_parent_fk CASCADE;
ALTER TABLE citydb.building ADD CONSTRAINT building_parent_fk FOREIGN KEY (building_parent_id)
REFERENCES citydb.building (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: building_root_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building DROP CONSTRAINT IF EXISTS building_root_fk CASCADE;
ALTER TABLE citydb.building ADD CONSTRAINT building_root_fk FOREIGN KEY (building_root_id)
REFERENCES citydb.building (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: building_lod0footprint_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building DROP CONSTRAINT IF EXISTS building_lod0footprint_fk CASCADE;
ALTER TABLE citydb.building ADD CONSTRAINT building_lod0footprint_fk FOREIGN KEY (lod0_footprint_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: building_lod0roofprint_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building DROP CONSTRAINT IF EXISTS building_lod0roofprint_fk CASCADE;
ALTER TABLE citydb.building ADD CONSTRAINT building_lod0roofprint_fk FOREIGN KEY (lod0_roofprint_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: building_lod1msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building DROP CONSTRAINT IF EXISTS building_lod1msrf_fk CASCADE;
ALTER TABLE citydb.building ADD CONSTRAINT building_lod1msrf_fk FOREIGN KEY (lod1_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: building_lod2msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building DROP CONSTRAINT IF EXISTS building_lod2msrf_fk CASCADE;
ALTER TABLE citydb.building ADD CONSTRAINT building_lod2msrf_fk FOREIGN KEY (lod2_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: building_lod3msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building DROP CONSTRAINT IF EXISTS building_lod3msrf_fk CASCADE;
ALTER TABLE citydb.building ADD CONSTRAINT building_lod3msrf_fk FOREIGN KEY (lod3_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: building_lod4msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building DROP CONSTRAINT IF EXISTS building_lod4msrf_fk CASCADE;
ALTER TABLE citydb.building ADD CONSTRAINT building_lod4msrf_fk FOREIGN KEY (lod4_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: building_lod1solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building DROP CONSTRAINT IF EXISTS building_lod1solid_fk CASCADE;
ALTER TABLE citydb.building ADD CONSTRAINT building_lod1solid_fk FOREIGN KEY (lod1_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: building_lod2solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building DROP CONSTRAINT IF EXISTS building_lod2solid_fk CASCADE;
ALTER TABLE citydb.building ADD CONSTRAINT building_lod2solid_fk FOREIGN KEY (lod2_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: building_lod3solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building DROP CONSTRAINT IF EXISTS building_lod3solid_fk CASCADE;
ALTER TABLE citydb.building ADD CONSTRAINT building_lod3solid_fk FOREIGN KEY (lod3_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: building_lod4solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building DROP CONSTRAINT IF EXISTS building_lod4solid_fk CASCADE;
ALTER TABLE citydb.building ADD CONSTRAINT building_lod4solid_fk FOREIGN KEY (lod4_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bldg_furn_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building_furniture DROP CONSTRAINT IF EXISTS bldg_furn_cityobject_fk CASCADE;
ALTER TABLE citydb.building_furniture ADD CONSTRAINT bldg_furn_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bldg_furn_room_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building_furniture DROP CONSTRAINT IF EXISTS bldg_furn_room_fk CASCADE;
ALTER TABLE citydb.building_furniture ADD CONSTRAINT bldg_furn_room_fk FOREIGN KEY (room_id)
REFERENCES citydb.room (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bldg_furn_lod4brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building_furniture DROP CONSTRAINT IF EXISTS bldg_furn_lod4brep_fk CASCADE;
ALTER TABLE citydb.building_furniture ADD CONSTRAINT bldg_furn_lod4brep_fk FOREIGN KEY (lod4_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bldg_furn_lod4impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building_furniture DROP CONSTRAINT IF EXISTS bldg_furn_lod4impl_fk CASCADE;
ALTER TABLE citydb.building_furniture ADD CONSTRAINT bldg_furn_lod4impl_fk FOREIGN KEY (lod4_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bldg_inst_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building_installation DROP CONSTRAINT IF EXISTS bldg_inst_cityobject_fk CASCADE;
ALTER TABLE citydb.building_installation ADD CONSTRAINT bldg_inst_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bldg_inst_objclass_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building_installation DROP CONSTRAINT IF EXISTS bldg_inst_objclass_fk CASCADE;
ALTER TABLE citydb.building_installation ADD CONSTRAINT bldg_inst_objclass_fk FOREIGN KEY (objectclass_id)
REFERENCES citydb.objectclass (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bldg_inst_building_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building_installation DROP CONSTRAINT IF EXISTS bldg_inst_building_fk CASCADE;
ALTER TABLE citydb.building_installation ADD CONSTRAINT bldg_inst_building_fk FOREIGN KEY (building_id)
REFERENCES citydb.building (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bldg_inst_room_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building_installation DROP CONSTRAINT IF EXISTS bldg_inst_room_fk CASCADE;
ALTER TABLE citydb.building_installation ADD CONSTRAINT bldg_inst_room_fk FOREIGN KEY (room_id)
REFERENCES citydb.room (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bldg_inst_lod2brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building_installation DROP CONSTRAINT IF EXISTS bldg_inst_lod2brep_fk CASCADE;
ALTER TABLE citydb.building_installation ADD CONSTRAINT bldg_inst_lod2brep_fk FOREIGN KEY (lod2_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bldg_inst_lod3brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building_installation DROP CONSTRAINT IF EXISTS bldg_inst_lod3brep_fk CASCADE;
ALTER TABLE citydb.building_installation ADD CONSTRAINT bldg_inst_lod3brep_fk FOREIGN KEY (lod3_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bldg_inst_lod4brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building_installation DROP CONSTRAINT IF EXISTS bldg_inst_lod4brep_fk CASCADE;
ALTER TABLE citydb.building_installation ADD CONSTRAINT bldg_inst_lod4brep_fk FOREIGN KEY (lod4_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bldg_inst_lod2impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building_installation DROP CONSTRAINT IF EXISTS bldg_inst_lod2impl_fk CASCADE;
ALTER TABLE citydb.building_installation ADD CONSTRAINT bldg_inst_lod2impl_fk FOREIGN KEY (lod2_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bldg_inst_lod3impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building_installation DROP CONSTRAINT IF EXISTS bldg_inst_lod3impl_fk CASCADE;
ALTER TABLE citydb.building_installation ADD CONSTRAINT bldg_inst_lod3impl_fk FOREIGN KEY (lod3_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bldg_inst_lod4impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.building_installation DROP CONSTRAINT IF EXISTS bldg_inst_lod4impl_fk CASCADE;
ALTER TABLE citydb.building_installation ADD CONSTRAINT bldg_inst_lod4impl_fk FOREIGN KEY (lod4_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: opening_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.opening DROP CONSTRAINT IF EXISTS opening_cityobject_fk CASCADE;
ALTER TABLE citydb.opening ADD CONSTRAINT opening_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: opening_objectclass_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.opening DROP CONSTRAINT IF EXISTS opening_objectclass_fk CASCADE;
ALTER TABLE citydb.opening ADD CONSTRAINT opening_objectclass_fk FOREIGN KEY (objectclass_id)
REFERENCES citydb.objectclass (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: opening_address_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.opening DROP CONSTRAINT IF EXISTS opening_address_fk CASCADE;
ALTER TABLE citydb.opening ADD CONSTRAINT opening_address_fk FOREIGN KEY (address_id)
REFERENCES citydb.address (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: opening_lod3msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.opening DROP CONSTRAINT IF EXISTS opening_lod3msrf_fk CASCADE;
ALTER TABLE citydb.opening ADD CONSTRAINT opening_lod3msrf_fk FOREIGN KEY (lod3_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: opening_lod4msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.opening DROP CONSTRAINT IF EXISTS opening_lod4msrf_fk CASCADE;
ALTER TABLE citydb.opening ADD CONSTRAINT opening_lod4msrf_fk FOREIGN KEY (lod4_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: opening_lod3impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.opening DROP CONSTRAINT IF EXISTS opening_lod3impl_fk CASCADE;
ALTER TABLE citydb.opening ADD CONSTRAINT opening_lod3impl_fk FOREIGN KEY (lod3_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: opening_lod4impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.opening DROP CONSTRAINT IF EXISTS opening_lod4impl_fk CASCADE;
ALTER TABLE citydb.opening ADD CONSTRAINT opening_lod4impl_fk FOREIGN KEY (lod4_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: open_to_them_surface_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.opening_to_them_surface DROP CONSTRAINT IF EXISTS open_to_them_surface_fk CASCADE;
ALTER TABLE citydb.opening_to_them_surface ADD CONSTRAINT open_to_them_surface_fk FOREIGN KEY (opening_id)
REFERENCES citydb.opening (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: open_to_them_surface_fk1 | type: CONSTRAINT --
-- ALTER TABLE citydb.opening_to_them_surface DROP CONSTRAINT IF EXISTS open_to_them_surface_fk1 CASCADE;
ALTER TABLE citydb.opening_to_them_surface ADD CONSTRAINT open_to_them_surface_fk1 FOREIGN KEY (thematic_surface_id)
REFERENCES citydb.thematic_surface (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: room_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.room DROP CONSTRAINT IF EXISTS room_cityobject_fk CASCADE;
ALTER TABLE citydb.room ADD CONSTRAINT room_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: room_building_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.room DROP CONSTRAINT IF EXISTS room_building_fk CASCADE;
ALTER TABLE citydb.room ADD CONSTRAINT room_building_fk FOREIGN KEY (building_id)
REFERENCES citydb.building (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: room_lod4msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.room DROP CONSTRAINT IF EXISTS room_lod4msrf_fk CASCADE;
ALTER TABLE citydb.room ADD CONSTRAINT room_lod4msrf_fk FOREIGN KEY (lod4_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: room_lod4solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.room DROP CONSTRAINT IF EXISTS room_lod4solid_fk CASCADE;
ALTER TABLE citydb.room ADD CONSTRAINT room_lod4solid_fk FOREIGN KEY (lod4_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: them_surface_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.thematic_surface DROP CONSTRAINT IF EXISTS them_surface_cityobject_fk CASCADE;
ALTER TABLE citydb.thematic_surface ADD CONSTRAINT them_surface_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: them_surface_objclass_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.thematic_surface DROP CONSTRAINT IF EXISTS them_surface_objclass_fk CASCADE;
ALTER TABLE citydb.thematic_surface ADD CONSTRAINT them_surface_objclass_fk FOREIGN KEY (objectclass_id)
REFERENCES citydb.objectclass (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: them_surface_building_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.thematic_surface DROP CONSTRAINT IF EXISTS them_surface_building_fk CASCADE;
ALTER TABLE citydb.thematic_surface ADD CONSTRAINT them_surface_building_fk FOREIGN KEY (building_id)
REFERENCES citydb.building (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: them_surface_room_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.thematic_surface DROP CONSTRAINT IF EXISTS them_surface_room_fk CASCADE;
ALTER TABLE citydb.thematic_surface ADD CONSTRAINT them_surface_room_fk FOREIGN KEY (room_id)
REFERENCES citydb.room (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: them_surface_bldg_inst_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.thematic_surface DROP CONSTRAINT IF EXISTS them_surface_bldg_inst_fk CASCADE;
ALTER TABLE citydb.thematic_surface ADD CONSTRAINT them_surface_bldg_inst_fk FOREIGN KEY (building_installation_id)
REFERENCES citydb.building_installation (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: them_surface_lod2msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.thematic_surface DROP CONSTRAINT IF EXISTS them_surface_lod2msrf_fk CASCADE;
ALTER TABLE citydb.thematic_surface ADD CONSTRAINT them_surface_lod2msrf_fk FOREIGN KEY (lod2_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: them_surface_lod3msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.thematic_surface DROP CONSTRAINT IF EXISTS them_surface_lod3msrf_fk CASCADE;
ALTER TABLE citydb.thematic_surface ADD CONSTRAINT them_surface_lod3msrf_fk FOREIGN KEY (lod3_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: them_surface_lod4msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.thematic_surface DROP CONSTRAINT IF EXISTS them_surface_lod4msrf_fk CASCADE;
ALTER TABLE citydb.thematic_surface ADD CONSTRAINT them_surface_lod4msrf_fk FOREIGN KEY (lod4_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: texparam_geom_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.textureparam DROP CONSTRAINT IF EXISTS texparam_geom_fk CASCADE;
ALTER TABLE citydb.textureparam ADD CONSTRAINT texparam_geom_fk FOREIGN KEY (surface_geometry_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: texparam_surface_data_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.textureparam DROP CONSTRAINT IF EXISTS texparam_surface_data_fk CASCADE;
ALTER TABLE citydb.textureparam ADD CONSTRAINT texparam_surface_data_fk FOREIGN KEY (surface_data_id)
REFERENCES citydb.surface_data (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: app_to_surf_data_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.appear_to_surface_data DROP CONSTRAINT IF EXISTS app_to_surf_data_fk CASCADE;
ALTER TABLE citydb.appear_to_surface_data ADD CONSTRAINT app_to_surf_data_fk FOREIGN KEY (surface_data_id)
REFERENCES citydb.surface_data (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: app_to_surf_data_fk1 | type: CONSTRAINT --
-- ALTER TABLE citydb.appear_to_surface_data DROP CONSTRAINT IF EXISTS app_to_surf_data_fk1 CASCADE;
ALTER TABLE citydb.appear_to_surface_data ADD CONSTRAINT app_to_surf_data_fk1 FOREIGN KEY (appearance_id)
REFERENCES citydb.appearance (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: breakline_relief_comp_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.breakline_relief DROP CONSTRAINT IF EXISTS breakline_relief_comp_fk CASCADE;
ALTER TABLE citydb.breakline_relief ADD CONSTRAINT breakline_relief_comp_fk FOREIGN KEY (id)
REFERENCES citydb.relief_component (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: masspoint_relief_comp_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.masspoint_relief DROP CONSTRAINT IF EXISTS masspoint_relief_comp_fk CASCADE;
ALTER TABLE citydb.masspoint_relief ADD CONSTRAINT masspoint_relief_comp_fk FOREIGN KEY (id)
REFERENCES citydb.relief_component (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: relief_comp_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.relief_component DROP CONSTRAINT IF EXISTS relief_comp_cityobject_fk CASCADE;
ALTER TABLE citydb.relief_component ADD CONSTRAINT relief_comp_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: relief_comp_objclass_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.relief_component DROP CONSTRAINT IF EXISTS relief_comp_objclass_fk CASCADE;
ALTER TABLE citydb.relief_component ADD CONSTRAINT relief_comp_objclass_fk FOREIGN KEY (objectclass_id)
REFERENCES citydb.objectclass (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: rel_feat_to_rel_comp_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.relief_feat_to_rel_comp DROP CONSTRAINT IF EXISTS rel_feat_to_rel_comp_fk CASCADE;
ALTER TABLE citydb.relief_feat_to_rel_comp ADD CONSTRAINT rel_feat_to_rel_comp_fk FOREIGN KEY (relief_component_id)
REFERENCES citydb.relief_component (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: rel_feat_to_rel_comp_fk1 | type: CONSTRAINT --
-- ALTER TABLE citydb.relief_feat_to_rel_comp DROP CONSTRAINT IF EXISTS rel_feat_to_rel_comp_fk1 CASCADE;
ALTER TABLE citydb.relief_feat_to_rel_comp ADD CONSTRAINT rel_feat_to_rel_comp_fk1 FOREIGN KEY (relief_feature_id)
REFERENCES citydb.relief_feature (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: relief_feat_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.relief_feature DROP CONSTRAINT IF EXISTS relief_feat_cityobject_fk CASCADE;
ALTER TABLE citydb.relief_feature ADD CONSTRAINT relief_feat_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tin_relief_comp_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tin_relief DROP CONSTRAINT IF EXISTS tin_relief_comp_fk CASCADE;
ALTER TABLE citydb.tin_relief ADD CONSTRAINT tin_relief_comp_fk FOREIGN KEY (id)
REFERENCES citydb.relief_component (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tin_relief_geom_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tin_relief DROP CONSTRAINT IF EXISTS tin_relief_geom_fk CASCADE;
ALTER TABLE citydb.tin_relief ADD CONSTRAINT tin_relief_geom_fk FOREIGN KEY (surface_geometry_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tran_complex_objclass_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.transportation_complex DROP CONSTRAINT IF EXISTS tran_complex_objclass_fk CASCADE;
ALTER TABLE citydb.transportation_complex ADD CONSTRAINT tran_complex_objclass_fk FOREIGN KEY (objectclass_id)
REFERENCES citydb.objectclass (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tran_complex_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.transportation_complex DROP CONSTRAINT IF EXISTS tran_complex_cityobject_fk CASCADE;
ALTER TABLE citydb.transportation_complex ADD CONSTRAINT tran_complex_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tran_complex_lod1msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.transportation_complex DROP CONSTRAINT IF EXISTS tran_complex_lod1msrf_fk CASCADE;
ALTER TABLE citydb.transportation_complex ADD CONSTRAINT tran_complex_lod1msrf_fk FOREIGN KEY (lod1_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tran_complex_lod2msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.transportation_complex DROP CONSTRAINT IF EXISTS tran_complex_lod2msrf_fk CASCADE;
ALTER TABLE citydb.transportation_complex ADD CONSTRAINT tran_complex_lod2msrf_fk FOREIGN KEY (lod2_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tran_complex_lod3msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.transportation_complex DROP CONSTRAINT IF EXISTS tran_complex_lod3msrf_fk CASCADE;
ALTER TABLE citydb.transportation_complex ADD CONSTRAINT tran_complex_lod3msrf_fk FOREIGN KEY (lod3_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tran_complex_lod4msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.transportation_complex DROP CONSTRAINT IF EXISTS tran_complex_lod4msrf_fk CASCADE;
ALTER TABLE citydb.transportation_complex ADD CONSTRAINT tran_complex_lod4msrf_fk FOREIGN KEY (lod4_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: traffic_area_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.traffic_area DROP CONSTRAINT IF EXISTS traffic_area_cityobject_fk CASCADE;
ALTER TABLE citydb.traffic_area ADD CONSTRAINT traffic_area_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: traffic_area_objclass_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.traffic_area DROP CONSTRAINT IF EXISTS traffic_area_objclass_fk CASCADE;
ALTER TABLE citydb.traffic_area ADD CONSTRAINT traffic_area_objclass_fk FOREIGN KEY (objectclass_id)
REFERENCES citydb.objectclass (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: traffic_area_lod2msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.traffic_area DROP CONSTRAINT IF EXISTS traffic_area_lod2msrf_fk CASCADE;
ALTER TABLE citydb.traffic_area ADD CONSTRAINT traffic_area_lod2msrf_fk FOREIGN KEY (lod2_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: traffic_area_lod3msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.traffic_area DROP CONSTRAINT IF EXISTS traffic_area_lod3msrf_fk CASCADE;
ALTER TABLE citydb.traffic_area ADD CONSTRAINT traffic_area_lod3msrf_fk FOREIGN KEY (lod3_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: traffic_area_lod4msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.traffic_area DROP CONSTRAINT IF EXISTS traffic_area_lod4msrf_fk CASCADE;
ALTER TABLE citydb.traffic_area ADD CONSTRAINT traffic_area_lod4msrf_fk FOREIGN KEY (lod4_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: traffic_area_trancmplx_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.traffic_area DROP CONSTRAINT IF EXISTS traffic_area_trancmplx_fk CASCADE;
ALTER TABLE citydb.traffic_area ADD CONSTRAINT traffic_area_trancmplx_fk FOREIGN KEY (transportation_complex_id)
REFERENCES citydb.transportation_complex (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: land_use_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.land_use DROP CONSTRAINT IF EXISTS land_use_cityobject_fk CASCADE;
ALTER TABLE citydb.land_use ADD CONSTRAINT land_use_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: land_use_lod0msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.land_use DROP CONSTRAINT IF EXISTS land_use_lod0msrf_fk CASCADE;
ALTER TABLE citydb.land_use ADD CONSTRAINT land_use_lod0msrf_fk FOREIGN KEY (lod0_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: land_use_lod1msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.land_use DROP CONSTRAINT IF EXISTS land_use_lod1msrf_fk CASCADE;
ALTER TABLE citydb.land_use ADD CONSTRAINT land_use_lod1msrf_fk FOREIGN KEY (lod1_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: land_use_lod2msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.land_use DROP CONSTRAINT IF EXISTS land_use_lod2msrf_fk CASCADE;
ALTER TABLE citydb.land_use ADD CONSTRAINT land_use_lod2msrf_fk FOREIGN KEY (lod2_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: land_use_lod3msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.land_use DROP CONSTRAINT IF EXISTS land_use_lod3msrf_fk CASCADE;
ALTER TABLE citydb.land_use ADD CONSTRAINT land_use_lod3msrf_fk FOREIGN KEY (lod3_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: land_use_lod4msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.land_use DROP CONSTRAINT IF EXISTS land_use_lod4msrf_fk CASCADE;
ALTER TABLE citydb.land_use ADD CONSTRAINT land_use_lod4msrf_fk FOREIGN KEY (lod4_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: plant_cover_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.plant_cover DROP CONSTRAINT IF EXISTS plant_cover_cityobject_fk CASCADE;
ALTER TABLE citydb.plant_cover ADD CONSTRAINT plant_cover_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: plant_cover_lod1msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.plant_cover DROP CONSTRAINT IF EXISTS plant_cover_lod1msrf_fk CASCADE;
ALTER TABLE citydb.plant_cover ADD CONSTRAINT plant_cover_lod1msrf_fk FOREIGN KEY (lod1_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: plant_cover_lod2msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.plant_cover DROP CONSTRAINT IF EXISTS plant_cover_lod2msrf_fk CASCADE;
ALTER TABLE citydb.plant_cover ADD CONSTRAINT plant_cover_lod2msrf_fk FOREIGN KEY (lod2_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: plant_cover_lod3msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.plant_cover DROP CONSTRAINT IF EXISTS plant_cover_lod3msrf_fk CASCADE;
ALTER TABLE citydb.plant_cover ADD CONSTRAINT plant_cover_lod3msrf_fk FOREIGN KEY (lod3_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: plant_cover_lod4msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.plant_cover DROP CONSTRAINT IF EXISTS plant_cover_lod4msrf_fk CASCADE;
ALTER TABLE citydb.plant_cover ADD CONSTRAINT plant_cover_lod4msrf_fk FOREIGN KEY (lod4_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: plant_cover_lod1msolid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.plant_cover DROP CONSTRAINT IF EXISTS plant_cover_lod1msolid_fk CASCADE;
ALTER TABLE citydb.plant_cover ADD CONSTRAINT plant_cover_lod1msolid_fk FOREIGN KEY (lod1_multi_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: plant_cover_lod2msolid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.plant_cover DROP CONSTRAINT IF EXISTS plant_cover_lod2msolid_fk CASCADE;
ALTER TABLE citydb.plant_cover ADD CONSTRAINT plant_cover_lod2msolid_fk FOREIGN KEY (lod2_multi_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: plant_cover_lod3msolid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.plant_cover DROP CONSTRAINT IF EXISTS plant_cover_lod3msolid_fk CASCADE;
ALTER TABLE citydb.plant_cover ADD CONSTRAINT plant_cover_lod3msolid_fk FOREIGN KEY (lod3_multi_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: plant_cover_lod4msolid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.plant_cover DROP CONSTRAINT IF EXISTS plant_cover_lod4msolid_fk CASCADE;
ALTER TABLE citydb.plant_cover ADD CONSTRAINT plant_cover_lod4msolid_fk FOREIGN KEY (lod4_multi_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: sol_veg_obj_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.solitary_vegetat_object DROP CONSTRAINT IF EXISTS sol_veg_obj_cityobject_fk CASCADE;
ALTER TABLE citydb.solitary_vegetat_object ADD CONSTRAINT sol_veg_obj_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: sol_veg_obj_lod1brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.solitary_vegetat_object DROP CONSTRAINT IF EXISTS sol_veg_obj_lod1brep_fk CASCADE;
ALTER TABLE citydb.solitary_vegetat_object ADD CONSTRAINT sol_veg_obj_lod1brep_fk FOREIGN KEY (lod1_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: sol_veg_obj_lod2brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.solitary_vegetat_object DROP CONSTRAINT IF EXISTS sol_veg_obj_lod2brep_fk CASCADE;
ALTER TABLE citydb.solitary_vegetat_object ADD CONSTRAINT sol_veg_obj_lod2brep_fk FOREIGN KEY (lod2_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: sol_veg_obj_lod3brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.solitary_vegetat_object DROP CONSTRAINT IF EXISTS sol_veg_obj_lod3brep_fk CASCADE;
ALTER TABLE citydb.solitary_vegetat_object ADD CONSTRAINT sol_veg_obj_lod3brep_fk FOREIGN KEY (lod3_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: sol_veg_obj_lod4brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.solitary_vegetat_object DROP CONSTRAINT IF EXISTS sol_veg_obj_lod4brep_fk CASCADE;
ALTER TABLE citydb.solitary_vegetat_object ADD CONSTRAINT sol_veg_obj_lod4brep_fk FOREIGN KEY (lod4_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: sol_veg_obj_lod1impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.solitary_vegetat_object DROP CONSTRAINT IF EXISTS sol_veg_obj_lod1impl_fk CASCADE;
ALTER TABLE citydb.solitary_vegetat_object ADD CONSTRAINT sol_veg_obj_lod1impl_fk FOREIGN KEY (lod1_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: sol_veg_obj_lod2impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.solitary_vegetat_object DROP CONSTRAINT IF EXISTS sol_veg_obj_lod2impl_fk CASCADE;
ALTER TABLE citydb.solitary_vegetat_object ADD CONSTRAINT sol_veg_obj_lod2impl_fk FOREIGN KEY (lod2_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: sol_veg_obj_lod3impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.solitary_vegetat_object DROP CONSTRAINT IF EXISTS sol_veg_obj_lod3impl_fk CASCADE;
ALTER TABLE citydb.solitary_vegetat_object ADD CONSTRAINT sol_veg_obj_lod3impl_fk FOREIGN KEY (lod3_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: sol_veg_obj_lod4impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.solitary_vegetat_object DROP CONSTRAINT IF EXISTS sol_veg_obj_lod4impl_fk CASCADE;
ALTER TABLE citydb.solitary_vegetat_object ADD CONSTRAINT sol_veg_obj_lod4impl_fk FOREIGN KEY (lod4_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: waterbody_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.waterbody DROP CONSTRAINT IF EXISTS waterbody_cityobject_fk CASCADE;
ALTER TABLE citydb.waterbody ADD CONSTRAINT waterbody_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: waterbody_lod0msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.waterbody DROP CONSTRAINT IF EXISTS waterbody_lod0msrf_fk CASCADE;
ALTER TABLE citydb.waterbody ADD CONSTRAINT waterbody_lod0msrf_fk FOREIGN KEY (lod0_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: waterbody_lod1msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.waterbody DROP CONSTRAINT IF EXISTS waterbody_lod1msrf_fk CASCADE;
ALTER TABLE citydb.waterbody ADD CONSTRAINT waterbody_lod1msrf_fk FOREIGN KEY (lod1_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: waterbody_lod1solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.waterbody DROP CONSTRAINT IF EXISTS waterbody_lod1solid_fk CASCADE;
ALTER TABLE citydb.waterbody ADD CONSTRAINT waterbody_lod1solid_fk FOREIGN KEY (lod1_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: waterbody_lod2solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.waterbody DROP CONSTRAINT IF EXISTS waterbody_lod2solid_fk CASCADE;
ALTER TABLE citydb.waterbody ADD CONSTRAINT waterbody_lod2solid_fk FOREIGN KEY (lod2_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: waterbody_lod3solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.waterbody DROP CONSTRAINT IF EXISTS waterbody_lod3solid_fk CASCADE;
ALTER TABLE citydb.waterbody ADD CONSTRAINT waterbody_lod3solid_fk FOREIGN KEY (lod3_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: waterbody_lod4solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.waterbody DROP CONSTRAINT IF EXISTS waterbody_lod4solid_fk CASCADE;
ALTER TABLE citydb.waterbody ADD CONSTRAINT waterbody_lod4solid_fk FOREIGN KEY (lod4_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: waterbod_to_waterbnd_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.waterbod_to_waterbnd_srf DROP CONSTRAINT IF EXISTS waterbod_to_waterbnd_fk CASCADE;
ALTER TABLE citydb.waterbod_to_waterbnd_srf ADD CONSTRAINT waterbod_to_waterbnd_fk FOREIGN KEY (waterboundary_surface_id)
REFERENCES citydb.waterboundary_surface (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: waterbod_to_waterbnd_fk1 | type: CONSTRAINT --
-- ALTER TABLE citydb.waterbod_to_waterbnd_srf DROP CONSTRAINT IF EXISTS waterbod_to_waterbnd_fk1 CASCADE;
ALTER TABLE citydb.waterbod_to_waterbnd_srf ADD CONSTRAINT waterbod_to_waterbnd_fk1 FOREIGN KEY (waterbody_id)
REFERENCES citydb.waterbody (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: waterbnd_srf_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.waterboundary_surface DROP CONSTRAINT IF EXISTS waterbnd_srf_cityobject_fk CASCADE;
ALTER TABLE citydb.waterboundary_surface ADD CONSTRAINT waterbnd_srf_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: waterbnd_srf_objclass_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.waterboundary_surface DROP CONSTRAINT IF EXISTS waterbnd_srf_objclass_fk CASCADE;
ALTER TABLE citydb.waterboundary_surface ADD CONSTRAINT waterbnd_srf_objclass_fk FOREIGN KEY (objectclass_id)
REFERENCES citydb.objectclass (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: waterbnd_srf_lod2srf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.waterboundary_surface DROP CONSTRAINT IF EXISTS waterbnd_srf_lod2srf_fk CASCADE;
ALTER TABLE citydb.waterboundary_surface ADD CONSTRAINT waterbnd_srf_lod2srf_fk FOREIGN KEY (lod2_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: waterbnd_srf_lod3srf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.waterboundary_surface DROP CONSTRAINT IF EXISTS waterbnd_srf_lod3srf_fk CASCADE;
ALTER TABLE citydb.waterboundary_surface ADD CONSTRAINT waterbnd_srf_lod3srf_fk FOREIGN KEY (lod3_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: waterbnd_srf_lod4srf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.waterboundary_surface DROP CONSTRAINT IF EXISTS waterbnd_srf_lod4srf_fk CASCADE;
ALTER TABLE citydb.waterboundary_surface ADD CONSTRAINT waterbnd_srf_lod4srf_fk FOREIGN KEY (lod4_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: raster_relief_comp_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.raster_relief DROP CONSTRAINT IF EXISTS raster_relief_comp_fk CASCADE;
ALTER TABLE citydb.raster_relief ADD CONSTRAINT raster_relief_comp_fk FOREIGN KEY (id)
REFERENCES citydb.relief_component (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: raster_relief_coverage_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.raster_relief DROP CONSTRAINT IF EXISTS raster_relief_coverage_fk CASCADE;
ALTER TABLE citydb.raster_relief ADD CONSTRAINT raster_relief_coverage_fk FOREIGN KEY (coverage_id)
REFERENCES citydb.grid_coverage (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel DROP CONSTRAINT IF EXISTS tunnel_cityobject_fk CASCADE;
ALTER TABLE citydb.tunnel ADD CONSTRAINT tunnel_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_parent_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel DROP CONSTRAINT IF EXISTS tunnel_parent_fk CASCADE;
ALTER TABLE citydb.tunnel ADD CONSTRAINT tunnel_parent_fk FOREIGN KEY (tunnel_parent_id)
REFERENCES citydb.tunnel (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_root_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel DROP CONSTRAINT IF EXISTS tunnel_root_fk CASCADE;
ALTER TABLE citydb.tunnel ADD CONSTRAINT tunnel_root_fk FOREIGN KEY (tunnel_root_id)
REFERENCES citydb.tunnel (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_lod1msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel DROP CONSTRAINT IF EXISTS tunnel_lod1msrf_fk CASCADE;
ALTER TABLE citydb.tunnel ADD CONSTRAINT tunnel_lod1msrf_fk FOREIGN KEY (lod1_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_lod2msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel DROP CONSTRAINT IF EXISTS tunnel_lod2msrf_fk CASCADE;
ALTER TABLE citydb.tunnel ADD CONSTRAINT tunnel_lod2msrf_fk FOREIGN KEY (lod2_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_lod3msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel DROP CONSTRAINT IF EXISTS tunnel_lod3msrf_fk CASCADE;
ALTER TABLE citydb.tunnel ADD CONSTRAINT tunnel_lod3msrf_fk FOREIGN KEY (lod3_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_lod4msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel DROP CONSTRAINT IF EXISTS tunnel_lod4msrf_fk CASCADE;
ALTER TABLE citydb.tunnel ADD CONSTRAINT tunnel_lod4msrf_fk FOREIGN KEY (lod4_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_lod1solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel DROP CONSTRAINT IF EXISTS tunnel_lod1solid_fk CASCADE;
ALTER TABLE citydb.tunnel ADD CONSTRAINT tunnel_lod1solid_fk FOREIGN KEY (lod1_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_lod2solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel DROP CONSTRAINT IF EXISTS tunnel_lod2solid_fk CASCADE;
ALTER TABLE citydb.tunnel ADD CONSTRAINT tunnel_lod2solid_fk FOREIGN KEY (lod2_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_lod3solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel DROP CONSTRAINT IF EXISTS tunnel_lod3solid_fk CASCADE;
ALTER TABLE citydb.tunnel ADD CONSTRAINT tunnel_lod3solid_fk FOREIGN KEY (lod3_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_lod4solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel DROP CONSTRAINT IF EXISTS tunnel_lod4solid_fk CASCADE;
ALTER TABLE citydb.tunnel ADD CONSTRAINT tunnel_lod4solid_fk FOREIGN KEY (lod4_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tun_open_to_them_srf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_open_to_them_srf DROP CONSTRAINT IF EXISTS tun_open_to_them_srf_fk CASCADE;
ALTER TABLE citydb.tunnel_open_to_them_srf ADD CONSTRAINT tun_open_to_them_srf_fk FOREIGN KEY (tunnel_opening_id)
REFERENCES citydb.tunnel_opening (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tun_open_to_them_srf_fk1 | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_open_to_them_srf DROP CONSTRAINT IF EXISTS tun_open_to_them_srf_fk1 CASCADE;
ALTER TABLE citydb.tunnel_open_to_them_srf ADD CONSTRAINT tun_open_to_them_srf_fk1 FOREIGN KEY (tunnel_thematic_surface_id)
REFERENCES citydb.tunnel_thematic_surface (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tun_hspace_cityobj_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_hollow_space DROP CONSTRAINT IF EXISTS tun_hspace_cityobj_fk CASCADE;
ALTER TABLE citydb.tunnel_hollow_space ADD CONSTRAINT tun_hspace_cityobj_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tun_hspace_tunnel_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_hollow_space DROP CONSTRAINT IF EXISTS tun_hspace_tunnel_fk CASCADE;
ALTER TABLE citydb.tunnel_hollow_space ADD CONSTRAINT tun_hspace_tunnel_fk FOREIGN KEY (tunnel_id)
REFERENCES citydb.tunnel (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tun_hspace_lod4msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_hollow_space DROP CONSTRAINT IF EXISTS tun_hspace_lod4msrf_fk CASCADE;
ALTER TABLE citydb.tunnel_hollow_space ADD CONSTRAINT tun_hspace_lod4msrf_fk FOREIGN KEY (lod4_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tun_hspace_lod4solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_hollow_space DROP CONSTRAINT IF EXISTS tun_hspace_lod4solid_fk CASCADE;
ALTER TABLE citydb.tunnel_hollow_space ADD CONSTRAINT tun_hspace_lod4solid_fk FOREIGN KEY (lod4_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tun_them_srf_cityobj_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_thematic_surface DROP CONSTRAINT IF EXISTS tun_them_srf_cityobj_fk CASCADE;
ALTER TABLE citydb.tunnel_thematic_surface ADD CONSTRAINT tun_them_srf_cityobj_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tun_them_srf_objclass_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_thematic_surface DROP CONSTRAINT IF EXISTS tun_them_srf_objclass_fk CASCADE;
ALTER TABLE citydb.tunnel_thematic_surface ADD CONSTRAINT tun_them_srf_objclass_fk FOREIGN KEY (objectclass_id)
REFERENCES citydb.objectclass (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tun_them_srf_tunnel_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_thematic_surface DROP CONSTRAINT IF EXISTS tun_them_srf_tunnel_fk CASCADE;
ALTER TABLE citydb.tunnel_thematic_surface ADD CONSTRAINT tun_them_srf_tunnel_fk FOREIGN KEY (tunnel_id)
REFERENCES citydb.tunnel (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tun_them_srf_hspace_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_thematic_surface DROP CONSTRAINT IF EXISTS tun_them_srf_hspace_fk CASCADE;
ALTER TABLE citydb.tunnel_thematic_surface ADD CONSTRAINT tun_them_srf_hspace_fk FOREIGN KEY (tunnel_hollow_space_id)
REFERENCES citydb.tunnel_hollow_space (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tun_them_srf_tun_inst_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_thematic_surface DROP CONSTRAINT IF EXISTS tun_them_srf_tun_inst_fk CASCADE;
ALTER TABLE citydb.tunnel_thematic_surface ADD CONSTRAINT tun_them_srf_tun_inst_fk FOREIGN KEY (tunnel_installation_id)
REFERENCES citydb.tunnel_installation (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tun_them_srf_lod2msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_thematic_surface DROP CONSTRAINT IF EXISTS tun_them_srf_lod2msrf_fk CASCADE;
ALTER TABLE citydb.tunnel_thematic_surface ADD CONSTRAINT tun_them_srf_lod2msrf_fk FOREIGN KEY (lod2_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tun_them_srf_lod3msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_thematic_surface DROP CONSTRAINT IF EXISTS tun_them_srf_lod3msrf_fk CASCADE;
ALTER TABLE citydb.tunnel_thematic_surface ADD CONSTRAINT tun_them_srf_lod3msrf_fk FOREIGN KEY (lod3_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tun_them_srf_lod4msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_thematic_surface DROP CONSTRAINT IF EXISTS tun_them_srf_lod4msrf_fk CASCADE;
ALTER TABLE citydb.tunnel_thematic_surface ADD CONSTRAINT tun_them_srf_lod4msrf_fk FOREIGN KEY (lod4_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_open_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_opening DROP CONSTRAINT IF EXISTS tunnel_open_cityobject_fk CASCADE;
ALTER TABLE citydb.tunnel_opening ADD CONSTRAINT tunnel_open_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_open_objclass_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_opening DROP CONSTRAINT IF EXISTS tunnel_open_objclass_fk CASCADE;
ALTER TABLE citydb.tunnel_opening ADD CONSTRAINT tunnel_open_objclass_fk FOREIGN KEY (objectclass_id)
REFERENCES citydb.objectclass (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_open_lod3msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_opening DROP CONSTRAINT IF EXISTS tunnel_open_lod3msrf_fk CASCADE;
ALTER TABLE citydb.tunnel_opening ADD CONSTRAINT tunnel_open_lod3msrf_fk FOREIGN KEY (lod3_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_open_lod4msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_opening DROP CONSTRAINT IF EXISTS tunnel_open_lod4msrf_fk CASCADE;
ALTER TABLE citydb.tunnel_opening ADD CONSTRAINT tunnel_open_lod4msrf_fk FOREIGN KEY (lod4_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_open_lod3impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_opening DROP CONSTRAINT IF EXISTS tunnel_open_lod3impl_fk CASCADE;
ALTER TABLE citydb.tunnel_opening ADD CONSTRAINT tunnel_open_lod3impl_fk FOREIGN KEY (lod3_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_open_lod4impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_opening DROP CONSTRAINT IF EXISTS tunnel_open_lod4impl_fk CASCADE;
ALTER TABLE citydb.tunnel_opening ADD CONSTRAINT tunnel_open_lod4impl_fk FOREIGN KEY (lod4_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_inst_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_installation DROP CONSTRAINT IF EXISTS tunnel_inst_cityobject_fk CASCADE;
ALTER TABLE citydb.tunnel_installation ADD CONSTRAINT tunnel_inst_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_inst_objclass_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_installation DROP CONSTRAINT IF EXISTS tunnel_inst_objclass_fk CASCADE;
ALTER TABLE citydb.tunnel_installation ADD CONSTRAINT tunnel_inst_objclass_fk FOREIGN KEY (objectclass_id)
REFERENCES citydb.objectclass (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_inst_tunnel_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_installation DROP CONSTRAINT IF EXISTS tunnel_inst_tunnel_fk CASCADE;
ALTER TABLE citydb.tunnel_installation ADD CONSTRAINT tunnel_inst_tunnel_fk FOREIGN KEY (tunnel_id)
REFERENCES citydb.tunnel (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_inst_hspace_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_installation DROP CONSTRAINT IF EXISTS tunnel_inst_hspace_fk CASCADE;
ALTER TABLE citydb.tunnel_installation ADD CONSTRAINT tunnel_inst_hspace_fk FOREIGN KEY (tunnel_hollow_space_id)
REFERENCES citydb.tunnel_hollow_space (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_inst_lod2brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_installation DROP CONSTRAINT IF EXISTS tunnel_inst_lod2brep_fk CASCADE;
ALTER TABLE citydb.tunnel_installation ADD CONSTRAINT tunnel_inst_lod2brep_fk FOREIGN KEY (lod2_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_inst_lod3brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_installation DROP CONSTRAINT IF EXISTS tunnel_inst_lod3brep_fk CASCADE;
ALTER TABLE citydb.tunnel_installation ADD CONSTRAINT tunnel_inst_lod3brep_fk FOREIGN KEY (lod3_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_inst_lod4brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_installation DROP CONSTRAINT IF EXISTS tunnel_inst_lod4brep_fk CASCADE;
ALTER TABLE citydb.tunnel_installation ADD CONSTRAINT tunnel_inst_lod4brep_fk FOREIGN KEY (lod4_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_inst_lod2impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_installation DROP CONSTRAINT IF EXISTS tunnel_inst_lod2impl_fk CASCADE;
ALTER TABLE citydb.tunnel_installation ADD CONSTRAINT tunnel_inst_lod2impl_fk FOREIGN KEY (lod2_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_inst_lod3impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_installation DROP CONSTRAINT IF EXISTS tunnel_inst_lod3impl_fk CASCADE;
ALTER TABLE citydb.tunnel_installation ADD CONSTRAINT tunnel_inst_lod3impl_fk FOREIGN KEY (lod3_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_inst_lod4impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_installation DROP CONSTRAINT IF EXISTS tunnel_inst_lod4impl_fk CASCADE;
ALTER TABLE citydb.tunnel_installation ADD CONSTRAINT tunnel_inst_lod4impl_fk FOREIGN KEY (lod4_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_furn_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_furniture DROP CONSTRAINT IF EXISTS tunnel_furn_cityobject_fk CASCADE;
ALTER TABLE citydb.tunnel_furniture ADD CONSTRAINT tunnel_furn_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_furn_hspace_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_furniture DROP CONSTRAINT IF EXISTS tunnel_furn_hspace_fk CASCADE;
ALTER TABLE citydb.tunnel_furniture ADD CONSTRAINT tunnel_furn_hspace_fk FOREIGN KEY (tunnel_hollow_space_id)
REFERENCES citydb.tunnel_hollow_space (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_furn_lod4brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_furniture DROP CONSTRAINT IF EXISTS tunnel_furn_lod4brep_fk CASCADE;
ALTER TABLE citydb.tunnel_furniture ADD CONSTRAINT tunnel_furn_lod4brep_fk FOREIGN KEY (lod4_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: tunnel_furn_lod4impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.tunnel_furniture DROP CONSTRAINT IF EXISTS tunnel_furn_lod4impl_fk CASCADE;
ALTER TABLE citydb.tunnel_furniture ADD CONSTRAINT tunnel_furn_lod4impl_fk FOREIGN KEY (lod4_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge DROP CONSTRAINT IF EXISTS bridge_cityobject_fk CASCADE;
ALTER TABLE citydb.bridge ADD CONSTRAINT bridge_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_parent_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge DROP CONSTRAINT IF EXISTS bridge_parent_fk CASCADE;
ALTER TABLE citydb.bridge ADD CONSTRAINT bridge_parent_fk FOREIGN KEY (bridge_parent_id)
REFERENCES citydb.bridge (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_root_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge DROP CONSTRAINT IF EXISTS bridge_root_fk CASCADE;
ALTER TABLE citydb.bridge ADD CONSTRAINT bridge_root_fk FOREIGN KEY (bridge_root_id)
REFERENCES citydb.bridge (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_lod1msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge DROP CONSTRAINT IF EXISTS bridge_lod1msrf_fk CASCADE;
ALTER TABLE citydb.bridge ADD CONSTRAINT bridge_lod1msrf_fk FOREIGN KEY (lod1_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_lod2msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge DROP CONSTRAINT IF EXISTS bridge_lod2msrf_fk CASCADE;
ALTER TABLE citydb.bridge ADD CONSTRAINT bridge_lod2msrf_fk FOREIGN KEY (lod2_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_lod3msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge DROP CONSTRAINT IF EXISTS bridge_lod3msrf_fk CASCADE;
ALTER TABLE citydb.bridge ADD CONSTRAINT bridge_lod3msrf_fk FOREIGN KEY (lod3_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_lod4msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge DROP CONSTRAINT IF EXISTS bridge_lod4msrf_fk CASCADE;
ALTER TABLE citydb.bridge ADD CONSTRAINT bridge_lod4msrf_fk FOREIGN KEY (lod4_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_lod1solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge DROP CONSTRAINT IF EXISTS bridge_lod1solid_fk CASCADE;
ALTER TABLE citydb.bridge ADD CONSTRAINT bridge_lod1solid_fk FOREIGN KEY (lod1_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_lod2solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge DROP CONSTRAINT IF EXISTS bridge_lod2solid_fk CASCADE;
ALTER TABLE citydb.bridge ADD CONSTRAINT bridge_lod2solid_fk FOREIGN KEY (lod2_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_lod3solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge DROP CONSTRAINT IF EXISTS bridge_lod3solid_fk CASCADE;
ALTER TABLE citydb.bridge ADD CONSTRAINT bridge_lod3solid_fk FOREIGN KEY (lod3_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_lod4solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge DROP CONSTRAINT IF EXISTS bridge_lod4solid_fk CASCADE;
ALTER TABLE citydb.bridge ADD CONSTRAINT bridge_lod4solid_fk FOREIGN KEY (lod4_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_furn_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_furniture DROP CONSTRAINT IF EXISTS bridge_furn_cityobject_fk CASCADE;
ALTER TABLE citydb.bridge_furniture ADD CONSTRAINT bridge_furn_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_furn_brd_room_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_furniture DROP CONSTRAINT IF EXISTS bridge_furn_brd_room_fk CASCADE;
ALTER TABLE citydb.bridge_furniture ADD CONSTRAINT bridge_furn_brd_room_fk FOREIGN KEY (bridge_room_id)
REFERENCES citydb.bridge_room (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_furn_lod4brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_furniture DROP CONSTRAINT IF EXISTS bridge_furn_lod4brep_fk CASCADE;
ALTER TABLE citydb.bridge_furniture ADD CONSTRAINT bridge_furn_lod4brep_fk FOREIGN KEY (lod4_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_furn_lod4impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_furniture DROP CONSTRAINT IF EXISTS bridge_furn_lod4impl_fk CASCADE;
ALTER TABLE citydb.bridge_furniture ADD CONSTRAINT bridge_furn_lod4impl_fk FOREIGN KEY (lod4_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_inst_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_installation DROP CONSTRAINT IF EXISTS bridge_inst_cityobject_fk CASCADE;
ALTER TABLE citydb.bridge_installation ADD CONSTRAINT bridge_inst_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_inst_objclass_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_installation DROP CONSTRAINT IF EXISTS bridge_inst_objclass_fk CASCADE;
ALTER TABLE citydb.bridge_installation ADD CONSTRAINT bridge_inst_objclass_fk FOREIGN KEY (objectclass_id)
REFERENCES citydb.objectclass (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_inst_bridge_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_installation DROP CONSTRAINT IF EXISTS bridge_inst_bridge_fk CASCADE;
ALTER TABLE citydb.bridge_installation ADD CONSTRAINT bridge_inst_bridge_fk FOREIGN KEY (bridge_id)
REFERENCES citydb.bridge (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_inst_brd_room_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_installation DROP CONSTRAINT IF EXISTS bridge_inst_brd_room_fk CASCADE;
ALTER TABLE citydb.bridge_installation ADD CONSTRAINT bridge_inst_brd_room_fk FOREIGN KEY (bridge_room_id)
REFERENCES citydb.bridge_room (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_inst_lod2brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_installation DROP CONSTRAINT IF EXISTS bridge_inst_lod2brep_fk CASCADE;
ALTER TABLE citydb.bridge_installation ADD CONSTRAINT bridge_inst_lod2brep_fk FOREIGN KEY (lod2_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_inst_lod3brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_installation DROP CONSTRAINT IF EXISTS bridge_inst_lod3brep_fk CASCADE;
ALTER TABLE citydb.bridge_installation ADD CONSTRAINT bridge_inst_lod3brep_fk FOREIGN KEY (lod3_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_inst_lod4brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_installation DROP CONSTRAINT IF EXISTS bridge_inst_lod4brep_fk CASCADE;
ALTER TABLE citydb.bridge_installation ADD CONSTRAINT bridge_inst_lod4brep_fk FOREIGN KEY (lod4_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_inst_lod2impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_installation DROP CONSTRAINT IF EXISTS bridge_inst_lod2impl_fk CASCADE;
ALTER TABLE citydb.bridge_installation ADD CONSTRAINT bridge_inst_lod2impl_fk FOREIGN KEY (lod2_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_inst_lod3impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_installation DROP CONSTRAINT IF EXISTS bridge_inst_lod3impl_fk CASCADE;
ALTER TABLE citydb.bridge_installation ADD CONSTRAINT bridge_inst_lod3impl_fk FOREIGN KEY (lod3_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_inst_lod4impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_installation DROP CONSTRAINT IF EXISTS bridge_inst_lod4impl_fk CASCADE;
ALTER TABLE citydb.bridge_installation ADD CONSTRAINT bridge_inst_lod4impl_fk FOREIGN KEY (lod4_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_open_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_opening DROP CONSTRAINT IF EXISTS bridge_open_cityobject_fk CASCADE;
ALTER TABLE citydb.bridge_opening ADD CONSTRAINT bridge_open_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_open_objclass_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_opening DROP CONSTRAINT IF EXISTS bridge_open_objclass_fk CASCADE;
ALTER TABLE citydb.bridge_opening ADD CONSTRAINT bridge_open_objclass_fk FOREIGN KEY (objectclass_id)
REFERENCES citydb.objectclass (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_open_address_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_opening DROP CONSTRAINT IF EXISTS bridge_open_address_fk CASCADE;
ALTER TABLE citydb.bridge_opening ADD CONSTRAINT bridge_open_address_fk FOREIGN KEY (address_id)
REFERENCES citydb.address (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_open_lod3msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_opening DROP CONSTRAINT IF EXISTS bridge_open_lod3msrf_fk CASCADE;
ALTER TABLE citydb.bridge_opening ADD CONSTRAINT bridge_open_lod3msrf_fk FOREIGN KEY (lod3_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_open_lod4msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_opening DROP CONSTRAINT IF EXISTS bridge_open_lod4msrf_fk CASCADE;
ALTER TABLE citydb.bridge_opening ADD CONSTRAINT bridge_open_lod4msrf_fk FOREIGN KEY (lod4_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_open_lod3impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_opening DROP CONSTRAINT IF EXISTS bridge_open_lod3impl_fk CASCADE;
ALTER TABLE citydb.bridge_opening ADD CONSTRAINT bridge_open_lod3impl_fk FOREIGN KEY (lod3_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_open_lod4impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_opening DROP CONSTRAINT IF EXISTS bridge_open_lod4impl_fk CASCADE;
ALTER TABLE citydb.bridge_opening ADD CONSTRAINT bridge_open_lod4impl_fk FOREIGN KEY (lod4_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: brd_open_to_them_srf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_open_to_them_srf DROP CONSTRAINT IF EXISTS brd_open_to_them_srf_fk CASCADE;
ALTER TABLE citydb.bridge_open_to_them_srf ADD CONSTRAINT brd_open_to_them_srf_fk FOREIGN KEY (bridge_opening_id)
REFERENCES citydb.bridge_opening (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: brd_open_to_them_srf_fk1 | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_open_to_them_srf DROP CONSTRAINT IF EXISTS brd_open_to_them_srf_fk1 CASCADE;
ALTER TABLE citydb.bridge_open_to_them_srf ADD CONSTRAINT brd_open_to_them_srf_fk1 FOREIGN KEY (bridge_thematic_surface_id)
REFERENCES citydb.bridge_thematic_surface (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_room_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_room DROP CONSTRAINT IF EXISTS bridge_room_cityobject_fk CASCADE;
ALTER TABLE citydb.bridge_room ADD CONSTRAINT bridge_room_cityobject_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_room_bridge_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_room DROP CONSTRAINT IF EXISTS bridge_room_bridge_fk CASCADE;
ALTER TABLE citydb.bridge_room ADD CONSTRAINT bridge_room_bridge_fk FOREIGN KEY (bridge_id)
REFERENCES citydb.bridge (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_room_lod4msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_room DROP CONSTRAINT IF EXISTS bridge_room_lod4msrf_fk CASCADE;
ALTER TABLE citydb.bridge_room ADD CONSTRAINT bridge_room_lod4msrf_fk FOREIGN KEY (lod4_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_room_lod4solid_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_room DROP CONSTRAINT IF EXISTS bridge_room_lod4solid_fk CASCADE;
ALTER TABLE citydb.bridge_room ADD CONSTRAINT bridge_room_lod4solid_fk FOREIGN KEY (lod4_solid_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: brd_them_srf_cityobj_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_thematic_surface DROP CONSTRAINT IF EXISTS brd_them_srf_cityobj_fk CASCADE;
ALTER TABLE citydb.bridge_thematic_surface ADD CONSTRAINT brd_them_srf_cityobj_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: brd_them_srf_objclass_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_thematic_surface DROP CONSTRAINT IF EXISTS brd_them_srf_objclass_fk CASCADE;
ALTER TABLE citydb.bridge_thematic_surface ADD CONSTRAINT brd_them_srf_objclass_fk FOREIGN KEY (objectclass_id)
REFERENCES citydb.objectclass (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: brd_them_srf_bridge_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_thematic_surface DROP CONSTRAINT IF EXISTS brd_them_srf_bridge_fk CASCADE;
ALTER TABLE citydb.bridge_thematic_surface ADD CONSTRAINT brd_them_srf_bridge_fk FOREIGN KEY (bridge_id)
REFERENCES citydb.bridge (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: brd_them_srf_brd_room_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_thematic_surface DROP CONSTRAINT IF EXISTS brd_them_srf_brd_room_fk CASCADE;
ALTER TABLE citydb.bridge_thematic_surface ADD CONSTRAINT brd_them_srf_brd_room_fk FOREIGN KEY (bridge_room_id)
REFERENCES citydb.bridge_room (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: brd_them_srf_brd_inst_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_thematic_surface DROP CONSTRAINT IF EXISTS brd_them_srf_brd_inst_fk CASCADE;
ALTER TABLE citydb.bridge_thematic_surface ADD CONSTRAINT brd_them_srf_brd_inst_fk FOREIGN KEY (bridge_installation_id)
REFERENCES citydb.bridge_installation (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: brd_them_srf_brd_const_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_thematic_surface DROP CONSTRAINT IF EXISTS brd_them_srf_brd_const_fk CASCADE;
ALTER TABLE citydb.bridge_thematic_surface ADD CONSTRAINT brd_them_srf_brd_const_fk FOREIGN KEY (bridge_constr_element_id)
REFERENCES citydb.bridge_constr_element (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: brd_them_srf_lod2msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_thematic_surface DROP CONSTRAINT IF EXISTS brd_them_srf_lod2msrf_fk CASCADE;
ALTER TABLE citydb.bridge_thematic_surface ADD CONSTRAINT brd_them_srf_lod2msrf_fk FOREIGN KEY (lod2_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: brd_them_srf_lod3msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_thematic_surface DROP CONSTRAINT IF EXISTS brd_them_srf_lod3msrf_fk CASCADE;
ALTER TABLE citydb.bridge_thematic_surface ADD CONSTRAINT brd_them_srf_lod3msrf_fk FOREIGN KEY (lod3_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: brd_them_srf_lod4msrf_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_thematic_surface DROP CONSTRAINT IF EXISTS brd_them_srf_lod4msrf_fk CASCADE;
ALTER TABLE citydb.bridge_thematic_surface ADD CONSTRAINT brd_them_srf_lod4msrf_fk FOREIGN KEY (lod4_multi_surface_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_constr_cityobj_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_constr_element DROP CONSTRAINT IF EXISTS bridge_constr_cityobj_fk CASCADE;
ALTER TABLE citydb.bridge_constr_element ADD CONSTRAINT bridge_constr_cityobj_fk FOREIGN KEY (id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_constr_bridge_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_constr_element DROP CONSTRAINT IF EXISTS bridge_constr_bridge_fk CASCADE;
ALTER TABLE citydb.bridge_constr_element ADD CONSTRAINT bridge_constr_bridge_fk FOREIGN KEY (bridge_id)
REFERENCES citydb.bridge (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_constr_lod1brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_constr_element DROP CONSTRAINT IF EXISTS bridge_constr_lod1brep_fk CASCADE;
ALTER TABLE citydb.bridge_constr_element ADD CONSTRAINT bridge_constr_lod1brep_fk FOREIGN KEY (lod1_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_constr_lod2brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_constr_element DROP CONSTRAINT IF EXISTS bridge_constr_lod2brep_fk CASCADE;
ALTER TABLE citydb.bridge_constr_element ADD CONSTRAINT bridge_constr_lod2brep_fk FOREIGN KEY (lod2_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_constr_lod3brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_constr_element DROP CONSTRAINT IF EXISTS bridge_constr_lod3brep_fk CASCADE;
ALTER TABLE citydb.bridge_constr_element ADD CONSTRAINT bridge_constr_lod3brep_fk FOREIGN KEY (lod3_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_constr_lod4brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_constr_element DROP CONSTRAINT IF EXISTS bridge_constr_lod4brep_fk CASCADE;
ALTER TABLE citydb.bridge_constr_element ADD CONSTRAINT bridge_constr_lod4brep_fk FOREIGN KEY (lod4_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_constr_lod1impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_constr_element DROP CONSTRAINT IF EXISTS bridge_constr_lod1impl_fk CASCADE;
ALTER TABLE citydb.bridge_constr_element ADD CONSTRAINT bridge_constr_lod1impl_fk FOREIGN KEY (lod1_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_constr_lod2impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_constr_element DROP CONSTRAINT IF EXISTS bridge_constr_lod2impl_fk CASCADE;
ALTER TABLE citydb.bridge_constr_element ADD CONSTRAINT bridge_constr_lod2impl_fk FOREIGN KEY (lod2_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_constr_lod3impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_constr_element DROP CONSTRAINT IF EXISTS bridge_constr_lod3impl_fk CASCADE;
ALTER TABLE citydb.bridge_constr_element ADD CONSTRAINT bridge_constr_lod3impl_fk FOREIGN KEY (lod3_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: bridge_constr_lod4impl_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.bridge_constr_element DROP CONSTRAINT IF EXISTS bridge_constr_lod4impl_fk CASCADE;
ALTER TABLE citydb.bridge_constr_element ADD CONSTRAINT bridge_constr_lod4impl_fk FOREIGN KEY (lod4_implicit_rep_id)
REFERENCES citydb.implicit_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: address_to_bridge_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.address_to_bridge DROP CONSTRAINT IF EXISTS address_to_bridge_fk CASCADE;
ALTER TABLE citydb.address_to_bridge ADD CONSTRAINT address_to_bridge_fk FOREIGN KEY (address_id)
REFERENCES citydb.address (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: address_to_bridge_fk1 | type: CONSTRAINT --
-- ALTER TABLE citydb.address_to_bridge DROP CONSTRAINT IF EXISTS address_to_bridge_fk1 CASCADE;
ALTER TABLE citydb.address_to_bridge ADD CONSTRAINT address_to_bridge_fk1 FOREIGN KEY (bridge_id)
REFERENCES citydb.bridge (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: cityobject_objectclass_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.cityobject DROP CONSTRAINT IF EXISTS cityobject_objectclass_fk CASCADE;
ALTER TABLE citydb.cityobject ADD CONSTRAINT cityobject_objectclass_fk FOREIGN KEY (objectclass_id)
REFERENCES citydb.objectclass (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: appearance_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.appearance DROP CONSTRAINT IF EXISTS appearance_cityobject_fk CASCADE;
ALTER TABLE citydb.appearance ADD CONSTRAINT appearance_cityobject_fk FOREIGN KEY (cityobject_id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: appearance_citymodel_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.appearance DROP CONSTRAINT IF EXISTS appearance_citymodel_fk CASCADE;
ALTER TABLE citydb.appearance ADD CONSTRAINT appearance_citymodel_fk FOREIGN KEY (citymodel_id)
REFERENCES citydb.citymodel (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: implicit_geom_brep_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.implicit_geometry DROP CONSTRAINT IF EXISTS implicit_geom_brep_fk CASCADE;
ALTER TABLE citydb.implicit_geometry ADD CONSTRAINT implicit_geom_brep_fk FOREIGN KEY (relative_brep_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: surface_geom_parent_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.surface_geometry DROP CONSTRAINT IF EXISTS surface_geom_parent_fk CASCADE;
ALTER TABLE citydb.surface_geometry ADD CONSTRAINT surface_geom_parent_fk FOREIGN KEY (parent_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: surface_geom_root_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.surface_geometry DROP CONSTRAINT IF EXISTS surface_geom_root_fk CASCADE;
ALTER TABLE citydb.surface_geometry ADD CONSTRAINT surface_geom_root_fk FOREIGN KEY (root_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: surface_geom_cityobj_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.surface_geometry DROP CONSTRAINT IF EXISTS surface_geom_cityobj_fk CASCADE;
ALTER TABLE citydb.surface_geometry ADD CONSTRAINT surface_geom_cityobj_fk FOREIGN KEY (cityobject_id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: surface_data_tex_image_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.surface_data DROP CONSTRAINT IF EXISTS surface_data_tex_image_fk CASCADE;
ALTER TABLE citydb.surface_data ADD CONSTRAINT surface_data_tex_image_fk FOREIGN KEY (tex_image_id)
REFERENCES citydb.tex_image (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: surface_data_objclass_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.surface_data DROP CONSTRAINT IF EXISTS surface_data_objclass_fk CASCADE;
ALTER TABLE citydb.surface_data ADD CONSTRAINT surface_data_objclass_fk FOREIGN KEY (objectclass_id)
REFERENCES citydb.objectclass (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: genericattrib_parent_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.cityobject_genericattrib DROP CONSTRAINT IF EXISTS genericattrib_parent_fk CASCADE;
ALTER TABLE citydb.cityobject_genericattrib ADD CONSTRAINT genericattrib_parent_fk FOREIGN KEY (parent_genattrib_id)
REFERENCES citydb.cityobject_genericattrib (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: genericattrib_root_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.cityobject_genericattrib DROP CONSTRAINT IF EXISTS genericattrib_root_fk CASCADE;
ALTER TABLE citydb.cityobject_genericattrib ADD CONSTRAINT genericattrib_root_fk FOREIGN KEY (root_genattrib_id)
REFERENCES citydb.cityobject_genericattrib (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: genericattrib_geom_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.cityobject_genericattrib DROP CONSTRAINT IF EXISTS genericattrib_geom_fk CASCADE;
ALTER TABLE citydb.cityobject_genericattrib ADD CONSTRAINT genericattrib_geom_fk FOREIGN KEY (surface_geometry_id)
REFERENCES citydb.surface_geometry (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: genericattrib_cityobj_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.cityobject_genericattrib DROP CONSTRAINT IF EXISTS genericattrib_cityobj_fk CASCADE;
ALTER TABLE citydb.cityobject_genericattrib ADD CONSTRAINT genericattrib_cityobj_fk FOREIGN KEY (cityobject_id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
-- object: ext_ref_cityobject_fk | type: CONSTRAINT --
-- ALTER TABLE citydb.external_reference DROP CONSTRAINT IF EXISTS ext_ref_cityobject_fk CASCADE;
ALTER TABLE citydb.external_reference ADD CONSTRAINT ext_ref_cityobject_fk FOREIGN KEY (cityobject_id)
REFERENCES citydb.cityobject (id) MATCH FULL
ON DELETE NO ACTION ON UPDATE CASCADE;
-- ddl-end --
|
-- Insert all data from table a into temp_table, plus a column
-- noting which ids from table b are downstream of records in table a
-- Features with equivalent blkey and measure (within 1m) are included
-- (ie, a point at the downstream end of a line)
INSERT INTO {schema_a}.{temp_table}
WITH src AS
(
SELECT *
FROM {schema_a}.{table_a}
WHERE watershed_group_code = %s
),
downstream AS
(
SELECT
{id_a},
array_agg(downstream_id) FILTER (WHERE downstream_id IS NOT NULL) AS downstream_ids
FROM
(SELECT
a.{id_a},
b.{id_b} as downstream_id
FROM
src a
INNER JOIN {schema_b}.{table_b} b ON
FWA_Downstream(
a.blue_line_key,
a.downstream_route_measure,
a.wscode_ltree,
a.localcode_ltree,
b.blue_line_key,
b.downstream_route_measure,
b.wscode_ltree,
b.localcode_ltree,
True,
1
)
ORDER BY
a.{id_a},
b.wscode_ltree DESC,
b.localcode_ltree DESC,
b.downstream_route_measure DESC
) as d
GROUP BY {id_a}
)
SELECT a.*,
downstream.downstream_ids AS {dnstr_ids_col}
FROM src a
LEFT OUTER JOIN downstream ON a.{id_a} = downstream.{id_a};
|
/*
IF EXISTS (SELECT name FROM sysobjects WHERE (name = 'MemberCase_AssignToUser' AND type = 'P'))
DROP PROCEDURE dbo.MemberCase_AssignToUser
GO
*/
CREATE PROCEDURE dbo.MemberCase_AssignToUser
/* STORED PROCEDURE - INPUTS (BEGIN) */
@memberCaseId BIGINT,
@assignedToSecurityAuthorityId BIGINT,
@assignedToUserAccountId VARCHAR (060),
@assignedToUserAccountName VARCHAR (060),
@assignedToUserDisplayName VARCHAR (060),
@ignoreAssignedTo BIGINT,
@modifiedAuthorityId BIGINT,
@modifiedAuthorityName VARCHAR (060),
@modifiedAccountId VARCHAR (060),
@modifiedAccountName VARCHAR (060),
@lastModifiedDate DATETIME , -- LAST MODIFIED DATE OF THE ORIGINAL RECORD
/* STORED PROCEDURE - INPUTS ( END ) */
/* STORED PROCEDURE - OUTPUTS (BEGIN) */
@modifiedDate DATETIME OUTPUT -- OUTPUT OF THE MODIFIED DATE ON SUCCESS
-- EXAMPLE: @MYOUTPUT VARCHAR (20) OUTPUT -- A VARIABLE DECLARATION FOR RETURN VALUE
/* STORED PROCEDURE - OUTPUTS ( END ) */
AS
BEGIN
/* STORED PROCEDURE (BEGIN) */
/* LOCAL VARIABLES (BEGIN) */
DECLARE @validationError AS INT
SET @validationError = 0 -- SUCCESS
/* LOCAL VARIABLES ( END ) */
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
BEGIN TRANSACTION
SET @validationError = 1 -- NOT FOUND
SELECT @validationError =
CASE
WHEN (MemberCase.Status NOT IN (1, 2)) THEN 7 -- NOT A VALID CASE STATUS
WHEN (MemberCase.ModifiedDate <> @lastModifiedDate) THEN 3 -- MODIFIED RECORD
WHEN ((LockedByDate IS NOT NULL) AND ((LockedBySecurityAuthorityId <> @modifiedAuthorityId) OR (LockedByUserAccountId <> @modifiedAccountId))) THEN 4 -- LOCKED
WHEN ((AssignedToSecurityAuthorityId = @assignedToSecurityAuthorityId) AND (AssignedToUserAccountId = @assignedToUserAccountId)) THEN 6 -- NO CHANGE DETECTED
ELSE 0 -- VALID RECORD FOUND
END
FROM
dbo.MemberCase
WHERE (MemberCase.MemberCaseId = @memberCaseId)
-- DETERMINE IF ERROR DETECTED AND ROLLBACK TRANSACTION
IF (@validationError <> 0)
BEGIN
ROLLBACK TRANSACTION
RETURN @validationError
END
-- IF WE REACH THIS POINT, THE RECORD IS UNLOCKED OR LOCKED BY REQUESTING USER AND IN AN APPROPRIATE STATUS
-- TO ASSIGN, ONE OF THE FOLLOWING MUST BE TRUE
-- 1. CASE IS NOT CURRENTLY ASSIGNED TO A USER, REQUESTING USER IS THE ASSIGN TO USER (SELF-ASSIGN)
-- 2. CASE IS NOT CURRENTLY ASSIGNED TO A USER, REQUESTING USER IS A MANAGER OF THE ASSIGNED TO TEAM
-- 3. CASE IS ASSIGNED TO A USER, REQUESTING USER IS THE CURRENT ASSIGNED TO USER AND THE NEW ASSIGNED TO IS UNASSIGN
-- 4. CASE IS ASSIGNED TO A USER, REQUESTING USER IS A MANAGER OF THE ASSIGNED TO TEAM
-- TODO: CHECK FOR CARE PLAN ASSIGNMENTS, AS THIS WILL REPLACE THEM
IF NOT EXISTS (SELECT MemberCase.MemberCaseId
FROM
dbo.MemberCase
LEFT JOIN dbo.WorkTeamMembership AS CurrentWorkTeamMembership
ON MemberCase.AssignedToWorkTeamId = CurrentWorkTeamMembership.WorkTeamId
AND ((CurrentWorkTeamMembership.SecurityAuthorityId = @modifiedAuthorityId) AND (CurrentWorkTeamMembership.UserAccountId = @modifiedAccountId))
AND (CurrentWorkTeamMembership.WorkTeamRole = 1) -- MANAGER
LEFT JOIN dbo.WorkTeamMembership AS AssignedToWorkTeamMembership
ON MemberCase.AssignedToWorkTeamId = AssignedToWorkTeamMembership.WorkTeamId
AND ((AssignedToWorkTeamMembership.SecurityAuthorityId = @assignedToSecurityAuthorityId) AND (AssignedToWorkTeamMembership.UserAccountId = @assignedToUserAccountId))
WHERE (MemberCaseId = @memberCaseId)
AND ((AssignedToWorkTeamMembership.WorkTeamId IS NOT NULL) OR (@assignedToUserAccountId = '')) -- ASSIGN TO USER IS PART OF WORK TEAM (OR UNASSIGN)
AND (
-- 1. CASE IS NOT CURRENTLY ASSIGNED TO A USER, REQUESTING USER IS THE ASSIGN TO USER (SELF-ASSIGN)
((MemberCase.AssignedToUserAccountId = '') AND ((@modifiedAuthorityId = @assignedToSecurityAuthorityId) AND (@modifiedAccountId = @assignedToUserAccountId)))
-- 2. CASE IS NOT CURRENTLY ASSIGNED TO A USER, REQUESTING USER IS A MANAGER OF THE ASSIGNED TO TEAM
OR ((MemberCase.AssignedToUserAccountId = '') AND (CurrentWorkTeamMembership.WorkTeamId IS NOT NULL))
-- 3. CASE IS ASSIGNED TO A USER, REQUESTING USER IS THE CURRENT ASSIGNED TO USER AND THE NEW ASSIGNED TO IS UNASSIGN
OR ((MemberCase.AssignedToUserAccountId <> '') AND ((@modifiedAuthorityId = MemberCase.AssignedToSecurityAuthorityId) AND (@modifiedAccountId = MemberCase.AssignedToUserAccountId))
AND (@assignedToUserAccountId = ''))
-- 4. CASE IS ASSIGNED TO A USER, REQUESTING USER IS A MANAGER OF THE ASSIGNED TO TEAM
OR (CurrentWorkTeamMembership.WorkTeamId IS NOT NULL)
) -- AND CRITERIA
) -- IF NOT EXISTS
BEGIN
ROLLBACK TRANSACTION
RETURN 2 -- PERMISSION DENIED
END
-- NO VALIDATION ERROR
-- EXISTING RECORD, UPDATE
SET @modifiedDate = GETDATE ()
UPDATE dbo.MemberCase
SET
AssignedToSecurityAuthorityId = @assignedToSecurityAuthorityId,
AssignedToUserAccountId = @assignedToUserAccountId,
AssignedToUserAccountName = @assignedToUserAccountName,
AssignedToUserDisplayName = @assignedToUserDisplayName,
AssignedToDate = CASE WHEN (@assignedToUserAccountId = '') THEN NULL ELSE @modifiedDate END,
ModifiedAuthorityName = @modifiedAuthorityName,
ModifiedAccountId = @modifiedAccountId,
ModifiedAccountName = @modifiedAccountName,
ModifiedDate = @modifiedDate
WHERE
MemberCaseId = @memberCaseId
COMMIT TRANSACTION
RETURN 0
/* STORED PROCEDURE ( END ) */
END
GO
/*
GRANT EXECUTE ON dbo.MemberCase_AssignToUser TO PUBLIC
GO
*/
|
-- MySQL dump 10.16 Distrib 10.1.35-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: barracas
-- ------------------------------------------------------
-- Server version 10.1.35-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `Aluger`
--
DROP TABLE IF EXISTS `Aluger`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Aluger` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`barracaChapeusId` int(5) NOT NULL,
`nome` varchar(254) NOT NULL,
`data` date NOT NULL,
`valor` float NOT NULL,
`comentarioId` int(10) DEFAULT NULL,
`senha` int(10) NOT NULL,
`lote` int(11) NOT NULL,
`operadorId` int(11) NOT NULL,
`registo` datetime DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `Aluger_fk0` (`barracaChapeusId`),
KEY `Aluger_fk1` (`comentarioId`),
KEY `Aluger_fk2` (`operadorId`),
CONSTRAINT `Aluger_fk0` FOREIGN KEY (`barracaChapeusId`) REFERENCES `BarracasChapeus` (`id`),
CONSTRAINT `Aluger_fk1` FOREIGN KEY (`comentarioId`) REFERENCES `Comentarios` (`id`),
CONSTRAINT `Aluger_fk2` FOREIGN KEY (`operadorId`) REFERENCES `Pessoas` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Aluger`
--
LOCK TABLES `Aluger` WRITE;
/*!40000 ALTER TABLE `Aluger` DISABLE KEYS */;
INSERT INTO `Aluger` VALUES (1,1,'','2018-08-14',7,NULL,1,1,1,'2018-08-21 00:00:00');
/*!40000 ALTER TABLE `Aluger` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `Aluguer`
--
DROP TABLE IF EXISTS `Aluguer`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Aluguer` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`barracaChapeusId` int(5) NOT NULL,
`nome` varchar(254) DEFAULT NULL,
`data` datetime DEFAULT CURRENT_TIMESTAMP,
`valor` float NOT NULL,
`comentarioId` int(10) DEFAULT NULL,
`senha` int(10) DEFAULT NULL,
`lote` int(11) DEFAULT NULL,
`operadorId` int(11) NOT NULL,
`registo` datetime DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `Aluguer_fk0` (`barracaChapeusId`),
KEY `Aluguer_fk1` (`comentarioId`),
KEY `Aluguer_fk2` (`operadorId`),
CONSTRAINT `Aluguer_fk0` FOREIGN KEY (`barracaChapeusId`) REFERENCES `BarracasChapeus` (`id`),
CONSTRAINT `Aluguer_fk1` FOREIGN KEY (`comentarioId`) REFERENCES `Comentarios` (`id`),
CONSTRAINT `Aluguer_fk2` FOREIGN KEY (`operadorId`) REFERENCES `Pessoas` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Aluguer`
--
LOCK TABLES `Aluguer` WRITE;
/*!40000 ALTER TABLE `Aluguer` DISABLE KEYS */;
INSERT INTO `Aluguer` VALUES (1,1,'','2018-08-14 00:00:00',7,NULL,1,1,1,'2018-08-21 00:00:00'),(2,2,'','0000-00-00 00:00:00',8,NULL,999999,999999,1,'0000-00-00 00:00:00'),(3,2,'','0000-00-00 00:00:00',8,NULL,999999,999999,1,'2018-08-23 14:09:04'),(4,2,'','0000-00-00 00:00:00',8,NULL,999999,999999,1,'2018-08-23 14:09:49'),(5,2,'','0000-00-00 00:00:00',8,NULL,999999,999999,1,'2018-08-23 14:10:25');
/*!40000 ALTER TABLE `Aluguer` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `BarracasChapeus`
--
DROP TABLE IF EXISTS `BarracasChapeus`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `BarracasChapeus` (
`id` int(5) NOT NULL AUTO_INCREMENT,
`numero` varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL,
`tipo` varchar(254) COLLATE utf8mb4_unicode_ci NOT NULL,
`subTipo` varchar(254) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`localizacao` varchar(254) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `BarracasChapeus`
--
LOCK TABLES `BarracasChapeus` WRITE;
/*!40000 ALTER TABLE `BarracasChapeus` DISABLE KEYS */;
INSERT INTO `BarracasChapeus` VALUES (1,'1','Barraca','Frontal','Fila 1'),(2,'1A','Barraca','Frontal','Fila 1'),(3,'2','Barraca','Lateral','Fila 1'),(4,'3','Barraca','Lateral','Fila 1'),(5,'4','Barraca','Lateral','Fila 1'),(6,'5','Barraca','Lateral','Fila 1'),(7,'6','Barraca','Lateral','Fila 1'),(8,'7','Barraca','Lateral','Fila 1'),(9,'8','Barraca','Lateral','Fila 1'),(10,'9','Barraca','Lateral','Fila 1'),(11,'10','Barraca','Lateral','Fila 1'),(12,'11','Barraca','Lateral','Fila 1'),(13,'12','Barraca','Lateral','Fila 1');
/*!40000 ALTER TABLE `BarracasChapeus` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `Comentarios`
--
DROP TABLE IF EXISTS `Comentarios`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Comentarios` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`comentario` text COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Comentarios`
--
LOCK TABLES `Comentarios` WRITE;
/*!40000 ALTER TABLE `Comentarios` DISABLE KEYS */;
/*!40000 ALTER TABLE `Comentarios` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `Pessoas`
--
DROP TABLE IF EXISTS `Pessoas`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Pessoas` (
`id` int(5) NOT NULL AUTO_INCREMENT,
`nome` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`permissao` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Pessoas`
--
LOCK TABLES `Pessoas` WRITE;
/*!40000 ALTER TABLE `Pessoas` DISABLE KEYS */;
INSERT INTO `Pessoas` VALUES (1,'<NAME>','Admin'),(2,'Tester 1 (Leo)','Tester');
/*!40000 ALTER TABLE `Pessoas` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `Preco`
--
DROP TABLE IF EXISTS `Preco`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Preco` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`tipo` varchar(50) NOT NULL,
`valor` double NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Preco`
--
LOCK TABLES `Preco` WRITE;
/*!40000 ALTER TABLE `Preco` DISABLE KEYS */;
/*!40000 ALTER TABLE `Preco` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `Reservas`
--
DROP TABLE IF EXISTS `Reservas`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Reservas` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`barracaChapeusId` int(5) NOT NULL,
`nome` varchar(254) NOT NULL,
`dataInicio` date NOT NULL,
`dataFim` date NOT NULL,
`valor` float NOT NULL,
`comentarioId` int(10) DEFAULT NULL,
`operadorId` int(11) NOT NULL,
`registo` datetime DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `Reservas_fk0` (`barracaChapeusId`),
KEY `Reservas_fk1` (`comentarioId`),
KEY `Reservas_fk2` (`operadorId`),
CONSTRAINT `Reservas_fk0` FOREIGN KEY (`barracaChapeusId`) REFERENCES `BarracasChapeus` (`id`),
CONSTRAINT `Reservas_fk1` FOREIGN KEY (`comentarioId`) REFERENCES `Comentarios` (`id`),
CONSTRAINT `Reservas_fk2` FOREIGN KEY (`operadorId`) REFERENCES `Pessoas` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Reservas`
--
LOCK TABLES `Reservas` WRITE;
/*!40000 ALTER TABLE `Reservas` DISABLE KEYS */;
/*!40000 ALTER TABLE `Reservas` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-08-23 14:24:27
|
<reponame>ziggysauce/bib_social
CREATE TABLE IF NOT EXISTS migrations (
id INTEGER NOT NULL PRIMARY KEY,
created TIMESTAMPTZ DEFAULT NOW()
);
|
delete from ArticuloEntity;
delete from EventoEntity;
delete from MASCOTAENADOPCIONENTITY_USUARIOENTITY;
delete from ClasificadoEntity;
delete from CalificacionEntity;
delete from MascotaExtraviadaEntity;
delete from RecompensaEntity;
delete from MascotaEnAdopcionEntity;
delete from MascotaEntity;
delete from UsuarioEntity;
insert into UsuarioEntity (id, contrasenha, correo, nombre, usuario, telefono, dayBirth, monthBirth, yearBirth,rol,rutaImagen) values (100, '12345', '<EMAIL>', '<NAME>', 'pccruz', '31263729472', '04', '05', '1998','ADMIN','https://www.skintransform.co.uk/wp-content/uploads/2016/10/Men-Face6.jpg');
insert into UsuarioEntity (id, contrasenha, correo, nombre, usuario, telefono, dayBirth, monthBirth, yearBirth,rol,rutaImagen) values (200, '2929', '<EMAIL>', '<NAME>', 'ctobon', '3126876572', '10', '07', '1978','NORMAL','https://www.skintransform.co.uk/wp-content/uploads/2016/10/Women-Face3.jpg');
insert into UsuarioEntity (id, contrasenha, correo, nombre, usuario, telefono, dayBirth, monthBirth, yearBirth,rol,rutaImagen) values (300, 'holahola', '<EMAIL>', '<NAME>', 'tomip', '31263728754', '30', '08', '1988','NORMAL','https://www.skintransform.co.uk/wp-content/uploads/2016/10/Men-Face5.jpg');
insert into ArticuloEntity (id, titulo, tema, contenido, resumen, autor_id) values (100, 'Lo bueno de tener una mascota en casa', 'SALUD', 'Sin duda, las mascotas se han convertido en un miembro más de la familia. Cada día son más valoradas, pues más allá de brindar diversión y compañía.', 'La presencia de una mascota en el hogar puede mejorar la calidad de vida y contribuir a mejorar la salud física y mental de las personas.', 200);
insert into ArticuloEntity (id, titulo, tema, contenido, resumen, autor_id) values (200, 'Premios saludables que puedes darle a tu perro', 'CUIDADO', 'Los expertos en educación canina, tanto la vertiente más tradicional como la que aboga por una educación en positivo, son partidarios de los premios para perros.', 'La obesidad y el sobrepeso canino afectan a un porcentaje muy elevado de mascotas, por lo que debemos prestar especial atención a su alimentación. También a los premios que les ofrecemos: mejor caseros y saludables.', 300);
insert into EventoEntity (id, nombre, descripcion, imagen, fechaInicio, fechaFin, organizador_id) values (100, '<NAME>', 'Todo lo que tu mejor amigo necesita en un solo lugar', 'https://www.lanetanoticias.com/wp-content/uploads/2017/07/images-1.jpg', '04/20/2019', '04/24/2019', 100);
insert into EventoEntity (id, nombre, descripcion, imagen, fechaInicio, fechaFin, organizador_id) values (200, 'Peluqueria gratis', 'Acercate al centro comercial Atlanttis y dale a tu mascota un tratamiento de peluqueria gratis', 'https://www.cimformacion.com/blog/wp-content/uploads/perro-en-la-peluqueria-canina.jpg', '05/15/2019', '05/16/2019', 200);
insert into ClasificadoEntity (id, nombre, contenido, enlace, autor_id) values (100, 'Veterinaria 24 horas', 'Servicios de veterinaria a domicilio 24 horas.', 'vetdomicilio.com.co', 200);
insert into ClasificadoEntity (id, nombre, contenido, enlace, autor_id) values (200, 'Entrenamiento canino', 'Servicio de entrenamiento canino y adiestramiento por alguno de nuestros expertos.', 'entrenandoando.com.co', 300);
insert into MascotaEntity (id, nombre, tipo, raza, descripcion) values (100, 'Max', 'PERRO', 'Labrador', 'Max es un labrador de 4 años');
insert into MascotaEntity (id, nombre, tipo, raza, descripcion) values (200, 'Lola', 'PERRO', 'Boston Terrier', 'Lola es una perra de dos años');
insert into MascotaEntity (id, nombre, tipo, raza, descripcion) values (300, 'Mia', 'GATO', 'Criollo', 'Mia es una gatita de 5 años');
insert into MascotaEnAdopcionEntity (id, adoptada, fechaFinal, fechaInicio, pasado, razonAdopcion, duenio_id, mascota_id) values (100 , 0, '04/20/2019' , '04/15/2019', 'La encontramos en la calle hace 3 años y nos enamoramos de ella', 'mi esposa se murió y me pone muy triste ver a mi mascota' , 100 , 100);
insert into MascotaEnAdopcionEntity (id, adoptada, fechaFinal, fechaInicio, pasado, razonAdopcion, duenio_id, mascota_id) values (200 , 1, '05/20/2019' , '05/15/2019', 'Siempre ha sido una mascota muy inquieta y la queremos así como es', 'nos tenemos que mudar a un apartamento más pequeño y queremos que sea libre' , 200 , 200);
insert into MascotaEnAdopcionEntity (id, adoptada, fechaFinal, fechaInicio, pasado, razonAdopcion, duenio_id, mascota_id) values (300 , 1, '06/20/2019' , '06/15/2019', 'Come mucho y es muy inquieta', 'no me gustó tener mascota' , 300 , 300);
insert into CalificacionEntity (id, calificacion, comentario, procesoMascotaEnAdopcion_id) values (100, 5 , 'Excelente servicio, el proceso fue muy confiable y el dueño muy amable',300);
insert into CalificacionEntity (id, calificacion, comentario, procesoMascotaEnAdopcion_id) values (200, 4 , 'Me enamoré de la mascota en el instante que la adopté, ¡ahora soy muy feliz!',200);
insert into MASCOTAENADOPCIONENTITY_USUARIOENTITY values (200,100);
insert into MASCOTAENADOPCIONENTITY_USUARIOENTITY values (300,100);
--faltan foreign keys
insert into MascotaExtraviadaEntity(id, direccion, ciudad, estado) values (100,'cra91#792','Santiago de Chile','PENDIENTE');
insert into MascotaExtraviadaEntity(id, direccion, ciudad, estado) values (200,'cra20#895','Estocolmo','PENDIENTE');
insert into MascotaExtraviadaEntity(id, direccion, ciudad, estado) values (300,'cra92#893','Bogotá','PENDIENTE');
--faltan foreign keys
insert into RecompensaEntity(id, medioDePago, valor, estado) values (100,'efectivo', 1500.0, 'PENDIENTE');
insert into RecompensaEntity(id, medioDePago, valor, estado) values (200,'efectivo', 2500.0, 'PENDIENTE');
insert into RecompensaEntity(id, medioDePago, valor, estado) values (300,'efectivo', 4500.0, 'PENDIENTE');
|
USE SnakesAndLadder;
drop procedure if exists GenerateColorForPlayer;
DELIMITER //
CREATE PROCEDURE GenerateColorForPlayer
(pUsername varchar (50), pGameID int, pObstacleName varchar (10), pTokenID int, pColorNumberRange int)
BEGIN
DECLARE lcColorGenerator int;
DECLARE lcColor varchar (10);
if lcColorGenerator = 1 then
Select ColorOfPlayer from Player
where lcColor = ColorOfPlayer;
set lcColorGenerator = round(RAND() * (pColorNumberRange -1)) + 1;
if lcColorGenerator = 1 then
Select ColorOfPlayer from Player
where lcColor = ColorOfPlayer = 'Red';
else if lcColorGenerator = 2 then
Select ColorOfPlayer from Player
where lcColor = ColorOfPlayer = 'Blue';
else if lcColorGenerator = 3 then
Select ColorOfPlayer from Player
where lcColor = ColorOfPlayer = 'Green';
else if lcColorGenerator = 4 then
Select ColorOfPlayer from Player
where lcColor = ColorOfPlayer = 'Yellow';
insert into Player (Username, ColorOfColor, GameID, TokenD, ObstacleName)
values (pUsername, lcColor, pGameID, pTokenID, pObstacleName);
end if;
end if;
end if;
end if;
end if;
END //
DELIMITER ;
call GenerateColorForPlayer ('Milton619', 3022, 'Ladder', 1, 5);
select * from Player
where Username = 'Milton619';
|
{% macro get_base_times(level='hour', base='1970-01-01') %}
{{ adapter.dispatch('get_base_times', 'dbt_resto') (level, base) }}
{% endmacro %}
{% macro default__get_base_times(level, base) %}
{%- if level == 'second' %}
{# 1 day = 86400 seconds #}
with E1(N) as
(
select 1 union all select 1 union all select 1 union all
select 1 union all select 1 union all select 1 union all
select 1 union all select 1 union all select 1 union all select 1
) --10E+1 or 10 rows
,E2(N) as
(
select 1 from E1 a, E1 b
) --10E+2 or 100 rows
,E3(N) as
(
select 1 from E2 a, E2 b
) --10E+4 or 10,000 rows
,E4(N) as
(
select 1 FROM E3 a, E3 b
) --10E+8 or 100,000,000 rows
,EALL as (
select {% if target.type == 'sqlserver' %} top 86400 {% endif %}
N,
row_number() over (order by N) as value
from E4
order by 2
{% if target.type != 'sqlserver' %} limit 86400 {% endif %}
)
select dateadd(second, value, '{{ base }}') as time_value
from EALL
{%- elif level == 'minute' %}
{# 1 day = 1440 minutes #}
{%- for value in range(0, 1440) %}
select dateadd(minute, {{ value }}, '{{ base }}') as time_value
{%- if not loop.last %}
union all
{%- endif %}
{%- endfor %}
{%- else %}
{# 1 day = 24 hours #}
{%- for value in range(0, 24) %}
select dateadd(hour, {{ value }}, '{{ base }}') as time_value
{%- if not loop.last %}
union all
{%- endif %}
{%- endfor %}
{%- endif %}
{% endmacro %}
|
<reponame>PaulLandaeta/BaseDatos2020
CREATE DATABASE IF NOT EXISTS `cuarentena` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `cuarentena`;
-- MySQL dump 10.13 Distrib 8.0.19, for macos10.15 (x86_64)
--
-- Host: localhost Database: cuarentena
-- ------------------------------------------------------
-- Server version 5.7.18
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES 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 `Consulta`
--
DROP TABLE IF EXISTS `Consulta`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Consulta` (
`PacienteID` int(11) NOT NULL,
`DoctorID` int(11) NOT NULL,
`fecha` datetime DEFAULT NULL,
PRIMARY KEY (`PacienteID`,`DoctorID`),
KEY `DoctorID` (`DoctorID`),
CONSTRAINT `consulta_ibfk_1` FOREIGN KEY (`PacienteID`) REFERENCES `Paciente` (`ID`),
CONSTRAINT `consulta_ibfk_2` FOREIGN KEY (`DoctorID`) REFERENCES `Doctor` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Consulta`
--
LOCK TABLES `Consulta` WRITE;
/*!40000 ALTER TABLE `Consulta` DISABLE KEYS */;
/*!40000 ALTER TABLE `Consulta` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `Consultorio`
--
DROP TABLE IF EXISTS `Consultorio`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Consultorio` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`piso` int(11) NOT NULL,
`nro` int(11) NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Consultorio`
--
LOCK TABLES `Consultorio` WRITE;
/*!40000 ALTER TABLE `Consultorio` DISABLE KEYS */;
/*!40000 ALTER TABLE `Consultorio` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `Doctor`
--
DROP TABLE IF EXISTS `Doctor`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Doctor` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`personaID` int(11) NOT NULL,
`consultorioID` int(11) NOT NULL,
`especialidadID` int(11) NOT NULL,
PRIMARY KEY (`ID`),
KEY `personaID` (`personaID`),
KEY `consultorioID` (`consultorioID`),
KEY `especialidadID` (`especialidadID`),
CONSTRAINT `doctor_ibfk_1` FOREIGN KEY (`personaID`) REFERENCES `Persona` (`CI`),
CONSTRAINT `doctor_ibfk_2` FOREIGN KEY (`consultorioID`) REFERENCES `Consultorio` (`ID`),
CONSTRAINT `doctor_ibfk_3` FOREIGN KEY (`especialidadID`) REFERENCES `Especialidad` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Doctor`
--
LOCK TABLES `Doctor` WRITE;
/*!40000 ALTER TABLE `Doctor` DISABLE KEYS */;
/*!40000 ALTER TABLE `Doctor` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `Especialidad`
--
DROP TABLE IF EXISTS `Especialidad`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Especialidad` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`nombre` varchar(30) DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Especialidad`
--
LOCK TABLES `Especialidad` WRITE;
/*!40000 ALTER TABLE `Especialidad` DISABLE KEYS */;
/*!40000 ALTER TABLE `Especialidad` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `Paciente`
--
DROP TABLE IF EXISTS `Paciente`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Paciente` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`personaID` int(11) NOT NULL,
`fechaIngreso` datetime DEFAULT NULL,
PRIMARY KEY (`ID`),
KEY `personaID` (`personaID`),
CONSTRAINT `paciente_ibfk_1` FOREIGN KEY (`personaID`) REFERENCES `Persona` (`CI`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Paciente`
--
LOCK TABLES `Paciente` WRITE;
/*!40000 ALTER TABLE `Paciente` DISABLE KEYS */;
/*!40000 ALTER TABLE `Paciente` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `Persona`
--
DROP TABLE IF EXISTS `Persona`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Persona` (
`CI` int(11) NOT NULL,
`nombres` varchar(30) DEFAULT NULL,
`apellidos` varchar(30) DEFAULT NULL,
`fechaNacimiento` datetime DEFAULT NULL,
PRIMARY KEY (`CI`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Persona`
--
LOCK TABLES `Persona` WRITE;
/*!40000 ALTER TABLE `Persona` DISABLE KEYS */;
/*!40000 ALTER TABLE `Persona` 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 2020-03-17 5:17:46
|
<reponame>captainabap/Einstieg-in-SQLScript<filename>Listings/Kapitel 2/Listing 2.41.sql
-- Listing 2.41.sql
-- Ausführung des Tests
SELECT
erwarteter_Preis,
udf_versandpreis(laenge,
breite,
hoehe,
gewicht,
als_paeckchen,
ist_online).rv_preis
- erwarteter_preis AS abweichung,
udf_versandpreis(laenge,
breite,
hoehe,
gewicht,
als_paeckchen,
ist_online).rv_meldung AS meldung
FROM TEST_VERSANDPREISE
|
<reponame>HaqiAchmad/tugas-basis-data
/*
@author <NAME> / 01 / XII RPL-1
*/
---- Tugas rumah Soal no 1c
SELECT i.nip, i.nama, i.jurusan, i.asal_kota
FROM instruktur i
LEFT OUTER JOIN ambil_mk ak
ON i.nip = ak.nip
WHERE ak.nip IS NULL;
----> Copyright © 2020. <NAME>.
|
<filename>src/Microsoft.Health.Fhir.SqlServer/Features/Schema/Sql/Sprocs/GetResourcesByTypeAndSurrogateIdRange.sql
--DROP PROCEDURE dbo.GetResourcesByTypeAndSurrogateIdRange
GO
CREATE PROCEDURE dbo.GetResourcesByTypeAndSurrogateIdRange @ResourceTypeId smallint, @StartId bigint, @EndId bigint, @GlobalStartId bigint = NULL, @GlobalEndId bigint = NULL
AS
set nocount on
DECLARE @SP varchar(100) = 'GetResourcesByTypeAndSurrogateIdRange'
,@Mode varchar(100) = 'RT='+isnull(convert(varchar,@ResourceTypeId),'NULL')
+' S='+isnull(convert(varchar,@StartId),'NULL')
+' E='+isnull(convert(varchar,@EndId),'NULL')
+' GS='+isnull(convert(varchar,@GlobalStartId),'NULL')
+' GE='+isnull(convert(varchar,@GlobalEndId),'NULL')
,@st datetime = getUTCdate()
BEGIN TRY
DECLARE @ResourceIds TABLE (ResourceId varchar(64) COLLATE Latin1_General_100_CS_AS, ResourceSurrogateId bigint, RowId int, PRIMARY KEY (ResourceId, RowId))
IF @GlobalStartId IS NULL -- export from time zero (no lower boundary)
SET @GlobalStartId = 0
IF @GlobalEndId IS NOT NULL -- snapshot view
INSERT INTO @ResourceIds
SELECT ResourceId, ResourceSurrogateId, RowId = row_number() OVER (PARTITION BY ResourceId ORDER BY ResourceSurrogateId)
FROM dbo.Resource
WHERE ResourceTypeId = @ResourceTypeId
AND ResourceId IN (SELECT DISTINCT ResourceId
FROM dbo.Resource
WHERE ResourceTypeId = @ResourceTypeId
AND ResourceSurrogateId BETWEEN @StartId AND @EndId
AND IsHistory = 1
)
AND ResourceSurrogateId BETWEEN @GlobalStartId AND @GlobalEndId
IF EXISTS (SELECT * FROM @ResourceIds)
BEGIN
DECLARE @SurrogateIdMap TABLE (MinSurrogateId bigint, MaxSurrogateId bigint)
INSERT INTO @SurrogateIdMap
SELECT MinSurrogateId = A.ResourceSurrogateId
,MaxSurrogateId = C.ResourceSurrogateId
FROM (SELECT * FROM @ResourceIds WHERE RowId = 1 AND ResourceSurrogateId BETWEEN @StartId AND @EndId) A
CROSS APPLY (SELECT ResourceSurrogateId FROM @ResourceIds B WHERE B.ResourceId = A.ResourceId) C
SELECT isnull(C.RawResource, A.RawResource)
FROM dbo.Resource A
LEFT OUTER JOIN @SurrogateIdMap B ON B.MinSurrogateId = A.ResourceSurrogateId
LEFT OUTER JOIN dbo.Resource C ON C.ResourceTypeId = @ResourceTypeId AND C.ResourceSurrogateId = MaxSurrogateId
WHERE A.ResourceTypeId = @ResourceTypeId
AND A.ResourceSurrogateId BETWEEN @StartId AND @EndId
AND (A.IsHistory = 0 OR MaxSurrogateId IS NOT NULL)
END
ELSE
SELECT RawResource
FROM dbo.Resource
WHERE ResourceTypeId = @ResourceTypeId
AND ResourceSurrogateId BETWEEN @StartId AND @EndId
AND IsHistory = 0
AND IsDeleted = 0
EXECUTE dbo.LogEvent @Process=@SP,@Mode=@Mode,@Status='End',@Start=@st,@Rows=@@rowcount
END TRY
BEGIN CATCH
IF error_number() = 1750 THROW -- Real error is before 1750, cannot trap in SQL.
EXECUTE dbo.LogEvent @Process=@SP,@Mode=@Mode,@Status='Error';
THROW
END CATCH
GO
--set nocount on
--DECLARE @Ranges TABLE (UnitId int PRIMARY KEY, MinId bigint, MaxId bigint, Cnt int)
--INSERT INTO @Ranges
-- EXECUTE dbo.GetResourceSurrogateIdRanges 96, 0, 9e18, 90000, 10
--SELECT count(*) FROM @Ranges
--DECLARE @UnitId int
-- ,@MinId bigint
-- ,@MaxId bigint
--DECLARE @Resources TABLE (RawResource varbinary(max))
--WHILE EXISTS (SELECT * FROM @Ranges)
--BEGIN
-- SELECT TOP 1 @UnitId = UnitId, @MinId = MinId, @MaxId = MaxId FROM @Ranges ORDER BY UnitId
-- INSERT INTO @Resources
-- EXECUTE dbo.GetResourcesByTypeAndSurrogateIdRange 96, @MinId, @MaxId, NULL, @MaxId -- last is to invoke snapshot logic
-- DELETE FROM @Resources
-- DELETE FROM @Ranges WHERE UnitId = @UnitId
--END
|
<filename>src/SFA.Apprenticeships.Data.AvmsPlus/dbo/Tables/MasterUPIN.sql
CREATE TABLE [dbo].[MasterUPIN] (
[MasterUPINId] INT IDENTITY (-1, -1) NOT FOR REPLICATION NOT NULL,
[UKPRN] INT NOT NULL,
[UPIN] INT NOT NULL,
CONSTRAINT [PK_MasterUPIN] PRIMARY KEY CLUSTERED ([MasterUPINId] ASC),
CONSTRAINT [uq_idx_MasterUPIN] UNIQUE NONCLUSTERED ([UKPRN] ASC, [UPIN] ASC)
);
|
<gh_stars>1-10
-- Copyright Materialize, Inc. All rights reserved.
--
-- Use of this software is governed by the Business Source License
-- included in the LICENSE file at the root of this repository.
--
-- As of the Change Date specified in that file, in accordance with
-- the Business Source License, use of this software will be governed
-- by the Apache License, Version 2.0.
-- Get time spent in each Worker
SELECT mz_cluster_id() AS mz_cluster_id,
mz_logical_timestamp()::float AS mz_logical_timestamp,
mz_scheduling_elapsed.worker AS mz_scheduling_worker_id,
sum(mz_scheduling_elapsed.elapsed_ns)::bigint AS mz_scheduling_elapsed_ns
FROM mz_scheduling_elapsed
GROUP BY mz_scheduling_elapsed.worker
ORDER BY mz_scheduling_elapsed.worker ASC;
|
<reponame>rayxuln/JianDan_ChargeWebService_BackEnd
-- MySQL dump 10.13 Distrib 5.7.31, for Linux (x86_64)
--
-- Host: localhost Database: wuye
-- ------------------------------------------------------
-- Server version 5.7.31-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES 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 `charge`
--
DROP TABLE IF EXISTS `charge`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `charge` (
`charge_id` int(11) NOT NULL AUTO_INCREMENT,
`house_id` varchar(20) NOT NULL,
`charge` decimal(10,2) NOT NULL DEFAULT '0.00',
`owner_id` int(11) DEFAULT NULL,
`date` varchar(20) NOT NULL,
`staff_id` varchar(20) NOT NULL,
`type` varchar(20) NOT NULL,
`number` decimal(10,2) NOT NULL DEFAULT '0.00',
`charge_ym_start` varchar(20) NOT NULL,
`charge_ym_end` varchar(20) NOT NULL,
PRIMARY KEY (`charge_id`),
KEY `charge_house_house_id_fk` (`house_id`),
KEY `charge_house_owner_owner_id_fk` (`owner_id`),
KEY `charge_user_staff_id_fk` (`staff_id`),
KEY `charge_charge_id_index` (`charge_id`),
CONSTRAINT `charge_house_house_id_fk` FOREIGN KEY (`house_id`) REFERENCES `house` (`house_id`),
CONSTRAINT `charge_house_owner_owner_id_fk` FOREIGN KEY (`owner_id`) REFERENCES `house_owner` (`owner_id`),
CONSTRAINT `charge_user_staff_id_fk` FOREIGN KEY (`staff_id`) REFERENCES `user` (`staff_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `charge`
--
LOCK TABLES `charge` WRITE;
/*!40000 ALTER TABLE `charge` DISABLE KEYS */;
INSERT INTO `charge` (`charge_id`, `house_id`, `charge`, `owner_id`, `date`, `staff_id`, `type`, `number`, `charge_ym_start`, `charge_ym_end`) VALUES (1,'A37',0.00,1,'2020-10-8','admin','物业费',0.00,'2020-1','2020-2'),(2,'B32',15.00,2,'2020-10-8','admin','电梯费',3.00,'2020-1','2020-2'),(3,'B32',2.80,2,'2020-10-8','admin','水费',4.00,'2020-1','2020-2'),(4,'B32',24.00,2,'2020-10-8','admin','电费',30.00,'2020-1','2020-2'),(5,'C32',0.11,NULL,'2020-10-8','10088','物业费',0.11,'2020-1','2020-3'),(6,'C32',0.04,NULL,'2020-10-8','10088','电费',0.05,'2020-1','2020-3'),(7,'A37',3.00,1,'2020-10-8','admin','物业费',3.00,'2020-1','2020-2'),(8,'A37',25.00,1,'2020-10-8','admin','电梯费',5.00,'2020-1','2020-2'),(9,'A37',4.90,1,'2020-10-8','admin','水费',7.00,'2020-1','2020-2'),(10,'A37',4.00,1,'2020-10-8','admin','电费',5.00,'2020-1','2020-2');
/*!40000 ALTER TABLE `charge` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `dept`
--
DROP TABLE IF EXISTS `dept`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `dept` (
`dept_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) DEFAULT NULL,
`phone` varchar(11) DEFAULT NULL,
PRIMARY KEY (`dept_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `dept`
--
LOCK TABLES `dept` WRITE;
/*!40000 ALTER TABLE `dept` DISABLE KEYS */;
INSERT INTO `dept` (`dept_id`, `name`, `phone`) VALUES (1,'收费部','88868876'),(2,'企划部','77789977');
/*!40000 ALTER TABLE `dept` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `house`
--
DROP TABLE IF EXISTS `house`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `house` (
`house_id` varchar(20) NOT NULL,
`area` decimal(10,2) DEFAULT NULL,
`owner_id` int(11) DEFAULT NULL,
PRIMARY KEY (`house_id`),
KEY `owner_id` (`owner_id`),
CONSTRAINT `owner_id` FOREIGN KEY (`owner_id`) REFERENCES `house_owner` (`owner_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `house`
--
LOCK TABLES `house` WRITE;
/*!40000 ALTER TABLE `house` DISABLE KEYS */;
INSERT INTO `house` (`house_id`, `area`, `owner_id`) VALUES ('A37',120.00,1),('A38',100.00,1),('B32',124.00,2),('C32',150.00,NULL),('C33',150.00,3);
/*!40000 ALTER TABLE `house` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `house_owner`
--
DROP TABLE IF EXISTS `house_owner`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `house_owner` (
`owner_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) DEFAULT NULL,
`employer` varchar(20) DEFAULT NULL,
`phone` varchar(11) DEFAULT NULL,
PRIMARY KEY (`owner_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `house_owner`
--
LOCK TABLES `house_owner` WRITE;
/*!40000 ALTER TABLE `house_owner` DISABLE KEYS */;
INSERT INTO `house_owner` (`owner_id`, `name`, `employer`, `phone`) VALUES (1,'李二狗','个体','13712847389'),(2,'黄刚蛋','西大街淡水菜市场','13792937123'),(3,'余大黑','蓝天白云责任有限公司',NULL);
/*!40000 ALTER TABLE `house_owner` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `test1`
--
DROP TABLE IF EXISTS `test1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `test1`
--
LOCK TABLES `test1` WRITE;
/*!40000 ALTER TABLE `test1` DISABLE KEYS */;
INSERT INTO `test1` (`id`, `name`) VALUES (1,'Jack');
/*!40000 ALTER TABLE `test1` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user`
--
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user` (
`staff_id` varchar(20) NOT NULL,
`pwd` varchar(20) NOT NULL,
`name` varchar(20) DEFAULT NULL,
`birthday` varchar(20) DEFAULT NULL,
`gender` varchar(20) DEFAULT NULL,
`phone` varchar(11) DEFAULT NULL,
`address` varchar(50) DEFAULT NULL,
`position` varchar(20) DEFAULT NULL,
`dept_id` int(11) DEFAULT NULL,
PRIMARY KEY (`staff_id`),
KEY `user_dept_dept_id_fk` (`dept_id`),
CONSTRAINT `user_dept_dept_id_fk` FOREIGN KEY (`dept_id`) REFERENCES `dept` (`dept_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user`
--
LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` (`staff_id`, `pwd`, `name`, `birthday`, `gender`, `phone`, `address`, `position`, `dept_id`) VALUES ('10086','jiandan10086','王五','1999-3','女','13812374823','南纬一路32号','收费员工',1),('10087','jiandan10087','李四','1994-3','男','13812374824','南纬一路33号','收费员工',NULL),('10088','jiandan10088','吉安娜','2020-2','女','','','收费员工',NULL),('10089','jiandan10089','无名氏','2020-1','女','','火星','收费员工',1),('admin','jiandanadmin','张全蛋','1978-7','男','13812374827','北纬一路32号','部门经理',1);
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2020-10-08 16:50:11
|
CREATE TABLE subdivision_CL (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision_CL" ("id", "name", "level") VALUES (E'CL-AT', E'Atacama', E'region');
INSERT INTO "subdivision_CL" ("id", "name", "level") VALUES (E'CL-BI', E'Biobío', E'region');
INSERT INTO "subdivision_CL" ("id", "name", "level") VALUES (E'CL-RM', E'Región hlavného mesta Santiago', E'region');
INSERT INTO "subdivision_CL" ("id", "name", "level") VALUES (E'CL-VS', E'Valparaíso', E'region');
|
CREATE DATABASE test;
USE test;
-- a single table is used for all events in the cqrs system
CREATE TABLE events
(
aggregate_type VARCHAR(256) NOT NULL,
aggregate_id VARCHAR(256) NOT NULL,
sequence bigint CHECK (sequence >= 0),
payload TEXT ,
metadata TEXT ,
timestamp timestamp DEFAULT (CURRENT_TIMESTAMP),
PRIMARY KEY (aggregate_type, aggregate_id, sequence)
);
-- this table is only needed if snapshotting is employed
CREATE TABLE snapshots
(
aggregate_type VARCHAR(256) NOT NULL,
aggregate_id VARCHAR(256) NOT NULL,
version bigint CHECK (version >= 0) ,
payload TEXT ,
timestamp timestamp DEFAULT (CURRENT_TIMESTAMP),
PRIMARY KEY (aggregate_type, aggregate_id)
);
-- a single table is used for all queries in the cqrs system
CREATE TABLE queries
(
aggregate_type VARCHAR(256) NOT NULL,
aggregate_id VARCHAR(256) NOT NULL,
query_type VARCHAR(256) NOT NULL,
version bigint CHECK (version >= 0),
payload TEXT ,
PRIMARY KEY (aggregate_type, aggregate_id, query_type)
);
CREATE
USER
'test_user'@'%'
IDENTIFIED BY
'<PASSWORD>';
GRANT
ALL privileges
ON
test.*
TO
'test_user'@'%';
FLUSH PRIVILEGES;
|
<filename>public_html/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-24.sql
INSERT INTO `#__extensions` (`extension_id`, `package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(485, 0, 'plg_system_privacyconsent', 'plugin', 'privacyconsent', 'system', 0, 0, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);
CREATE TABLE IF NOT EXISTS `#__privacy_consents` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned NOT NULL DEFAULT 0,
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`subject` varchar(255) NOT NULL DEFAULT '',
`body` text NOT NULL,
`remind` tinyint(4) NOT NULL DEFAULT 0,
`token` varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
|
with base as (
select *
from {{ ref('stg_apple_store__downloads_device_tmp') }}
),
fields as (
select
{{
fivetran_utils.fill_staging_columns(
source_columns=adapter.get_columns_in_relation(ref('stg_apple_store__downloads_device_tmp')),
staging_columns=get_downloads_device_columns()
)
}}
from base
),
final as (
select
cast(date as date) as date_day,
app_id,
source_type,
device,
first_time_downloads,
redownloads,
total_downloads
from fields
)
select *
from final
|
alter table TESTERY_TESTSTEP_INPUT add column NAME varchar(255) ^
update TESTERY_TESTSTEP_INPUT set NAME = '' where NAME is null ;
alter table TESTERY_TESTSTEP_INPUT alter column NAME set not null ;
|
-- mysql data
insert into Players values (1,'Hazard','Eden','Chelsea','Center Midfield');
|
<reponame>nikosnikolaidis/sis
--
-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
-- http://www.apache.org/licenses/LICENSE-2.0
--
--
-- This script creates some tables needed for SIS pre-defined Citation constants.
-- We do not need to create all tables or all table columns here; missing tables
-- and columns will be added on-the-fly by SIS as needed. Enumeration values are
-- replaced by VARCHAR on databases that do not support the ENUM type.
--
-- In this schema, the following arbitrary lengths are used:
--
-- VARCHAR(15) for primary keys or foreigner keys.
-- VARCHAR(120) for character sequences.
--
CREATE SCHEMA metadata;
GRANT USAGE ON SCHEMA metadata TO PUBLIC;
COMMENT ON SCHEMA metadata IS 'ISO 19115 metadata';
--
-- All URLs referenced in this SQL file. Unless otherwise specified, the function of all those URLs
-- is 'information'. URLs may appear in citations or in contact information of responsible parties.
--
CREATE TYPE metadata."OnLineFunctionCode" AS ENUM (
'download', 'information', 'offlineAccess', 'order', 'search', 'completeMetadata', 'browseGraphic',
'upload', 'emailService', 'browsing', 'fileAccess');
CREATE TABLE metadata."OnlineResource" (
"ID" VARCHAR(15) NOT NULL PRIMARY KEY,
"linkage" VARCHAR(120),
"function" metadata."OnLineFunctionCode");
INSERT INTO metadata."OnlineResource" ("ID", "linkage") VALUES
('EPSG', 'http://www.epsg.org/'),
('ESRI', 'http://www.esri.com/'),
('GeoTIFF', 'https://trac.osgeo.org/geotiff/'),
('IHO', 'https://www.iho.int/'),
('IOGP', 'http://www.iogp.org/'),
('ISBN', 'https://www.isbn-international.org/'),
('ISSN', 'http://www.issn.org/'),
('ISO', 'http://www.iso.org/'),
('NetCDF', 'https://www.unidata.ucar.edu/software/netcdf/'),
('OGC', 'http://www.opengeospatial.org/'),
('OGCNA', 'http://www.opengeospatial.org/ogcna'),
('Oracle', 'http://www.oracle.com/'),
('OSGeo', 'https://www.osgeo.org/'),
('PostGIS', 'https://postgis.net/'),
('Proj4', 'https://proj4.org/'),
('SIS', 'http://sis.apache.org/'),
('WMS', 'http://www.opengeospatial.org/standards/wms');
UPDATE metadata."OnlineResource" SET "function" = 'information';
--
-- The "ID" and "name" columns in "Organisation" table are inherited from the "Party" parent table.
-- But we nevertheless repeat those columns for databases that do not support table inheritance.
-- On PostgreSQL, those duplicated declarations are merged in single columns.
--
CREATE TABLE metadata."Party" (
"ID" VARCHAR(15) NOT NULL PRIMARY KEY,
"name" VARCHAR(120));
CREATE TABLE metadata."Organisation" (
"ID" VARCHAR(15) NOT NULL PRIMARY KEY,
"name" VARCHAR(120))
INHERITS (metadata."Party");
CREATE TYPE metadata."RoleCode" AS ENUM (
'resourceProvider', 'custodian', 'owner', 'user', 'distributor', 'originator', 'pointOfContact',
'principalInvestigator', 'processor', 'publisher', 'author', 'sponsor', 'coAuthor', 'collaborator',
'editor', 'mediator', 'rightsHolder', 'contributor', 'funder', 'stakeholder');
--
-- Foreigner key should reference the "Party" parent table, but it does not yet work on PostgreSQL
-- (tested on 9.5.13). For the purpose of this file, we need to reference "Organisation" only.
-- This constraint can be dropped at end of the installation scripts.
--
CREATE TABLE metadata."Responsibility" (
"ID" VARCHAR(15) NOT NULL PRIMARY KEY,
"role" metadata."RoleCode",
"party" VARCHAR(15) REFERENCES metadata."Organisation" ("ID") ON UPDATE RESTRICT ON DELETE RESTRICT);
--
-- All parties referenced in this SQL file. We currently have only organisations, no individuals.
-- This SQL file has a one-to-one relationship between "Party" (organisation) and "Responsibility"
-- but sometime with different identifiers for emphasising on the product rather than the company.
--
INSERT INTO metadata."Organisation" ("ID", "name") VALUES
('{org}Apache', 'The Apache Software Foundation'),
('{org}ESRI', 'ESRI'),
('{org}IHO', 'International Hydrographic Organization'),
('{org}IOGP', 'International Association of Oil & Gas producers'),
('{org}ISBN', 'International ISBN Agency'),
('{org}ISSN', 'The International Centre for the registration of serial publications'),
('{org}ISO', 'International Organization for Standardization'),
('{org}NATO', 'North Atlantic Treaty Organization'),
('{org}OGC', 'Open Geospatial Consortium'),
('{org}OSGeo', 'The Open Source Geospatial Foundation'),
('{org}PBI', 'Pitney Bowes Inc.');
INSERT INTO metadata."Responsibility" ("ID", "party", "role") VALUES
('Apache', '{org}Apache', 'resourceProvider'),
('ESRI', '{org}ESRI', 'principalInvestigator'),
('IHO', '{org}IHO', 'principalInvestigator'),
('IOGP', '{org}IOGP', 'principalInvestigator'),
('ISBN', '{org}ISBN', 'principalInvestigator'),
('ISSN', '{org}ISSN', 'principalInvestigator'),
('ISO', '{org}ISO', 'principalInvestigator'),
('MapInfo', '{org}PBI', 'principalInvestigator'),
('NATO', '{org}NATO', 'principalInvestigator'),
('OGC', '{org}OGC', 'principalInvestigator'),
('OSGeo', '{org}OSGeo', 'resourceProvider');
--
-- Definition of the Citations and its dependencies.
--
CREATE TYPE metadata."DateTypeCode" AS ENUM (
'creation', 'publication', 'revision', 'expiry', 'lastUpdate', 'lastRevision', 'nextUpdate',
'unavailable', 'inForce', 'adopted', 'deprecated', 'superseded', 'validityBegins', 'validityExpires',
'released', 'distribution');
CREATE TABLE metadata."Date" (
"ID" VARCHAR(15) NOT NULL PRIMARY KEY,
"date" TIMESTAMP,
"dateType" metadata."DateTypeCode");
CREATE TYPE metadata."PresentationFormCode" AS ENUM (
'documentDigital', 'documentHardcopy',
'imageDigital', 'imageHardcopy',
'mapDigital', 'mapHardcopy',
'modelDigital', 'modelHardcopy',
'profileDigital', 'profileHardcopy',
'tableDigital', 'tableHardcopy',
'videoDigital', 'videoHardcopy');
CREATE TABLE metadata."Identifier" (
"ID" VARCHAR(15) NOT NULL PRIMARY KEY,
"authority" VARCHAR(15),
"code" VARCHAR(120),
"codeSpace" VARCHAR(120),
"version" VARCHAR(120));
CREATE TABLE metadata."Citation" (
"ID" VARCHAR(15) NOT NULL PRIMARY KEY,
"title" VARCHAR(120),
"alternateTitle" VARCHAR(120),
"date" VARCHAR(15) REFERENCES metadata."Date" ("ID") ON UPDATE RESTRICT ON DELETE RESTRICT,
"edition" VARCHAR(120),
"editionDate" TIMESTAMP,
"identifier" VARCHAR(15) REFERENCES metadata."Identifier" ("ID") ON UPDATE RESTRICT ON DELETE RESTRICT,
"citedResponsibleParty" VARCHAR(15) REFERENCES metadata."Responsibility" ("ID") ON UPDATE RESTRICT ON DELETE RESTRICT,
"presentationForm" metadata."PresentationFormCode",
"onlineResource" VARCHAR(15) REFERENCES metadata."OnlineResource" ("ID") ON UPDATE RESTRICT ON DELETE RESTRICT);
ALTER TABLE metadata."Identifier" ADD CONSTRAINT fk_identifier_citation
FOREIGN KEY ("authority") REFERENCES metadata."Citation" ("ID") ON UPDATE RESTRICT ON DELETE RESTRICT;
--
-- Specifications, data or softwares referenced by the "Citations" class.
-- Those citations are not organizations; they are resources published by
-- organizations. Each identifier codespace identifies the organization.
--
-- Some citations are used as "authority" for defining codes in a codespace
-- (for example EPSG codes). The authority codespace is not necessarily the
-- code or codespace of the citation's identifier. The authority codespaces
-- are hard-coded in the Citations class and do not appear here.
--
-- Rows below are sorted in specifications first, then tables, then softwares.
-- There is almost a one-to-one relationship between identifiers and citations.
--
INSERT INTO metadata."Identifier" ("ID", "code", "codeSpace", "version") VALUES
('ISO 19115-1', '19115-1', 'ISO', '2014'),
('ISO 19115-2', '19115-2', 'ISO', '2019'),
('IHO S-57', 'S-57', 'IHO', '3.1'),
('WMS', 'WMS', 'OGC', '1.3'),
('EPSG', 'EPSG', 'IOGP', NULL),
('ArcGIS', 'ArcGIS', 'ESRI', NULL),
('MapInfo', 'MapInfo', '<NAME>', NULL),
('Proj4', 'Proj4', 'OSGeo', NULL),
('SIS', 'SIS', 'Apache', NULL);
INSERT INTO metadata."Citation" ("ID", "onlineResource", "edition", "citedResponsibleParty", "presentationForm", "alternateTitle" , "title") VALUES
('ISBN', 'ISBN', NULL, 'ISBN', NULL, 'ISBN', 'International Standard Book Number'),
('ISSN', 'ISSN', NULL, 'ISSN', NULL, 'ISSN', 'International Standard Serial Number'),
('ISO 19115-1', NULL, 'ISO 19115-1:2014', 'ISO', 'documentDigital', 'ISO 19115-1', 'Geographic Information — Metadata Part 1: Fundamentals'),
('ISO 19115-2', NULL, 'ISO 19115-2:2019', 'ISO', 'documentDigital', 'ISO 19115-2', 'Geographic Information — Metadata Part 2: Extensions for imagery and gridded data'),
('IHO S-57', NULL, '3.1', 'IHO', 'documentDigital', 'S-57', 'IHO transfer standard for digital hydrographic data'),
('MGRS', NULL, NULL, 'NATO', 'documentDigital', NULL, 'Military Grid Reference System'),
('WMS', 'WMS', '1.3', 'OGC', 'documentDigital', 'WMS', 'Web Map Server'),
('EPSG', 'EPSG', NULL, 'IOGP', 'tableDigital', 'EPSG Dataset', 'EPSG Geodetic Parameter Dataset'),
('ArcGIS', 'ESRI', NULL, 'ESRI', NULL, NULL, 'ArcGIS'),
('MapInfo', NULL, NULL, 'MapInfo', NULL, 'MapInfo', 'MapInfo Pro'),
('Proj4', 'Proj4', NULL, 'OSGeo', NULL, 'Proj', 'PROJ coordinate transformation software library'),
('SIS', 'SIS', NULL, 'Apache', NULL, 'Apache SIS', 'Apache Spatial Information System');
--
-- Citations for organizations. They should not be citations; they are "responsible parties" instead.
-- But we have to declare some organizations as "citations" because this is the kind of object required
-- by the "authority" attribute of factories.
--
-- Instead than repeating the organization name, the title should reference some naming authority
-- in that organization. The identifier should have no codespace, and the identifier code should be
-- the codespace of objects created by the authority represented by that organisation.
--
INSERT INTO metadata."Identifier" ("ID", "code") VALUES
('OGC', 'OGC'),
('IOGP', 'IOGP');
INSERT INTO metadata."Citation" ("ID", "onlineResource", "citedResponsibleParty", "presentationForm", "title") VALUES
('OGC', 'OGCNA', 'OGC', 'documentDigital', 'OGC Naming Authority'),
('IOGP', 'IOGP', 'IOGP', 'documentDigital', 'IOGP Surveying and Positioning Guidance Note 7');
UPDATE metadata."Citation" SET "identifier" = "ID" WHERE "ID"<>'ISBN' AND "ID"<>'ISSN' AND "ID"<>'MGRS';
|
<reponame>ATLANTBH/owl<gh_stars>10-100
-- Add missing constraints
-- Clear test runs which do not have test suites
DELETE FROM test_runs
WHERE test_suites_id IS NULL OR NOT EXISTS(SELECT * FROM test_suites WHERE id = test_suites_id);
-- Drop previous constraints
ALTER TABLE test_runs
DROP CONSTRAINT IF EXISTS test_runs_test_suites_fk;
ALTER TABLE test_runs
ADD CONSTRAINT test_runs_test_suites_fk
FOREIGN KEY (test_suites_id)
REFERENCES test_suites(id);
DROP INDEX IF EXISTS test_runs_test_suites_fk;
CREATE INDEX test_runs_test_suites_fk ON test_runs(test_suites_id);
-- Clear test cases which do not have test runs
DELETE FROM test_cases
WHERE test_runs_id IS NULL OR NOT EXISTS(SELECT * FROM test_runs WHERE id = test_runs_id);
-- Drop previous constraints
ALTER TABLE test_cases
DROP CONSTRAINT IF EXISTS test_cases_test_runs_fk;
ALTER TABLE test_cases
ADD CONSTRAINT test_cases_test_runs_fk
FOREIGN KEY (test_runs_id)
REFERENCES test_runs(id);
DROP INDEX IF EXISTS test_cases_test_runs_idx;
CREATE INDEX test_cases_test_runs_idx ON test_cases(test_runs_id);
-- Create index on build number column in test runs
DROP INDEX IF EXISTS test_runs_build_number_idx;
CREATE INDEX test_runs_build_number_idx ON test_runs(build);
-- Create index on build number column in test runs
DROP INDEX IF EXISTS test_cases_test_group_idx;
CREATE INDEX test_cases_test_group_idx ON test_cases(test_group);
-- Add helper function
CREATE OR REPLACE function f_add_col(_tbl regclass, _col text, _type regtype)
RETURNS bool AS
$func$
BEGIN
IF EXISTS (SELECT 1 FROM pg_attribute
WHERE attrelid = _tbl
AND attname = _col
AND NOT attisdropped) THEN
RETURN FALSE;
ELSE
EXECUTE format('ALTER TABLE %s ADD COLUMN %I %s', _tbl, _col, _type);
RETURN TRUE;
END IF;
END
$func$ LANGUAGE plpgsql;
-- Add git info columns
SELECT f_add_col('public.test_runs', 'git_hash', 'VARCHAR(255)');
SELECT f_add_col('public.test_runs', 'git_branch', 'VARCHAR(255)');
SELECT f_add_col('public.test_cases', 'notes', 'TEXT');
ALTER TABLE test_suites DROP CONSTRAINT IF EXISTS test_suites_suite_uq;
ALTER TABLE test_suites ADD CONSTRAINT test_suites_suite_uq UNIQUE (suite);
|
<reponame>LanceByun/DQUEEN_OMOP_CDM_Version
--
insert into @resultSchema.dq_check_result
select
'C204' as check_id
,s1.tb_id as stratum1
,d1.*
from
(select
d1.tbnm as stratum2
,d1.colnm as stratum3
,null as stratum4
,'Inpatinets should be have datetime' as stratum5
,count(*) as count_val
,null as num_val
,null as txt_val
from
(select
'DRUG_EXPOSURE' as tbnm
,'DRUG_EXPOSURE_START_DATETIME' as colnm
,DRUG_EXPOSURE_ID
,DRUG_EXPOSURE_START_DATETIME
,visit_occurrence_id
from @cdmSchema.DRUG_EXPOSURE) as d1
inner join
(select
visit_occurrence_id
,visit_concept_id
from @cdmSchema.visit_occurrence) as v1
on v1.visit_occurrence_id = d1.visit_occurrence_id
group by d1.tbnm, d1.colnm) as d1
inner join
(select distinct tb_id, tbnm from @resultSchema.schema_info) as s1
on d1.stratum2 = s1.tbnm
--
insert into @resultSchema.dq_check_result
select
'C204' as check_id
,s1.tb_id as stratum1
,d1.*
from
(
select
d1.tbnm as stratum2
,d1.colnm as stratum3
,null as stratum4
,'Inpatinets should be have datetime' as stratum5
,count(*) as count_val
,null as num_val
,null as txt_val
from
(select
'DRUG_EXPOSURE' as tbnm
,'DRUG_EXPOSURE_END_DATETIME' as colnm
,DRUG_EXPOSURE_ID
,DRUG_EXPOSURE_END_DATETIME
,visit_occurrence_id
from @cdmSchema.DRUG_EXPOSURE) as d1
inner join
(select
visit_occurrence_id
,visit_concept_id
from @cdmSchema.visit_occurrence) as v1
on v1.visit_occurrence_id = d1.visit_occurrence_id
group by d1.tbnm, d1.colnm) as d1
inner join
(select distinct tb_id, tbnm from @resultSchema.schema_info) as s1
on d1.stratum2 = s1.tbnm
|
--------------------------------------------------------------------------
-- avro import / export combo test
--------------------------------------------------------------------------
.run ../common/sqlserver_setup.sql
CREATE TABLE MyTable(a INTEGER, b BIT, c REAL, d FLOAT, e varbinary (100));
.desc MyTable
.export avro file_io_1.avro
SELECT * FROM MyTable ORDER BY a;
INSERT INTO MyTable VALUES (1, 1, 1.1, 1.1, CONVERT(VARBINARY, 0xdeadbeef));
INSERT INTO MyTable VALUES (2, 0, 1.2, 1.2, CONVERT(VARBINARY, 0xdeadbeef));
INSERT INTO MyTable VALUES (3, 1, 1.32, 1.33, CONVERT(VARBINARY, 0xfacefeed));
INSERT INTO MyTable VALUES (4, 0, 2.54, 2.55, CONVERT(VARBINARY, 0xfacefeed));
SELECT * FROM MyTable ORDER BY a;
.export avro file_io_2.avro
SELECT * FROM MyTable ORDER BY a;
DELETE FROM MyTable;
.import avro file_io_1.avro
INSERT INTO MyTable VALUES (?, ?, ?, ?, ?);
SELECT * FROM MyTable ORDER BY a;
.import avro file_io_2.avro
INSERT INTO MyTable VALUES (?, ?, ?, ?, ?);
SELECT * FROM MyTable ORDER BY a;
DROP TABLE MyTable;
.import avro file_io_1.avro
.importschema
.importtable MyTable
.desc MyTable
SELECT * FROM MyTable ORDER BY a;
DROP TABLE MyTable;
.import avro file_io_2.avro
.importschema
.importtable MyTable
.desc MyTable
SELECT * FROM MyTable ORDER BY a;
DROP TABLE MyTable;
.os rm -f file_io_?.avro
|
<filename>_includes/tutorials/count-messages/ksql/code/tutorial-steps/dev/04c-pull-query-table.sql
SELECT * FROM MSG_COUNT WHERE X='X';
|
/* central table holdings */
CREATE TABLE IF NOT EXISTS tables (
table_id INTEGER PRIMARY KEY AUTOINCREMENT,
table_name TEXT NOT NULL UNIQUE,
returned INTEGER DEFAULT 0
);
/* work assignments */
CREATE TABLE IF NOT EXISTS assignments (
table_id INTEGER NOT NULL,
client TEXT NOT NULL,
requestTime INTEGER,
returnTime INTEGER DEFAULT NULL,
result TEXT DEFAULT NULL,
error TEXT DEFAULT NULL
);
/* CEA targets + results */
CREATE TABLE IF NOT EXISTS cea (
table_id INTEGER NOT NULL,
row_id INTEGER NOT NULL,
col_id INTEGER NOT NULL,
mapped TEXT DEFAULT NULL,
PRIMARY KEY (table_id, row_id, col_id)
);
/* CPA targets + results */
CREATE TABLE IF NOT EXISTS cpa (
table_id INTEGER NOT NULL,
sub_id INTEGER NOT NULL,
obj_id INTEGER NOT NULL,
mapped TEXT DEFAULT NULL,
PRIMARY KEY (table_id, sub_id, obj_id)
);
/* CTA targets + results */
CREATE TABLE IF NOT EXISTS cta (
table_id INTEGER NOT NULL,
col_id INTEGER NOT NULL,
mapped TEXT DEFAULT NULL,
PRIMARY KEY (table_id, col_id)
);
|
<filename>parse/src/test/resources/ddl/alter/test_20.sql
CREATE TABLE `tb_zjdvakwwwv` (
`col_bytftanpdh` mediumint(56) unsigned DEFAULT '1',
`col_zwyhucxxkr` year(4) NOT NULL,
`col_desbhtchpe` text(3076914288) CHARACTER SET latin1,
`col_figelwsuqt` set('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET latin1 DEFAULT 'enum_or_set_0',
UNIQUE `col_desbhtchpe` (`col_desbhtchpe`(5)),
UNIQUE `col_bytftanpdh` (`col_bytftanpdh`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
RENAME TABLE `tb_zjdvakwwwv` TO `tb_unztlaanoa`;
RENAME TABLE `tb_unztlaanoa` TO `tb_wxywfqcvkr`;
ALTER TABLE `tb_wxywfqcvkr` ADD COLUMN (`col_hikfliwljt` varchar(14), `col_vrnocgbjsc` mediumtext CHARACTER SET utf8);
ALTER TABLE `tb_wxywfqcvkr` ADD COLUMN (`col_gudluixdai` char, `col_adpuaqjrtd` numeric(22,2) NOT NULL);
ALTER TABLE `tb_wxywfqcvkr` ADD COLUMN `col_vjvhvsxmoi` bigint zerofill AFTER `col_desbhtchpe`;
ALTER TABLE `tb_wxywfqcvkr` ADD COLUMN (`col_whowxgsfzl` blob(1844532465), `col_mzdqafxiqx` bigint(161) unsigned DEFAULT '1');
ALTER TABLE `tb_wxywfqcvkr` ADD `col_spyfsutunk` bit DEFAULT b'0' AFTER `col_zwyhucxxkr`;
ALTER TABLE `tb_wxywfqcvkr` ADD `col_iqugcuomsl` numeric(9) NOT NULL;
ALTER TABLE `tb_wxywfqcvkr` ADD PRIMARY KEY (`col_zwyhucxxkr`,`col_adpuaqjrtd`);
ALTER TABLE `tb_wxywfqcvkr` CHANGE `col_zwyhucxxkr` `col_sixmujutpp` smallint zerofill NOT NULL AFTER `col_hikfliwljt`;
ALTER TABLE `tb_wxywfqcvkr` CHANGE COLUMN `col_hikfliwljt` `col_oftatmlkzc` set('enum_or_set_0','enum_or_set_1','enum_or_set_2') NOT NULL FIRST;
ALTER TABLE `tb_wxywfqcvkr` CHANGE COLUMN `col_spyfsutunk` `col_wwaeohiyto` timestamp FIRST;
ALTER TABLE `tb_wxywfqcvkr` DROP `col_adpuaqjrtd`;
ALTER TABLE `tb_wxywfqcvkr` DROP `col_iqugcuomsl`, DROP `col_sixmujutpp`;
ALTER TABLE `tb_wxywfqcvkr` DROP `col_vrnocgbjsc`;
ALTER TABLE `tb_wxywfqcvkr` DROP `col_wwaeohiyto`;
ALTER TABLE `tb_wxywfqcvkr` DROP `col_bytftanpdh`;
ALTER TABLE `tb_wxywfqcvkr` DROP `col_desbhtchpe`;
ALTER TABLE `tb_wxywfqcvkr` DROP COLUMN `col_gudluixdai`;
|
<gh_stars>1000+
-- valid time zones
SET TIME ZONE 'Asia/Hong_Kong';
SET TIME ZONE 'GMT+1';
SET TIME ZONE INTERVAL 10 HOURS;
SET TIME ZONE INTERVAL '15:40:32' HOUR TO SECOND;
SET TIME ZONE LOCAL;
-- invalid time zone
SET TIME ZONE;
SET TIME ZONE 'invalid/zone';
SET TIME ZONE INTERVAL 3 DAYS;
SET TIME ZONE INTERVAL 24 HOURS;
SET TIME ZONE INTERVAL '19:40:32' HOUR TO SECOND;
SET TIME ZONE INTERVAL 10 HOURS 'GMT+1';
SET TIME ZONE INTERVAL 10 HOURS 1 MILLISECOND;
|
<gh_stars>1-10
SELECT i.repository, i.number, i.title
FROM issue i
WHERE
i.id IN (
-- get all nag issues written by others on the same team(s)
SELECT i.id
FROM issue i, issuecomment ic
WHERE
(ic.body LIKE 'f?%' || '@nrc%' OR
ic.body LIKE 'f?%' || '@rust-lang/lang%') AND
ic.fk_issue = i.id AND
i.fk_user IN (
-- get all potential issue authors on the same team
SELECT DISTINCT u.id
FROM githubuser u, githubuser u2, memberships m, memberships m2
WHERE
u2.login = 'nrc' AND /* this needs to be a bind param */
u2.id = m2.fk_member AND
m2.fk_team = m.fk_team AND
u.id = m.fk_member))
|
<filename>updates/mimeo--0.12.0--0.12.1.sql
-- Moved the attempt at taking an advisory lock to the earliest point possible in the refresh jobs to avoid edge case of overlapping jobs causing errors instead of exiting gracefully.
-- Simplified exception blocks and made some error messages clearer in refresh functions.
-- Added some simple exception block pgTAP tests.
/*
* Refresh based on DML (Insert, Update, Delete)
*/
CREATE OR REPLACE FUNCTION refresh_dml(p_destination text, p_limit int default NULL, p_repull boolean DEFAULT false, p_debug boolean DEFAULT false) RETURNS void
LANGUAGE plpgsql SECURITY DEFINER
AS $$
DECLARE
v_adv_lock boolean;
v_batch_limit_reached boolean := false;
v_cols_n_types text;
v_cols text;
v_condition text;
v_control text;
v_dblink int;
v_dblink_name text;
v_dblink_schema text;
v_delete_sql text;
v_dest_table text;
v_exec_status text;
v_fetch_sql text;
v_field text;
v_filter text[];
v_insert_sql text;
v_job_id int;
v_jobmon_schema text;
v_job_name text;
v_limit int;
v_link_exists boolean;
v_old_search_path text;
v_pk_counter int;
v_pk_name_csv text;
v_pk_name_type_csv text := '';
v_pk_name text[];
v_pk_type text[];
v_pk_where text := '';
v_remote_f_sql text;
v_remote_q_sql text;
v_rowcount bigint := 0;
v_source_table text;
v_step_id int;
v_tmp_table text;
v_total bigint := 0;
v_trigger_delete text;
v_trigger_update text;
v_truncate_remote_q text;
v_with_update text;
BEGIN
IF p_debug IS DISTINCT FROM true THEN
PERFORM set_config( 'client_min_messages', 'warning', true );
END IF;
v_job_name := 'Refresh DML: '||p_destination;
v_dblink_name := 'mimeo_dml_refresh_'||p_destination;
SELECT nspname INTO v_dblink_schema FROM pg_namespace n, pg_extension e WHERE e.extname = 'dblink' AND e.extnamespace = n.oid;
SELECT nspname INTO v_jobmon_schema FROM pg_namespace n, pg_extension e WHERE e.extname = 'pg_jobmon' AND e.extnamespace = n.oid;
-- Set custom search path to allow easier calls to other functions, especially job logging
SELECT current_setting('search_path') INTO v_old_search_path;
EXECUTE 'SELECT set_config(''search_path'',''@extschema@,'||v_jobmon_schema||','||v_dblink_schema||',public'',''false'')';
-- Take advisory lock to prevent multiple calls to function overlapping
v_adv_lock := pg_try_advisory_lock(hashtext('refresh_dml'), hashtext(v_job_name));
IF v_adv_lock = 'false' THEN
v_job_id := add_job(v_job_name);
v_step_id := add_step(v_job_id,'Obtaining advisory lock for job: '||v_job_name);
PERFORM gdb(p_debug,'Obtaining advisory lock FAILED for job: '||v_job_name);
PERFORM update_step(v_step_id, 'WARNING','Found concurrent job. Exiting gracefully');
PERFORM fail_job(v_job_id, 2);
EXECUTE 'SELECT set_config(''search_path'','''||v_old_search_path||''',''false'')';
RETURN;
END IF;
SELECT source_table
, dest_table
, 'tmp_'||replace(dest_table,'.','_')
, dblink
, control
, pk_name
, pk_type
, filter
, condition
, batch_limit
FROM refresh_config_dml
WHERE dest_table = p_destination INTO
v_source_table
, v_dest_table
, v_tmp_table
, v_dblink
, v_control
, v_pk_name
, v_pk_type
, v_filter
, v_condition
, v_limit;
IF NOT FOUND THEN
RAISE EXCEPTION 'No configuration found for %',v_job_name;
END IF;
v_job_id := add_job(v_job_name);
PERFORM gdb(p_debug,'Job ID: '||v_job_id::text);
v_step_id := add_step(v_job_id,'Sanity check primary/unique key values');
IF v_pk_name IS NULL OR v_pk_type IS NULL THEN
RAISE EXCEPTION 'Primary key fields in refresh_config_dml must be defined';
END IF;
-- determine column list, column type list
IF v_filter IS NULL THEN
SELECT array_to_string(array_agg(attname),','), array_to_string(array_agg(attname||' '||format_type(atttypid, atttypmod)::text),',')
INTO v_cols, v_cols_n_types
FROM pg_attribute WHERE attrelid = p_destination::regclass AND attnum > 0 AND attisdropped is false;
ELSE
-- ensure all primary key columns are included in any column filters
FOREACH v_field IN ARRAY v_pk_name LOOP
IF v_field = ANY(v_filter) THEN
CONTINUE;
ELSE
RAISE EXCEPTION 'Filter list did not contain all columns that compose primary/unique key for %',v_job_name;
END IF;
END LOOP;
SELECT array_to_string(array_agg(attname),','), array_to_string(array_agg(attname||' '||format_type(atttypid, atttypmod)::text),',')
INTO v_cols, v_cols_n_types
FROM pg_attribute WHERE attrelid = p_destination::regclass AND ARRAY[attname::text] <@ v_filter AND attnum > 0 AND attisdropped is false;
END IF;
IF p_limit IS NOT NULL THEN
v_limit := p_limit;
END IF;
v_pk_name_csv := array_to_string(v_pk_name, ',');
v_pk_counter := 1;
WHILE v_pk_counter <= array_length(v_pk_name,1) LOOP
IF v_pk_counter > 1 THEN
v_pk_name_type_csv := v_pk_name_type_csv || ', ';
v_pk_where := v_pk_where ||' AND ';
END IF;
v_pk_name_type_csv := v_pk_name_type_csv ||v_pk_name[v_pk_counter]||' '||v_pk_type[v_pk_counter];
v_pk_where := v_pk_where || ' a.'||v_pk_name[v_pk_counter]||' = b.'||v_pk_name[v_pk_counter];
v_pk_counter := v_pk_counter + 1;
END LOOP;
PERFORM update_step(v_step_id, 'OK','Done');
PERFORM dblink_connect(v_dblink_name, auth(v_dblink));
-- update remote entries
v_step_id := add_step(v_job_id,'Updating remote trigger table');
v_with_update := 'WITH a AS (SELECT '||v_pk_name_csv||' FROM '|| v_control ||' ORDER BY '||v_pk_name_csv||' LIMIT '|| COALESCE(v_limit::text, 'ALL') ||') UPDATE '||v_control||' b SET processed = true FROM a WHERE '||v_pk_where;
v_trigger_update := 'SELECT dblink_exec('||quote_literal(v_dblink_name)||','|| quote_literal(v_with_update)||')';
PERFORM gdb(p_debug,v_trigger_update);
EXECUTE v_trigger_update INTO v_exec_status;
PERFORM update_step(v_step_id, 'OK','Result was '||v_exec_status);
IF p_repull THEN
-- Do truncate of remote queue table here before full data pull is actually started to ensure all new changes are recorded
PERFORM update_step(v_step_id, 'OK','Request to repull ALL data from source. This could take a while...');
PERFORM gdb(p_debug, 'Request to repull ALL data from source. This could take a while...');
v_truncate_remote_q := 'SELECT dblink_exec('||quote_literal(v_dblink_name)||','||quote_literal('TRUNCATE TABLE '||v_control)||')';
EXECUTE v_truncate_remote_q;
v_step_id := add_step(v_job_id,'Truncating local table');
PERFORM gdb(p_debug,'Truncating local table');
EXECUTE 'TRUNCATE '||v_dest_table;
PERFORM update_step(v_step_id, 'OK','Done');
-- Define cursor query
v_remote_f_sql := 'SELECT '||v_cols||' FROM '||v_source_table;
IF v_condition IS NOT NULL THEN
v_remote_f_sql := v_remote_f_sql || ' ' || v_condition;
END IF;
ELSE
EXECUTE 'CREATE TEMP TABLE '||v_tmp_table||'_queue ('||v_pk_name_type_csv||', PRIMARY KEY ('||v_pk_name_csv||'))';
-- Copy queue locally for use in removing updated/deleted rows
v_remote_q_sql := 'SELECT DISTINCT '||v_pk_name_csv||' FROM '||v_control||' WHERE processed = true';
PERFORM dblink_open(v_dblink_name, 'mimeo_cursor', v_remote_q_sql);
v_step_id := add_step(v_job_id, 'Creating local queue temp table');
v_rowcount := 0;
LOOP
v_fetch_sql := 'INSERT INTO '||v_tmp_table||'_queue ('||v_pk_name_csv||')
SELECT '||v_pk_name_csv||' FROM dblink_fetch('||quote_literal(v_dblink_name)||', ''mimeo_cursor'', 50000) AS ('||v_pk_name_type_csv||')';
EXECUTE v_fetch_sql;
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
EXIT WHEN v_rowcount = 0;
v_total := v_total + coalesce(v_rowcount, 0);
PERFORM gdb(p_debug,'Fetching rows in batches: '||v_total||' done so far.');
PERFORM update_step(v_step_id, 'PENDING', 'Fetching rows in batches: '||v_total||' done so far.');
END LOOP;
PERFORM dblink_close(v_dblink_name, 'mimeo_cursor');
EXECUTE 'CREATE INDEX ON '||v_tmp_table||'_queue ('||v_pk_name_csv||')';
EXECUTE 'ANALYZE '||v_tmp_table||'_queue';
PERFORM update_step(v_step_id, 'OK','Number of rows inserted: '||v_total);
PERFORM gdb(p_debug,'Temp queue table row count '||v_total::text);
v_step_id := add_step(v_job_id,'Deleting records from local table');
v_delete_sql := 'DELETE FROM '||v_dest_table||' a USING '||v_tmp_table||'_queue b WHERE '|| v_pk_where;
PERFORM gdb(p_debug,v_delete_sql);
EXECUTE v_delete_sql;
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
PERFORM gdb(p_debug,'Rows removed from local table before applying changes: '||v_rowcount::text);
PERFORM update_step(v_step_id, 'OK','Removed '||v_rowcount||' records');
-- Define cursor query
v_remote_f_sql := 'SELECT '||v_cols||' FROM '||v_source_table||' JOIN ('||v_remote_q_sql||') x USING ('||v_pk_name_csv||')';
IF v_condition IS NOT NULL THEN
v_remote_f_sql := v_remote_f_sql || ' ' || v_condition;
END IF;
END IF;
-- insert records to local table. Have to do temp table in case destination table is partitioned (returns 0 when inserting to parent)
PERFORM dblink_open(v_dblink_name, 'mimeo_cursor', v_remote_f_sql);
v_step_id := add_step(v_job_id, 'Inserting new records into local table');
EXECUTE 'CREATE TEMP TABLE '||v_tmp_table||'_full ('||v_cols_n_types||')';
v_rowcount := 0;
v_total := 0;
LOOP
v_fetch_sql := 'INSERT INTO '||v_tmp_table||'_full ('||v_cols||')
SELECT '||v_cols||' FROM dblink_fetch('||quote_literal(v_dblink_name)||', ''mimeo_cursor'', 50000) AS ('||v_cols_n_types||')';
EXECUTE v_fetch_sql;
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
v_total := v_total + coalesce(v_rowcount, 0);
EXECUTE 'INSERT INTO '||v_dest_table||' ('||v_cols||') SELECT '||v_cols||' FROM '||v_tmp_table||'_full';
EXECUTE 'TRUNCATE '||v_tmp_table||'_full';
EXIT WHEN v_rowcount = 0;
PERFORM gdb(p_debug,'Fetching rows in batches: '||v_total||' done so far.');
PERFORM update_step(v_step_id, 'PENDING', 'Fetching rows in batches: '||v_total||' done so far.');
END LOOP;
PERFORM dblink_close(v_dblink_name, 'mimeo_cursor');
PERFORM update_step(v_step_id, 'OK','Number of rows inserted: '||v_total);
IF p_repull = false AND v_total > (v_limit * .75) THEN
v_step_id := add_step(v_job_id, 'Row count warning');
PERFORM update_step(v_step_id, 'WARNING','Row count fetched ('||v_total||') greater than 75% of batch limit ('||v_limit||'). Recommend increasing batch limit if possible.');
v_batch_limit_reached := true;
END IF;
-- clean out rows from txn table
v_step_id := add_step(v_job_id,'Cleaning out rows from txn table');
v_trigger_delete := 'SELECT dblink_exec('||quote_literal(v_dblink_name)||','||quote_literal('DELETE FROM '||v_control||' WHERE processed = true')||')';
PERFORM gdb(p_debug,v_trigger_delete);
EXECUTE v_trigger_delete INTO v_exec_status;
PERFORM update_step(v_step_id, 'OK','Result was '||v_exec_status);
-- update activity status
v_step_id := add_step(v_job_id,'Updating last_run in config table');
UPDATE refresh_config_dml SET last_run = CURRENT_TIMESTAMP WHERE dest_table = p_destination;
PERFORM update_step(v_step_id, 'OK','Last run was '||CURRENT_TIMESTAMP);
EXECUTE 'DROP TABLE IF EXISTS '||v_tmp_table||'_full';
EXECUTE 'DROP TABLE IF EXISTS '||v_tmp_table||'_queue';
PERFORM dblink_disconnect(v_dblink_name);
IF v_batch_limit_reached = false THEN
PERFORM close_job(v_job_id);
ELSE
-- Set final job status to level 2 (WARNING) to bring notice that the batch limit was reached and may need adjusting.
-- Preventive warning to keep replication from falling behind.
PERFORM fail_job(v_job_id, 2);
END IF;
-- Ensure old search path is reset for the current session
EXECUTE 'SELECT set_config(''search_path'','''||v_old_search_path||''',''false'')';
PERFORM pg_advisory_unlock(hashtext('refresh_dml'), hashtext(v_job_name));
EXCEPTION
WHEN QUERY_CANCELED THEN
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_get_connections() @> ARRAY['||quote_literal(v_dblink_name)||']' INTO v_link_exists;
IF v_link_exists THEN
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_disconnect('||quote_literal(v_dblink_name)||')';
END IF;
PERFORM pg_advisory_unlock(hashtext('refresh_dml'), hashtext(v_job_name));
RAISE EXCEPTION '%', SQLERRM;
WHEN OTHERS THEN
IF v_job_id IS NULL THEN
EXECUTE 'SELECT '||v_jobmon_schema||'.add_job(''Refresh DML: '||p_destination||''')' INTO v_job_id;
EXECUTE 'SELECT '||v_jobmon_schema||'.add_step('||v_job_id||', ''EXCEPTION before job logging started'')' INTO v_step_id;
END IF;
IF v_step_id IS NULL THEN
EXECUTE 'SELECT '||v_jobmon_schema||'.add_step('||v_job_id||', ''EXCEPTION before first step logged'')' INTO v_step_id;
END IF;
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_get_connections() @> ARRAY['||quote_literal(v_dblink_name)||']' INTO v_link_exists;
IF v_link_exists THEN
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_disconnect('||quote_literal(v_dblink_name)||')';
END IF;
EXECUTE 'SELECT '||v_jobmon_schema||'.update_step('||v_step_id||', ''CRITICAL'', ''ERROR: '||coalesce(SQLERRM,'unknown')||''')';
EXECUTE 'SELECT '||v_jobmon_schema||'.fail_job('||v_job_id||')';
PERFORM pg_advisory_unlock(hashtext('refresh_dml'), hashtext(v_job_name));
RAISE EXCEPTION '%', SQLERRM;
END
$$;
/*
* Refresh insert only table based on timestamp control field
*/
CREATE OR REPLACE FUNCTION refresh_inserter(p_destination text, p_limit integer DEFAULT NULL, p_repull boolean DEFAULT false, p_repull_start text DEFAULT NULL, p_repull_end text DEFAULT NULL, p_debug boolean DEFAULT false) RETURNS void
LANGUAGE plpgsql SECURITY DEFINER
AS $$
DECLARE
v_adv_lock boolean;
v_batch_limit_reached int := 0;
v_boundary timestamptz;
v_cols_n_types text;
v_cols text;
v_condition text;
v_control text;
v_create_sql text;
v_dblink int;
v_dblink_name text;
v_dblink_schema text;
v_delete_sql text;
v_dest_table text;
v_dst_active boolean;
v_dst_check boolean;
v_dst_start int;
v_dst_end int;
v_fetch_sql text;
v_filter text[];
v_full_refresh boolean := false;
v_insert_sql text;
v_job_id int;
v_jobmon_schema text;
v_job_name text;
v_last_fetched timestamptz;
v_last_value timestamptz;
v_limit int;
v_link_exists boolean;
v_now timestamptz := now();
v_old_search_path text;
v_remote_sql text;
v_rowcount bigint := 0;
v_source_table text;
v_step_id int;
v_tmp_table text;
v_total bigint := 0;
BEGIN
IF p_debug IS DISTINCT FROM true THEN
PERFORM set_config( 'client_min_messages', 'warning', true );
END IF;
v_job_name := 'Refresh Inserter: '||p_destination;
v_dblink_name := 'mimeo_inserter_refresh_'||p_destination;
SELECT nspname INTO v_dblink_schema FROM pg_namespace n, pg_extension e WHERE e.extname = 'dblink' AND e.extnamespace = n.oid;
SELECT nspname INTO v_jobmon_schema FROM pg_namespace n, pg_extension e WHERE e.extname = 'pg_jobmon' AND e.extnamespace = n.oid;
-- Set custom search path to allow easier calls to other functions, especially job logging
SELECT current_setting('search_path') INTO v_old_search_path;
EXECUTE 'SELECT set_config(''search_path'',''@extschema@,'||v_jobmon_schema||','||v_dblink_schema||',public'',''false'')';
-- Take advisory lock to prevent multiple calls to function overlapping
v_adv_lock := pg_try_advisory_lock(hashtext('refresh_inserter'), hashtext(v_job_name));
IF v_adv_lock = 'false' THEN
v_job_id := add_job(v_job_name);
v_step_id := add_step(v_job_id,'Obtaining advisory lock for job: '||v_job_name);
PERFORM gdb(p_debug,'Obtaining advisory lock FAILED for job: '||v_job_name);
PERFORM update_step(v_step_id, 'WARNING','Found concurrent job. Exiting gracefully');
PERFORM fail_job(v_job_id, 2);
EXECUTE 'SELECT set_config(''search_path'','''||v_old_search_path||''',''false'')';
RETURN;
END IF;
v_job_id := add_job(v_job_name);
PERFORM gdb(p_debug,'Job ID: '||v_job_id::text);
SELECT source_table
, dest_table
, 'tmp_'||replace(dest_table,'.','_')
, dblink
, control
, last_value
, now() - boundary::interval
, filter
, condition
, dst_active
, dst_start
, dst_end
, batch_limit
FROM refresh_config_inserter WHERE dest_table = p_destination
INTO v_source_table
, v_dest_table
, v_tmp_table
, v_dblink
, v_control
, v_last_value
, v_boundary
, v_filter
, v_condition
, v_dst_active
, v_dst_start
, v_dst_end
, v_limit;
IF NOT FOUND THEN
RAISE EXCEPTION 'No configuration found for %',v_job_name;
END IF;
-- Do not allow this function to run during DST time change if config option is true. Otherwise will miss data from source
IF v_dst_active THEN
v_dst_check := @extschema@.dst_change(v_now);
IF v_dst_check THEN
IF to_number(to_char(v_now, 'HH24MM'), '0000') > v_dst_start AND to_number(to_char(v_now, 'HH24MM'), '0000') < v_dst_end THEN
v_step_id := add_step( v_job_id, 'DST Check');
PERFORM update_step(v_step_id, 'OK', 'Job CANCELLED - Does not run during DST time change');
PERFORM close_job(v_job_id);
PERFORM gdb(p_debug, 'Cannot run during DST time change');
UPDATE refresh_config_inserter SET last_run = CURRENT_TIMESTAMP WHERE dest_table = p_destination;
EXECUTE 'SELECT set_config(''search_path'','''||v_old_search_path||''',''false'')';
PERFORM pg_advisory_unlock(hashtext('refresh_inserter'), hashtext(v_job_name));
RETURN;
END IF;
END IF;
END IF;
v_step_id := add_step(v_job_id,'Building SQL');
IF v_filter IS NULL THEN
SELECT array_to_string(array_agg(attname),','), array_to_string(array_agg(attname||' '||format_type(atttypid, atttypmod)::text),',')
INTO v_cols, v_cols_n_types
FROM pg_attribute WHERE attrelid = p_destination::regclass AND attnum > 0 AND attisdropped is false;
ELSE
SELECT array_to_string(array_agg(attname),','), array_to_string(array_agg(attname||' '||format_type(atttypid, atttypmod)::text),',')
INTO v_cols, v_cols_n_types
FROM pg_attribute WHERE attrelid = p_destination::regclass AND ARRAY[attname::text] <@ v_filter AND attnum > 0 AND attisdropped is false;
END IF;
PERFORM dblink_connect(v_dblink_name, auth(v_dblink));
IF p_limit IS NOT NULL THEN
v_limit := p_limit;
END IF;
IF p_repull THEN
-- Repull ALL data if no start and end values set
IF p_repull_start IS NULL AND p_repull_end IS NULL THEN
PERFORM update_step(v_step_id, 'OK','Request to repull ALL data from source. This could take a while...');
EXECUTE 'TRUNCATE '||v_dest_table;
v_remote_sql := 'SELECT '||v_cols||' FROM '||v_source_table;
IF v_condition IS NOT NULL THEN
v_remote_sql := v_remote_sql || ' ' || v_condition;
END IF;
ELSE
PERFORM update_step(v_step_id, 'OK','Request to repull data from '||COALESCE(p_repull_start, '-infinity')||' to '||COALESCE(p_repull_end, 'infinity'));
PERFORM gdb(p_debug,'Request to repull data from '||COALESCE(p_repull_start, '-infinity')||' to '||COALESCE(p_repull_end, 'infinity'));
v_remote_sql := 'SELECT '||v_cols||' FROM '||v_source_table;
IF v_condition IS NOT NULL THEN
v_remote_sql := v_remote_sql || ' ' || v_condition || ' AND ';
ELSE
v_remote_sql := v_remote_sql || ' WHERE ';
END IF;
v_remote_sql := v_remote_sql ||v_control||' > '||quote_literal(COALESCE(p_repull_start, '-infinity'))||' AND '
||v_control||' < '||quote_literal(COALESCE(p_repull_end, 'infinity'));
-- Delete the old local data
v_delete_sql := 'DELETE FROM '||v_dest_table||' WHERE '||v_control||' > '||quote_literal(COALESCE(p_repull_start, '-infinity'))||' AND '
||v_control||' < '||quote_literal(COALESCE(p_repull_end, 'infinity'));
v_step_id := add_step(v_job_id, 'Deleting current, local data');
PERFORM gdb(p_debug,'Deleting current, local data: '||v_delete_sql);
EXECUTE v_delete_sql;
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
PERFORM update_step(v_step_id, 'OK', v_rowcount || 'rows removed');
END IF;
ELSE
-- does < for upper boundary to keep missing data from happening on rare edge case where a newly inserted row outside the transaction batch
-- has the exact same timestamp as the previous batch's max timestamp
v_remote_sql := 'SELECT '||v_cols||' FROM '||v_source_table;
IF v_condition IS NOT NULL THEN
v_remote_sql := v_remote_sql || ' ' || v_condition || ' AND ';
ELSE
v_remote_sql := v_remote_sql || ' WHERE ';
END IF;
v_remote_sql := v_remote_sql ||v_control||' > '||quote_literal(v_last_value)||' AND '||v_control||' < '||quote_literal(v_boundary)||' ORDER BY '||v_control||' ASC LIMIT '|| COALESCE(v_limit::text, 'ALL');
PERFORM update_step(v_step_id, 'OK','Grabbing rows from '||v_last_value::text||' to '||v_boundary::text);
PERFORM gdb(p_debug,'Grabbing rows from '||v_last_value::text||' to '||v_boundary::text);
END IF;
EXECUTE 'CREATE TEMP TABLE '||v_tmp_table||' ('||v_cols_n_types||')';
PERFORM gdb(p_debug,v_remote_sql);
PERFORM dblink_open(v_dblink_name, 'mimeo_cursor', v_remote_sql);
v_step_id := add_step(v_job_id, 'Inserting new records into local table');
v_rowcount := 0;
v_total := 0;
LOOP
v_fetch_sql := 'INSERT INTO '||v_tmp_table||'('||v_cols||')
SELECT '||v_cols||' FROM dblink_fetch('||quote_literal(v_dblink_name)||', ''mimeo_cursor'', 50000) AS ('||v_cols_n_types||')';
EXECUTE v_fetch_sql;
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
v_total := v_total + coalesce(v_rowcount, 0);
EXECUTE 'SELECT max('||v_control||') FROM '||v_tmp_table INTO v_last_fetched;
IF v_limit IS NULL THEN -- insert into the real table in batches if no limit to avoid excessively large temp tables
EXECUTE 'INSERT INTO '||v_dest_table||' ('||v_cols||') SELECT '||v_cols||' FROM '||v_tmp_table;
EXECUTE 'TRUNCATE '||v_tmp_table;
END IF;
EXIT WHEN v_rowcount = 0;
PERFORM gdb(p_debug,'Fetching rows in batches: '||v_total||' done so far. Last fetched: '||v_last_fetched);
PERFORM update_step(v_step_id, 'PENDING', 'Fetching rows in batches: '||v_total||' done so far. Last fetched: '||v_last_fetched);
END LOOP;
PERFORM dblink_close(v_dblink_name, 'mimeo_cursor');
PERFORM update_step(v_step_id, 'OK','Rows fetched: '||v_total);
IF v_limit IS NULL THEN
-- nothing else to do
ELSE
-- When using batch limits, entire batch must be pulled to temp table before inserting to real table to catch edge cases
v_step_id := add_step(v_job_id,'Checking for batch limit issues');
PERFORM gdb(p_debug, 'Checking for batch limit issues');
-- Not recommended that the batch actually equal the limit set if possible. Handle all edge cases to keep data consistent
IF v_total >= v_limit THEN
PERFORM update_step(v_step_id, 'WARNING','Row count fetched equal to or greater than limit set: '||v_limit||'. Recommend increasing batch limit if possible.');
PERFORM gdb(p_debug, 'Row count fetched equal to or greater than limit set: '||v_limit||'. Recommend increasing batch limit if possible.');
EXECUTE 'SELECT max('||v_control||') FROM '||v_tmp_table INTO v_last_value;
v_step_id := add_step(v_job_id, 'Removing high boundary rows from this batch to avoid missing data');
EXECUTE 'DELETE FROM '||v_tmp_table||' WHERE '||v_control||' = '||quote_literal(v_last_value);
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
PERFORM update_step(v_step_id, 'OK', 'Removed '||v_rowcount||' rows. Batch now contains '||v_limit - v_rowcount||' records');
PERFORM gdb(p_debug, 'Removed '||v_rowcount||' rows from batch. Batch table now contains '||v_limit - v_rowcount||' records');
v_batch_limit_reached = 2;
v_total := v_total - v_rowcount;
IF (v_limit - v_rowcount) < 1 THEN
v_step_id := add_step(v_job_id, 'Reached inconsistent state');
PERFORM update_step(v_step_id, 'CRITICAL', 'Batch contained max rows ('||v_limit||') or greater and all contained the same timestamp value. Unable to guarentee rows will ever be replicated consistently. Increase row limit parameter to allow a consistent batch.');
PERFORM gdb(p_debug, 'Batch contained max rows desired ('||v_limit||') or greaer and all contained the same timestamp value. Unable to guarentee rows will be replicated consistently. Increase row limit parameter to allow a consistent batch.');
v_batch_limit_reached = 3;
END IF;
ELSE
PERFORM update_step(v_step_id, 'OK','No issues found');
PERFORM gdb(p_debug, 'No issues found');
END IF;
IF v_batch_limit_reached <> 3 THEN
v_step_id := add_step(v_job_id,'Inserting new records into local table');
EXECUTE 'INSERT INTO '||v_dest_table||' ('||v_cols||') SELECT '||v_cols||' FROM '||v_tmp_table;
PERFORM update_step(v_step_id, 'OK','Inserted '||v_total||' records');
PERFORM gdb(p_debug, 'Inserted '||v_total||' records');
END IF;
END IF; -- end v_limit IF
IF v_batch_limit_reached <> 3 THEN
v_step_id := add_step(v_job_id, 'Setting next lower boundary');
EXECUTE 'SELECT max('||v_control||') FROM '|| v_dest_table INTO v_last_value;
UPDATE refresh_config_inserter set last_value = coalesce(v_last_value, CURRENT_TIMESTAMP), last_run = CURRENT_TIMESTAMP WHERE dest_table = p_destination;
PERFORM update_step(v_step_id, 'OK','Lower boundary value is: '|| coalesce(v_last_value, CURRENT_TIMESTAMP));
PERFORM gdb(p_debug, 'Lower boundary value is: '||coalesce(v_last_value, CURRENT_TIMESTAMP));
END IF;
EXECUTE 'DROP TABLE IF EXISTS ' || v_tmp_table;
PERFORM dblink_disconnect(v_dblink_name);
IF v_batch_limit_reached = 0 THEN
PERFORM close_job(v_job_id);
ELSIF v_batch_limit_reached = 2 THEN
-- Set final job status to level 2 (WARNING) to bring notice that the batch limit was reached and may need adjusting.
-- Preventive warning to keep replication from falling behind.
PERFORM fail_job(v_job_id, 2);
ELSIF v_batch_limit_reached = 3 THEN
-- Really bad. Critical alert!
PERFORM fail_job(v_job_id);
END IF;
-- Ensure old search path is reset for the current session
EXECUTE 'SELECT set_config(''search_path'','''||v_old_search_path||''',''false'')';
PERFORM pg_advisory_unlock(hashtext('refresh_inserter'), hashtext(v_job_name));
EXCEPTION
WHEN QUERY_CANCELED THEN
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_get_connections() @> ARRAY['||quote_literal(v_dblink_name)||']' INTO v_link_exists;
IF v_link_exists THEN
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_disconnect('||quote_literal(v_dblink_name)||')';
END IF;
PERFORM pg_advisory_unlock(hashtext('refresh_inserter'), hashtext(v_job_name));
RAISE EXCEPTION '%', SQLERRM;
WHEN OTHERS THEN
IF v_job_id IS NULL THEN
EXECUTE 'SELECT '||v_jobmon_schema||'.add_job(''Refresh Inserter: '||p_destination||''')' INTO v_job_id;
EXECUTE 'SELECT '||v_jobmon_schema||'.add_step('||v_job_id||', ''EXCEPTION before job logging started'')' INTO v_step_id;
END IF;
IF v_step_id IS NULL THEN
EXECUTE 'SELECT '||v_jobmon_schema||'.add_step('||v_job_id||', ''EXCEPTION before first step logged'')' INTO v_step_id;
END IF;
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_get_connections() @> ARRAY['||quote_literal(v_dblink_name)||']' INTO v_link_exists;
IF v_link_exists THEN
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_disconnect('||quote_literal(v_dblink_name)||')';
END IF;
EXECUTE 'SELECT '||v_jobmon_schema||'.update_step('||v_step_id||', ''CRITICAL'', ''ERROR: '||COALESCE(SQLERRM,'unknown')||''')';
EXECUTE 'SELECT '||v_jobmon_schema||'.fail_job('||v_job_id||')';
PERFORM pg_advisory_unlock(hashtext('refresh_inserter'), hashtext(v_job_name));
RAISE EXCEPTION '%', SQLERRM;
END
$$;
/*
* Refresh based on DML (Insert, Update, Delete), but logs all deletes on the destination table
* Destination table requires extra column: mimeo_source_deleted timestamptz
*/
CREATE OR REPLACE FUNCTION refresh_logdel(p_destination text, p_limit int DEFAULT NULL, p_repull boolean DEFAULT false, p_debug boolean DEFAULT false) RETURNS void
LANGUAGE plpgsql SECURITY DEFINER
AS $$
DECLARE
v_adv_lock boolean;
v_batch_limit_reached boolean := false;
v_cols_n_types text;
v_cols text;
v_condition text;
v_control text;
v_dblink int;
v_dblink_name text;
v_dblink_schema text;
v_delete_d_sql text;
v_delete_f_sql text;
v_dest_table text;
v_exec_status text;
v_fetch_sql text;
v_field text;
v_filter text[];
v_insert_deleted_sql text;
v_insert_sql text;
v_job_id int;
v_jobmon_schema text;
v_job_name text;
v_limit int;
v_link_exists boolean;
v_old_search_path text;
v_pk_counter int;
v_pk_name text[];
v_pk_name_csv text;
v_pk_name_type_csv text := '';
v_pk_type text[];
v_pk_where text := '';
v_remote_d_sql text;
v_remote_f_sql text;
v_remote_q_sql text;
v_rowcount bigint := 0;
v_source_table text;
v_step_id int;
v_tmp_table text;
v_total bigint := 0;
v_trigger_delete text;
v_trigger_update text;
v_truncate_remote_q text;
v_with_update text;
BEGIN
IF p_debug IS DISTINCT FROM true THEN
PERFORM set_config( 'client_min_messages', 'warning', true );
END IF;
v_job_name := 'Refresh Log Del: '||p_destination;
v_dblink_name := 'mimeo_logdel_refresh_'||p_destination;
SELECT nspname INTO v_dblink_schema FROM pg_namespace n, pg_extension e WHERE e.extname = 'dblink' AND e.extnamespace = n.oid;
SELECT nspname INTO v_jobmon_schema FROM pg_namespace n, pg_extension e WHERE e.extname = 'pg_jobmon' AND e.extnamespace = n.oid;
-- Set custom search path to allow easier calls to other functions, especially job logging
SELECT current_setting('search_path') INTO v_old_search_path;
EXECUTE 'SELECT set_config(''search_path'',''@extschema@,'||v_jobmon_schema||','||v_dblink_schema||',public'',''false'')';
-- Take advisory lock to prevent multiple calls to function overlapping
v_adv_lock := pg_try_advisory_lock(hashtext('refresh_logdel'), hashtext(v_job_name));
IF v_adv_lock = 'false' THEN
v_job_id := add_job(v_job_name);
v_step_id := add_step(v_job_id,'Obtaining advisory lock for job: '||v_job_name);
PERFORM gdb(p_debug,'Obtaining advisory lock FAILED for job: '||v_job_name);
PERFORM update_step(v_step_id, 'WARNING','Found concurrent job. Exiting gracefully');
PERFORM fail_job(v_job_id, 2);
EXECUTE 'SELECT set_config(''search_path'','''||v_old_search_path||''',''false'')';
RETURN;
END IF;
SELECT source_table
, dest_table
, 'tmp_'||replace(dest_table,'.','_')
, dblink
, control
, pk_name
, pk_type
, filter
, condition
, batch_limit
FROM refresh_config_logdel
WHERE dest_table = p_destination INTO
v_source_table
, v_dest_table
, v_tmp_table
, v_dblink
, v_control
, v_pk_name
, v_pk_type
, v_filter
, v_condition
, v_limit;
IF NOT FOUND THEN
RAISE EXCEPTION 'No configuration found for %',v_job_name;
END IF;
v_job_id := add_job(v_job_name);
PERFORM gdb(p_debug,'Job ID: '||v_job_id::text);
v_step_id := add_step(v_job_id,'Sanity check primary/unique key values');
IF v_pk_name IS NULL OR v_pk_type IS NULL THEN
RAISE EXCEPTION 'Primary key fields in refresh_config_logdel must be defined';
END IF;
-- determine column list, column type list
IF v_filter IS NULL THEN
SELECT array_to_string(array_agg(attname),','), array_to_string(array_agg(attname||' '||format_type(atttypid, atttypmod)::text),',')
INTO v_cols, v_cols_n_types
FROM pg_attribute WHERE attnum > 0 AND attisdropped is false AND attrelid = p_destination::regclass AND attname != 'mimeo_source_deleted';
ELSE
-- ensure all primary key columns are included in any column filters
FOREACH v_field IN ARRAY v_pk_name LOOP
IF v_field = ANY(v_filter) THEN
CONTINUE;
ELSE
RAISE EXCEPTION 'Filter list did not contain all columns that compose primary key for %',v_job_name;
END IF;
END LOOP;
SELECT array_to_string(array_agg(attname),','), array_to_string(array_agg(attname||' '||format_type(atttypid, atttypmod)::text),',')
INTO v_cols, v_cols_n_types
FROM pg_attribute WHERE attrelid = p_destination::regclass AND ARRAY[attname::text] <@ v_filter AND attnum > 0 AND attisdropped is false AND attname != 'mimeo_source_deleted' ;
END IF;
IF p_limit IS NOT NULL THEN
v_limit := p_limit;
END IF;
v_pk_name_csv := array_to_string(v_pk_name,',');
v_pk_counter := 1;
WHILE v_pk_counter <= array_length(v_pk_name,1) LOOP
IF v_pk_counter > 1 THEN
v_pk_name_type_csv := v_pk_name_type_csv || ', ';
v_pk_where := v_pk_where ||' AND ';
END IF;
v_pk_name_type_csv := v_pk_name_type_csv ||v_pk_name[v_pk_counter]||' '||v_pk_type[v_pk_counter];
v_pk_where := v_pk_where || ' a.'||v_pk_name[v_pk_counter]||' = b.'||v_pk_name[v_pk_counter];
v_pk_counter := v_pk_counter + 1;
END LOOP;
PERFORM update_step(v_step_id, 'OK','Done');
PERFORM dblink_connect(v_dblink_name, auth(v_dblink));
-- update remote entries
v_step_id := add_step(v_job_id,'Updating remote trigger table');
v_with_update := 'WITH a AS (SELECT '||v_pk_name_csv||' FROM '|| v_control ||' ORDER BY '||v_pk_name_csv||' LIMIT '|| COALESCE(v_limit::text, 'ALL') ||') UPDATE '||v_control||' b SET processed = true FROM a WHERE '|| v_pk_where;
v_trigger_update := 'SELECT dblink_exec('||quote_literal(v_dblink_name)||','|| quote_literal(v_with_update)||')';
PERFORM gdb(p_debug,v_trigger_update);
EXECUTE v_trigger_update INTO v_exec_status;
PERFORM update_step(v_step_id, 'OK','Result was '||v_exec_status);
-- create temp table for recording deleted rows
EXECUTE 'CREATE TEMP TABLE '||v_tmp_table||'_deleted ('||v_cols_n_types||', mimeo_source_deleted timestamptz)';
v_remote_d_sql := 'SELECT '||v_cols||', mimeo_source_deleted FROM '||v_control||' WHERE processed = true and mimeo_source_deleted IS NOT NULL';
PERFORM dblink_open(v_dblink_name, 'mimeo_cursor', v_remote_d_sql);
v_step_id := add_step(v_job_id, 'Creating local queue temp table for deleted rows on source');
v_rowcount := 0;
v_total := 0;
LOOP
v_fetch_sql := 'INSERT INTO '||v_tmp_table||'_deleted ('||v_cols||', mimeo_source_deleted)
SELECT '||v_cols||', mimeo_source_deleted FROM dblink_fetch('||quote_literal(v_dblink_name)||', ''mimeo_cursor'', 50000) AS ('||v_cols_n_types||', mimeo_source_deleted timestamptz)';
EXECUTE v_fetch_sql;
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
EXIT WHEN v_rowcount = 0;
v_total := v_total + coalesce(v_rowcount, 0);
PERFORM gdb(p_debug,'Fetching rows in batches: '||v_total||' done so far.');
PERFORM update_step(v_step_id, 'PENDING', 'Fetching rows in batches: '||v_total||' done so far.');
END LOOP;
PERFORM dblink_close(v_dblink_name, 'mimeo_cursor');
EXECUTE 'CREATE INDEX ON '||v_tmp_table||'_deleted ('||v_pk_name_csv||')';
EXECUTE 'ANALYZE '||v_tmp_table||'_deleted';
PERFORM update_step(v_step_id, 'OK','Number of rows inserted: '||v_total);
PERFORM gdb(p_debug,'Temp deleted queue table row count '||v_total::text);
IF p_repull THEN
-- Do delete instead of truncate like refresh_dml to avoid missing rows between the above deleted queue fetch and here.
PERFORM update_step(v_step_id, 'OK','Request to repull ALL data from source. This could take a while...');
PERFORM gdb(p_debug, 'Request to repull ALL data from source. This could take a while...');
v_truncate_remote_q := 'SELECT dblink_exec('||quote_literal(v_dblink_name)||','||quote_literal('DELETE FROM '||v_control||' WHERE processed = true')||')';
PERFORM gdb(p_debug, v_truncate_remote_q);
EXECUTE v_truncate_remote_q;
v_step_id := add_step(v_job_id,'Removing local, undeleted rows');
PERFORM gdb(p_debug,'Removing local, undeleted rows');
EXECUTE 'DELETE FROM '||v_dest_table||' WHERE mimeo_source_deleted IS NULL';
PERFORM update_step(v_step_id, 'OK','Done');
-- Define cursor query
v_remote_f_sql := 'SELECT '||v_cols||' FROM '||v_source_table;
IF v_condition IS NOT NULL THEN
v_remote_f_sql := v_remote_f_sql || ' ' || v_condition;
END IF;
ELSE
-- Do normal stuff here
EXECUTE 'CREATE TEMP TABLE '||v_tmp_table||'_queue ('||v_pk_name_type_csv||')';
v_remote_q_sql := 'SELECT DISTINCT '||v_pk_name_csv||' FROM '||v_control||' WHERE processed = true and mimeo_source_deleted IS NULL';
PERFORM dblink_open(v_dblink_name, 'mimeo_cursor', v_remote_q_sql);
v_step_id := add_step(v_job_id, 'Creating local queue temp table for inserts/updates');
v_rowcount := 0;
LOOP
v_fetch_sql := 'INSERT INTO '||v_tmp_table||'_queue ('||v_pk_name_csv||')
SELECT '||v_pk_name_csv||' FROM dblink_fetch('||quote_literal(v_dblink_name)||', ''mimeo_cursor'', 50000) AS ('||v_pk_name_type_csv||')';
EXECUTE v_fetch_sql;
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
EXIT WHEN v_rowcount = 0;
v_total := v_total + coalesce(v_rowcount, 0);
PERFORM gdb(p_debug,'Fetching rows in batches: '||v_total||' done so far.');
PERFORM update_step(v_step_id, 'PENDING', 'Fetching rows in batches: '||v_total||' done so far.');
END LOOP;
PERFORM dblink_close(v_dblink_name, 'mimeo_cursor');
EXECUTE 'CREATE INDEX ON '||v_tmp_table||'_queue ('||v_pk_name_csv||')';
EXECUTE 'ANALYZE '||v_tmp_table||'_queue';
PERFORM update_step(v_step_id, 'OK','Number of rows inserted: '||v_total);
PERFORM gdb(p_debug,'Temp inserts/updates queue table row count '||v_total::text);
-- remove records from local table (inserts/updates)
v_step_id := add_step(v_job_id,'Removing insert/update records from local table');
v_delete_f_sql := 'DELETE FROM '||v_dest_table||' a USING '||v_tmp_table||'_queue b WHERE '|| v_pk_where;
PERFORM gdb(p_debug,v_delete_f_sql);
EXECUTE v_delete_f_sql;
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
PERFORM gdb(p_debug,'Insert/Update rows removed from local table before applying changes: '||v_rowcount::text);
PERFORM update_step(v_step_id, 'OK','Removed '||v_rowcount||' records');
-- remove records from local table (deleted rows)
v_step_id := add_step(v_job_id,'Removing deleted records from local table');
v_delete_d_sql := 'DELETE FROM '||v_dest_table||' a USING '||v_tmp_table||'_deleted b WHERE '|| v_pk_where;
PERFORM gdb(p_debug,v_delete_d_sql);
EXECUTE v_delete_d_sql;
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
PERFORM gdb(p_debug,'Deleted rows removed from local table before applying changes: '||v_rowcount::text);
PERFORM update_step(v_step_id, 'OK','Removed '||v_rowcount||' records');
-- Remote full query for normal replication
v_remote_f_sql := 'SELECT '||v_cols||' FROM '||v_source_table||' JOIN ('||v_remote_q_sql||') x USING ('||v_pk_name_csv||')';
IF v_condition IS NOT NULL THEN
v_remote_f_sql := v_remote_f_sql || ' ' || v_condition;
END IF;
END IF;
-- insert records to local table (inserts/updates). Have to do temp table in case destination table is partitioned (returns 0 when inserting to parent)
PERFORM dblink_open(v_dblink_name, 'mimeo_cursor', v_remote_f_sql);
v_step_id := add_step(v_job_id, 'Inserting new/updated records into local table');
EXECUTE 'CREATE TEMP TABLE '||v_tmp_table||'_full ('||v_cols_n_types||')';
v_rowcount := 0;
v_total := 0;
LOOP
v_fetch_sql := 'INSERT INTO '||v_tmp_table||'_full ('||v_cols||')
SELECT '||v_cols||' FROM dblink_fetch('||quote_literal(v_dblink_name)||', ''mimeo_cursor'', 50000) AS ('||v_cols_n_types||')';
EXECUTE v_fetch_sql;
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
v_total := v_total + coalesce(v_rowcount, 0);
EXECUTE 'INSERT INTO '||v_dest_table||' ('||v_cols||') SELECT '||v_cols||' FROM '||v_tmp_table||'_full';
EXECUTE 'TRUNCATE '||v_tmp_table||'_full';
EXIT WHEN v_rowcount = 0;
PERFORM gdb(p_debug,'Fetching rows in batches: '||v_total||' done so far.');
PERFORM update_step(v_step_id, 'PENDING', 'Fetching rows in batches: '||v_total||' done so far.');
END LOOP;
PERFORM dblink_close(v_dblink_name, 'mimeo_cursor');
PERFORM update_step(v_step_id, 'OK','New/updated rows inserted: '||v_total);
-- insert records to local table (deleted rows to be kept)
v_step_id := add_step(v_job_id,'Inserting deleted records into local table');
v_insert_deleted_sql := 'INSERT INTO '||v_dest_table||'('||v_cols||', mimeo_source_deleted) SELECT '||v_cols||', mimeo_source_deleted FROM '||v_tmp_table||'_deleted';
PERFORM gdb(p_debug,v_insert_deleted_sql);
EXECUTE v_insert_deleted_sql;
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
PERFORM gdb(p_debug,'Deleted rows inserted: '||v_rowcount::text);
PERFORM update_step(v_step_id, 'OK','Inserted '||v_rowcount||' records');
IF (v_total + v_rowcount) > (v_limit * .75) THEN
v_step_id := add_step(v_job_id, 'Row count warning');
PERFORM update_step(v_step_id, 'WARNING','Row count fetched ('||v_total||') greater than 75% of batch limit ('||v_limit||'). Recommend increasing batch limit if possible.');
v_batch_limit_reached := true;
END IF;
-- clean out rows from txn table
v_step_id := add_step(v_job_id,'Cleaning out rows from txn table');
v_trigger_delete := 'SELECT dblink_exec('||quote_literal(v_dblink_name)||','||quote_literal('DELETE FROM '||v_control||' WHERE processed = true')||')';
PERFORM gdb(p_debug,v_trigger_delete);
EXECUTE v_trigger_delete INTO v_exec_status;
PERFORM update_step(v_step_id, 'OK','Result was '||v_exec_status);
-- update activity status
v_step_id := add_step(v_job_id,'Updating last_run in config table');
UPDATE refresh_config_logdel SET last_run = CURRENT_TIMESTAMP WHERE dest_table = p_destination;
PERFORM update_step(v_step_id, 'OK','Last Value was '||current_timestamp);
PERFORM dblink_disconnect(v_dblink_name);
EXECUTE 'DROP TABLE IF EXISTS '||v_tmp_table||'_full';
EXECUTE 'DROP TABLE IF EXISTS '||v_tmp_table||'_queue';
EXECUTE 'DROP TABLE IF EXISTS '||v_tmp_table||'_deleted';
IF v_batch_limit_reached = false THEN
PERFORM close_job(v_job_id);
ELSE
-- Set final job status to level 2 (WARNING) to bring notice that the batch limit was reached and may need adjusting.
-- Preventive warning to keep replication from falling behind.
PERFORM fail_job(v_job_id, 2);
END IF;
-- Ensure old search path is reset for the current session
EXECUTE 'SELECT set_config(''search_path'','''||v_old_search_path||''',''false'')';
PERFORM pg_advisory_unlock(hashtext('refresh_logdel'), hashtext(v_job_name));
EXCEPTION
WHEN QUERY_CANCELED THEN
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_get_connections() @> ARRAY['||quote_literal(v_dblink_name)||']' INTO v_link_exists;
IF v_link_exists THEN
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_disconnect('||quote_literal(v_dblink_name)||')';
END IF;
PERFORM pg_advisory_unlock(hashtext('refresh_logdel'), hashtext(v_job_name));
RAISE EXCEPTION '%', SQLERRM;
WHEN OTHERS THEN
IF v_job_id IS NULL THEN
EXECUTE 'SELECT '||v_jobmon_schema||'.add_job(''Refresh Log Del: '||p_destination||''')' INTO v_job_id;
EXECUTE 'SELECT '||v_jobmon_schema||'.add_step('||v_job_id||', ''EXCEPTION before job logging started'')' INTO v_step_id;
END IF;
IF v_step_id IS NULL THEN
EXECUTE 'SELECT '||v_jobmon_schema||'.add_step('||v_job_id||', ''EXCEPTION before first step logged'')' INTO v_step_id;
END IF;
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_get_connections() @> ARRAY['||quote_literal(v_dblink_name)||']' INTO v_link_exists;
IF v_link_exists THEN
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_disconnect('||quote_literal(v_dblink_name)||')';
END IF;
EXECUTE 'SELECT '||v_jobmon_schema||'.update_step('||v_step_id||', ''CRITICAL'', ''ERROR: '||coalesce(SQLERRM,'unknown')||''')';
EXECUTE 'SELECT '||v_jobmon_schema||'.fail_job('||v_job_id||')';
PERFORM pg_advisory_unlock(hashtext('refresh_logdel'), hashtext(v_job_name));
RAISE EXCEPTION '%', SQLERRM;
END
$$;
/*
* Snap refresh to repull all table data
*/
CREATE OR REPLACE FUNCTION refresh_snap(p_destination text, p_index boolean DEFAULT true, p_debug boolean DEFAULT false, p_pulldata boolean DEFAULT true) RETURNS void
LANGUAGE plpgsql SECURITY DEFINER
AS $$
DECLARE
v_adv_lock boolean;
v_cols_n_types text[];
v_cols text[];
v_condition text;
v_create_sql text;
v_dblink int;
v_dblink_name text;
v_dblink_schema text;
v_dest_table text;
v_exists int;
v_fetch_sql text;
v_filter text[];
v_insert_sql text;
v_job_id int;
v_jobmon_schema text;
v_job_name text;
v_lcols_array text[];
v_link_exists boolean;
v_local_sql text;
v_l text;
v_match boolean = true;
v_old_grant record;
v_old_owner text;
v_old_search_path text;
v_old_snap text;
v_old_snap_table text;
v_parts record;
v_post_script text[];
v_refresh_snap text;
v_remote_index_sql text;
v_remote_sql text;
v_row record;
v_rowcount bigint;
v_r text;
v_snap text;
v_source_table text;
v_step_id int;
v_table_exists boolean;
v_total bigint := 0;
v_tup_del bigint;
v_tup_ins bigint;
v_tup_upd bigint;
v_tup_del_new bigint;
v_tup_ins_new bigint;
v_tup_upd_new bigint;
v_view_definition text;
BEGIN
IF p_debug IS DISTINCT FROM true THEN
PERFORM set_config( 'client_min_messages', 'notice', true );
END IF;
v_job_name := 'Refresh Snap: '||p_destination;
v_dblink_name := 'mimeo_snap_refresh_'||p_destination;
SELECT nspname INTO v_dblink_schema FROM pg_namespace n, pg_extension e WHERE e.extname = 'dblink' AND e.extnamespace = n.oid;
SELECT nspname INTO v_jobmon_schema FROM pg_namespace n, pg_extension e WHERE e.extname = 'pg_jobmon' AND e.extnamespace = n.oid;
-- Set custom search path to allow easier calls to other functions, especially job logging
SELECT current_setting('search_path') INTO v_old_search_path;
EXECUTE 'SELECT set_config(''search_path'',''@extschema@,'||v_jobmon_schema||','||v_dblink_schema||',public'',''false'')';
-- Take advisory lock to prevent multiple calls to function overlapping and causing possible deadlock
v_adv_lock := pg_try_advisory_lock(hashtext('refresh_snap'), hashtext(v_job_name));
IF v_adv_lock = 'false' THEN
v_job_id := add_job(v_job_name);
v_step_id := add_step(v_job_id,'Obtaining advisory lock for job: '||v_job_name);
PERFORM gdb(p_debug,'Obtaining advisory lock FAILED for job: '||v_job_name);
PERFORM update_step(v_step_id, 'WARNING','Found concurrent job. Exiting gracefully');
PERFORM fail_job(v_job_id, 2);
EXECUTE 'SELECT set_config(''search_path'','''||v_old_search_path||''',''false'')';
RETURN;
END IF;
v_job_id := add_job(v_job_name);
PERFORM gdb(p_debug,'Job ID: '||v_job_id::text);
v_step_id := add_step(v_job_id,'Grabbing Mapping, Building SQL');
SELECT source_table
, dest_table
, dblink
, filter
, condition
, n_tup_ins
, n_tup_upd
, n_tup_del
, post_script
INTO v_source_table
, v_dest_table
, v_dblink
, v_filter
, v_condition
, v_tup_ins
, v_tup_upd
, v_tup_del
, v_post_script
FROM refresh_config_snap
WHERE dest_table = p_destination;
IF NOT FOUND THEN
RAISE EXCEPTION 'No configuration found for %',v_job_name;
END IF;
-- checking for current view
SELECT definition INTO v_view_definition FROM pg_views where
((schemaname || '.') || viewname)=v_dest_table;
PERFORM dblink_connect(v_dblink_name, @extschema@.auth(v_dblink));
PERFORM update_step(v_step_id, 'OK','Done');
v_step_id := add_step(v_job_id,'Truncate non-active snap table');
v_exists := strpos(v_view_definition, 'snap1');
IF v_exists > 0 THEN
v_snap := 'snap2';
v_old_snap := 'snap1';
ELSE
v_snap := 'snap1';
v_old_snap := 'snap2';
END IF;
v_refresh_snap := v_dest_table||'_'||v_snap;
v_old_snap_table := v_dest_table||'_'||v_old_snap;
PERFORM gdb(p_debug,'v_refresh_snap: '||v_refresh_snap::text);
-- Create snap table if it doesn't exist
PERFORM gdb(p_debug, 'Getting table columns and creating destination table if it doesn''t exist');
SELECT p_table_exists, p_cols, p_cols_n_types FROM manage_dest_table(v_dest_table, v_snap, p_debug) INTO v_table_exists, v_cols, v_cols_n_types;
IF v_table_exists THEN
/* Check local column definitions against remote and recreate table if different. Allows automatic recreation of
snap tables if columns change (add, drop type change) */
v_local_sql := 'SELECT array_agg(attname||'' ''||format_type(atttypid, atttypmod)::text) as cols_n_types FROM pg_attribute WHERE attnum > 0 AND attisdropped is false AND attrelid = ' || quote_literal(v_refresh_snap) || '::regclass';
PERFORM gdb(p_debug, v_local_sql);
EXECUTE v_local_sql INTO v_lcols_array;
-- Check to see if there's a change in the column structure on the remote
FOREACH v_r IN ARRAY v_cols_n_types LOOP
v_match := false;
FOREACH v_l IN ARRAY v_lcols_array LOOP
IF v_r = v_l THEN
v_match := true;
EXIT;
END IF;
END LOOP;
END LOOP;
IF v_match = false THEN
-- Grab old table & view privileges. They are applied later after the view is recreated/swapped
CREATE TEMP TABLE mimeo_snapshot_grants_tmp (statement text);
FOR v_old_grant IN
SELECT table_schema ||'.'|| table_name AS tablename
, array_agg(privilege_type::text) AS types
, grantee
FROM information_schema.table_privileges
WHERE table_schema ||'.'|| table_name IN (v_refresh_snap, v_dest_table)
GROUP BY grantee, table_schema, table_name
LOOP
INSERT INTO mimeo_snapshot_grants_tmp VALUES (
'GRANT '||array_to_string(v_old_grant.types, ',')||' ON '||v_old_grant.tablename||' TO '||v_old_grant.grantee
);
END LOOP;
SELECT viewowner INTO v_old_owner FROM pg_views WHERE schemaname ||'.'|| viewname = v_dest_table;
EXECUTE 'DROP TABLE ' || v_refresh_snap;
EXECUTE 'DROP VIEW ' || v_dest_table;
PERFORM manage_dest_table(v_dest_table, v_snap, p_debug);
v_step_id := add_step(v_job_id,'Source table structure changed.');
PERFORM update_step(v_step_id, 'OK','Tables and view dropped and recreated. Please double-check snap table attributes (permissions, indexes, etc');
PERFORM gdb(p_debug,'Source table structure changed. Tables and view dropped and recreated. Please double-check snap table attributes (permissions, indexes, etc)');
END IF;
-- truncate non-active snap table
EXECUTE 'TRUNCATE TABLE ' || v_refresh_snap;
PERFORM update_step(v_step_id, 'OK','Done');
END IF;
-- Only check the remote data if there have been no column changes and snap table actually exists.
-- Otherwise maker functions won't work if source is empty & view switch won't happen properly.
IF v_table_exists AND v_match THEN
v_remote_sql := 'SELECT n_tup_ins, n_tup_upd, n_tup_del FROM pg_catalog.pg_stat_all_tables WHERE relid::regclass = '||quote_literal(v_source_table)||'::regclass';
v_remote_sql := 'SELECT n_tup_ins, n_tup_upd, n_tup_del FROM dblink('||quote_literal(v_dblink_name)||', ' || quote_literal(v_remote_sql) || ') t (n_tup_ins bigint, n_tup_upd bigint, n_tup_del bigint)';
perform gdb(p_debug,'v_remote_sql: '||v_remote_sql);
EXECUTE v_remote_sql INTO v_tup_ins_new, v_tup_upd_new, v_tup_del_new;
IF v_tup_ins_new = v_tup_ins AND v_tup_upd_new = v_tup_upd AND v_tup_del_new = v_tup_del THEN
PERFORM gdb(p_debug,'Remote table has not had any writes. Skipping data pull');
PERFORM update_step(v_step_id, 'OK', 'Remote table has not had any writes. Skipping data pull');
UPDATE refresh_config_snap SET last_run = CURRENT_TIMESTAMP WHERE dest_table = p_destination;
PERFORM dblink_disconnect(v_dblink_name);
PERFORM close_job(v_job_id);
EXECUTE 'SELECT set_config(''search_path'','''||v_old_search_path||''',''false'')';
PERFORM pg_advisory_unlock(hashtext('refresh_snap'), hashtext(v_job_name));
RETURN;
END IF;
END IF;
v_remote_sql := 'SELECT '|| array_to_string(v_cols, ',') ||' FROM '||v_source_table;
-- Used by p_pulldata parameter in maker function
IF p_pulldata = false THEN
v_remote_sql := v_remote_sql || ' LIMIT 0';
ELSIF v_condition IS NOT NULL THEN
v_remote_sql := v_remote_sql || ' ' || v_condition;
END IF;
v_step_id := add_step(v_job_id,'Inserting records into local table');
PERFORM dblink_open(v_dblink_name, 'mimeo_cursor', v_remote_sql);
v_rowcount := 0;
LOOP
v_fetch_sql := 'INSERT INTO '|| v_refresh_snap ||' ('|| array_to_string(v_cols, ',') ||')
SELECT '||array_to_string(v_cols, ',')||' FROM dblink_fetch('||quote_literal(v_dblink_name)||', ''mimeo_cursor'', 50000) AS ('||array_to_string(v_cols_n_types, ',')||')';
EXECUTE v_fetch_sql;
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
EXIT WHEN v_rowcount = 0;
v_total := v_total + coalesce(v_rowcount, 0);
PERFORM gdb(p_debug,'Fetching rows in batches: '||v_total||' done so far.');
PERFORM update_step(v_step_id, 'PENDING', 'Fetching rows in batches: '||v_total||' done so far.');
END LOOP;
PERFORM dblink_close(v_dblink_name, 'mimeo_cursor');
PERFORM update_step(v_step_id, 'OK','Inserted '||v_total||' rows');
-- Create indexes if new table was created
IF (v_table_exists = false OR v_match = 'f') AND p_index = true THEN
PERFORM gdb(p_debug, 'Creating indexes');
PERFORM create_index(v_dest_table, v_snap, p_debug);
END IF;
EXECUTE 'ANALYZE ' ||v_refresh_snap;
-- swap view
v_step_id := add_step(v_job_id,'Swap view to '||v_refresh_snap);
PERFORM gdb(p_debug,'Swapping view to '||v_refresh_snap);
EXECUTE 'CREATE OR REPLACE VIEW '||v_dest_table||' AS SELECT * FROM '||v_refresh_snap;
PERFORM update_step(v_step_id, 'OK','View Swapped');
IF v_match = false THEN
-- Actually apply the original privileges if the table was recreated
FOR v_old_grant IN SELECT statement FROM mimeo_snapshot_grants_tmp
LOOP
EXECUTE v_old_grant.statement;
END LOOP;
DROP TABLE IF EXISTS mimeo_snapshot_grants_tmp;
EXECUTE 'ALTER VIEW '||v_dest_table||' OWNER TO '||v_old_owner;
EXECUTE 'ALTER TABLE '||v_refresh_snap||' OWNER TO '||v_old_owner;
-- Run any special sql to fix anything that was done to destination tables (extra indexes, etc)
IF v_post_script IS NOT NULL THEN
v_step_id := add_step(v_job_id,'Applying post_script sql commands due to schema change');
PERFORM @extschema@.post_script(v_dest_table);
PERFORM update_step(v_step_id, 'OK','Done');
END IF;
END IF;
SELECT
CASE
WHEN count(1) > 0 THEN true
ELSE false
END
INTO v_table_exists FROM pg_tables WHERE schemaname ||'.'|| tablename = v_old_snap_table;
IF v_table_exists THEN
v_step_id := add_step(v_job_id,'Truncating old snap table');
EXECUTE 'TRUNCATE TABLE '||v_old_snap_table;
PERFORM update_step(v_step_id, 'OK','Done');
END IF;
v_step_id := add_step(v_job_id,'Updating last_run & tuple change values');
UPDATE refresh_config_snap SET
last_run = CURRENT_TIMESTAMP
, n_tup_ins = v_tup_ins_new
, n_tup_upd = v_tup_upd_new
, n_tup_del = v_tup_del_new
WHERE dest_table = p_destination;
PERFORM update_step(v_step_id, 'OK','Done');
PERFORM dblink_disconnect(v_dblink_name);
PERFORM close_job(v_job_id);
-- Ensure old search path is reset for the current session
EXECUTE 'SELECT set_config(''search_path'','''||v_old_search_path||''',''false'')';
PERFORM pg_advisory_unlock(hashtext('refresh_snap'), hashtext(v_job_name));
EXCEPTION
WHEN QUERY_CANCELED THEN
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_get_connections() @> ARRAY['||quote_literal(v_dblink_name)||']' INTO v_link_exists;
IF v_link_exists THEN
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_disconnect('||quote_literal(v_dblink_name)||')';
END IF;
PERFORM pg_advisory_unlock(hashtext('refresh_snap'), hashtext(v_job_name));
RAISE EXCEPTION '%', SQLERRM;
WHEN OTHERS THEN
IF v_job_id IS NULL THEN
EXECUTE 'SELECT '||v_jobmon_schema||'.add_job(''Refresh Snap: '||p_destination||''')' INTO v_job_id;
EXECUTE 'SELECT '||v_jobmon_schema||'.add_step('||v_job_id||', ''EXCEPTION before job logging started'')' INTO v_step_id;
END IF;
IF v_step_id IS NULL THEN
EXECUTE 'SELECT '||v_jobmon_schema||'.add_step('||v_job_id||', ''EXCEPTION before first step logged'')' INTO v_step_id;
END IF;
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_get_connections() @> ARRAY['||quote_literal(v_dblink_name)||']' INTO v_link_exists;
IF v_link_exists THEN
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_disconnect('||quote_literal(v_dblink_name)||')';
END IF;
EXECUTE 'SELECT '||v_jobmon_schema||'.update_step('||v_step_id||', ''CRITICAL'', ''ERROR: '||COALESCE(SQLERRM,'unknown')||''')';
EXECUTE 'SELECT '||v_jobmon_schema||'.fail_job('||v_job_id||')';
PERFORM pg_advisory_unlock(hashtext('refresh_snap'), hashtext(v_job_name));
RAISE EXCEPTION '%', SQLERRM;
END
$$;
/*
* Refresh insert/update only table based on timestamp control field
*/
CREATE OR REPLACE FUNCTION refresh_updater(p_destination text, p_limit integer DEFAULT NULL, p_repull boolean DEFAULT false, p_repull_start text DEFAULT NULL, p_repull_end text DEFAULT NULL, p_debug boolean DEFAULT false) RETURNS void
LANGUAGE plpgsql SECURITY DEFINER
AS $$
DECLARE
v_adv_lock boolean;
v_batch_limit_reached int := 0;
v_boundary_sql text;
v_boundary timestamptz;
v_cols_n_types text;
v_cols text;
v_condition text;
v_control text;
v_create_sql text;
v_dblink int;
v_dblink_name text;
v_dblink_schema text;
v_delete_sql text;
v_dest_table text;
v_dst_active boolean;
v_dst_check boolean;
v_dst_start int;
v_dst_end int;
v_fetch_sql text;
v_field text;
v_filter text[];
v_full_refresh boolean := false;
v_insert_sql text;
v_job_id int;
v_jobmon_schema text;
v_job_name text;
v_last_fetched timestamptz;
v_last_value timestamptz;
v_limit int;
v_link_exists boolean;
v_now timestamptz := now();
v_old_search_path text;
v_pk_counter int := 1;
v_pk_name text[];
v_remote_boundry_sql text;
v_remote_boundry timestamptz;
v_remote_sql text;
v_rowcount bigint := 0;
v_source_table text;
v_step_id int;
v_tmp_table text;
v_total bigint := 0;
BEGIN
IF p_debug IS DISTINCT FROM true THEN
PERFORM set_config( 'client_min_messages', 'warning', true );
END IF;
v_job_name := 'Refresh Updater: '||p_destination;
v_dblink_name := 'mimeo_updater_refresh_'||p_destination;
SELECT nspname INTO v_dblink_schema FROM pg_namespace n, pg_extension e WHERE e.extname = 'dblink' AND e.extnamespace = n.oid;
SELECT nspname INTO v_jobmon_schema FROM pg_namespace n, pg_extension e WHERE e.extname = 'pg_jobmon' AND e.extnamespace = n.oid;
-- Set custom search path to allow easier calls to other functions, especially job logging
SELECT current_setting('search_path') INTO v_old_search_path;
EXECUTE 'SELECT set_config(''search_path'',''@extschema@,'||v_jobmon_schema||','||v_dblink_schema||',public'',''false'')';
-- Take advisory lock to prevent multiple calls to function overlapping
v_adv_lock := pg_try_advisory_lock(hashtext('refresh_updater'), hashtext(v_job_name));
IF v_adv_lock = 'false' THEN
v_job_id := add_job(v_job_name);
v_step_id := add_step(v_job_id,'Obtaining advisory lock for job: '||v_job_name);
PERFORM gdb(p_debug,'Obtaining advisory lock FAILED for job: '||v_job_name);
PERFORM update_step(v_step_id, 'WARNING','Found concurrent job. Exiting gracefully');
PERFORM fail_job(v_job_id, 2);
EXECUTE 'SELECT set_config(''search_path'','''||v_old_search_path||''',''false'')';
RETURN;
END IF;
v_job_id := add_job(v_job_name);
PERFORM gdb(p_debug,'Job ID: '||v_job_id::text);
SELECT source_table
, dest_table
, 'tmp_'||replace(dest_table,'.','_')
, dblink
, control
, last_value
, now() - boundary::interval
, pk_name
, filter
, condition
, dst_active
, dst_start
, dst_end
, batch_limit
FROM refresh_config_updater
WHERE dest_table = p_destination INTO
v_source_table
, v_dest_table
, v_tmp_table
, v_dblink
, v_control
, v_last_value
, v_boundary
, v_pk_name
, v_filter
, v_condition
, v_dst_active
, v_dst_start
, v_dst_end
, v_limit;
IF NOT FOUND THEN
RAISE EXCEPTION 'No configuration found for %',v_job_name;
END IF;
-- Do not allow this function to run during DST time change if config option is true. Otherwise will miss data from source
IF v_dst_active THEN
v_dst_check := @extschema@.dst_change(v_now);
IF v_dst_check THEN
IF to_number(to_char(v_now, 'HH24MM'), '0000') > v_dst_start AND to_number(to_char(v_now, 'HH24MM'), '0000') < v_dst_end THEN
v_step_id := add_step( v_job_id, 'DST Check');
PERFORM update_step(v_step_id, 'OK', 'Job CANCELLED - Does not run during DST time change');
UPDATE refresh_config_updater SET last_run = CURRENT_TIMESTAMP WHERE dest_table = p_destination;
PERFORM close_job(v_job_id);
PERFORM gdb(p_debug, 'Cannot run during DST time change');
EXECUTE 'SELECT set_config(''search_path'','''||v_old_search_path||''',''false'')';
PERFORM pg_advisory_unlock(hashtext('refresh_updater'), hashtext(v_job_name));
RETURN;
END IF;
END IF;
END IF;
v_step_id := add_step(v_job_id,'Building SQL');
-- determine column list, column type list
IF v_filter IS NULL THEN
SELECT array_to_string(array_agg(attname),','), array_to_string(array_agg(attname||' '||format_type(atttypid, atttypmod)::text),',')
INTO v_cols, v_cols_n_types
FROM pg_attribute WHERE attrelid = p_destination::regclass AND attnum > 0 AND attisdropped is false;
ELSE
-- ensure all primary key columns are included in any column filters
FOREACH v_field IN ARRAY v_pk_name LOOP
IF v_field = ANY(v_filter) THEN
CONTINUE;
ELSE
RAISE EXCEPTION 'Filter list did not contain all columns that compose primary/unique key for %',v_job_name;
END IF;
END LOOP;
SELECT array_to_string(array_agg(attname),','), array_to_string(array_agg(attname||' '||format_type(atttypid, atttypmod)::text),',')
INTO v_cols, v_cols_n_types
FROM pg_attribute WHERE attrelid = p_destination::regclass AND ARRAY[attname::text] <@ v_filter AND attnum > 0 AND attisdropped is false;
END IF;
PERFORM dblink_connect(v_dblink_name, auth(v_dblink));
IF p_limit IS NOT NULL THEN
v_limit := p_limit;
END IF;
-- Repull old data instead of normal new data pull
IF p_repull THEN
-- Repull ALL data if no start and end values set
IF p_repull_start IS NULL AND p_repull_end IS NULL THEN
PERFORM update_step(v_step_id, 'OK','Request to repull ALL data from source. This could take a while...');
EXECUTE 'TRUNCATE '||v_dest_table;
v_remote_sql := 'SELECT '||v_cols||' FROM '||v_source_table;
IF v_condition IS NOT NULL THEN
v_remote_sql := v_remote_sql || ' ' || v_condition;
END IF;
ELSE
PERFORM update_step(v_step_id, 'OK','Request to repull data from '||p_repull_start||' to '||p_repull_end);
PERFORM gdb(p_debug,'Request to repull data from '||p_repull_start||' to '||p_repull_end);
v_remote_sql := 'SELECT '||v_cols||' FROM '||v_source_table;
IF v_condition IS NOT NULL THEN
v_remote_sql := v_remote_sql || ' ' || v_condition || ' AND ';
ELSE
v_remote_sql := v_remote_sql || ' WHERE ';
END IF;
v_remote_sql := v_remote_sql ||v_control||' > '||quote_literal(COALESCE(p_repull_start, '-infinity'))||' AND '
||v_control||' < '||quote_literal(COALESCE(p_repull_end, 'infinity'));
EXECUTE 'DELETE FROM '||v_dest_table||' WHERE '||v_control||' > '||quote_literal(COALESCE(p_repull_start, '-infinity'))||' AND '
||v_control||' < '||quote_literal(COALESCE(p_repull_end, 'infinity'));
END IF;
ELSE
-- does < for upper boundary to keep missing data from happening on rare edge case where a newly inserted row outside the transaction batch
-- has the exact same timestamp as the previous batch's max timestamp
v_remote_sql := 'SELECT '||v_cols||' FROM '||v_source_table;
IF v_condition IS NOT NULL THEN
v_remote_sql := v_remote_sql || ' ' || v_condition || ' AND ';
ELSE
v_remote_sql := v_remote_sql || ' WHERE ';
END IF;
v_remote_sql := v_remote_sql ||v_control||' > '||quote_literal(v_last_value)||' AND '||v_control||' < '||quote_literal(v_boundary)||' ORDER BY '||v_control||' ASC LIMIT '|| COALESCE(v_limit::text, 'ALL');
v_delete_sql := 'DELETE FROM '||v_dest_table||' USING '||v_tmp_table||' t WHERE ';
WHILE v_pk_counter <= array_length(v_pk_name,1) LOOP
IF v_pk_counter > 1 THEN
v_delete_sql := v_delete_sql ||' AND ';
END IF;
v_delete_sql := v_delete_sql ||v_dest_table||'.'||v_pk_name[v_pk_counter]||' = t.'||v_pk_name[v_pk_counter];
v_pk_counter := v_pk_counter + 1;
END LOOP;
PERFORM update_step(v_step_id, 'OK','Grabbing rows from '||v_last_value::text||' to '||v_boundary::text);
PERFORM gdb(p_debug,'Grabbing rows from '||v_last_value::text||' to '||v_boundary::text);
END IF;
v_insert_sql := 'INSERT INTO '||v_dest_table||' ('||v_cols||') SELECT '||v_cols||' FROM '||v_tmp_table;
PERFORM gdb(p_debug,v_remote_sql);
PERFORM dblink_open(v_dblink_name, 'mimeo_cursor', v_remote_sql);
v_step_id := add_step(v_job_id, 'Inserting new/updated records into local table');
v_rowcount := 0;
EXECUTE 'CREATE TEMP TABLE '||v_tmp_table||' ('||v_cols_n_types||')';
LOOP
v_fetch_sql := 'INSERT INTO '||v_tmp_table||'('||v_cols||')
SELECT '||v_cols||' FROM dblink_fetch('||quote_literal(v_dblink_name)||', ''mimeo_cursor'', 50000) AS ('||v_cols_n_types||')';
EXECUTE v_fetch_sql;
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
v_total := v_total + coalesce(v_rowcount, 0);
EXECUTE 'SELECT max('||v_control||') FROM '||v_tmp_table INTO v_last_fetched;
IF v_limit IS NULL THEN -- insert into the real table in batches if no limit to avoid excessively large temp tables
IF p_repull IS FALSE THEN -- Delete any rows that exist in the current temp table batch. repull delete is done above.
EXECUTE v_delete_sql;
END IF;
EXECUTE v_insert_sql;
EXECUTE 'TRUNCATE '||v_tmp_table;
END IF;
EXIT WHEN v_rowcount = 0;
PERFORM gdb(p_debug,'Fetching rows in batches: '||v_total||' done so far. Last fetched: '||v_last_fetched);
PERFORM update_step(v_step_id, 'PENDING', 'Fetching rows in batches: '||v_total||' done so far. Last fetched: '||v_last_fetched);
END LOOP;
PERFORM dblink_close(v_dblink_name, 'mimeo_cursor');
PERFORM update_step(v_step_id, 'OK','Rows fetched: '||v_total);
IF v_limit IS NULL THEN
-- nothing else to do
ELSE
-- When using batch limits, entire batch must be pulled to temp table before inserting to real table to catch edge cases
v_step_id := add_step(v_job_id,'Checking for batch limit issues');
-- Not recommended that the batch actually equal the limit set if possible.
IF v_total >= v_limit THEN
PERFORM update_step(v_step_id, 'WARNING','Row count fetched equal to or greater than limit set: '||v_limit||'. Recommend increasing batch limit if possible.');
PERFORM gdb(p_debug, 'Row count fetched equal to or greater than limit set: '||v_limit||'. Recommend increasing batch limit if possible.');
EXECUTE 'SELECT max('||v_control||') FROM '||v_tmp_table INTO v_last_value;
v_step_id := add_step(v_job_id, 'Removing high boundary rows from this batch to avoid missing data');
EXECUTE 'DELETE FROM '||v_tmp_table||' WHERE '||v_control||' = '||quote_literal(v_last_value);
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
PERFORM update_step(v_step_id, 'OK', 'Removed '||v_rowcount||' rows. Batch now contains '||v_limit - v_rowcount||' records');
PERFORM gdb(p_debug, 'Removed '||v_rowcount||' rows from batch. Batch table now contains '||v_limit - v_rowcount||' records');
v_batch_limit_reached := 2;
IF (v_limit - v_rowcount) < 1 THEN
v_step_id := add_step(v_job_id, 'Reached inconsistent state');
PERFORM update_step(v_step_id, 'CRITICAL', 'Batch contained max rows ('||v_limit||') or greater and all contained the same timestamp value. Unable to guarentee rows will ever be replicated consistently. Increase row limit parameter to allow a consistent batch.');
PERFORM gdb(p_debug, 'Batch contained max rows ('||v_limit||') or greater and all contained the same timestamp value. Unable to guarentee rows will be replicated consistently. Increase row limit parameter to allow a consistent batch.');
v_batch_limit_reached := 3;
END IF;
ELSE
PERFORM update_step(v_step_id, 'OK','No issues found');
PERFORM gdb(p_debug, 'No issues found');
END IF;
IF v_batch_limit_reached <> 3 THEN
EXECUTE 'CREATE INDEX ON '||v_tmp_table||' ('||array_to_string(v_pk_name, ',')||')'; -- incase of large batch limit
EXECUTE 'ANALYZE '||v_tmp_table;
v_step_id := add_step(v_job_id,'Deleting records marked for update in local table');
perform gdb(p_debug,v_delete_sql);
execute v_delete_sql;
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
PERFORM update_step(v_step_id, 'OK','Deleted '||v_rowcount||' records');
v_step_id := add_step(v_job_id,'Inserting new records into local table');
perform gdb(p_debug,v_insert_sql);
EXECUTE v_insert_sql;
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
PERFORM update_step(v_step_id, 'OK','Inserted '||v_rowcount||' records');
END IF;
END IF; -- end v_limit IF
IF v_batch_limit_reached <> 3 THEN
v_step_id := add_step(v_job_id, 'Setting next lower boundary');
EXECUTE 'SELECT max('||v_control||') FROM '|| v_dest_table INTO v_last_value;
UPDATE refresh_config_updater set last_value = coalesce(v_last_value, CURRENT_TIMESTAMP), last_run = CURRENT_TIMESTAMP WHERE dest_table = p_destination;
PERFORM update_step(v_step_id, 'OK','Lower boundary value is: '||coalesce(v_last_value, CURRENT_TIMESTAMP));
PERFORM gdb(p_debug, 'Lower boundary value is: '||coalesce(v_last_value, CURRENT_TIMESTAMP));
END IF;
EXECUTE 'DROP TABLE IF EXISTS '||v_tmp_table;
PERFORM dblink_disconnect(v_dblink_name);
IF v_batch_limit_reached = 0 THEN
PERFORM close_job(v_job_id);
ELSIF v_batch_limit_reached = 2 THEN
-- Set final job status to level 2 (WARNING) to bring notice that the batch limit was reached and may need adjusting.
-- Preventive warning to keep replication from falling behind.
PERFORM fail_job(v_job_id, 2);
ELSIF v_batch_limit_reached = 3 THEN
-- Really bad. Critical alert!
PERFORM fail_job(v_job_id);
END IF;
-- Ensure old search path is reset for the current session
EXECUTE 'SELECT set_config(''search_path'','''||v_old_search_path||''',''false'')';
PERFORM pg_advisory_unlock(hashtext('refresh_updater'), hashtext(v_job_name));
EXCEPTION
WHEN QUERY_CANCELED THEN
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_get_connections() @> ARRAY['||quote_literal(v_dblink_name)||']' INTO v_link_exists;
IF v_link_exists THEN
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_disconnect('||quote_literal(v_dblink_name)||')';
END IF;
PERFORM pg_advisory_unlock(hashtext('refresh_updater'), hashtext(v_job_name));
RAISE EXCEPTION '%', SQLERRM;
WHEN OTHERS THEN
EXECUTE 'SELECT set_config(''search_path'',''@extschema@,'||v_jobmon_schema||','||v_dblink_schema||''',''false'')';
IF v_job_id IS NULL THEN
EXECUTE 'SELECT '||v_jobmon_schema||'.add_job(''Refresh Updater: '||p_destination||''')' INTO v_job_id;
EXECUTE 'SELECT '||v_jobmon_schema||'.add_step('||v_job_id||', ''EXCEPTION before job logging started'')' INTO v_step_id;
END IF;
IF v_step_id IS NULL THEN
EXECUTE 'SELECT '||v_jobmon_schema||'.add_step('||v_job_id||', ''EXCEPTION before first step logged'')' INTO v_step_id;
END IF;
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_get_connections() @> ARRAY['||quote_literal(v_dblink_name)||']' INTO v_link_exists;
IF v_link_exists THEN
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_disconnect('||quote_literal(v_dblink_name)||')';
END IF;
EXECUTE 'SELECT '||v_jobmon_schema||'.update_step('||v_step_id||', ''CRITICAL'', ''ERROR: '||COALESCE(SQLERRM,'unknown')||''')';
EXECUTE 'SELECT '||v_jobmon_schema||'.fail_job('||v_job_id||')';
PERFORM pg_advisory_unlock(hashtext('refresh_updater'), hashtext(v_job_name));
RAISE EXCEPTION '%', SQLERRM;
END
$$;
/*
* Plain table refresh function.
*/
CREATE OR REPLACE FUNCTION refresh_table(p_destination text, p_truncate_cascade boolean DEFAULT NULL, p_debug boolean DEFAULT false) RETURNS void
LANGUAGE plpgsql
AS $$
DECLARE
v_adv_lock boolean;
v_cols text[];
v_cols_n_types text[];
v_condition text;
v_dblink int;
v_dblink_name text;
v_dblink_schema text;
v_dest_table text;
v_fetch_sql text;
v_filter text;
v_link_exists boolean;
v_old_search_path text;
v_post_script text[];
v_remote_sql text;
v_rowcount bigint := 0;
v_seq text;
v_seq_max bigint;
v_sequences text[];
v_source_table text;
v_total bigint := 0;
v_truncate_cascade boolean;
v_truncate_sql text;
BEGIN
SELECT nspname INTO v_dblink_schema FROM pg_namespace n, pg_extension e WHERE e.extname = 'dblink' AND e.extnamespace = n.oid;
v_dblink_name := 'mimeo_table_refresh_'||p_destination;
SELECT current_setting('search_path') INTO v_old_search_path;
EXECUTE 'SELECT set_config(''search_path'',''@extschema@,'||v_dblink_schema||',public'',''false'')';
v_adv_lock := pg_try_advisory_lock(hashtext('refresh_table'), hashtext(p_destination));
IF v_adv_lock = 'false' THEN
RAISE NOTICE 'Found concurrent job. Exiting gracefully';
EXECUTE 'SELECT set_config(''search_path'','''||v_old_search_path||''',''false'')';
RETURN;
END IF;
SELECT source_table
, dest_table
, dblink
, filter
, condition
, sequences
, truncate_cascade
INTO v_source_table
, v_dest_table
, v_dblink
, v_filter
, v_condition
, v_sequences
, v_truncate_cascade
FROM refresh_config_table
WHERE dest_table = p_destination;
IF NOT FOUND THEN
RAISE EXCEPTION 'No configuration found for Refresh Table: %',p_destination;
END IF;
IF p_truncate_cascade IS NOT NULL THEN
v_truncate_cascade := p_truncate_cascade;
END IF;
v_truncate_sql := 'TRUNCATE TABLE '||v_dest_table;
IF v_truncate_cascade THEN
v_truncate_sql := v_truncate_sql || ' CASCADE';
RAISE NOTICE 'WARNING! If this table had foreign keys, you have just truncated all referencing tables as well!';
END IF;
EXECUTE v_truncate_sql;
PERFORM dblink_connect(v_dblink_name, @extschema@.auth(v_dblink));
v_remote_sql := 'SELECT array_agg(attname) as cols, array_agg(attname||'' ''||format_type(atttypid, atttypmod)::text) as cols_n_types FROM pg_attribute WHERE attrelid = '||quote_literal(v_source_table)||'::regclass AND attnum > 0 AND attisdropped is false';
IF v_filter IS NOT NULL THEN
v_remote_sql := v_remote_sql || ' AND ARRAY[attname::text] <@ '||quote_literal(v_filter);
END IF;
v_remote_sql := 'SELECT cols, cols_n_types FROM dblink('||quote_literal(v_dblink_name)||', ' || quote_literal(v_remote_sql) || ') t (cols text[], cols_n_types text[])';
EXECUTE v_remote_sql INTO v_cols, v_cols_n_types;
v_remote_sql := 'SELECT '|| array_to_string(v_cols, ',') ||' FROM '||v_source_table;
IF v_condition IS NOT NULL THEN
v_remote_sql := v_remote_sql || ' ' || v_condition;
END IF;
PERFORM dblink_open(v_dblink_name, 'mimeo_cursor', v_remote_sql);
v_rowcount := 0;
LOOP
v_fetch_sql := 'INSERT INTO '|| v_dest_table ||' ('|| array_to_string(v_cols, ',') ||')
SELECT '||array_to_string(v_cols, ',')||' FROM dblink_fetch('||quote_literal(v_dblink_name)||', ''mimeo_cursor'', 50000) AS ('||array_to_string(v_cols_n_types, ',')||')';
EXECUTE v_fetch_sql;
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
EXIT WHEN v_rowcount = 0;
v_total := v_total + coalesce(v_rowcount, 0);
PERFORM gdb(p_debug,'Fetching rows in batches: '||v_total||' done so far.');
END LOOP;
PERFORM dblink_close(v_dblink_name, 'mimeo_cursor');
PERFORM dblink_disconnect(v_dblink_name);
-- Reset any sequences given in the parameter to their new value.
-- Checks all tables that use the given sequence to ensure it's the max for the entire database.
IF v_sequences IS NOT NULL THEN
FOREACH v_seq IN ARRAY v_sequences LOOP
SELECT sequence_max_value(c.oid) INTO v_seq_max FROM pg_class c JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname ||'.'|| c.relname = v_seq;
IF v_seq_max IS NOT NULL THEN
PERFORM setval(v_seq, v_seq_max);
END IF;
END LOOP;
END IF;
UPDATE refresh_config_table set last_run = CURRENT_TIMESTAMP WHERE dest_table = v_dest_table;
PERFORM pg_advisory_unlock(hashtext('refresh_table'), hashtext(p_destination));
EXECUTE 'SELECT set_config(''search_path'','''||v_old_search_path||''',''false'')';
EXCEPTION
WHEN QUERY_CANCELED OR OTHERS THEN
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_get_connections() @> ARRAY['||quote_literal(v_dblink_name)||']' INTO v_link_exists;
IF v_link_exists THEN
EXECUTE 'SELECT '||v_dblink_schema||'.dblink_disconnect('||quote_literal(v_dblink_name)||')';
END IF;
PERFORM pg_advisory_unlock(hashtext('refresh_table'), hashtext(p_destination));
RAISE EXCEPTION '%', SQLERRM;
END
$$;
|
create table pg.a as select * from csv.a;
create table pg.b as select * from csv.b;
|
/*L
Copyright Ekagra Software Technologies Ltd.
Copyright SAIC, SAIC-Frederick
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/common-security-module/LICENSE.txt for details.
L*/
CREATE TABLE IF NOT EXISTS CSM_MAPPING (
MAPPING_ID bigint(20) NOT NULL auto_increment,
APPLICATION_ID bigint(20) NOT NULL,
OBJECT_NAME varchar(100) NOT NULL,
ATTRIBUTE_NAME varchar(100) NOT NULL,
OBJECT_PACKAGE_NAME varchar(100),
TABLE_NAME varchar(100),
TABLE_NAME_GROUP varchar(100),
TABLE_NAME_USER varchar(100),
VIEW_NAME_GROUP varchar(100),
VIEW_NAME_USER varchar(100),
ACTIVE_FLAG tinyint(1) default '0' NOT NULL,
MAINTAINED_FLAG tinyint(1) default '0' NOT NULL,
UPDATE_DATE date DEFAULT '0000-00-00',
PRIMARY KEY(MAPPING_ID)
) ENGINE=InnoDB
;
ALTER TABLE CSM_PROTECTION_ELEMENT DROP FOREIGN KEY FK_PE_APPLICATION;
ALTER TABLE CSM_MAPPING ADD CONSTRAINT FK_PE_APPLICATION
FOREIGN KEY (APPLICATION_ID) REFERENCES csm_application (APPLICATION_ID) ON DELETE CASCADE
;
ALTER TABLE CSM_MAPPING
ADD CONSTRAINT UQ_MP_OBJ_NAME_ATTRI_NAME_APP_ID UNIQUE (OBJECT_NAME,ATTRIBUTE_NAME,APPLICATION_ID)
;
ALTER TABLE CSM_APPLICATION ADD COLUMN CSM_VERSION VARCHAR(20);
|
<filename>data/database.sql
-- MySQL Script generated by MySQL Workbench
-- Fri Jul 31 09:54:42 2015
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema SiteMaster
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Table `users`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `users` (
`id` INT NOT NULL AUTO_INCREMENT COMMENT 'The Internal ID for the user',
`uid` VARCHAR(255) NOT NULL COMMENT 'An user identifier unique to the given provider. ',
`provider` VARCHAR(45) NOT NULL COMMENT 'The provider with which the user authenticated (e.g. \'Twitter\' or \'Facebook\')',
`email` VARCHAR(255) NULL,
`first_name` VARCHAR(45) NULL,
`last_name` VARCHAR(45) NULL,
`role` ENUM('ADMIN', 'USER') NULL DEFAULT 'USER' COMMENT 'The user\'s role for the system. Either ADMIN or USER.',
PRIMARY KEY (`id`),
UNIQUE INDEX `users_unique` (`provider` ASC, `uid` ASC))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `sites`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `sites` (
`id` INT NOT NULL AUTO_INCREMENT,
`base_url` VARCHAR(255) NOT NULL COMMENT 'the base url of the site',
`gpa` DECIMAL(5,2) NOT NULL DEFAULT 0,
`title` VARCHAR(255) BINARY NULL COMMENT 'The title of the site',
`support_email` VARCHAR(255) NULL COMMENT 'The support email for the site',
`last_connection_error` DATETIME NULL,
`last_connection_success` DATETIME NULL,
`http_code` INT(10) NULL,
`curl_code` INT(10) NULL,
`production_status` ENUM('PRODUCTION', 'DEVELOPMENT', 'ARCHIVED') NOT NULL DEFAULT 'PRODUCTION',
`source` VARCHAR(45) NULL COMMENT 'The source system. Null means that it was created by sitemaster.',
`support_groups` VARCHAR(256) NULL,
`site_map_url` VARCHAR(2100) NULL,
`crawl_method` ENUM('CRAWL_ONLY', 'SITE_MAP_ONLY', 'HYBRID') NOT NULL DEFAULT 'HYBRID',
PRIMARY KEY (`id`),
UNIQUE INDEX `baseurl_UNIQUE` (`base_url` ASC))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `site_members`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `site_members` (
`id` INT NOT NULL AUTO_INCREMENT,
`users_id` INT NOT NULL,
`sites_id` INT NOT NULL,
`source` VARCHAR(64) NULL COMMENT 'The source of this entry. NULL means that it was generated by this system',
`date_added` DATETIME NOT NULL COMMENT 'The date that this record was created',
`verification_code` VARCHAR(45) NOT NULL,
PRIMARY KEY (`id`),
INDEX `fk_site_members_users_idx` (`users_id` ASC),
INDEX `fk_site_members_sites1_idx` (`sites_id` ASC),
UNIQUE INDEX `unique_site_members` (`users_id` ASC, `sites_id` ASC, `source` ASC),
CONSTRAINT `fk_site_members_users`
FOREIGN KEY (`users_id`)
REFERENCES `users` (`id`)
ON DELETE CASCADE
ON UPDATE NO ACTION,
CONSTRAINT `fk_site_members_sites1`
FOREIGN KEY (`sites_id`)
REFERENCES `sites` (`id`)
ON DELETE CASCADE
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `roles`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `roles` (
`id` INT NOT NULL AUTO_INCREMENT,
`role_name` VARCHAR(45) NOT NULL,
`description` LONGTEXT NULL,
`protected` ENUM('YES', 'NO') NOT NULL DEFAULT 'NO' COMMENT 'A protected role means that only a manager can assign/approve it',
PRIMARY KEY (`id`),
UNIQUE INDEX `rolename_UNIQUE` (`role_name` ASC))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `site_member_roles`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `site_member_roles` (
`id` INT NOT NULL AUTO_INCREMENT,
`site_members_id` INT NOT NULL,
`roles_id` INT NOT NULL,
`approved` ENUM('YES', 'NO') NOT NULL DEFAULT 'NO',
`source` VARCHAR(64) NULL COMMENT 'The source of the member role. If null, it means that the system generated it.',
PRIMARY KEY (`id`, `site_members_id`),
INDEX `fk_site_member_roles_site_members1_idx` (`site_members_id` ASC),
INDEX `fk_site_member_roles_roles1_idx` (`roles_id` ASC),
UNIQUE INDEX `unique_site_member_roles` (`site_members_id` ASC, `roles_id` ASC),
CONSTRAINT `fk_site_member_roles_site_members1`
FOREIGN KEY (`site_members_id`)
REFERENCES `site_members` (`id`)
ON DELETE CASCADE
ON UPDATE NO ACTION,
CONSTRAINT `fk_site_member_roles_roles1`
FOREIGN KEY (`roles_id`)
REFERENCES `roles` (`id`)
ON DELETE CASCADE
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `scans`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `scans` (
`id` INT NOT NULL AUTO_INCREMENT,
`sites_id` INT NOT NULL,
`gpa` DECIMAL(5,2) NOT NULL DEFAULT 0 COMMENT 'the GPA. This is computed by averaging the numeric value of the scanned_page.grade',
`status` ENUM('CREATED', 'QUEUED', 'RUNNING', 'COMPLETE', 'ERROR') NOT NULL DEFAULT 'CREATED',
`scan_type` ENUM('USER', 'AUTO') NOT NULL DEFAULT 'AUTO',
`pass_fail` ENUM('YES', 'NO') NOT NULL DEFAULT 'NO' COMMENT 'Was this scan a pass/fail scan of the site?',
`date_created` DATETIME NOT NULL,
`date_updated` DATETIME NULL COMMENT 'The date that this scan was last updated',
`start_time` DATETIME NULL,
`end_time` DATETIME NULL,
`error` VARCHAR(256) NULL,
PRIMARY KEY (`id`),
INDEX `fk_scans_sites1_idx` (`sites_id` ASC),
CONSTRAINT `fk_scans_sites1`
FOREIGN KEY (`sites_id`)
REFERENCES `sites` (`id`)
ON DELETE CASCADE
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `scanned_page`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `scanned_page` (
`id` INT NOT NULL AUTO_INCREMENT,
`scans_id` INT NOT NULL,
`sites_id` INT NOT NULL,
`uri` VARCHAR(2100) NOT NULL COMMENT 'The same URI can be found multiple times in a single scan. A single page can be rescanned instead of the entire site. Those scans should be able to be compared with each other and should not overwrite history.',
`uri_hash` BINARY(16) NOT NULL COMMENT 'md5 hash of the URI for indexing',
`status` ENUM('CREATED', 'QUEUED', 'RUNNING', 'COMPLETE', 'ERROR') NOT NULL DEFAULT 'CREATED',
`scan_type` ENUM('USER', 'AUTO') NOT NULL DEFAULT 'AUTO',
`percent_grade` DECIMAL(5,2) NOT NULL DEFAULT 0 COMMENT 'This is the percent grade of the page',
`points_available` DECIMAL(5,2) NOT NULL DEFAULT 0 COMMENT 'Total available points to earn',
`point_grade` DECIMAL(5,2) NOT NULL DEFAULT 0 COMMENT 'total earned points out of the total available',
`priority` INT NOT NULL DEFAULT 300 COMMENT 'The priority for this job. 0 is the most urgent',
`date_created` DATETIME NOT NULL,
`start_time` DATETIME NULL,
`end_time` DATETIME NULL,
`title` VARCHAR(256) NULL,
`letter_grade` VARCHAR(2) NULL,
`error` VARCHAR(256) NULL,
`tries` INT(10) NULL COMMENT 'The number of times that the scan for this page has tried to run',
`num_errors` INT NULL COMMENT 'The total number of errors found',
`num_notices` INT NULL COMMENT 'The total number of notices found',
`found_with` ENUM('SITE_MAP', 'CRAWL') NOT NULL DEFAULT 'CRAWL',
PRIMARY KEY (`id`),
INDEX `fk_scanned_page_scans1_idx` (`scans_id` ASC),
INDEX `fk_scanned_page_sites1_idx` (`sites_id` ASC),
INDEX `scanned_page_scans_uri` (`scans_id` ASC, `uri_hash` ASC),
INDEX `scanned_page_uri` (`uri_hash` ASC),
CONSTRAINT `fk_scanned_page_scans1`
FOREIGN KEY (`scans_id`)
REFERENCES `scans` (`id`)
ON DELETE CASCADE
ON UPDATE NO ACTION,
CONSTRAINT `fk_scanned_page_sites1`
FOREIGN KEY (`sites_id`)
REFERENCES `sites` (`id`)
ON DELETE CASCADE
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `metrics`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `metrics` (
`id` INT NOT NULL AUTO_INCREMENT,
`machine_name` VARCHAR(64) NOT NULL COMMENT 'the name of the module for the metic. ie: metric_wdn_version',
PRIMARY KEY (`id`))
ENGINE = InnoDB
COMMENT = 'These are metrics, such as links checks, html validity, acce' /* comment truncated */ /*ssibility, etc*/;
-- -----------------------------------------------------
-- Table `marks`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `marks` (
`id` INT NOT NULL AUTO_INCREMENT,
`metrics_id` INT NOT NULL,
`machine_name` VARCHAR(64) NOT NULL COMMENT 'Machine readable name of the metric. IE: 404_link\n\nThis must be unique to the metric.\n\nThe machine_name is how modules can easily retrieve marks.\n',
`name` VARCHAR(512) NOT NULL COMMENT 'The name of the mark. i.e. \"404 Link\"\n',
`point_deduction` DECIMAL(5,2) NOT NULL DEFAULT 0,
`description` TEXT NULL COMMENT 'A longer description of the mark and why it was marked',
`help_text` TEXT NULL COMMENT 'General \'how to fix\' text',
PRIMARY KEY (`id`),
INDEX `fk_marks_metrics1_idx` (`metrics_id` ASC),
UNIQUE INDEX `marks_unique` (`metrics_id` ASC, `machine_name` ASC),
CONSTRAINT `fk_marks_metrics1`
FOREIGN KEY (`metrics_id`)
REFERENCES `metrics` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `page_marks`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `page_marks` (
`id` INT NOT NULL AUTO_INCREMENT,
`marks_id` INT NOT NULL,
`scanned_page_id` INT NOT NULL,
`points_deducted` DECIMAL(5,2) NOT NULL DEFAULT 0,
`context` TEXT NULL,
`line` INT NULL,
`col` INT NULL,
`value_found` TEXT NULL COMMENT 'The incorrect value that was found',
PRIMARY KEY (`id`),
INDEX `fk_page_marks_marks1_idx` (`marks_id` ASC),
INDEX `fk_page_marks_scanned_page1_idx` (`scanned_page_id` ASC),
INDEX `index4` (`value_found`(255) ASC),
CONSTRAINT `fk_page_marks_marks1`
FOREIGN KEY (`marks_id`)
REFERENCES `marks` (`id`)
ON DELETE CASCADE
ON UPDATE NO ACTION,
CONSTRAINT `fk_page_marks_scanned_page1`
FOREIGN KEY (`scanned_page_id`)
REFERENCES `scanned_page` (`id`)
ON DELETE CASCADE
ON UPDATE NO ACTION)
CHARACTER SET utf8 COLLATE utf8_bin
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `page_metric_grades`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `page_metric_grades` (
`id` INT NOT NULL AUTO_INCREMENT,
`metrics_id` INT NOT NULL,
`scanned_page_id` INT NOT NULL,
`points_available` DECIMAL(5,2) NOT NULL DEFAULT 100 COMMENT 'The total points available for this metric',
`weighted_grade` DECIMAL(5,2) NOT NULL DEFAULT 0 COMMENT 'total earned points when the weight is accounted for',
`point_grade` DECIMAL(5,2) NOT NULL DEFAULT 0 COMMENT 'The point grade for this metric. Overall points gained for page.',
`changes_since_last_scan` INT NOT NULL DEFAULT 0 COMMENT 'The number of changes since the last scan. \n\n',
`pass_fail` ENUM('YES', 'NO') NOT NULL DEFAULT 'NO' COMMENT 'Was the grade a pass/fail?\n',
`incomplete` ENUM('YES', 'NO') NOT NULL DEFAULT 'NO' COMMENT 'YES if the metric was unable to complete for any reason. For Example: the html check was unable to get a response from the validator service.',
`weight` DECIMAL(5,2) NOT NULL DEFAULT 0,
`letter_grade` VARCHAR(2) NULL,
`num_errors` INT NULL COMMENT 'The total number of errors found',
`num_notices` INT NULL COMMENT 'The total number of notices found',
INDEX `fk_page_metric_grades_metrics1_idx` (`metrics_id` ASC),
INDEX `fk_page_metric_grades_scanned_page1_idx` (`scanned_page_id` ASC),
PRIMARY KEY (`id`),
CONSTRAINT `fk_page_metric_grades_metrics1`
FOREIGN KEY (`metrics_id`)
REFERENCES `metrics` (`id`)
ON DELETE CASCADE
ON UPDATE NO ACTION,
CONSTRAINT `fk_page_metric_grades_scanned_page1`
FOREIGN KEY (`scanned_page_id`)
REFERENCES `scanned_page` (`id`)
ON DELETE CASCADE
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `scanned_page_links`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `scanned_page_links` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`date_created` DATETIME NOT NULL,
`scanned_page_id` INT NOT NULL,
`original_url` VARCHAR(2100) NOT NULL,
`original_url_hash` BINARY(16) NOT NULL,
`original_curl_code` INT(4) NOT NULL,
`original_status_code` INT(4) NOT NULL,
`final_url` VARCHAR(2100) NOT NULL,
`final_url_hash` BINARY(16) NOT NULL,
`final_curl_code` INT(4) NOT NULL,
`final_status_code` INT(4) NOT NULL,
`cached` VARCHAR(45) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
INDEX `fk_scan_links_scanned_page1_idx` (`scanned_page_id` ASC),
INDEX `scanned_page_links_final_url` (`final_url_hash` ASC),
INDEX `scanned_page_links_original_status` (`original_status_code` ASC),
INDEX `scanned_page_links_final_status` (`final_status_code` ASC),
INDEX `scanned_page_page_url` (`original_url_hash` ASC, `final_url_hash` ASC, `scanned_page_id` ASC),
CONSTRAINT `fk_scan_links_scanned_page1`
FOREIGN KEY (`scanned_page_id`)
REFERENCES `scanned_page` (`id`)
ON DELETE CASCADE
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `site_reviews`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `site_reviews` (
`id` INT NOT NULL AUTO_INCREMENT,
`sites_id` INT NOT NULL,
`creator_users_id` INT NOT NULL,
`last_edited_users_id` INT NOT NULL,
`date_created` DATETIME NOT NULL COMMENT 'The date that this record was created',
`date_edited` VARCHAR(45) NOT NULL COMMENT 'The date that this record was last edited',
`date_scheduled` DATETIME NOT NULL,
`date_reviewed` DATETIME NULL DEFAULT NULL,
`status` ENUM('SCHEDULED', 'IN_REVIEW', 'REVIEW_FINISHED') NOT NULL DEFAULT 'SCHEDULED',
`internal_notes` LONGTEXT NULL DEFAULT NULL,
`public_notes` LONGTEXT NULL DEFAULT NULL,
`result` ENUM('OKAY', 'NEEDS WORK') NULL DEFAULT NULL,
PRIMARY KEY (`id`),
INDEX `fk_table1_users1_idx` (`creator_users_id` ASC),
INDEX `fk_table1_users2_idx` (`last_edited_users_id` ASC),
INDEX `fk_site_reviews_sites1_idx` (`sites_id` ASC),
CONSTRAINT `fk_table1_users1`
FOREIGN KEY (`creator_users_id`)
REFERENCES `users` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_table1_users2`
FOREIGN KEY (`last_edited_users_id`)
REFERENCES `users` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_site_reviews_sites1`
FOREIGN KEY (`sites_id`)
REFERENCES `sites` (`id`)
ON DELETE CASCADE
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `site_scan_history`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `site_scan_history` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`sites_id` INT NOT NULL,
`gpa` DECIMAL(5,2) NOT NULL DEFAULT 0,
`date_created` DATETIME NOT NULL,
`total_pages` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
INDEX `fk_site_scan_history_sites1_idx` (`sites_id` ASC),
CONSTRAINT `fk_site_scan_history_sites1`
FOREIGN KEY (`sites_id`)
REFERENCES `sites` (`id`)
ON DELETE CASCADE
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `site_scan_metric_history`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `site_scan_metric_history` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`metrics_id` INT NOT NULL,
`gpa` DECIMAL(5,2) NOT NULL DEFAULT 0,
`site_scan_history_id` INT UNSIGNED NOT NULL,
PRIMARY KEY (`id`),
INDEX `fk_site_scan_metric_history_metrics1_idx` (`metrics_id` ASC),
INDEX `fk_site_scan_metric_history_site_scan_history1_idx` (`site_scan_history_id` ASC),
CONSTRAINT `fk_site_scan_metric_history_metrics1`
FOREIGN KEY (`metrics_id`)
REFERENCES `metrics` (`id`)
ON DELETE CASCADE
ON UPDATE NO ACTION,
CONSTRAINT `fk_site_scan_metric_history_site_scan_history1`
FOREIGN KEY (`site_scan_history_id`)
REFERENCES `site_scan_history` (`id`)
ON DELETE CASCADE
ON UPDATE NO ACTION)
ENGINE = InnoDB;
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
|
<reponame>Zhaojia2019/cubrid-testcases
autocommit off;
create class parent ( attr int);
create class child as subclass of parent
( attr double ) inherit attr of parent as aliased_attr;
rollback;
|
-- DROP TABLE IF EXISTS problems_status ;
SELECT 'create the "problems_status" table'
;
CREATE TABLE problems_status (
guid UUID NOT NULL DEFAULT gen_random_uuid()
, id bigint UNIQUE NOT NULL DEFAULT cast (to_char(current_timestamp, 'YYMMDDHH12MISS') as bigint)
, name varchar (100) NOT NULL DEFAULT 'name...'
, description varchar (4000)
, update_time timestamp DEFAULT DATE_TRUNC('second', NOW())
, CONSTRAINT pk_problems_status_guid PRIMARY KEY (guid)
) WITH (
OIDS=FALSE
);
create unique index idx_uniq_problems_status_id on problems_status (id);
-- the rank search index
CREATE INDEX idx_rank_problems_status ON problems_status
USING gin(to_tsvector('English', name || ' ' || description || 'owner'));
SELECT 'Display the columns of the just created table'
;
SELECT attrelid::regclass, attnum, attname
FROM pg_attribute
WHERE attrelid = 'public.problems_status'::regclass
AND attnum > 0
AND NOT attisdropped
ORDER BY attnum
;
-- Data for Name: problems_status; Type: TABLE DATA; Schema: public; Owner: usrdevqtoadmin
--
COPY public.problems_status (guid, id, name, description, update_time) FROM stdin;
cb989a14-d0b8-46e4-b2cc-5e2a974b5d29 200226071624 01-eval The problem is being evaluated 2020-02-26 07:16:45
94ae9eac-e6df-4193-9d36-a527d5897292 200226092430 02-todo The problems has to be done 2020-02-26 07:17:02
d0b9476b-7eb0-4045-b172-91c8635859d0 200226092448 03-wip The problem is in Work in Progress 2020-02-26 07:17:16
652ccaad-89a4-4e5e-bb1b-6859ab3472f4 200226092506 04-diss The must be discarded 2020-02-26 07:17:36
a9224b60-506a-457c-8303-27345b5a5a09 200226092521 05-tst The problem is being tested 2020-02-26 07:17:48
9594f01f-92ef-48da-9319-57792ac8142f 200226092532 06-onhold The problem has been put on hold 2020-02-26 07:17:59
a45ee85b-570c-4661-b8f4-cd39f5d5ff76 200226092543 07-qas The problems is being tested for quality 2020-02-26 07:18:16
91ecf204-43d5-4ac5-aa5f-f1a0eee1ad53 200226092559 08-post The problem is being postponed for completion in later point of time 2020-02-26 07:18:56
e486d2d7-0789-4af2-8466-9b8c03743d85 200226092640 09-done The problem has been done 2020-02-26 07:19:08
c36ac35d-d010-41ce-84f0-31ba5d808aa8 200226093618 03-act The problems is being actively worked on 2020-02-26 07:30:54
\.
--The trigger:
CREATE TRIGGER trg_set_update_time_on_problems_status BEFORE UPDATE ON problems_status FOR EACH ROW EXECUTE PROCEDURE fnc_set_update_time();
SELECT tgname
FROM pg_trigger
WHERE NOT tgisinternal
AND tgrelid = 'problems_status'::regclass;
|
<reponame>evardsson/s3c3<gh_stars>0
CREATE TABLE contexts (
id BIGSERIAL,
client VARCHAR(20) NOT NULL,
token VARCHAR(128),
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
expires TIMESTAMP,
completed TIMESTAMP,
usage_status SMALLINT DEFAULT 0,
PRIMARY KEY (id)
);
CREATE INDEX ON contexts (token);
CREATE TABLE configs (
id SERIAL,
ckey VARCHAR(40) NOT NULL UNIQUE,
cval VARCHAR(100)
);
INSERT INTO configs (ckey) VALUES
('token.expire', 90),('token.length', 64),('token.strength', 'maximum'),('token.delete_on_load', 1);
|
select d.id_dados,
d.ds_dados,
d.qt_dados,
d.id_situacao,
d.dt_manutencao,
s.ds_situacao
from elk.tb_dados d
left join elk.tb_situacao s on d.id_situacao = s.id_situacao
|
<reponame>Dri-Ferreira/ProjectPrisma
-- CreateTable
CREATE TABLE "product" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"bar_code" DECIMAL(65,30) NOT NULL,
"create_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "product_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "category" (
"name" TEXT NOT NULL,
"id" TEXT NOT NULL,
CONSTRAINT "category_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "product_name_key" ON "product"("name");
-- CreateIndex
CREATE UNIQUE INDEX "product_bar_code_key" ON "product"("bar_code");
-- AddForeignKey
ALTER TABLE "category" ADD CONSTRAINT "category_id_fkey" FOREIGN KEY ("id") REFERENCES "product"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
<filename>laravel8_basic.sql
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 16, 2022 at 02:06 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `laravel8_basic`
--
-- --------------------------------------------------------
--
-- Table structure for table `abouts`
--
CREATE TABLE `abouts` (
`id` bigint(20) UNSIGNED NOT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`short_desc` text COLLATE utf8mb4_unicode_ci NOT NULL,
`long_desc` text COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `abouts`
--
INSERT INTO `abouts` (`id`, `title`, `short_desc`, `long_desc`, `created_at`, `updated_at`) VALUES
(2, 'Eum ipsam laborum deleniti velitena -', 'Voluptatem dignissimos provident quasi corporis voluptates sit assum perenda sruen jonee trave -', 'Ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate\r\nvelit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in\r\nculpa qui officia deserunt mollit anim id est laborum -', '2022-04-12 10:51:47', '2022-04-13 03:21:59'),
(15, 'About Title - 1', 'Short Description - 1', 'Long Description - 1', '2022-04-14 05:12:36', '2022-04-14 05:12:36'),
(16, 'About Title - 2', 'Short Description - 2', 'Long Description - 2', '2022-04-14 05:13:14', '2022-04-14 05:13:14');
-- --------------------------------------------------------
--
-- Table structure for table `brands`
--
CREATE TABLE `brands` (
`id` bigint(20) UNSIGNED NOT NULL,
`brand_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`brand_image` 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 `brands`
--
INSERT INTO `brands` (`id`, `brand_name`, `brand_image`, `created_at`, `updated_at`) VALUES
(18, 'Code Igniter', '1649407073.png', '2022-04-08 05:37:53', NULL),
(19, 'Gucci', '1649407115.png', '2022-04-08 05:38:35', NULL),
(20, 'Code Igniter', '1649678330.png', '2022-04-08 05:40:11', '2022-04-11 08:58:50'),
(21, 'Laravel 9', '1649679812.png', '2022-04-11 09:00:57', '2022-04-14 06:17:36'),
(24, 'C++', '1649927868.jpg', '2022-04-14 06:17:49', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `categories`
--
CREATE TABLE `categories` (
`id` bigint(20) UNSIGNED NOT NULL,
`user_id` int(11) NOT NULL,
`category_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`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 `categories`
--
INSERT INTO `categories` (`id`, `user_id`, `category_name`, `created_at`, `updated_at`, `deleted_at`) VALUES
(2, 1, 'Laravel 8', '2022-04-07 04:42:29', '2022-04-07 09:19:29', NULL),
(3, 1, 'Flutterjs', '2022-04-07 04:47:10', '2022-04-07 08:38:25', NULL),
(5, 1, 'Code Igniter', '2022-04-07 05:38:25', '2022-04-07 09:18:57', NULL),
(6, 1, 'React Js', '2022-04-07 05:47:00', '2022-04-07 08:37:39', NULL),
(7, 1, 'C++', '2022-04-07 05:47:11', '2022-04-07 08:37:26', NULL),
(8, 1, 'PHP', '2022-04-07 06:08:43', '2022-04-07 08:37:19', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `contacts`
--
CREATE TABLE `contacts` (
`id` bigint(20) UNSIGNED NOT NULL,
`address` text COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`phone` 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 `contacts`
--
INSERT INTO `contacts` (`id`, `address`, `email`, `phone`, `created_at`, `updated_at`) VALUES
(2, '77441 - 00611', '<EMAIL>', '0755543918', '2022-04-13 05:47:11', '2022-04-13 06:10:14');
-- --------------------------------------------------------
--
-- Table structure for table `contact_forms`
--
CREATE TABLE `contact_forms` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`subject` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`message` text COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `contact_forms`
--
INSERT INTO `contact_forms` (`id`, `name`, `email`, `subject`, `message`, `created_at`, `updated_at`) VALUES
(6, '<NAME>', '<EMAIL>', 'TEST MESSAGE', 'THIS IS A TEST MESSAGE', '2022-04-13 08:38:28', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `failed_jobs`
--
CREATE TABLE `failed_jobs` (
`id` bigint(20) UNSIGNED NOT NULL,
`uuid` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
`queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `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, '2014_10_12_200000_add_two_factor_columns_to_users_table', 1),
(4, '2019_08_19_000000_create_failed_jobs_table', 1),
(5, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(6, '2022_04_01_113430_create_sessions_table', 1),
(7, '2022_04_05_075240_create_categories_table', 2),
(8, '2022_04_07_123535_create_brands_table', 3),
(9, '2022_04_08_084707_create_multipictures_table', 4),
(10, '2022_04_11_124941_create_sliders_table', 5),
(11, '2022_04_12_080200_create_abouts_table', 6),
(12, '2022_04_13_080257_create_contacts_table', 7),
(13, '2022_04_13_091932_create_contact_forms_table', 8);
-- --------------------------------------------------------
--
-- Table structure for table `multipictures`
--
CREATE TABLE `multipictures` (
`id` bigint(20) UNSIGNED NOT NULL,
`image` 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 `multipictures`
--
INSERT INTO `multipictures` (`id`, `image`, `created_at`, `updated_at`) VALUES
(22, 'education_1.jpg', '2022-04-08 08:26:43', NULL),
(23, 'education_2.jpg', '2022-04-08 08:26:43', NULL),
(24, 'education_3.jpg', '2022-04-08 08:26:44', NULL),
(25, 'No_photo.jpg', '2022-04-08 08:27:23', NULL),
(26, 'No_photo_2.jpg', '2022-04-08 08:27:24', NULL),
(27, 'people_1.jpg', '2022-04-08 08:27:24', NULL),
(28, 'people_2.jpg', '2022-04-08 08:27:24', NULL),
(29, 'CodeIgniter_logo.png', '2022-04-08 08:37:01', NULL),
(30, 'Laravel_logo.png', '2022-04-08 08:37:01', NULL);
-- --------------------------------------------------------
--
-- 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 `personal_access_tokens`
--
CREATE TABLE `personal_access_tokens` (
`id` bigint(20) UNSIGNED NOT NULL,
`tokenable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`tokenable_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
`abilities` text COLLATE utf8mb4_unicode_ci,
`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;
-- --------------------------------------------------------
--
-- Table structure for table `sessions`
--
CREATE TABLE `sessions` (
`id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`user_id` bigint(20) UNSIGNED DEFAULT NULL,
`ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`user_agent` text COLLATE utf8mb4_unicode_ci,
`payload` text COLLATE utf8mb4_unicode_ci NOT NULL,
`last_activity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `sessions`
--
INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('afuYHet3LApD4TbLGmIHBNWZU7DO1J1ueDRq4CAv', 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.88 Safari/537.36', 'YTo2OntzOjY6Il90b2tlbiI7czo0MDoiVjZwaWVZbVFpaUVVNG1QTkpJM2djaWt3RTZOdHdBMW1JVXV6b1ZOMiI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9icmFuZC9hbGwiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX1zOjM6InVybCI7YTowOnt9czoyMToicGFzc3dvcmRfaGFzaF9zYW5jdHVtIjtzOjYwOiIkMnkkMTAkaEVaN1AyZ2c2d3M0M2lKNk1sRnEzT3JoOGR5LjcyL052MnI4Q0Yxa0JPSHpJdXhFMjJhVUsiO3M6NTA6ImxvZ2luX3dlYl81OWJhMzZhZGRjMmIyZjk0MDE1ODBmMDE0YzdmNThlYTRlMzA5ODlkIjtpOjI7fQ==', 1649927869);
-- --------------------------------------------------------
--
-- Table structure for table `sliders`
--
CREATE TABLE `sliders` (
`id` bigint(20) UNSIGNED NOT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`description` mediumtext COLLATE utf8mb4_unicode_ci,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `sliders`
--
INSERT INTO `sliders` (`id`, `title`, `description`, `image`, `created_at`, `updated_at`) VALUES
(1, 'Slide-1', ' Occaecati alias dolorem mollitia ut. Similique ea voluptatem. Esse doloremque accusamus repellendus deleniti vel. Minus et tempore modi architecto.', '1649687766.jpg', '2022-04-11 11:36:07', NULL),
(2, 'Slide-2', 'Ut velit est quam dolor ad a aliquid qui aliquid. Sequi ea ut et est quaerat sequi nihil ut aliquam. Occaecati alias dolorem mollitia ut. Similique ea voluptatem. Esse doloremque accusamus repellendus deleniti vel. Minus et tempore modi architecto.', '1649687783.jpg', '2022-04-11 11:36:24', NULL),
(4, 'Slide-3', 'Ut velit est quam dolor ad a aliquid qui aliquid. Sequi ea ut et est quaerat sequi nihil ut aliquam. Occaecati alias dolorem mollitia ut. Similique ea voluptatem. Esse doloremque accusamus repellendus deleniti vel. Minus et tempore modi architecto.', '1649688244.jpg', '2022-04-11 11:44:05', NULL),
(5, 'Slide-4', 'Ut velit est quam dolor ad a aliquid qui aliquid. Sequi ea ut et est quaerat sequi nihil ut aliquam. Occaecati alias dolorem mollitia ut. Similique ea voluptatem', '1649745636.jpg', '2022-04-12 03:40:37', NULL),
(6, 'Slide-5', 'Occaecati alias dolorem mollitia ut. Similique ea voluptatem. Esse doloremque accusamus repellendus deleniti vel. Minus et tempore modi architecto.', '1649745650.jpg', '2022-04-12 03:40:50', NULL),
(10, 'Slide-6', 'Slide-6', '1649749718.jpg', '2022-04-12 04:48:38', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`two_factor_secret` text COLLATE utf8mb4_unicode_ci,
`two_factor_recovery_codes` text COLLATE utf8mb4_unicode_ci,
`two_factor_confirmed_at` timestamp NULL DEFAULT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`current_team_id` bigint(20) UNSIGNED DEFAULT NULL,
`profile_photo_path` varchar(2048) 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`, `two_factor_secret`, `two_factor_recovery_codes`, `two_factor_confirmed_at`, `remember_token`, `current_team_id`, `profile_photo_path`, `created_at`, `updated_at`) VALUES
(1, 'Admin', '<EMAIL>', NULL, '$2y$10$tRqFf2YnnshADg95aBNTIu0tNBaEsD7MGNyBq4K.W0Z7RIdUQckbq', NULL, NULL, NULL, 'MeUxdTUbFB3Jec2sRKBqh64ZkOqIyJO53kFYuw3qTEbD0GijSesIniEYaRDp', NULL, 'profile-photos/I8ByfY6WGKTs9pOhbnR0Mz1s2n4Q6EYSn0MPnybw.jpg', '2022-04-01 09:05:51', '2022-04-08 09:45:11'),
(2, 'Alex', '<EMAIL>', '2022-04-08 10:37:09', '$2y$10$hEZ7P2gg6ws43iJ6MlFq3Orh8dy.72/Nv2r8CF1kBOHzIuxE22aUK', NULL, NULL, NULL, 'NsRlnfd2hD5OvhJ1B4cVdD1Wsi9WGbTk4xyErYFzylsBcozJ0XgYu55cdGgR', NULL, 'profile-photos/20HG4jE5xOnIAvZcwCgOmVJu10avMYKPa5oWIwkD.jpg', '2022-04-01 09:26:57', '2022-04-13 11:27:54'),
(3, 'Test', '<EMAIL>', NULL, '$2y$10$1KOTjgLPQC6I0KC9stwRZ.0bw4/6IfuFUtPDEOWX94mhtU5G6RSXW', NULL, NULL, NULL, NULL, NULL, NULL, '2022-04-04 04:51:55', '2022-04-04 04:51:55');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `abouts`
--
ALTER TABLE `abouts`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `brands`
--
ALTER TABLE `brands`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `contacts`
--
ALTER TABLE `contacts`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `contact_forms`
--
ALTER TABLE `contact_forms`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);
--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `multipictures`
--
ALTER TABLE `multipictures`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`);
--
-- Indexes for table `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`);
--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
ADD PRIMARY KEY (`id`),
ADD KEY `sessions_user_id_index` (`user_id`),
ADD KEY `sessions_last_activity_index` (`last_activity`);
--
-- Indexes for table `sliders`
--
ALTER TABLE `sliders`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `abouts`
--
ALTER TABLE `abouts`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
--
-- AUTO_INCREMENT for table `brands`
--
ALTER TABLE `brands`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;
--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `contacts`
--
ALTER TABLE `contacts`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `contact_forms`
--
ALTER TABLE `contact_forms`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
--
-- AUTO_INCREMENT for table `multipictures`
--
ALTER TABLE `multipictures`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;
--
-- AUTO_INCREMENT for table `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `sliders`
--
ALTER TABLE `sliders`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
<gh_stars>0
-- abbreviation used:
-- r - Request
-- s - Show (cinema session)
-- p - Place (seat)
-- f - Film
-- c - ticket Cost
-- h - cinema Hall
CREATE TABLE requests
(
r_id VARCHAR(8) NOT NULL,
r_name VARCHAR(32),
r_surname VARCHAR(32),
r_middlename VARCHAR(32),
rs_id VARCHAR(8) NOT NULL,
rp_id VARCHAR(8),
PRIMARY KEY(r_id)
);
CREATE TABLE shows
(
s_id VARCHAR(8) NOT NULL,
f_name VARCHAR(32) NOT NULL,
time_start TIMESTAMP NOT NULL,
time_end TIMESTAMP NOT NULL,
c_elite DECIMAL(12, 2) NOT NULL,
c_comfort DECIMAL(12, 2) NOT NULL,
c_normal DECIMAL(12, 2) NOT NULL,
sh_id VARCHAR(8) NOT NULL,
PRIMARY KEY(s_id)
);
CREATE TABLE halls
(
h_id VARCHAR(8) NOT NULL,
p_range_start VARCHAR(8) NOT NULL,
p_range_end VARCHAR(8) NOT NULL,
PRIMARY KEY(h_id)
);
CREATE TABLE places
(
p_id VARCHAR(8) NOT NULL,
p_type VARCHAR(1) NOT NULL,
p_displayed VARCHAR(8) NOT NULL,
PRIMARY KEY(p_id)
);
CREATE TABLE reserved
(
p_id VARCHAR(8) NOT NULL,
s_id VARCHAR(8) NOT NULL,
is_reserved VARCHAR(1) NOT NULL
);
|
delete from SerieEntity;
insert into SerieEntity (id, name, description, category, rating, releaseYear ) values (100, 'The Umbrella Academy', 'Un conjunto de hermanos con superpoderes deben salvar al mundo del apocalipsis.', 'Aventura', 8.3, 2019);
insert into SerieEntity (id, name, description, category, rating, releaseYear ) values (101, 'Dark', 'La desaparición de un niño local aterroriza a los habitantes de un pueblo alemán con una historia trágica.', 'Suspenso', 9.8, 2018);
insert into SerieEntity (id, name, description, category, rating, releaseYear ) values (102, '<NAME>', 'Rick es un brillante científico que junto a su nieto adolescente Morty viven aventuras en otros mundos y dimensiones.', 'Ciencia ficción', 7.5, 2015);
|
<reponame>ShivaniH/News-site<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 30, 2017 at 05:45 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
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: `ceryx`
--
-- --------------------------------------------------------
--
-- Table structure for table `comments`
--
CREATE TABLE `comments` (
`id` int(11) NOT NULL,
`post_id` int(11) NOT NULL,
`username` varchar(50) NOT NULL,
`comment` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `comments`
--
INSERT INTO `comments` (`id`, `post_id`, `username`, `comment`) VALUES
(2, 52, 'Bunny', 'I love music'),
(3, 52, 'bhav1234', 'Even i love music!!'),
(6, 22, 'bhav1234', 'Gaming'),
(7, 5, 'Bunny', 'Newton for Oscar'),
(8, 25, 'Bunny', '2 Newton for Oscar'),
(9, 11, 'Bunny', 'Business news!');
-- --------------------------------------------------------
--
-- Table structure for table `messages`
--
CREATE TABLE `messages` (
`email` varchar(50) NOT NULL,
`name` varchar(50) NOT NULL,
`message` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `messages`
--
INSERT INTO `messages` (`email`, `name`, `message`) VALUES
('', '', '');
-- --------------------------------------------------------
--
-- Table structure for table `news`
--
CREATE TABLE `news` (
`id` int(10) UNSIGNED NOT NULL,
`headlines` text NOT NULL,
`category` varchar(100) NOT NULL,
`newstext` text NOT NULL,
`image` varchar(200) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `news`
--
INSERT INTO `news` (`id`, `headlines`, `category`, `newstext`, `image`) VALUES
(1, 'Mahindra Beats Toyota and Ford to Top 2017 JD Power Sales Satisfaction Index', 'automobiles', 'Mahindra and Mahindra ranked the highest in the 2017 Sales Satisfation Index (SSI) as per JD Power. The Indian automaker managed to beat international players including Toyota and Ford to take the top spot. Mahindra ranked highest in sales satisfaction, with a score of 866, followed by Toyota coming in second with 856 points, while Ford ranked third with 846. The market average was recorded at 840 points. The 2017 India Sales Satisfaction Index (mass market) Study is based on responses from 7831 new-vehicle owners, who purchased vehicles between September 2016 and April 2017.\r\n\r\nThe 2017 JD Power SSI study was based on six factors that contributed to overall customer satisfaction with respect to their new-vehicle purchase experience in the mass market segment. The factors include sales initiation (17 per cent); dealer facility (17 per cent); deal and paperwork (17 per cent); delivery timing (17 per cent); salesperson (16 per cent) and delivery process (16 per cent).\r\nJD Power, in a statement said that \"the overall sales satisfaction index for the industry improved significantly.\" The SSI increased by 31 points (on a 1000 point scale) in 2016. The main factors contributing to the improvement included a higher implementation rate on process standards; increase in the number of amenities made available at dealer facilities; and a drop in pressures and problems experienced by customers during the shopping experience.\r\n\r\nThe study also concluded that satisfaction in dealer facilities factor improved year-on-year with 65 per cent of customers saying their dealer offered all the amenities measured including, Wi-Fi, comfortable seating space and product brochures among others. Furthermore, the study said that 4 per cent fewer customers experienced problems or pressure during the buying process, down from 37 per cent to 33 per cent.\r\nThe study also found that 49 per cent of new-vehicle buyers in India researched vehicles online, which is an increase of 15 percentage points from last year.\r\nIn its 18th year, the JD Power Sales Satisfation Index (SSI) saw Hyundai and <NAME> scored 838 points respectively, followed by Datsun coming in sixth with 836 points. Honda and Tata finished next with 834 points each, while Volkswagen and Renault made it to the bottom with 826 and 819 points respectively.\r\n', 'images/auto1.jpg'),
(2, '<NAME> Nominated To Replace Vijay Mallya As India\'s Representative In FIA\'s WMSC', 'automobiles', 'The Federation of Motor Sports Clubs of India (FMSCI) has elected industrialist and auto enthusiast <NAME> as India\'s representative in the Federation Internationale de l\'Automobile\'s (FIA) World Motor Sports Council (WMSC). In a series of tweets, the Bombay Dyeing owner confirmed the news and said that he won the FMSCI election with a \'seven for\' and \'one against\' vote. The post was previously held by former UB Group boss <NAME>, who was asked by the FMSCI to step down on the sports ministry\'s directive. The post has been vacant since July this year.\r\nSinghania tweeted, \"Happy to be elected by the Federation of motorsport clubs of india as their rep to the world body of Federation international automobile.\"\r\n\"Happy to say that won the FMSCI with 7 votes for / 1 vote against - thanks for the unanimous support. Will do my best for Indian motorsport\"\r\nEarlier this year, FMSCI President <NAME> had cleared that the new member will be elected from the federation to represent FMSCI at the FIA general body, and the said person can then choose to stand for an election in the WMSC. The FIA elections are scheduled in Paris this December and Singhania will need to be elected then for the titular position. Meanwhile, <NAME> will be nominated for the deputy post.\r\n<NAME> is the Chairman and Managing Director of Raymond Group and is also an avid auto enthusiast. Known for his impressive car collection, the Raymond MD has raced in the Ferrari Challenge in Europe, apart from participating in drag racing competitions. However, Singhania does not have any administrative experience in Indian motorsport.\r\n', 'images/auto2.jpg'),
(3, 'MotoGP 2017: Dovizioso Wins Japanese GP Against Marquez In Final Lap Showdown', 'automobiles', 'The rain soaked Twin Ring Motegi circuit of Japan was witness to one of the most spectacular race finishes this season of MotoGP. Ducati Team\'s Andrea Dovizioso took his fifth win of this year in the Japanese Grand Prix in a final lap showdown with points leader <NAME> Honda. The riders put up one of the most dramatic finishes in MotoGP as the victor seemed uncertain down to the final \'Victory\' corner. Marquez finished a very close second with a gap of 0.249 seconds taking his 100th career podium, while <NAME> of Octo Pramac Racing finished third on the podium. Dovizioso has now closed the gap with Marquez down to 11 points; while Vinales is a distant third with 203 points.\r\n\r\nStarting from the front row, Marquez took the lead right from the start followed by <NAME> Ducati, Petrucci, <NAME> of Tech 3 Yamaha and Dovizioso further back. While Lorenzo briefly took the lead on Lap 1, Marquez was quick to fight back and regain the lead. Dovizioso had a stunning start and quickly passed rivals to take P2, as Petrucci settled into third. In the opening stages itself, it was clear that these riders will be leading the race.\r\nAs the riders lapped the track, Marquez and Dovizioso moved further away from the rest of the lot, with Petrucci keeping close company. On Lap 12, Marquez made his first move to take the lead from Dovizioso, and all eyes were now on the two riders as a cat and mouse chase was what it seemed like with the pair changing positions. Marquez seemed clear in the lead fending consistent attacks from Dovizioso.\r\nBy the final lap, the sentiment echoed that of the Red Bull Ring fight from earlier this year between the title contenders. With Marquez still in the lead, Dovizioso was trailing behind the Honda rider by less than half a second. The Italian was waiting for Marquez to make a mistake that he would take advantage of and when time came, the Dovizioso made no mistake.\r\nMarquez wobbled on Turn 8 of the final lap, allowing Dovizioso close the gap further, while the former ran wide on the final corner, the opportunity Andrea was waiting for as he made no mistake to take the lead and seal his seventh win of the career. Petrucci went to finish third, 10.38 seconds behind Dovizioso.\r\nFurther down, Suzuki\'s <NAME> and <NAME> finished fourth and fifth, securing their best result of the season. Lorenzo took the sixth spot, after leading the race briefly, and finished ahead of Aleix Espargaro of Aprilia Racing and Johann Zarco.\r\nIt wasn\'t the best day for Yamaha as Valentino Rossi as the Italian crashed on Lap 6, while Maverick Vinales finished ninth behind Zarco. Avintia Ducati\'s Loris Baz took the tenth place ahead of KTM rider Pol Espargaro. Yamaha\'s wildcard entry, Katsuy<NAME> of Yamalube factory team finished 12th, ahead of Sam Lowes of Aprilia, <NAME> (Avintia Racing) and Tito Rabat (Marc VDS).\r\nWith respect to retirements, Honda\'s <NAME> retired from the race in the closing stages along with Cal Crutchlow of LCR Honda after two crashes. <NAME>\'s Alvaro Bautista and <NAME> had falls and retired from the race.\r\n', 'images/auto3.jpg'),
(4, 'Indian government to buy 10000 electric cars from Tata Motors', 'automobiles', 'NEW DELHI (Reuters) - The Indian government on Friday said it will buy 10,000 electric cars from Tata Motors Ltd to start replacing petrol and diesel variants being used by its agencies.\r\nThey will be used to replace government cars over the next three to four years, a government statement said. The total number of vehicles used by government agencies is around 500,000.\r\nTata Motors will supply the cars in two phases starting in November. Nissan and India’s Mahindra & Mahindra had also bid for the contract.\r\nIndia wants to promote the use of electric vehicles to curb carbon emissions and energy demand. The federal think tank in May laid out a 15-year roadmap for electrifying all new vehicles by 2030 and limiting the registration of petrol and diesel cars.\r\nElectric vehicles remain expensive due to the high cost of batteries and automakers say lack of charging stations could make the plan unviable.\r\n', 'images/auto4.jpg'),
(5, 'Maruti Suzuki India Q2 profit up 3.4% at Rs 2484 crore', 'automobiles', 'New Delhi: Maruti Suzuki India Ltd, the country`s top-selling car maker, posted more than a 3 percent rise in its quarterly profit.\r\n\r\nThe Company sold a total of 492,118 vehicles during the July-September 2017-18 quarter, a growth of 17.6 percent over the same period of the previous year. Sales in the domestic market stood at 457,401 units, a growth of 19.4 percent. Exports were at 34,717 units.\r\n\r\nDuring the quarter, the company registered Net Sales of Rs. 214,381 million, up 21.8 percent over the same period previous year.\r\n\r\nNet Profit was Rs 24,843 million, a growth of 3.4 percent over the same period previous year.\r\n\r\nThe operating profit increased by 24 percent while the net profit increased by 3.4 percent due to lower non-operating income as the yields on investments were lower compared to last year, and some impact of commodities and advertisement expenses, and increase in effective tax rates.\r\n\r\nThe Company sold a total of 886,689 vehicles in H1 a growth of 15.6 percent. Sales in the domestic market stood at 825,832 units a growth of 17.1 percent. Exports were at 60,857 units.\r\n\r\nThe Company’s net sales stood at Rs 385,705 million in April-September 2017-18, a growth of 19.5 percent over the same period last year.\r\n\r\nNet profit stood at Rs 40,407 million, up 3.8 percent.\r\n\r\nThe operating profit increased by 16 percent while the net profit increased by 3.8 percent due to lower non-operating income as the yields on investments were lower compared to last year, and some impact of commodities and advertisement expenses, and increase in effective tax rates.', 'images/auto5.jpg'),
(6, 'Man Booker prize 2017: from <NAME> to Brexit Britain', 'books', 'What do book prizes have to do with serious literature? On the long view, the answer is: not much. Even the immensely distinguished Nobel prize, which has just delighted many British readers with its choice of Kazuo Ishiguro, has logged some pretty forgettable selections. Who, for instance, still reads <NAME> (1908), <NAME> (1917), <NAME> (1939) or <NAME> (1966)?\r\nIn the arts, prizes will always be a lottery. Posh panels are just as vulnerable as the rest of us to the vagaries of taste. The joy of reading is that it’s free from the thought police. Books live and die in the hearts and minds of readers. Still, for close on 50 years, Man Booker’s quixotic efforts have made surprisingly good sense of a difficult, even impossible enterprise.\r\nTaste and judgment aside, the other intractable dimension of the Booker conundrum is its annual rendezvous with the marketplace. As in farming, or finance, there are good years and bad years. 2015 and 2016 were good years with excellent winners (<NAME>’s A Brief History of Seven Killings; <NAME>’s The Sellout).\r\nThis year, Booker’s panel is up against it. Before we discuss the shortlist, we have to note that, for whatever good reason, the judges decided to exclude some powerful contenders: <NAME> (Days Without End), <NAME> (The Ministry of Utmost Happiness), <NAME> (Swing Time) and, perhaps most surprising of all, <NAME> (The Underground Railroad).\r\nWhen <NAME>, as chair, summarised the shortlist as “unique and intrepid books that collectively push against the borders of convention”, she articulated a mission statement for a final session that promises to be an excruciating visit to the third circle of a literary critical inferno.\r\nAutumn has everything one would want from a winner: humanity, brilliance and a kind of subversive ecstasy\r\nIn practical terms, Young and her team have to choose between three Americans, an English woman, an award-winning Scot and a Pakistani. Collectively, their novels have been described by one of the judges as “transcultural”, a word still new to many dictionaries.\r\nFirst on the shortlist is <NAME>’s 4321 (Faber), a consciously epic, quasi-cubist portrait of an American boy’s life during the second half of the last century. (Full disclosure: I was Auster’s first publisher and have been an admirer of his work ever since The New York Trilogy.)\r\n4321 offers a hefty punch from an American heavyweight. At more than 1,000 pages, the multi-form versions of the life of Archibald <NAME> demonstrates a major writer at his best – original, ambitious, pitch-perfect and wholly absorbing. This is a novel tormented by fate, contingency and playful literary experimentation. But it’s also a narrative to get lost in, a Bildungsroman that is, by chance, a poignant elegy to the America that is being trashed by Trump and his vandals. 4321 must be a real contender.\r\nInevitably, Auster’s book towers over <NAME>’s History of Wolves(Weidenfeld), an enigmatic coming-of-age novel set on the edge of a lake in the American midwest. Some readers may compare Fridlund’s book unfavourably with <NAME>’s Housekeeping, which is also set by a lake, but History of Wolves is grounded in a more sinister domestic narrative that grips the reader with a fierce vision of adolescent estrangement. It’s a powerful debut.\r\nFrom these all-American narratives, we move to Britain with Fiona Mozley’s Elmet (<NAME>), another first novel about secrets in the family. As her title suggests, Mozley has drunk deep at the fount of Ted Hughes and has written a dark hymn to the landscape and language of Yorkshire that’s also, like Hughes’s poetry, bleak, lyrical and steeped in blood.\r\nWhere Mozley draws on an English tradition, in Exit West (Hamish Hamilton), <NAME> strikes a global dystopian note that’s fresh, contemporary and audacious, a love story set in a disintegrating society; a novel for the moment.\r\nWhich brings us to the big American challenger here, Lincoln in the Bardo by <NAME> (Bloomsbury), the bookies’ favourite. Saunders has been extravagantly praised in the US for his short fiction, notably CivilWarLand in Bad Decline (1996), and is, unquestionably, a highly original talent who is taking fiction into extraordinary new territory. Lincoln in the Bardo, his first novel, is a strange and haunting reverie on <NAME>’s grief at the death of his 11-year-old son, Willie, “a small mirror of himself”, in 1862. The “bardo” is the Tibetan Buddhist limbo between death and rebirth in which Lincoln’s dead son meets ghostly voices from the past in a dazzling collage of voices.\r\nYou could describe this as a postmodern historical novel, but that would be to underestimate the thrill of Saunders’s intentions. Braiding snatches of prose, both original and archival, he redefines his chosen genre with some outrageous comic touches and many arresting moments of sheer magic. Experimental yet firmly anchored to its readers’ attention, it offers the kind of satisfactions typical of many previous winners. If it had not been so wildly acclaimed, it would seem a shoo-in for this year’s prize. And yet…\r\nThere is, from the final book on this list, <NAME>’s Autumn (Penguin), some serious competition. Smith’s is another highly acclaimed performance, the first of a four-part series about time and the seasons. Autumn is a bittersweet tour de force set in “the worst of times” – Brexit Britain – and interweaving art, death and the mysteries of love. Smith’s portrait of centenarian <NAME>, approaching death, and his passionate protege, Elisabeth, is a stunning exploration of memory and regret, a book that celebrates and entertains as much as it takes us into the twilight world of the dying. On some readings, Autumn has everything one would want from a winner: humanity, brilliance and a kind of subversive ecstasy.\r\nWho knows how the judges will adjudicate this list? Almost any outcome is possible on 17 October. Who knows if what they choose is literature? That’s for posterity. My hunch is that a US writer will take the prize again, no doubt stirring up more anti-Americanism, though Smith will have a lot of home support. You never can tell.\r\n', 'images/book1.jpg'),
(7, 'Kancha Ilaiah case: We’re not here to ban books says Supreme Court', 'books', 'Supreme Court dismisses petition to ban a book written by the Dalit writer.\r\nIt is not up to the Supreme Court to use its powers to ban books, which are a free expression of a writer’s thoughts and feelings about the society and world he lives in. Courts cannot be asked to gag free expression. The Supreme Court has always placed the fundamental right to free speech at the highest pedestal.\r\nThis is what the Supreme Court recorded in its two-page order while dismissing a petition to ban a book written by writer and activist Professor <NAME> called <NAME> .\r\nThe petition filed by advocate <NAME> also took exception to a particular chapter in a book titled ‘Post-Hindu India’ called ‘Hindutv-Mukt Bharat’. The book is critical about the caste system prevailing in India, especially in the Arya Vysya community.\r\n “Any request for banning a book of the present nature has to be strictly scrutinized because every author or writer has a fundamental right to speak out ideas freely and express thoughts adequately. Curtailment of an individual writer/author\'s right to freedom of speech and expression should never be lightly viewed,” a Bench of Chief Justice of India Dipak Misra, Justices <NAME> and <NAME> recorded in the order. The court dismissed the petition to uphold the fundamental right of free speech, “keeping in view the sanctity of the said right and also bearing in mind that the same has been put on the highest pedestal by this court”.\r\nThe court snubbed the petitioner, observing that his prayer to ban the book of <NAME> is rather an “ambitious” one. “When an author writes a book, it is his or her right of expression. We do not think that it would be appropriate under Article 32 of the Constitution of India that this court should ban the book/books,” the Supreme Court held.\r\n<NAME> had recently challenged his detractors in the Arya Vysya community, saying he was prepared to withdraw his book of the representatives of the community were prepared to earmark 5% jobs in their establishments to Dalits, Adivasis and members from the washermen and barber communities.\r\n', 'images/book2.jpg'),
(8, 'To Kill a Mockingbird by <NAME> taken off Mississippi school reading list', 'books', 'To Kill a Mockingbird, <NAME>’s classic novel about racism and the American south, has been removed from a junior-high reading list in a Mississippi school district because the language in the book “makes people uncomfortable”.\r\nThe Sun Herald reported that administrators in Biloxi pulled the novel from the 8th-grade curriculum this week.\r\n<NAME>, vice-president of the Biloxi School Board, told the newspaper: “There were complaints about it. There is some language in the book that makes people uncomfortable, and we can teach the same lesson with other books. It’s still in our library. But they’re going to use another book in the 8th-grade course.”\r\nA message on the Biloxi schools website said To Kill A Mockingbird teaches students that compassion and empathy do not depend upon race or education.\r\nPublished in 1960, Lee’s Pulitzer Prize-winner deals with racial inequality in a small Alabama town, in the aftermath of an alleged rape of a white woman for which a black man is tried. It has sold more than 40m copies and it was made into a film in 1962, winning three Oscars.\r\nAn email to the Sun Herald from a concerned reader referred to the book’s use of the word “nigger” when it said the school board’s decision was made “mid-lesson plan”. “The students will not be allowed to finish the reading of To Kill A Mockingbird,” the email said “… due to the use of the ‘N’ word.”\r\nThe newspaper quoted the reader as writing: “I think it is one of the most disturbing examples of censorship I have ever heard, in that the themes in the story humanize all people regardless of their social status, education level, intellect, and of course, race. It would be difficult to find a time when it was more relevant than in days like these.”\r\nThe Sun Herald reported that school board Superintendent Arthur McMillan did not answer any questions about the withdrawal. The book has been withdrawn from schools before, in 2016 in Virginia.\r\nLee died last year at the age of 89, after the discovery and controversial publication of a second novel, Go Set a Watchman, that describes events after those depicted in To Kill a Mockingbird. In June this year, the author’s estate approved plans for a graphic novel version of the first book.\r\n', 'images/book3.jpg'),
(9, '<NAME>\'s The Book of Dust: La Belle Sauvage review: a rich dreamlike prequel well worth the wait', 'books', 'A decade-and-a-half after The Amber Spyglass, <NAME> returns to the world of His Dark Materials with the first in a new trilogy. “Eagerly anticipated” isn’t the half of it. I well remember asking after His Dark Materials in a bookshop, back when the buzz was first building, and being directed to the children’s section. I assumed the person who’d recommended it had made a mistake and left empty-handed. But what a difference a few years make…\r\n\r\nIn art, as in life. La Belle Sauvage is a prequel – set 10 years or so before the events of Northern Lights. It reacquaints us with many of the characters from the original books. There are cameos from <NAME> and <NAME>, with her sinister beauty and her inscrutable monkey-daemon; we meet a younger version of the elderly Gyptian Farder Coram; and Pullman’s heroine Lyra is here too… except, rather than reading alethiometers and transforming the fortunes of the multiverse, this time her main role is to gurgle prettily and fill her nappy at inconvenient times. We all have to start somewhere.\r\n\r\nThe hero of this story, rather, is Malcolm, a boy on the verge of adolescence who helps out at his parents’ waterfront pub, the Trout, in the steampunk Oxford familiar from Northern Lights. His pride and joy is a canoe called La B<NAME> – and he takes a dim view of the acquaintance who thought it funny to scrawl out the V and replace it with an S. (You may, like me, develop a sneaking regard for this acquaintance.)\r\n\r\nThe plot gets going when, after witnessing a stranger dropping a secret message before being apprehended by a pair of thugs, Malcolm gets drawn into a world of politico-religious subterfuge. On one side are the theocratic fascists of the Magisterium – their sinister Stasi being the agents of the CCD (Consistorial Court of Discipline); on the other a shadowy resistance movement known as Oakley Street.\r\n\r\nAt issue, as ever, are the properties of Dust and the fate of baby Lyra, who is being semi-secretly sheltered by the nuns at the nearby priory. The surveillance state sends its roots deep. Echoing Mort<NAME>’s minor classic The Wave, Malcolm’s school is taken over by a youth movement – the League of St Alexander – whose members are invited to inform on heretics and soon have the teachers terrified of their charges.\r\n\r\n\r\n\r\nSocial and psychological commentary is seldom far from the surface. Like Milton, a quote from whom gave the His Dark Materials trilogy its title, Pullman has a design on the reader. Milton wanted to “justify the ways of God to man”; Pullman wants to do, roughly, the opposite – though his assault is less against an enfeebled Authority than the oppressive and obscurantist religions that claim to act in His Name.\r\n\r\nAnd like Tolkien, world-building is at least as much of a preoccupation as storytelling: over the first trilogy Pullman unfolded a whole existential set-up that mashed up the languages of magic and quantum physics to incorporate versions of the Many-Worlds hypothesis, a twisted-Milton creation mythos and, in Dust (also “dark matter”), a sort-of-materialist account of the Hard Problem of Consciousness. That’s quite some going for a children’s book.\r\n\r\nThis being a prequel, we can take the set-up – the workings of Dust and alethiometers and daemons and all that jazz – more or less as read, even if those revelations lie in the future for the characters in the book. Yet Pullman, generously, makes sure that you can come to this one fresh without having to read, or reread, what went before. The great metaphysical edifice of His Dark Materials is, for the most part, in the background.\r\n', 'images/book4.jpeg'),
(10, 'Paddington 2 review: a deliciously funny <NAME> makes the bear\'s sequel impossible to resist', 'books', 'Paddington was uncommonly charming and Paddington 2 is very nearly as good. That said, for approximately nine minutes, you may have minor concerns. Will this film merely coast on the cosy lovability that made its forebear (sorry) such a joy? How can the bar be nudged up, and who’s going to do it?\r\n\r\nEveryone’s favourite ursine Peruvian immigrant left his debut in such a warm and happy place, there’s a nagging lack of comic friction as we dive back in. The Brown family, living in their perfect multicultural haven of Windsor Gardens, are trying out some new eccentric hobbies, are they? Forgive us, makers of Paddington 2, for a light tapping of feet.\r\n\r\nImpatience is dispelled for good as the plot kicks in, and it turns out – with all due respect to returning leads <NAME> and <NAME>, not to mention <NAME>’s cuddly vocal work – to be all about the guest stars. The first set-piece to get dear, disaster-prone Paddington spinning from the rafters involves a barbershop, a prone <NAME> as a pompous judge, and a set of vibrating clippers. We start to feel in safe hands once again, but it takes this burst of skittering chaos to do it.\r\n\r\nAnd then <NAME> arrives. Essentially filling <NAME>’s shoes as this instalment’s star villain, his role as a deliciously self-absorbed West End acting legend called <NAME> is the gift that keeps on giving.\r\n\r\nThrough his machinations – it’s all to do with an antique pop-up book Paddington covets, which contains the clues, quite without him knowing, to a long-lost treasure stash – the poor bear is framed for robbery, and sentenced by a vindictive Conti to 10 years in jail.\r\n\r\nHis letters to beloved, 100-year-old Aunt Lucy suddenly have a mournful bent, though he does find time, by way of silver linings, to praise the prison’s imposing Victorian architecture and tip-top security.\r\n\r\nReturning director <NAME>, in cahoots with new co-writer <NAME>, proves that the crackpot inspiration that powered his first one was no fluke. Prison is exactly the place for Paddington, in the sense that his understated melancholy makes him seem even more adorable behind bars. The shadow of his outsider status returns, and there’s a whole new set of characters for him to win over with his quaint, flummoxed ways.', 'images/book5.jpg'),
(11, 'Tata Tele deal: How Airtel is getting a billion-dollar business for free', 'business', 'After Telenor ASA decided to hand over its India mobile business to Bharti Airtel Ltd for free, the Tata group has done the same. In the June quarter, revenues of these companies together stood at Rs3,202 crore, or nearly $2 billion on an annualized basis. Sure, since Tata’s non-mobile businesses, such as broadband, are being retained, the actual revenue that could potentially accrue to Airtel could be lower.\r\nStill, even using conservative estimates, the Tatas are transferring at least a $1 billion business to Airtel for free. Telenor’s annualized revenues stood at $606 million in the June quarter.\r\nIn fact, the Tatas have gone a step further compared to Telenor. For the latter, Airtel agreed to take over outstanding spectrum payments, other operational contracts such as tower leases and employees. But the deal with the Tatas is even sweeter; it will take over only a portion of outstanding spectrum payments and it’s not clear whether operational contracts and employees are part of the deal.\r\nThe simple reason Airtel is able to strike such deals is that it is the only buyer in the market. Vodafone India Ltd and Idea Cellular Ltd have enough on their plate with their own merger, and the last thing they would want to engage with is the integration of another telco. Reliance Jio Infocomm Ltd, after having spent Rs2 trillion already in building its network, appears self-sufficient. Of course, these are also distress sales, given the high-cash burn at these companies. For sellers, therefore, one big hope is if Airtel evinces some interest. The only other option is to wind down the business, which entails far higher costs.\r\nA Tata Sons executive told Mint the cost of winding down the business would have been about Rs8,000 crore higher than the current arrangement. Knowing this well, Airtel has stayed shy of rushing into deals, and has waited till sellers agree to its terms.\r\nThis puts it in an enviable position; such takeovers help grow market share as well as help plug gaps in its spectrum portfolio at a fairly low cost. In addition, with Vodafone and Idea busy with the merger process, and given the uncertainty among their employees, Airtel can grab market share from its large rivals as well.\r\n', 'images/business1.jpg'),
(12, 'Pharma companies may post better results in Q2 on local business growth', 'business', 'Sun Pharma\'s top-line is likely to decline 15 per cent, owing to increasing pressure on Taro\'s business and a lack of generic launches to offset pricing pressure in the base business. Domestic business is however likely to post strong growth, given channel re-stocking.Indian pharmaceutical companies are expected to post better results in the second quarter of the current fiscal, following recovery in the domestic business and several launches in the US market, a report says. “Unlike the last two quarters, the Indian pharma sector will witness some relief in Q2 FY18, largely led by certain one-off factors. Channel re-stocking will help many companies in the India branded business and a couple of significant launches in the US market will provide a further boost,” HDFC Securities analyst <NAME> said in its report in Mumbai.\r\n“We foresee a 15 per cent sequential jump in revenues, and the EBITDA margin to move up to 22 per cent from 18 per cent quarter on quarter. On a year-on-year basis, we expect single-digit top-line growth. H2 FY18 is again likely to be soft, with no visibility on resolution of the FDA issues of large companies like <NAME> and Dr Reddy’s Labs,” Chalke said.\r\nSun Pharma’s top-line is likely to decline 15 per cent, owing to increasing pressure on Taro’s business and a lack of generic launches to offset pricing pressure in the base business. Domestic business is however likely to post strong growth, given channel re-stocking. The EBITDA margin may show some sequential improvement on the back of a better business mix.\r\nThe Halol resolution and the specialty business remain key triggers for Sun Pharma post Q2 in the current fiscal. However, any further delay in the resolution and a negative outlook for the specialty business may lead to significant earnings cuts for FY19/FY20, as Taro’s business continues to erode, he said.\r\n\r\n', 'images/business2.jpg'),
(13, 'Samsung\'s chief of booming semiconductor business <NAME> to resign; cites ‘unprecedented crisis’', 'business', 'Seoul: The chairman of Samsung Electronics Co.\'s board of directors, who has been the public face of the company after its de facto chief was jailed on corruption charges, said Friday he will resign next year to make way for a new leader.\r\n\"As we are confronted with unprecedented crisis inside out, I believe that time has now come for the company to start anew, with a new spirit and young leadership to better respond to challenges arising in the rapidly changing IT industry,\" <NAME>, 65, said in a letter to employees.\r\nKwon plans to resign as head of Samsung\'s semiconductor and component business and will not seek re-election on the company\'s board when his term expires in March, Samsung said in a statement.\r\nHe has represented Samsung Electronics at various occasions since the company\'s heir and vice chairman, <NAME>, 49, was jailed earlier this year. Lee was convicted on corruption charges to five years in prison in August, along with four other former Samsung executives.\r\nSamsung has two other CEOs, each overseeing its mobile phone business and home appliance division.\r\n', 'images/business3.jpg'),
(14, 'IndusInd clinches largest MFI deal takes over Bharat Financial', 'business', 'Ending months of speculation, IndusInd Bank and the second largest microlender Bharat Financial Inclusion (BFIL) on Saturday announced largest merger in the MFI space in an all-share deal, which will help the private sector lender push its rural network and bring down credit cost for small borrowers.\r\nThe merger, which will add 6.8 million customers to IndusInd\'s 10 million now, and which comes amid a slew of similar announcements involving the urban-focused new age private sector lenders such as Kotak Bank and IDFC Bank, will also help reduce cost of lending for micro borrowers as cheaper deposits can be used to fund their credit needs.\r\nAds by ZINC\r\n\r\n\"The biggest gain for us is the rural network. It will also us help reduce cost of funds by 3-4 per cent,\" IndusInd Bank managing director and chief executive <NAME> said.\r\nEarlier this afternoon, the boards of both the lenders separately decided on the merger and approved the share swap ratio wherein BFIL shareholders will get 639 shares of IndusInd for every 1,000 shares held.\r\nThe balance-sheet of BFIL, including the entire capital, assets and liabilities will move into IndusInd, while the operation team will continue as a wholly owned subsidiary and work as business correspondents.\r\nThe combined entity will have 40,000 employees, Sobti said, stating all the 15,000 employees of BFIL will be absorbed and continue in the same role. However, the board of the Hinduja Group promoted bank will remain unchanged.\r\nThe IndusInd scrip closed 0.43 per cent up at Rs 1,750.15 on the BSE on Friday, while BFIL shares closed 0.38 per cent up at Rs 1,003.45.\r\nSobti conceded that there is a 12-13 per cent premium over the average stock prices in the past two weeks which BFIL shareholders will get, but justified it on the Rs 9,500-crore loan book which his bank gets and also the synergies that will deliver higher value going forward.\r\nThe merger, expected to take up to 10 months to consummate, will help the bank in its rural play, where it has only 250 of its 1,210 branches, Sobti said.\r\nBFIL\'s network touches 1 lakh villages across the country and the merger will help it act as a full service bank rather than the monoline micro-loan provider, BFIL managing director and chief executive MR Rao said.\r\nIn the past few months, speculation has been strong about BFIL\'s suitor, especially after repeated attempts by the microlender which has survived multiple crises to turn into a small finance bank have failed. Many of its peers did manage to turn into the new-age entities.\r\nPH <NAME>, non-executive chairman of BFIL, said the merger is not \"an easy one\" for the MFI and shared a trivia by stating that the announcement comes on the seventh anniversary of the passage of the Andhra MFI Act, which had led to doubts over the very survival of the sector.\r\nThis regulatory overreach had forced BFIL, floated by the high profile Vikram Akula as SKS Microfinance, and taken to a historic IPO in 2010 making it the first MFI to go public, to even change to its present name. The Andhra law left every player bleeding for a few years and forced RBI to bring the sector under its purview.\r\nBFIL feels only two areas of the banking segment -- the lower-middle class and those around poverty line --are the ones accretive to margins and when coupled with the full range of service offerings, the merger is a win-win.\r\nSobti elaborated saying that apart from reducing cost of funds, merger will help IndusInd not just achieve the priority sector lending sub-targets but also exceed them, making it a player in the PSL certificates market that is fee-accretive.\r\nBecause of the lower risk weights attached to lending by banks, it will help conserve capital as well, Sobti added, adding \"the merger is value accretive from day one.\"\r\nWhen asked about the structure of absorbing the balance sheet and keeping operations as a wholly-owned subsidiary, Sobti said it is in sync with past precedents which have been cleared by the regulators and will also help maintain the ethos of the company.\r\nThe merger, which comes amid a surge in agri loan losses by banks, will increase share of micro loans to 7 per cent of the loan book of IndusInd from 2.8 per cent now, Sobti said, but will dip to 5 per cent over the next three years.\r\nAsserting that microloan segment is \"high yielding and has low delinquency rates\", Sobti said it will not lead to much troubles on the asset quality as BFIL has a 99.6 per cent repayment levels in this calendar year, after the note-bank hiccups stabilised.\r\nRao chipped in saying demonetisation led to a Rs 400- crore loan loss for BFIL, but it has been fully provided.\r\nThe deal will have to pass through a slew of regulators such as the Reserve Bank, National Company Law Board Tribunal and fair-play watchdog CCI.', 'images/business4.jpg'),
(15, 'India asks US to review its position on totalisation pact', 'business', 'NEW DELHI: India has asked the US to revisit its position on totalisation agreement and raised concern at the 11th Trade Policy Forum at Washington, DC, over protectionist measures which could have an adverse impact on trade in services. \r\n\r\nCommerce and industry minister <NAME>, during his discussion with the US trade representative <NAME> on Thursday, adopted a firm stance on issues ranging from trade deficit to price control for medical devices, officials said.\r\n\r\nThey said Prabhu made a strong pitch for India\'s need to bring about a reconciliation between the demand for optimum medical facilities and affordable healthcare to a large number of people. The minister stressed that life-saving drugs and devices and their supply are of utmost concern for any developing country. \r\n\r\n\"India desires to address the concerns of providing affordable healthcare to its citizens and, at the same time, work towards striking a balance between affordable healthcare needs and introduction of high-end technology,\" Prabhu said, according to one of the officials, who did not wish to be identified. \r\n\r\nPrabhu, according to the official, also said that American companies and manufacturers of medical devices should come forward for establishing manufacturing facilities in India. \r\n\r\nResponding to the US\'s concerns on trade deficit with India, Prabhu said exports of both countries to each other\'s territories have grown over the same pace for the past three decades.', 'images/business5.jpg'),
(16, 'New Ideas;New Technology: Bangalore Central University is Revamping Its Education', 'education', 'In July, the Karnataka State Government split up the 130-year-old Bangalore University into three separate varsities, creating the newly formed Bangalore Central and Bangalore North Universities.The Bengaluru Central University, which has over 233 colleges, plans to change city’s higher education landscape with several reforms, the Bangalore Mirror reported.\r\nStarting with going digital.\r\nThe admissions, administration, examinations and evaluations of results will now happen digitally.\r\nBeing more inclusive\r\nThe university wants to strengthen its policy on inclusivity. Speaking to Bangalore Mirror, professor <NAME> said, “As the university is embedded in the heart of the city, it gives us a major task to set the foundation strong. Among students, it aims to provide equal opportunity to women, SC, ST, backward classes, persons with disabilities, and other marginalised sections of the society.”\r\nHave a higher teacher to student ratio\r\nThe university also wishes to attract and retain highly qualified faculty members and wants to achieve a 1:15 faculty to student ratio. The varsity will even have local and global teaching and research collaborations.\r\nOpen doors for other sources of funding\r\nState funds and students fees will need to be supplemented if the best opportunities are to be provided to students. The university will throw open a CSR wing, as well have consultants provide expert advice on research and other proceedings.\r\nSmart cards for attendance and facilities\r\nSmart cards will be introduced for students and to show when they enter and as a requisite for attendance.\r\nNew schools to make the variety of education richer\r\nBCU aims to start new schools in its first phase of operations.\r\nAdditions to existing departments in areas like science, mathematics, commerce and management, communication, apparel technology and management and foreign languages will be made too.\r\nIn addition, research-based centres in the areas of urban studies and film studies are being planned. These are aimed to address the critical needs of the city, its economy and people.\r\nWhat is the budget for all the changes?\r\nA budget of Rs 1,000 crore over four years has been presented to the government for consideration. At least Rs 325 crore is required for the initial work.\r\n', 'images/edu1.jpg'),
(17, 'Desert research education center threatened with closure', 'education', 'The prestigious Midreshet <NAME> research and education complex in the southern Negev Desert will have to close in nine days unless the Education Ministry stands by a commitment to provide a quarter of the institution’s annual budget, Channel 2 reported Saturday.\r\nNo money has been paid since July, the report said.\r\nOfficials from the academy blamed Education Minister <NAME>, of the right-wing religious Jewish Home party, for the shortfall, saying he was opposed to the values espoused by the center.\r\nLocated next to Kibbutz Sde Boker and connected academically to Ben-Gurion University of the Negev in the southern city of Beersheba, the facility was created in the early 1960s to reflect the vision of Israel’s first prime minister, <NAME>, to encourage Jewish settlement and intellectual development in the relatively empty, arid region.\r\nIt combines a slew of desert-related research and educational institutions, among them an institute for desert research, a national solar energy center, a boarding school, an environmental high school, a field school and a pre-army preparation academy.\r\nIt has recorded breakthroughs in the areas of alternative energy, sustainable agriculture for arid landscapes, and biotechnology.\r\nBen-Gurion, who also headed the Labor movement, lived and is buried on Kibbutz Sde Boker.\r\n“The money will finish in 10 days,” said <NAME>, chairman of the board’s finance committee. “We won’t be able to buy food for the students, pay salaries to the employees — and therefore we will have to close the institution.”\r\nThe Education Ministry, however, accused it of running a deficit “at the expense of the public purse, without justification.”\r\nThe relatively small sum involved could not be the real reason, Alsheich insisted, noting that far bigger amounts were handed out to other academies.\r\nUri Distenik, the school’s director, charged the Education Ministry with carrying out a “targeted assassination” on what the institution represented.\r\nZionist Union lawmaker <NAME> tweeted sarcastically on Saturday, “If they’d call it the Sde Boker yeshiva [religious seminary], or <NAME> [after <NAME>, a right-wing visionary and key influence on Prime Minister <NAME>], there’s a serious fear that the budget would remain.”\r\nBar, who heads the parliamentary forum for the strengthening of the periphery, posted on Facebook that it was “shameful” and “moral bankruptcy” on the part of the Education Ministry to let the school close.\r\n“The late Prime Minister <NAME>’s heritage of love of the land and of mankind must be instilled in all citizens of Israel, regardless of political affiliation, and Midreshet <NAME> [another name for Midreshet <NAME>] in the Negev has been doing this for many years out of a genuine Zionist mission,” he added.\r\nAgain in this beautiful place on earth- sde boker!\r\nPosted by <NAME> on Wednesday, 7 June 2017\r\nIn letter sent to Bennett last month, the academy’s board of directors accused Education Ministry Director General <NAME> of avoiding them, according to the Walla website.\r\n“We’ve tried to prevent this [closure] for two months, but the lack of organization and the ongoing contempt [for us] do not allow us to wait any longer,” the letter warned.\r\nThe ministry’s finance department torpedoed an alternative plan to approve the NIS 12 million so long as the school established a teacher training college to serve the whole country, Channel 2 said.\r\nThen two months ago, it informed the board of governors that it wanted to scrap ministry funding gradually over the next five years, according to Alsheich.\r\nThe ministry said, however, that it was working on a recovery program that would allow the school to operate without a deficit and serve the entire education system.\r\n', 'images/edu2.jpg');
INSERT INTO `news` (`id`, `headlines`, `category`, `newstext`, `image`) VALUES
(18, 'PM Modi: Rs. 10000 Crore To Be Provided To 20 Varsities To Make Them World Class', 'education', 'PATNA: Lamenting that no Indian university figures among the top 500 globally, Prime Minister <NAME> today said the government intends to unshackle these institutions and provide Rs. 10,000 crore to 20 varsities to ensure that they are counted among the best in the world. Addressing a function on the centenary celebrations of the Patna University here, he said measures like grant of central status were \"a thing of the past\" and his government has taken \"a step forward\" towards making 10 private universities and 10 government ones world class.\r\n\r\n\"My government took an important step towards unshackling the IIMs, freeing them from the clutches of restrictions and regulations set by the government.\r\n\r\n\"We intend to do the same for our universities and ensure that our centres of higher learning figure among the best 500 in the world,\" Modi said here.\r\n\r\nIn his speech that lasted a little over 30 minutes, the Prime Minister stressed on the need for universities to give more emphasis on \"learning and innovation\" and give up old teaching methods which focused on \"cramming students\' minds with information\".\r\n\r\nThe Prime Minister also replied in his characteristic style to a fervent plea by Bihar Chief Minister <NAME>, who in his welcome address had urged PM Modi \"with folded hands that central status be granted to Patna University\".\r\n\r\n\"I would like to say something about a demand that was raised here and met with loud cheers by the young crowd attending this ceremony. Issues like grant of central status have become a thing of the past. We are taking a step forward. \"We will provide an assistance of Rs. 10,000 crore to 10 private universities and an equal number of government ones for a period of five years. All these universities have to do is to demonstrate their potential to become world class,\" he said.\r\n\r\nThe universities will not be selected by the prime minister or a chief minister or any other political figure, he said, adding their potential will be assessed by a professional, third party agency.\r\n\r\n\"I exhort Patna University to seize this opportunity,\" he said in the presence of a host of dignitaries, which included Kumar and his Deputy Sushil <NAME>.\r\n\r\nHailing the role of young IT professionals in changing the global outlook towards India, Modi quipped \"earlier we were seen as a land of snake charmers, exorcism and superstitions.\r\n\r\n\"Long back, while on a visit to Taiwan, I told a friend that we, as a nation, have moved from snakes to the mouse,\" he said.\r\n\r\nPM Modi said, \"We are a nation of 800 million young people, 65 per cent of our population is below the age of 35 years. There is nothing that we cannot achieve with such a huge demographic advantage.\"\r\n\r\nThe PM began his speech on a humorous note, saying \"the Chief Minister said in his speech that I was the first Prime Minister to visit this university. It seems my predecessors have left quite a few tasks for me\".\r\n\r\nHe also paid rich tributes to the rich and glorious history of Bihar, saying \"the stream of knowledge that flows through this state is as ancient as the river Ganges itself\". \"The state has been devoting itself to the worship of Saraswati (Goddess of learning). But the time has come to propitiate Laxmi (Goddess of wealth and prosperity) as well and make the state a prosperous one by 2022, when we celebrate 75 years of our Independence,\" he said.\r\n\r\nHe also remarked \"there is no state in the country where one does not find a Patna University alumnus among the top five bureaucrats. I have had the opportunity to work with many such bright officers\".\r\n\r\nUnion Ministers <NAME>, <NAME>, <NAME> and <NAME> were among those present during the event.\r\n\r\nAfter attending the PU function, the PM paid an unscheduled visit to the Bihar Museum, situated adjacent to the Patna High Court, which has been a pet project of Chief Minister Nitish Kumar.\r\nThe chief minister accompanied Modi during the museum visit.\r\n\r\nThis is the prime minister\'s first full-fledged official tour to the state since the BJP became a part of the ruling coalition in Bihar in July this year after Kumar-led JD(U) snapped its alliance with Lalu Prasad\'s RJD and the Congress.\r\n', 'images/edu3.jpg'),
(19, 'Success Story: PGIMS Rohtak To KBC Hot Seat: Dr <NAME> (AIR-79 CSE 2015)', 'education', 'NEW DELHI: When he made it to the hot seat on Kaun Banega Crorepati 9 (KBC 9; episode 32), Dr <NAME> became one of the few bureaucrats who have appeared on the show, so far as contestants. Dr Goyal is an IAS Officer from Jind, Haryana and is posted in Thrissur, Kerala as Assistant Collector Under Training (ACUT). Having secured 79 rank in civil services exam 2015, Dr Goyal fulfilled his dream of helping larger mass of population. The transition of his career from MBBS to India\'s top bureaucrat level is one of its few kinds in the country.\r\n\r\n\'Service is the most important part of Indian Administrative Service,\' said Dr <NAME> while expressing his concerns for underprivileged children in the country. He shared his work experience at Kerala and remarked the \'beauty of the job\' and described the spirit of the country and unity in diversity.\r\n\r\nWhen asked about his preparation for the toughest examination, he said a meeting with a senior, who had then secured 81 rank, during internship first time made him think about the exam. He decided to quit his job for the exam.\r\n\r\nDr Goyal completed his MBBS from PGIMS, Rohtak in 2013 and cleared the civil services exam 2014 with All India Rank 628 and has also worked as a medical officer for 6 months.\r\n\r\nPost his selection in the civil services, Dr <NAME>, made it to the headlines once again for his appearance as a contestant in KBC 9 which airs on Sony TV. He appeared to be a confident contestant and played well in the show. He quit the show and took home Rs. 12.50 lakh.\r\n\r\nDr Goyal quit the show in the last question about an Indian cricketer, of Indian origin, who made his Test debut against India in 2016. When the show host, <NAME>, asked him about his favorite football team he answered it is Brazil. However in FIFA U-17 he will support India, he said.\r\n\r\nApart from studies, Dr Goyal plays badminton, football and is an ardent lover of music.\r\n', 'images/edu4.jpg'),
(20, 'Government\'s Commitment; Quality Of Teachers Vital In Education: <NAME>', 'education', 'CHENNAI: Wipro Limited Chairman <NAME> today highlighted the importance of the government\'s commitment and quality of teachers in the public education system. \"I think the problem in government education system is not the infrastructure or the course material. It is the quality of training of teacher and equally important is the commitment of the government in public education,\" he said. Elaborating, he said, \"I do not think you ever heard of a Prime Minister visiting public schools. Prime Minister visit States during a year of elections but very, very rarely you appreciate and see Prime Minister spending time in a public education institution.\"\r\n\r\nCalling for more improvement in investing in education, he said, \"we claim that we are spending 2.5 per cent (of GDP). But we do not even spend 2.5 per cent.\"\r\n\r\nHe said this should be compared with countries including China which spends an excess of five per cent on education. \"So we are way behind,\" he said.\r\n\r\n\"Empowering the teachers is more important in school education system. Creating an empowering environment to these teachers is the most important contribution we can make,\" he said.\r\n\r\nHe was delivering the keynote address at the 19th Polestar Award function, organised by Polestar Foundation, an initiative by city based Intellect Design Arena Private Limited here.\r\n\r\nStating that there has to be a \"sustained and consisted\" efforts in education, Mr. Premji said, \"90 per cent of the cost of education accounts to the teacher.\"\r\n\r\n\"Apart from infrastructure which we put in as one time capex (capital expenditure). The quality of teacher is key in public education,\" he said.\r\n\r\nNoting that a change in education system takes a very long time, he said, government was working on a new education policy.\r\n\r\n\"I think, if the recommendations of expert committees which are expected to be implemented in next six months, it will make for significant upliftment in terms of education in public domain,\" he said.\r\n\r\nReferring to the number of teachers graduating every year, he said, \"We graduate fewer teachers per year than what Finland does. Finland is a population of five million. Our population is of 1.3 billion.\"', 'images/edu5.jpg'),
(21, 'H&M just opened a 17000sqft store in Mumbai', 'fashion', 'There’s no greater indulgence than a relaxed afternoon of shopping on a day off. And if your upcoming weekend plans look a little weak, here’s where you can spend a quiet Saturday afternoon browsing through racks of merchandise with your bestie.\r\n\r\nSwedish high street label H&M just opened their fifth store in Mumbai’s Le Palazzo earlier this week. The store located off Kemp’s Corner is a two-storey space boasting 17,000sqft of shopping. This H&M store will carry womenswear, menswear, kids wear as well as accessories.\r\n\r\nKeeping in spirit with the high street retailer’s sustainable garment collection initiative, the store has a facility to donate old clothes for recycling, which will fetch the donator a discount coupon that can be used for their next purchase.', 'images/fashion1.jpg'),
(22, 'What Veere Di Wedding\'s designer costumes reveal about the lead characters', 'fashion', 'Sonam Kapoor and the cast of Veere Di Wedding have been blasting social media with posters of the upcoming rom-com. From the four co-stars—Sonam Kapoor, Kareena Kapoor Khan, Swara Bhaskar and Sh<NAME>—preening in lehengas to dancing in sherwanis, the two looks have already got us placing bets on what can be expected from the film that’s set to release in May 2018.\r\n\r\nGiven that producer and stylist <NAME> and her fashion enthusiast/actor sister <NAME> have worked together on the project, it’s guaranteed to be a visual treat for style watchers. Designer duo <NAME> <NAME> have created the costumes for the film and we couldn’t help but get on call with them for more insight on the wardrobe (and plot) details. Vogue spoke to one half of the designer duo, <NAME>, about what went into the making of Veere Di Wedding’s costumes.\r\n\r\nWhat did you have in mind when setting the tone for the movie via costumes?\r\nThe brief given to us was that it’s a chick flick in a way, but it’s also about emancipation of women. Rhea (Kapoor) was very clear that she wanted one look to be men’s sherwanis.\r\n\r\nWhat inspired you to try a vibrant palette of yellows, greens and tangerines for the first look?\r\nThe first poster is a bit of a tease—you can see the girls but you can’t really see them. The colour palette was our take on the marigold flower, which is also a part of the poster.\r\n\r\nTell us about your experience styling the four stars of the film. Any fun instances you encountered along the way?\r\nThe fittings have been a laugh riot. Going with the character and the mood, we have made some outfits sexier, some more covered. There are some corny clothes also!\r\n\r\nHow have you channeled each character’s personality via their clothes? What makes each character special?\r\nEach of the girls has a certain personality and Rhea was keen on bringing that in through the costumes. If somebody is a rebel, then it shows in their clothes.\r\n\r\nWhat was the biggest challenge you faced as designers while working on Veere Di Wedding?\r\nNo challenges! The girls have been very supportive. They have really imbibed the vibe of their characters and the clothes and the whole experience of it. From whatever working stills I have seen of the movie—they all seem to be having a blast. Other than Sonam, we had never worked with Kareena, Swara or Shikha before. Kareena was more than happy to experiment different styles. Rhea really had a vision for the film and the thought process has come through. Originally, the plan was to go completely crazy with the fashion element of the film, but we made the brief a little more realistic.\r\n\r\nWhat palette have you relied on for this film?\r\nAs the film is about four girls bonding, we have got them in colour stories in places but otherwise they have independent styles. The clothes are not typical bridal clothes.\r\n\r\nThe second poster of Veere Di Wedding had all four stars looking sharp in co-ordinated sherwanis. Can a bride really step out in a sherwani?\r\nMaybe not the bride (laughs). But having your bridesmaids in sherwanis can be a really cool idea.\r\n\r\nWhat is your ultimate tip for Indian brides this season?\r\nMore and more brides are moving away from jadau jewellery and wearing diamonds, and white diamonds with red just looks awkward. We love the idea of fuchsia pink, yellow, pastels and even white for bridal lehengas.', 'images/fashion2.png'),
(23, 'Colaba\'s latest pop up is as cool as its name sounds', 'fashion', 'Blink and there’s a new store in South Mumbai’s favourite shopping haunt, Kala Ghoda. The newest addition to the art district’s designer stores is the Colaba Cartel pop-up. Co-hosted by jewellery designers <NAME> of Valliyan and <NAME> of Parvati Villa, this space is filled with contemporary fashion labels.\r\n\r\nIt was Arora and Katau’s idea to curate a space that offers occasion and resort wear for the wedding and party hopping crowd. The first cycle of the Cartel will carry pieces by labels <NAME>, Hemant & Nandita, Anupamaa Dayal, Shriya Som, Sukriti & Aakriti, Astha Narang, Verandah by <NAME>, Deme by Gabriella, House of Sohn, Valliyan and Parvati Villa. The designers are encouraged to curate their own racks at the store.\r\n\r\nIf you’re headed to an end-of-the-year getaway or a wedding that will most likely explode on Instagram, you know where to get your wardrobe fix from.\r\n\r\nColaba Cartel, shop no 2, Machinery House, Burorji Bharucha Road, opposite Pantry, Kala Ghoda, Mumbai ', 'images/fashion3.png'),
(24, 'You\'re going to see these super tiny designer bags on everyone soon', 'fashion', 'If, like us, you believe it’s the little things that pack a big punch, you’ll love the designer handbag style that’s staging a comeback this season. Cast away your trusty totes and cross-bodies and make room in your wardrobe for the wristlet. Don’t be daunted by the lack of storage space–after all, you’re not going to need anything more than a credit card and lipstick to keep you company at a great party.\r\n\r\nWristlets might be the smallest of designer handbags but all you have to remember is that ‘Good things come in small packages’. Swap your cross body sling or that hard shell clutch in favour of this season’s favourite accessory. We’ll never tire of designer handbags from Anya Hindmarch’s happiness-infused version to Attico’s Studio-54 worthy number and even DVF’s pared-back option, we have every iteration of the hot ticket accessory covered.', 'images/fashion4.jpg'),
(25, 'The utter meaninglessness of the fashion industry\'s shunning of <NAME>', 'fashion', 'Fashion is exasperating. Even when it tries to do the right thing, it often only manages to remind the world just how tone deaf it really is.\r\n\r\n<NAME> is a fashion and celebrity photographer who has worked with everyone from Beyonce and <NAME> to <NAME>. He is a skilled shooter, but one who has long had an extraordinarily sleazy reputation for being sexually abusive to models. In public, he\'s recognisable thanks to his signature style, which includes work shirts, long sideburns, a moustache and eyeglasses that give him the incongruous look of a nerdy pornographer.\r\n\r\nIn 2014, New York magazine published a profile of him detailing the often sordid nature of his work. While the story contained all the usual biographical data points and resume highlights, it also made it clear that Richardson was known for being an awful person who regularly coerced models into sexually compromising circumstances. At the time the story was published, there were still people willing to defend Richardson, who took pains to acknowledge his accomplishments as a photographer. But after it ran, the magazine published a follow-up that included the personal stories of models who alleged that Richardson had been a sexual bully and worse. Richardson, for his part, seemed to view himself as a somewhat tortured and unfairly maligned artist who sometimes happened to work nude.\r\n\r\nRichardson was mostly unscathed by the stories.\r\n\r\nNow, however, a certain mainstream segment of the fashion industry has decided to formally distance itself from him. The Daily Telegraph, London reported that in a leaked e-mail from Conde Nast International, the publishing house banned Richardson from working for the company\'s publications, which include such titles as Vogue and GQ. Any forthcoming photo shoots should be halted, the memo said. And any unpublished shoots pulled. (This does not mean that Richardson\'s work has been purged from the archives. Indeed, the GQ website still hosts \"The Best of T<NAME>\" photo gallery.)\r\n\r\nThe facts of Richardson\'s behaviour have not changed over the last few years. Only the context. That roiling backdrop includes the denunciations of <NAME> and his predatory behaviour in and around Hollywood; the allegations of sexual harassment and cover-ups against Fox News\' <NAME> and <NAME>\'Reilly; and the continued dismay by many that the current president once bragged on tape about groping women, has been accused of doing just that in real life, and hasn\'t yet faced any repercussions.', 'images/fashion5.jpg'),
(26, 'Americans are paying $10 per half an hour of Zen. After yoga focus shifts to meditation', 'fitness', 'The demand for meditation is spreading across American cities -- perhaps a natural continuation of the yoga craze, which firmly embedded the search for nirvana in the health and wellbeing industry. It is 5 pm, otherwise known as rush hour in Manhattan. <NAME>, 31, finishes work and heads straight for her daily dose of peace and quiet -- half an hour at meditation studio “Mndfl.” Since April 2016, when she discovered the then-brand new studio, the investment bank employee has abandoned yoga and embraced meditation.\r\n“I have been meditating pretty regularly -- probably five times a week, 30-minute sessions,” says Lyons, sipping a cup of tea on the studio’s sofa. “I just need a moment to chill out. This city -- you are always running place to place and there are not a lot of quiet spaces,” she explains.\r\n“I think it’s made me a lot happier and also just helped me make better decisions, more thoughtful decisions.” Practiced by millions around the world, meditation promotes mental wellbeing through concentration, breathing techniques and self-awareness.\r\nFor a long time, those singing its praises were intellectuals, celebrities or people dedicated to spirituality. Its popularity in the West is owed in part to the Beatles, who promoted the practice on their return from India in the late 1960s.\r\nBut these days, meditation can be found in all areas of life -- from hospitals exploring its benefits for patients with serious illnesses, to schools who recommend it for children and television shows. The craze is a result of many factors -- waning attendance at places of worship, lives spent submerged in smartphones, not to mention neuroscientists’ confirmation of the benefits.\r\nAs a result, demand is spreading across American cities -- perhaps a natural continuation of the yoga craze, which firmly embedded the search for nirvana in the health and wellbeing industry.\r\n<NAME>, Mndfl’s 34-year-old “chief spiritual officer,” opened his first studio in Greenwich Village at the end of 2015, and now owns two others in Manhattan and Brooklyn. Elsewhere in the US, studios can be found in Los Angeles, Miami, Washington and Boston.\r\nIntroduced to meditation as a child by his parents, who converted to Buddhism in the 1970s, he says business “is going well.” “The people who come here are really a cross section of all New Yorkers,” he explains. “If the common denominator is, ‘I am really stressed out, I need to know how to deal with my mind’ -- that’s basically everyone.”\r\nRinzler refuses to talk money, revealing only that classes are often full -- and the 75 numbered pads in his studios have been reserved online 70,000 times in just 18 months. The reason for success? A model offering a well-rounded introduction to this ancient practice for a reasonable price.\r\nFor years, Rinzler explains, Buddhist centers only offered long introductions -- sessions of several hours, or even seminars lasting a number of days and costing up to several thousand dollars.\r\nWith classes priced at just $10 for half an hour, and options for unlimited subscriptions, new studios in New York or Los Angeles hope to capture a wider audience. Their model is similar to gyms, but with “zen” in abundance -- including dimmed lights, plant walls, and unlimited organic tea.\r\n- CEOs join, employees follow -\r\nCompanies are also reaping meditation’s benefits. More and more organizations in Silicon Valley and other sectors are introducing employees to the practice, convinced of the long-term benefits for the workforce.\r\n<NAME>, an ex-actress who has taught meditation since 2012, launched a special program for companies 18 months ago. Starting from 150 students in the first year, she now has over 7,000 -- and hopes to reach tens of thousands more with online courses, including in medium-sized cities such as Cleveland, Ohio or Tallahassee, Florida.\r\n“The most common way that I find myself teaching at companies is I teach the CEOs to meditate, and they start to benefit and they bring me on to do a talk with the company,” Fletcher, CEO of <NAME>, says. Employees take part on a voluntary basis, mostly “for some selfish reasons,” the 38-year-old explains.\r\n“Either they want to speak better, please their boss, want to make more money or have better sex...”\r\nBut Fletcher insists she has no issue with people starting out of self-interest. “If you actually practice you will start enjoying your life more, your brain will function better, your body will feel better, you get sick less often,” she says. “Those altruistic things will happen as a result of the practice anyway.”\r\n- Mobile meditation -\r\nAnother aspect of the industry gaining traction is meditation apps. One of the most popular, Headspace, had already been downloaded more than 11 million times in the spring -- and boasts over 400,000 paying users.\r\nBut meditation’s newfound popularity is of such high intensity, neither Rinzler nor Fletcher is concerned about competing studios popping up over time.\r\n“I am sure they are going to be exactly like yoga studios, you are going to find them on every block...” Rinzler predicts. “If you look at it as a business, there is competition,” Fletcher reflects, adding, “if you see it as a mission, there are colleagues.”\r\n“There are not too many teachers when it comes to teaching four billion people in my lifetime!”\r\n', 'images/fit1.jpg'),
(27, 'Pay attention to your gut health. It could be the key to ageing well', 'fitness', 'Chinese and Canadian researchers have found evidence to suggest that a healthy gut could be linked to healthy ageing. Carried out by researchers from Ontario’s Western University and Lawson Health Research Institute as well as from Tianyi Health Science Institute in Zhenjiang, Jiangsu, China, the research is one of the largest microbiota studies conducted in humans, looking at a cohort of more than 1,000 Chinese participants. Previous research too has shown that gut bacteria can slow down ageing.\r\nThe researchers studied the gut bacteria in individuals, who were aged 3 to over 100 years old and self-reported as being “extremely healthy” with no known health problems and no family history of disease. The team observed a direct correlation between health and the microbes in the intestine, finding that the overall microbiota composition of the healthy elderly group was similar to that of people decades younger, with little difference between the gut microbiota of those age 30 to those age over 100.\r\n“This demonstrates that maintaining diversity of your gut as you age is a biomarker of healthy ageing, just like low-cholesterol is a biomarker of a healthy circulatory system,” commented <NAME>, the principal investigator on the study and also a professor at Western’s Schulich School of Medicine & Dentistry and Scientist at Lawson Health Research Institute.\r\nThe study didn’t identify the cause or effect between gut microbiota and healthy ageing, with <NAME>, professor at Western’s Schulich School of Medicine & Dentistry and Scientist at Lawson Health Research Institute saying, “It begs the question — if you can stay active and eat well, will you age better, or is healthy ageing predicated by the bacteria in your gut?”\r\nHowever, Gloor added that, “The main conclusion is that if you are ridiculously healthy and 90 years old, your gut microbiota is not that different from a healthy 30-year-old in the same population.” The researchers now suggest that resetting microbiota in the elderly to that of a 30-year-old might help promote health.\r\n“The aim is to bring novel microbiome diagnostic systems to populations, then use food and probiotics to try and improve biomarkers of health,” said Reid, adding, “By studying healthy people, we hope to know what we are striving for when people get sick.” The findings can be found published online in the journal mSphere.', 'images/fit2.jpg'),
(28, 'Parents keep in mind: Less than 20% urban kids in India eat fruits once a day', 'fitness', 'Only 18% of urban children in grade six to 10 in India eat fruits every day, show the results of a survey, revealing poor eating habits of a vast majority of kids in the country. At 14%, the proportion of children eating protein once a day is even lower, showed the survey by Podar Education Group which runs over 100 schools spread across the country.\r\nThe survey involved responses from 1,350 parents of children studying in grade six to 10 in India’s metro cities. The results showed that only 35% of children consume vegetables as part of every meal. “The World Health Organisation (WHO) does say that childhood obesity is an ‘exploding nightmare’ in the developing world,” said Raghav Podar, Trustee, Podar Education Group, in a statement.\r\nA new study led by Imperial College London and WHO and published in the journal Lancet showed that the number of obese children and adolescents (aged five to 19 years) worldwide has risen tenfold in the past four decades. “Healthy childhoods are critical to the country, and require strong cohesive work between the parents and schools,” Podar said.\r\nThe survey evaluating the eating habits across food categories in young school children in India also found that 50% of them consume junk food, sweets or other unhealthy food almost on a daily basis. “This survey clearly indicates that teaching a child about good nutrition is not just about giving them a list of healthy foods that he or she can eat, but more about ‘how much’ and ‘when’ to eat,” child nutritionist Sripriya Venkiteswaran said.\r\n“For example, teach them about age-appropriate portion sizes and how to limit themselves when they go out to birthday parties or buffet spreads. Teach them to eat at regular intervals, not skip meals and keep a gap of at least three hours between dinner and bed-time,” Venkiteswaran added.\r\nThe silver lining is that almost 76% of parents said that their kids play some outdoor sport. About 24% said their children do not play outdoors at all. “It is important for every child to have 60 minutes of moderately rigorous play every day to be fitter and healthier. Lack of play also leads to slow cognitive skills, lower social skills, threat of diseases such as asthma, diabetes and aggressive behaviour,” said <NAME>, a sports educationist and co-founder of EduSports, a leading sports and physical education organisation.', 'images/fit3.jpg'),
(29, 'Did you know that our children are 10 times more obese than kids four decades ago?', 'fitness', 'According to a recent study, the world had 10 times as many obese children and teenagers last year than in 1975, but underweight kids still outnumbered them. Warning of a “double burden” of malnutrition, researchers said the rate of increase in obesity far outstripped the decline in under-nutrition.\r\n“If post-2000 trends continue, child and adolescent obesity is expected to surpass moderate and severe underweight by 2022,” researchers wrote in The Lancet medical journal. The team found that there were 74 million obese boys aged 5-19 in 2016, up from six million four decades earlier.\r\nFor girls, the tally swelled from five million to 50 million. By comparison, there were 117 million underweight boys and 75 million underweight girls last year after the number peaked around the year 2000, the study said.\r\nAlmost two thirds of the underweight children lived in south Asia. Obesity ballooned in every region in the world, while the number of underweight children slowly decreased everywhere except south and southeast Asia, and central, east and west Africa.\r\nThe prevalence of underweight children decreased from 9.2 percent to 8.4 percent of girls aged 5-19 over the study period, and from 14.8 percent to 12.4 percent in boys. Obesity grew from 0.7 percent to 5.6 percent among girls and from 0.9 percent to 7.8 percent in boys.\r\nIn Nauru, the Cook Islands and Palau, more than 30 percent of children and teenagers were obese in 2016. In some countries in Polynesia and Micronesia, the Middle East, North Africa, the Caribbean and the United States, more than one in five children were obese.\r\n- Make healthy food affordable -\r\nExperts divide people into body mass categories calculated on the basis of their weight-to-height ratio. These range from underweight, normal weight, overweight and three categories of obese. Obesity comes with the risk of chronic diseases such as diabetes, while underweight children are more at risk from infectious diseases.\r\nChildren in either category can be stunted if their diet does not include healthy nutrients. “There is a continued need for policies that enhance food security in low-income countries and households, especially in south Asia,” said study author <NAME> from Imperial College London.\r\n“But our data also shows that the transition from underweight to overweight and obesity can happen quickly in an unhealthy nutritional transition with an increase in nutrient-poor, energy-dense foods.” The team used the height and weight data of 129 million people older than five to estimate body mass trends for 200 countries from 1975 to 2016.\r\nWhile obesity in children and teens appears to have plateaued in rich countries, its rise continued in low- and middle-income countries, they found. “Very few policies and programmes attempt to make healthy foods such as whole grains and fresh fruits and vegetables affordable to poor families,” Ezzati said in a statement. “Unaffordability of healthy food options to the poor can lead to social inequalities in obesity, and limit how much we can reduce its burden.”', 'images/fit4.jpg'),
(30, 'Don’t let the winter slow you down. Here are 4 easy ways to stay full of energy', 'fitness', 'In our modern, hectic lifestyles, we can’t afford to get sluggish. Regardless of the weather outside, we need to keep up with the pace. This winter, try these four methods to be full of life:\r\n\r\n1) Warm drinks\r\n\r\nIn winters, try swapping sodas, fruit juice and sparkling water for warm drinks. Sipping warm -- not boiling hot -- drinks before and after meals helps prevent the loss of heat while also favouring digestion. Herbal teas with lemon, ginger, rosemary, fennel, aniseed and cinnamon warm the body and invigorate. Try them instead of tea or coffee for breakfast. For those with nervous temperaments or who are quick to anger, sip on peppermint tea, which is stimulating but fresher.\r\n\r\n2) Eat orange\r\n\r\nTo load up on antioxidants and tasty flavours, tuck into topical vegetables. These seasonal stars are mostly yellow or orange in colour, and grow underground on the surface, like carrots, beetroot, parsnips, pumpkins, potatoes and sweet potatoes. Your gut will thank you for the soothing effect of these easy-to-digest veggies. Foods that particularly invigorate the spleen and kidneys -- veritable reservoirs of energy -- are dates, grapes, pears, potatoes, cucumber, carrots, melon, cereals, licorice, honey, cinnamon and aniseed.\r\n\r\n3) Get to bed early\r\n\r\nIt’s not always easy to slow the pace with today’s ultra-connected and busy lifestyles. When the days get shorter, we should, however, respect this drop in energy and slow down our activities. Unless you’re a natural night owl, you can snuggle up in bed from 10:30pm with no reason to feel guilty. Reading a book, doing breathing exercises, inhaling in a few drops of essential oils (Roman camomile, lavender, niaouli) or listening to music can help you drop off.\r\n\r\n4) Try yin yoga\r\n\r\nClose to meditation, yin yoga is a slow and gentle stress-bursting activity that’s a great for fall. Holding floor-based poses for three to four minutes forces us to slow down and listen to the feelings and sensations of the present moment. This “time out” can be highly beneficial in the evening, to stretch the body thoroughly and nourish the immune system. If you have trouble getting motivated to go out, try an online class in the comfort of your home.', 'images/fit5.jpg'),
(31, 'Diwali 2017: Make This Diwali Diabetic-Friendly With These Sugar Free Sweets\r\n\r\nThis year impress your guests with a lavish Diwali meal. Here\'s a fully-planned Diwali food menu to avoid all the fuss.', 'food', 'While everyone\'s merry making and pleasing their sweet tooth, people suffering from diabetes have to be extra cautious when it comes to their sweet intake. What if we were to tell you that you can enjoy Diwali celebrations along with you share of sweet treats? Being diabetic does not mean that you have to give up on sweets entirely. Choose carefully and limit your portions. Desserts made at the best. Don\'t use full-fat milk if you\'re preparing sweets at home. Also, replace sugar with natural sweeteners such as jaggery and dates. Here are some sugar-free dessert options you can try at home for your Diwali celebrations. 1.Ragi Coconut Ladoo (Laddu) Recipe Recipe by <NAME> Made with millet or Ragi flour, Ragi Coconut Laddu is an immensely popular dish. This delicious laddoo is loaded with fibre, minerals and protein which makes it a great treat for diabetics. The wholesome delight is packed with the goodness of coconut, jaggery and crunchy peanuts. 2.Ragi Malpua Recipe by <NAME> Here\'s the Indian pancake dessert with a healthy twist. This recipe uses ragi flour, atta and oats to give you a wholesome and guilt-free experience. Malpuas are usually deep fried, but you can make them on a non-stick pan to steer clear of the excess oil. 3.Two-In-One Phirni (Sugar Free) Recipe by <NAME> Phirni is a simple rice pudding made by boiling the milk on slow fire with grounded rice. The layers of chunky pista and almond and aromatic rose essence are sure to make it a rich addition to your Diwali celebrations.', 'images/food1.jpg'),
(32, 'Struggling with Bad Breath? These 5 Foods Could Be the Culprit', 'food', 'Picture this. You have to meet someone important and also quickly tuck in your lunch. You eat whatever is available and show up just in time, except that your breath gives away your lunch menu! Now, that’s not the kind of conversation starter you were looking for. While daily activities like brushing your teeth twice, rinsing your mouth after a meal and flossing regularly are integral to good oral hygiene, sometimes bad breath could be linked to your diet and the last meal you took. Some foods can taint your breath for much long after you have had them. This is often caused due to halitosis. So the bacteria that resides in your mouth feasts on the food particles and dead cells which causes bad breath. \r\n\r\nHere are some foods that could be resulting in that foul smelling breath. \r\n\r\n1. Garlic\r\n\r\nDespite Garlic’s many health benefits, this doesn’t come as a surprise. Garlic has a long-standing reputation for causing bad breath and you have to blame its high sulphuric content, that lingers in the mouth for long, for the foul smell it leaves in its wake. The smelly sulphur is further absorbed in the bloodstream (while digestion), which makes inroads to your lungs, and is expelled as you exhale.\r\n\r\n2. Onions\r\n\r\nJust like garlic, the odour of onions stay long after you are done eating them. The sulphuric compounds present in the onion get absorbed into your bloodstream and gives out its traces as you exhale. If possible, floss and rinse your mouth thoroughly after you have had onions to get rid of the bad breath. \r\n\r\n Home\r\n Food & Drinks\r\n Struggling With Bad Breath? These 5 Foods Could Be The Culprit\r\n\r\nStruggling with Bad Breath? These 5 Foods Could Be the Culprit\r\n\r\nSushmita Sengupta | Updated: October 27, 2017 12:05 IST\r\nTweeter\r\nfacebook\r\nGoogle Plus\r\nReddit\r\nStruggling with Bad Breath? These 5 Foods Could Be the Culprit\r\nHighlights\r\n\r\n Some foods can taint your breath for much long after you have had them\r\n This is often caused due to halitosis\r\n The bacteria that resides in your mouth feasts on the food particles\r\n\r\nPicture this. You have to meet someone important and also quickly tuck in your lunch. You eat whatever is available and show up just in time, except that your breath gives away your lunch menu! Now, that’s not the kind of conversation starter you were looking for. While daily activities like brushing your teeth twice, rinsing your mouth after a meal and flossing regularly are integral to good oral hygiene, sometimes bad breath could be linked to your diet and the last meal you took. Some foods can taint your breath for much long after you have had them. This is often caused due to halitosis. So the bacteria that resides in your mouth feasts on the food particles and dead cells which causes bad breath. \r\n\r\nHere are some foods that could be resulting in that foul smelling breath. \r\n\r\n1. Garlic\r\n\r\nDespite Garlic’s many health benefits, this doesn’t come as a surprise. Garlic has a long-standing reputation for causing bad breath and you have to blame its high sulphuric content, that lingers in the mouth for long, for the foul smell it leaves in its wake. The smelly sulphur is further absorbed in the bloodstream (while digestion), which makes inroads to your lungs, and is expelled as you exhale.\r\n \r\ngarlic\r\n\r\ngarlic has a long-standing reputation for causing bad breath\r\n\r\n2. Onions\r\n\r\nJust like garlic, the odour of onions stay long after you are done eating them. The sulphuric compounds present in the onion get absorbed into your bloodstream and gives out its traces as you exhale. If possible, floss and rinse your mouth thoroughly after you have had onions to get rid of the bad breath. \r\n \r\nonion 620\r\nonions\r\n\r\n3. Coffee\r\n\r\nCan’t live without coffee? You might want to hear this out. Coffee is a natural dehydrator; and excess of it can leave you with a parched mouth which creates a favorable environment for the growth of oral bacteria. The dehydrating effect of coffee reduces the flow of saliva, which hinders the washing down of these oral bacteria. These bacteria then linger in your mouth for long and cause bad breath. Drinking water after short spurts of time can help wash down these bacteria and cut down the foul smell significantly. \r\n\r\n4. Tuna\r\n\r\n Fish, especially the protein packed Tuna, have long been associated with bad breath. Seafood starts smelling sour and foul with time as it reacts with the acid present in the mouth. You can pop a mint gum or tablet right after your meal or slash some vinegar on the fish before digging in, this prevents the oxidized odour. \r\n\r\n5. Dairy\r\n\r\nA tall glass of milk may do wonders for your body and overall health but excess of it may leave you with bad oral odour. The naturally occurring bacteria around the tongue feed on the amino acids found in milk and cheese, which can result in a foul smell from the mouth. But that doesn’t mean you toss milk or other dairy from your diet completely. Follow it up with a glass or two of water and your breath is back to smelling fine. \r\n\r\nYou need not eliminate these foods from your diet, with a little moderation and a little caution you can avoid bad breath. Rinsing your mouth after every meal is an age-old advise that we must practice throughout our lives. Brushing your teeth twice a day and flossing once to remove all possible remnants of the meal can ensure that you are never left in an embarrassing position. Drinking water regularly also helps keeping the oral bacteria at bay. \r\n', 'images/food2.jpg'),
(33, '5 Herbal Teas to Calm Your Mind and Relieve Stress', 'food', 'We can already feel a slight nip in the air and when the breeze becomes chilly – all we can think of is to curl up with a hot cup of tea. A perfect cup of tea can stimulate your senses and energize you from within. While yoga and meditation are known as effective ways to calm you mind and relive stress, some of the simplest pleasures in life may also have the same positive impact such as listening to music or sipping some soothing tea. Herbal teas not only relax your mind but also help you sleep peacefully.\r\n\r\nAccording to Dr. <NAME>, a Bangalore-based Nutritionist, “Herbal teas are very relaxing for mind as they contain essential oils that are known to cool down the nerve. Conventionally, 3 tablespoon of the fresh herbs or 1 tablespoon of dried herbs steeped in a cup of water for about 5 to 10 minutes should be enough.”\r\n\r\nWhat makes herbal teas so relaxing?\r\n\r\nCertain herbal teas may have an immediate effect in reducing anxiety. They are exposed to minimum oxidation during the processing of freshly plucked leaves of the tea plant, and they are known to have some magical properties that help in relaxing your body and mind. The key ingredient in herbal tea that leads to a state of physical and mental relaxation is a chemical known as L-theanine which helps in reducing stress, improves the quality the sleep, diminishes the symptoms of premenstrual syndrome, heightens mental activity and reduces the negative side-effects of caffeine. Here are five herbal teas that will be your best companions during gloomy winter days.\r\n\r\n1. Chamomile Tea\r\nDelicate chamomile flowers are infused in hot water to make this tea that is known to help with stress relief and provides a good night’s sleep. You may use fresh or dried chamomile flowers to make this tea. Chamomile has a very soothing effect with mildly sedative properties that help you switch off on a hectic day.\r\n\r\n2. Peppermint Tea\r\nAromatic peppermint tea is known to be a great remedy for stomach problems like indigestion and even cold and flu. People often sip on peppermint tea after dinner to calm down the digestive system which helps you sleep better.\r\n\r\n3. Kahwa\r\nKahwa is a traditional beverage which is made with a mix of Kashmiri green tea leaves, whole spices, nuts and saffron. It is rich in antioxidants, helps you feel relaxed and reduces anxiety levels. It also helps to fight the negative effects of stress induced toxins in the body. It has a rich flavour and aroma.\r\n\r\n4. Sage Tea\r\nSage herb is known to be an excellent muscle relaxer. Sage is a wonderful remedy to rely on when you’re suffering from mental exhaustion and body ache. It makes for an enjoyable drink.\r\n\r\n5. Rose Tea\r\nThe sweet smell of roses is enough to beat stress and relax your mind. You can use fresh or dried rose petals and let them steep in water till they turn dark. Sip on it before going to bed. It has a calming effect on your mind which will help you sleep better.', 'images/food3.jpg'),
(34, 'The Flexitarian Diet: Finally a Diet That Isn\'t About Resisting', 'food', 'Before we go into the details of this new diet trend, let me be clear that this one isn\'t about miraculously losing weight or cleansing your system from within. The Flexitarian Diet is more about making a conscious decision to move away from a meat-heavy diet and embrace eating habits that include more of whole grains, vegetables, fruits, legumes and lentils. With a growing body of medical evidence swinging in the favour of a vegetarian diet, the Flexitarian Diet allows one to have the best of both worlds. Practitioners of this diet gradually make a shift away from a diet rich in meats and other animal produce and include more of vegetarian and plant-based ingredients.\r\n\r\n\r\nUndeniably, our contemporary diets are loaded with simple carbohydrates, refined and processed items and animal products. Fruits, veggies, legumes, beans and lentils are fast disappearing from an average Indian plate - this aptly points at the growing incident of rampant nutrient deficiencies like protein, iron and vitamin D among others.\r\n\r\nSimply put, the term \'flexitarian\' stands for a diet of a person who is flexible in his/her dietary approach. Remember, the diet does not aim to turn you into a vegetarian but to gradually reduce your dependence on animal products and make you consume more plant-based foods.\r\n\r\n\r\nHow to practice Flexitarianism\r\n\r\n\r\nRule #1 - Make it a point to include more veggies in your diet. Load up on whole grains, legumes, beans, lentils.\r\n\r\n\r\nRule #2 - Start cutting down on meat simultaneously; if you are used to consuming meat or animal products in most of your meals, go meatless completely during lunch or dinner. Gradually observe meatless days if you like.\r\n\r\n\r\nRule #3 - Consume less of red meat; processed meats should be avoided completely.\r\n\r\n\r\nRule #4 - Create a diet plan that is sustainable, eco-friendly, long-lasting - the one that promotes good health without having you to compromise on your dietary preferences.\r\n\r\nFlexitarianism is for those who want to take a step to adopt a healthier diet. It is specifically addressed to those who are mindful of the growing amount of meat and animal products in their daily diets and the associated threats to human health.\r\n\r\n\r\n\"Flexitarian is the combination of two words: Flexible + Vegetarian. It is a new way to eat that minimises meat without excluding it altogether. You get the health benefits of a vegetarian diet without having to follow the strict rules,\" writes <NAME>, an American registered dietitian and the author of \'The Flexitarian Diet\'.\r\n\r\n\r\nBlatner describes her approach divided into three levels mentioned below:\r\n\r\n\r\nBeginner: 2 meatless days per week (26 ounces/730gms of meat or poultry per week)\r\n\r\n\r\nAdvanced: 3-4 meatless days per week (18 ounces/510 gms of meat or poultry per week)\r\n\r\n\r\nExpert: 5 meatless days per week (9 ounces/255gms of meat or poultry per week)\r\n\r\n\"I\'d been a vegetarian for over 10 years but ate meat on rare occasions. Every time I ate meat I felt like I was being a bad, lazy vegetarian. So I developed this style of eating for people who know that vegetarianism is one of the healthiest and smartest ways to eat, but don\'t want to sit in the corner at a BBQ with an empty bun. The diet does not take foods away but instead adds new foods to those you already eat,\" she mentions on her official website.\r\n\r\n\r\nHealth experts, fitness enthusiasts, dieticians and nutritionists have their own take on the diet. While one approach would allow you to include meat in any one meal of the day, another would have you aim at going totally meatless twice a week, gradually taking it to not consuming meat on five out of seven days a week. The only thumb rule of the diet is to avoid as much of processed and red meat as possible and consume more of plant-based items than you did earlier.\r\n\r\nHere, animal products refer to non-vegetarian items and not dairy.', 'images/food4.jpg');
INSERT INTO `news` (`id`, `headlines`, `category`, `newstext`, `image`) VALUES
(35, 'Genetically boosting the nutritional value of corn could benefit millions', 'food', 'Rutgers scientists have found an efficient way to enhance the nutritional value of corn -- the world\'s largest commodity crop -- by inserting a bacterial gene that causes it to produce a key nutrient called methionine, according to a new study.\r\n\r\nThe Rutgers University-New Brunswick discovery could benefit millions of people in developing countries, such as in South America and Africa, who depend on corn as a staple. It could also significantly reduce worldwide animal feed costs.\r\n\r\n\"We improved the nutritional value of corn, the largest commodity crop grown on Earth,\" said <NAME>, study co-author and professor in the Department of Plant Biology in the School of Environmental and Biological Sciences. \"Most corn is used for animal feed, but it lacks methionine -- a key amino acid -- and we found an effective way to add it.\"\r\n\r\nThe study, led by <NAME>, a doctoral student at the Waksman Institute of Microbiology, was published online today in the Proceedings of the National Academy of Sciences.\r\n\r\nMethionine, found in meat, is one of the nine essential amino acids that humans get from food, according to the National Center for Biotechnology Information. It is needed for growth and tissue repair, improves the tone and flexibility of skin and hair, and strengthens nails. The sulfur in methionine protects cells from pollutants, slows cell aging and is essential for absorbing selenium and zinc.\r\n\r\nEvery year, synthetic methionine worth several billion dollars is added to field corn seed, which lacks the substance in nature, said study senior author <NAME>, a professor who directs the Waksman Institute of Microbiology. The other co-author is <NAME> of the Rutgers Department of Plant Biology and Sichuan Academy of Agricultural Sciences in China.\r\n\r\n\"It is a costly, energy-consuming process,\" said Messing, whose lab collaborated with Leustek\'s lab for this study. \"Methionine is added because animals won\'t grow without it. In many developing countries where corn is a staple, methionine is also important for people, especially children. It\'s vital nutrition, like a vitamin.\"\r\n\r\nChicken feed is usually prepared as a corn-soybean mixture, and methionine is the sole essential sulfur-containing amino acid that\'s missing, the study says.\r\n\r\nThe Rutgers scientists inserted an E. coli bacterial gene into the corn plant\'s genome and grew several generations of corn. The E. coli enzyme -- 3?-phosphoadenosine-5?-phosphosulfate reductase (EcPAPR) -- spurred methionine production in just the plant\'s leaves instead of the entire plant to avoid the accumulation of toxic byproducts, Leustek said. As a result, methionine in corn kernels increased by 57 percent, the study says.\r\n\r\nThen the scientists conducted a chicken feeding trial at Rutgers and showed that the genetically engineered corn was nutritious for them, Messing said.\r\n\r\n\"To our surprise, one important outcome was that corn plant growth was not affected,\" he said.\r\n\r\nIn the developed world, including the U.S., meat proteins generally have lots of methionine, Leustek said. But in the developing world, subsistence farmers grow corn for their family\'s consumption.\r\n\r\n\"Our study shows that they wouldn\'t have to purchase methionine supplements or expensive foods that have higher methionine,\" he said.', 'images/food5.jpg'),
(36, 'Nintendo Switch Eshop Adds Eight New Games This Week', 'gaming', 'A new batch of games is coming to the Nintendo Switch Eshop. Seven more titles arrive to the digital service today, many of which are definitely worth a look for those anxious to buy something new for their Switch.\r\nOne of today\'s new releases is Yono and the Celestial Elephants, an adorable isometric puzzle-adventure game. Players must help the titular elephant Yono navigate through three dungeons, using his trunk to spray water, shoot flames, and more in order to solve puzzles. The game also features four towns full of NPCs and sidequests, as well as a variety of treasures to find. Yono and the Celestial Elephants runs for $15/£13.\r\nYou can find the full list of this week\'s Switch releases below, but some other notable ones from today include the latest ACA Neo Geo game, The King of Fighters \'95 ($8/£6.29), the wilderness survival game The Flame in the Flood: Complete Edition ($15/£15), the top-down shooter Neon Chrome ($15/£13), and chaotic platformer 88 Heroes: 98 Heroes Edition ($30/£30). Those join the bullet-hell brawler Touhou Kobuto V: Burst Battle and the retro-style platformer Tiny Barbarian DX, both of which were released earlier this week in stores and in the Eshop. Finally, a free demo for Oceanhorn is also now available to download.', 'images/gam1.jpg'),
(37, 'Middle-earth: Shadow Of War Graphics Settings Guide And PC Performance Tips', 'gaming', 'Middle-earth: Shadow of Mordor was a marquee game for benchmarking PCs back in 2014 with its expansive environments and chaotic action sequences. The recently released sequel, Shadow of War, follows suit, and we figured this new adventure into Mordor is ripe for a quick graphics settings guide with some performance tips. It\'s an open-world action game, so twitch reactions and precision aiming aren\'t really part of the equation. It\'s not exactly necessary to maintain 60+ frames-per-second (FPS), but of course you want a smooth experience with as much eye candy as possible. Shadow of War\'s System Requirements The game uses Monolith\'s own Firebird graphics engine (formerly known as LithTech), and despite having large, detailed environments, the system requirements aren\'t too demanding. However, for a more optimal experience on PC, the recommended specs provide more than enough juice as you\'ll see in our results. Minimum requirements: CPU: Intel Core i5-2300 / AMD FX-4350 GPU: Nvidia GTX 660 / AMD HD 7870 Memory: 6 GB RAM Disk Space: 70 GB Recommended: CPU: Intel Core i7-3770 / AMD FX-8350 GPU: Nvidia GTX 970 or 1060 / AMD RX 480 or 580 Memory: 12 GB RAM For the purposes of our tests, we\'re using a mid-range system that closely represents the recommended specs for the game. Our PC includes an Intel Core i5-3570K CPU, MSI GTX 970 GPU, and 8GB of RAM. A Look At Our Graphics Options Let\'s take a quick look at our options. We\'re sticking with 1080p for our resolution, but there are more than enough choices here, even allowing you to try 8K (7680x4320). V-Sync helps prevent screen tearing, although we prefer to keep it off. Dynamic resolution helps maintain consistent performance by adapting resolution in real time to how demanding the game gets; you can set the floor for how low the resolution goes. While Shadow Of War has six graphical quality presets, we\'re going custom here. Lighting, Shadows, Mesh qualities are all set to High. Texture quality is also set to High since Ultra is specifically for the 4K texture pack and requires a video card with at least 8GB of video memory. Tessellation adds more three-dimensional detail to surfaces based on mapping data; we kept this on for more visual flair. Depth of Field is an effect that blurs areas that aren\'t at the focus of the player, and you should set this to your preference. The game doesn\'t specify what type of ambient occlusion techniques it uses outright, but we found Medium to be a good balance between performance and visual quality with our specs. For anti-aliasing, we used TAA (temporal anti-aliasing). It\'s an increasingly popular technique to get rid of jaggies, since it hits a nice balance of quality and performance. You\'ll definitely want this on over FXAA (fast approximate anti-aliasing), which tends to look too blurry. Texture filtering should be set to Ultra; this basically means anisotropic filtering is set to 16x. Shadow of War does a great job of showing you what\'s going behind these graphics settings. Not only does the game explain what each setting does, but it gives you a breakdown of how the settings affect system memory and VRAM consumption. It even provides you with a neat little benchmark tool to get specific frame-time readings and FPS results through a 60-second fly by of an in-engine sequence, which is how we tested our systems. Running On Recommended Specs With our modest system close to the recommended specs and aforementioned choices in graphics settings, the benchmark results showed an average of 71 FPS. It hit a minimum of 41 FPS but just for a brief moment it got as high as 96 FPS. For the most part, the live FPS readings were consistently between the mid-60s to mid-70s. This gives you a little wiggle room if you want to bump a few other options up a not<NAME> There were slight hitches during normal gameplay, but they were few and far between and inconsequential to the game\'s action in our experience. Visually, the game looks a little flat overall, but the PC version of Middle-earth: Shadow of War runs exceptionally well, even on modest hardware. But we were also reminded that 60 FPS at 4K resolution with the highest visual quality in modern games is still tough to attain unless you\'re willing the shell out the big bucks for the best video card available.', 'images/3301667-sowbenchmark.jpg'),
(38, 'Original Xbox games are still coming to Xbox One this year', 'gaming', 'Of all the current generation consoles on the market right now, Microsoft’s Xbox One is by far the most impressive when it comes to its commitment to backwards compatibility. \r\nAt the moment there’s an extensive list of Xbox 360 games that can be played on the Xbox One and while that’s continuing to grow, Microsoft announced plans to add original Xbox games into the mix at E3 earlier this year. \r\nMicrosoft hasn’t been forthcoming with details on exactly which original Xbox titles will be coming to Xbox One – at the moment we only know about Crimson Skies and Fuzion Frenzy. However, in a recent interview with GameSpot, Xbox head <NAME> did say we’d see the first of the batch released before the end of the year. \r\nThrowback\r\nWhen asked about the status of the backwards compatibility project by GameSpot, Spencer stated “We\'re close, we\'re really close.” \r\n“I have a little dashboard I go to and I can see all the games [and] where they are in getting approvals in the pipeline,” he continued. \r\n“I know the games that are coming for the original Xbox but I don\'t think we\'ve announced them all. We have to do this in partnership with partners, but we\'re still on track. I feel really good. The games look great.”\r\nBackwards compatibility on the Xbox One X will, apparently, work slightly differently to the Xbox One S. According to Spencer, Xbox has still to reveal some “interesting” details on how the feature will work on the upcoming 4K console but seems fairly certain that people will find it “interesting.”\r\nThere’s plenty of interest in original Xbox games coming to the latest consoles and although Spencer says that some of the games hold up better than others, we imagine the memories and nostalgia will more than make up for anything lacking in the visuals. \r\nThough we still don’t have an exact date for when this backwards compatibility extension will go live, we imagine Microsoft will wait until after the launch of the Xbox One X on November 7. Some time between this new console launch and Christmas would, arguably, make the most sense for the company. \r\nWe imagine original Xbox games coming to the Xbox One would tie in very neatly with the release of the revamped Duke controller which was also announced at E3 this year. Though this controller doesn’t have an exact release date, either, it’s also scheduled for before the end of 2017.', 'images/gam3.jpg'),
(39, 'PS3 Games Look Stunning in 4K Using Latest RPCS3 Emulator', 'gaming', 'PS3 games have never looked this good and never could on original hardware. 4K output is just the beginning, the RPCS3 emulator supports up to 10K!\r\nEmulators offer gamers the opportunity to experience old games well beyond the lifetime of the hardware they originally ran on. But with the move to HD and now 4K visuals, old games can be made to look even better than the original. We\'ve seen this with the HD upscaling included on the NES and SNES Classic, and now PlayStation 3 emulator RPCS3 has added support for up to 10K visuals.10K is still out of reach of, well, everyone for now, but the emulator update means playing games from the 11-year-old system\'s library can now be done in 4K with 16x anisotropic filtering enabled. That sounds great, but the results have to be seen to be believed. Luckily, RPCS3 took the time to create the video included below to demonstrate just how great PS3 games can look.\r\nThe majority of PS3 titles use a resolution of 1280-by-720, although some did managed 1920-by-1080. RPCS3 uses resolution scaling to increase the output with the theoretical maximum right now being 10K. However, more realistically the emulator will happily output at true 4K (3840-by-2160) by using a resolution scale of 300 percent on a 1280-by-720 game.\r\nOf course, to use RPCS3 with such high resolutions requires a good spec PC. The RPCS3 team state a dedicated graphics card with Vulkan support is all that\'s needed as most of the workload for the emulator is carried out by the CPU. The graphics card is untapped, and so it can be used for this 4K upscaling.\r\nThere is still a lot of work to be done to make RPCS3 a true alternative to PS3 hardware. Right now only 15 percent of PS3 games are marked as playable on the Compatibility List. But 15 percent of 1,438 games is still a lot of games to play while you wait for more to gain support.', 'images/gam4.png'),
(40, 'Assassins Creed returns for 10th anniversary with new Origins game', 'gaming', 'In 2007, the \"Assassin\'s Creed\" video game was released for PS3 and Xbox 360. Players discovered a game combining action, adventure and undercover infiltration, in a context drawing on science fiction and history. The original \"Assassin\'s Creed\" took gamers to the Middle East during the age of the Third Crusade, stepping into the role of Altair, a member of the Assassin Brotherhood fighting against the Templars.\r\n\r\n\"Assassin\'s Creed\" proved an immediate hit. More than 10 million players snapped up the game, which would be the first in a long series of editions. Ten years down the line, the \"Assassin\'s Creed\" franchise has taken gamers to the four corners of the Earth and to various historical eras (the French Revolution, Renaissance Italy, Victorian England, etc.), selling some 100 million games.\r\n\r\nBack to beginnings\r\n\r\nIn recent years, the saga has been running out of steam. Gamers\' enthusiasm is no longer the same, and this has been felt in sales figures. In 2016 -- for the first time in its history -- the series took a break from releasing a new game, instead taking the time to reinvent.', 'images/gaming5.png'),
(41, 'Newton becomes Raghubir Yadav’s sixth movie selected for Oscars', 'movies', '“Newton” may be his sixth movie to be selected as India’s official entry to the Oscars, but veteran theatre-film actor <NAME> says awards are not his priority and doing good cinema has always been his focus. In a career spanning over three decades, Yadav has been a part of six films that were sent for the Oscars, including <NAME>’s Indo-Canadian film “Water”, <NAME>- directed “Rudaali”, <NAME>’s “Bandit Queen” and his latest film “Newton”. Two of his films, <NAME>’s “Salaam Bombay” and Aamir Khan-starrer “Lagaan”, made it to the final Oscars nominations. In an interview with PTI, Yadav says, “I have never thought about or calculated these things as my entire focus is on giving my best as an actor.\r\nI don’t pay attention on a film going for Oscars, I feel if the film is good then it will get the love and recognition it deserves. “I do my work with utmost honesty and even the films that I did – ‘Salaam Bombay’, ‘Water’, ‘Lagaan’ and ‘Newton’ – were made with honesty.” The actor says he is particular about his choice of characters and prefers doing films that he believes will leave an impact on the audience.\r\n“If the film is good then it will go anywhere, be it the Oscars or any other award. When the script is good, one gets an idea that it will do well in every which way, be it commercially or in terms of awards and international recognition. The sensibility of a director matters the most.” The actor says he disagrees with a notion that commercial films are low on content and indie films are always good. “It is a wrong perception that commercial films cannot be good. They can be good if made with good intent. The films that I acted in and got nominated for Oscars were never made with the intention of making them commercial.\r\n \r\n“But at the same time, there are big-budget films that have not done well because the story was not good. For independent cinema too, it is not easy as these films also need to have good story to become a hit.” Directed by <NAME>, “Newton” features <NAME> in the lead. It also stars <NAME>, <NAME> and <NAME>. The film released on September 22.', 'images/movie1.jpg'),
(42, 'Padmavati: <NAME>’s bloodied Maharawal Ratan Singh is perfect foil to Deepika’s queen', 'movies', '<NAME>’s first look from Padmavati is out and he plays a bloodied but unbent king. The Sanjay Leela Bhansali film also stars <NAME> and <NAME>. A week after <NAME> stunned one and all with her royal look from Padmavati, the makers of the Sanjay Leela Bhansali film have released the first look of <NAME>oor. Shahid plays Deepika’s onscreen husband, <NAME> in Padmavati and the king of Chittor.\r\nShahid flaunts a heavily bearded look in the poster with jewellery adding to his royal and intense look. What one can’t miss is the prominent battle scar and the look which says this king is in the midst of a battle. He may look bloodied but he is definitely unbowed. Sharing the posters, Deepika, Ranveer and Shahid wrote, “saahas, samarthya aur samman ka prateek”.\r\nEarlier, Shahid had revealed what went into making his character of the ‘Maharawal’ a reality, “When you are playing a king, you need to have a certain personality. At that time, the people used to not be very skinny and lean, so you need to have a manly personality. Basically for that, and to carry those outfits also, <NAME>ir (<NAME>) wanted me to be a little muscular and a little full. But I will be gaining weight in terms of muscle and not in terms of fat. This is because I am playing the character of a warrior. The Rajput kings had very strong personalities.”\r\n', 'images/movie2.jpg'),
(43, 'Aamir hosts screening of Secret Superstar for LK Advani; film gets standing ovation', 'movies', 'New Delhi: Bollywood superstar <NAME>, who has been on a multi-city promotional spree for \'Secret Superstar\', recently organised a special screening of the film for veteran Bharatiya Janata Party (BJP) leader L K Advani in Delhi.\r\nAdvani graced the event with his daughter and her friends, where he was warmly greeted by the actor.\r\n\'Secret Superstar,\' also starring <NAME>, received a standing ovation at the special screening.\r\nSeemingly, the film largely impacted Advani, as he was seen discussing the film at length with the \'Dangal\' star.\r\nProduced by <NAME>, <NAME> under the banner Aamir Khan Productions, Zee Studios, and Akash Chawla, \'Secret Superstar\' is written and directed by Advait Chandan.\r\nThe film is slated to release on October 19, 2017.\r\n', 'images/movie3.jpg'),
(44, '<NAME> flexes dramatic muscle for The Foreigner', 'movies', 'In The Foreigner, <NAME>, who plays a father seeking justice for the death of his daughter, lets his acting skills take centre stage. He is proud that those tears are real and not eye drops. After nearly four decades as an actor, producer, director, singer and, of course, martial artist and stuntman, <NAME> was finally awarded an honorary Oscar last November for his achievements in film.\r\nBut his best work may be yet to come.\r\nWith an eye on career longevity, the Hong Kong superstar is trying his hand at serious drama in Hollywood, though the action hasn\'t been left behind.\r\nHis new movie The Foreigner has received critical notice. Directed by <NAME> of the Bond movies Casino Royale and GoldenEye, it is currently showing here.\r\nThis is a 63-year-old\'s action movie, and Chan is not a superhero any more.\r\nInstead, he is a grieving father bent on taking revenge on a rogue cell of the Irish Republican Army (IRA) for the death of his daughter in a bomb blast in London.\r\nWHY DID YOU SIGN UP FOR THE FOREIGNER?\r\nI\'ve always wanted a change (but) it\'s so hard to get decent scripts.\r\nThey\'re always about secret police from China and Hong Kong. It doesn\'t work.\r\nAnd nobody sent me La La Land or those kinds of scripts.\r\nAnd finally, this one came. I\'ve tried singing and (voice work in animations) such as the Mandarin versions of Beauty And The Beast, Mulan, Kung Fu Panda and The Nut Job 2 and Jackie Chan Adventures.\r\nI want to be a multi-talented actor - I can do dubbing, drama, comedy. I can do so many different things.\r\nHOW DID YOU WORK ON THE DRAMATIC SCENES IN THE MOVIE?\r\nWhen I speak and the tears are coming down, those are real tears and not eye drops.\r\nIt\'s challenging for me, especially the English. And Pierce, he speaks English (that) I don\'t understand (laughs).\r\nIt\'s difficult. I have to concentrate with a dialogue coach, and I have to speak the English from my heart.\r\nWhen I go home and everybody sleeps, I have to practise my English and the dialogue, and I want to speak from the heart and not just like (in a monotone) \'You killed my family\'.\r\nActually, I think I did a pretty good job. The tears came down and the throat was tight.\r\nOF COURSE, THERE ARE FIGHT SCENES IN THE MOVIE TOO.\r\nQuan is not Superman. We had to take into account that he\'s an older gentleman and had to adjust the fight sequences.\r\nAt first, the small space made it difficult, but my team handled it.\r\nThey can handle anything. We had to focus more on military techniques and hand-to-hand combat.\r\nDO YOU HAVE A DREAM ROLE YOU WANT TO PLAY?\r\nI really want to be in a film where the whole movie is just drama, and not one punch.\r\nBut I am really scared the audience (may not) really like it. I am not there yet. Step by step, I\'ll let the audience know I am not an action star any more, I am an actor.\r\nSo I make New Police Story, Shinjuku Incident and now The Foreigner.\r\nBut between them, of course, I have Chinese Zodiac, Dragon Blade and Kung Fu Yoga.\r\nOf course, if a director hired me to do La La Land - Part 2, yes, I am going to do it (laughs).\r\nI am not a good singer, but I have a good voice.\r\nThis year, I have another new record coming out, a beautiful song and the lyrics are good... about friendship, my family, my son, the world.\r\nI hope we can translate (it) into English so everybody can understand the meaning.\r\nYOU ARE GOING TO MAKE RUSH HOUR 4 RIGHT?\r\nIt has meaning inside and I agreed to make it, otherwise it\'s just \'ha ha\'.\r\nI don\'t need those kinds of things any more. I need good movies that have meaning. That\'s what I want.\r\nAS SOMEONE WHO KEEPS SO YOUNG AND APPEARS SO HAPPY, DO YOU REALLY HAVE NOTHING TO WORRY ABOUT?\r\nThe only worry is that I cannot find a good script. In the old days, I worry about the box office. But these days, no more.\r\nYou cannot worry if this movie makes 100 or 200 million. And sometimes it\'s like gambling.\r\nYou just don\'t know if this movie is good or bad. I just know that every movie I make, I do the best I can till it\'s finished.\r\nNext year, we\'ll have Rush Hour 4, so I did The Foreigner.\r\nAnd then after Rush Hour 4, I can\'t do Rush Hour 5, I\'ve to change, maybe to another drama. I am already planning.\r\nSo I am just happy-go-lucky, treating people well, eating whatever I want, training more and if I want more ice cream, okay, 20 more minutes running (laughs).\r\nOne more steak? Okay, 100 yards. Then after that, I really am happy.\r\n', 'images/movie4.jpg'),
(45, 'When <NAME> and Lata Mangeshkar got together', 'movies', 'Veteran writer-lyricist <NAME> has been honoured with the Hridaynath Mangeshkar award. \r\n\r\nAkhtar received the honour at an event in Mumbai, which marked the 28th anniversary of Hridayesh Arts and the 80th birthday of veteran music composer Hridaynath Mangeshkar.\r\n\r\nAkhtar said he considered the award one of his highest honours as it comes from the Mangeshkar family.\r\n\r\n\"I received my first award for Zanjeer in this very hall. All those awards -- and I\'ve received many -- can be kept on one side. This one is the most special. To get an award from the Mangeshkar family is unbelievable, you can\'t think of India\'s music without them,\" he said.\r\n\r\nAkhtar, 72, recalled how Lata Mangeshkar played a pivotal role in his journey as a lyricist.\r\n\r\n\"<NAME>ahab came to my house, said he was making Silsila and I should write the songs... I refused, saying I write poetry only for myself and script writing is enough. But he insisted and made me write the lyrics,\" he said.\r\n\r\nAkhtar said he got to know it was Lata Mangeshkar who suggested his name to Chopra as the lyricist for Silsila after Chopra\'s frequent collaborator, <NAME>, passed away.\r\n\r\n\"She (Lata) said, \'My friend has heard Javed\'s ghazals. Since you have good relations with him, make him write.\' So Lata didi was the reason I started writing songs and my first song was sung by her and Kishoreda,\" he said.\r\n\r\nHridayesh Arts, in association with Jay Satya Charitable Trust, organised a music programme titled Amrut Hriday Swar Lata, presented by Annu Kapoor Films Pvt Ltd, to salute and celebrate 75 glorious years of Lata Mangeshkar.\r\n\r\nLata said she was fortunate to sing songs written by people like Akhtar and her favourite Javed Akhtar song is Ye kahan aa gaye hum from Silsila.\r\n\r\n\"Whenever I meet him, we laugh a lot. I felt very happy giving him the award... I\'ve completed 75 years in the industry but it\'s not a big deal. I sang for the first time when I was nine with my father. Then I started singing in films and the journey has been wonderful,\" she said.', 'images/movie5.jpg'),
(46, 'Niall Horan Announces Philippines Singapore & Japan Tour Dates', 'music', 'Niall Horan\'s Flicker World Tour just got even bigger. The \"Too Much to Ask\" singer announced a handful of new dates Thursday night (Oct. 26). \r\n\r\nIn 2018, he\'ll be heading to Manila on June 10, Singapore on June 12 and Tokyo from June 14-15.\r\n\r\nThe newly announced tour stops follow a short trek in New Zealand and Australia in early June 2018. From July through August, Horan will be performing throughout North America.\r\n\r\n', 'images/music1.jpg'),
(47, '<NAME> Joins <NAME> for \'<NAME>\'', 'music', 'Apple Music\'s premier web series <NAME>, a spinoff of the segment on The Late Late Show with <NAME>, has just released a teaser for its next antics-filled episode. While nearly all of the episodes have featured various comedians and actors shuttling around top-shelf pop stars, driving a high-profile guest such as <NAME> -- whose episode is set drop on Oct. 31 -- requires a sing-along heavyweight. Who better to host this very special episode than <NAME> himself?\r\n\r\nIn the clip, the two Jameses deadpan through a cop-drama skit and project their way through Usher\'s \"Yeah!\" and <NAME>\'s Flashdance theme, \"Maniac.\" Their singing styles are, shall we say, different from what we can hear, but it\'s enough to pique curiosity over how LeBron keeps up with Corden for the full ride.\r\n\r\nLeBron James\' episode of Carpool Karaoke drops on Apple Music on Oct. 31.', 'images/music2.jpg'),
(48, '<NAME> & Marshmello Earn New No. 1s on Dance Charts', 'music', '<NAME> prances to his first No. 1 on Billboard’s Dance/Mix Show Airplay chart (dated Nov. 4) with \"Strip That Down,\" featuring Quavo, who also scores his first leader (4-1). Previously, Payne had charted as high as No. 14 on his co-lead track with Zedd, \"Get Low.\"\r\n\r\nPayne is also the first One Direction member to top the radio-based chart, something the band never did: its signature hit, \"What Makes You Beautiful,\" rose to No. 13 in May 2012. A quick snapshot of how the singer’s other 1D mates have done reveals the following: <NAME> has two chart hits and one top 10 (\"This Town,\" No. 26 in January, and \"Slow Hands,\" No. 4 in October); former band member <NAME> has two top 10s (\"Pillowtalk,\" No. 9, 2016, and \"I Don’t Wanna Live Forever [Fifty Shades Darker],\" with <NAME>, No. 3, March 2017); Harry Styles hit the chart with \"Sign of the Times\" (No. 37 in June); and <NAME> (with <NAME>) traveled to the top 10 with \"Just Hold On\" (No. 5 in March).\r\n\r\nContinuing with Dance/Mix Show Airplay, P!nk parades 17-10 with \"What About Us.\" It’s her first top 10 in five years, since \"Blow Me (One Last Kiss)\" topped the chart on Oct. 27, 2012. Overall, P!nk has 13 chart hits, including seven top 10s and four No. 1s. Last week, \"What\" became P!nk’s third Dance Club Songs No. 1.\r\n\r\nDua Lipa leads Dance Club Songs for the third time, all in 2017, with \"New Rules\" (2-1). Only Rihanna has earned more No. 1s this year (five). Dua Lipa first topped the chart with \"Blow Your Mind (Mwah)\" on Jan. 14 and followed with \"Be the One\" on June 24. \"New\" was remixed by NoTech, Vicetone and Alison Wonderland, among others.\r\n\r\nMarshmello marches 4-1 on Dance/Electronic Digital Song Sales with \"Silence,\" featuring Khalid. Spurred by the Oct. 12 release of Illenium’s remix, download sales soared 188 percent, to 19,000, according to Nielsen Music. The track is the first No. 1 for both the masked DJ and the singer. Meanwhile, \"Silence\" stays at the top for an eighth week on Dance/Electronic Streaming Songs (14.1 million U.S. streams, up 2 percent), rises a spot on Hot Dance/Electronic Songs (3-2) and sails 10-6 on Dance Club Songs.\r\n\r\nPlus, Cheat Codes collect their highest debut and third top 10 on Hot Dance/Electronic Songs, starting at No. 9 with \"Feels Great,\" featuring Fetty Wap and CVBZ. The track, also the second top 10 for Fetty and the first for CVBZ, sold 7,000 digital units, also good for a No. 4 entry on Dance/Electronic Digital Song Sales. With 2.7 million domestic streams, \"Feels\" also finds its way onto Dance/Electronic Streaming Songs, at No. 25. On Hot Dance/Electronic Songs, Cheat Codes also continue to own another spot in the top 10, as \"No Promises,\" featuring Demi Lovato, slips to No. 3 after three weeks at its No. 2 peak.', 'images/music3.jpg'),
(49, '<NAME> Shares Slow-\'Burning\' Emotional New Song From \'The Thrill Of It All\'', 'music', 'On Thursday (Oct. 26), <NAME> shared a new ballad called \"Burning\" that he says is his favorite track off his upcoming album, The Thrill of It All.\r\n\r\n“It’s the most personal song I’ve ever written in my life,” he said during an appearance on BBC Radio. “I was going through a really tough time last year. I live in London, and I went through a breakup. And I dealt with the breakup in a bad way, and I was just going out way too much.”\r\n\r\nThe piano-driven torch song is about the aftermath of losing a lover. The minimalist production places the spotlight on Smith’s emotive vocals, expressing the longing of lyrics like, “I’ve been burning since you left.”\r\n\r\nSmith said that music is his therapy, but it took him six weeks to get to the studio after the breakup. \r\n\r\n“I let everything go in that song,” Smith said. “And that song to me is about fame as well and the responsibilities I felt and the pressure and my relationship with my voice and how I was a bit rebellious last year. … It’s about self-destruction, that song.” ', 'images/music4.jpg'),
(50, 'Music News: Southwest Airlines adds live concerts to in-flight amenities', 'music', 'Southwest Airlines has finalized an agreement with Warner Music Nashville that will expand the airline\'s series of pop-up in-air concerts. Southwest has been hosting in-air shows occasionally since 2011, and Billboard reports that the series \"has only grown in popularity over the past six years, as Southwest passengers hope that their flight will be one of the lucky ones to feature a sure-to-go-viral performance.\"\r\n\r\nTo celebrate the announcement, <NAME> played a show for passengers heading from Nashville to Philadelphia. Past performers on Southwest flights include Valerie June and the Strumbellas.', 'images/music5.jpg'),
(51, 'Gurdaspur Lok Sabha bypoll: Strong anti-SAD sentiments helped Congress win; it\'s premature to write off BJP', 'politics', 'Punjab Congress president and three-time MLA <NAME>, also a close confidant of Punjab chief minister <NAME> has won the Gurdaspur bypoll by 1.93 lakh votes. Polling for the election was necessitated by the demise of BJP leader and sitting MP, Khanna, who had represented Gurdaspur constituency in Lok Sabha earlier between 1998-2009 and 2014–2017.\r\nSingh, who had endorsed Jakhar\'s nomination for the party ticket, tweeted:\r\nUndoubtedly, it’s a big win for Congress, but it would be too early to write-off the prospects of BJP in the 2019 General Election to Lok Sabha as Opposition sees it. Especially since the party led by Prime Minister <NAME>i had registered a landslide victory in 2014 Lok Sabha elections by winning 282 seats for BJP.\r\nRiding high on Sunday’s victory, the opponents have to hold their horses till 2019 before jumping to any conclusion.\r\nLet’s not forget, Congress won the Gurdaspur seat only after the demise of Khanna who had defeated the then sitting MP and Punjab state Congress president <NAME> in 2014.\r\nAccording to the locals of Gurdaspur, the actor-turned-politician like his tall and robust personality had acted like a wall in protecting his constituency from the opponents. It was he who had cracked the Lok Sabha constituency Gurdaspur comprising nine Assembly segments — Pathankot, <NAME>, Qadian, Batala, <NAME>, <NAME>, Gurdaspur, Sujanpur and Bhoa — and once a Congress bastion, for BJP.\r\nDespite strong anti-Shiromani Akali Dal (SAD) and anti-Badal sentiments, Khanna had won the Gurdaspur seat. It was then anticipated that barring BJP, either Congress or Aam Aadmi Party (AAP) would win. AAP had fielded its former state president <NAME>, who had strong chances to win, but all poll predictions failed in front of Khanna’s glam factor and public image.\r\nThis correspondent had the opportunity to cover the 2014 Lok Sabha polls in Punjab and in one of Khanna’s rallies in Gurdaspur, the moment the veteran actor appeared to address the public, voters requested him to narrate the lines from his 1971 superhit film Mera Gaon, Mera Desh — \"<NAME> ne do baatein seekhi hain. Ek, mauke ka fayeda uthaana. Do, dushmano ko naash karna (Jabbar Singh has learnt two things in life. One, to take advantage of the situation. Two, to destroy enemies).\r\nAnd Khanna proved it during the polls by emerging a winner. It was his charismatic personality and the works he carried out in his constituency that went in favour of BJP. He was instrumental in building a dozen major and minor bridges on rivers Beas, Ravi and Ujh that connect Gurdaspur with the rest of Punjab and conducted medical camps to provide free heart surgeries for poor patients.\r\nThe loss of BJP in this bypoll has been more due to its ally SAD. During the previous Prakash Singh Badal regime, the drug menace grew exponentially in Gurdaspur, taking the form of a major social issue. The menace played an important role in turning the tide in favour of Congress, which saw Singh leading the party to power in the last Assembly polls.\r\nStrong anti-Badal sentiments, public anger against SAD especially in Gurdaspur due to the drug menace and absence of Khannas’s charisma have added to BJP’s loss in the bypoll.\r\n\"In Gurdaspur, we couldn’t think of anyone other than Khanna. In the 2014 General Election to Lok Sabha, besides his charisma, people voted him in large number as Modi was leading the election. We wanted both BJP under Modi and Khanna to win, and it happened. His absence has left a huge vacuum and it made it easier for Congress to win Gurdaspur seat. Moreover, now it’s Congress government in Punjab and people have lots of expectations from Singh,” <NAME>, a trader from Gurdaspur told Firstpost.\r\nPeople of Gurdaspur think that BJP needs a heavy-weight candidate, who can fill up Khanna’s vacuum in future. Even today, the voters of this constituency have strong memories of how the veteran Bollywood actor had got his public projects sanctioned from the then prime minister Atal Bihari Vajpayee and implemented them successfully.', 'images/politics1.jpg'),
(52, 'Vengara bypoll results: BJP’s dismal performance shows party\'s Hindutva politics has failed to impress Kerala', 'politics', 'Thiruvananthapuram: The Sunday verdict of the Vengara Assembly bypoll was most humiliating for BJP, which is on a mission to make inroads into deep south before the 2019 General Elections to Lok Sabha.\r\nMany senior cabinet ministers, chief ministers (from BJP-ruled states) and national leaders have taken part in padayatras (foot marches) with its state president <NAME> as part of the Janaraksha Yatra to save people (in Kerala) from “red and jihadi” terror. In fact, for the first time in an Assembly by-election in Kerala, BJP\'s top national and state leaders campaigned for party candidate K Janachandran Master expecting the roadshow to spin more votes, if not a sure win.\r\nBut despite a high-voltage campaign, Master could muster only 5,728 of the 122,623 votes polled, which was less than its tally of 7,015 in 2016 and 5,952 votes that the party had managed from this segment in the recent Malappuram Lok Sabha by-election.\r\nEven more humiliating was the fact that the Social Democratic Party (SDPI), which is taking lessons from the hardline Hindutva politics that the BJP practises in Kerala, went away with more votes (8,648) mainly eating into the votes of KNA Khader, the Congress-led United Democratic Front (UDF) candidate fielded by the Indian Union Muslim League (IUML).\r\nA missed opportunity?\r\nHindus constitute around 25 percent of the electorate of the Muslim-dominated constituency but they too appeared to have given a cold shoulder to BJP harping on the “jihadi terror”.\r\nIts \"development\" slogan also failed to enthuse voters at large hit hard by the demonetisation fiasco. There was an increase of 1,590 in total votes polled this time, and the youngsters too seem to have ignored the Hindutva bandwagon.\r\nMany feel that BJP’s communally charged campaign helped the ruling Communist Party of India (Marxist) in a big way to make inroads into the IUML vote bank, unleashing a communal campaign that Muslims would be safe only under its protection.\r\nEven some BJP supporters feel the party should stop Muslim bashing and instead engage with them constructively on issues like triple talaq and women empowerment and it should have fielded a non-Rashtriya Swayamsevak Sangh (RSS) candidate.\r\n\"I feel BJP committed a mistake in understanding the Muslim mind. The party could have highlighted issues like triple talaq which others fail to take up,\" said KVS Haridas, political commentator, and former editor of BJP mouthpiece in Malayalam, Janmabhoomi.\r\n\"BJP had got its traditional votes, more or less. But I feel it lost a great opportunity to field a Muslim woman candidate and make a difference from others. It should have been a real experiment for the party that is trying to expand its base in Kerala.\"\r\nHowever, Haridas feels that the BJP’s anti-red and jihadi terror blitzkrieg with regular protest marches simultaneously on the AKG Bhavan and the CPM headquarters in the national capital is more targeted at the cowbelt than Kerala.\r\nMuslims constitute 26.58 percent and Christians 18.33 percent in Kerala. People of all faiths live together in harmony in the state\'s villages and towns and has no history of communal riots.\r\n\"I have been telling the party time and again that you cannot go ahead without taking minorities into confidence in Kerala,\" he told Firstpost.\r\n\"I perceive this as a failure on the part of BJP. It has a lot of opportunities in Kerala joining hands with all democratic forces against the Communist tyranny, which is not allowing any political opponents function freely.\"\r\nThe electoral setback would not affect the ongoing statewide roadshow, said Haridas, adding that BJP national president <NAME> will join the marchers on Tuesday, when the show ends in the state capital, Thiruvananthapuram.\r\nShah had earlier skipped a show of strength in Kerala chief minister Pinarayi Vijayan\'s village where many have fallen victims to revenge killings between the two groups, and speculations were rife that the BJP chief was upset with the poor response that the Yatra evoked.\r\nIt\'s UDF vs LDF\r\n<NAME>, a voter who runs a furniture business in Vengara town, said both CPM and SDPI of the militant Popular Front of India (PFI) benefitted from the feeling of insecurity that the BJP campaign created among the Muslims.\r\nBoth parties used the alleged lynchings by cow vigilantes in northern parts of India to whip up passions and accused Congress and its allies of a soft-Hindutva approach while BJP leaders like Uttar Pradesh chief minister Yogi Adityanath, who also participated in the Janaraksha Yatra only strengthened the perception.\r\nThe warning of IUML candidate, a Communist Party of India (CPI) leader who switched sides some years ago, against the Communist dictatorship, came handy for CPM.\r\nIn the process, PP Basheer, the CPM candidate, cornered 41,917 votes, improving on his 2016 tally of 33,275, while Khader could bag only 65,227 votes, despite a sharp increase in the turnout, far below 73,804 votes his predecessor PK Kunhalikutty got.', 'images/politics2.jpg'),
(53, '<NAME> Quits Virbhadra Cabinet; Joins BJP Ahead of HP Assembly Polls', 'politics', 'Shimla: In a blow to the Congress ahead of Assembly polls, Himachal Pradesh Rural Development minister <NAME> today quit the Virbhadra Singh government and joined the BJP.\r\n\r\nSharma, son of former Union Communication Minister <NAME>, said, \"I have quit the Himachal cabinet and joined the BJP today\".\r\n\r\nSharma said he has been given a party ticket from Mandi.\r\n\"I have been given BJP ticket from Mandi and the party has informed me about this, he said.\r\n\r\nHimachal Pradesh is slated to go to polls on November 9 and the development comes as a blow for <NAME> who was declared the party\'s poll face last week.\r\n\r\nSharma alleged that he and his father were being sidelined and ignored in the Congress party.\r\n\r\nHe alleged that the AICC General Secretary had invited <NAME> to attend the rally of Rahul Gandhi in Mandi but when he reached the spot, he was asked not to attend the rally.\r\n\r\nIs <NAME> not a member of the Congress,\" he asked.\r\n\r\n\"I was not included in any of the committees for the assembly polls and when I asked about this from HPCC president, he said that my name was deleted at the higher level which hurt me and I decided to quit,\" he said.\r\n\r\nThe Mandi seat was represented by <NAME> from 1962 till November 1984, when he was elected to Lok Sabha and his prot g D.D.Thakur won the seat in 1985 while the BJP wrested the seat in 1990.\r\n\r\nIn the 1993 Assembly poll, his son <NAME> won from Mandi but after <NAME>\'s name surfaced in the Telecom scam, he was expelled from the Congress and formed Himachal Vikas Congress which entered into a post poll alliance with BJP and joined the government.\r\n\r\nWhile <NAME> won from Mandi, <NAME> was elected to the Rajya Sabha in 1998.\r\n\r\nIn the 2003 Assembly polls, <NAME> was the sole HVC member to win the election from Mandi but he joined the Congress ahead of the 2004 Lok Sabha polls.\r\n\r\n<NAME> again won from Mandi in 2007 and 2012 as a Congress candidate and is set to contest as a BJP candidate this time.', 'images/politics3.jpg'),
(54, 'Rahul Will Take Over as Congress President Soon Confirms <NAME>', 'politics', 'New Delhi: Congress President <NAME> has confirmed that her son <NAME> will take over as the next party chief soon.\r\n\r\n\"You (the media) have been asking me about Rahul (taking over the party) for a long time. It will be done soon,\" said Sonia, speaking on the sidelines of former president <NAME>\'s book launch in New Delhi.\r\n\r\nOn Friday, the Uttarakhand Congress has passed a resolution urging Rahul Gandhi to take over as party president. The Uttar Pradesh, Delhi and four other state units have also passed similar resolutions.\r\nRecently, the ball was set rolling for long-pending organisational polls which would also entail elections to the post of the President of the All India Congress Committee (AICC). The state Congress chiefs met in Delhi to finalise the election schedule.\r\n\r\nThe chances of Rahul finally taking over the reins of the party are high this time around. The build-up to his elevation has been slow and has been dragged for a while. That Son<NAME>hi doesn’t want to continue at the helm and wants Rahul to take over completely is a known fact. Over the past one year, it has been Rahul who has been calling the shots and taking major decisions.\r\n\r\nAs a part of the takeover strategy, Rahul has been the main face which Congress has been pitting against Prime Minister Narendra Modi in the last three years.\r\n\r\nSo, when Rahul was in the US recently, he attacked Modi for what he called his divisive politics and failed economics. And when senior ministers rushed in to defend the PM and attack Rahul, the Congress smiled as it saw in the retaliation an acknowledgement of the fact that Rahul was being seen as the main adversary to Modi.\r\n\r\nThe target-Modi strategy is also fraught with a huge risk as Congress is left with limited options for the next general elections.\r\n\r\n“Rahul vs Modi is an unequal fight, for it’s a fight between ‘democracy & tyranny’, between ‘devolution & usurpation of authority’, between ‘inclusive growth & crony capitalism’. And yes, Rahulji’s and Congress’s vision will win, for India must win for our values to be protected and preserved for posterity,” said Congress spokesperson <NAME>.\r\n\r\nOn the other hand, many Congress leaders like <NAME> have been of the view that dual power arrangement between Sonia and Rahul confuses party workers. The leadership issues, this section feels need to be sorted out to have clarity on power and command structure.\r\n\r\nRahul as party president will make one thing clear — that 2019 will be a Modi versus Rahul election.', 'images/politics4.jpg'),
(55, 'Uttar Pradesh Civic Polls 2017 Will be Held in Three Phases From Nov 22', 'politics', 'Lucknow: The Uttap Pradesh municipal elections will be held in three phases from November 22. \r\n\r\n\"24 districts will go to polls on November 22, 25 districts on November 26, and 26 districts on November 29,\" State Election Commissioner <NAME> said. Counting of votes will take place on December 1.\r\n\r\nHe said no central para-military force would be used for exercise, which will be conducted by the state police alone.\r\n\r\n\"Counting of votes polled for 16 nagar nigam, 118 nagar palika parishad and 438 nagar panchyat will be done December one,\" he said.\r\n\r\nAgarwal said 3.32 crore voters will be eligible to cast their ballots at 36,269 polling booths and 11,389 polling stations.\r\n\r\nGiving phase-wise details, he said the first phase will cover 24 districts in which 230 local bodies, spread over 4,095 wards, will got to polls.\r\n\r\nFor this phase, there will be 3,731 polling centres and 11,683 polling booths with total over 1.09 crore voters.\r\n\r\nThe second phase will cover 25 districts having 189 local bodies covering 3,601 wards.\r\n\r\nThe polls will be held at 13,776 polling booths to be set up for 1.29 crore voters, he said.\r\n\r\nIn the third and last phases, 26 districts will go to polls in which there are 233 local bodies spread over 4,299 wards.\r\n\r\nFor this phase, there will be 10,810 polling booths for over 94 lakh voters.\r\n\r\nThese polls will mark the first test for the Yogi Adityanath government which came to power in March, with the BJP getting a landslide victory.', 'images/politics5.jpg');
INSERT INTO `news` (`id`, `headlines`, `category`, `newstext`, `image`) VALUES
(56, 'Vaping as harmful as smoking regular cigarettes may cause inflammatory lung diseases', 'science', 'WASHINGTON: Vaping may not only be as harmful as smoking regular cigarettes, but can also trigger unique immune responses in lungs, causing deadly inflammatory diseases, a study warns.\r\n\r\nImmune responses are the biological reactions of cells and fluids to an outside substance the body does not recognise as its own. Such immune responses play roles in disease, including lung disease spurred on by cigarette use.\r\n\r\nThe study, published in the American Journal of Respiratory and Critical Care Medicine, looked at possible biomarkers of harm in the lungs and found that in some ways using e-cigarettes could be just as bad as smoking cigarettes.\r\n\r\nResearchers from University North Carolina (UNC) in the US compared sputum samples from 15 e-cigarette users, 14 current cigarette smokers and 15 non-smokers.\r\n\r\nThey found e-cigarette users uniquely exhibited significant increases in: Neutrophil granulocyte - and neutrophil-extracellular-trap (NET)-related proteins in their airways.\r\n\r\nAlthough neutrophils are important in fighting pathogens, left unchecked neutrophils can contribute to inflammatory lung diseases, such as Chronic Obstructive Pulmonary Disease (COPD) and cystic fibrosis, researchers said.\r\n\r\nE-cigarette users also showed significant increases in NETs outside the lung, researchers said.\r\n\r\nNETs are associated with cell death in the epithelial and endothelium, the tissues lining blood vessels and organs, researchers said.\r\n\r\nThe study also found that e-cigarettes produced some of the same negative consequences as cigarettes.\r\n\r\n\r\nBoth e-cigarette and cigarette users exhibited significant increases in biomarkers of oxidative stress and activation of innate defence mechanisms associated with lung disease.\r\n\r\n\r\n\"Our data shows that e-cigarettes have a signature of harm in the lung that is both similar to what we see in cigarette smokers and unique in other ways,\" said <NAME>, from the UNC School of Medicine.\r\n\r\n\r\n\"This research challenges the concept that switching to e-cigarettes is a healthier alternative,\" Kesimer said.\r\n', 'images/science1.png'),
(57, 'Isro to launch Cartosat 2 sat with 30 nano sats in mid-December', 'science', 'NEW DELHI: After the unsuccessful launch of navigation satellite IRNSS-1H, Indian Space Research Organisation (Isro) is gearing up to launch a remote sensing satellite of Cartosat-2 series along with 30 nano satellites of foreign countries in the second half of December.\r\n\r\nVikram Sarabhai Space Centre (VSSC) director Dr <NAME> said, \"Isro will be busy in launching a series of satellites from December onwards. We are targeting to launch Cartosat along with 30 nano satellites of foreign countries in the second half of December.\"\r\n\r\nHe said, \"The replacement satellite for IRNSS-1A (the first navigation satellite whose three atomic clocks, meant to provide precise locational data, had stopped working last year) will be launched soon thereafter. Both these launches will be from the first launchpad at Sriharikota as the second launchpad will be busy in launching three GSLV rockets, including the Chandrayaan-2 mission in March. \"If for any reason, Cartosat launch is delayed in December, it will also stall the launch of replacement satellite IRNSS-1I as both these launches have been planned from the first launchpad.\"', 'images/science2.png'),
(58, 'Einstein\'s theory of happy living emerges in Tokyo note', 'science', 'JERUSALEM: A note that <NAME> gave to a courier in Tokyo, briefly describing his theory on happy living, has surfaced after 95 years and is up for auction in Jerusalem.\r\n\r\nThe year was 1922, and the German-born physicist, most famous for his theory of relativity, was on a lecture tour in Japan.\r\n\r\nHe had recently been informed that he was to receive the Nobel Prize for physics, and his fame outside of scientific circles was growing.\r\n\r\nA Japanese courier arrived at the Imperial Hotel in Tokyo to deliver Einstein a message. The courier either refused to accept a tip, in line with local practice, or Einstein had no small change available.\r\n\r\nEither way, Einstein didn\'t want the messenger to leave empty-handed, so he wrote him two notes by hand in German, according to the seller, a relative of the messenger.\r\n\r\n\"Maybe if you\'re lucky those notes will become much more valuable than just a regular tip,\" Einstein told the messenger, according to the seller, a resident of the German city of Hamburg who wished to remain anonymous.\r\n\r\nOne note, on the stationary of the Imperial Hotel Tokyo, says that \"a quiet and modest life brings more joy than a pursuit of success bound with constant unrest.\"\r\n\r\nThe other, on a blank piece of paper, simply reads: \"where there\'s a will, there\'s a way.\"\r\n\r\nIt is impossible to determine if the notes were a reflection of Einstein\'s own musings on his growing fame, said <NAME>, the archivist in charge of the world\'s largest Einstein collection, at Jerusalem\'s Hebrew University.\r\n\r\nWhile the notes, previously unknown to researchers, hold no scientific value, they may shed light on the private thoughts of the great physicist whose name has become synonymous with genius, according to Grosz.\r\n\r\n\r\n\"What we\'re doing here is painting the portrait of Einstein -- the man, the scientist, his effect on the world -- through his writings,\" said Grosz.', 'images/science3.png'),
(59, 'Driverless cars may let you choose who survives a crash', 'science', 'LONDON: Scientists have developed a system that lets users of driverless cars take the moral decision of who should survive a potential carcrash.\r\n\r\nPrevious studies found that most people think a driverless car should be utilitarian, taking actions to minimise the amount of overall harm, which might mean sacrificing its own passengers in certain situations to save lives of pedestrians.\r\n\r\nHowever, while people agreed to this in principle, they also said they would never get in a car that was prepared to kill them.\r\n\r\n\"We wanted to explore what would happen if the control and the responsibility for a car\'s actions were given back to the driver,\" said <NAME> at the University of Bologna in Italy.\r\n\r\nResearchers designed a dial that switches a car\'s setting along a spectrum ranging from \"full altruist\" to \"full egoist\", with the middle setting being impartial.\r\n\r\nThe ethical knob would work not only for self-driving cars, but for all areas of industry that are becoming increasingly autonomous, the \'New Scientist\' reported.\r\n\r\n\r\n\"The dial will switch a driverless car\'s setting from full altruist to full egotist,\" Contissa said.\r\n\r\n\"The knob tells an autonomous car the value that the driver gives to his or her life relative to the lives of others,\" Contissa said.\r\n\r\n\r\nThe car would use this information to calculate the actions it will execute, taking into account the probability that the passengers or other parties suffer harm as a consequence of the car\'s decision, researchers said.', 'images/science4.png'),
(60, 'An interstellar asteroid might have just been spotted for the first time', 'science', 'Astronomers may have just spotted the first asteroid caught visiting the solar system from another star.\r\n\r\nThe Pan-STARRS 1 telescope in Hawaii discovered the object, dubbed A/2017 U1, on October 18. More observations from other telescopes around the world suggest the object’s trajectory is at an unusually steep angle to the plane on which all the planets lie, and it does not orbit the sun. A/2017 U1’s slingshot route suggests it is a recent visitor to the solar system — and is now on its way out again. The discovery was announced in a bulletin published October 25 by the International Astronomical Union’s Minor Planet Center. \r\n\r\nAll asteroids previously seen come from within the solar system and circle the sun. Even comets, which come from a distant reservoir of icy rocks in the solar system called the Oort cloud and can have highly titled orbits, still orbit the sun.\r\n\r\nAstronomers first pegged the object as a comet thanks to its elongated path, but additional telescope observations October 25 indicate it’s more likely that A/2017 U1 is an asteroid. Those observations revealed that the object looked like a single, sharp point of light, suggesting it is not a comet, which would have an extended icy halo. The asteroid is probably no more than 400 meters across and is zooming through the solar system at 25.5 kilometers per second.\r\n\r\nThe new data also supported the wacky trajectory, suggesting the object truly is a visitor from beyond. “It’s now looking very promising,” says planetary scientist Michele Bannister of Queen’s University Belfast in Northern Ireland, although she would still like to get more data to be sure. Astronomers are already planning to measure the colors in the asteroid’s reflected light to figure out what it’s made of, a clue to its origins.', 'images/science5.jpg'),
(61, 'Asia Cup Hockey 2017: India Thrash Pakistan 3-1 to Top Pool A', 'sports', 'New Delhi: India made it three out of three victories as they thrashed Pakistan 3-1 in their final Pool A clash at the Maulana Bhasani Hockey Stadium in Dhaka on Sunday. This is India\'s fifth successive win against their arch-rivals Pakistan in international hockey.\r\n\r\nFor the \'Men in Blue\', <NAME> (17th minute), <NAME> (44th minute) and <NAME> (45th minute) got on the score-sheet, while <NAME> (48th minute) scored the lone goal for Pakistan in the final quarter.\r\n\r\nIndia had already secured a place in the round-robin Super 4 stage of the tournament after their stunning wins in the first two matches of the competition — Japan (5-1) and hosts\r\nBangladesh (7-0). But with this comprehensive victory over their neighbours, they topped the Pool A with nine points. \r\n\r\nWhile as for Pakistan, they have also progressed into the next round, courtesy of having a better goal difference than Japan (both teams were locked at four points after three matches).\r\n\r\nThe first quarter was as cagey as possible with none of the teams getting even a single clear cut chance to make the breakthrough. However, in the last minute of the first quarter, Pakistan were awarded a penalty corner but they made a hash of it.\r\n\r\nIndia finally got the breakthrough in the second minute of the second quarter with Chiglensana scoring the first goal of the match. The 25-year-old was given acres of space inside the Pakistan circle and he finished emphatically.\r\n\r\nIndia goal-keeper <NAME> then came to the fore and made a couple of scintillating diving saves to keep India\'s lead intact at half-time.\r\n\r\nPakistan where down to nine-men early in the third quarter as Rizwan Senior and Mahmud were shown respective yellow cards for dangerous play. However, India failed to capitalise as Pakistan defended well.\r\n\r\nIndia finally doubled their lead in the 44th minute when Harmanpreet hit a fantastic cross from the middle of the pitch and Ramandeep dove full-length to guide the ball into the net. Then in the dying seconds of the third quarter, skip<NAME> drilled home the ball into the bottom right corner of from a penalty corner to triple India\'s advantage.\r\n\r\n<NAME> got a consolation goal for Pakistan in the fourth quarter but India held on to record another famous win over their fierce rivals.\r\n', 'images/sports1.jpg'),
(62, 'FIFA U-17 World Cup: Event\'s Turnout Has Pipped 2011 ICC WC Feels Ceppi', 'sports', 'Kolkata: FIFA Under-17 World Cup tournament director <NAME> on Sunday said the event has been more successful than the ICC World Cup 2011 in terms of spectators turnout, adding the \"doors are now open\" for India to get next edition\'s U-20 World Cup.\r\n\r\nTaking a 36-match cut-off after the end of group stage, Ceppi said the spectators mark has crossed a phenomenal 800,000, which is more than the 2011 Cricket World Cup, and double than what the last edition in Chile had witnessed. \"This was a make or break. If you\'re not able to deliver then the doors would have closed definitely. Now the doors remain open. How it\'s done in the future we need to see. Possibility will be there for Indian football,\" Ceppi said about India\'s bid for hosting the FIFA U-20 World Cup in 2019.\r\n\r\n\"At this point of time, we are looking at a record attendance here in India 2017. It\'s also over with the first 36 matches of the ICC World Cup 2011 which is usually considered here as the gold standard for a World Cup in terms of attendance,\" he added.\r\nThere has been a frenzy around the sport since the tournament kicked off. \"We feel that really football has taken over. That\'s the reality. People are coming here we have seen enthusiasm of people that we did not foresee. We had an average crowd of 49,000 for India matches. It\'s huge.\" Ceppi said there has been an unprecedented demand for tickets for the final from various state governments that speaks volumes of the success and it augurs well for India who have formally submitted a bid to host the next U-20 World Cup.\r\n\r\n\"The outcome of India hosting further high level football events is positive. People have realised now. You do not know how many calls I\'ve received from abroad from friends and football fans saying, \'it looks fantastic at least on TV\'. \"It shows that the amount of noise that people are making, the enthusiasm the quality of football has sent out a positive message.\"\r\n\r\n\"We needed to first focus on delivering this one. If we could not deliver this one then definitely the doors will be closed.\" The Salt Lake Stadium, which has a capacity of 66687, will host the final on October 28 and tickets have been sold out well in advance.\r\n\r\n\"For the final, even I don\'t have a ticket. The craze the final has generated is amazing. My phone has not stopped ringing, with requests from strange quarters that has nothing to do with the World Cup that they want passes for the final. And that\'s a great problem to have.\r\n\r\n\"We were told that we have not done enough marketing but what better marketing than having on an average getting 23000 people, having more people than the ICC Cricket World Cup 2011 at this stage?\" he asked.\r\n\r\n\"It feels like a senior World Cup to me in terms of enthusiasm, passion and sheer numbers. It\'s commendable,\" he summed up the mood. Apart from the six cities that are hosting the World Cup, India have infrastructure coming up in Ahmedabad, Bengaluru, Chennai, Bhubaneswar and Trivendrum and Ceppi said it would help in spreading out a global event like a World Cup.\r\n\r\n\"Should India bid to host other events, there would be options apart from the cities that has hosted. At the end of the day you would like the tournament to spread out. \"For the nation, if it wants to bid for an Under-20 World Cup or for other World Cups I feel the other facilities that are coming up in the country that would be in a good position to be the frontrunners.\" Head of coaching, player development and technical study group, <NAME>, summed up the mood. \"I would say it\'s easy to get a ticket of El Clasico than a final game of the U-17 World Cup in Kolkata at the moment.\"\r\n', 'images/sports4.jpg'),
(63, 'Swansea City’s record at Arsenal offers hope says <NAME>', 'sports', 'Swansea City can take heart from their past performances at Arsenal as they prepare to visit The Emirates Stadium on Saturday seeking to turn their season around, the club’s former Gunners goalkeeper <NAME> has said.\r\n\r\nSwansea have won on two of their last three Premier League visits to Arsenal, with Fabianski concentrating on keeping his emotions in check as he prepares to return to his old club.\r\n\r\n“We have done well at Arsenal in the past – the club have managed some good results at The Emirates and it’s always been a tricky game for Arsenal,” said the Poland keeper, who spent seven years with the London club before joining Swansea in 2014.\r\n\r\n“We’ve beaten them in the past so going into this game, we can take confidence from that.”\r\n\r\nSwansea’s last league trip to Arsenal ended in a 3-2 defeat but they beat Arsene Wenger’s side on their previous two visits.\r\n\r\n“Going back to The Emirates in the first season after I joined Swansea was special… but now I try to approach each game without putting too many emotions into it… it’s just about trying to get a result,” Fabianski added.\r\n\r\n<NAME>’s Swansea side have had a tough start to the season, sitting 15th with eight points after nine games. The Welsh club lost to Leicester City in their last game but Fabianski believes they can get back on track.\r\n\r\n“It has been a tricky start for us but hopefully we’ll start turning things around very soon. I don’t think there’s too much lacking – we are not that far away from getting to where we want to be.”', 'images/sports5.jpg'),
(64, 'India unlikely to play any \'four-day\' Tests in near future', 'sports', 'NEW DELHI: The ICC has decided to start with four-day Test matches on a trial basis but the Indian cricket team is unlikely to play the curtailed version of the longest format in near future.\r\n\r\nThe decision to introduce four-day Test was taken during recent ICC board meeting in Auckland with South Africa and Zimbabwe set to play the inaugural four-day \'Test\' on the \'Boxing Day\'.\r\n\r\nHowever BCCI wants to stick to traditional format as has been recommended by the Anil Kumble-led ICC Cricket Committee, which was against this experimental move.\r\n\r\n\"India will not play any four-day Test matches, atleast in the near future. Any Test match involving India will be a five-day affair,\" a senior BCCI official privy to developments said on conditions of anonymity.\r\n\r\n\"The BCCI believes that there is a lot of merit in Anil Kumble-led Cricket Committee\'s recommendations that duration should not be tinkered with. But since four-day Test matches are bi-partite agreements, if two nations are okay, they will go ahead with it,\" the official said.\r\n\r\nThe other reason for BCCI not warming up to four-day Test is because there are no points awarded for the proposed Test league. \"Only five-day Tests will have points that will be counted for the World Test Championship. What\'s the point in playing matches that won\'t count for anything. In any case, if we play Ireland or Afghanistan also, it will be five-day affairs,\" the official said.\r\n\r\nAsked if near future, the broadcasters start pressurising for curtailed Test matches, the official said: \"We will cross that bridge when it comes.\" \r\nIt is learnt that ICC\'s main aim towards promoting four-day Test is to ensure that Ireland and Afghanistan are eased into the system along with Zimbabwe being able to remain competitive.\r\n\r\n\r\n\"Let\'s be practical. For Ireland or Afghanistan, it will be very difficult that they can be competitive in a five-day format straightaway. If Test matches against these countries end inside three days or little over it, it is only logical that four-day Tests are tried out,\" an official of a member board said.', 'images/sports5.png'),
(65, 'PV Sindhu Kidambi Srikanth carry India\'s hopes at Denmark Open', 'sports', 'ODENSE: Title-contenders P V Sindhu and Kidambi Srikanth would look to put behind the disappointment of an early exit from Japan Open and make a positive start to their campaign at the $750,000 Denmark Open Super Series Premier, which begins here on Tuesday.\r\n\r\nRio Olympics and World Championship silver medallist Sindhu has been in rampaging form this season as she has already bagged two titles at the India Open and Korea Open respectively.\r\n\r\nAfter a gruelling week at Seoul last month, she couldn\'t sustain the intensity and suffered a second-round defeat against Japan\'s Nozomi Okuhara - an opponent she had some fierce battles recently - at the Japan Open at Tokyo.\r\n\r\nThe second seeded Indian, however, will be fresh after a three-week training and would look to make amends when she opens her campaign against World No. 10 China\'s Chen Yufei, a rival she had beaten in the World Championship in August.\r\n\r\nChinese seventh seed He Bingjiao is likely to stand in Sindhu\'s way to the semi-finals. The left-handed Chinese has a 5-4 record against Sindhu even though the Indian had beaten her at Korea Open.\r\n\r\nSlowly finding her foot back after battling her way through a career-threatening injury last year, Saina Nehwal will be looking for her first super series win in 16 months. She had won the Australia Open last year in June, 2016 before a knee injury derailed her Rio Olympics dream.\r\n\r\nThe World No. 12 bagged a bronze at the World Championship but she lost to Carolina Marin at the Japan Open in the second round and the Indian will be itching for a revenge when she faces the fifth seeded Spaniard in the opening round here.\r\n\r\nThe duo are locked 4-4 in head-to-head count but the last time Saina had beaten Marin was at the 2015 Dubai World Superseries Finals. The Indian has lost twice in straight games to Marin in the last two meetings and she would need a determined effort to get across the newly-crowned Japan Open champion.\r\n\r\nIn men\'s singles, Srikanth starts as hot favourite after his three back-to-back final appearances out of which he won two titles at Indonesia and Australia.\r\n\r\nThe World No. 8 had two creditable quarterfinal finishes at Glasgow World Championship and Japan Open and he would be looking for another title after he opens his campaign against a qualifier.\r\n\r\nIf Srikanth can cross the first two rounds, a familiar foe in World Champion and local favourite Viktor Axelsen might be waiting for him at the quarters.\r\n\r\nAmong other Indians in fray, B Sai Praneeth and <NAME> have showed that they are no pushovers after their good run this season.\r\n\r\nWhile Praneeth clinched his maiden Super Series title at Singapore beating Srikanth in the final, Prannoy bagged the US Open Grand Prix Gold title besides creating a flutter after dumping heavyweights Lee Chong Wei of Malaysia and China\'s Chen Long in Indonesia Open.\r\n\r\nPrannoy and Praneeth will look to put their best foot forward when they face Denmark\'s Emil Holst and Hans-Kristian Vittinghus respectively in the opening round.\r\n\r\nSameer Verma, who won the Syed Modi Grad Prix Gold, will take on a qualifier and is expected to clash with Axelsen in the second round.\r\n\r\nIndian men\'s doubles pair of <NAME> and <NAME>, <NAME> and <NAME> are also in the fray. ', 'images/sports6.png'),
(66, 'Radio telescopes help astronomers measure Milky Way', 'technology', 'A collection of radio telescopes that spans thousands of miles and is remotely operated from central New Mexico has measured a span of 66,000 light-years (one light-year is equal to 6 trillion miles) from Earth across the Milky Way’s center to a star-forming area near the edge of the other side of the galaxy. Astronomers say they hope to measure additional points around the galaxy to produce a map — the first of its kind — over the next decade.\r\n<NAME> of Germany’s Max-Planck Institute for Radio Astronomy said in a news release that using the Very Long Baseline Array, which is remotely operated near Socorro, allows astronomers to “accurately map the whole extent of our galaxy,” the Albuquerque Journal reported.\r\n<NAME>, a senior radio astronomer at the Harvard-Smithsonian Center for Astrophysics who worked on the project, said they hope to create the map by measuring additional points around the galaxy. So far, they have measured around 200. Reid said 100 or so observations must be done from the Earth’s southern hemisphere, so he will be traveling to Australia in the future to use telescopes there.\r\nAlthough the data for the 66,000 light-year measurement was collected in 2014 and 2015, the team has spent the time since then analyzing it, Reid said. “It’s not like you get a Hubble (Space Telescope) space image,” he said. While there are artistic renderings of what the Milky Way probably looks like, this effort will yield a highly accurate image, Reid said.\r\n', 'images/tech1.jpg'),
(67, 'A new technology promises to speed up slow Internet at home', 'technology', 'NEW YORK: A new technology promises to speed up slow Internet at home, say researchers, adding that the new hardware can enable speed up to 10,000 megabits-per-second (Mbps) or 10 gigabits-per-second (Gbps).\r\n\r\nFor a super-fast yet low-cost broadband connection at home in Britain, the new receiver technology can enable dedicated data rates at more than 10,000 Mbps from the current 36 Mbps, noted researchers from the University College London.\r\n\r\n\"Although 300 Mb/s may be available to some, average UK speeds are currently 36 Mb/s. By 2025, average speeds over 100 times faster will be required to meet increased demands for bandwidth-hungry applications such as ultra-high definition video, online gaming and the Internet of Things (IoT),\" explained lead researcher <NAME>.\r\n\r\n\"The future growth in the number of mobile devices, coupled with the promise of 5Gto enable new services via smart devices, means we are likely to experience bandwidth restrictions; our new optical receiver technology will help combat this problem,\" he added in a paper published in the journal Nature Communications.\r\n\r\nThe receiver is used in optical access networks - the links connecting Internet subscribers to their service providers.\r\n\r\nREAD MORE: Internet of Things: Wave of future is at home\r\n\r\nThe new receiver retains many of the advantages of coherent receivers but is simpler, cheaper and smaller - requiring just a quarter of the detectors used in conventional receivers.\r\n\r\nSimplification was achieved by adopting a coding technique to fibre access networks that was originally designed to prevent signal fading in wireless communications.\r\n\r\nThis approach has the additional cost-saving benefit of using the same optical fibre for both upstream and downstream data.\r\n\r\n\"This simple receiver offers users a dedicated wavelength, so user speeds stay constant no matter how many users are online at once. It can co-exist with the current network infrastructure,\" said Erkilinc.\r\n\r\nThe receiver was tested on a dark fibre network installed between Telehouse (east London), UCL (central London) and Powergate (west London).\r\n\r\nThe team successfully sent data over 37.6 km and 108 km to eight users who were able to download or upload at a speed of at least 10 Gbps.\r\n', 'images/tech2.jpg'),
(68, 'Tech companies have only 26per cent women in engineering roles: Survey', 'technology', ' The overall representation of women in the engineering workforce of IT firms is just 34 per cent, according to a survey.\r\n\"The average number of women (irrespective of their function) in tech companies, we found that the overall representation was 34 per cent,\" according to survey by Belong on the gender gap in the tech industry in India.\r\nBelong survey looked at all tech companies in the country and found that there is one woman engineer as against three men engineers, leading to the fact that the Indian technology industry has just 26 per cent women in engineering roles.\r\nThe Belong survey was done with ITES companies with over 50 employees and the data was collected from around three lakh women.\r\nThis reinforces the assumption that science, technology, engineering, and math (STEM) jobs attract less women, the survey added.\r\nAfter analysing the career trajectories of techies, who moved into managerial positions and data, the survey found that the transition of men on an average to managerial positions is usually after six years of experience while women move to these roles after eight years of experience.\r\nFurther, the survey has revealed that as many as 45 per cent of women move out of core engineering roles after close to eight years.\r\nAfter quitting engineering, these women mostly move to marketing, product management or consulting, it added.\r\nIt said, among the tech talent in India, there are more women in software testing roles (a less sought after skill) compared to core programming roles.\r\nThis is the case even though the absolute number of jobs in software testing are significantly less than programming, it added.\r\nBelong survey also revealed that for every 100 testing jobs, there were 34 women compared to 66 men.\r\nWhen it came to hardcore programming roles, the ratio changed to 25:75, it added.\r\nThe survey found that if 29 per cent women start working in a given year, the percentage drops to a dismal 7 per cent after 12 years.\r\nThe biggest drop-off in pure numbers is after the first five years, it said.\r\nOne of the major reasons for this is that women often take a break to start a family around this time in their lives, and many do not return to the workforce, it said.\r\nThere have been initiatives by many big companies to tap these lost talents and bring back these women, it said.\r\nFrom leadership development programmes and special incentives to refer women candidates, Indian IT companies are using innovative techniques to hire and retain tech talent of the opposite gender, it added. PTI SM RMT MKJ\r\n\r\n', 'images/tech3.jpg'),
(69, 'NEW DELHI: Russia\'s technology transfers to India in the defence sector have been without any strings attached', 'technology', 'His comments come at a time when leading defence manufacturers from across the globe are eyeing India\'s growing market by offering technology transfer and joint ventures for developing fighter jets, submarines and other military platforms. \r\n\r\n\"When it comes to technology transfer, Russia really offers everything they have from the heart without any strings attached,\" Deo said at an event to celebrate 70 years of diplomatic ties between India and Russia. \r\n\r\n In May, the government had unveiled the strategic partnership model under which select private firms will be roped in to build military platforms like submarines and fighter jets in India in partnership with foreign entities. \r\n\r\nNoting that there was scope for expansion of India\'s defence ties with Russia, Air Marshal Deo also said the relationship should be developed focusing more on commercial aspects. \r\n\r\n \"The time has come for the relationship to be more on a commercial basis. It can be a win-win situation for both Russia and India,\" he said. \r\n', 'images/tech4.jpg'),
(70, 'New details on Microsofts foldable tablet revealed\r\n', 'technology', 'NEW DELHI: Previous patent filings have already given us hints that Microsoft is indeed working on a foldable device. But Windows Central has unearthed some new information about the particular device.\r\nAccording to the report, the prototype device is being called as \'Andromeda\'. It is a foldable tablet of sorts that becomes \"pocketable\" when folded. It has been also mentioned that the device runs Windows 10 built with Windows Core OS along with CShell. Details on CShell are scarce at the moment. However, it might be playing an important role in the \'foldable\' aspect of the tablet.\r\nFurthermore, the foldable tablet could come with telephony abilities. This, along with the foldable design, is likely to pit it against large screen smartphones or phablets. However, the report says that the device is not meant to replace smartphones.', 'images/tech5.png'),
(71, 'India is now among fastest-growing medical tourism destinations', 'travel', 'Ayurveda, yoga and wellness industry in India set it apart from other medical tourism destinations in the world.\r\n\r\nEstimating that medical tourism in the country can grow to become a $9 billion industry by 2020, a government official on Thursday said India is among the \"fastest growing medical tourism destinations in Asia\".\r\n\"During the early days of medical tourism, the attention was always given to developed countries,\" said <NAME>, Secretary, Ministry of Commerce.\r\n\"It has now shifted to Asia, and India is among the fastest growing medical tourism destinations in Asia,\" she said, addressing the third edition of Advantage Healthcare India 2017 summit, being held here by Ficci.\r\n\r\n\r\nMedical tourism, wherein people travel outside their countries for medical treatment, is estimated to be a $3 billion-worth industry.\r\nAyurveda, yoga and wellness industry in India set it apart from other medical tourism destinations in the world, the official said.\r\n\"Ayurveda has managed to catch the attention of many countries, especially European countries. The government will continue to focus on global acceptance of Ayurveda on the lines of Chinese medicine,\" she said.\r\n<NAME>, Principal Secretary of Department of IT, Biotechnology and Tourism for Karnataka, said: \"Karnataka, with direct connectivity to world capitals, and 56 medical colleges, and 19 National Accreditation for Hospitals and Healthcare Providers (NABH) accredited hospitals, is soon going to come out with a medical and wellness tourism policy.\"\r\nAlso Read: Looks like you might finally get to use hygienic toilets in Indian trains\r\nIndia can be a $9 billion-worth medical tourism destination by 2020, Gupta said.\r\nAccording to a recent Ficci report, over 500,000 foreign patients seek treatment in India every year.\r\nThe international summit on medical tourism is being organised by Ficci, along with the Ministry of Commerce and Industry and its Services Export Promotion Council (SEPC).\r\nThe three-day summit has over 700 delegates taking part in it from over 50 countries like the US, Russia, Saudi Arabia and United Arab Emirates, among others.\r\nWatch: How Indians like to plan their holiday\r\n', 'images/travel1.jpg'),
(72, 'Indians are always on social media while vacationing reveals survey', 'travel', 'Indians top ahead of Thailand and Mexico when it comes to using social media while holidaying, says a survey conducted by Expedia.\r\nIndians love to be connected all the time, however, it also means that they do not disconnect from work much.\r\nIndians are globally most anxious on not being able to access WiFi or internet to check work e-mail (59 per cent). In fact they lead in showing a preference for an airline that offers in-flight WiFi (33 per cent).\r\nAds by ZINC\r\nHence, 14 per cent Indians are always working on a vacation, #1 globally, followed by the US (seven per cent) and Brazil (six per cent).\r\nAlso Read:Are we really craving experiences or have our vacations become just about pictures?\r\nSocial media is emerging as strong driving force in creating vacation happiness with Indians being number one in always taking selfies (22 per cent), posting photos on social media (22 per cent), \"checking in\" on social media (21 per cent) and connecting with others through social media (19 per cent), said the Expedia survey.\r\nThe survey included 15,363 respondents, across 17 countries (US, Canada, Mexico, Brazil, UK, France, Germany, Italy, Spain, Netherlands, Belgium, Australia, New Zealand, Japan, South Korea, India and Thailand)\r\nThe survey also highlighted that even though Indians are social media obsessed beach-goers who spend the majority of their time uploading pictures and video, 24 per cent of their compatriots find it very annoying, said the statement.\r\n\r\n', 'images/travel2.jpg'),
(73, 'For three years this guy has been walking from Estonia to Singapore living in people\'s houses', 'travel', 'You have heard of globetrotters before--from those who sold all their property to those who are traversing the world naked, all for the love of travel.\r\nWhile each may be exceptional in his or her own efforts, the way Meigo Mark is living his travel adventures is too good to be true.\r\nMark is a 27-year-old traveller from Estonia, who started his expedition with about Euros 8 (Rs 611.08) in his pocket and a tent to camp in, reported Her World Online. How could he even buy a flight ticket with that much money? Well, he didn\'t; he set out on his journey on foot.\r\nAds by ZINC\r\nMark had always nurtured his passion for travel, but it was in May, 2014, that he decided to embark on a new adventure--to walk around the world. And in these three years, he has walked all the way from Estonia to Singapore.\r\nWhat is it that motivated him to take up such a challenge?\r\nMark had heard about <NAME>, a Canadian TED Talk speaker and author, who spent 11 years to complete his feat. Besides, he had heard inspirational stories of other explorers like Sir <NAME> KBE, who single-handedly sailed around the world in the 1960s.\r\nAlso Read: This couple is travelling all over the world, but doing it naked\r\nSoon, Mark sold his house and started walking around the world. He walked 30-40 km on an average, followed by periods of rest that could span between a day and two weeks. To mark his route, he followed Google Maps and Maps.Me, to enjoy walking through peaceful neighbourhoods rather than busy highways. He crossed rivers and seas on boats, ferries, ships and airplanes, but stuck to walking when on land.\r\nHowever, Mark is no regular tourist, visiting famous attractions across destinations. He is a traveller, in the true sense of the term, who, for all these years, took to couchsurfing, not to save money, but to avail the opportunity to learn about people and their cultures, which included villages of Sikkim and Assam too.\r\n\r\nOn one hand, he slept with humble workers in their slum. On the other, he had lunch with mafia-type drug dealers, armed with guns.\r\n\"The longer I travel, the more optimistic I get about humans and our willingness to help each other when in need,\" Mark was quoted as saying by the website. \'\'Meeting so many different social groups, I\'ve found ways to see not just the differences but the similarities, which make us human and help us connect. We both see the same sun and moon. As a traveller, it\'s interesting to see what\'s different in terms of culture, food and language, but at the same time, I try to see the similarities,\'\' he added.\r\n\r\n', 'images/travel3.jpg'),
(74, 'From Goa to Greece Airbnb wants the travel-mad Indian millennial to ditch the hotel room', 'travel', 'From roping in Bollywood celebrities to partnerships with local state governments, Airbnb, the online marketplace for accommodation, is trying to get the Indian millennial hooked to its global community of travelers.\r\nThe California-based company is flexing its marketing muscles in Asia’s third-largest economy, where affluent and increasingly experimental Indians are travelling a lot more. This, even as it continues to add to its relatively small network of 24,000 listings in India.\r\nSo far, a million Indians have used the room-sharing and rental platform, both at home and abroad.\r\nNow, the company is stepping up efforts to get more Indians—those travelling overseas as well as those booking weekend trips to local destinations—to plan their travel using Airbnb. Edited excerpts from an interview with <NAME>, country manager, Airbnb India.\r\nYou’ve been more visible in India over the last two years, what cues are you getting from the market to step up efforts here?\r\nOur company is about nine years old, and a number of Indians started using the platform when they heard about it from friends back then.\r\n\r\n', 'images/travel4.jpg'),
(75, 'Singapore passport now the world\'s most powerful one with highest visa-free score', 'travel', 'The Passport Index has announced Singapore\'s passport as the most powerful passport in the world with the highest visa-free score.\r\n\r\nIt is the first time in the history that an Asian country has aced the highest place in the Passport Index. Singapore\'s passport has a visa-free score of 159.\r\nThe Singapore passport holders now have visa-free access to 173 countries around the world.\r\n\r\nEarlier, Germany and Sweden were at the top positions but Singapore reached the top after Paraguay altered its visa requirements for Singaporean passports.\r\nHow Passport Index ranks passports?\r\nThe passports are ranked by cross-border access and visa-free score.\r\n\r\nWhat is visa-free score?\r\n\r\nVisa-free indicates visa-free travel or visa on arrival travel.\r\n\r\nAll the top passports that are considered to be powerful are European but with Singapore topping the list, looks like a gateway for Asian countries has been opened. For this new development, passports of 193 United Nations member countries and six territories were considered.\r\n\r\nSince early 2017, the top position was shared with Singapore, which was steadily moving up the ranks.\r\n\r\nOther Asian passports in the top 20 include those of South Korea, Japan and Malaysia.\r\n\r\nUS passports, however, have fallen in the ranking since President <NAME> took office after Turkey and the Central African Republic revoked their visa-free status to the U.S. passport holders, recently.\r\n\r\nSingapore was also fourth this year in the Visa Restrictions Index, another ranking of travel freedom, which uses a different method of calculating how \"powerful\" a passport is.', 'images/travel5.jpg'),
(76, 'One week later firefighters gain ground on historic California fires', 'world', 'A week after a series of the most deadly, devastating fires in California history began roaring across a wide swath of rich wine country north of San Francisco, authorities say the worst may finally be over.\r\n\r\n“Conditions have drastically changed from just 24 hours ago, and that is definitely a very good sign,\" California Department of Forestry and Fire Protection spokesman <NAME> said Sunday. \"And it’s probably a sign we’ve turned a corner on these fires.\"\r\n\r\nBerlant said most of the fires are more than half contained. The toll, however, has been heavy: At least 40 dead, more than 5,000 homes, businesses and other buildings destroyed. About 75,000 residents who fled the fires remained away from their homes Sunday.\r\n\r\nBut there was some good news Sunday. About 25,000 people were allowed to return to their neighborhoods, the fire threat finally extinguished. Red flag warnings, issued when weather and other conditions are prime for the combustion and spread of wildfires, were dropped Sunday.\r\n\r\nIn Sonoma County, which along with Napa County has been burdened with the vast majority of the deaths and destruction, authorities on Sunday began assessing evacuated areas to determine the extent of infrastructure and other damages.\r\n\r\n\"In short, it\'s a step closer to moving our displaced residents back home !!!\" the sheriff\'s office said in a Facebook update.\r\nIn Napa, all city evacuation advisories were lifted. Napa County Fire Chief B<NAME> said he doubts the blazes will reach Calistoga, a tourist town of more than 5,000 people known for its resorts, hot springs and mud baths that has been evacuated since last week.\r\n\r\nBiermann, however, said low humidity remained an issue, and that gains made while the winds have been fairly light could slow if they kick up again.\r\n\r\n\"We\'re not out of the woods, but we\'re making tremendous progress,\" he said.\r\n\r\nNapa supervisors Chairwoman <NAME> said the county expects no additional evacuations. The focus of the county\'s efforts, she said, was moving from rescue to recovery.\r\n\r\n\"A week ago this started as a nightmare, but the day we dreamed of has arrived,\" Ramos said. \"It\'s a long road to recovery. I look forward to the day when this can be a distant memory, when we can recall that we were resilient and we got through this together.\"', 'images/world1.jpg'),
(77, 'Stop threatening nuclear catastrophe; US warns N Korea', 'world', 'The United States does not want war with North Korea, the US military chief said on the demilitarised zone metres away from the communist state, as he warned Pyongyang to stop threatening \"catastrophe\" with its nuclear weapons.\r\n\r\n<NAME> made the brief comments standing next to South Korean Defence Minister Song Young-moo on Friday, describing <NAME>\'s leadership as an \"oppressive regime\" that mistreats its people while its neighbour to the south offers a vibrant democracy.\r\n\r\n\"Our goal is not war but rather the complete, verifiable, and irreversible denuclearisation of the Korean Peninsula,\" Mattis was quoted as saying by South Korea\'s Yonhap news agency at Panmunjom village.\r\n\r\nThe United States has about 30,000 American troops stationed in South Korea, a remnant of the 1950-1953 war on the peninsula that has never officially ended, with only an armistice agreement signed.\r\n\r\nSong said North Korea can never use its nuclear weapons. \"If it does, it will face retaliation by the strong combined force of South Korea and the US,\" he warned.\r\n\r\nNorth Korea must to return to dialogue between the two Koreas, Song added.\r\n\r\nThe threat of nuclear war has escalated in recent months as President <NAME> has intensified his rhetoric against Kim\'s regime, including saying he would \"totally destroy\" North Korea if it threatened the US or its allies.\r\n\r\nPyongyang responded by threatening to detonate a nuclear weapon in the atmosphere after its sixth and most powerful underground nuclear test last month. ', 'images/world2.jpg'),
(78, 'No end to standoff as Catalan leader rules out election', 'world', 'Barcelona, Spain - Catalonia\'s President <NAME> has ruled out calling a snap election, as a standoff between Madrid and separatists pushing for the region\'s independence intensified.\r\n\r\nThe Catalan leader on Thursday said he would not dissolve the regional parliament after not receiving enough assurances from the Spanish government that it would not press ahead with a move to impose direct rule over the independence-seeking region.\r\n\r\n\"I was ready to call an election if guarantees were given,\" he told reporters in Catalonia\'s capital, Barcelona.\r\n\r\n\"There is no guarantee that justifies calling an election today,\" added Puigdemont.\r\n\r\nPuigdemont said it was up to the regional parliament to decide how Catalonia should respond to Madrid\'s plans to suspend the region\'s autonomy in the wake of an October 1 referendum.\r\n\r\nThe Spanish senate will vote on Friday on whether to trigger Article 155 of Spain\'s constitution, a move that would allow the central government in Madrid to directly administer Catalonia.\r\n\r\nThe untapped, two-paragraph article allows broad discretion for the administration of regional governments. \r\n\r\nThe measure requires an absolute majority in order to pass. Spanish Prime Minister <NAME> heads a minority government and needs the support of the Spanish Socialist Party (PSOE) to enact Article 155.\r\n\r\nA PSOE spokesperson had previously said that if Puigdemont called elections, triggering Article 155 would not be necessary.\r\n\r\nEarlier, reports had suggested that Puigdemont would announce a snap regional election, in what was seen as a plan to foil Madrid\'s plan to take direct control of Catalonia.\r\n\r\nThe elections were one of three options \"on the table\" for Puigdemont, according to <NAME>, president of the Catalan Parliament.\r\n\r\nThese included a declaration of independence, a declaration of independence with subsequent elections, or elections without independence.\r\n\r\n\'Exercise of irresponsibility\'\r\n\r\nCatalans voted in a disputed independence referendum on October 1 that was ruled illegal by the Spanish Constitutional Court and met with police violence, which was condemned by rights groups and European leaders.\r\n\r\nThe Catalan government said 90 percent voted for independence, but turnout was less than 50 percent.\r\n\r\nPuigdemont announced independence on October 10, but suspended the declaration after eight seconds to encourage dialogue with Madrid.\r\n\r\nNo dialogue is known to have taken place. \r\n\r\nFollowing Puigdemont\'s announcement, Spanish Vice President <NAME> said she regretted that Puigdemont had decided not to go to the Senate \"to argue against Article 155\".\r\n\r\nShe told the parliament must \"comply with a legal, democratic and legal obligation. The obligation of any government is to respect and enforce the laws\".\r\n\r\n\"The political conflict did not begin as a cause of independence but as an exercise of irresponsibility that has been growing,\" she told the senate, admonishing the Catalan leader saying \"he has not lacked options for dialogue\". \r\n\r\nAhead of Puigdemont\'s announcement, hundreds of protesters had gathered outside the Palace of the Government in Barcelona\'s Gothic quarter waiting to hear the Catalan leader speak.\r\n\r\nThey waved the Estelada, the one-starred Catalan flag used to represent an independent Catalan republic, and chanted \"Out! Out! Out! The Spanish flag!\" and other pro-independence slogans.', 'images/world3.jpg');
INSERT INTO `news` (`id`, `headlines`, `category`, `newstext`, `image`) VALUES
(79, 'Torrential downpours cause major flooding in Tanzania', 'world', 'Seasonal rains have brought record-breaking wet weather to parts of Tanzania. The heavy downpours have led to widespread flooding, resulting in major travel disruptions.\r\n\r\nMeteorologist Hellen Msemo reported that the worst of the flooding had occurred along Tanzania\'s northern coast. Much of the infrastructure has been damaged, and the main highway to the nation\'s largest city, Dar es Salaam, has been cut off from the north of the country.\r\n\r\nThe international airport at Dar es Salaam had 174mm of rain on Thursday. This was the heaviest October rainfall since records began in 1918. The October average is 69mm.\r\n\r\nMany places in the region broke their 24 hour rainfall records. Kibaha had its wettest day in 53 years with 178mm of rain.\r\n\r\nThere have been many accidents and many roads will remain closed for some time. Dozens of homes and businesses have been submerged underwater because of swollen rivers and mudslides.', 'images/world4.jpg'),
(80, 'Everything you need to know about Iceland\'s election', 'world', 'Reykjavik, Iceland - Iceland heads to the polls on Saturday with 10 parties on the ballot and amid a dark shadow of corruption. Here is everything you need to know:\r\nWhy is this election important?\r\n\r\nIn a word - corruption. Iceland is holding parliamentary elections for the second time in just under a year after the government collapsed in September, following a scandal by the governing Independence Party.\r\n\r\nThis follows close on the heels of the collapse of the government a year prior in 2016 when Iceland\'s then Prime Minister, <NAME> of the Progressive Party, was the first political casualty from the fallout of the Panama Papers after it was revealed that he had been keeping a secret offshore bank account.\r\nWhat\'s at stake here?\r\n\r\nTackling corruption in government is again a leading force in the elections, as it was last year.\r\n\r\n\"Trust in the parliament and the system as a whole continues to be the deciding factor,\" says <NAME>, who is running for the Pirate Party in East Reykjavik, \"without it efforts to form government will be difficult.\"\r\n\r\nBut it is unclear how public outrage at the latest scandal will translate at the voting booth. Most Icelandic voters are concerned with quality of life issues, particularly healthcare and the cost of housing.\r\n\r\nTourism is booming in Iceland, but the windfall has driven up the cost of living, and young Icelanders in Reykjavik can\'t afford to buy a home.\r\n\r\nThe distribution of natural resources, particularly fishing rights for the country\'s mainstay - cod - is also an important issue, as is ratifying the new constitution that was written five years ago, but remains to be adopted.\r\n\r\n\"Political corruption, including the blatant failure of parliament to ratify the new post-crash constitution, has trumped economic recovery in the minds of many voters,\" says <NAME>, Professor of Economics at the University of Iceland.\r\n\r\n\"The strong opposition of the Independence Party to the new constitution, mainly to please its paymasters among the oligarchs in the fishing industry but also, more generally, to preserve the status quo across the board, frustrates many of their traditional voters.\r\n\r\n\"The Independence Party has become the face of Iceland\'s political corruption.\"\r\n\r\nIf the Independence Party loses this election, it will likely be viewed as a referendum on corruption. In this charged international political climate where every election is seen as a referendum on Trumpism, many will be watching which way Iceland goes.\r\nWhy should we care about Iceland?\r\n\r\nStrategically positioned between Europe and North America at the edge of the Arctic Circle, for a country of only 324,000 people with no army, Iceland often plays an outsized role on the world stage.\r\n\r\nIceland led the global economic collapse in 2008. It was a refuge for WikiLeaks founder <NAME> where he spent time working on WikiLeaks. It is a country that has seen several major corruption scandals in the past decade, including ties to Trump Soho through investments by the FL Group.\r\n\r\nIceland is also the oldest parliamentary system, dating back more than 1,000 years. The country is a world leader in women\'s rights, boasting the highest status of women of any country according to the World Economic Forum\'s gender gap index, and has the largest percentage of women in parliament of any country without a quota system - 48 percent.\r\n\r\nThe country has a strong environmental movement, running almost entirely on renewable energy, and a strong direct democracy movement. The constitution was re-written by crowdsourcing input from the public, and the young populist Pirate Party party has 15 percent of parliamentary seats.\r\nWhy did the government collapse?\r\n\r\nIn September the Bright Future party pulled out of a centre-right coalition government, forcing snap elections, after it was revealed that <NAME>, the father of the Prime Minister <NAME>, had written to the Ministry of the Interior a letter of support to \"restore the honour\" of a convicted pedophile.\r\n\r\nThe entire affair, kept out of public sight, was uncovered by members of the Pirate Party and the Left-Greens after another controversial \"restoring the honour\" in a sexual abuse case gained public attention.\r\nHow does the vote work?\r\n\r\nIceland\'s Parliament, called the Althing, is comprised of 63 representatives who are elected from six provinces by proportional representation. Voting is done by paper ballot, avoiding the pitfalls of potential electronic vote hacking and fraud that the United States is now contending with. The election is set for Saturday, but voting has been open for several weeks in various locations.\r\n\r\nThe president of Iceland, <NAME>, who is elected in a separate voting process, gives the mandate to form a government typically to the party with the most votes. The centre-right Independence Party has led the Parliament for a great majority of the past 73 years that the country has been independent.\r\nWhy does the Independence Party keep winning?\r\n\r\nThat\'s the question many voters keep asking themselves.\r\n\r\n\"It\'s what people are familiar with\", or \"it\'s how their parents voted\", is how most people explain the steady support for the Independence Party.\r\n\r\nDuring the run-up to last year\'s parliamentary elections, international interest was piqued by the possibility that the Pirate Party would take over after they started polling far ahead of the pack. But the Pirates ended up finishing third behind the Independence Party and the Left-Greens, with 10 parliamentary seats.\r\n\r\nPresident <NAME> gave the mandate first to the Independence Party, then to the Left-Greens, then to the Pirates. All were unsuccessful in forming a coalition government. After three months, the Independence Party finally put together a coalition with the Bright Future and Reform parties.\r\nWho is going to win the elections?\r\n\r\nIcelanders often say everyone in Iceland is an artist or poet, and during this election cycle it feels like almost everyone is running for office. There are dozens of small parties across the country, and new ones form every year. There are 10 parties on the ballot for Saturday.\r\n\r\nThe question many Icelanders are asking themselves is not who will win, but who they should even vote for. And, of course, there are apps to help. One app, provided by RUV, the state TV channel, allows users to select answers to a series of questions about the issues, and then the app ranks which party the user most closely aligns with. The app has had more than 100,000 views.\r\n\r\nWhoever takes power will have a lot to contend with. Because of the snap elections, there is no budget yet for 2018, and a number of groups are planning to strike in reaction to the massive 40 percent pay rise that was handed down to MPs and government bureaucrats following last years elections.', 'images/world5.jpg');
-- --------------------------------------------------------
--
-- Table structure for table `slideshownews`
--
CREATE TABLE `slideshownews` (
`id` int(11) NOT NULL,
`category` varchar(50) NOT NULL,
`headlines` text NOT NULL,
`image` varchar(200) NOT NULL,
`newstext` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `slideshownews`
--
INSERT INTO `slideshownews` (`id`, `category`, `headlines`, `image`, `newstext`) VALUES
(1, 'automobiles', 'Mahindra Beats Toyota and Ford to Top 2017 JD Power Sales Satisfaction Index', 'images/auto1.jpg', 'Mahindra and Mahindra ranked the highest in the 2017 Sales Satisfation Index (SSI) as per JD Power. The Indian automaker managed to beat international players including Toyota and Ford to take the top spot. Mahindra ranked highest in sales satisfaction, with a score of 866, followed by Toyota coming in second with 856 points, while Ford ranked third with 846. The market average was recorded at 840 points. The 2017 India Sales Satisfaction Index (mass market) Study is based on responses from 7831 new-vehicle owners, who purchased vehicles between September 2016 and April 2017.\r\n\r\nThe 2017 JD Power SSI study was based on six factors that contributed to overall customer satisfaction with respect to their new-vehicle purchase experience in the mass market segment. The factors include sales initiation (17 per cent); dealer facility (17 per cent); deal and paperwork (17 per cent); delivery timing (17 per cent); salesperson (16 per cent) and delivery process (16 per cent).\r\nJD Power, in a statement said that \"the overall sales satisfaction index for the industry improved significantly.\" The SSI increased by 31 points (on a 1000 point scale) in 2016. The main factors contributing to the improvement included a higher implementation rate on process standards; increase in the number of amenities made available at dealer facilities; and a drop in pressures and problems experienced by customers during the shopping experience.\r\n\r\nThe study also concluded that satisfaction in dealer facilities factor improved year-on-year with 65 per cent of customers saying their dealer offered all the amenities measured including, Wi-Fi, comfortable seating space and product brochures among others. Furthermore, the study said that 4 per cent fewer customers experienced problems or pressure during the buying process, down from 37 per cent to 33 per cent.\r\nThe study also found that 49 per cent of new-vehicle buyers in India researched vehicles online, which is an increase of 15 percentage points from last year.\r\nIn its 18th year, the JD Power Sales Satisfation Index (SSI) saw Hyundai and Maruti Suzuki scored 838 points respectively, followed by Datsun coming in sixth with 836 points. Honda and Tata finished next with 834 points each, while Volkswagen and Renault made it to the bottom with 826 and 819 points respectively.\r\n'),
(2, 'automobiles', '<NAME> Nominated To Replace Vijay Mallya As India\'s Representative In FIA\'s WMSC', 'images/auto2.jpg', 'The Federation of Motor Sports Clubs of India (FMSCI) has elected industrialist and auto enthusiast <NAME> as India\'s representative in the Federation Internationale de l\'Automobile\'s (FIA) World Motor Sports Council (WMSC). In a series of tweets, the Bombay Dyeing owner confirmed the news and said that he won the FMSCI election with a \'seven for\' and \'one against\' vote. The post was previously held by former UB Group boss <NAME>, who was asked by the FMSCI to step down on the sports ministry\'s directive. The post has been vacant since July this year.\r\nSinghania tweeted, \"Happy to be elected by the Federation of motorsport clubs of india as their rep to the world body of Federation international automobile.\"\r\n\"Happy to say that won the FMSCI with 7 votes for / 1 vote against - thanks for the unanimous support. Will do my best for Indian motorsport\"\r\nEarlier this year, FMSCI President <NAME> had cleared that the new member will be elected from the federation to represent FMSCI at the FIA general body, and the said person can then choose to stand for an election in the WMSC. The FIA elections are scheduled in Paris this December and Singhania will need to be elected then for the titular position. Meanwhile, <NAME> will be nominated for the deputy post.\r\n<NAME> is the Chairman and Managing Director of Raymond Group and is also an avid auto enthusiast. Known for his impressive car collection, the Raymond MD has raced in the Ferrari Challenge in Europe, apart from participating in drag racing competitions. However, Singhania does not have any administrative experience in Indian motorsport.\r\n'),
(3, 'automobiles', 'MotoGP 2017: Dovizioso Wins Japanese GP Against Marquez In Final Lap Showdown', 'images/auto3.jpg', 'The rain soaked Twin Ring Motegi circuit of Japan was witness to one of the most spectacular race finishes this season of MotoGP. Ducati Team\'s Andrea Dovizioso took his fifth win of this year in the Japanese Grand Prix in a final lap showdown with points leader <NAME> Honda. The riders put up one of the most dramatic finishes in MotoGP as the victor seemed uncertain down to the final \'Victory\' corner. Marquez finished a very close second with a gap of 0.249 seconds taking his 100th career podium, while Danilo Petrucci of Octo Pramac Racing finished third on the podium. Dovizioso has now closed the gap with Marquez down to 11 points; while Vinales is a distant third with 203 points.\r\n\r\nStarting from the front row, Marquez took the lead right from the start followed by <NAME> of Ducati, Petrucci, Johann Zarco of Tech 3 Yamaha and Dovizioso further back. While Lorenzo briefly took the lead on Lap 1, Marquez was quick to fight back and regain the lead. Dovizioso had a stunning start and quickly passed rivals to take P2, as Petrucci settled into third. In the opening stages itself, it was clear that these riders will be leading the race.\r\nAs the riders lapped the track, Marquez and Dovizioso moved further away from the rest of the lot, with Petrucci keeping close company. On Lap 12, Marquez made his first move to take the lead from Dovizioso, and all eyes were now on the two riders as a cat and mouse chase was what it seemed like with the pair changing positions. Marquez seemed clear in the lead fending consistent attacks from Dovizioso.\r\nBy the final lap, the sentiment echoed that of the Red Bull Ring fight from earlier this year between the title contenders. With Marquez still in the lead, Dovizioso was trailing behind the Honda rider by less than half a second. The Italian was waiting for Marquez to make a mistake that he would take advantage of and when time came, the Dovizioso made no mistake.\r\nMarquez wobbled on Turn 8 of the final lap, allowing Dovizioso close the gap further, while the former ran wide on the final corner, the opportunity Andrea was waiting for as he made no mistake to take the lead and seal his seventh win of the career. Petrucci went to finish third, 10.38 seconds behind Dovizioso.\r\nFurther down, Suzuki\'s Andrea Iannone and <NAME> finished fourth and fifth, securing their best result of the season. Lorenzo took the sixth spot, after leading the race briefly, and finished ahead of Aleix Espargaro of Aprilia Racing and Johann Zarco.\r\nIt wasn\'t the best day for Yamaha as Valentino Rossi as the Italian crashed on Lap 6, while Maverick Vinales finished ninth behind Zarco. Avintia Ducati\'s Loris Baz took the tenth place ahead of KTM rider Pol Espargaro. Yamaha\'s wildcard entry, Katsuyuki Nakasuga of Yamalube factory team finished 12th, ahead of Sam Lowes of Aprilia, <NAME> (Avintia Racing) and Tito Rabat (Marc VDS).\r\nWith respect to retirements, Honda\'s Dani Pedrosa retired from the race in the closing stages along with Cal Crutchlow of LCR Honda after two crashes. Aspar Ducati\'s Alvaro Bautista and Karel Abraham had falls and retired from the race.\r\n'),
(4, 'automobiles', 'Indian government to buy 10000 electric cars from Tata Motors', 'images/auto4.jpg', 'NEW DELHI (Reuters) - The Indian government on Friday said it will buy 10,000 electric cars from Tata Motors Ltd to start replacing petrol and diesel variants being used by its agencies.\r\nThey will be used to replace government cars over the next three to four years, a government statement said. The total number of vehicles used by government agencies is around 500,000.\r\nTata Motors will supply the cars in two phases starting in November. Nissan and India’s Mahindra & Mahindra had also bid for the contract.\r\nIndia wants to promote the use of electric vehicles to curb carbon emissions and energy demand. The federal think tank in May laid out a 15-year roadmap for electrifying all new vehicles by 2030 and limiting the registration of petrol and diesel cars.\r\nElectric vehicles remain expensive due to the high cost of batteries and automakers say lack of charging stations could make the plan unviable.\r\n'),
(5, 'automobiles', 'Maruti Suzuki India Q2 profit up 3.4% at Rs 2484 crore', 'images/auto5.jpg', 'New Delhi: Maruti Suzuki India Ltd, the country`s top-selling car maker, posted more than a 3 percent rise in its quarterly profit.\r\n\r\nThe Company sold a total of 492,118 vehicles during the July-September 2017-18 quarter, a growth of 17.6 percent over the same period of the previous year. Sales in the domestic market stood at 457,401 units, a growth of 19.4 percent. Exports were at 34,717 units.\r\n\r\nDuring the quarter, the company registered Net Sales of Rs. 214,381 million, up 21.8 percent over the same period previous year.\r\n\r\nNet Profit was Rs 24,843 million, a growth of 3.4 percent over the same period previous year.\r\n\r\nThe operating profit increased by 24 percent while the net profit increased by 3.4 percent due to lower non-operating income as the yields on investments were lower compared to last year, and some impact of commodities and advertisement expenses, and increase in effective tax rates.\r\n\r\nThe Company sold a total of 886,689 vehicles in H1 a growth of 15.6 percent. Sales in the domestic market stood at 825,832 units a growth of 17.1 percent. Exports were at 60,857 units.\r\n\r\nThe Company’s net sales stood at Rs 385,705 million in April-September 2017-18, a growth of 19.5 percent over the same period last year.\r\n\r\nNet profit stood at Rs 40,407 million, up 3.8 percent.\r\n\r\nThe operating profit increased by 16 percent while the net profit increased by 3.8 percent due to lower non-operating income as the yields on investments were lower compared to last year, and some impact of commodities and advertisement expenses, and increase in effective tax rates.'),
(6, 'books', 'Man Booker prize 2017: from Abraham Lincoln to Brexit Britain', 'images/book1.jpg', 'What do book prizes have to do with serious literature? On the long view, the answer is: not much. Even the immensely distinguished Nobel prize, which has just delighted many British readers with its choice of Kazuo Ishiguro, has logged some pretty forgettable selections. Who, for instance, still reads <NAME> (1908), <NAME> (1917), <NAME> (1939) or <NAME> (1966)?\r\nIn the arts, prizes will always be a lottery. Posh panels are just as vulnerable as the rest of us to the vagaries of taste. The joy of reading is that it’s free from the thought police. Books live and die in the hearts and minds of readers. Still, for close on 50 years, Man Booker’s quixotic efforts have made surprisingly good sense of a difficult, even impossible enterprise.\r\nTaste and judgment aside, the other intractable dimension of the Booker conundrum is its annual rendezvous with the marketplace. As in farming, or finance, there are good years and bad years. 2015 and 2016 were good years with excellent winners (<NAME>’s A Brief History of Seven Killings; <NAME>’s The Sellout).\r\nThis year, Booker’s panel is up against it. Before we discuss the shortlist, we have to note that, for whatever good reason, the judges decided to exclude some powerful contenders: <NAME> (Days Without End), <NAME> (The Ministry of Utmost Happiness), <NAME> (Swing Time) and, perhaps most surprising of all, <NAME> (The Underground Railroad).\r\nWhen <NAME>, as chair, summarised the shortlist as “unique and intrepid books that collectively push against the borders of convention”, she articulated a mission statement for a final session that promises to be an excruciating visit to the third circle of a literary critical inferno.\r\nAutumn has everything one would want from a winner: humanity, brilliance and a kind of subversive ecstasy\r\nIn practical terms, Young and her team have to choose between three Americans, an English woman, an award-winning Scot and a Pakistani. Collectively, their novels have been described by one of the judges as “transcultural”, a word still new to many dictionaries.\r\nFirst on the shortlist is Paul Auster’s 4321 (Faber), a consciously epic, quasi-cubist portrait of an American boy’s life during the second half of the last century. (Full disclosure: I was Auster’s first publisher and have been an admirer of his work ever since The New York Trilogy.)\r\n4321 offers a hefty punch from an American heavyweight. At more than 1,000 pages, the multi-form versions of the life of Archibald <NAME> demonstrates a major writer at his best – original, ambitious, pitch-perfect and wholly absorbing. This is a novel tormented by fate, contingency and playful literary experimentation. But it’s also a narrative to get lost in, a Bildungsroman that is, by chance, a poignant elegy to the America that is being trashed by Trump and his vandals. 4321 must be a real contender.\r\nInevitably, Auster’s book towers over <NAME>’s History of Wolves(Weidenfeld), an enigmatic coming-of-age novel set on the edge of a lake in the American midwest. Some readers may compare Fridlund’s book unfavourably with <NAME>’s Housekeeping, which is also set by a lake, but History of Wolves is grounded in a more sinister domestic narrative that grips the reader with a fierce vision of adolescent estrangement. It’s a powerful debut.\r\nFrom these all-American narratives, we move to Britain with Fiona Mozley’s Elmet (<NAME>), another first novel about secrets in the family. As her title suggests, Mozley has drunk deep at the fount of Ted Hughes and has written a dark hymn to the landscape and language of Yorkshire that’s also, like Hughes’s poetry, bleak, lyrical and steeped in blood.\r\nWhere Mozley draws on an English tradition, in Exit West (Hamish Hamilton), Mohsin Hamid strikes a global dystopian note that’s fresh, contemporary and audacious, a love story set in a disintegrating society; a novel for the moment.\r\nWhich brings us to the big American challenger here, Lincoln in the Bardo by <NAME> (Bloomsbury), the bookies’ favourite. Saunders has been extravagantly praised in the US for his short fiction, notably CivilWarLand in Bad Decline (1996), and is, unquestionably, a highly original talent who is taking fiction into extraordinary new territory. Lincoln in the Bardo, his first novel, is a strange and haunting reverie on <NAME>’s grief at the death of his 11-year-old son, Willie, “a small mirror of himself”, in 1862. The “bardo” is the Tibetan Buddhist limbo between death and rebirth in which Lincoln’s dead son meets ghostly voices from the past in a dazzling collage of voices.\r\nYou could describe this as a postmodern historical novel, but that would be to underestimate the thrill of Saunders’s intentions. Braiding snatches of prose, both original and archival, he redefines his chosen genre with some outrageous comic touches and many arresting moments of sheer magic. Experimental yet firmly anchored to its readers’ attention, it offers the kind of satisfactions typical of many previous winners. If it had not been so wildly acclaimed, it would seem a shoo-in for this year’s prize. And yet…\r\nThere is, from the final book on this list, <NAME>’s Autumn (Penguin), some serious competition. Smith’s is another highly acclaimed performance, the first of a four-part series about time and the seasons. Autumn is a bittersweet tour de force set in “the worst of times” – Brexit Britain – and interweaving art, death and the mysteries of love. Smith’s portrait of centenarian <NAME>, approaching death, and his passionate protege, Elisabeth, is a stunning exploration of memory and regret, a book that celebrates and entertains as much as it takes us into the twilight world of the dying. On some readings, Autumn has everything one would want from a winner: humanity, brilliance and a kind of subversive ecstasy.\r\nWho knows how the judges will adjudicate this list? Almost any outcome is possible on 17 October. Who knows if what they choose is literature? That’s for posterity. My hunch is that a US writer will take the prize again, no doubt stirring up more anti-Americanism, though Smith will have a lot of home support. You never can tell.\r\n'),
(7, 'books', 'Kancha Ilaiah case: We’re not here to ban books says Supreme Court', 'images/book2.jpg', 'Supreme Court dismisses petition to ban a book written by the Dalit writer.\r\nIt is not up to the Supreme Court to use its powers to ban books, which are a free expression of a writer’s thoughts and feelings about the society and world he lives in. Courts cannot be asked to gag free expression. The Supreme Court has always placed the fundamental right to free speech at the highest pedestal.\r\nThis is what the Supreme Court recorded in its two-page order while dismissing a petition to ban a book written by writer and activist Professor <NAME> Shepherd called <NAME> .\r\nThe petition filed by advocate K.L.N.V. Veeranjaneyulu also took exception to a particular chapter in a book titled ‘Post-Hindu India’ called ‘Hindutv-Mukt Bharat’. The book is critical about the caste system prevailing in India, especially in the Arya Vysya community.\r\n “Any request for banning a book of the present nature has to be strictly scrutinized because every author or writer has a fundamental right to speak out ideas freely and express thoughts adequately. Curtailment of an individual writer/author\'s right to freedom of speech and expression should never be lightly viewed,” a Bench of Chief Justice of India Dipak Misra, Justices <NAME> and <NAME> recorded in the order. The court dismissed the petition to uphold the fundamental right of free speech, “keeping in view the sanctity of the said right and also bearing in mind that the same has been put on the highest pedestal by this court”.\r\nThe court snubbed the petitioner, observing that his prayer to ban the book of <NAME> is rather an “ambitious” one. “When an author writes a book, it is his or her right of expression. We do not think that it would be appropriate under Article 32 of the Constitution of India that this court should ban the book/books,” the Supreme Court held.\r\n<NAME> had recently challenged his detractors in the Arya Vysya community, saying he was prepared to withdraw his book of the representatives of the community were prepared to earmark 5% jobs in their establishments to Dalits, Adivasis and members from the washermen and barber communities.\r\n'),
(8, 'books', 'To Kill a Mockingbird by <NAME> taken off Mississippi school reading list', 'images/book3.jpg', 'To Kill a Mockingbird, <NAME>’s classic novel about racism and the American south, has been removed from a junior-high reading list in a Mississippi school district because the language in the book “makes people uncomfortable”.\r\nThe Sun Herald reported that administrators in Biloxi pulled the novel from the 8th-grade curriculum this week.\r\n<NAME>, vice-president of the Biloxi School Board, told the newspaper: “There were complaints about it. There is some language in the book that makes people uncomfortable, and we can teach the same lesson with other books. It’s still in our library. But they’re going to use another book in the 8th-grade course.”\r\nA message on the Biloxi schools website said To Kill A Mockingbird teaches students that compassion and empathy do not depend upon race or education.\r\nPublished in 1960, Lee’s Pulitzer Prize-winner deals with racial inequality in a small Alabama town, in the aftermath of an alleged rape of a white woman for which a black man is tried. It has sold more than 40m copies and it was made into a film in 1962, winning three Oscars.\r\nAn email to the Sun Herald from a concerned reader referred to the book’s use of the word “nigger” when it said the school board’s decision was made “mid-lesson plan”. “The students will not be allowed to finish the reading of To Kill A Mockingbird,” the email said “… due to the use of the ‘N’ word.”\r\nThe newspaper quoted the reader as writing: “I think it is one of the most disturbing examples of censorship I have ever heard, in that the themes in the story humanize all people regardless of their social status, education level, intellect, and of course, race. It would be difficult to find a time when it was more relevant than in days like these.”\r\nThe Sun Herald reported that school board Superintendent Arthur McMillan did not answer any questions about the withdrawal. The book has been withdrawn from schools before, in 2016 in Virginia.\r\nLee died last year at the age of 89, after the discovery and controversial publication of a second novel, Go Set a Watchman, that describes events after those depicted in To Kill a Mockingbird. In June this year, the author’s estate approved plans for a graphic novel version of the first book.\r\n'),
(9, 'books', '<NAME>\'s The Book of Dust: La Belle Sauvage review: a rich dreamlike prequel well worth the wait', 'images/book4.jpeg', 'A decade-and-a-half after The Amber Spyglass, <NAME> returns to the world of His Dark Materials with the first in a new trilogy. “Eagerly anticipated” isn’t the half of it. I well remember asking after His Dark Materials in a bookshop, back when the buzz was first building, and being directed to the children’s section. I assumed the person who’d recommended it had made a mistake and left empty-handed. But what a difference a few years make…\r\n\r\nIn art, as in life. La Belle Sauvage is a prequel – set 10 years or so before the events of Northern Lights. It reacquaints us with many of the characters from the original books. There are cameos from <NAME> and <NAME>, with her sinister beauty and her inscrutable monkey-daemon; we meet a younger version of the elderly Gyptian Farder Coram; and Pullman’s heroine Lyra is here too… except, rather than reading alethiometers and transforming the fortunes of the multiverse, this time her main role is to gurgle prettily and fill her nappy at inconvenient times. We all have to start somewhere.\r\n\r\nThe hero of this story, rather, is Malcolm, a boy on the verge of adolescence who helps out at his parents’ waterfront pub, the Trout, in the steampunk Oxford familiar from Northern Lights. His pride and joy is a canoe called La Belle Sauvage – and he takes a dim view of the acquaintance who thought it funny to scrawl out the V and replace it with an S. (You may, like me, develop a sneaking regard for this acquaintance.)\r\n\r\nThe plot gets going when, after witnessing a stranger dropping a secret message before being apprehended by a pair of thugs, Malcolm gets drawn into a world of politico-religious subterfuge. On one side are the theocratic fascists of the Magisterium – their sinister Stasi being the agents of the CCD (Consistorial Court of Discipline); on the other a shadowy resistance movement known as Oakley Street.\r\n\r\nAt issue, as ever, are the properties of Dust and the fate of baby Lyra, who is being semi-secretly sheltered by the nuns at the nearby priory. The surveillance state sends its roots deep. Echoing <NAME>’s minor classic The Wave, Malcolm’s school is taken over by a youth movement – the League of St Alexander – whose members are invited to inform on heretics and soon have the teachers terrified of their charges.\r\n\r\n\r\n\r\nSocial and psychological commentary is seldom far from the surface. Like Milton, a quote from whom gave the His Dark Materials trilogy its title, Pullman has a design on the reader. Milton wanted to “justify the ways of God to man”; Pullman wants to do, roughly, the opposite – though his assault is less against an enfeebled Authority than the oppressive and obscurantist religions that claim to act in His Name.\r\n\r\nAnd like Tolkien, world-building is at least as much of a preoccupation as storytelling: over the first trilogy Pullman unfolded a whole existential set-up that mashed up the languages of magic and quantum physics to incorporate versions of the Many-Worlds hypothesis, a twisted-Milton creation mythos and, in Dust (also “dark matter”), a sort-of-materialist account of the Hard Problem of Consciousness. That’s quite some going for a children’s book.\r\n\r\nThis being a prequel, we can take the set-up – the workings of Dust and alethiometers and daemons and all that jazz – more or less as read, even if those revelations lie in the future for the characters in the book. Yet Pullman, generously, makes sure that you can come to this one fresh without having to read, or reread, what went before. The great metaphysical edifice of His Dark Materials is, for the most part, in the background.'),
(10, 'books', 'Paddington 2 review: a deliciously funny <NAME> makes the bear\'s sequel impossible to resist', 'images/book5.jpg', 'Paddington was uncommonly charming and Paddington 2 is very nearly as good. That said, for approximately nine minutes, you may have minor concerns. Will this film merely coast on the cosy lovability that made its forebear (sorry) such a joy? How can the bar be nudged up, and who’s going to do it?\r\n\r\nEveryone’s favourite ursine Peruvian immigrant left his debut in such a warm and happy place, there’s a nagging lack of comic friction as we dive back in. The Brown family, living in their perfect multicultural haven of Windsor Gardens, are trying out some new eccentric hobbies, are they? Forgive us, makers of Paddington 2, for a light tapping of feet.\r\n\r\nImpatience is dispelled for good as the plot kicks in, and it turns out – with all due respect to returning leads <NAME> and <NAME>, not to mention <NAME>’s cuddly vocal work – to be all about the guest stars. The first set-piece to get dear, disaster-prone Paddington spinning from the rafters involves a barbershop, a prone Tom Conti as a pompous judge, and a set of vibrating clippers. We start to feel in safe hands once again, but it takes this burst of skittering chaos to do it.\r\n\r\nAnd then <NAME> arrives. Essentially filling <NAME>’s shoes as this instalment’s star villain, his role as a deliciously self-absorbed West End acting legend called Pho<NAME> is the gift that keeps on giving.\r\n\r\nThrough his machinations – it’s all to do with an antique pop-up book Paddington covets, which contains the clues, quite without him knowing, to a long-lost treasure stash – the poor bear is framed for robbery, and sentenced by a vindictive Conti to 10 years in jail.\r\n\r\nHis letters to beloved, 100-year-old Aunt Lucy suddenly have a mournful bent, though he does find time, by way of silver linings, to praise the prison’s imposing Victorian architecture and tip-top security.\r\n\r\nReturning director <NAME>, in cahoots with new co-writer <NAME>, proves that the crackpot inspiration that powered his first one was no fluke. Prison is exactly the place for Paddington, in the sense that his understated melancholy makes him seem even more adorable behind bars. The shadow of his outsider status returns, and there’s a whole new set of characters for him to win over with his quaint, flummoxed ways.'),
(11, 'business', 'Tata Tele deal: How Airtel is getting a billion-dollar business for free', 'images/business1.jpg', 'After Telenor ASA decided to hand over its India mobile business to Bharti Airtel Ltd for free, the Tata group has done the same. In the June quarter, revenues of these companies together stood at Rs3,202 crore, or nearly $2 billion on an annualized basis. Sure, since Tata’s non-mobile businesses, such as broadband, are being retained, the actual revenue that could potentially accrue to Airtel could be lower.\r\nStill, even using conservative estimates, the Tatas are transferring at least a $1 billion business to Airtel for free. Telenor’s annualized revenues stood at $606 million in the June quarter.\r\nIn fact, the Tatas have gone a step further compared to Telenor. For the latter, Airtel agreed to take over outstanding spectrum payments, other operational contracts such as tower leases and employees. But the deal with the Tatas is even sweeter; it will take over only a portion of outstanding spectrum payments and it’s not clear whether operational contracts and employees are part of the deal.\r\nThe simple reason Airtel is able to strike such deals is that it is the only buyer in the market. Vodafone India Ltd and Idea Cellular Ltd have enough on their plate with their own merger, and the last thing they would want to engage with is the integration of another telco. Reliance Jio Infocomm Ltd, after having spent Rs2 trillion already in building its network, appears self-sufficient. Of course, these are also distress sales, given the high-cash burn at these companies. For sellers, therefore, one big hope is if Airtel evinces some interest. The only other option is to wind down the business, which entails far higher costs.\r\nA Tata Sons executive told Mint the cost of winding down the business would have been about Rs8,000 crore higher than the current arrangement. Knowing this well, Airtel has stayed shy of rushing into deals, and has waited till sellers agree to its terms.\r\nThis puts it in an enviable position; such takeovers help grow market share as well as help plug gaps in its spectrum portfolio at a fairly low cost. In addition, with Vodafone and Idea busy with the merger process, and given the uncertainty among their employees, Airtel can grab market share from its large rivals as well.\r\n'),
(12, 'business', 'Pharma companies may post better results in Q2 on local business growth', 'images/business2.jpg', 'Sun Pharma\'s top-line is likely to decline 15 per cent, owing to increasing pressure on Taro\'s business and a lack of generic launches to offset pricing pressure in the base business. Domestic business is however likely to post strong growth, given channel re-stocking.Indian pharmaceutical companies are expected to post better results in the second quarter of the current fiscal, following recovery in the domestic business and several launches in the US market, a report says. “Unlike the last two quarters, the Indian pharma sector will witness some relief in Q2 FY18, largely led by certain one-off factors. Channel re-stocking will help many companies in the India branded business and a couple of significant launches in the US market will provide a further boost,” HDFC Securities analyst <NAME> said in its report in Mumbai.\r\n“We foresee a 15 per cent sequential jump in revenues, and the EBITDA margin to move up to 22 per cent from 18 per cent quarter on quarter. On a year-on-year basis, we expect single-digit top-line growth. H2 FY18 is again likely to be soft, with no visibility on resolution of the FDA issues of large companies like <NAME> and <NAME>’s Labs,” Chalke said.\r\nSun Pharma’s top-line is likely to decline 15 per cent, owing to increasing pressure on Taro’s business and a lack of generic launches to offset pricing pressure in the base business. Domestic business is however likely to post strong growth, given channel re-stocking. The EBITDA margin may show some sequential improvement on the back of a better business mix.\r\nThe Halol resolution and the specialty business remain key triggers for Sun Pharma post Q2 in the current fiscal. However, any further delay in the resolution and a negative outlook for the specialty business may lead to significant earnings cuts for FY19/FY20, as Taro’s business continues to erode, he said.\r\n\r\n'),
(13, 'business', 'Samsungs chief of booming semiconductor business Kwon Oh-hyun to resign; cites unprecedented crisis', 'images/business3.jpg', 'Seoul: The chairman of Samsung Electronics Co.\'s board of directors, who has been the public face of the company after its de facto chief was jailed on corruption charges, said Friday he will resign next year to make way for a new leader.\r\n\"As we are confronted with unprecedented crisis inside out, I believe that time has now come for the company to start anew, with a new spirit and young leadership to better respond to challenges arising in the rapidly changing IT industry,\" <NAME>, 65, said in a letter to employees.\r\nKwon plans to resign as head of Samsung\'s semiconductor and component business and will not seek re-election on the company\'s board when his term expires in March, Samsung said in a statement.\r\nHe has represented Samsung Electronics at various occasions since the company\'s heir and vice chairman, <NAME>, 49, was jailed earlier this year. Lee was convicted on corruption charges to five years in prison in August, along with four other former Samsung executives.\r\nSamsung has two other CEOs, each overseeing its mobile phone business and home appliance division.\r\n'),
(14, 'business', 'IndusInd clinches largest MFI deal takes over Bharat Financial', 'images/business4.jpg', 'Ending months of speculation, IndusInd Bank and the second largest microlender Bharat Financial Inclusion (BFIL) on Saturday announced largest merger in the MFI space in an all-share deal, which will help the private sector lender push its rural network and bring down credit cost for small borrowers.\r\nThe merger, which will add 6.8 million customers to IndusInd\'s 10 million now, and which comes amid a slew of similar announcements involving the urban-focused new age private sector lenders such as Kotak Bank and IDFC Bank, will also help reduce cost of lending for micro borrowers as cheaper deposits can be used to fund their credit needs.\r\nAds by ZINC\r\n\r\n\"The biggest gain for us is the rural network. It will also us help reduce cost of funds by 3-4 per cent,\" IndusInd Bank managing director and chief executive <NAME> said.\r\nEarlier this afternoon, the boards of both the lenders separately decided on the merger and approved the share swap ratio wherein BFIL shareholders will get 639 shares of IndusInd for every 1,000 shares held.\r\nThe balance-sheet of BFIL, including the entire capital, assets and liabilities will move into IndusInd, while the operation team will continue as a wholly owned subsidiary and work as business correspondents.\r\nThe combined entity will have 40,000 employees, Sobti said, stating all the 15,000 employees of BFIL will be absorbed and continue in the same role. However, the board of the Hinduja Group promoted bank will remain unchanged.\r\nThe IndusInd scrip closed 0.43 per cent up at Rs 1,750.15 on the BSE on Friday, while BFIL shares closed 0.38 per cent up at Rs 1,003.45.\r\nSobti conceded that there is a 12-13 per cent premium over the average stock prices in the past two weeks which BFIL shareholders will get, but justified it on the Rs 9,500-crore loan book which his bank gets and also the synergies that will deliver higher value going forward.\r\nThe merger, expected to take up to 10 months to consummate, will help the bank in its rural play, where it has only 250 of its 1,210 branches, Sobti said.\r\nBFIL\'s network touches 1 lakh villages across the country and the merger will help it act as a full service bank rather than the monoline micro-loan provider, BFIL managing director and chief executive MR Rao said.\r\nIn the past few months, speculation has been strong about BFIL\'s suitor, especially after repeated attempts by the microlender which has survived multiple crises to turn into a small finance bank have failed. Many of its peers did manage to turn into the new-age entities.\r\nPH <NAME>, non-executive chairman of BFIL, said the merger is not \"an easy one\" for the MFI and shared a trivia by stating that the announcement comes on the seventh anniversary of the passage of the Andhra MFI Act, which had led to doubts over the very survival of the sector.\r\nThis regulatory overreach had forced BFIL, floated by the high profile Vikram Akula as SKS Microfinance, and taken to a historic IPO in 2010 making it the first MFI to go public, to even change to its present name. The Andhra law left every player bleeding for a few years and forced RBI to bring the sector under its purview.\r\nBFIL feels only two areas of the banking segment -- the lower-middle class and those around poverty line --are the ones accretive to margins and when coupled with the full range of service offerings, the merger is a win-win.\r\nSobti elaborated saying that apart from reducing cost of funds, merger will help IndusInd not just achieve the priority sector lending sub-targets but also exceed them, making it a player in the PSL certificates market that is fee-accretive.\r\nBecause of the lower risk weights attached to lending by banks, it will help conserve capital as well, Sobti added, adding \"the merger is value accretive from day one.\"\r\nWhen asked about the structure of absorbing the balance sheet and keeping operations as a wholly-owned subsidiary, Sobti said it is in sync with past precedents which have been cleared by the regulators and will also help maintain the ethos of the company.\r\nThe merger, which comes amid a surge in agri loan losses by banks, will increase share of micro loans to 7 per cent of the loan book of IndusInd from 2.8 per cent now, Sobti said, but will dip to 5 per cent over the next three years.\r\nAsserting that microloan segment is \"high yielding and has low delinquency rates\", Sobti said it will not lead to much troubles on the asset quality as BFIL has a 99.6 per cent repayment levels in this calendar year, after the note-bank hiccups stabilised.\r\nRao chipped in saying demonetisation led to a Rs 400- crore loan loss for BFIL, but it has been fully provided.\r\nThe deal will have to pass through a slew of regulators such as the Reserve Bank, National Company Law Board Tribunal and fair-play watchdog CCI.'),
(15, 'business', 'India asks US to review its position on totalisation pact', 'images/business5.jpg', 'NEW DELHI: India has asked the US to revisit its position on totalisation agreement and raised concern at the 11th Trade Policy Forum at Washington, DC, over protectionist measures which could have an adverse impact on trade in services. \r\n\r\nCommerce and industry minister <NAME>, during his discussion with the US trade representative <NAME> on Thursday, adopted a firm stance on issues ranging from trade deficit to price control for medical devices, officials said.\r\n\r\nThey said Prabhu made a strong pitch for India\'s need to bring about a reconciliation between the demand for optimum medical facilities and affordable healthcare to a large number of people. The minister stressed that life-saving drugs and devices and their supply are of utmost concern for any developing country. \r\n\r\n\"India desires to address the concerns of providing affordable healthcare to its citizens and, at the same time, work towards striking a balance between affordable healthcare needs and introduction of high-end technology,\" Prabhu said, according to one of the officials, who did not wish to be identified. \r\n\r\nPrabhu, according to the official, also said that American companies and manufacturers of medical devices should come forward for establishing manufacturing facilities in India. \r\n\r\nResponding to the US\'s concerns on trade deficit with India, Prabhu said exports of both countries to each other\'s territories have grown over the same pace for the past three decades.'),
(16, 'education', 'New Ideas New Technology: Bangalore Central University is Revamping Its Education', 'images/edu1.jpg', 'In July, the Karnataka State Government split up the 130-year-old Bangalore University into three separate varsities, creating the newly formed Bangalore Central and Bangalore North Universities.The Bengaluru Central University, which has over 233 colleges, plans to change city’s higher education landscape with several reforms, the Bangalore Mirror reported.\r\nStarting with going digital.\r\nThe admissions, administration, examinations and evaluations of results will now happen digitally.\r\nBeing more inclusive\r\nThe university wants to strengthen its policy on inclusivity. Speaking to Bangalore Mirror, professor <NAME> said, “As the university is embedded in the heart of the city, it gives us a major task to set the foundation strong. Among students, it aims to provide equal opportunity to women, SC, ST, backward classes, persons with disabilities, and other marginalised sections of the society.”\r\nHave a higher teacher to student ratio\r\nThe university also wishes to attract and retain highly qualified faculty members and wants to achieve a 1:15 faculty to student ratio. The varsity will even have local and global teaching and research collaborations.\r\nOpen doors for other sources of funding\r\nState funds and students fees will need to be supplemented if the best opportunities are to be provided to students. The university will throw open a CSR wing, as well have consultants provide expert advice on research and other proceedings.\r\nSmart cards for attendance and facilities\r\nSmart cards will be introduced for students and to show when they enter and as a requisite for attendance.\r\nNew schools to make the variety of education richer\r\nBCU aims to start new schools in its first phase of operations.\r\nAdditions to existing departments in areas like science, mathematics, commerce and management, communication, apparel technology and management and foreign languages will be made too.\r\nIn addition, research-based centres in the areas of urban studies and film studies are being planned. These are aimed to address the critical needs of the city, its economy and people.\r\nWhat is the budget for all the changes?\r\nA budget of Rs 1,000 crore over four years has been presented to the government for consideration. At least Rs 325 crore is required for the initial work.\r\n'),
(17, 'education', 'Desert research education center threatened with closure', 'images/edu2.jpg', 'The prestigious Midreshet <NAME> research and education complex in the southern Negev Desert will have to close in nine days unless the Education Ministry stands by a commitment to provide a quarter of the institution’s annual budget, Channel 2 reported Saturday.\r\nNo money has been paid since July, the report said.\r\nOfficials from the academy blamed Education Minister <NAME>, of the right-wing religious Jewish Home party, for the shortfall, saying he was opposed to the values espoused by the center.\r\nLocated next to Kibbutz Sde Boker and connected academically to Ben-Gurion University of the Negev in the southern city of Beersheba, the facility was created in the early 1960s to reflect the vision of Israel’s first prime minister, <NAME>, to encourage Jewish settlement and intellectual development in the relatively empty, arid region.\r\nIt combines a slew of desert-related research and educational institutions, among them an institute for desert research, a national solar energy center, a boarding school, an environmental high school, a field school and a pre-army preparation academy.\r\nIt has recorded breakthroughs in the areas of alternative energy, sustainable agriculture for arid landscapes, and biotechnology.\r\nBen-Gurion, who also headed the Labor movement, lived and is buried on Kibbutz Sde Boker.\r\n“The money will finish in 10 days,” said <NAME>, chairman of the board’s finance committee. “We won’t be able to buy food for the students, pay salaries to the employees — and therefore we will have to close the institution.”\r\nThe Education Ministry, however, accused it of running a deficit “at the expense of the public purse, without justification.”\r\nThe relatively small sum involved could not be the real reason, Alsheich insisted, noting that far bigger amounts were handed out to other academies.\r\n<NAME>, the school’s director, charged the Education Ministry with carrying out a “targeted assassination” on what the institution represented.\r\nZionist Union lawmaker <NAME> tweeted sarcastically on Saturday, “If they’d call it the S<NAME>iva [religious seminary], or <NAME> [after <NAME>, a right-wing visionary and key influence on Prime Minister <NAME>u], there’s a serious fear that the budget would remain.”\r\nBar, who heads the parliamentary forum for the strengthening of the periphery, posted on Facebook that it was “shameful” and “moral bankruptcy” on the part of the Education Ministry to let the school close.\r\n“The late Prime Minister <NAME>’s heritage of love of the land and of mankind must be instilled in all citizens of Israel, regardless of political affiliation, and Midreshet <NAME> [another name for <NAME>] in the Negev has been doing this for many years out of a genuine Zionist mission,” he added.\r\nAgain in this beautiful place on earth- sde boker!\r\nPosted by <NAME> on Wednesday, 7 June 2017\r\nIn letter sent to Bennett last month, the academy’s board of directors accused Education Ministry Director General <NAME> of avoiding them, according to the Walla website.\r\n“We’ve tried to prevent this [closure] for two months, but the lack of organization and the ongoing contempt [for us] do not allow us to wait any longer,” the letter warned.\r\nThe ministry’s finance department torpedoed an alternative plan to approve the NIS 12 million so long as the school established a teacher training college to serve the whole country, Channel 2 said.\r\nThen two months ago, it informed the board of governors that it wanted to scrap ministry funding gradually over the next five years, according to Alsheich.\r\nThe ministry said, however, that it was working on a recovery program that would allow the school to operate without a deficit and serve the entire education system.\r\n');
INSERT INTO `slideshownews` (`id`, `category`, `headlines`, `image`, `newstext`) VALUES
(18, 'education', 'PM Modi: Rs. 10000 Crore To Be Provided To 20 Varsities To Make Them World Class', 'images/edu3.jpg', 'PATNA: Lamenting that no Indian university figures among the top 500 globally, Prime Minister <NAME> today said the government intends to unshackle these institutions and provide Rs. 10,000 crore to 20 varsities to ensure that they are counted among the best in the world. Addressing a function on the centenary celebrations of the Patna University here, he said measures like grant of central status were \"a thing of the past\" and his government has taken \"a step forward\" towards making 10 private universities and 10 government ones world class.\r\n\r\n\"My government took an important step towards unshackling the IIMs, freeing them from the clutches of restrictions and regulations set by the government.\r\n\r\n\"We intend to do the same for our universities and ensure that our centres of higher learning figure among the best 500 in the world,\" Modi said here.\r\n\r\nIn his speech that lasted a little over 30 minutes, the Prime Minister stressed on the need for universities to give more emphasis on \"learning and innovation\" and give up old teaching methods which focused on \"cramming students\' minds with information\".\r\n\r\nThe Prime Minister also replied in his characteristic style to a fervent plea by Bihar Chief Minister <NAME>, who in his welcome address had urged PM Modi \"with folded hands that central status be granted to Patna University\".\r\n\r\n\"I would like to say something about a demand that was raised here and met with loud cheers by the young crowd attending this ceremony. Issues like grant of central status have become a thing of the past. We are taking a step forward. \"We will provide an assistance of Rs. 10,000 crore to 10 private universities and an equal number of government ones for a period of five years. All these universities have to do is to demonstrate their potential to become world class,\" he said.\r\n\r\nThe universities will not be selected by the prime minister or a chief minister or any other political figure, he said, adding their potential will be assessed by a professional, third party agency.\r\n\r\n\"I exhort Patna University to seize this opportunity,\" he said in the presence of a host of dignitaries, which included Kumar and his Deputy <NAME>.\r\n\r\nHailing the role of young IT professionals in changing the global outlook towards India, Modi quipped \"earlier we were seen as a land of snake charmers, exorcism and superstitions.\r\n\r\n\"Long back, while on a visit to Taiwan, I told a friend that we, as a nation, have moved from snakes to the mouse,\" he said.\r\n\r\nPM Modi said, \"We are a nation of 800 million young people, 65 per cent of our population is below the age of 35 years. There is nothing that we cannot achieve with such a huge demographic advantage.\"\r\n\r\nThe PM began his speech on a humorous note, saying \"the Chief Minister said in his speech that I was the first Prime Minister to visit this university. It seems my predecessors have left quite a few tasks for me\".\r\n\r\nHe also paid rich tributes to the rich and glorious history of Bihar, saying \"the stream of knowledge that flows through this state is as ancient as the river Ganges itself\". \"The state has been devoting itself to the worship of Saraswati (Goddess of learning). But the time has come to propitiate Laxmi (Goddess of wealth and prosperity) as well and make the state a prosperous one by 2022, when we celebrate 75 years of our Independence,\" he said.\r\n\r\nHe also remarked \"there is no state in the country where one does not find a Patna University alumnus among the top five bureaucrats. I have had the opportunity to work with many such bright officers\".\r\n\r\nUnion Ministers <NAME>, <NAME>, <NAME> and <NAME> were among those present during the event.\r\n\r\nAfter attending the PU function, the PM paid an unscheduled visit to the Bihar Museum, situated adjacent to the Patna High Court, which has been a pet project of Chief Minister <NAME>.\r\nThe chief minister accompanied Modi during the museum visit.\r\n\r\nThis is the prime minister\'s first full-fledged official tour to the state since the BJP became a part of the ruling coalition in Bihar in July this year after Kumar-led JD(U) snapped its alliance with Lalu Prasad\'s RJD and the Congress.\r\n'),
(19, 'education', 'Success Story: PGIMS Rohtak To KBC Hot Seat: Dr <NAME> (AIR-79 CSE 2015)', 'images/edu4.jpg', 'NEW DELHI: When he made it to the hot seat on Kaun Banega Crorepati 9 (KBC 9; episode 32), Dr <NAME> became one of the few bureaucrats who have appeared on the show, so far as contestants. <NAME> is an IAS Officer from Jind, Haryana and is posted in Thrissur, Kerala as Assistant Collector Under Training (ACUT). Having secured 79 rank in civil services exam 2015, Dr Goyal fulfilled his dream of helping larger mass of population. The transition of his career from MBBS to India\'s top bureaucrat level is one of its few kinds in the country.\r\n\r\n\'Service is the most important part of Indian Administrative Service,\' said Dr <NAME> while expressing his concerns for underprivileged children in the country. He shared his work experience at Kerala and remarked the \'beauty of the job\' and described the spirit of the country and unity in diversity.\r\n\r\nWhen asked about his preparation for the toughest examination, he said a meeting with a senior, who had then secured 81 rank, during internship first time made him think about the exam. He decided to quit his job for the exam.\r\n\r\nDr Goyal completed his MBBS from PGIMS, Rohtak in 2013 and cleared the civil services exam 2014 with All India Rank 628 and has also worked as a medical officer for 6 months.\r\n\r\nPost his selection in the civil services, Dr <NAME>, made it to the headlines once again for his appearance as a contestant in KBC 9 which airs on Sony TV. He appeared to be a confident contestant and played well in the show. He quit the show and took home Rs. 12.50 lakh.\r\n\r\nDr Goyal quit the show in the last question about an Indian cricketer, of Indian origin, who made his Test debut against India in 2016. When the show host, <NAME>, asked him about his favorite football team he answered it is Brazil. However in FIFA U-17 he will support India, he said.\r\n\r\nApart from studies, Dr Goyal plays badminton, football and is an ardent lover of music.\r\n'),
(20, 'education', 'Government\'s Commitment; Quality Of Teachers Vital In Education: Azim Premji', 'images/edu5.jpg', 'CHENNAI: Wipro Limited Chairman Azim Premji today highlighted the importance of the government\'s commitment and quality of teachers in the public education system. \"I think the problem in government education system is not the infrastructure or the course material. It is the quality of training of teacher and equally important is the commitment of the government in public education,\" he said. Elaborating, he said, \"I do not think you ever heard of a Prime Minister visiting public schools. Prime Minister visit States during a year of elections but very, very rarely you appreciate and see Prime Minister spending time in a public education institution.\"\r\n\r\nCalling for more improvement in investing in education, he said, \"we claim that we are spending 2.5 per cent (of GDP). But we do not even spend 2.5 per cent.\"\r\n\r\nHe said this should be compared with countries including China which spends an excess of five per cent on education. \"So we are way behind,\" he said.\r\n\r\n\"Empowering the teachers is more important in school education system. Creating an empowering environment to these teachers is the most important contribution we can make,\" he said.\r\n\r\nHe was delivering the keynote address at the 19th Polestar Award function, organised by Polestar Foundation, an initiative by city based Intellect Design Arena Private Limited here.\r\n\r\nStating that there has to be a \"sustained and consisted\" efforts in education, Mr. Premji said, \"90 per cent of the cost of education accounts to the teacher.\"\r\n\r\n\"Apart from infrastructure which we put in as one time capex (capital expenditure). The quality of teacher is key in public education,\" he said.\r\n\r\nNoting that a change in education system takes a very long time, he said, government was working on a new education policy.\r\n\r\n\"I think, if the recommendations of expert committees which are expected to be implemented in next six months, it will make for significant upliftment in terms of education in public domain,\" he said.\r\n\r\nReferring to the number of teachers graduating every year, he said, \"We graduate fewer teachers per year than what Finland does. Finland is a population of five million. Our population is of 1.3 billion.\"'),
(21, 'fashion', 'H&M just opened a 17000sqft store in Mumbai', 'images/fashion1.jpg', 'There’s no greater indulgence than a relaxed afternoon of shopping on a day off. And if your upcoming weekend plans look a little weak, here’s where you can spend a quiet Saturday afternoon browsing through racks of merchandise with your bestie.\r\n\r\nSwedish high street label H&M just opened their fifth store in Mumbai’s Le Palazzo earlier this week. The store located off Kemp’s Corner is a two-storey space boasting 17,000sqft of shopping. This H&M store will carry womenswear, menswear, kids wear as well as accessories.\r\n\r\nKeeping in spirit with the high street retailer’s sustainable garment collection initiative, the store has a facility to donate old clothes for recycling, which will fetch the donator a discount coupon that can be used for their next purchase.'),
(22, 'fashion', 'What Veere Di Wedding’s designer costumes reveal about the lead characters', 'images/fashion2.png', 'Sonam Kapoor and the cast of Veere Di Wedding have been blasting social media with posters of the upcoming rom-com. From the four co-stars—Sonam Kapoor, Kareena Kapoor Khan, Swara Bhaskar and Shikha Talsania—preening in lehengas to dancing in sherwanis, the two looks have already got us placing bets on what can be expected from the film that’s set to release in May 2018.\r\n\r\nGiven that producer and stylist Rhea Kapoor and her fashion enthusiast/actor sister Sonam Kapoor have worked together on the project, it’s guaranteed to be a visual treat for style watchers. Designer duo <NAME> have created the costumes for the film and we couldn’t help but get on call with them for more insight on the wardrobe (and plot) details. Vogue spoke to one half of the designer duo, <NAME>, about what went into the making of Veere Di Wedding’s costumes.\r\n\r\nWhat did you have in mind when setting the tone for the movie via costumes?\r\nThe brief given to us was that it’s a chick flick in a way, but it’s also about emancipation of women. Rhea (Kapoor) was very clear that she wanted one look to be men’s sherwanis.\r\n\r\nWhat inspired you to try a vibrant palette of yellows, greens and tangerines for the first look?\r\nThe first poster is a bit of a tease—you can see the girls but you can’t really see them. The colour palette was our take on the marigold flower, which is also a part of the poster.\r\n\r\nTell us about your experience styling the four stars of the film. Any fun instances you encountered along the way?\r\nThe fittings have been a laugh riot. Going with the character and the mood, we have made some outfits sexier, some more covered. There are some corny clothes also!\r\n\r\nHow have you channeled each character’s personality via their clothes? What makes each character special?\r\nEach of the girls has a certain personality and Rhea was keen on bringing that in through the costumes. If somebody is a rebel, then it shows in their clothes.\r\n\r\nWhat was the biggest challenge you faced as designers while working on Veere Di Wedding?\r\nNo challenges! The girls have been very supportive. They have really imbibed the vibe of their characters and the clothes and the whole experience of it. From whatever working stills I have seen of the movie—they all seem to be having a blast. Other than Sonam, we had never worked with Kareena, Swara or Shikha before. Kareena was more than happy to experiment different styles. Rhea really had a vision for the film and the thought process has come through. Originally, the plan was to go completely crazy with the fashion element of the film, but we made the brief a little more realistic.\r\n\r\nWhat palette have you relied on for this film?\r\nAs the film is about four girls bonding, we have got them in colour stories in places but otherwise they have independent styles. The clothes are not typical bridal clothes.\r\n\r\nThe second poster of Veere Di Wedding had all four stars looking sharp in co-ordinated sherwanis. Can a bride really step out in a sherwani?\r\nMaybe not the bride (laughs). But having your bridesmaids in sherwanis can be a really cool idea.\r\n\r\nWhat is your ultimate tip for Indian brides this season?\r\nMore and more brides are moving away from jadau jewellery and wearing diamonds, and white diamonds with red just looks awkward. We love the idea of fuchsia pink, yellow, pastels and even white for bridal lehengas.'),
(23, 'fashion', 'Colaba’s latest pop up is as cool as its name sounds', 'images/fashion3.jpg', 'Blink and there’s a new store in South Mumbai’s favourite shopping haunt, Kala Ghoda. The newest addition to the art district’s designer stores is the Colaba Cartel pop-up. Co-hosted by jewellery designers <NAME> of Valliyan and <NAME>u of Parvati Villa, this space is filled with contemporary fashion labels.\r\n\r\nIt was Arora and Katau’s idea to curate a space that offers occasion and resort wear for the wedding and party hopping crowd. The first cycle of the Cartel will carry pieces by labels <NAME>, Hemant & Nandita, Anupamaa Dayal, Shriya Som, Sukriti & Aakriti, Astha Narang, Verandah by <NAME>, Deme by Gabriella, House of Sohn, Valliyan and Parvati Villa. The designers are encouraged to curate their own racks at the store.\r\n\r\nIf you’re headed to an end-of-the-year getaway or a wedding that will most likely explode on Instagram, you know where to get your wardrobe fix from.\r\n\r\nColaba Cartel, shop no 2, Machinery House, Burorji Bharucha Road, opposite Pantry, Kala Ghoda, Mumbai '),
(24, 'fashion', 'You’re going to see these super tiny designer bags on everyone soon', 'images/fashion4.jpg', 'If, like us, you believe it’s the little things that pack a big punch, you’ll love the designer handbag style that’s staging a comeback this season. Cast away your trusty totes and cross-bodies and make room in your wardrobe for the wristlet. Don’t be daunted by the lack of storage space–after all, you’re not going to need anything more than a credit card and lipstick to keep you company at a great party.\r\n\r\nWristlets might be the smallest of designer handbags but all you have to remember is that ‘Good things come in small packages’. Swap your cross body sling or that hard shell clutch in favour of this season’s favourite accessory. We’ll never tire of designer handbags from Anya Hindmarch’s happiness-infused version to Attico’s Studio-54 worthy number and even DVF’s pared-back option, we have every iteration of the hot ticket accessory covered.'),
(25, 'fashion', 'The utter meaninglessness of the fashion industry\'s shunning of <NAME>', 'images/fashion5.jpg', 'Fashion is exasperating. Even when it tries to do the right thing, it often only manages to remind the world just how tone deaf it really is.\r\n\r\n<NAME> is a fashion and celebrity photographer who has worked with everyone from Beyonce and M<NAME> to <NAME>. He is a skilled shooter, but one who has long had an extraordinarily sleazy reputation for being sexually abusive to models. In public, he\'s recognisable thanks to his signature style, which includes work shirts, long sideburns, a moustache and eyeglasses that give him the incongruous look of a nerdy pornographer.\r\n\r\nIn 2014, New York magazine published a profile of him detailing the often sordid nature of his work. While the story contained all the usual biographical data points and resume highlights, it also made it clear that Richardson was known for being an awful person who regularly coerced models into sexually compromising circumstances. At the time the story was published, there were still people willing to defend Richardson, who took pains to acknowledge his accomplishments as a photographer. But after it ran, the magazine published a follow-up that included the personal stories of models who alleged that Richardson had been a sexual bully and worse. Richardson, for his part, seemed to view himself as a somewhat tortured and unfairly maligned artist who sometimes happened to work nude.\r\n\r\nRichardson was mostly unscathed by the stories.\r\n\r\nNow, however, a certain mainstream segment of the fashion industry has decided to formally distance itself from him. The Daily Telegraph, London reported that in a leaked e-mail from Conde Nast International, the publishing house banned Richardson from working for the company\'s publications, which include such titles as Vogue and GQ. Any forthcoming photo shoots should be halted, the memo said. And any unpublished shoots pulled. (This does not mean that Richardson\'s work has been purged from the archives. Indeed, the GQ website still hosts \"The Best of <NAME>\" photo gallery.)\r\n\r\nThe facts of Richardson\'s behaviour have not changed over the last few years. Only the context. That roiling backdrop includes the denunciations of <NAME> and his predatory behaviour in and around Hollywood; the allegations of sexual harassment and cover-ups against Fox News\' <NAME> and <NAME>; and the continued dismay by many that the current president once bragged on tape about groping women, has been accused of doing just that in real life, and hasn\'t yet faced any repercussions.'),
(26, 'fitness', 'Americans are paying $10 per half an hour of Zen. After yoga focus shifts to meditation', 'images/fit1.jpg', 'The demand for meditation is spreading across American cities -- perhaps a natural continuation of the yoga craze, which firmly embedded the search for nirvana in the health and wellbeing industry. It is 5 pm, otherwise known as rush hour in Manhattan. <NAME>, 31, finishes work and heads straight for her daily dose of peace and quiet -- half an hour at meditation studio “Mndfl.” Since April 2016, when she discovered the then-brand new studio, the investment bank employee has abandoned yoga and embraced meditation.\r\n“I have been meditating pretty regularly -- probably five times a week, 30-minute sessions,” says Lyons, sipping a cup of tea on the studio’s sofa. “I just need a moment to chill out. This city -- you are always running place to place and there are not a lot of quiet spaces,” she explains.\r\n“I think it’s made me a lot happier and also just helped me make better decisions, more thoughtful decisions.” Practiced by millions around the world, meditation promotes mental wellbeing through concentration, breathing techniques and self-awareness.\r\nFor a long time, those singing its praises were intellectuals, celebrities or people dedicated to spirituality. Its popularity in the West is owed in part to the Beatles, who promoted the practice on their return from India in the late 1960s.\r\nBut these days, meditation can be found in all areas of life -- from hospitals exploring its benefits for patients with serious illnesses, to schools who recommend it for children and television shows. The craze is a result of many factors -- waning attendance at places of worship, lives spent submerged in smartphones, not to mention neuroscientists’ confirmation of the benefits.\r\nAs a result, demand is spreading across American cities -- perhaps a natural continuation of the yoga craze, which firmly embedded the search for nirvana in the health and wellbeing industry.\r\n<NAME>, Mndfl’s 34-year-old “chief spiritual officer,” opened his first studio in Greenwich Village at the end of 2015, and now owns two others in Manhattan and Brooklyn. Elsewhere in the US, studios can be found in Los Angeles, Miami, Washington and Boston.\r\nIntroduced to meditation as a child by his parents, who converted to Buddhism in the 1970s, he says business “is going well.” “The people who come here are really a cross section of all New Yorkers,” he explains. “If the common denominator is, ‘I am really stressed out, I need to know how to deal with my mind’ -- that’s basically everyone.”\r\nRinzler refuses to talk money, revealing only that classes are often full -- and the 75 numbered pads in his studios have been reserved online 70,000 times in just 18 months. The reason for success? A model offering a well-rounded introduction to this ancient practice for a reasonable price.\r\nFor years, Rinzler explains, Buddhist centers only offered long introductions -- sessions of several hours, or even seminars lasting a number of days and costing up to several thousand dollars.\r\nWith classes priced at just $10 for half an hour, and options for unlimited subscriptions, new studios in New York or Los Angeles hope to capture a wider audience. Their model is similar to gyms, but with “zen” in abundance -- including dimmed lights, plant walls, and unlimited organic tea.\r\n- CEOs join, employees follow -\r\nCompanies are also reaping meditation’s benefits. More and more organizations in Silicon Valley and other sectors are introducing employees to the practice, convinced of the long-term benefits for the workforce.\r\n<NAME>, an ex-actress who has taught meditation since 2012, launched a special program for companies 18 months ago. Starting from 150 students in the first year, she now has over 7,000 -- and hopes to reach tens of thousands more with online courses, including in medium-sized cities such as Cleveland, Ohio or Tallahassee, Florida.\r\n“The most common way that I find myself teaching at companies is I teach the CEOs to meditate, and they start to benefit and they bring me on to do a talk with the company,” Fletcher, CEO of Ziva Meditation, says. Employees take part on a voluntary basis, mostly “for some selfish reasons,” the 38-year-old explains.\r\n“Either they want to speak better, please their boss, want to make more money or have better sex...”\r\nBut Fletcher insists she has no issue with people starting out of self-interest. “If you actually practice you will start enjoying your life more, your brain will function better, your body will feel better, you get sick less often,” she says. “Those altruistic things will happen as a result of the practice anyway.”\r\n- Mobile meditation -\r\nAnother aspect of the industry gaining traction is meditation apps. One of the most popular, Headspace, had already been downloaded more than 11 million times in the spring -- and boasts over 400,000 paying users.\r\nBut meditation’s newfound popularity is of such high intensity, neither Rinzler nor Fletcher is concerned about competing studios popping up over time.\r\n“I am sure they are going to be exactly like yoga studios, you are going to find them on every block...” Rinzler predicts. “If you look at it as a business, there is competition,” Fletcher reflects, adding, “if you see it as a mission, there are colleagues.”\r\n“There are not too many teachers when it comes to teaching four billion people in my lifetime!”\r\n'),
(27, 'fitness', 'Pay attention to your gut health. It could be the key to ageing well', 'images/fit2.jpg', 'Chinese and Canadian researchers have found evidence to suggest that a healthy gut could be linked to healthy ageing. Carried out by researchers from Ontario’s Western University and Lawson Health Research Institute as well as from Tianyi Health Science Institute in Zhenjiang, Jiangsu, China, the research is one of the largest microbiota studies conducted in humans, looking at a cohort of more than 1,000 Chinese participants. Previous research too has shown that gut bacteria can slow down ageing.\r\nThe researchers studied the gut bacteria in individuals, who were aged 3 to over 100 years old and self-reported as being “extremely healthy” with no known health problems and no family history of disease. The team observed a direct correlation between health and the microbes in the intestine, finding that the overall microbiota composition of the healthy elderly group was similar to that of people decades younger, with little difference between the gut microbiota of those age 30 to those age over 100.\r\n“This demonstrates that maintaining diversity of your gut as you age is a biomarker of healthy ageing, just like low-cholesterol is a biomarker of a healthy circulatory system,” commented <NAME>, the principal investigator on the study and also a professor at Western’s Schulich School of Medicine & Dentistry and Scientist at Lawson Health Research Institute.\r\nThe study didn’t identify the cause or effect between gut microbiota and healthy ageing, with <NAME>, professor at Western’s Schulich School of Medicine & Dentistry and Scientist at Lawson Health Research Institute saying, “It begs the question — if you can stay active and eat well, will you age better, or is healthy ageing predicated by the bacteria in your gut?”\r\nHowever, Gloor added that, “The main conclusion is that if you are ridiculously healthy and 90 years old, your gut microbiota is not that different from a healthy 30-year-old in the same population.” The researchers now suggest that resetting microbiota in the elderly to that of a 30-year-old might help promote health.\r\n“The aim is to bring novel microbiome diagnostic systems to populations, then use food and probiotics to try and improve biomarkers of health,” said Reid, adding, “By studying healthy people, we hope to know what we are striving for when people get sick.” The findings can be found published online in the journal mSphere.'),
(28, 'fitness', 'Parents keep in mind: Less than 20% urban kids in India eat fruits once a day', 'images/fit3.jpg', 'Only 18% of urban children in grade six to 10 in India eat fruits every day, show the results of a survey, revealing poor eating habits of a vast majority of kids in the country. At 14%, the proportion of children eating protein once a day is even lower, showed the survey by Podar Education Group which runs over 100 schools spread across the country.\r\nThe survey involved responses from 1,350 parents of children studying in grade six to 10 in India’s metro cities. The results showed that only 35% of children consume vegetables as part of every meal. “The World Health Organisation (WHO) does say that childhood obesity is an ‘exploding nightmare’ in the developing world,” said <NAME>, Trustee, Podar Education Group, in a statement.\r\nA new study led by Imperial College London and WHO and published in the journal Lancet showed that the number of obese children and adolescents (aged five to 19 years) worldwide has risen tenfold in the past four decades. “Healthy childhoods are critical to the country, and require strong cohesive work between the parents and schools,” Podar said.\r\nThe survey evaluating the eating habits across food categories in young school children in India also found that 50% of them consume junk food, sweets or other unhealthy food almost on a daily basis. “This survey clearly indicates that teaching a child about good nutrition is not just about giving them a list of healthy foods that he or she can eat, but more about ‘how much’ and ‘when’ to eat,” child nutritionist Sripriya Venkiteswaran said.\r\n“For example, teach them about age-appropriate portion sizes and how to limit themselves when they go out to birthday parties or buffet spreads. Teach them to eat at regular intervals, not skip meals and keep a gap of at least three hours between dinner and bed-time,” Venkiteswaran added.\r\nThe silver lining is that almost 76% of parents said that their kids play some outdoor sport. About 24% said their children do not play outdoors at all. “It is important for every child to have 60 minutes of moderately rigorous play every day to be fitter and healthier. Lack of play also leads to slow cognitive skills, lower social skills, threat of diseases such as asthma, diabetes and aggressive behaviour,” said <NAME>, a sports educationist and co-founder of EduSports, a leading sports and physical education organisation.'),
(29, 'fitness', 'Did you know that our children are 10 times more obese than kids four decades ago?', 'images/fit4.jpg', 'According to a recent study, the world had 10 times as many obese children and teenagers last year than in 1975, but underweight kids still outnumbered them. Warning of a “double burden” of malnutrition, researchers said the rate of increase in obesity far outstripped the decline in under-nutrition.\r\n“If post-2000 trends continue, child and adolescent obesity is expected to surpass moderate and severe underweight by 2022,” researchers wrote in The Lancet medical journal. The team found that there were 74 million obese boys aged 5-19 in 2016, up from six million four decades earlier.\r\nFor girls, the tally swelled from five million to 50 million. By comparison, there were 117 million underweight boys and 75 million underweight girls last year after the number peaked around the year 2000, the study said.\r\nAlmost two thirds of the underweight children lived in south Asia. Obesity ballooned in every region in the world, while the number of underweight children slowly decreased everywhere except south and southeast Asia, and central, east and west Africa.\r\nThe prevalence of underweight children decreased from 9.2 percent to 8.4 percent of girls aged 5-19 over the study period, and from 14.8 percent to 12.4 percent in boys. Obesity grew from 0.7 percent to 5.6 percent among girls and from 0.9 percent to 7.8 percent in boys.\r\nIn Nauru, the Cook Islands and Palau, more than 30 percent of children and teenagers were obese in 2016. In some countries in Polynesia and Micronesia, the Middle East, North Africa, the Caribbean and the United States, more than one in five children were obese.\r\n- Make healthy food affordable -\r\nExperts divide people into body mass categories calculated on the basis of their weight-to-height ratio. These range from underweight, normal weight, overweight and three categories of obese. Obesity comes with the risk of chronic diseases such as diabetes, while underweight children are more at risk from infectious diseases.\r\nChildren in either category can be stunted if their diet does not include healthy nutrients. “There is a continued need for policies that enhance food security in low-income countries and households, especially in south Asia,” said study author <NAME> from Imperial College London.\r\n“But our data also shows that the transition from underweight to overweight and obesity can happen quickly in an unhealthy nutritional transition with an increase in nutrient-poor, energy-dense foods.” The team used the height and weight data of 129 million people older than five to estimate body mass trends for 200 countries from 1975 to 2016.\r\nWhile obesity in children and teens appears to have plateaued in rich countries, its rise continued in low- and middle-income countries, they found. “Very few policies and programmes attempt to make healthy foods such as whole grains and fresh fruits and vegetables affordable to poor families,” Ezzati said in a statement. “Unaffordability of healthy food options to the poor can lead to social inequalities in obesity, and limit how much we can reduce its burden.”'),
(30, 'fitness', 'Don’t let the winter slow you down. Here are 4 easy ways to stay full of energy', 'images/fit5.jpg', 'In our modern, hectic lifestyles, we can’t afford to get sluggish. Regardless of the weather outside, we need to keep up with the pace. This winter, try these four methods to be full of life:\r\n\r\n1) Warm drinks\r\n\r\nIn winters, try swapping sodas, fruit juice and sparkling water for warm drinks. Sipping warm -- not boiling hot -- drinks before and after meals helps prevent the loss of heat while also favouring digestion. Herbal teas with lemon, ginger, rosemary, fennel, aniseed and cinnamon warm the body and invigorate. Try them instead of tea or coffee for breakfast. For those with nervous temperaments or who are quick to anger, sip on peppermint tea, which is stimulating but fresher.\r\n\r\n2) Eat orange\r\n\r\nTo load up on antioxidants and tasty flavours, tuck into topical vegetables. These seasonal stars are mostly yellow or orange in colour, and grow underground on the surface, like carrots, beetroot, parsnips, pumpkins, potatoes and sweet potatoes. Your gut will thank you for the soothing effect of these easy-to-digest veggies. Foods that particularly invigorate the spleen and kidneys -- veritable reservoirs of energy -- are dates, grapes, pears, potatoes, cucumber, carrots, melon, cereals, licorice, honey, cinnamon and aniseed.\r\n\r\nAds by ZINC\r\n\r\nRead more\r\n\r\nWant your children to have healthy teeth? Check the eating options near school\r\n\r\nLooking to lose the post-Diwali weight? Try intermittent fasting for quick results\r\n3) Get to bed early\r\n\r\nIt’s not always easy to slow the pace with today’s ultra-connected and busy lifestyles. When the days get shorter, we should, however, respect this drop in energy and slow down our activities. Unless you’re a natural night owl, you can snuggle up in bed from 10:30pm with no reason to feel guilty. Reading a book, doing breathing exercises, inhaling in a few drops of essential oils (Roman camomile, lavender, niaouli) or listening to music can help you drop off.\r\n\r\n4) Try yin yoga\r\n\r\nClose to meditation, yin yoga is a slow and gentle stress-bursting activity that’s a great for fall. Holding floor-based poses for three to four minutes forces us to slow down and listen to the feelings and sensations of the present moment. This “time out” can be highly beneficial in the evening, to stretch the body thoroughly and nourish the immune system. If you have trouble getting motivated to go out, try an online class in the comfort of your home.'),
(31, 'food', 'Diwali 2017: Make This Diwali Diabetic-Friendly With These Sugar Free Sweets\r\n\r\nThis year impress your guests with a lavish Diwali meal. Here\'s a fully-planned Diwali food menu to avoid all the fuss.', 'images/food1.jpg', 'While everyone\'s merry making and pleasing their sweet tooth, people suffering from diabetes have to be extra cautious when it comes to their sweet intake. What if we were to tell you that you can enjoy Diwali celebrations along with you share of sweet treats? Being diabetic does not mean that you have to give up on sweets entirely. Choose carefully and limit your portions. Desserts made at the best. Don\'t use full-fat milk if you\'re preparing sweets at home. Also, replace sugar with natural sweeteners such as jaggery and dates. Here are some sugar-free dessert options you can try at home for your Diwali celebrations. 1.Ragi Coconut Ladoo (Laddu) Recipe Recipe by <NAME> Made with millet or Ragi flour, Ragi Coconut Laddu is an immensely popular dish. This delicious laddoo is loaded with fibre, minerals and protein which makes it a great treat for diabetics. The wholesome delight is packed with the goodness of coconut, jaggery and crunchy peanuts. 2.Ragi Malpua Recipe by <NAME> Here\'s the Indian pancake dessert with a healthy twist. This recipe uses ragi flour, atta and oats to give you a wholesome and guilt-free experience. Malpuas are usually deep fried, but you can make them on a non-stick pan to steer clear of the excess oil. 3.Two-In-One Phirni (Sugar Free) Recipe by <NAME> Phirni is a simple rice pudding made by boiling the milk on slow fire with grounded rice. The layers of chunky pista and almond and aromatic rose essence are sure to make it a rich addition to your Diwali celebrations.'),
(32, 'food', 'Struggling with Bad Breath? These 5 Foods Could Be the Culprit', 'images/food2.jpg', 'Picture this. You have to meet someone important and also quickly tuck in your lunch. You eat whatever is available and show up just in time, except that your breath gives away your lunch menu! Now, that’s not the kind of conversation starter you were looking for. While daily activities like brushing your teeth twice, rinsing your mouth after a meal and flossing regularly are integral to good oral hygiene, sometimes bad breath could be linked to your diet and the last meal you took. Some foods can taint your breath for much long after you have had them. This is often caused due to halitosis. So the bacteria that resides in your mouth feasts on the food particles and dead cells which causes bad breath. \r\n\r\nHere are some foods that could be resulting in that foul smelling breath. \r\n\r\n1. Garlic\r\n\r\nDespite Garlic’s many health benefits, this doesn’t come as a surprise. Garlic has a long-standing reputation for causing bad breath and you have to blame its high sulphuric content, that lingers in the mouth for long, for the foul smell it leaves in its wake. The smelly sulphur is further absorbed in the bloodstream (while digestion), which makes inroads to your lungs, and is expelled as you exhale.\r\n\r\n2. Onions\r\n\r\nJust like garlic, the odour of onions stay long after you are done eating them. The sulphuric compounds present in the onion get absorbed into your bloodstream and gives out its traces as you exhale. If possible, floss and rinse your mouth thoroughly after you have had onions to get rid of the bad breath. \r\n\r\n Home\r\n Food & Drinks\r\n Struggling With Bad Breath? These 5 Foods Could Be The Culprit\r\n\r\nStruggling with Bad Breath? These 5 Foods Could Be the Culprit\r\n\r\nSushmita Sengupta | Updated: October 27, 2017 12:05 IST\r\nTweeter\r\nfacebook\r\nGoogle Plus\r\nReddit\r\nStruggling with Bad Breath? These 5 Foods Could Be the Culprit\r\nHighlights\r\n\r\n Some foods can taint your breath for much long after you have had them\r\n This is often caused due to halitosis\r\n The bacteria that resides in your mouth feasts on the food particles\r\n\r\nPicture this. You have to meet someone important and also quickly tuck in your lunch. You eat whatever is available and show up just in time, except that your breath gives away your lunch menu! Now, that’s not the kind of conversation starter you were looking for. While daily activities like brushing your teeth twice, rinsing your mouth after a meal and flossing regularly are integral to good oral hygiene, sometimes bad breath could be linked to your diet and the last meal you took. Some foods can taint your breath for much long after you have had them. This is often caused due to halitosis. So the bacteria that resides in your mouth feasts on the food particles and dead cells which causes bad breath. \r\n\r\nHere are some foods that could be resulting in that foul smelling breath. \r\n\r\n1. Garlic\r\n\r\nDespite Garlic’s many health benefits, this doesn’t come as a surprise. Garlic has a long-standing reputation for causing bad breath and you have to blame its high sulphuric content, that lingers in the mouth for long, for the foul smell it leaves in its wake. The smelly sulphur is further absorbed in the bloodstream (while digestion), which makes inroads to your lungs, and is expelled as you exhale.\r\n \r\ngarlic\r\n\r\ngarlic has a long-standing reputation for causing bad breath\r\n\r\n2. Onions\r\n\r\nJust like garlic, the odour of onions stay long after you are done eating them. The sulphuric compounds present in the onion get absorbed into your bloodstream and gives out its traces as you exhale. If possible, floss and rinse your mouth thoroughly after you have had onions to get rid of the bad breath. \r\n \r\nonion 620\r\nonions\r\n\r\n3. Coffee\r\n\r\nCan’t live without coffee? You might want to hear this out. Coffee is a natural dehydrator; and excess of it can leave you with a parched mouth which creates a favorable environment for the growth of oral bacteria. The dehydrating effect of coffee reduces the flow of saliva, which hinders the washing down of these oral bacteria. These bacteria then linger in your mouth for long and cause bad breath. Drinking water after short spurts of time can help wash down these bacteria and cut down the foul smell significantly. \r\n\r\n4. Tuna\r\n\r\n Fish, especially the protein packed Tuna, have long been associated with bad breath. Seafood starts smelling sour and foul with time as it reacts with the acid present in the mouth. You can pop a mint gum or tablet right after your meal or slash some vinegar on the fish before digging in, this prevents the oxidized odour. \r\n\r\n5. Dairy\r\n\r\nA tall glass of milk may do wonders for your body and overall health but excess of it may leave you with bad oral odour. The naturally occurring bacteria around the tongue feed on the amino acids found in milk and cheese, which can result in a foul smell from the mouth. But that doesn’t mean you toss milk or other dairy from your diet completely. Follow it up with a glass or two of water and your breath is back to smelling fine. \r\n\r\nYou need not eliminate these foods from your diet, with a little moderation and a little caution you can avoid bad breath. Rinsing your mouth after every meal is an age-old advise that we must practice throughout our lives. Brushing your teeth twice a day and flossing once to remove all possible remnants of the meal can ensure that you are never left in an embarrassing position. Drinking water regularly also helps keeping the oral bacteria at bay. \r\n'),
(33, 'food', '5 Herbal Teas to Calm Your Mind and Relieve Stress', 'images/food3.jpg', 'We can already feel a slight nip in the air and when the breeze becomes chilly – all we can think of is to curl up with a hot cup of tea. A perfect cup of tea can stimulate your senses and energize you from within. While yoga and meditation are known as effective ways to calm you mind and relive stress, some of the simplest pleasures in life may also have the same positive impact such as listening to music or sipping some soothing tea. Herbal teas not only relax your mind but also help you sleep peacefully.\r\n\r\nAccording to Dr. <NAME>, a Bangalore-based Nutritionist, “Herbal teas are very relaxing for mind as they contain essential oils that are known to cool down the nerve. Conventionally, 3 tablespoon of the fresh herbs or 1 tablespoon of dried herbs steeped in a cup of water for about 5 to 10 minutes should be enough.”\r\n\r\nWhat makes herbal teas so relaxing?\r\n\r\nCertain herbal teas may have an immediate effect in reducing anxiety. They are exposed to minimum oxidation during the processing of freshly plucked leaves of the tea plant, and they are known to have some magical properties that help in relaxing your body and mind. The key ingredient in herbal tea that leads to a state of physical and mental relaxation is a chemical known as L-theanine which helps in reducing stress, improves the quality the sleep, diminishes the symptoms of premenstrual syndrome, heightens mental activity and reduces the negative side-effects of caffeine. Here are five herbal teas that will be your best companions during gloomy winter days.\r\n\r\n1. Chamomile Tea\r\nDelicate chamomile flowers are infused in hot water to make this tea that is known to help with stress relief and provides a good night’s sleep. You may use fresh or dried chamomile flowers to make this tea. Chamomile has a very soothing effect with mildly sedative properties that help you switch off on a hectic day.\r\n\r\n2. Peppermint Tea\r\nAromatic peppermint tea is known to be a great remedy for stomach problems like indigestion and even cold and flu. People often sip on peppermint tea after dinner to calm down the digestive system which helps you sleep better.\r\n\r\n3. Kahwa\r\nKahwa is a traditional beverage which is made with a mix of Kashmiri green tea leaves, whole spices, nuts and saffron. It is rich in antioxidants, helps you feel relaxed and reduces anxiety levels. It also helps to fight the negative effects of stress induced toxins in the body. It has a rich flavour and aroma.\r\n\r\n4. Sage Tea\r\nSage herb is known to be an excellent muscle relaxer. Sage is a wonderful remedy to rely on when you’re suffering from mental exhaustion and body ache. It makes for an enjoyable drink.\r\n\r\n5. Rose Tea\r\nThe sweet smell of roses is enough to beat stress and relax your mind. You can use fresh or dried rose petals and let them steep in water till they turn dark. Sip on it before going to bed. It has a calming effect on your mind which will help you sleep better.'),
(34, 'food', 'The Flexitarian Diet: Finally a Diet That Isn\'t About Resisting', 'images/food4.jpg', 'Before we go into the details of this new diet trend, let me be clear that this one isn\'t about miraculously losing weight or cleansing your system from within. The Flexitarian Diet is more about making a conscious decision to move away from a meat-heavy diet and embrace eating habits that include more of whole grains, vegetables, fruits, legumes and lentils. With a growing body of medical evidence swinging in the favour of a vegetarian diet, the Flexitarian Diet allows one to have the best of both worlds. Practitioners of this diet gradually make a shift away from a diet rich in meats and other animal produce and include more of vegetarian and plant-based ingredients.\r\n\r\n\r\nUndeniably, our contemporary diets are loaded with simple carbohydrates, refined and processed items and animal products. Fruits, veggies, legumes, beans and lentils are fast disappearing from an average Indian plate - this aptly points at the growing incident of rampant nutrient deficiencies like protein, iron and vitamin D among others.\r\n\r\nSimply put, the term \'flexitarian\' stands for a diet of a person who is flexible in his/her dietary approach. Remember, the diet does not aim to turn you into a vegetarian but to gradually reduce your dependence on animal products and make you consume more plant-based foods.\r\n\r\n\r\nHow to practice Flexitarianism\r\n\r\n\r\nRule #1 - Make it a point to include more veggies in your diet. Load up on whole grains, legumes, beans, lentils.\r\n\r\n\r\nRule #2 - Start cutting down on meat simultaneously; if you are used to consuming meat or animal products in most of your meals, go meatless completely during lunch or dinner. Gradually observe meatless days if you like.\r\n\r\n\r\nRule #3 - Consume less of red meat; processed meats should be avoided completely.\r\n\r\n\r\nRule #4 - Create a diet plan that is sustainable, eco-friendly, long-lasting - the one that promotes good health without having you to compromise on your dietary preferences.\r\n\r\nFlexitarianism is for those who want to take a step to adopt a healthier diet. It is specifically addressed to those who are mindful of the growing amount of meat and animal products in their daily diets and the associated threats to human health.\r\n\r\n\r\n\"Flexitarian is the combination of two words: Flexible + Vegetarian. It is a new way to eat that minimises meat without excluding it altogether. You get the health benefits of a vegetarian diet without having to follow the strict rules,\" writes <NAME>, an American registered dietitian and the author of \'The Flexitarian Diet\'.\r\n\r\n\r\nBlatner describes her approach divided into three levels mentioned below:\r\n\r\n\r\nBeginner: 2 meatless days per week (26 ounces/730gms of meat or poultry per week)\r\n\r\n\r\nAdvanced: 3-4 meatless days per week (18 ounces/510 gms of meat or poultry per week)\r\n\r\n\r\nExpert: 5 meatless days per week (9 ounces/255gms of meat or poultry per week)\r\n\r\n\"I\'d been a vegetarian for over 10 years but ate meat on rare occasions. Every time I ate meat I felt like I was being a bad, lazy vegetarian. So I developed this style of eating for people who know that vegetarianism is one of the healthiest and smartest ways to eat, but don\'t want to sit in the corner at a BBQ with an empty bun. The diet does not take foods away but instead adds new foods to those you already eat,\" she mentions on her official website.\r\n\r\n\r\nHealth experts, fitness enthusiasts, dieticians and nutritionists have their own take on the diet. While one approach would allow you to include meat in any one meal of the day, another would have you aim at going totally meatless twice a week, gradually taking it to not consuming meat on five out of seven days a week. The only thumb rule of the diet is to avoid as much of processed and red meat as possible and consume more of plant-based items than you did earlier.\r\n\r\nHere, animal products refer to non-vegetarian items and not dairy.');
INSERT INTO `slideshownews` (`id`, `category`, `headlines`, `image`, `newstext`) VALUES
(35, 'food', 'Genetically boosting the nutritional value of corn could benefit millions', 'images/food5.jpg', 'Rutgers scientists have found an efficient way to enhance the nutritional value of corn -- the world\'s largest commodity crop -- by inserting a bacterial gene that causes it to produce a key nutrient called methionine, according to a new study.\r\n\r\nThe Rutgers University-New Brunswick discovery could benefit millions of people in developing countries, such as in South America and Africa, who depend on corn as a staple. It could also significantly reduce worldwide animal feed costs.\r\n\r\n\"We improved the nutritional value of corn, the largest commodity crop grown on Earth,\" said <NAME>, study co-author and professor in the Department of Plant Biology in the School of Environmental and Biological Sciences. \"Most corn is used for animal feed, but it lacks methionine -- a key amino acid -- and we found an effective way to add it.\"\r\n\r\nThe study, led by <NAME>, a doctoral student at the Waksman Institute of Microbiology, was published online today in the Proceedings of the National Academy of Sciences.\r\n\r\nMethionine, found in meat, is one of the nine essential amino acids that humans get from food, according to the National Center for Biotechnology Information. It is needed for growth and tissue repair, improves the tone and flexibility of skin and hair, and strengthens nails. The sulfur in methionine protects cells from pollutants, slows cell aging and is essential for absorbing selenium and zinc.\r\n\r\nEvery year, synthetic methionine worth several billion dollars is added to field corn seed, which lacks the substance in nature, said study senior author <NAME>, a professor who directs the Waksman Institute of Microbiology. The other co-author is <NAME> of the Rutgers Department of Plant Biology and Sichuan Academy of Agricultural Sciences in China.\r\n\r\n\"It is a costly, energy-consuming process,\" said Messing, whose lab collaborated with Leustek\'s lab for this study. \"Methionine is added because animals won\'t grow without it. In many developing countries where corn is a staple, methionine is also important for people, especially children. It\'s vital nutrition, like a vitamin.\"\r\n\r\nChicken feed is usually prepared as a corn-soybean mixture, and methionine is the sole essential sulfur-containing amino acid that\'s missing, the study says.\r\n\r\nThe Rutgers scientists inserted an E. coli bacterial gene into the corn plant\'s genome and grew several generations of corn. The E. coli enzyme -- 3?-phosphoadenosine-5?-phosphosulfate reductase (EcPAPR) -- spurred methionine production in just the plant\'s leaves instead of the entire plant to avoid the accumulation of toxic byproducts, Leustek said. As a result, methionine in corn kernels increased by 57 percent, the study says.\r\n\r\nThen the scientists conducted a chicken feeding trial at Rutgers and showed that the genetically engineered corn was nutritious for them, Messing said.\r\n\r\n\"To our surprise, one important outcome was that corn plant growth was not affected,\" he said.\r\n\r\nIn the developed world, including the U.S., meat proteins generally have lots of methionine, Leustek said. But in the developing world, subsistence farmers grow corn for their family\'s consumption.\r\n\r\n\"Our study shows that they wouldn\'t have to purchase methionine supplements or expensive foods that have higher methionine,\" he said.'),
(36, 'gaming', 'Nintendo Switch Eshop Adds Eight New Games This Week', 'images/gam1.jpg', 'A new batch of games is coming to the Nintendo Switch Eshop. Seven more titles arrive to the digital service today, many of which are definitely worth a look for those anxious to buy something new for their Switch.\r\nOne of today\'s new releases is Yono and the Celestial Elephants, an adorable isometric puzzle-adventure game. Players must help the titular elephant Yono navigate through three dungeons, using his trunk to spray water, shoot flames, and more in order to solve puzzles. The game also features four towns full of NPCs and sidequests, as well as a variety of treasures to find. Yono and the Celestial Elephants runs for $15/£13.\r\nYou can find the full list of this week\'s Switch releases below, but some other notable ones from today include the latest ACA Neo Geo game, The King of Fighters \'95 ($8/£6.29), the wilderness survival game The Flame in the Flood: Complete Edition ($15/£15), the top-down shooter Neon Chrome ($15/£13), and chaotic platformer 88 Heroes: 98 Heroes Edition ($30/£30). Those join the bullet-hell brawler Touhou Kobuto V: Burst Battle and the retro-style platformer Tiny Barbarian DX, both of which were released earlier this week in stores and in the Eshop. Finally, a free demo for Oceanhorn is also now available to download.'),
(37, 'gaming', 'Middle-earth: Shadow Of War Graphics Settings Guide And PC Performance Tips', 'images/3301667-sowbenchmark.jpg', 'Middle-earth: Shadow of Mordor was a marquee game for benchmarking PCs back in 2014 with its expansive environments and chaotic action sequences. The recently released sequel, Shadow of War, follows suit, and we figured this new adventure into Mordor is ripe for a quick graphics settings guide with some performance tips. It\'s an open-world action game, so twitch reactions and precision aiming aren\'t really part of the equation. It\'s not exactly necessary to maintain 60+ frames-per-second (FPS), but of course you want a smooth experience with as much eye candy as possible. Shadow of War\'s System Requirements The game uses Monolith\'s own Firebird graphics engine (formerly known as LithTech), and despite having large, detailed environments, the system requirements aren\'t too demanding. However, for a more optimal experience on PC, the recommended specs provide more than enough juice as you\'ll see in our results. Minimum requirements: CPU: Intel Core i5-2300 / AMD FX-4350 GPU: Nvidia GTX 660 / AMD HD 7870 Memory: 6 GB RAM Disk Space: 70 GB Recommended: CPU: Intel Core i7-3770 / AMD FX-8350 GPU: Nvidia GTX 970 or 1060 / AMD RX 480 or 580 Memory: 12 GB RAM For the purposes of our tests, we\'re using a mid-range system that closely represents the recommended specs for the game. Our PC includes an Intel Core i5-3570K CPU, MSI GTX 970 GPU, and 8GB of RAM. A Look At Our Graphics Options Let\'s take a quick look at our options. We\'re sticking with 1080p for our resolution, but there are more than enough choices here, even allowing you to try 8K (7680x4320). V-Sync helps prevent screen tearing, although we prefer to keep it off. Dynamic resolution helps maintain consistent performance by adapting resolution in real time to how demanding the game gets; you can set the floor for how low the resolution goes. While Shadow Of War has six graphical quality presets, we\'re going custom here. Lighting, Shadows, Mesh qualities are all set to High. Texture quality is also set to High since Ultra is specifically for the 4K texture pack and requires a video card with at least 8GB of video memory. Tessellation adds more three-dimensional detail to surfaces based on mapping data; we kept this on for more visual flair. Depth of Field is an effect that blurs areas that aren\'t at the focus of the player, and you should set this to your preference. The game doesn\'t specify what type of ambient occlusion techniques it uses outright, but we found Medium to be a good balance between performance and visual quality with our specs. For anti-aliasing, we used TAA (temporal anti-aliasing). It\'s an increasingly popular technique to get rid of jaggies, since it hits a nice balance of quality and performance. You\'ll definitely want this on over FXAA (fast approximate anti-aliasing), which tends to look too blurry. Texture filtering should be set to Ultra; this basically means anisotropic filtering is set to 16x. Shadow of War does a great job of showing you what\'s going behind these graphics settings. Not only does the game explain what each setting does, but it gives you a breakdown of how the settings affect system memory and VRAM consumption. It even provides you with a neat little benchmark tool to get specific frame-time readings and FPS results through a 60-second fly by of an in-engine sequence, which is how we tested our systems. Running On Recommended Specs With our modest system close to the recommended specs and aforementioned choices in graphics settings, the benchmark results showed an average of 71 FPS. It hit a minimum of 41 FPS but just for a brief moment it got as high as 96 FPS. For the most part, the live FPS readings were consistently between the mid-60s to mid-70s. This gives you a little wiggle room if you want to bump a few other options up a notch. Verdict There were slight hitches during normal gameplay, but they were few and far between and inconsequential to the game\'s action in our experience. Visually, the game looks a little flat overall, but the PC version of Middle-earth: Shadow of War runs exceptionally well, even on modest hardware. But we were also reminded that 60 FPS at 4K resolution with the highest visual quality in modern games is still tough to attain unless you\'re willing the shell out the big bucks for the best video card available.'),
(38, 'gaming', 'Original Xbox games are still coming to Xbox One this year', 'images/gam3.jpg', 'Of all the current generation consoles on the market right now, Microsoft’s Xbox One is by far the most impressive when it comes to its commitment to backwards compatibility. \r\nAt the moment there’s an extensive list of Xbox 360 games that can be played on the Xbox One and while that’s continuing to grow, Microsoft announced plans to add original Xbox games into the mix at E3 earlier this year. \r\nMicrosoft hasn’t been forthcoming with details on exactly which original Xbox titles will be coming to Xbox One – at the moment we only know about Crimson Skies and Fuzion Frenzy. However, in a recent interview with GameSpot, Xbox head Phil Spencer did say we’d see the first of the batch released before the end of the year. \r\nThrowback\r\nWhen asked about the status of the backwards compatibility project by GameSpot, Spencer stated “We\'re close, we\'re really close.” \r\n“I have a little dashboard I go to and I can see all the games [and] where they are in getting approvals in the pipeline,” he continued. \r\n“I know the games that are coming for the original Xbox but I don\'t think we\'ve announced them all. We have to do this in partnership with partners, but we\'re still on track. I feel really good. The games look great.”\r\nBackwards compatibility on the Xbox One X will, apparently, work slightly differently to the Xbox One S. According to Spencer, Xbox has still to reveal some “interesting” details on how the feature will work on the upcoming 4K console but seems fairly certain that people will find it “interesting.”\r\nThere’s plenty of interest in original Xbox games coming to the latest consoles and although Spencer says that some of the games hold up better than others, we imagine the memories and nostalgia will more than make up for anything lacking in the visuals. \r\nThough we still don’t have an exact date for when this backwards compatibility extension will go live, we imagine Microsoft will wait until after the launch of the Xbox One X on November 7. Some time between this new console launch and Christmas would, arguably, make the most sense for the company. \r\nWe imagine original Xbox games coming to the Xbox One would tie in very neatly with the release of the revamped Duke controller which was also announced at E3 this year. Though this controller doesn’t have an exact release date, either, it’s also scheduled for before the end of 2017.'),
(39, 'gaming', 'PS3 Games Look Stunning in 4K Using Latest RPCS3 Emulator', 'images/gam4.png', 'PS3 games have never looked this good and never could on original hardware. 4K output is just the beginning, the RPCS3 emulator supports up to 10K!\r\nEmulators offer gamers the opportunity to experience old games well beyond the lifetime of the hardware they originally ran on. But with the move to HD and now 4K visuals, old games can be made to look even better than the original. We\'ve seen this with the HD upscaling included on the NES and SNES Classic, and now PlayStation 3 emulator RPCS3 has added support for up to 10K visuals.10K is still out of reach of, well, everyone for now, but the emulator update means playing games from the 11-year-old system\'s library can now be done in 4K with 16x anisotropic filtering enabled. That sounds great, but the results have to be seen to be believed. Luckily, RPCS3 took the time to create the video included below to demonstrate just how great PS3 games can look.\r\nThe majority of PS3 titles use a resolution of 1280-by-720, although some did managed 1920-by-1080. RPCS3 uses resolution scaling to increase the output with the theoretical maximum right now being 10K. However, more realistically the emulator will happily output at true 4K (3840-by-2160) by using a resolution scale of 300 percent on a 1280-by-720 game.\r\nOf course, to use RPCS3 with such high resolutions requires a good spec PC. The RPCS3 team state a dedicated graphics card with Vulkan support is all that\'s needed as most of the workload for the emulator is carried out by the CPU. The graphics card is untapped, and so it can be used for this 4K upscaling.\r\nThere is still a lot of work to be done to make RPCS3 a true alternative to PS3 hardware. Right now only 15 percent of PS3 games are marked as playable on the Compatibility List. But 15 percent of 1,438 games is still a lot of games to play while you wait for more to gain support.'),
(40, 'gaming', 'Assassins Creed returns for 10th anniversary with new Origins game', 'images/gaming5.png', 'In 2007, the \"Assassin\'s Creed\" video game was released for PS3 and Xbox 360. Players discovered a game combining action, adventure and undercover infiltration, in a context drawing on science fiction and history. The original \"Assassin\'s Creed\" took gamers to the Middle East during the age of the Third Crusade, stepping into the role of Altair, a member of the Assassin Brotherhood fighting against the Templars.\r\n\r\n\"Assassin\'s Creed\" proved an immediate hit. More than 10 million players snapped up the game, which would be the first in a long series of editions. Ten years down the line, the \"Assassin\'s Creed\" franchise has taken gamers to the four corners of the Earth and to various historical eras (the French Revolution, Renaissance Italy, Victorian England, etc.), selling some 100 million games.\r\n\r\nBack to beginnings\r\n\r\nIn recent years, the saga has been running out of steam. Gamers\' enthusiasm is no longer the same, and this has been felt in sales figures. In 2016 -- for the first time in its history -- the series took a break from releasing a new game, instead taking the time to reinvent.'),
(41, 'movies', 'Newton becomes R<NAME>\'s sixth movie selected for Oscars', 'images/movie1.jpg', '\"Newton\" may be his sixth movie to be selected as India\'s official entry to the Oscars, but veteran theatre-film actor <NAME> says awards are not his priority and doing good cinema has always been his focus.In a career spanning over three decades, Yadav has been a part of six films that were sent for the Oscars, including <NAME>’s Indo-Canadian film “Water”, Kalpana Lajmi- directed “Rudaali”, <NAME>’s “Bandit Queen” and his latest film “Newton”. Two of his films, <NAME>’s “Salaam Bombay” and <NAME>han-starrer “Lagaan”, made it to the final Oscars nominations. In an interview with PTI, Yadav says, “I have never thought about or calculated these things as my entire focus is on giving my best as an actor.\r\nI don’t pay attention on a film going for Oscars, I feel if the film is good then it will get the love and recognition it deserves. “I do my work with utmost honesty and even the films that I did – ‘Salaam Bombay’, ‘Water’, ‘Lagaan’ and ‘Newton’ – were made with honesty.” The actor says he is particular about his choice of characters and prefers doing films that he believes will leave an impact on the audience.\r\n“If the film is good then it will go anywhere, be it the Oscars or any other award. When the script is good, one gets an idea that it will do well in every which way, be it commercially or in terms of awards and international recognition. The sensibility of a director matters the most.” The actor says he disagrees with a notion that commercial films are low on content and indie films are always good. “It is a wrong perception that commercial films cannot be good. They can be good if made with good intent. The films that I acted in and got nominated for Oscars were never made with the intention of making them commercial.\r\n \r\n“But at the same time, there are big-budget films that have not done well because the story was not good. For independent cinema too, it is not easy as these films also need to have good story to become a hit.” Directed by <NAME>, “Newton” features <NAME> in the lead. It also stars <NAME>, <NAME> and <NAME>. The film released on September 22.\r\n'),
(42, 'movies', 'Padmavati: <NAME>’s bloodied Maharawal Ratan Singh is perfect foil to Deepika’s queen', 'images/movies2.jpg', '<NAME>’s first look from Padmavati is out and he plays a bloodied but unbent king. The Sanjay Leela Bhansali film also stars <NAME> and <NAME>. A week after <NAME> stunned one and all with her royal look from Padmavati, the makers of the Sanjay Leela Bhansali film have released the first look of Shahid Kapoor. Shahid plays Deepika’s onscreen husband, <NAME> in Padmavati and the king of Chittor.\r\nShahid flaunts a heavily bearded look in the poster with jewellery adding to his royal and intense look. What one can’t miss is the prominent battle scar and the look which says this king is in the midst of a battle. He may look bloodied but he is definitely unbowed. Sharing the posters, Deepika, Ranveer and Shahid wrote, “saahas, samarthya aur <NAME>”.\r\nEarlier, Shahid had revealed what went into making his character of the ‘Maharawal’ a reality, “When you are playing a king, you need to have a certain personality. At that time, the people used to not be very skinny and lean, so you need to have a manly personality. Basically for that, and to carry those outfits also, Sanjay sir (<NAME>) wanted me to be a little muscular and a little full. But I will be gaining weight in terms of muscle and not in terms of fat. This is because I am playing the character of a warrior. The Rajput kings had very strong personalities.”\r\n'),
(43, 'movies', 'Aamir hosts screening of Secret Superstar for LK Advani; film gets standing ovation', 'images/movies3.jpg', 'New Delhi: Bollywood superstar Aamir Khan, who has been on a multi-city promotional spree for \'Secret Superstar\', recently organised a special screening of the film for veteran Bharatiya Janata Party (BJP) leader L K Advani in Delhi.\r\nAdvani graced the event with his daughter and her friends, where he was warmly greeted by the actor.\r\n\'Secret Superstar,\' also starring <NAME>, received a standing ovation at the special screening.\r\nSeemingly, the film largely impacted Advani, as he was seen discussing the film at length with the \'Dangal\' star.\r\nProduced by Aamir Khan, <NAME>ao under the banner Aamir Khan Productions, Zee Studios, and Akash Chawla, \'Secret Superstar\' is written and directed by Advait Chandan.\r\nThe film is slated to release on October 19, 2017.\r\n'),
(44, 'movies', '<NAME> flexes dramatic muscle for The Foreigner', 'images/movie4.jpg', 'In The Foreigner, <NAME>, who plays a father seeking justice for the death of his daughter, lets his acting skills take centre stage. He is proud that those tears are real and not eye drops. After nearly four decades as an actor, producer, director, singer and, of course, martial artist and stuntman, <NAME> was finally awarded an honorary Oscar last November for his achievements in film.\r\nBut his best work may be yet to come.\r\nWith an eye on career longevity, the Hong Kong superstar is trying his hand at serious drama in Hollywood, though the action hasn\'t been left behind.\r\nHis new movie The Foreigner has received critical notice. Directed by <NAME> of the Bond movies Casino Royale and GoldenEye, it is currently showing here.\r\nThis is a 63-year-old\'s action movie, and Chan is not a superhero any more.\r\nInstead, he is a grieving father bent on taking revenge on a rogue cell of the Irish Republican Army (IRA) for the death of his daughter in a bomb blast in London.\r\nWHY DID YOU SIGN UP FOR THE FOREIGNER?\r\nI\'ve always wanted a change (but) it\'s so hard to get decent scripts.\r\nThey\'re always about secret police from China and Hong Kong. It doesn\'t work.\r\nAnd nobody sent me La La Land or those kinds of scripts.\r\nAnd finally, this one came. I\'ve tried singing and (voice work in animations) such as the Mandarin versions of Beauty And The Beast, Mulan, Kung Fu Panda and The Nut Job 2 and Jackie Chan Adventures.\r\nI want to be a multi-talented actor - I can do dubbing, drama, comedy. I can do so many different things.\r\nHOW DID YOU WORK ON THE DRAMATIC SCENES IN THE MOVIE?\r\nWhen I speak and the tears are coming down, those are real tears and not eye drops.\r\nIt\'s challenging for me, especially the English. And Pierce, he speaks English (that) I don\'t understand (laughs).\r\nIt\'s difficult. I have to concentrate with a dialogue coach, and I have to speak the English from my heart.\r\nWhen I go home and everybody sleeps, I have to practise my English and the dialogue, and I want to speak from the heart and not just like (in a monotone) \'You killed my family\'.\r\nActually, I think I did a pretty good job. The tears came down and the throat was tight.\r\nOF COURSE, THERE ARE FIGHT SCENES IN THE MOVIE TOO.\r\nQuan is not Superman. We had to take into account that he\'s an older gentleman and had to adjust the fight sequences.\r\nAt first, the small space made it difficult, but my team handled it.\r\nThey can handle anything. We had to focus more on military techniques and hand-to-hand combat.\r\nDO YOU HAVE A DREAM ROLE YOU WANT TO PLAY?\r\nI really want to be in a film where the whole movie is just drama, and not one punch.\r\nBut I am really scared the audience (may not) really like it. I am not there yet. Step by step, I\'ll let the audience know I am not an action star any more, I am an actor.\r\nSo I make New Police Story, Shinjuku Incident and now The Foreigner.\r\nBut between them, of course, I have Chinese Zodiac, Dragon Blade and Kung Fu Yoga.\r\nOf course, if a director hired me to do La La Land - Part 2, yes, I am going to do it (laughs).\r\nI am not a good singer, but I have a good voice.\r\nThis year, I have another new record coming out, a beautiful song and the lyrics are good... about friendship, my family, my son, the world.\r\nI hope we can translate (it) into English so everybody can understand the meaning.\r\nYOU ARE GOING TO MAKE RUSH HOUR 4 RIGHT?\r\nIt has meaning inside and I agreed to make it, otherwise it\'s just \'ha ha\'.\r\nI don\'t need those kinds of things any more. I need good movies that have meaning. That\'s what I want.\r\nAS SOMEONE WHO KEEPS SO YOUNG AND APPEARS SO HAPPY, DO YOU REALLY HAVE NOTHING TO WORRY ABOUT?\r\nThe only worry is that I cannot find a good script. In the old days, I worry about the box office. But these days, no more.\r\nYou cannot worry if this movie makes 100 or 200 million. And sometimes it\'s like gambling.\r\nYou just don\'t know if this movie is good or bad. I just know that every movie I make, I do the best I can till it\'s finished.\r\nNext year, we\'ll have Rush Hour 4, so I did The Foreigner.\r\nAnd then after Rush Hour 4, I can\'t do Rush Hour 5, I\'ve to change, maybe to another drama. I am already planning.\r\nSo I am just happy-go-lucky, treating people well, eating whatever I want, training more and if I want more ice cream, okay, 20 more minutes running (laughs).\r\nOne more steak? Okay, 100 yards. Then after that, I really am happy.\r\n'),
(45, 'movies', 'When <NAME> and Lata Mangeshkar got together', 'images/movie5.jpg', 'Veteran writer-lyricist <NAME> has been honoured with the Hridaynath Mangeshkar award. \r\n\r\nAkhtar received the honour at an event in Mumbai, which marked the 28th anniversary of Hridayesh Arts and the 80th birthday of veteran music composer Hridaynath Mangeshkar.\r\n\r\nAkhtar said he considered the award one of his highest honours as it comes from the Mangeshkar family.\r\n\r\n\"I received my first award for Zanjeer in this very hall. All those awards -- and I\'ve received many -- can be kept on one side. This one is the most special. To get an award from the Mangeshkar family is unbelievable, you can\'t think of India\'s music without them,\" he said.\r\n\r\nAkhtar, 72, recalled how Lata Mangeshkar played a pivotal role in his journey as a lyricist.\r\n\r\n\"<NAME> came to my house, said he was making Silsila and I should write the songs... I refused, saying I write poetry only for myself and script writing is enough. But he insisted and made me write the lyrics,\" he said.\r\n\r\nAkhtar said he got to know it was Lata Mangeshkar who suggested his name to Chopra as the lyricist for Silsila after Chopra\'s frequent collaborator, <NAME>, passed away.\r\n\r\n\"She (Lata) said, \'My friend has heard Javed\'s ghazals. Since you have good relations with him, make him write.\' So Lata didi was the reason I started writing songs and my first song was sung by her and Kishoreda,\" he said.\r\n\r\nHridayesh Arts, in association with Jay Satya Charitable Trust, organised a music programme titled Amrut Hriday Swar Lata, presented by Annu Kapoor Films Pvt Ltd, to salute and celebrate 75 glorious years of Lata Mangeshkar.\r\n\r\nLata said she was fortunate to sing songs written by people like Akhtar and her favourite Javed Akhtar song is Ye kahan aa gaye hum from Silsila.\r\n\r\n\"Whenever I meet him, we laugh a lot. I felt very happy giving him the award... I\'ve completed 75 years in the industry but it\'s not a big deal. I sang for the first time when I was nine with my father. Then I started singing in films and the journey has been wonderful,\" she said.'),
(46, 'music', 'Niall Horan Announces Philippines Singapore & Japan Tour Dates', 'images/music1.jpg', 'Niall Horan\'s Flicker World Tour just got even bigger. The \"Too Much to Ask\" singer announced a handful of new dates Thursday night (Oct. 26). \r\n\r\nIn 2018, he\'ll be heading to Manila on June 10, Singapore on June 12 and Tokyo from June 14-15.\r\n\r\nThe newly announced tour stops follow a short trek in New Zealand and Australia in early June 2018. From July through August, Horan will be performing throughout North America.'),
(47, 'music', '<NAME> Joins <NAME> for \'<NAME>\'', 'images/music2.jpg', 'Apple Music\'s premier web series <NAME>, a spinoff of the segment on The Late Late Show with <NAME>, has just released a teaser for its next antics-filled episode. While nearly all of the episodes have featured various comedians and actors shuttling around top-shelf pop stars, driving a high-profile guest such as <NAME> -- whose episode is set drop on Oct. 31 -- requires a sing-along heavyweight. Who better to host this very special episode than <NAME> himself?\r\n\r\nIn the clip, the two Jameses deadpan through a cop-drama skit and project their way through Usher\'s \"Yeah!\" and <NAME>lo\'s Flashdance theme, \"Maniac.\" Their singing styles are, shall we say, different from what we can hear, but it\'s enough to pique curiosity over how LeBron keeps up with Corden for the full ride.\r\n\r\nLeBron James\' episode of <NAME> drops on Apple Music on Oct. 31.'),
(48, 'music', '<NAME> & Marshmello Earn New No. 1s on Dance Charts', 'images/music3.jpg', '<NAME> prances to his first No. 1 on Billboard’s Dance/Mix Show Airplay chart (dated Nov. 4) with \"Strip That Down,\" featuring Quavo, who also scores his first leader (4-1). Previously, Payne had charted as high as No. 14 on his co-lead track with Zedd, \"Get Low.\"\r\n\r\nPayne is also the first One Direction member to top the radio-based chart, something the band never did: its signature hit, \"What Makes You Beautiful,\" rose to No. 13 in May 2012. A quick snapshot of how the singer’s other 1D mates have done reveals the following: <NAME> has two chart hits and one top 10 (\"This Town,\" No. 26 in January, and \"Slow Hands,\" No. 4 in October); former band member <NAME> has two top 10s (\"Pillowtalk,\" No. 9, 2016, and \"I Don’t Wanna Live Forever [Fifty Shades Darker],\" with <NAME>, No. 3, March 2017); <NAME> hit the chart with \"Sign of the Times\" (No. 37 in June); and <NAME> (with <NAME>) traveled to the top 10 with \"Just Hold On\" (No. 5 in March).\r\n\r\nContinuing with Dance/Mix Show Airplay, P!nk parades 17-10 with \"What About Us.\" It’s her first top 10 in five years, since \"Blow Me (One Last Kiss)\" topped the chart on Oct. 27, 2012. Overall, P!nk has 13 chart hits, including seven top 10s and four No. 1s. Last week, \"What\" became P!nk’s third Dance Club Songs No. 1.\r\n\r\nDua Lipa leads Dance Club Songs for the third time, all in 2017, with \"New Rules\" (2-1). Only Rihanna has earned more No. 1s this year (five). <NAME> first topped the chart with \"Blow Your Mind (Mwah)\" on Jan. 14 and followed with \"Be the One\" on June 24. \"New\" was remixed by NoTech, Vicetone and Alison Wonderland, among others.\r\n\r\nMarshmello marches 4-1 on Dance/Electronic Digital Song Sales with \"Silence,\" featuring Khalid. Spurred by the Oct. 12 release of Illenium’s remix, download sales soared 188 percent, to 19,000, according to Nielsen Music. The track is the first No. 1 for both the masked DJ and the singer. Meanwhile, \"Silence\" stays at the top for an eighth week on Dance/Electronic Streaming Songs (14.1 million U.S. streams, up 2 percent), rises a spot on Hot Dance/Electronic Songs (3-2) and sails 10-6 on Dance Club Songs.\r\n\r\nPlus, Cheat Codes collect their highest debut and third top 10 on Hot Dance/Electronic Songs, starting at No. 9 with \"Feels Great,\" featuring Fetty Wap and CVBZ. The track, also the second top 10 for Fetty and the first for CVBZ, sold 7,000 digital units, also good for a No. 4 entry on Dance/Electronic Digital Song Sales. With 2.7 million domestic streams, \"Feels\" also finds its way onto Dance/Electronic Streaming Songs, at No. 25. On Hot Dance/Electronic Songs, Cheat Codes also continue to own another spot in the top 10, as \"No Promises,\" featuring Demi Lovato, slips to No. 3 after three weeks at its No. 2 peak.'),
(49, 'music', '<NAME> Shares Slow-\'Burning\' Emotional New Song From \'The Thrill Of It All\'', 'images/music4.jpg', 'On Thursday (Oct. 26), <NAME> shared a new ballad called \"Burning\" that he says is his favorite track off his upcoming album, The Thrill of It All.\r\n\r\n“It’s the most personal song I’ve ever written in my life,” he said during an appearance on BBC Radio. “I was going through a really tough time last year. I live in London, and I went through a breakup. And I dealt with the breakup in a bad way, and I was just going out way too much.”\r\n\r\nThe piano-driven torch song is about the aftermath of losing a lover. The minimalist production places the spotlight on Smith’s emotive vocals, expressing the longing of lyrics like, “I’ve been burning since you left.”\r\n\r\nSmith said that music is his therapy, but it took him six weeks to get to the studio after the breakup. \r\n\r\n“I let everything go in that song,” Smith said. “And that song to me is about fame as well and the responsibilities I felt and the pressure and my relationship with my voice and how I was a bit rebellious last year. … It’s about self-destruction, that song.” '),
(50, 'music', 'Music News: Southwest Airlines adds live concerts to in-flight amenities', 'images/music5.jpg', 'Southwest Airlines has finalized an agreement with Warner Music Nashville that will expand the airline\'s series of pop-up in-air concerts. Southwest has been hosting in-air shows occasionally since 2011, and Billboard reports that the series \"has only grown in popularity over the past six years, as Southwest passengers hope that their flight will be one of the lucky ones to feature a sure-to-go-viral performance.\"\r\n\r\nTo celebrate the announcement, <NAME> played a show for passengers heading from Nashville to Philadelphia. Past performers on Southwest flights include Valerie June and the Strumbellas.'),
(51, 'politics', 'Gurdaspur Lok Sabha bypoll: Strong anti-SAD sentiments helped Congress win; it\'s premature to write off BJP', 'images/politics1.jpg', 'Punjab Congress president and three-time MLA <NAME>, also a close confidant of Punjab chief minister Capt<NAME> has won the Gurdaspur bypoll by 1.93 lakh votes. Polling for the election was necessitated by the demise of BJP leader and sitting MP, Khanna, who had represented Gurdaspur constituency in Lok Sabha earlier between 1998-2009 and 2014–2017.\r\nSingh, who had endorsed Jakhar\'s nomination for the party ticket, tweeted:\r\nUndoubtedly, it’s a big win for Congress, but it would be too early to write-off the prospects of BJP in the 2019 General Election to Lok Sabha as Opposition sees it. Especially since the party led by Prime Minister <NAME> had registered a landslide victory in 2014 Lok Sabha elections by winning 282 seats for BJP.\r\nRiding high on Sunday’s victory, the opponents have to hold their horses till 2019 before jumping to any conclusion.\r\nLet’s not forget, Congress won the Gurdaspur seat only after the demise of Khanna who had defeated the then sitting MP and Punjab state Congress president <NAME> in 2014.\r\nAccording to the locals of Gurdaspur, the actor-turned-politician like his tall and robust personality had acted like a wall in protecting his constituency from the opponents. It was he who had cracked the Lok Sabha constituency Gurdaspur comprising nine Assembly segments — Pathankot, <NAME>, Qadian, Batala, <NAME>, <NAME>ak, Gurdaspur, Sujanpur and Bhoa — and once a Congress bastion, for BJP.\r\nDespite strong anti-Shiromani Akali Dal (SAD) and anti-Badal sentiments, Khanna had won the Gurdaspur seat. It was then anticipated that barring BJP, either Congress or Aam Aadmi Party (AAP) would win. AAP had fielded its former state president <NAME>, who had strong chances to win, but all poll predictions failed in front of Khanna’s glam factor and public image.\r\nThis correspondent had the opportunity to cover the 2014 Lok Sabha polls in Punjab and in one of Khanna’s rallies in Gurdaspur, the moment the veteran actor appeared to address the public, voters requested him to narrate the lines from his 1971 superhit film Mera Gaon, Mera Desh — \"<NAME> ne do baatein seekhi hain. Ek, mauke ka fayeda uthaana. Do, dushmano ko naash karna (J<NAME> has learnt two things in life. One, to take advantage of the situation. Two, to destroy enemies).\r\nAnd Khanna proved it during the polls by emerging a winner. It was his charismatic personality and the works he carried out in his constituency that went in favour of BJP. He was instrumental in building a dozen major and minor bridges on rivers Beas, Ravi and Ujh that connect Gurdaspur with the rest of Punjab and conducted medical camps to provide free heart surgeries for poor patients.\r\nThe loss of BJP in this bypoll has been more due to its ally SAD. During the previous Pr<NAME> Badal regime, the drug menace grew exponentially in Gurdaspur, taking the form of a major social issue. The menace played an important role in turning the tide in favour of Congress, which saw Singh leading the party to power in the last Assembly polls.\r\n'),
(52, 'politics', 'Vengara bypoll results: BJP’s dismal performance shows party\'s Hindutva politics has failed to impress Kerala', 'images/politics2.jpg', 'Thiruvananthapuram: The Sunday verdict of the Vengara Assembly bypoll was most humiliating for BJP, which is on a mission to make inroads into deep south before the 2019 General Elections to Lok Sabha.\r\nMany senior cabinet ministers, chief ministers (from BJP-ruled states) and national leaders have taken part in padayatras (foot marches) with its state president <NAME> as part of the Janaraksha Yatra to save people (in Kerala) from “red and jihadi” terror. In fact, for the first time in an Assembly by-election in Kerala, BJP\'s top national and state leaders campaigned for party candidate K Janachandran Master expecting the roadshow to spin more votes, if not a sure win.\r\nBut despite a high-voltage campaign, Master could muster only 5,728 of the 122,623 votes polled, which was less than its tally of 7,015 in 2016 and 5,952 votes that the party had managed from this segment in the recent Malappuram Lok Sabha by-election.\r\nEven more humiliating was the fact that the Social Democratic Party (SDPI), which is taking lessons from the hardline Hindutva politics that the BJP practises in Kerala, went away with more votes (8,648) mainly eating into the votes of KNA Khader, the Congress-led United Democratic Front (UDF) candidate fielded by the Indian Union Muslim League (IUML).\r\nA missed opportunity?\r\nHindus constitute around 25 percent of the electorate of the Muslim-dominated constituency but they too appeared to have given a cold shoulder to BJP harping on the “jihadi terror”.\r\nIts \"development\" slogan also failed to enthuse voters at large hit hard by the demonetisation fiasco. There was an increase of 1,590 in total votes polled this time, and the youngsters too seem to have ignored the Hindutva bandwagon.\r\nMany feel that BJP’s communally charged campaign helped the ruling Communist Party of India (Marxist) in a big way to make inroads into the IUML vote bank, unleashing a communal campaign that Muslims would be safe only under its protection.\r\nEven some BJP supporters feel the party should stop Muslim bashing and instead engage with them constructively on issues like triple talaq and women empowerment and it should have fielded a non-Rashtriya Swayamsevak Sangh (RSS) candidate.\r\n\"I feel BJP committed a mistake in understanding the Muslim mind. The party could have highlighted issues like triple talaq which others fail to take up,\" said KVS Haridas, political commentator, and former editor of BJP mouthpiece in Malayalam, Janmabhoomi.\r\n\"BJP had got its traditional votes, more or less. But I feel it lost a great opportunity to field a Muslim woman candidate and make a difference from others. It should have been a real experiment for the party that is trying to expand its base in Kerala.\"\r\nHowever, Haridas feels that the BJP’s anti-red and jihadi terror blitzkrieg with regular protest marches simultaneously on the AKG Bhavan and the CPM headquarters in the national capital is more targeted at the cowbelt than Kerala.\r\nMuslims constitute 26.58 percent and Christians 18.33 percent in Kerala. People of all faiths live together in harmony in the state\'s villages and towns and has no history of communal riots.\r\n\"I have been telling the party time and again that you cannot go ahead without taking minorities into confidence in Kerala,\" he told Firstpost.\r\n\"I perceive this as a failure on the part of BJP. It has a lot of opportunities in Kerala joining hands with all democratic forces against the Communist tyranny, which is not allowing any political opponents function freely.\"\r\nThe electoral setback would not affect the ongoing statewide roadshow, said Haridas, adding that BJP national president <NAME> will join the marchers on Tuesday, when the show ends in the state capital, Thiruvananthapuram.\r\nShah had earlier skipped a show of strength in Kerala chief minister Pinarayi Vijayan\'s village where many have fallen victims to revenge killings between the two groups, and speculations were rife that the BJP chief was upset with the poor response that the Yatra evoked.\r\nIt\'s UDF vs LDF\r\n<NAME>, a voter who runs a furniture business in Vengara town, said both CPM and SDPI of the militant Popular Front of India (PFI) benefitted from the feeling of insecurity that the BJP campaign created among the Muslims.\r\nBoth parties used the alleged lynchings by cow vigilantes in northern parts of India to whip up passions and accused Congress and its allies of a soft-Hindutva approach while BJP leaders like Uttar Pradesh chief minister <NAME>, who also participated in the Janaraksha Yatra only strengthened the perception.\r\nThe warning of IUML candidate, a Communist Party of India (CPI) leader who switched sides some years ago, against the Communist dictatorship, came handy for CPM.\r\nIn the process, PP Basheer, the CPM candidate, cornered 41,917 votes, improving on his 2016 tally of 33,275, while Khader could bag only 65,227 votes, despite a sharp increase in the turnout, far below 73,804 votes his predecessor PK Kunhalikutty got.'),
(53, 'politics', '<NAME>its Virbhadra Cabinet; Joins BJP Ahead of HP Assembly Polls', 'images/politics3.jpg', 'Shimla: In a blow to the Congress ahead of Assembly polls, Himachal Pradesh Rural Development minister <NAME> today quit the Virbhadra Singh government and joined the BJP.\r\n\r\nSharma, son of former Union Communication Minister <NAME>, said, \"I have quit the Himachal cabinet and joined the BJP today\".\r\n\r\nSharma said he has been given a party ticket from Mandi.\r\n\"I have been given BJP ticket from Mandi and the party has informed me about this, he said.\r\n\r\nHimachal Pradesh is slated to go to polls on November 9 and the development comes as a blow for Virbhadra Singh who was declared the party\'s poll face last week.\r\n\r\nSharma alleged that he and his father were being sidelined and ignored in the Congress party.\r\n\r\nHe alleged that the AICC General Secretary had invited <NAME> to attend the rally of Rahul Gandhi in Mandi but when he reached the spot, he was asked not to attend the rally.\r\n\r\nIs <NAME> not a member of the Congress,\" he asked.\r\n\r\n\"I was not included in any of the committees for the assembly polls and when I asked about this from HPCC president, he said that my name was deleted at the higher level which hurt me and I decided to quit,\" he said.\r\n\r\nThe Mandi seat was represented by Sukh Ram from 1962 till November 1984, when he was elected to Lok Sabha and his prot g D.D.Thakur won the seat in 1985 while the BJP wrested the seat in 1990.\r\n\r\nIn the 1993 Assembly poll, his son <NAME> won from Mandi but after <NAME>\'s name surfaced in the Telecom scam, he was expelled from the Congress and formed Himachal Vikas Congress which entered into a post poll alliance with BJP and joined the government.\r\n\r\nWhile <NAME> won from Mandi, <NAME> was elected to the Rajya Sabha in 1998.\r\n\r\nIn the 2003 Assembly polls, <NAME> was the sole HVC member to win the election from Mandi but he joined the Congress ahead of the 2004 Lok Sabha polls.\r\n\r\n<NAME> again won from Mandi in 2007 and 2012 as a Congress candidate and is set to contest as a BJP candidate this time.'),
(54, 'politics', 'Rahul Will Take Over as Congress President Soon; Confirms <NAME>', 'images/politics4.jpg', 'New Delhi: Congress President <NAME> has confirmed that her son <NAME> will take over as the next party chief soon.\r\n\"You (the media) have been asking me about Rahul (taking over the party) for a long time. It will be done soon,\" said <NAME>, speaking on the sidelines of former president <NAME>\'s book launch in New Delhi.\r\nOn Friday, the Uttarakhand Congress has passed a resolution urging Rahul Gandhi to take over as party president. The Uttar Pradesh, Delhi and four other state units have also passed similar resolutions.\r\nRecently, the ball was set rolling for long-pending organisational polls which would also entail elections to the post of the President of the All India Congress Committee (AICC). The state Congress chiefs met in Delhi to finalise the election schedule.\r\n\r\nThe chances of Rahul finally taking over the reins of the party are high this time around. The build-up to his elevation has been slow and has been dragged for a while. That Sonia Gandhi doesn’t want to continue at the helm and wants Rahul to take over completely is a known fact. Over the past one year, it has been Rahul who has been calling the shots and taking major decisions.\r\n\r\nAs a part of the takeover strategy, Rahul has been the main face which Congress has been pitting against Prime Minister Narendra Modi in the last three years.\r\n\r\nSo, when Rahul was in the US recently, he attacked Modi for what he called his divisive politics and failed economics. And when senior ministers rushed in to defend the PM and attack Rahul, the Congress smiled as it saw in the retaliation an acknowledgement of the fact that Rahul was being seen as the main adversary to Modi.\r\n\r\nThe target-Modi strategy is also fraught with a huge risk as Congress is left with limited options for the next general elections.\r\n\r\n“Rahul vs Modi is an unequal fight, for it’s a fight between ‘democracy & tyranny’, between ‘devolution & usurpation of authority’, between ‘inclusive growth & crony capitalism’. And yes, Rahulji’s and Congress’s vision will win, for India must win for our values to be protected and preserved for posterity,” said Congress spokesperson <NAME>.\r\n\r\nOn the other hand, many Congress leaders like <NAME> have been of the view that dual power arrangement between Sonia and Rahul confuses party workers. The leadership issues, this section feels need to be sorted out to have clarity on power and command structure.\r\n\r\nRahul as party president will make one thing clear — that 2019 will be a Modi versus Rahul election.\r\n\r\n'),
(55, 'politics', 'Uttar Pradesh Civic Polls 2017 Will be Held in Three Phases From Nov 22', 'images/politics5.jpg', 'Lucknow: The Uttap Pradesh municipal elections will be held in three phases from November 22. \r\n\r\n\"24 districts will go to polls on November 22, 25 districts on November 26, and 26 districts on November 29,\" State Election Commissioner <NAME> said. Counting of votes will take place on December 1.\r\n\r\nHe said no central para-military force would be used for exercise, which will be conducted by the state police alone.\r\n\r\n\"Counting of votes polled for 16 nagar nigam, 118 nagar palika parishad and 438 nagar panchyat will be done December one,\" he said.\r\n\r\nAgarwal said 3.32 crore voters will be eligible to cast their ballots at 36,269 polling booths and 11,389 polling stations.\r\n\r\nGiving phase-wise details, he said the first phase will cover 24 districts in which 230 local bodies, spread over 4,095 wards, will got to polls.\r\n\r\nFor this phase, there will be 3,731 polling centres and 11,683 polling booths with total over 1.09 crore voters.\r\n\r\nThe second phase will cover 25 districts having 189 local bodies covering 3,601 wards.\r\n\r\nThe polls will be held at 13,776 polling booths to be set up for 1.29 crore voters, he said.\r\n\r\nIn the third and last phases, 26 districts will go to polls in which there are 233 local bodies spread over 4,299 wards.\r\n\r\nFor this phase, there will be 10,810 polling booths for over 94 lakh voters.\r\n\r\nThese polls will mark the first test for the Yogi Adityanath government which came to power in March, with the BJP getting a landslide victory.');
INSERT INTO `slideshownews` (`id`, `category`, `headlines`, `image`, `newstext`) VALUES
(56, 'science', 'Vaping as harmful as smoking regular cigarettes; may cause inflammatory lung diseases', 'images/science1.png', 'WASHINGTON: Vaping may not only be as harmful as smoking regular cigarettes, but can also trigger unique immune responses in lungs, causing deadly inflammatory diseases, a study warns.\r\n\r\nImmune responses are the biological reactions of cells and fluids to an outside substance the body does not recognise as its own. Such immune responses play roles in disease, including lung disease spurred on by cigarette use.\r\n\r\nThe study, published in the American Journal of Respiratory and Critical Care Medicine, looked at possible biomarkers of harm in the lungs and found that in some ways using e-cigarettes could be just as bad as smoking cigarettes.\r\n\r\nResearchers from University North Carolina (UNC) in the US compared sputum samples from 15 e-cigarette users, 14 current cigarette smokers and 15 non-smokers.\r\n\r\nThey found e-cigarette users uniquely exhibited significant increases in: Neutrophil granulocyte - and neutrophil-extracellular-trap (NET)-related proteins in their airways.\r\n\r\nAlthough neutrophils are important in fighting pathogens, left unchecked neutrophils can contribute to inflammatory lung diseases, such as Chronic Obstructive Pulmonary Disease (COPD) and cystic fibrosis, researchers said.\r\n\r\nE-cigarette users also showed significant increases in NETs outside the lung, researchers said.\r\n\r\nNETs are associated with cell death in the epithelial and endothelium, the tissues lining blood vessels and organs, researchers said.\r\n\r\nThe study also found that e-cigarettes produced some of the same negative consequences as cigarettes.\r\n\r\n\r\nBoth e-cigarette and cigarette users exhibited significant increases in biomarkers of oxidative stress and activation of innate defence mechanisms associated with lung disease.\r\n\r\n\r\n\"Our data shows that e-cigarettes have a signature of harm in the lung that is both similar to what we see in cigarette smokers and unique in other ways,\" said <NAME>, from the UNC School of Medicine.\r\n\r\n\r\n\"This research challenges the concept that switching to e-cigarettes is a healthier alternative,\" Kesimer said.\r\n'),
(57, 'science', 'Isro to launch Cartosat 2 sat with 30 nano sats in mid-December', 'images/science2.png', 'NEW DELHI: After the unsuccessful launch of navigation satellite IRNSS-1H, Indian Space Research Organisation (Isro) is gearing up to launch a remote sensing satellite of Cartosat-2 series along with 30 nano satellites of foreign countries in the second half of December.\r\n\r\nVikram Sarabhai Space Centre (VSSC) director Dr <NAME> said, \"Isro will be busy in launching a series of satellites from December onwards. We are targeting to launch Cartosat along with 30 nano satellites of foreign countries in the second half of December.\"\r\n\r\nHe said, \"The replacement satellite for IRNSS-1A (the first navigation satellite whose three atomic clocks, meant to provide precise locational data, had stopped working last year) will be launched soon thereafter. Both these launches will be from the first launchpad at Sriharikota as the second launchpad will be busy in launching three GSLV rockets, including the Chandrayaan-2 mission in March. \"If for any reason, Cartosat launch is delayed in December, it will also stall the launch of replacement satellite IRNSS-1I as both these launches have been planned from the first launchpad.\"\r\n\r\n'),
(58, 'science', 'Einstein\'s theory of happy living emerges in Tokyo note', 'images/science3.jpg', 'JERUSALEM: A note that <NAME> gave to a courier in Tokyo, briefly describing his theory on happy living, has surfaced after 95 years and is up for auction in Jerusalem.\r\n\r\nThe year was 1922, and the German-born physicist, most famous for his theory of relativity, was on a lecture tour in Japan.\r\n\r\nHe had recently been informed that he was to receive the Nobel Prize for physics, and his fame outside of scientific circles was growing.\r\n\r\nA Japanese courier arrived at the Imperial Hotel in Tokyo to deliver Einstein a message. The courier either refused to accept a tip, in line with local practice, or Einstein had no small change available.\r\n\r\nEither way, Einstein didn\'t want the messenger to leave empty-handed, so he wrote him two notes by hand in German, according to the seller, a relative of the messenger.\r\n\r\n\"Maybe if you\'re lucky those notes will become much more valuable than just a regular tip,\" Einstein told the messenger, according to the seller, a resident of the German city of Hamburg who wished to remain anonymous.\r\n\r\nOne note, on the stationary of the Imperial Hotel Tokyo, says that \"a quiet and modest life brings more joy than a pursuit of success bound with constant unrest.\"\r\n\r\nThe other, on a blank piece of paper, simply reads: \"where there\'s a will, there\'s a way.\"\r\n\r\nIt is impossible to determine if the notes were a reflection of Einstein\'s own musings on his growing fame, said <NAME>, the archivist in charge of the world\'s largest Einstein collection, at Jerusalem\'s Hebrew University.\r\n\r\nWhile the notes, previously unknown to researchers, hold no scientific value, they may shed light on the private thoughts of the great physicist whose name has become synonymous with genius, according to Grosz.\r\n\r\n\r\n\"What we\'re doing here is painting the portrait of Einstein -- the man, the scientist, his effect on the world -- through his writings,\" said Grosz.'),
(59, 'science', 'Driverless cars may let you choose who survives a crash', 'images/science4.png', 'LONDON: Scientists have developed a system that lets users of driverless cars take the moral decision of who should survive a potential carcrash.\r\n\r\nPrevious studies found that most people think a driverless car should be utilitarian, taking actions to minimise the amount of overall harm, which might mean sacrificing its own passengers in certain situations to save lives of pedestrians.\r\n\r\nHowever, while people agreed to this in principle, they also said they would never get in a car that was prepared to kill them.\r\n\r\n\"We wanted to explore what would happen if the control and the responsibility for a car\'s actions were given back to the driver,\" said <NAME> at the University of Bologna in Italy.\r\n\r\nResearchers designed a dial that switches a car\'s setting along a spectrum ranging from \"full altruist\" to \"full egoist\", with the middle setting being impartial.\r\n\r\nThe ethical knob would work not only for self-driving cars, but for all areas of industry that are becoming increasingly autonomous, the \'New Scientist\' reported.\r\n\r\n\r\n\"The dial will switch a driverless car\'s setting from full altruist to full egotist,\" Contissa said.\r\n\r\n\"The knob tells an autonomous car the value that the driver gives to his or her life relative to the lives of others,\" Contissa said.\r\n\r\n\r\nThe car would use this information to calculate the actions it will execute, taking into account the probability that the passengers or other parties suffer harm as a consequence of the car\'s decision, researchers said.'),
(60, 'science', 'An interstellar asteroid might have just been spotted for the first time', 'images/science5.jpg', 'Astronomers may have just spotted the first asteroid caught visiting the solar system from another star.\r\n\r\nThe Pan-STARRS 1 telescope in Hawaii discovered the object, dubbed A/2017 U1, on October 18. More observations from other telescopes around the world suggest the object’s trajectory is at an unusually steep angle to the plane on which all the planets lie, and it does not orbit the sun. A/2017 U1’s slingshot route suggests it is a recent visitor to the solar system — and is now on its way out again. The discovery was announced in a bulletin published October 25 by the International Astronomical Union’s Minor Planet Center. \r\n\r\nAll asteroids previously seen come from within the solar system and circle the sun. Even comets, which come from a distant reservoir of icy rocks in the solar system called the Oort cloud and can have highly titled orbits, still orbit the sun.\r\n\r\nAstronomers first pegged the object as a comet thanks to its elongated path, but additional telescope observations October 25 indicate it’s more likely that A/2017 U1 is an asteroid. Those observations revealed that the object looked like a single, sharp point of light, suggesting it is not a comet, which would have an extended icy halo. The asteroid is probably no more than 400 meters across and is zooming through the solar system at 25.5 kilometers per second.\r\n\r\nThe new data also supported the wacky trajectory, suggesting the object truly is a visitor from beyond. “It’s now looking very promising,” says planetary scientist Michele Bannister of Queen’s University Belfast in Northern Ireland, although she would still like to get more data to be sure. Astronomers are already planning to measure the colors in the asteroid’s reflected light to figure out what it’s made of, a clue to its origins.'),
(61, 'sports', 'Asia Cup Hockey 2017: India Thrash Pakistan 3-1 to Top Pool A', 'images/sports3.jpg', 'New Delhi: India made it three out of three victories as they thrashed Pakistan 3-1 in their final Pool A clash at the Maulana Bhasani Hockey Stadium in Dhaka on Sunday. This is India\'s fifth successive win against their arch-rivals Pakistan in international hockey.\r\n\r\nFor the \'Men in Blue\', <NAME> (17th minute), <NAME> (44th minute) and <NAME> (45th minute) got on the score-sheet, while <NAME> (48th minute) scored the lone goal for Pakistan in the final quarter.\r\n\r\nIndia had already secured a place in the round-robin Super 4 stage of the tournament after their stunning wins in the first two matches of the competition — Japan (5-1) and hosts\r\nBangladesh (7-0). But with this comprehensive victory over their neighbours, they topped the Pool A with nine points. \r\n\r\nWhile as for Pakistan, they have also progressed into the next round, courtesy of having a better goal difference than Japan (both teams were locked at four points after three matches).\r\n\r\nThe first quarter was as cagey as possible with none of the teams getting even a single clear cut chance to make the breakthrough. However, in the last minute of the first quarter, Pakistan were awarded a penalty corner but they made a hash of it.\r\n\r\nIndia finally got the breakthrough in the second minute of the second quarter with Chiglensana scoring the first goal of the match. The 25-year-old was given acres of space inside the Pakistan circle and he finished emphatically.\r\n\r\nIndia goal-keeper <NAME> then came to the fore and made a couple of scintillating diving saves to keep India\'s lead intact at half-time.\r\n\r\nPakistan where down to nine-men early in the third quarter as Rizwan Senior and Mahmud were shown respective yellow cards for dangerous play. However, India failed to capitalise as Pakistan defended well.\r\n\r\nIndia finally doubled their lead in the 44th minute when Harmanpreet hit a fantastic cross from the middle of the pitch and Ramandeep dove full-length to guide the ball into the net. Then in the dying seconds of the third quarter, skip<NAME> drilled home the ball into the bottom right corner of from a penalty corner to triple India\'s advantage.\r\n\r\n<NAME> got a consolation goal for Pakistan in the fourth quarter but India held on to record another famous win over their fierce rivals.\r\n'),
(62, 'sports', 'FIFA U-17 World Cup: Event\'s Turnout Has Pipped 2011 ICC WC Feels Ceppi', 'images/sports4.jpg', 'Kolkata: FIFA Under-17 World Cup tournament director <NAME> on Sunday said the event has been more successful than the ICC World Cup 2011 in terms of spectators turnout, adding the \"doors are now open\" for India to get next edition\'s U-20 World Cup.\r\n\r\nTaking a 36-match cut-off after the end of group stage, Ceppi said the spectators mark has crossed a phenomenal 800,000, which is more than the 2011 Cricket World Cup, and double than what the last edition in Chile had witnessed. \"This was a make or break. If you\'re not able to deliver then the doors would have closed definitely. Now the doors remain open. How it\'s done in the future we need to see. Possibility will be there for Indian football,\" Ceppi said about India\'s bid for hosting the FIFA U-20 World Cup in 2019.\r\n\r\n\"At this point of time, we are looking at a record attendance here in India 2017. It\'s also over with the first 36 matches of the ICC World Cup 2011 which is usually considered here as the gold standard for a World Cup in terms of attendance,\" he added.\r\nThere has been a frenzy around the sport since the tournament kicked off. \"We feel that really football has taken over. That\'s the reality. People are coming here we have seen enthusiasm of people that we did not foresee. We had an average crowd of 49,000 for India matches. It\'s huge.\" Ceppi said there has been an unprecedented demand for tickets for the final from various state governments that speaks volumes of the success and it augurs well for India who have formally submitted a bid to host the next U-20 World Cup.\r\n\r\n\"The outcome of India hosting further high level football events is positive. People have realised now. You do not know how many calls I\'ve received from abroad from friends and football fans saying, \'it looks fantastic at least on TV\'. \"It shows that the amount of noise that people are making, the enthusiasm the quality of football has sent out a positive message.\"\r\n\r\n\"We needed to first focus on delivering this one. If we could not deliver this one then definitely the doors will be closed.\" The Salt Lake Stadium, which has a capacity of 66687, will host the final on October 28 and tickets have been sold out well in advance.\r\n\r\n\"For the final, even I don\'t have a ticket. The craze the final has generated is amazing. My phone has not stopped ringing, with requests from strange quarters that has nothing to do with the World Cup that they want passes for the final. And that\'s a great problem to have.\r\n\r\n\"We were told that we have not done enough marketing but what better marketing than having on an average getting 23000 people, having more people than the ICC Cricket World Cup 2011 at this stage?\" he asked.\r\n\r\n\"It feels like a senior World Cup to me in terms of enthusiasm, passion and sheer numbers. It\'s commendable,\" he summed up the mood. Apart from the six cities that are hosting the World Cup, India have infrastructure coming up in Ahmedabad, Bengaluru, Chennai, Bhubaneswar and Trivendrum and Ceppi said it would help in spreading out a global event like a World Cup.\r\n\r\n\"Should India bid to host other events, there would be options apart from the cities that has hosted. At the end of the day you would like the tournament to spread out. \"For the nation, if it wants to bid for an Under-20 World Cup or for other World Cups I feel the other facilities that are coming up in the country that would be in a good position to be the frontrunners.\" Head of coaching, player development and technical study group, <NAME>, summed up the mood. \"I would say it\'s easy to get a ticket of El Clasico than a final game of the U-17 World Cup in Kolkata at the moment.\"\r\n'),
(63, 'sports', 'Swansea City’s record at Arsenal offers hope says <NAME>', 'images/sports5.jpg', 'Swansea City can take heart from their past performances at Arsenal as they prepare to visit The Emirates Stadium on Saturday seeking to turn their season around, the club’s former Gunners goalkeeper <NAME> has said.\r\nSwansea have won on two of their last three Premier League visits to Arsenal, with Fabianski concentrating on keeping his emotions in check as he prepares to return to his old club.\r\n“We have done well at Arsenal in the past – the club have managed some good results at The Emirates and it’s always been a tricky game for Arsenal,” said the Poland keeper, who spent seven years with the London club before joining Swansea in 2014.\r\n“We’ve beaten them in the past so going into this game, we can take confidence from that.”\r\nAdvertisement:Resume Ad\r\nSwansea’s last league trip to Arsenal ended in a 3-2 defeat but they beat Arsene Wenger’s side on their previous two visits.\r\n“Going back to The Emirates in the first season after I joined Swansea was special… but now I try to approach each game without putting too many emotions into it… it’s just about trying to get a result,” Fabianski added.\r\n<NAME>’s Swansea side have had a tough start to the season, sitting 15th with eight points after nine games. The Welsh club lost to Leicester City in their last game but Fabianski believes they can get back on track.\r\n“It has been a tricky start for us but hopefully we’ll start turning things around very soon. I don’t think there’s too much lacking – we are not that far away from getting to where we want to be.”'),
(64, 'sports', 'India unlikely to play any \'four-day\' Tests in near future', 'images/sports5.png', 'NEW DELHI: The ICC has decided to start with four-day Test matches on a trial basis but the Indian cricket team is unlikely to play the curtailed version of the longest format in near future.\r\n\r\nThe decision to introduce four-day Test was taken during recent ICC board meeting in Auckland with South Africa and Zimbabwe set to play the inaugural four-day \'Test\' on the \'Boxing Day\'.\r\n\r\nHowever BCCI wants to stick to traditional format as has been recommended by the Anil Kumble-led ICC Cricket Committee, which was against this experimental move.\r\n\r\n\"India will not play any four-day Test matches, atleast in the near future. Any Test match involving India will be a five-day affair,\" a senior BCCI official privy to developments said on conditions of anonymity.\r\n\r\n\"The BCCI believes that there is a lot of merit in Anil Kumble-led Cricket Committee\'s recommendations that duration should not be tinkered with. But since four-day Test matches are bi-partite agreements, if two nations are okay, they will go ahead with it,\" the official said.\r\n\r\nThe other reason for BCCI not warming up to four-day Test is because there are no points awarded for the proposed Test league. \"Only five-day Tests will have points that will be counted for the World Test Championship. What\'s the point in playing matches that won\'t count for anything. In any case, if we play Ireland or Afghanistan also, it will be five-day affairs,\" the official said.\r\n\r\nAsked if near future, the broadcasters start pressurising for curtailed Test matches, the official said: \"We will cross that bridge when it comes.\" \r\nIt is learnt that ICC\'s main aim towards promoting four-day Test is to ensure that Ireland and Afghanistan are eased into the system along with Zimbabwe being able to remain competitive.\r\n\r\n\r\n\"Let\'s be practical. For Ireland or Afghanistan, it will be very difficult that they can be competitive in a five-day format straightaway. If Test matches against these countries end inside three days or little over it, it is only logical that four-day Tests are tried out,\" an official of a member board said.'),
(65, 'sports', 'PV Sindhu Kidambi Srikanth carry India\'s hopes at Denmark Open', 'images/sports6.png', 'ODENSE: Title-contenders P V Sindhu and Kidambi Srikanth would look to put behind the disappointment of an early exit from Japan Open and make a positive start to their campaign at the $750,000 Denmark Open Super Series Premier, which begins here on Tuesday.\r\n\r\nRio Olympics and World Championship silver medallist Sindhu has been in rampaging form this season as she has already bagged two titles at the India Open and Korea Open respectively.\r\n\r\nAfter a gruelling week at Seoul last month, she couldn\'t sustain the intensity and suffered a second-round defeat against Japan\'s Nozomi Okuhara - an opponent she had some fierce battles recently - at the Japan Open at Tokyo.\r\n\r\nThe second seeded Indian, however, will be fresh after a three-week training and would look to make amends when she opens her campaign against World No. 10 China\'s Chen Yufei, a rival she had beaten in the World Championship in August.\r\n\r\nChinese seventh seed He Bingjiao is likely to stand in Sindhu\'s way to the semi-finals. The left-handed Chinese has a 5-4 record against Sindhu even though the Indian had beaten her at Korea Open.\r\n\r\nSlowly finding her foot back after battling her way through a career-threatening injury last year, <NAME> will be looking for her first super series win in 16 months. She had won the Australia Open last year in June, 2016 before a knee injury derailed her Rio Olympics dream.\r\n\r\nThe World No. 12 bagged a bronze at the World Championship but she lost to Carolina Marin at the Japan Open in the second round and the Indian will be itching for a revenge when she faces the fifth seeded Spaniard in the opening round here.\r\n\r\nThe duo are locked 4-4 in head-to-head count but the last time Saina had beaten Marin was at the 2015 Dubai World Superseries Finals. The Indian has lost twice in straight games to Marin in the last two meetings and she would need a determined effort to get across the newly-crowned Japan Open champion.\r\n\r\nIn men\'s singles, Srikanth starts as hot favourite after his three back-to-back final appearances out of which he won two titles at Indonesia and Australia.\r\n\r\nThe World No. 8 had two creditable quarterfinal finishes at Glasgow World Championship and Japan Open and he would be looking for another title after he opens his campaign against a qualifier.\r\n\r\nIf Srikanth can cross the first two rounds, a familiar foe in World Champion and local favourite Viktor Axelsen might be waiting for him at the quarters.\r\n\r\nAmong other Indians in fray, <NAME> and <NAME> have showed that they are no pushovers after their good run this season.\r\n\r\nWhile Praneeth clinched his maiden Super Series title at Singapore beating Srikanth in the final, Prannoy bagged the US Open Grand Prix Gold title besides creating a flutter after dumping heavyweights Lee Chong Wei of Malaysia and China\'s Chen Long in Indonesia Open.\r\n\r\nPrannoy and Praneeth will look to put their best foot forward when they face Denmark\'s Emil Holst and Hans-Kristian Vittinghus respectively in the opening round.\r\n\r\nSameer Verma, who won the Syed Modi Grad Prix Gold, will take on a qualifier and is expected to clash with Axelsen in the second round.\r\n\r\nIndian men\'s doubles pair of <NAME> and <NAME>, <NAME> and <NAME> are also in the fray. '),
(66, 'technology', 'Radio telescopes help astronomers measure Milky Way', 'images/tech1.jpg', 'A collection of radio telescopes that spans thousands of miles and is remotely operated from central New Mexico has measured a span of 66,000 light-years (one light-year is equal to 6 trillion miles) from Earth across the Milky Way’s center to a star-forming area near the edge of the other side of the galaxy. Astronomers say they hope to measure additional points around the galaxy to produce a map — the first of its kind — over the next decade.\r\n<NAME> of Germany’s Max-Planck Institute for Radio Astronomy said in a news release that using the Very Long Baseline Array, which is remotely operated near Socorro, allows astronomers to “accurately map the whole extent of our galaxy,” the Albuquerque Journal reported.\r\n<NAME>, a senior radio astronomer at the Harvard-Smithsonian Center for Astrophysics who worked on the project, said they hope to create the map by measuring additional points around the galaxy. So far, they have measured around 200. Reid said 100 or so observations must be done from the Earth’s southern hemisphere, so he will be traveling to Australia in the future to use telescopes there.\r\nAlthough the data for the 66,000 light-year measurement was collected in 2014 and 2015, the team has spent the time since then analyzing it, Reid said. “It’s not like you get a Hubble (Space Telescope) space image,” he said. While there are artistic renderings of what the Milky Way probably looks like, this effort will yield a highly accurate image, Reid said.\r\n'),
(67, 'technology', 'A new technology promises to speed up slow Internet at home', 'images/tech2.jpg', 'NEW YORK: A new technology promises to speed up slow Internet at home, say researchers, adding that the new hardware can enable speed up to 10,000 megabits-per-second (Mbps) or 10 gigabits-per-second (Gbps).\r\n\r\nFor a super-fast yet low-cost broadband connection at home in Britain, the new receiver technology can enable dedicated data rates at more than 10,000 Mbps from the current 36 Mbps, noted researchers from the University College London.\r\n\r\n\"Although 300 Mb/s may be available to some, average UK speeds are currently 36 Mb/s. By 2025, average speeds over 100 times faster will be required to meet increased demands for bandwidth-hungry applications such as ultra-high definition video, online gaming and the Internet of Things (IoT),\" explained lead researcher <NAME>.\r\n\r\n\"The future growth in the number of mobile devices, coupled with the promise of 5Gto enable new services via smart devices, means we are likely to experience bandwidth restrictions; our new optical receiver technology will help combat this problem,\" he added in a paper published in the journal Nature Communications.\r\n\r\nThe receiver is used in optical access networks - the links connecting Internet subscribers to their service providers.\r\n\r\nREAD MORE: Internet of Things: Wave of future is at home\r\n\r\nThe new receiver retains many of the advantages of coherent receivers but is simpler, cheaper and smaller - requiring just a quarter of the detectors used in conventional receivers.\r\n\r\nSimplification was achieved by adopting a coding technique to fibre access networks that was originally designed to prevent signal fading in wireless communications.\r\n\r\nThis approach has the additional cost-saving benefit of using the same optical fibre for both upstream and downstream data.\r\n\r\n\"This simple receiver offers users a dedicated wavelength, so user speeds stay constant no matter how many users are online at once. It can co-exist with the current network infrastructure,\" said Erkilinc.\r\n\r\nThe receiver was tested on a dark fibre network installed between Telehouse (east London), UCL (central London) and Powergate (west London).\r\n\r\nThe team successfully sent data over 37.6 km and 108 km to eight users who were able to download or upload at a speed of at least 10 Gbps.\r\n'),
(68, 'technology', 'Tech companies have only 26per cent women in engineering roles: Survey', 'images/tech3.jpg', ' The overall representation of women in the engineering workforce of IT firms is just 34 per cent, according to a survey.\r\n\"The average number of women (irrespective of their function) in tech companies, we found that the overall representation was 34 per cent,\" according to survey by Belong on the gender gap in the tech industry in India.\r\nBelong survey looked at all tech companies in the country and found that there is one woman engineer as against three men engineers, leading to the fact that the Indian technology industry has just 26 per cent women in engineering roles.\r\nThe Belong survey was done with ITES companies with over 50 employees and the data was collected from around three lakh women.\r\nThis reinforces the assumption that science, technology, engineering, and math (STEM) jobs attract less women, the survey added.\r\nAfter analysing the career trajectories of techies, who moved into managerial positions and data, the survey found that the transition of men on an average to managerial positions is usually after six years of experience while women move to these roles after eight years of experience.\r\nFurther, the survey has revealed that as many as 45 per cent of women move out of core engineering roles after close to eight years.\r\nAfter quitting engineering, these women mostly move to marketing, product management or consulting, it added.\r\nIt said, among the tech talent in India, there are more women in software testing roles (a less sought after skill) compared to core programming roles.\r\nThis is the case even though the absolute number of jobs in software testing are significantly less than programming, it added.\r\nBelong survey also revealed that for every 100 testing jobs, there were 34 women compared to 66 men.\r\nWhen it came to hardcore programming roles, the ratio changed to 25:75, it added.\r\nThe survey found that if 29 per cent women start working in a given year, the percentage drops to a dismal 7 per cent after 12 years.\r\nThe biggest drop-off in pure numbers is after the first five years, it said.\r\nOne of the major reasons for this is that women often take a break to start a family around this time in their lives, and many do not return to the workforce, it said.\r\nThere have been initiatives by many big companies to tap these lost talents and bring back these women, it said.\r\nFrom leadership development programmes and special incentives to refer women candidates, Indian IT companies are using innovative techniques to hire and retain tech talent of the opposite gender, it added. PTI SM RMT MKJ\r\n\r\n'),
(69, 'technology', 'NEW DELHI: Russia\'s technology transfers to India in the defence sector have been without any strings attached', 'images/tech4.jpg', 'His comments come at a time when leading defence manufacturers from across the globe are eyeing India\'s growing market by offering technology transfer and joint ventures for developing fighter jets, submarines and other military platforms. \r\n\r\n\"When it comes to technology transfer, Russia really offers everything they have from the heart without any strings attached,\" Deo said at an event to celebrate 70 years of diplomatic ties between India and Russia. \r\n\r\n In May, the government had unveiled the strategic partnership model under which select private firms will be roped in to build military platforms like submarines and fighter jets in India in partnership with foreign entities. \r\n\r\nNoting that there was scope for expansion of India\'s defence ties with Russia, Air Marshal Deo also said the relationship should be developed focusing more on commercial aspects. \r\n\r\n \"The time has come for the relationship to be more on a commercial basis. It can be a win-win situation for both Russia and India,\" he said. \r\n'),
(70, 'technology', 'New details on Microsofts foldable tablet revealed', 'images/tech5.png', 'NEW DELHI: Previous patent filings have already given us hints that Microsoft is indeed working on a foldable device. But Windows Central has unearthed some new information about the particular device.\r\nAccording to the report, the prototype device is being called as \'Andromeda\'. It is a foldable tablet of sorts that becomes \"pocketable\" when folded. It has been also mentioned that the device runs Windows 10 built with Windows Core OS along with CShell. Details on CShell are scarce at the moment. However, it might be playing an important role in the \'foldable\' aspect of the tablet.\r\nFurthermore, the foldable tablet could come with telephony abilities. This, along with the foldable design, is likely to pit it against large screen smartphones or phablets. However, the report says that the device is not meant to replace smartphones.'),
(71, 'travel', 'India is now among fastest-growing medical tourism destinations', 'images/travel1.jpg', 'Ayurveda, yoga and wellness industry in India set it apart from other medical tourism destinations in the world.\r\n\r\nEstimating that medical tourism in the country can grow to become a $9 billion industry by 2020, a government official on Thursday said India is among the \"fastest growing medical tourism destinations in Asia\".\r\n\"During the early days of medical tourism, the attention was always given to developed countries,\" said <NAME>, Secretary, Ministry of Commerce.\r\n\"It has now shifted to Asia, and India is among the fastest growing medical tourism destinations in Asia,\" she said, addressing the third edition of Advantage Healthcare India 2017 summit, being held here by Ficci.\r\n\r\n\r\nMedical tourism, wherein people travel outside their countries for medical treatment, is estimated to be a $3 billion-worth industry.\r\nAyurveda, yoga and wellness industry in India set it apart from other medical tourism destinations in the world, the official said.\r\n\"Ayurveda has managed to catch the attention of many countries, especially European countries. The government will continue to focus on global acceptance of Ayurveda on the lines of Chinese medicine,\" she said.\r\n<NAME>, Principal Secretary of Department of IT, Biotechnology and Tourism for Karnataka, said: \"Karnataka, with direct connectivity to world capitals, and 56 medical colleges, and 19 National Accreditation for Hospitals and Healthcare Providers (NABH) accredited hospitals, is soon going to come out with a medical and wellness tourism policy.\"\r\nAlso Read: Looks like you might finally get to use hygienic toilets in Indian trains\r\nIndia can be a $9 billion-worth medical tourism destination by 2020, Gupta said.\r\nAccording to a recent Ficci report, over 500,000 foreign patients seek treatment in India every year.\r\nThe international summit on medical tourism is being organised by Ficci, along with the Ministry of Commerce and Industry and its Services Export Promotion Council (SEPC).\r\nThe three-day summit has over 700 delegates taking part in it from over 50 countries like the US, Russia, Saudi Arabia and United Arab Emirates, among others.\r\nWatch: How Indians like to plan their holiday\r\n'),
(72, 'travel', 'Indians are always on social media while vacationing reveals survey', 'images/travel2.jpg', 'Indians top ahead of Thailand and Mexico when it comes to using social media while holidaying, says a survey conducted by Expedia.\r\nIndians love to be connected all the time, however, it also means that they do not disconnect from work much.\r\nIndians are globally most anxious on not being able to access WiFi or internet to check work e-mail (59 per cent). In fact they lead in showing a preference for an airline that offers in-flight WiFi (33 per cent).\r\nAds by ZINC\r\nHence, 14 per cent Indians are always working on a vacation, #1 globally, followed by the US (seven per cent) and Brazil (six per cent).\r\nAlso Read:Are we really craving experiences or have our vacations become just about pictures?\r\nSocial media is emerging as strong driving force in creating vacation happiness with Indians being number one in always taking selfies (22 per cent), posting photos on social media (22 per cent), \"checking in\" on social media (21 per cent) and connecting with others through social media (19 per cent), said the Expedia survey.\r\nThe survey included 15,363 respondents, across 17 countries (US, Canada, Mexico, Brazil, UK, France, Germany, Italy, Spain, Netherlands, Belgium, Australia, New Zealand, Japan, South Korea, India and Thailand)\r\nThe survey also highlighted that even though Indians are social media obsessed beach-goers who spend the majority of their time uploading pictures and video, 24 per cent of their compatriots find it very annoying, said the statement.\r\n\r\n'),
(73, 'travel', 'For three years this guy has been walking from Estonia to Singapore living in people\'s houses', 'images/travel3.jpg', 'You have heard of globetrotters before--from those who sold all their property to those who are traversing the world naked, all for the love of travel.\r\nWhile each may be exceptional in his or her own efforts, the way Meigo Mark is living his travel adventures is too good to be true.\r\nMark is a 27-year-old traveller from Estonia, who started his expedition with about Euros 8 (Rs 611.08) in his pocket and a tent to camp in, reported Her World Online. How could he even buy a flight ticket with that much money? Well, he didn\'t; he set out on his journey on foot.\r\nAds by ZINC\r\nMark had always nurtured his passion for travel, but it was in May, 2014, that he decided to embark on a new adventure--to walk around the world. And in these three years, he has walked all the way from Estonia to Singapore.\r\nWhat is it that motivated him to take up such a challenge?\r\nMark had heard about <NAME>, a Canadian TED Talk speaker and author, who spent 11 years to complete his feat. Besides, he had heard inspirational stories of other explorers like Sir <NAME> <NAME>, who single-handedly sailed around the world in the 1960s.\r\nAlso Read: This couple is travelling all over the world, but doing it naked\r\nSoon, Mark sold his house and started walking around the world. He walked 30-40 km on an average, followed by periods of rest that could span between a day and two weeks. To mark his route, he followed Google Maps and Maps.Me, to enjoy walking through peaceful neighbourhoods rather than busy highways. He crossed rivers and seas on boats, ferries, ships and airplanes, but stuck to walking when on land.\r\nHowever, Mark is no regular tourist, visiting famous attractions across destinations. He is a traveller, in the true sense of the term, who, for all these years, took to couchsurfing, not to save money, but to avail the opportunity to learn about people and their cultures, which included villages of Sikkim and Assam too.\r\n\r\nOn one hand, he slept with humble workers in their slum. On the other, he had lunch with mafia-type drug dealers, armed with guns.\r\n\"The longer I travel, the more optimistic I get about humans and our willingness to help each other when in need,\" Mark was quoted as saying by the website. \'\'Meeting so many different social groups, I\'ve found ways to see not just the differences but the similarities, which make us human and help us connect. We both see the same sun and moon. As a traveller, it\'s interesting to see what\'s different in terms of culture, food and language, but at the same time, I try to see the similarities,\'\' he added.\r\n\r\n'),
(74, 'travel', 'From Goa to Greece Airbnb wants the travel-mad Indian millennial to ditch the hotel room', 'images/travel4.jpg', 'From roping in Bollywood celebrities to partnerships with local state governments, Airbnb, the online marketplace for accommodation, is trying to get the Indian millennial hooked to its global community of travelers.\r\nThe California-based company is flexing its marketing muscles in Asia’s third-largest economy, where affluent and increasingly experimental Indians are travelling a lot more. This, even as it continues to add to its relatively small network of 24,000 listings in India.\r\nSo far, a million Indians have used the room-sharing and rental platform, both at home and abroad.\r\nNow, the company is stepping up efforts to get more Indians—those travelling overseas as well as those booking weekend trips to local destinations—to plan their travel using Airbnb. Edited excerpts from an interview with <NAME>, country manager, Airbnb India.\r\nYou’ve been more visible in India over the last two years, what cues are you getting from the market to step up efforts here?\r\nOur company is about nine years old, and a number of Indians started using the platform when they heard about it from friends back then.\r\n\r\n'),
(75, 'travel', 'Singapore passport now the world\'s most powerful one with highest visa-free score', 'images/travel5.jpg', 'The Passport Index has announced Singapore\'s passport as the most powerful passport in the world with the highest visa-free score.\r\n\r\nIt is the first time in the history that an Asian country has aced the highest place in the Passport Index. Singapore\'s passport has a visa-free score of 159.\r\nThe Singapore passport holders now have visa-free access to 173 countries around the world.\r\n\r\nEarlier, Germany and Sweden were at the top positions but Singapore reached the top after Paraguay altered its visa requirements for Singaporean passports.\r\nHow Passport Index ranks passports?\r\nThe passports are ranked by cross-border access and visa-free score.\r\n\r\nWhat is visa-free score?\r\n\r\nVisa-free indicates visa-free travel or visa on arrival travel.\r\n\r\nAll the top passports that are considered to be powerful are European but with Singapore topping the list, looks like a gateway for Asian countries has been opened. For this new development, passports of 193 United Nations member countries and six territories were considered.\r\n\r\nSince early 2017, the top position was shared with Singapore, which was steadily moving up the ranks.\r\n\r\nOther Asian passports in the top 20 include those of South Korea, Japan and Malaysia.\r\n\r\nUS passports, however, have fallen in the ranking since President <NAME> took office after Turkey and the Central African Republic revoked their visa-free status to the U.S. passport holders, recently.\r\n\r\nSingapore was also fourth this year in the Visa Restrictions Index, another ranking of travel freedom, which uses a different method of calculating how \"powerful\" a passport is.'),
(76, 'world', 'One week later firefighters gain ground on historic California fires', 'images/world1.jpg', 'A week after a series of the most deadly, devastating fires in California history began roaring across a wide swath of rich wine country north of San Francisco, authorities say the worst may finally be over.\r\n\r\n“Conditions have drastically changed from just 24 hours ago, and that is definitely a very good sign,\" California Department of Forestry and Fire Protection spokesman <NAME> said Sunday. \"And it’s probably a sign we’ve turned a corner on these fires.\"\r\n\r\nBerlant said most of the fires are more than half contained. The toll, however, has been heavy: At least 40 dead, more than 5,000 homes, businesses and other buildings destroyed. About 75,000 residents who fled the fires remained away from their homes Sunday.\r\n\r\nBut there was some good news Sunday. About 25,000 people were allowed to return to their neighborhoods, the fire threat finally extinguished. Red flag warnings, issued when weather and other conditions are prime for the combustion and spread of wildfires, were dropped Sunday.\r\n\r\nIn Sonoma County, which along with Napa County has been burdened with the vast majority of the deaths and destruction, authorities on Sunday began assessing evacuated areas to determine the extent of infrastructure and other damages.\r\n\r\n\"In short, it\'s a step closer to moving our displaced residents back home !!!\" the sheriff\'s office said in a Facebook update.\r\nIn Napa, all city evacuation advisories were lifted. Napa County Fire Chief <NAME> said he doubts the blazes will reach Calistoga, a tourist town of more than 5,000 people known for its resorts, hot springs and mud baths that has been evacuated since last week.\r\n\r\nBiermann, however, said low humidity remained an issue, and that gains made while the winds have been fairly light could slow if they kick up again.\r\n\r\n\"We\'re not out of the woods, but we\'re making tremendous progress,\" he said.\r\n\r\nNapa supervisors Chairwoman <NAME> said the county expects no additional evacuations. The focus of the county\'s efforts, she said, was moving from rescue to recovery.\r\n\r\n\"A week ago this started as a nightmare, but the day we dreamed of has arrived,\" Ramos said. \"It\'s a long road to recovery. I look forward to the day when this can be a distant memory, when we can recall that we were resilient and we got through this together.\"'),
(77, 'world', 'Stop threatening nuclear catastrophe; US warns N Korea', 'images/world2.jpg', 'The United States does not want war with North Korea, the US military chief said on the demilitarised zone metres away from the communist state, as he warned Pyongyang to stop threatening \"catastrophe\" with its nuclear weapons.\r\n\r\n<NAME> made the brief comments standing next to South Korean Defence Minister <NAME> on Friday, describing <NAME>-un\'s leadership as an \"oppressive regime\" that mistreats its people while its neighbour to the south offers a vibrant democracy.\r\n\r\n\"Our goal is not war but rather the complete, verifiable, and irreversible denuclearisation of the Korean Peninsula,\" Mattis was quoted as saying by South Korea\'s Yonhap news agency at Panmunjom village.\r\n\r\nThe United States has about 30,000 American troops stationed in South Korea, a remnant of the 1950-1953 war on the peninsula that has never officially ended, with only an armistice agreement signed.\r\n\r\nSong said North Korea can never use its nuclear weapons. \"If it does, it will face retaliation by the strong combined force of South Korea and the US,\" he warned.\r\n\r\nNorth Korea must to return to dialogue between the two Koreas, Song added.\r\n\r\nThe threat of nuclear war has escalated in recent months as President <NAME> has intensified his rhetoric against Kim\'s regime, including saying he would \"totally destroy\" North Korea if it threatened the US or its allies.\r\n\r\nPyongyang responded by threatening to detonate a nuclear weapon in the atmosphere after its sixth and most powerful underground nuclear test last month. '),
(78, 'world', 'No end to standoff as Catalan leader rules out election', 'images/world3.jpg', 'Barcelona, Spain - Catalonia\'s President <NAME> has ruled out calling a snap election, as a standoff between Madrid and separatists pushing for the region\'s independence intensified.\r\n\r\nThe Catalan leader on Thursday said he would not dissolve the regional parliament after not receiving enough assurances from the Spanish government that it would not press ahead with a move to impose direct rule over the independence-seeking region.\r\n\r\n\"I was ready to call an election if guarantees were given,\" he told reporters in Catalonia\'s capital, Barcelona.\r\n\r\n\"There is no guarantee that justifies calling an election today,\" added Puigdemont.\r\n\r\nPuigdemont said it was up to the regional parliament to decide how Catalonia should respond to Madrid\'s plans to suspend the region\'s autonomy in the wake of an October 1 referendum.\r\n\r\nThe Spanish senate will vote on Friday on whether to trigger Article 155 of Spain\'s constitution, a move that would allow the central government in Madrid to directly administer Catalonia.\r\n\r\nThe untapped, two-paragraph article allows broad discretion for the administration of regional governments. \r\n\r\nThe measure requires an absolute majority in order to pass. Spanish Prime Minister <NAME> heads a minority government and needs the support of the Spanish Socialist Party (PSOE) to enact Article 155.\r\n\r\nA PSOE spokesperson had previously said that if Puigdemont called elections, triggering Article 155 would not be necessary.\r\n\r\nEarlier, reports had suggested that Puigdemont would announce a snap regional election, in what was seen as a plan to foil Madrid\'s plan to take direct control of Catalonia.\r\n\r\nThe elections were one of three options \"on the table\" for Puigdemont, according to <NAME>, president of the Catalan Parliament.\r\n\r\nThese included a declaration of independence, a declaration of independence with subsequent elections, or elections without independence.\r\n\r\n\'Exercise of irresponsibility\'\r\n\r\nCatalans voted in a disputed independence referendum on October 1 that was ruled illegal by the Spanish Constitutional Court and met with police violence, which was condemned by rights groups and European leaders.\r\n\r\nThe Catalan government said 90 percent voted for independence, but turnout was less than 50 percent.\r\n\r\nPuigdemont announced independence on October 10, but suspended the declaration after eight seconds to encourage dialogue with Madrid.\r\n\r\nNo dialogue is known to have taken place. \r\n\r\nFollowing Puigdemont\'s announcement, Spanish Vice President <NAME> said she regretted that Puigdemont had decided not to go to the Senate \"to argue against Article 155\".\r\n\r\nShe told the parliament must \"comply with a legal, democratic and legal obligation. The obligation of any government is to respect and enforce the laws\".\r\n\r\n\"The political conflict did not begin as a cause of independence but as an exercise of irresponsibility that has been growing,\" she told the senate, admonishing the Catalan leader saying \"he has not lacked options for dialogue\". \r\n\r\nAhead of Puigdemont\'s announcement, hundreds of protesters had gathered outside the Palace of the Government in Barcelona\'s Gothic quarter waiting to hear the Catalan leader speak.\r\n\r\nThey waved the Estelada, the one-starred Catalan flag used to represent an independent Catalan republic, and chanted \"Out! Out! Out! The Spanish flag!\" and other pro-independence slogans.');
INSERT INTO `slideshownews` (`id`, `category`, `headlines`, `image`, `newstext`) VALUES
(79, 'world', 'Torrential downpours cause major flooding in Tanzania', 'images/world4.jpg', 'Seasonal rains have brought record-breaking wet weather to parts of Tanzania. The heavy downpours have led to widespread flooding, resulting in major travel disruptions.\r\n\r\nMeteorologist <NAME> reported that the worst of the flooding had occurred along Tanzania\'s northern coast. Much of the infrastructure has been damaged, and the main highway to the nation\'s largest city, Dar es Salaam, has been cut off from the north of the country.\r\n\r\nThe international airport at Dar es Salaam had 174mm of rain on Thursday. This was the heaviest October rainfall since records began in 1918. The October average is 69mm.\r\n\r\nMany places in the region broke their 24 hour rainfall records. Kibaha had its wettest day in 53 years with 178mm of rain.\r\n\r\nThere have been many accidents and many roads will remain closed for some time. Dozens of homes and businesses have been submerged underwater because of swollen rivers and mudslides.'),
(80, 'world', 'Everything you need to know about Iceland\'s election', 'images/world5.jpg', 'Reykjavik, Iceland - Iceland heads to the polls on Saturday with 10 parties on the ballot and amid a dark shadow of corruption. Here is everything you need to know:\r\nWhy is this election important?\r\n\r\nIn a word - corruption. Iceland is holding parliamentary elections for the second time in just under a year after the government collapsed in September, following a scandal by the governing Independence Party.\r\n\r\nThis follows close on the heels of the collapse of the government a year prior in 2016 when Iceland\'s then Prime Minister, <NAME> of the Progressive Party, was the first political casualty from the fallout of the Panama Papers after it was revealed that he had been keeping a secret offshore bank account.\r\nWhat\'s at stake here?\r\n\r\nTackling corruption in government is again a leading force in the elections, as it was last year.\r\n\r\n\"Trust in the parliament and the system as a whole continues to be the deciding factor,\" says <NAME>dottir, who is running for the Pirate Party in East Reykjavik, \"without it efforts to form government will be difficult.\"\r\n\r\nBut it is unclear how public outrage at the latest scandal will translate at the voting booth. Most Icelandic voters are concerned with quality of life issues, particularly healthcare and the cost of housing.\r\n\r\nTourism is booming in Iceland, but the windfall has driven up the cost of living, and young Icelanders in Reykjavik can\'t afford to buy a home.\r\n\r\nThe distribution of natural resources, particularly fishing rights for the country\'s mainstay - cod - is also an important issue, as is ratifying the new constitution that was written five years ago, but remains to be adopted.\r\n\r\n\"Political corruption, including the blatant failure of parliament to ratify the new post-crash constitution, has trumped economic recovery in the minds of many voters,\" says <NAME>, Professor of Economics at the University of Iceland.\r\n\r\n\"The strong opposition of the Independence Party to the new constitution, mainly to please its paymasters among the oligarchs in the fishing industry but also, more generally, to preserve the status quo across the board, frustrates many of their traditional voters.\r\n\r\n\"The Independence Party has become the face of Iceland\'s political corruption.\"\r\n\r\nIf the Independence Party loses this election, it will likely be viewed as a referendum on corruption. In this charged international political climate where every election is seen as a referendum on Trumpism, many will be watching which way Iceland goes.\r\nWhy should we care about Iceland?\r\n\r\nStrategically positioned between Europe and North America at the edge of the Arctic Circle, for a country of only 324,000 people with no army, Iceland often plays an outsized role on the world stage.\r\n\r\nIceland led the global economic collapse in 2008. It was a refuge for WikiLeaks founder <NAME> where he spent time working on WikiLeaks. It is a country that has seen several major corruption scandals in the past decade, including ties to Trump Soho through investments by the FL Group.\r\n\r\nIceland is also the oldest parliamentary system, dating back more than 1,000 years. The country is a world leader in women\'s rights, boasting the highest status of women of any country according to the World Economic Forum\'s gender gap index, and has the largest percentage of women in parliament of any country without a quota system - 48 percent.\r\n\r\nThe country has a strong environmental movement, running almost entirely on renewable energy, and a strong direct democracy movement. The constitution was re-written by crowdsourcing input from the public, and the young populist Pirate Party party has 15 percent of parliamentary seats.\r\nWhy did the government collapse?\r\n\r\nIn September the Bright Future party pulled out of a centre-right coalition government, forcing snap elections, after it was revealed that <NAME>, the father of the Prime Minister <NAME>, had written to the Ministry of the Interior a letter of support to \"restore the honour\" of a convicted pedophile.\r\n\r\nThe entire affair, kept out of public sight, was uncovered by members of the Pirate Party and the Left-Greens after another controversial \"restoring the honour\" in a sexual abuse case gained public attention.\r\nHow does the vote work?\r\n\r\nIceland\'s Parliament, called the Althing, is comprised of 63 representatives who are elected from six provinces by proportional representation. Voting is done by paper ballot, avoiding the pitfalls of potential electronic vote hacking and fraud that the United States is now contending with. The election is set for Saturday, but voting has been open for several weeks in various locations.\r\n\r\nThe president of Iceland, <NAME>, who is elected in a separate voting process, gives the mandate to form a government typically to the party with the most votes. The centre-right Independence Party has led the Parliament for a great majority of the past 73 years that the country has been independent.\r\nWhy does the Independence Party keep winning?\r\n\r\nThat\'s the question many voters keep asking themselves.\r\n\r\n\"It\'s what people are familiar with\", or \"it\'s how their parents voted\", is how most people explain the steady support for the Independence Party.\r\n\r\nDuring the run-up to last year\'s parliamentary elections, international interest was piqued by the possibility that the Pirate Party would take over after they started polling far ahead of the pack. But the Pirates ended up finishing third behind the Independence Party and the Left-Greens, with 10 parliamentary seats.\r\n\r\nPresident <NAME> gave the mandate first to the Independence Party, then to the Left-Greens, then to the Pirates. All were unsuccessful in forming a coalition government. After three months, the Independence Party finally put together a coalition with the Bright Future and Reform parties.\r\nWho is going to win the elections?\r\n\r\nIcelanders often say everyone in Iceland is an artist or poet, and during this election cycle it feels like almost everyone is running for office. There are dozens of small parties across the country, and new ones form every year. There are 10 parties on the ballot for Saturday.\r\n\r\nThe question many Icelanders are asking themselves is not who will win, but who they should even vote for. And, of course, there are apps to help. One app, provided by RUV, the state TV channel, allows users to select answers to a series of questions about the issues, and then the app ranks which party the user most closely aligns with. The app has had more than 100,000 views.\r\n\r\nWhoever takes power will have a lot to contend with. Because of the snap elections, there is no budget yet for 2018, and a number of groups are planning to strike in reaction to the massive 40 percent pay rise that was handed down to MPs and government bureaucrats following last years elections.');
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE `user` (
`user_id` bigint(20) UNSIGNED NOT NULL,
`username` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
`fname` varchar(60) NOT NULL,
`lname` varchar(60) NOT NULL,
`email` varchar(50) NOT NULL,
`interests` text NOT NULL,
`phone` bigint(20) NOT NULL,
`gender` char(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`user_id`, `username`, `password`, `fname`, `lname`, `email`, `interests`, `phone`, `gender`) VALUES
(1, 'firstUser', '12345678*', 'abc', 'def', '<EMAIL>', 'gaming,', 1112223334, 'M'),
(2, 'secondUser', 'jhdsfd83', 'afs', 'dsi', '<EMAIL>', 'sports,', 98237595, 'f'),
(3, 'Bunny', 'mamochan', 'Usagi', 'Tsukino', '<EMAIL>', 'food,gaming,movies,music,fashion,travel,', 30061978, 'f'),
(4, 'AshaVani', '1234vani', 'Asha', 'Hanji', '<EMAIL>', 'books,business,education,fitness,food,movies,music,fashion,travel,', 9820247830, 'f'),
(5, 'vani123', '12345678jj', 'Shivani', 'Hanji', '<EMAIL>', 'books,business,education,gaming,', 7666824529, 'f'),
(6, 'bd123', '123456jj', 'Bhavesh', 'Dhirwani', '<EMAIL>', 'business,education,fitness,gaming,', 12345678, 'm'),
(7, 'zkdjfhg', 'fg6h54gf5h', 'acdd', 'hhhh', '<EMAIL>', 'books,business,', 12121212121, 'f'),
(8, 'jhdfvjfdhvj', 'd5h4fg5h', 'fgh', 'rthgf', '<EMAIL>', 'automobiles,', 2121354, 'f'),
(9, 'RB', 'abc12345', 'RB', 'RB', '<EMAIL>', 'automobiles,education,food,technology,', 1111111111, 'f'),
(10, 'KawaiiKami', 'mamapapa<3', 'Yui', 'Patel', '<EMAIL>', 'books,food,gaming,science,technology,', 9082429434, 'f'),
(13, 'bhav1234', 'abcdefgh', 'Bhavesh', 'Dhirwani', '<EMAIL>', 'business,fitness,', 9619971839, 'm');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `comments`
--
ALTER TABLE `comments`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `messages`
--
ALTER TABLE `messages`
ADD PRIMARY KEY (`email`);
--
-- Indexes for table `news`
--
ALTER TABLE `news`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `slideshownews`
--
ALTER TABLE `slideshownews`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`user_id`),
ADD UNIQUE KEY `username` (`username`),
ADD UNIQUE KEY `email` (`email`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `news`
--
ALTER TABLE `news`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=81;
--
-- AUTO_INCREMENT for table `slideshownews`
--
ALTER TABLE `slideshownews`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=110;
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `user_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
SET foreign_key_checks = 0;
#
# TABLE STRUCTURE FOR: notifications
#
DROP TABLE IF EXISTS `notifications`;
CREATE TABLE `notifications` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`image` text NOT NULL,
`type` varchar(100) NOT NULL,
`type_id` int(11) NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT '1',
`sort_order` int(11) NOT NULL,
`created_by` int(11) NOT NULL,
`modified_by` int(11) NOT NULL,
`created_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modified_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
INSERT INTO `notifications` (`id`, `image`, `type`, `type_id`, `status`, `sort_order`, `created_by`, `modified_by`, `created_date`, `modified_date`) VALUES (2, '', '', 0, 1, 0, 0, 0, '2018-12-03 14:15:22', '2018-12-03 14:15:22');
#
# TABLE STRUCTURE FOR: notification_details
#
DROP TABLE IF EXISTS `notification_details`;
CREATE TABLE `notification_details` (
`id` int(11) NOT NULL,
`language_id` int(11) NOT NULL,
`title` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`description` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`,`language_id`),
KEY `notification_details_ibfk_2` (`language_id`),
CONSTRAINT `notification_details_ibfk_1` FOREIGN KEY (`id`) REFERENCES `notifications` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `notification_details_ibfk_2` FOREIGN KEY (`language_id`) REFERENCES `languages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `notification_details` (`id`, `language_id`, `title`, `description`) VALUES (2, 1, 'test', 'test');
INSERT INTO `notification_details` (`id`, `language_id`, `title`, `description`) VALUES (2, 2, 'test', 'test');
#
# TABLE STRUCTURE FOR: notification_to_users
#
DROP TABLE IF EXISTS `notification_to_users`;
CREATE TABLE `notification_to_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`notification_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`is_view` tinyint(1) NOT NULL,
PRIMARY KEY (`id`,`notification_id`,`user_id`),
KEY `notification_id` (`notification_id`),
KEY `user_id` (`user_id`),
CONSTRAINT `notification_to_users_ibfk_1` FOREIGN KEY (`notification_id`) REFERENCES `notifications` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `notification_to_users_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=latin1;
INSERT INTO `notification_to_users` (`id`, `notification_id`, `user_id`, `is_view`) VALUES (74, 2, 5, 0);
INSERT INTO `notification_to_users` (`id`, `notification_id`, `user_id`, `is_view`) VALUES (75, 2, 1, 0);
INSERT INTO `notification_to_users` (`id`, `notification_id`, `user_id`, `is_view`) VALUES (76, 2, 4, 0);
INSERT INTO `notification_to_users` (`id`, `notification_id`, `user_id`, `is_view`) VALUES (77, 2, 3, 0);
INSERT INTO `notification_to_users` (`id`, `notification_id`, `user_id`, `is_view`) VALUES (78, 2, 2, 0);
#
# TABLE STRUCTURE FOR: user_devices
#
DROP TABLE IF EXISTS `user_devices`;
CREATE TABLE `user_devices` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`provider` varchar(20) NOT NULL,
`type` varchar(20) NOT NULL,
`code` text NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT '1',
`created_by` int(11) NOT NULL,
`modified_by` int(11) NOT NULL,
`created_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modified_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
CONSTRAINT `user_devices_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
INSERT INTO `user_devices` (`id`, `user_id`, `provider`, `type`, `code`, `status`, `created_by`, `modified_by`, `created_date`, `modified_date`) VALUES (1, 2, 'firebase', 'andorid', '123', 1, 0, 0, '2018-12-03 10:15:19', '2018-12-03 14:04:20');
INSERT INTO `user_devices` (`id`, `user_id`, `provider`, `type`, `code`, `status`, `created_by`, `modified_by`, `created_date`, `modified_date`) VALUES (2, 5, 'pushy', 'andorid', 'sss', 1, 0, 0, '2018-12-03 10:36:09', '2018-12-03 14:04:28');
INSERT INTO `user_devices` (`id`, `user_id`, `provider`, `type`, `code`, `status`, `created_by`, `modified_by`, `created_date`, `modified_date`) VALUES (3, 1, 'firebase', 'andorid', '1232', 1, 0, 0, '2018-12-03 11:00:18', '2018-12-03 14:09:38');
SET foreign_key_checks = 1;
|
<reponame>mbustamanteAseinfo/configManager
/* Script Generado por Evolution - Editor de Formulación de Planillas. 16-01-2017 12:34 PM */
begin transaction
delete from [sal].[fcu_formulacion_cursores] where [fcu_codpai] = 'pa' and [fcu_nombre] = 'ISR_Salario';
insert into [sal].[fcu_formulacion_cursores] ([fcu_codpai],[fcu_proceso],[fcu_nombre],[fcu_descripcion],[fcu_select_edit],[fcu_select_run],[fcu_field_codemp],[fcu_modo_asociacion_tpl],[fcu_loop_calculo],[fcu_updatable]) values ('pa','Planilla','ISR_Salario','Calcula la renta del salario','select 0 codemp, 0.00 salario_quincenal, 0.00 isr_anual, 0.00 isr_quincenal, 0.00 rap_retenido, 0.00 rap_acumulado, 0.00 rap_proyectado, 0.00 rap_desc_legal, 0.00 rap_periodos_restantes','declare @codcia int, @codrsa int, @codpai varchar(2), @codppl int
set @codcia = $$CODCIA$$
set @codppl = $$CODPPL$$
set @codrsa = gen.get_valor_parametro_int (''CodigoRubroSalario'',null,null,@codcia,null)
select @codpai = cia_codpai
from eor.cia_companias
where cia_codigo = @codcia
select codemp,
salario_quincenal,
salario_anual,
isr_anual,
(case when convert(numeric(12,2), ((isr_anual - rap_retenido) / rap_periodos_restantes)) < 0 then 0 else convert(numeric(12,2), ((isr_anual - rap_retenido) / rap_periodos_restantes)) end) isr_quincenal,
rap_retenido,
rap_acumulado,
rap_proyectado,
rap_desc_legal,
rap_periodos_restantes
from (
select codemp, salario_anual, salario_quincenal, convert(numeric(12,2), (salario_anual - excedente) * porcentaje / 100 + valor) isr_anual, rap_retenido
, rap_acumulado, rap_proyectado, rap_desc_legal, rap_periodos_restantes
from gen.get_valor_rango_parametro(''TablaRentaMensual'', @codpai, null, null, null, null),
(select rap_codemp codemp, rap_acumulado + rap_proyectado + convert(numeric(12,2), ese_valor / 2.00) * isnull(dva_dias / 15, 1) - rap_desc_legal salario_anual, convert(numeric(12,2), ese_valor / 2.00) salario_quincenal, rap_retenido, rap_periodos_restantes
, rap_acumulado, rap_proyectado, rap_desc_legal
from sal.rap_renta_anual_panama
join exp.ese_estructura_sal_empleos
on ese_codemp = rap_codemp
left join (
select vac_codemp, isnull(sum(isnull(dva_dias, 0)), 0) dva_dias
from acc.dva_dias_vacacion
join acc.vac_vacaciones
on vac_codigo = dva_codvac
where dva_codppl = @codppl
group by vac_codemp
) vacaciones
on vac_codemp = rap_codemp
where ese_estado = ''V''
and ese_codrsa = @codrsa
and rap_codcia = @codcia
and rap_codppl = @codppl
) v
where salario_anual >= inicio
and salario_anual <= fin
) w
order by codemp
','codemp','TodosExcluyendo',0,0);
commit transaction;
|
<reponame>sumankhadka/mycrm
-- Adminer 4.2.2 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `installer`;
CREATE TABLE `installer` (
`id` int(1) NOT NULL,
`installer_flag` int(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `installer` (`id`, `installer_flag`) VALUES
(1, 1);
DROP TABLE IF EXISTS `tbl_accounts`;
CREATE TABLE `tbl_accounts` (
`account_id` int(11) NOT NULL AUTO_INCREMENT,
`account_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`description` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
`balance` decimal(18,2) NOT NULL DEFAULT '0.00',
`permission` text COLLATE utf8_unicode_ci,
PRIMARY KEY (`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `tbl_accounts` (`account_id`, `account_name`, `description`, `balance`, `permission`) VALUES
(1, '<NAME> - Cash in Hand', '', 8068.02, NULL),
(2, '<NAME> - Cash in Hand', '', 74037.00, NULL),
(3, 'Shoaib - Cash in Hand', '', 0.00, NULL);
DROP TABLE IF EXISTS `tbl_account_details`;
CREATE TABLE `tbl_account_details` (
`account_details_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`fullname` varchar(160) COLLATE utf8_unicode_ci DEFAULT NULL,
`company` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
`city` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL,
`country` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`locale` varchar(100) COLLATE utf8_unicode_ci DEFAULT 'en_US',
`address` varchar(64) COLLATE utf8_unicode_ci DEFAULT '-',
`phone` varchar(32) COLLATE utf8_unicode_ci DEFAULT '-',
`mobile` varchar(32) COLLATE utf8_unicode_ci DEFAULT '',
`skype` varchar(100) COLLATE utf8_unicode_ci DEFAULT '',
`language` varchar(40) COLLATE utf8_unicode_ci DEFAULT 'english',
`departments_id` int(11) DEFAULT '0',
`avatar` varchar(200) COLLATE utf8_unicode_ci DEFAULT 'uploads/default_avatar.jpg',
PRIMARY KEY (`account_details_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
INSERT INTO `tbl_account_details` (`account_details_id`, `user_id`, `fullname`, `company`, `city`, `country`, `locale`, `address`, `phone`, `mobile`, `skype`, `language`, `departments_id`, `avatar`) VALUES
(1, 1, '<NAME>', '-', NULL, NULL, 'en_US', '-', '+923135511226', '0172361125', 'skype', 'english', 0, 'uploads/20140101_165740.jpg'),
(3, 3, '<NAME>', '-', NULL, NULL, 'ur_PK', '-', '', '03135503110', 'rehan.codite', 'english', 0, 'uploads/rehan.jpg'),
(4, 4, '<NAME>', '-', NULL, NULL, 'ur_PK', '-', '', '03336846266', '', 'english', 0, 'uploads/shoaib[1].jpg');
DROP TABLE IF EXISTS `tbl_activities`;
CREATE TABLE `tbl_activities` (
`activities_id` int(11) NOT NULL AUTO_INCREMENT,
`user` int(11) NOT NULL,
`module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
`module_field_id` int(11) DEFAULT NULL,
`activity` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`activity_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`icon` varchar(32) COLLATE utf8_unicode_ci DEFAULT 'fa-coffee',
`value1` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`value2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`deleted` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`activities_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `tbl_activities` (`activities_id`, `user`, `module`, `module_field_id`, `activity`, `activity_date`, `icon`, `value1`, `value2`, `deleted`) VALUES
(1, 1, 'settings', 1, 'Update General Settings', '2015-12-11 20:13:52', 'fa-coffee', 'CodeBite', NULL, 0),
(2, 1, 'settings', 1, 'Update Password', '2015-12-11 20:14:32', 'fa-coffee', 'admin', NULL, 0),
(3, 1, 'settings', 1, 'Update Profile', '2015-12-11 20:15:14', 'fa-coffee', 'Raja Amer Khan', NULL, 0),
(4, 1, 'settings', 1, 'Update System Settings', '2015-12-11 20:16:19', 'fa-coffee', 'english', NULL, 0),
(5, 1, 'settings', 1, 'Update Email Settings', '2015-12-11 20:16:39', 'fa-coffee', '<EMAIL>', NULL, 0),
(6, 1, 'user', 3, 'activity_added_new_user', '2015-12-11 20:18:26', 'fa-user', 'rehan', NULL, 0),
(7, 1, 'user', 3, 'activity_change_status', '2015-12-11 20:18:51', 'fa-user', '1', NULL, 0),
(8, 1, 'settings', 1, 'Update Invoice Settings', '2015-12-11 20:19:42', 'fa-coffee', 'INV-', NULL, 0),
(9, 1, 'settings', 1, 'Update Theme Settings', '2015-12-11 20:19:56', 'fa-coffee', 'Billing Accounting and CRM Software', NULL, 0),
(10, 1, 'settings', 1, 'Update Theme Settings', '2015-12-11 20:20:02', 'fa-coffee', 'Billing Accounting and CRM Software', NULL, 0),
(11, 1, 'settings', 1, 'Update Theme Settings', '2015-12-11 20:20:07', 'fa-coffee', 'Billing Accounting and CRM Software', NULL, 0),
(12, 3, 'user', 3, 'activity_added_new_user', '2015-12-11 20:20:12', 'fa-user', 'rehan', NULL, 0),
(13, 1, 'settings', 1, 'Update Theme Settings', '2015-12-11 20:20:12', 'fa-coffee', 'Billing Accounting and CRM Software', NULL, 0),
(14, 1, 'settings', 1, 'Update Theme Settings', '2015-12-11 20:20:31', 'fa-coffee', 'Billing Accounting and CRM Software', NULL, 0),
(15, 1, 'settings', 1, 'Update Theme Settings', '2015-12-11 20:20:40', 'fa-coffee', 'Billing Accounting and CRM Software', NULL, 0),
(16, 1, 'settings', 1, 'Update Theme Settings', '2015-12-11 20:20:44', 'fa-coffee', 'Billing Accounting and CRM Software', NULL, 0),
(17, 1, 'settings', 1, 'Update Theme Settings', '2015-12-11 20:20:51', 'fa-coffee', 'Billing Accounting and CRM Software', NULL, 0),
(18, 1, 'settings', 1, 'Update Theme Settings', '2015-12-11 20:21:02', 'fa-coffee', 'CodeBite Clients Panel', NULL, 0),
(19, 3, 'settings', 1, 'Update Department ', '2015-12-11 20:23:44', 'fa-coffee', 'Sales Department', NULL, 0),
(20, 3, 'settings', 2, 'Update Department ', '2015-12-11 20:24:01', 'fa-coffee', 'Support Department', NULL, 0),
(21, 1, 'account', 1, 'activity_save_account', '2015-12-12 18:16:45', 'fa-circle-o', 'Cash in Hand - Raja Amer Khan', NULL, 0),
(22, 1, 'account', 1, 'activity_update_account', '2015-12-12 18:17:14', 'fa-circle-o', 'Raja Amer Khan - Cash in Hand', NULL, 0),
(23, 1, 'account', 2, 'activity_save_account', '2015-12-12 18:17:28', 'fa-circle-o', '<NAME> - Cash in Hand', NULL, 0),
(24, 1, 'account', 3, 'activity_save_account', '2015-12-12 18:17:42', 'fa-circle-o', 'Shoaib - Cash in Hand', NULL, 0),
(25, 1, 'transactions/expense', NULL, 'Expense information added', '2015-12-12 18:27:35', 'fa-coffee', '<NAME> - Cash in Hand', '9000', 0),
(26, 1, 'transactions/expense', NULL, 'Expense information added', '2015-12-12 18:32:42', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '2142', 0),
(27, 1, 'transactions/expense', NULL, 'Expense information added', '2015-12-12 18:34:13', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '40000', 0),
(28, 1, 'transactions/expense', NULL, 'Expense information added', '2015-12-12 18:34:44', 'fa-coffee', '<NAME> - Cash in Hand', '40000', 0),
(29, 1, 'client', 2, 'Update new Client ', '2015-12-12 18:42:03', 'fa-user', '<NAME>', NULL, 0),
(30, 1, 'client', 2, 'Add new Client ', '2015-12-12 18:42:55', 'fa-user', '<NAME>', NULL, 0),
(31, 1, 'invoice', 1, 'Invoice created ', '2015-12-12 18:44:47', 'fa-circle-o', 'INV-0001', NULL, 0),
(32, 1, 'invoice', 1, '0', '2015-12-12 18:46:42', 'fa-circle-o', 'INV-0001', NULL, 0),
(33, 1, 'invoice', 2, 'Invoice created ', '2015-12-12 18:47:06', 'fa-circle-o', 'INV-0001', NULL, 0),
(34, 1, 'invoice', 1, 'Invoice items added ', '2015-12-12 18:47:37', 'fa-circle-o', 'AlbatoolQuran.com', NULL, 0),
(35, 1, 'invoice', 2, 'Invoice new payment', '2015-12-12 18:48:35', 'fa-usd', '₨ 8000', 'INV-0001', 0),
(36, 1, 'transactions/deposit', NULL, 'Deposit information added', '2015-12-12 18:59:46', 'fa-coffee', 'Shoaib - Cash in Hand', NULL, 0),
(37, 1, 'transactions/expense', NULL, 'Expense information added', '2015-12-12 19:07:09', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '4200', 0),
(38, 1, 'transactions/expense', NULL, 'Expense information added', '2015-12-12 19:07:46', 'fa-coffee', 'Shoaib - Cash in Hand', '5800', 0),
(39, 1, 'user', 4, 'activity_added_new_user', '2015-12-12 19:14:00', 'fa-user', 'shoaib', NULL, 0),
(40, 1, 'user', 3, 'activity_added_new_user', '2015-12-12 19:14:35', 'fa-user', 'rehan', NULL, 0),
(41, 1, 'mailbox', 1, 'Mail Sent', '2015-12-12 19:19:34', 'fa-circle-o', '<EMAIL>', NULL, 0),
(42, 1, 'user', 1, 'activity_change_status', '2015-12-12 19:20:19', 'fa-user', '0', NULL, 0),
(43, 1, 'user', 1, 'activity_change_status', '2015-12-12 19:20:22', 'fa-user', '1', NULL, 0),
(44, 1, 'mailbox', 1, 'Mail Sent', '2015-12-12 19:24:54', 'fa-circle-o', '<EMAIL>', NULL, 0),
(45, 1, 'client', 1, 'Deleted Client', '2015-12-12 19:30:39', 'fa-user', '<NAME>', NULL, 0),
(46, 1, 'transactions/expense', NULL, 'Expense information added', '2015-12-13 11:19:35', 'fa-coffee', '<NAME> - Cash in Hand', '4283.60', 0),
(47, 3, 'mailbox', 3, 'Mail Sent', '2015-12-14 07:12:38', 'fa-circle-o', '<EMAIL>', NULL, 0),
(48, 1, 'client', 3, 'Update new Client ', '2015-12-19 17:42:06', 'fa-user', '<NAME>', NULL, 0),
(49, 1, 'invoice', 3, 'Invoice created ', '2015-12-19 17:43:11', 'fa-circle-o', 'INV-0003', NULL, 0),
(50, 1, 'invoice', 2, 'Invoice items added ', '2015-12-19 17:43:44', 'fa-circle-o', 'Domain + Hosting + Website', NULL, 0),
(51, 1, 'transactions/deposit', NULL, 'Deposit information added', '2015-12-19 17:47:28', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', NULL, 0),
(52, 1, 'transactions/deposit', NULL, 'Deposit information added', '2015-12-19 17:47:44', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', NULL, 0),
(53, 1, 'invoice', 3, 'Invoice new payment', '2015-12-19 17:48:09', 'fa-usd', '₨ 10000', 'INV-0003', 0),
(54, 1, 'transactions/expense', NULL, 'Expense information added', '2015-12-19 17:51:30', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '948.38', 0),
(55, 3, 'transactions/expense', NULL, 'Expense information added', '2015-12-24 16:43:23', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', '3000', 0),
(56, 1, 'transactions/expense', NULL, 'Expense information added', '2015-12-26 08:32:25', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '2360', 0),
(57, 1, 'transactions/expense', NULL, 'Expense information added', '2015-12-26 08:33:00', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '6285', 0),
(58, 1, 'client', 4, 'Update new Client ', '2015-12-28 12:00:09', 'fa-user', 'PayPal', NULL, 0),
(59, 1, 'invoice', 4, 'Invoice created ', '2015-12-28 12:00:49', 'fa-circle-o', 'INV-0004', NULL, 0),
(60, 1, 'invoice', 3, 'Invoice items added ', '2015-12-28 12:01:40', 'fa-circle-o', 'Received from CanadaWebServices.com', NULL, 0),
(61, 1, 'invoice', 4, 'Invoice new payment', '2015-12-28 12:01:54', 'fa-usd', '₨ 56238', 'INV-0004', 0),
(62, 1, 'transactions/expense', NULL, 'Expense information added', '2015-12-28 12:02:56', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '240', 0),
(63, 1, 'transactions/deposit', NULL, 'Deposit information added', '2015-12-28 12:03:32', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', NULL, 0),
(64, 1, 'transactions/expense', NULL, 'Expense information added', '2015-12-29 08:19:51', 'fa-coffee', 'Re<NAME>q - Cash in Hand', '450', 0),
(65, 1, 'transactions/expense', 17, 'Expense information Deleted', '2015-12-29 08:22:28', 'fa-coffee', '<NAME> - Cash in Hand', '450.00', 0),
(66, 1, 'transactions/expense', NULL, 'Expense information added', '2015-12-29 08:22:45', 'fa-coffee', '<NAME> - Cash in Hand', '450', 0),
(67, 1, 'transactions/expense', NULL, 'Expense information added', '2015-12-29 08:23:48', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '8300', 0),
(68, 1, 'transactions/expense', NULL, 'Expense information added', '2015-12-29 08:26:58', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '1500', 0),
(69, 1, 'transactions/expense', NULL, 'Expense information added', '2015-12-31 10:43:50', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '180', 0),
(70, 1, 'transactions/expense', NULL, 'Expense information added', '2015-12-31 10:44:08', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '700', 0),
(71, 1, 'transactions/expense', NULL, 'Expense information added', '2016-01-05 17:57:56', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '40000', 0),
(72, 1, 'transactions/expense', NULL, 'Expense information added', '2016-01-05 17:58:50', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', '40000', 0),
(73, 1, 'transactions/expense', NULL, 'Expense information added', '2016-01-05 17:59:12', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', '6000', 0),
(74, 1, 'transactions/expense', NULL, 'Expense information added', '2016-01-05 17:59:30', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', '220', 0),
(75, 1, 'transactions/expense', NULL, 'Expense information added', '2016-01-06 09:05:50', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', '3000', 0),
(76, 1, 'transactions/expense', NULL, 'Expense information added', '2016-01-10 17:54:06', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', '320', 0),
(77, 3, 'transactions/deposit', NULL, 'Deposit information added', '2016-01-12 19:38:45', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', NULL, 0),
(78, 3, 'transactions/deposit', NULL, 'Deposit information added', '2016-01-12 19:39:18', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', NULL, 0),
(79, 1, 'invoice', 5, 'Invoice created ', '2016-01-14 06:40:47', 'fa-circle-o', 'INV-0005', NULL, 0),
(80, 1, 'invoice', 4, 'Invoice items added ', '2016-01-14 06:41:25', 'fa-circle-o', 'Payments from Canada Web Services', NULL, 0),
(81, 1, 'invoice', 4, 'Invoice items updated', '2016-01-14 06:41:37', 'fa-circle-o', 'Payments from Canada Web Services', NULL, 0),
(82, 1, 'invoice', 4, 'Invoice items updated', '2016-01-14 06:41:46', 'fa-circle-o', 'Payments from Canada Web Services', NULL, 0),
(83, 1, 'invoice', 5, 'Invoice new payment', '2016-01-14 06:42:00', 'fa-usd', '₨ 51004', 'INV-0005', 0),
(84, 1, 'client', 5, 'Update new Client ', '2016-01-14 06:42:26', 'fa-user', 'Upwork', NULL, 0),
(85, 1, 'invoice', 6, 'Invoice created ', '2016-01-14 06:43:19', 'fa-circle-o', 'INV-0006', NULL, 0),
(86, 1, 'invoice', 5, 'Invoice items added ', '2016-01-14 06:43:44', 'fa-circle-o', 'From upwork', NULL, 0),
(87, 1, 'invoice', 6, 'Invoice new payment', '2016-01-14 06:43:52', 'fa-usd', '₨ 7192', 'INV-0006', 0),
(88, 1, 'transactions/expense', NULL, 'Expense information added', '2016-01-14 06:45:50', 'fa-coffee', 'R<NAME> - Cash in Hand', '4240', 0),
(89, 3, 'client', 6, 'Update new Client ', '2016-01-14 09:56:56', 'fa-user', 'Inaam Distributor', NULL, 0),
(90, 3, 'invoice', 7, 'Invoice created ', '2016-01-14 09:57:20', 'fa-circle-o', 'INV-0007', NULL, 0),
(91, 3, 'invoice', 6, 'Invoice items added ', '2016-01-14 09:58:12', 'fa-circle-o', 'Inaam Distribution Software', NULL, 0),
(92, 3, 'invoice', 7, 'Invoice new payment', '2016-01-14 09:58:32', 'fa-usd', '₨ 10000', 'INV-0007', 0),
(93, 3, 'transactions/deposit', NULL, 'Deposit information added', '2016-01-14 09:59:08', 'fa-coffee', 'Shoaib - Cash in Hand', NULL, 0),
(94, 3, 'transactions/expense', NULL, 'Expense information added', '2016-01-14 09:59:50', 'fa-coffee', 'Shoaib - Cash in Hand', '10000', 0),
(95, 1, 'client', 7, 'Update new Client ', '2016-01-18 07:13:37', 'fa-user', '<NAME>', NULL, 0),
(96, 1, 'invoice', 8, 'Invoice created ', '2016-01-18 07:13:58', 'fa-circle-o', 'INV-0008', NULL, 0),
(97, 1, 'invoice', 7, 'Invoice items added ', '2016-01-18 07:14:41', 'fa-circle-o', 'ecosurg.net', NULL, 0),
(98, 1, 'invoice', 8, 'Invoice new payment', '2016-01-18 07:14:55', 'fa-usd', '₨ 1342', 'INV-0008', 0),
(99, 1, 'transactions/deposit', NULL, 'Deposit information added', '2016-01-18 07:15:15', 'fa-coffee', 'R<NAME> - Cash in Hand', NULL, 0),
(100, 1, 'transactions/expense', NULL, 'Expense information added', '2016-01-18 07:17:03', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', '360', 0),
(101, 1, 'transactions/expense', NULL, 'Expense information added', '2016-01-23 18:23:33', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', '320', 0),
(102, 1, 'transactions/expense', NULL, 'Expense information added', '2016-01-23 18:24:44', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '5769', 0),
(103, 1, 'transactions/expense', NULL, 'Expense information added', '2016-01-23 18:28:16', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', '3400', 0),
(104, 1, 'transactions/expense', NULL, 'Expense information added', '2016-01-23 18:32:47', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '2320', 0),
(105, 3, 'client', 8, 'Update new Client ', '2016-02-01 16:49:38', 'fa-user', '<NAME>', NULL, 0),
(106, 3, 'invoice', 9, 'Invoice created ', '2016-02-01 16:50:24', 'fa-circle-o', 'INV-0009', NULL, 0),
(107, 3, 'invoice', 8, 'Invoice items added ', '2016-02-01 16:51:21', 'fa-circle-o', 'Shehsaaz Website', NULL, 0),
(108, 3, 'invoice', 9, 'Invoice new payment', '2016-02-01 16:52:55', 'fa-usd', '₨ 20000', 'INV-0009', 0),
(109, 3, 'transactions/deposit', NULL, 'Deposit information added', '2016-02-01 16:53:53', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', NULL, 0),
(110, 3, 'transactions/expense', NULL, 'Expense information added', '2016-02-01 16:54:56', 'fa-coffee', '<NAME> - Cash in Hand', '8000', 0),
(111, 3, 'transactions/deposit', NULL, 'Deposit information added', '2016-02-01 16:58:48', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', NULL, 0),
(112, 1, 'transactions/expense', NULL, 'Expense information added', '2016-02-01 17:25:47', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '40000', 0),
(113, 1, 'transactions/expense', NULL, 'Expense information added', '2016-02-01 17:26:01', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '300', 0),
(114, 1, 'transactions/expense', NULL, 'Expense information added', '2016-02-01 17:26:37', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', '40000', 0),
(115, 1, 'transactions/expense', NULL, 'Expense information added', '2016-02-01 17:29:27', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', '3000', 0),
(116, 1, 'client', 9, 'Update new Client ', '2016-02-08 13:02:22', 'fa-user', '<NAME>', NULL, 0),
(117, 1, 'invoice', 10, 'Invoice created ', '2016-02-08 13:02:47', 'fa-circle-o', 'INV-0010', NULL, 0),
(118, 1, 'invoice', 9, 'Invoice items added ', '2016-02-08 13:03:20', 'fa-circle-o', 'eCommerce Website', NULL, 0),
(119, 1, 'invoice', 10, 'Invoice new payment', '2016-02-08 13:03:53', 'fa-usd', '£ 200', 'INV-0010', 0),
(120, 1, 'invoice', 11, 'Invoice created ', '2016-02-12 06:56:04', 'fa-circle-o', 'INV-0011', NULL, 0),
(121, 1, 'invoice', 10, 'Invoice items added ', '2016-02-12 06:57:38', 'fa-circle-o', 'Domain ', NULL, 0),
(122, 1, 'invoice', 11, 'Invoice items added ', '2016-02-12 06:57:38', 'fa-circle-o', 'Hosting', NULL, 0),
(123, 1, 'transactions/expense', NULL, 'Expense information added', '2016-02-12 06:58:26', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '2055', 0),
(124, 1, 'transactions/expense', NULL, 'Expense information added', '2016-02-12 06:58:56', 'fa-coffee', '<NAME> - Cash in Hand', '18000', 0),
(125, 1, 'transactions/deposit', NULL, 'Deposit information added', '2016-02-12 07:02:42', 'fa-coffee', 'Re<NAME> - Cash in Hand', NULL, 0),
(126, 1, 'client', 10, 'Update new Client ', '2016-02-16 11:12:28', 'fa-user', '<NAME>', NULL, 0),
(127, 1, 'transactions/expense', NULL, 'Expense information added', '2016-02-19 10:24:47', 'fa-coffee', 'Re<NAME> - Cash in Hand', '340', 0),
(128, 1, 'invoice', 10, 'Invoice new payment', '2016-02-19 10:25:42', 'fa-usd', '£ 280', 'INV-0010', 0),
(129, 1, 'transactions/deposit', NULL, 'Deposit information added', '2016-02-19 10:26:16', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', NULL, 0),
(130, 1, 'client', 11, 'Update new Client ', '2016-02-24 10:42:37', 'fa-user', '<NAME>', NULL, 0),
(131, 1, 'invoice', 12, 'Invoice created ', '2016-02-24 10:42:59', 'fa-circle-o', 'INV-0012', NULL, 0),
(132, 1, 'invoice', 12, 'Invoice items added ', '2016-02-24 10:43:28', 'fa-circle-o', 'Desktop Software for Shop', NULL, 0),
(133, 1, 'invoice', 12, 'Invoice new payment', '2016-02-24 10:45:19', 'fa-usd', '₨ 15000', 'INV-0012', 0),
(134, 1, 'transactions/deposit', NULL, 'Deposit information added', '2016-02-24 10:46:01', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', NULL, 0),
(135, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-02 10:42:35', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '200', 0),
(136, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-02 10:43:40', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '2350', 0),
(137, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-03 04:33:15', 'fa-coffee', 'Reha<NAME>ooq - Cash in Hand', '40000', 0),
(138, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-03 04:34:25', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '40000', 0),
(139, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-08 05:25:32', 'fa-coffee', '<NAME> - Cash in Hand', '500', 0),
(140, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-08 05:26:05', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '2060', 0),
(141, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-08 08:23:18', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '7000', 0),
(142, 1, 'invoice', 13, 'Invoice created ', '2016-03-12 11:07:04', 'fa-circle-o', 'INV-0013', NULL, 0),
(143, 1, 'invoice', 13, 'Invoice items added ', '2016-03-12 11:07:34', 'fa-circle-o', 'Payments from Canada Web Services', NULL, 0),
(144, 1, 'invoice', 13, 'Invoice new payment', '2016-03-12 11:07:51', 'fa-usd', '₨ 50000', 'INV-0013', 0),
(145, 1, 'transactions/deposit', NULL, 'Deposit information added', '2016-03-12 11:08:21', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', NULL, 0),
(146, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-12 11:09:24', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '12060', 0),
(147, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-12 11:09:55', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '4000', 0),
(148, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-12 11:10:16', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '5000', 0),
(149, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-15 06:29:50', 'fa-coffee', '<NAME> - Cash in Hand', '1500', 0),
(150, 1, 'invoice', 14, 'Invoice created ', '2016-03-15 06:43:57', 'fa-circle-o', 'INV-0014', NULL, 0),
(151, 1, 'invoice', 14, 'Invoice items added ', '2016-03-15 06:44:26', 'fa-circle-o', 'Payments from Canada Web Services', NULL, 0),
(152, 1, 'invoice', 14, 'Invoice new payment', '2016-03-15 06:44:42', 'fa-usd', '₨ 8200', 'INV-0014', 0),
(153, 1, 'transactions/deposit', NULL, 'Deposit information added', '2016-03-15 06:45:09', 'fa-coffee', '<NAME> - Cash in Hand', NULL, 0),
(154, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-23 05:22:35', 'fa-coffee', 'Re<NAME> - Cash in Hand', '6670', 0),
(155, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-23 05:23:28', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '1570', 0),
(156, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-23 05:24:09', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '6330', 0),
(157, 1, 'invoice', 15, 'Invoice created ', '2016-03-24 06:34:09', 'fa-circle-o', 'INV-0015', NULL, 0),
(158, 1, 'invoice', 15, 'Invoice items added ', '2016-03-24 06:34:35', 'fa-circle-o', 'Domain and Hosting charges', NULL, 0),
(159, 1, 'invoice', 15, 'Invoice new payment', '2016-03-24 06:34:40', 'fa-usd', '₨ 3000', 'INV-0015', 0),
(160, 1, 'invoice', 15, '0', '2016-03-24 06:35:41', 'fa-circle-o', 'INV-0015', NULL, 0),
(161, 1, 'invoice', 10, 'Invoice items updated', '2016-03-24 06:36:07', 'fa-circle-o', 'Domain ', NULL, 0),
(162, 1, 'invoice', 11, 'Invoice new payment', '2016-03-24 06:36:17', 'fa-usd', '₨ 4000', 'INV-0011', 0),
(163, 1, 'transactions/deposit', NULL, 'Deposit information added', '2016-03-24 06:36:55', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', NULL, 0),
(164, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-26 08:33:01', 'fa-coffee', '<NAME> - Cash in Hand', '600', 0),
(165, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-26 08:33:14', 'fa-coffee', '<NAME>ooq - Cash in Hand', '100', 0),
(166, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-26 08:33:33', 'fa-coffee', '<NAME> - Cash in Hand', '3000', 0),
(167, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-30 10:01:29', 'fa-coffee', '<NAME> - Cash in Hand', '400', 0),
(168, 1, 'transactions/expense', NULL, 'Expense information added', '2016-03-30 10:02:05', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '3170', 0),
(169, 1, 'invoice', 16, 'Invoice created ', '2016-04-01 05:53:15', 'fa-circle-o', 'INV-0015', NULL, 0),
(170, 1, 'invoice', 16, 'Invoice items added ', '2016-04-01 05:55:07', 'fa-circle-o', 'From Canada Web Services', NULL, 0),
(171, 1, 'invoice', 16, 'Invoice new payment', '2016-04-01 05:57:05', 'fa-usd', '₨ 54471', 'INV-0015', 0),
(172, 1, 'transactions/deposit', NULL, 'Deposit information added', '2016-04-01 05:57:55', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', NULL, 0),
(173, 1, 'transactions/deposit', NULL, 'Deposit information added', '2016-04-01 05:58:17', 'fa-coffee', '<NAME> - Cash in Hand', NULL, 0),
(174, 1, 'transactions/expense', NULL, 'Expense information added', '2016-04-01 06:24:51', 'fa-coffee', '<NAME> - Cash in Hand', '40000', 0),
(175, 1, 'transactions/expense', NULL, 'Expense information added', '2016-04-01 07:06:57', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '40000', 0),
(176, 1, 'transactions/expense', NULL, 'Expense information added', '2016-04-01 07:07:58', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '10000', 0),
(177, 1, 'transactions/expense', NULL, 'Expense information added', '2016-04-01 07:08:09', 'fa-coffee', 'Re<NAME> - Cash in Hand', '10000', 0),
(178, 1, 'transactions/expense', NULL, 'Expense information added', '2016-04-01 07:10:35', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '2360', 0),
(179, 1, 'transactions/expense', NULL, 'Expense information added', '2016-04-01 12:12:12', 'fa-coffee', 'Raja Amer Khan - Cash in Hand', '6341', 0),
(180, 3, 'transactions/expense', NULL, 'Expense information added', '2016-04-06 07:20:14', 'fa-coffee', '<NAME> - Cash in Hand', '650', 0),
(181, 3, 'transactions/expense', NULL, 'Expense information added', '2016-04-06 07:21:20', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', '1290', 0),
(182, 3, 'transactions/expense', NULL, 'Expense information added', '2016-04-06 07:21:45', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', '6000', 0),
(183, 3, 'invoice', 17, 'Invoice created ', '2016-04-06 07:22:15', 'fa-circle-o', 'INV-0017', NULL, 0),
(184, 3, 'invoice', 17, 'Invoice items added ', '2016-04-06 07:23:46', 'fa-circle-o', 'Elance Payment for ebay template.', NULL, 0),
(185, 3, 'invoice', 17, 'Invoice new payment', '2016-04-06 07:24:09', 'fa-usd', '₨ 12300', 'INV-0017', 0),
(186, 3, 'transactions/deposit', NULL, 'Deposit information added', '2016-04-06 07:25:09', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', NULL, 0),
(187, 1, 'invoice', 18, 'Invoice created ', '2016-04-06 12:17:17', 'fa-circle-o', 'INV-0018', NULL, 0),
(188, 1, 'invoice', 18, 'Invoice items added ', '2016-04-06 12:22:02', 'fa-circle-o', 'Data Entry', NULL, 0),
(189, 1, 'invoice', 19, 'Invoice items added ', '2016-04-06 12:22:02', 'fa-circle-o', 'Modifications of Products and Categories', NULL, 0),
(190, 1, 'invoice', 20, 'Invoice items added ', '2016-04-06 12:22:02', 'fa-circle-o', 'Products Comparison', NULL, 0),
(191, 1, 'settings', 1, 'Update General Settings', '2016-04-06 12:27:48', 'fa-coffee', 'CodeBite', NULL, 0),
(192, 1, 'settings', 1, 'Update General Settings', '2016-04-06 12:32:35', 'fa-coffee', 'CodeBite', NULL, 0),
(193, 1, 'settings', 1, 'Update General Settings', '2016-04-06 12:32:45', 'fa-coffee', 'CodeBite', NULL, 0),
(194, 1, 'settings', 1, 'Update General Settings', '2016-04-06 12:33:53', 'fa-coffee', 'CodeBite', NULL, 0),
(195, 1, 'settings', 1, 'Update General Settings', '2016-04-06 12:34:01', 'fa-coffee', 'CodeBite', NULL, 0),
(196, 1, 'client', 12, 'Update new Client ', '2016-04-08 10:24:58', 'fa-user', '<NAME>', NULL, 0),
(197, 1, 'client', 12, 'Add new Client ', '2016-04-08 10:25:56', 'fa-user', '<NAME>', NULL, 0),
(198, 1, 'invoice', 19, 'Invoice created ', '2016-04-08 10:26:35', 'fa-circle-o', 'INV-0019', NULL, 0),
(199, 1, 'invoice', 21, 'Invoice items added ', '2016-04-08 10:26:58', 'fa-circle-o', 'Domain Transfer', NULL, 0),
(200, 1, 'invoice', 19, 'Invoice new payment', '2016-04-08 10:27:03', 'fa-usd', '₨ 1100', 'INV-0019', 0),
(201, 1, 'transactions/deposit', NULL, 'Deposit information added', '2016-04-08 10:27:30', 'fa-coffee', 'R<NAME> - Cash in Hand', NULL, 0),
(202, 3, 'transactions/expense', NULL, 'Expense information added', '2016-04-16 10:07:37', 'fa-coffee', '<NAME> - Cash in Hand', '3179', 0),
(203, 3, 'transactions/transfer', NULL, 'Transfer information added', '2016-04-16 10:10:11', 'fa-coffee', '<NAME> - Cash in Hand', 'Rehaan Farooq - Cash in Hand', 0),
(204, 3, 'transactions/expense', NULL, 'Expense information added', '2016-04-16 10:13:16', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', '8432', 0),
(205, 3, 'client', 13, 'Update new Client ', '2016-04-16 10:19:27', 'fa-user', 'NYDC', NULL, 0),
(206, 3, 'invoice', 20, 'Invoice created ', '2016-04-16 10:19:54', 'fa-circle-o', 'INV-0020', NULL, 0),
(207, 3, 'invoice', 22, 'Invoice items added ', '2016-04-16 10:20:40', 'fa-circle-o', 'Website Development', NULL, 0),
(208, 3, 'invoice', 20, 'Invoice new payment', '2016-04-16 10:21:13', 'fa-usd', '₨ 46350', 'INV-0020', 0),
(209, 3, 'transactions/deposit', NULL, 'Deposit information added', '2016-04-16 10:21:59', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', NULL, 0),
(210, 3, 'invoice', 18, 'Invoice new payment', '2016-04-16 10:24:51', 'fa-usd', '£ 282', 'INV-0018', 0),
(211, 3, 'transactions/deposit', NULL, 'Deposit information added', '2016-04-16 10:26:46', 'fa-coffee', 'Re<NAME>q - Cash in Hand', NULL, 0),
(212, 3, 'transactions/expense', NULL, 'Expense information added', '2016-04-16 10:29:05', 'fa-coffee', '<NAME> - Cash in Hand', '22000', 0),
(213, 3, 'transactions/expense', NULL, 'Expense information added', '2016-04-16 10:38:19', 'fa-coffee', '<NAME> - Cash in Hand', '1500', 0),
(214, 3, 'client', 14, 'Update new Client ', '2016-04-21 07:18:33', 'fa-user', 'Idarat-ul-Mustafa', NULL, 0),
(215, 3, 'invoice', 21, 'Invoice created ', '2016-04-21 07:18:59', 'fa-circle-o', 'INV-0021', NULL, 0),
(216, 3, 'invoice', 23, 'Invoice items added ', '2016-04-21 07:20:21', 'fa-circle-o', 'Mobile Application', NULL, 0),
(217, 3, 'client', 14, 'Add new Client ', '2016-04-21 07:21:11', 'fa-user', 'Idara-tul-Mustafa', NULL, 0),
(218, 3, 'invoice', 21, 'Invoice new payment', '2016-04-21 07:21:46', 'fa-usd', '₨ 10000', 'INV-0021', 0),
(219, 3, 'transactions/expense', NULL, 'Expense information added', '2016-04-22 07:07:16', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', '17000', 0),
(220, 3, 'transactions/expense', NULL, 'Expense information added', '2016-04-22 07:08:09', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', '500', 0),
(221, 3, 'transactions/transfer', NULL, 'Transfer information added', '2016-04-22 12:57:18', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', 'Raja Amer Khan - Cash in Hand', 0),
(222, 3, 'transactions/transfer', NULL, 'Transfer information added', '2016-04-22 12:58:18', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', 'Raja Amer Khan - Cash in Hand', 0),
(223, 3, 'transactions/expense', NULL, 'Expense information added', '2016-04-22 13:01:11', 'fa-coffee', 'Rehaan Farooq - Cash in Hand', '1400', 0),
(224, 1, 'client', 15, 'Update new Client ', '2016-04-25 10:45:00', 'fa-user', 'Jhelum Traders', NULL, 0),
(225, 1, 'invoice', 22, 'Invoice created ', '2016-04-25 10:45:41', 'fa-circle-o', 'INV-0022', NULL, 0),
(226, 1, 'invoice', 24, 'Invoice items added ', '2016-04-25 10:47:09', 'fa-circle-o', 'CodeBite POS', NULL, 0),
(227, 1, 'invoice', 24, 'Invoice items updated', '2016-04-25 10:47:49', 'fa-circle-o', 'Distributor Management Software', NULL, 0),
(228, 1, 'invoice', 22, 'Invoice new payment', '2016-04-25 10:48:01', 'fa-usd', '₨ 28000', 'INV-0022', 0),
(229, 1, 'transactions/expense', NULL, 'Expense information added', '2016-04-25 10:55:00', 'fa-coffee', '<NAME> - Cash in Hand', '4556', 0),
(230, 1, 'transactions/deposit', NULL, 'Deposit information added', '2016-04-25 11:00:55', 'fa-coffee', '<NAME> - Cash in Hand', NULL, 0),
(231, 1, 'client', 16, 'Update new Client ', '2016-04-25 11:15:22', 'fa-user', 'Hassan Optics', NULL, 0),
(232, 1, 'client', 17, 'Update new Client ', '2016-04-25 11:16:10', 'fa-user', 'Master Celeste (Centaurus Mall)', NULL, 0),
(233, 1, 'invoice', 23, 'Invoice created ', '2016-04-25 11:16:46', 'fa-circle-o', 'INV-0023', NULL, 0),
(234, 1, 'invoice', 25, 'Invoice items added ', '2016-04-25 11:17:05', 'fa-circle-o', 'CodeBite POS', NULL, 0),
(235, 1, 'invoice', 24, 'Invoice created ', '2016-04-25 11:17:31', 'fa-circle-o', 'INV-0024', NULL, 0),
(236, 1, 'invoice', 26, 'Invoice items added ', '2016-04-25 11:18:24', 'fa-circle-o', 'Branch Management Software', NULL, 0),
(237, 1, 'invoice', 24, 'Invoice new payment', '2016-04-25 11:18:32', 'fa-usd', '₨ 10000', 'INV-0024', 0),
(238, 1, 'transactions/deposit', NULL, 'Deposit information added', '2016-04-25 11:19:05', 'fa-coffee', 'Shoaib - Cash in Hand', NULL, 0),
(239, 1, 'transactions/expense', NULL, 'Expense information added', '2016-04-25 11:19:47', 'fa-coffee', 'Shoaib - Cash in Hand', '10000', 0),
(240, 1, 'client', 18, 'Update new Client ', '2016-04-26 10:46:30', 'fa-user', 'M Alzeer', NULL, 0),
(241, 1, 'invoice', 25, 'Invoice created ', '2016-04-26 10:47:06', 'fa-circle-o', 'INV-0025', NULL, 0),
(242, 1, 'invoice', 27, 'Invoice items added ', '2016-04-26 10:48:04', 'fa-circle-o', 'www.sys-archi.com', NULL, 0),
(243, 1, 'invoice', 25, 'Invoice new payment', '2016-04-26 10:48:28', 'fa-usd', '₨ 10000', 'INV-0025', 0),
(244, 1, 'invoice', 25, '0', '2016-04-26 10:59:16', 'fa-circle-o', 'INV-0025', NULL, 0),
(245, 1, 'client', 18, 'Add new Client ', '2016-04-26 11:03:06', 'fa-user', 'M Alzeer', NULL, 0),
(246, 1, 'invoice', 26, 'Invoice created ', '2016-04-26 11:03:22', 'fa-circle-o', 'INV-0025', NULL, 0),
(247, 1, 'invoice', 28, 'Invoice items added ', '2016-04-26 11:03:56', 'fa-circle-o', 'www.sys-archi.com', NULL, 0),
(248, 1, 'invoice', 26, 'Invoice new payment', '2016-04-26 11:04:13', 'fa-usd', '$ 100', 'INV-0025', 0);
DROP TABLE IF EXISTS `tbl_calls`;
CREATE TABLE `tbl_calls` (
`calls_id` int(11) NOT NULL AUTO_INCREMENT,
`leads_id` int(11) DEFAULT NULL,
`client_id` int(11) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`date` varchar(20) NOT NULL,
`call_summary` varchar(200) NOT NULL,
PRIMARY KEY (`calls_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `tbl_client`;
CREATE TABLE `tbl_client` (
`client_id` int(11) NOT NULL AUTO_INCREMENT,
`primary_contact` int(11) DEFAULT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`email` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
`short_note` text COLLATE utf8_unicode_ci,
`website` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`phone` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
`mobile` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
`fax` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
`address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`city` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`zipcode` varchar(20) CHARACTER SET utf8 DEFAULT NULL,
`currency` varchar(32) COLLATE utf8_unicode_ci DEFAULT 'USD',
`skype_id` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`linkedin` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`facebook` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`twitter` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`language` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`country` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`vat` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
`hosting_company` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`hostname` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`port` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
`password` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
`username` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`client_status` tinyint(1) NOT NULL COMMENT '1 = person and 2 = company',
`profile_photo` text COLLATE utf8_unicode_ci,
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `tbl_client` (`client_id`, `primary_contact`, `name`, `email`, `short_note`, `website`, `phone`, `mobile`, `fax`, `address`, `city`, `zipcode`, `currency`, `skype_id`, `linkedin`, `facebook`, `twitter`, `language`, `country`, `vat`, `hosting_company`, `hostname`, `port`, `password`, `username`, `client_status`, `profile_photo`, `date_added`) VALUES
(2, NULL, '<NAME>', '<EMAIL>', 'AlbatoolQuran.<EMAIL>', '', '', '03405196598', '', '', 'Rawalpindi', '', 'PKR', '', '', '', '', 'english', 'Pakistan', '0', '', '', '', '', '', 1, NULL, '2015-12-12 18:42:03'),
(3, NULL, '<NAME>', '<EMAIL>', '', '', '', '', '', '', '', '', 'PKR', '', '', '', '', 'english', 'Pakistan', '0', '', '', '', '', '', 1, NULL, '2015-12-19 17:42:06'),
(4, NULL, 'PayPal', '<EMAIL>', 'Money from Paypal', '', '', '', '', '', '', '', 'PKR', '', '', '', '', 'english', 'Pakistan', '0', '', '', '', '', '', 1, NULL, '2015-12-28 12:00:09'),
(5, NULL, 'Upwork', '<EMAIL>', '', '', '', '', '', '', '', '', 'PKR', '', '', '', '', 'english', 'Pakistan', '0', '', '', '', '', '', 1, NULL, '2016-01-14 06:42:26'),
(6, NULL, 'Inaam Distributor', '<EMAIL>', '', '', '', '', '', '', '', '', 'PKR', '', '', '', '', 'english', 'Pakistan', '0', '', '', '', 'Rehan123', 'rehan', 1, NULL, '2016-01-14 09:56:56'),
(7, NULL, '<NAME>', '<EMAIL>', '', '', '', '', '', '', '', '', 'PKR', '', '', '', '', 'english', 'Pakistan', '0', '', '', '', '', '', 1, NULL, '2016-01-18 07:13:37'),
(8, NULL, '<NAME>', '<EMAIL>', '', '', '', '', '', '', '', '', 'PKR', '', '', '', '', 'english', 'Pakistan', '0', '', '', '', 'Rehan123', 'rehan', 1, NULL, '2016-02-01 16:49:38'),
(9, NULL, '<NAME>', '<EMAIL>', '', '', '', '', '', '', '', '', 'GBP', '', '', '', '', 'english', 'Pakistan', '0', '', '', '', '', '', 1, NULL, '2016-02-08 13:02:22'),
(10, NULL, '<NAME>', '<EMAIL>', '', '', '', '', '', '', '', '', 'PKR', '', '', '', '', 'english', 'Pakistan', '0', '', '', '', '', '', 1, NULL, '2016-02-16 11:12:28'),
(11, NULL, '<NAME>', '<EMAIL>', '', '', '', '', '', '', '', '', 'PKR', '', '', '', '', 'english', 'Pakistan', '0', '', '', '', '', '', 1, NULL, '2016-02-24 10:42:37'),
(12, NULL, '<NAME>', '<EMAIL>', '', '', '', '+923129169559', '', '', '', '', 'PKR', '', '', '', '', 'english', 'Pakistan', '0', '', '', '', '', '', 1, NULL, '2016-04-08 10:24:58'),
(13, NULL, 'NYDC', '<EMAIL>', '', 'http://www.thenewyorkdollcollection.com/', '', '', '', '', '', '', 'PKR', '', '', '', '', 'english', 'Pakistan', '0', '', '', '', 'Rehan123', 'rehan', 1, NULL, '2016-04-16 10:19:27'),
(14, NULL, 'Idara-tul-Mustafa', '<EMAIL>', 'Mobile Application', 'http://idaratulmustafa.com/', '', '', '', '', '', '', 'PKR', '', '', '', '', 'english', 'Pakistan', '0', '', '', '', 'Rehan123', 'rehan', 1, NULL, '2016-04-21 07:18:33'),
(15, NULL, 'Jhelum Traders', '<EMAIL>', '', '', '', '', '', '', '', '', 'PKR', '', '', '', '', 'english', 'Pakistan', '0', '', '', '', '', '', 1, NULL, '2016-04-25 10:45:00'),
(16, NULL, 'Hassan Optics', '<EMAIL>', '', '', '', '', '', '', '', '', 'PKR', '', '', '', '', 'english', 'Pakistan', '0', '', '', '', '', '', 1, NULL, '2016-04-25 11:15:22'),
(17, NULL, 'Master Celeste (Centaurus Mall)', '<EMAIL>', '', '', '', '', '', '', '', '', 'PKR', '', '', '', '', 'english', 'Pakistan', '0', '', '', '', '', '', 1, NULL, '2016-04-25 11:16:10'),
(18, NULL, '<NAME>', '<EMAIL>', '', 'www.sys-archi.com', '', '', '', '', 'Riyadh', '', 'USD', '', '', '', '', 'english', 'Saudi Arabia', '0', 'GoDaddy', '', '', '', '', 1, NULL, '2016-04-26 10:46:30');
DROP TABLE IF EXISTS `tbl_config`;
CREATE TABLE `tbl_config` (
`config_key` varchar(255) NOT NULL,
`value` text NOT NULL,
PRIMARY KEY (`config_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `tbl_config` (`config_key`, `value`) VALUES
('2checkout_private_key', 'privatekey'),
('2checkout_publishable_key', 'checkoutkey'),
('2checkout_seller_id', 'seled id'),
('2checkout_status', 'deactive'),
('accounting_snapshot', '0'),
('allowed_files', 'gif|png|jpeg|jpg|pdf|doc|txt|docx|xls|zip|rar|xls|mp4'),
('allow_client_registration', 'TRUE'),
('authorize', 'login id'),
('authorize_status', 'deactive'),
('authorize_transaction_key', 'transfer key'),
('automatic_email_on_recur', 'TRUE'),
('bank_cash', '0'),
('bitcoin_address', '0'),
('bitcoin_status', 'active'),
('braintree_default_account', 'Braintree Defual allcount'),
('braintree_live_or_sandbox', 'Braintree Live or Sandbox'),
('braintree_merchant_id', 'Braintree Merchant ID'),
('braintree_private_key', 'Braintree Private Key'),
('braintree_public_key', 'Braintree Defual allcount'),
('braintree_status', 'deactive'),
('build', '0'),
('ccavenue_key', 'CCAvenue Working Key'),
('ccavenue_merchant_id', 'CCAvenue Merchant ID'),
('ccavenue_status', 'deactive'),
('company_address', 'Office #1 first floor, \nGhazanfar Market, \nNear Akram Shaheed Park'),
('company_city', 'Jhelum'),
('company_country', 'Pakistan'),
('company_domain', 'http://www.codebite.pk/'),
('company_email', '<EMAIL>'),
('company_legal_name', 'CodeBite'),
('company_logo', 'uploads/codebite-logo.png'),
('company_name', 'CodeBite'),
('company_phone', '+92544627290'),
('company_phone_2', ''),
('company_vat', ''),
('company_zip_code', '49600'),
('contact_person', '<NAME>'),
('country', '0'),
('cron_key', '34WI2L12L87I1A65M90M9A42N41D08A26I'),
('date_format', '%d-%m-%Y'),
('date_php_format', 'd-m-Y'),
('date_picker_format', 'dd-mm-yyyy'),
('decimal_separator', '0'),
('default_currency', 'PKR'),
('default_currency_symbol', '$'),
('default_language', 'english'),
('default_tax', '0.00'),
('default_terms', 'Thank you for <span style=\"font-weight: bold;\">your</span> business. Please process this invoice within the due date.'),
('demo_mode', 'FALSE'),
('developer', '<KEY>'),
('display_estimate_badge', '0'),
('display_invoice_badge', 'FALSE'),
('email_account_details', 'TRUE'),
('email_estimate_message', 'Hi {CLIENT}<br>Thanks for your business inquiry. <br>The estimate EST {REF} is attached with this email. <br>Estimate Overview:<br>Estimate # : EST {REF}<br>Amount: {CURRENCY} {AMOUNT}<br> You can view the estimate online at:<br>{LINK}<br>Best Regards,<br>{COMPANY}'),
('email_invoice_message', 'Hello {CLIENT}<br>Here is the invoice of {CURRENCY} {AMOUNT}<br>You can view the invoice online at:<br>{LINK}<br>Best Regards,<br>{COMPANY}'),
('email_staff_tickets', 'TRUE'),
('enable_languages', 'TRUE'),
('estimate_color', '0'),
('estimate_language', 'en'),
('estimate_prefix', 'EST'),
('estimate_terms', 'Hey Looking forward to doing business with you.'),
('file_max_size', '80000'),
('gcal_api_key', ''),
('gcal_id', ''),
('increment_invoice_number', 'TRUE'),
('installed', 'TRUE'),
('invoices_due_after', '10'),
('invoice_color', '#53B567'),
('invoice_language', 'en'),
('invoice_logo', 'uploads/codebite-logo.png'),
('invoice_prefix', 'INV-'),
('invoice_start_no', '0'),
('language', 'english'),
('languages', 'spanish'),
('last_check', '1436363002'),
('last_seen_activities', '0'),
('locale', 'ur_PK'),
('login_bg', 'bg-login.jpg'),
('logofile', '0'),
('logo_or_icon', 'logo_title'),
('notify_bug_assignment', 'TRUE'),
('notify_bug_comments', 'TRUE'),
('notify_bug_status', 'TRUE'),
('notify_message_received', 'TRUE'),
('notify_project_assignments', 'TRUE'),
('notify_project_comments', 'TRUE'),
('notify_project_files', 'TRUE'),
('notify_task_assignments', 'TRUE'),
('paypal_cancel_url', 'paypal/cancel'),
('paypal_email', '<EMAIL>'),
('paypal_ipn_url', 'paypal/t_ipn/ipn'),
('paypal_live', 'TRUE'),
('paypal_status', 'active'),
('paypal_success_url', 'paypal/success'),
('pdf_engine', 'invoicr'),
('postmark_api_key', ''),
('postmark_from_address', ''),
('project_prefix', 'PRO'),
('protocol', 'mail'),
('purchase_code', ''),
('recurring_invoice', '0'),
('reminder_message', 'Hello {CLIENT}<br>This is a friendly reminder to pay your invoice of {CURRENCY} {AMOUNT}<br>You can view the invoice online at:<br>{LINK}<br>Best Regards,<br>{COMPANY}'),
('reset_key', '34WI2L12L87I1A65M90M9A42N41D08A26I'),
('rows_per_table', '25'),
('security_token', '5<PASSWORD>'),
('settings', 'theme'),
('show_estimate_tax', 'on'),
('show_invoice_tax', 'TRUE'),
('show_item_tax', '0'),
('show_login_image', 'TRUE'),
('show_only_logo', 'FALSE'),
('sidebar_theme', 'red'),
('site_appleicon', 'logo.png'),
('site_author', '<NAME>.'),
('site_desc', 'Freelancer Office is a Web based PHP application for Freelancers - buy it on Codecanyon'),
('site_favicon', 'logo.png'),
('site_icon', 'fa-flask'),
('smtp_host', 'mail.bacs.com'),
('smtp_pass', '<PASSWORD>'),
('smtp_port', '25'),
('smtp_user', '<EMAIL>'),
('stripe_private_key', '<KEY>'),
('stripe_public_key', '<KEY>'),
('stripe_status', 'deactive'),
('system_font', 'roboto_condensed'),
('thousand_separator', ','),
('timezone', 'Asia/Karachi'),
('use_gravatar', 'TRUE'),
('use_postmark', 'FALSE'),
('valid_license', 'TRUE'),
('webmaster_email', '<EMAIL>'),
('website_name', 'CodeBite Clients Panel');
DROP TABLE IF EXISTS `tbl_countries`;
CREATE TABLE `tbl_countries` (
`id` int(6) NOT NULL AUTO_INCREMENT,
`value` varchar(250) CHARACTER SET latin1 NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO `tbl_countries` (`id`, `value`) VALUES
(1, 'Afghanistan'),
(2, 'Aringland Islands'),
(3, 'Albania'),
(4, 'Algeria'),
(5, 'American Samoa'),
(6, 'Andorra'),
(7, 'Angola'),
(8, 'Anguilla'),
(9, 'Antarctica'),
(10, 'Antigua and Barbuda'),
(11, 'Argentina'),
(12, 'Armenia'),
(13, 'Aruba'),
(14, 'Australia'),
(15, 'Austria'),
(16, 'Azerbaijan'),
(17, 'Bahamas'),
(18, 'Bahrain'),
(19, 'Bangladesh'),
(20, 'Barbados'),
(21, 'Belarus'),
(22, 'Belgium'),
(23, 'Belize'),
(24, 'Benin'),
(25, 'Bermuda'),
(26, 'Bhutan'),
(27, 'Bolivia'),
(28, 'Bosnia and Herzegovina'),
(29, 'Botswana'),
(30, 'Bouvet Island'),
(31, 'Brazil'),
(32, 'British Indian Ocean territory'),
(33, 'Brunei Darussalam'),
(34, 'Bulgaria'),
(35, 'Burkina Faso'),
(36, 'Burundi'),
(37, 'Cambodia'),
(38, 'Cameroon'),
(39, 'Canada'),
(40, 'Cape Verde'),
(41, 'Cayman Islands'),
(42, 'Central African Republic'),
(43, 'Chad'),
(44, 'Chile'),
(45, 'China'),
(46, 'Christmas Island'),
(47, 'Cocos (Keeling) Islands'),
(48, 'Colombia'),
(49, 'Comoros'),
(50, 'Congo'),
(51, 'Congo'),
(52, ' Democratic Republic'),
(53, 'Cook Islands'),
(54, 'Costa Rica'),
(55, 'Ivory Coast (Ivory Coast)'),
(56, 'Croatia (Hrvatska)'),
(57, 'Cuba'),
(58, 'Cyprus'),
(59, 'Czech Republic'),
(60, 'Denmark'),
(61, 'Djibouti'),
(62, 'Dominica'),
(63, 'Dominican Republic'),
(64, 'East Timor'),
(65, 'Ecuador'),
(66, 'Egypt'),
(67, 'El Salvador'),
(68, 'Equatorial Guinea'),
(69, 'Eritrea'),
(70, 'Estonia'),
(71, 'Ethiopia'),
(72, 'Falkland Islands'),
(73, 'Faroe Islands'),
(74, 'Fiji'),
(75, 'Finland'),
(76, 'France'),
(77, 'French Guiana'),
(78, 'French Polynesia'),
(79, 'French Southern Territories'),
(80, 'Gabon'),
(81, 'Gambia'),
(82, 'Georgia'),
(83, 'Germany'),
(84, 'Ghana'),
(85, 'Gibraltar'),
(86, 'Greece'),
(87, 'Greenland'),
(88, 'Grenada'),
(89, 'Guadeloupe'),
(90, 'Guam'),
(91, 'Guatemala'),
(92, 'Guinea'),
(93, 'Guinea-Bissau'),
(94, 'Guyana'),
(95, 'Haiti'),
(96, 'Heard and McDonald Islands'),
(97, 'Honduras'),
(98, 'Hong Kong'),
(99, 'Hungary'),
(100, 'Iceland'),
(101, 'India'),
(102, 'Indonesia'),
(103, 'Iran'),
(104, 'Iraq'),
(105, 'Ireland'),
(106, 'Israel'),
(107, 'Italy'),
(108, 'Jamaica'),
(109, 'Japan'),
(110, 'Jordan'),
(111, 'Kazakhstan'),
(112, 'Kenya'),
(113, 'Kiribati'),
(114, 'Korea (north)'),
(115, 'Korea (south)'),
(116, 'Kuwait'),
(117, 'Kyrgyzstan'),
(118, 'Lao People\'s Democratic Republic'),
(119, 'Latvia'),
(120, 'Lebanon'),
(121, 'Lesotho'),
(122, 'Liberia'),
(123, 'Libyan Arab Jamahiriya'),
(124, 'Liechtenstein'),
(125, 'Lithuania'),
(126, 'Luxembourg'),
(127, 'Macao'),
(128, 'Macedonia'),
(129, 'Madagascar'),
(130, 'Malawi'),
(131, 'Malaysia'),
(132, 'Maldives'),
(133, 'Mali'),
(134, 'Malta'),
(135, 'Marshall Islands'),
(136, 'Martinique'),
(137, 'Mauritania'),
(138, 'Mauritius'),
(139, 'Mayotte'),
(140, 'Mexico'),
(141, 'Micronesia'),
(142, 'Moldova'),
(143, 'Monaco'),
(144, 'Mongolia'),
(145, 'Montserrat'),
(146, 'Morocco'),
(147, 'Mozambique'),
(148, 'Myanmar'),
(149, 'Namibia'),
(150, 'Nauru'),
(151, 'Nepal'),
(152, 'Netherlands'),
(153, 'Netherlands Antilles'),
(154, 'New Caledonia'),
(155, 'New Zealand'),
(156, 'Nicaragua'),
(157, 'Niger'),
(158, 'Nigeria'),
(159, 'Niue'),
(160, 'Norfolk Island'),
(161, 'Northern Mariana Islands'),
(162, 'Norway'),
(163, 'Oman'),
(164, 'Pakistan'),
(165, 'Palau'),
(166, 'Palestinian Territories'),
(167, 'Panama'),
(168, 'Papua New Guinea'),
(169, 'Paraguay'),
(170, 'Peru'),
(171, 'Philippines'),
(172, 'Pitcairn'),
(173, 'Poland'),
(174, 'Portugal'),
(175, 'Puerto Rico'),
(176, 'Qatar'),
(177, 'Runion'),
(178, 'Romania'),
(179, 'Russian Federation'),
(180, 'Rwanda'),
(181, '<NAME>'),
(182, 'Saint Kitts and Nevis'),
(183, '<NAME>'),
(184, '<NAME> and Miquelon'),
(185, 'Saint Vincent and the Grenadines'),
(186, 'Samoa'),
(187, 'San Marino'),
(188, '<NAME> and Principe'),
(189, 'Saudi Arabia'),
(190, 'Senegal'),
(191, 'Serbia and Montenegro'),
(192, 'Seychelles'),
(193, 'Sierra Leone'),
(194, 'Singapore'),
(195, 'Slovakia'),
(196, 'Slovenia'),
(197, 'Solomon Islands'),
(198, 'Somalia'),
(199, 'South Africa'),
(200, 'South Georgia and the South Sandwich Islands'),
(201, 'Spain'),
(202, 'Sri Lanka'),
(203, 'Sudan'),
(204, 'Suriname'),
(205, 'Svalbard and Jan Mayen Islands'),
(206, 'Swaziland'),
(207, 'Sweden'),
(208, 'Switzerland'),
(209, 'Syria'),
(210, 'Taiwan'),
(211, 'Tajikistan'),
(212, 'Tanzania'),
(213, 'Thailand'),
(214, 'Togo'),
(215, 'Tokelau'),
(216, 'Tonga'),
(217, 'Trinidad and Tobago'),
(218, 'Tunisia'),
(219, 'Turkey'),
(220, 'Turkmenistan'),
(221, 'Turks and Caicos Islands'),
(222, 'Tuvalu'),
(223, 'Uganda'),
(224, 'Ukraine'),
(225, 'United Arab Emirates'),
(226, 'United Kingdom'),
(227, 'United States of America'),
(228, 'Uruguay'),
(229, 'Uzbekistan'),
(230, 'Vanuatu'),
(231, 'Vatican City'),
(232, 'Venezuela'),
(233, 'Vietnam'),
(234, 'Virgin Islands (British)'),
(235, 'Virgin Islands (US)'),
(236, 'Wallis and Futuna Islands'),
(237, 'Western Sahara'),
(238, 'Yemen'),
(239, 'Zaire'),
(240, 'Zambia'),
(241, 'Zimbabwe');
DROP TABLE IF EXISTS `tbl_currencies`;
CREATE TABLE `tbl_currencies` (
`code` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
`name` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`symbol` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
`xrate` decimal(12,5) DEFAULT NULL,
PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `tbl_currencies` (`code`, `name`, `symbol`, `xrate`) VALUES
('AUD', 'Australian Dollar', '$', NULL),
('BRL', 'Brazilian Real', 'R$', NULL),
('CAD', 'Canadian Dollar', '$', NULL),
('CHF', 'Swiss Franc', 'Fr', NULL),
('CLP', 'Chilean Peso', '$', NULL),
('CNY', 'Chinese Yuan', '¥', NULL),
('CZK', 'Czech Koruna', 'Kč', NULL),
('DKK', 'Danish Krone', 'kr', NULL),
('EUR', 'Euro', '€', NULL),
('GBP', 'British Pound', '£', NULL),
('HKD', 'Hong Kong Dollar', '$', NULL),
('HUF', 'Hungarian Forint', 'Ft', NULL),
('IDR', 'Indonesian Rupiah', 'Rp', NULL),
('ILS', 'Israeli New Shekel', '₪', NULL),
('INR', 'Indian Rupee', 'INR', NULL),
('JPY', 'Japanese Yen', '¥', NULL),
('KRW', 'Korean Won', '₩', NULL),
('MXN', 'Mexican Peso', '$', NULL),
('MYR', 'Malaysian Ringgit', 'RM', NULL),
('NOK', 'Norwegian Krone', 'kr', NULL),
('NZD', 'New Zealand Dollar', '$', NULL),
('PHP', 'Philippine Peso', '₱', NULL),
('PKR', 'Pakistan Rupee', '₨', NULL),
('PLN', 'Polish Zloty', 'zł', NULL),
('RUB', 'Russian Ruble', '₽', NULL),
('SEK', 'Swedish Krona', 'kr', NULL),
('SGD', 'Singapore Dollar', '$', NULL),
('THB', 'Thai Baht', '฿', NULL),
('TRY', 'Turkish Lira', '₺', NULL),
('TWD', 'Taiwan Dollar', '$', NULL),
('USD', 'US Dollar', '$', 1.00000),
('VEF', 'Bolívar Fuerte', 'Bs.', NULL),
('ZAR', 'South African Rand', 'R', NULL);
DROP TABLE IF EXISTS `tbl_departments`;
CREATE TABLE `tbl_departments` (
`departments_id` int(10) NOT NULL AUTO_INCREMENT,
`deptname` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`departments_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `tbl_departments` (`departments_id`, `deptname`) VALUES
(1, 'Sales Department'),
(2, 'Support Department');
DROP TABLE IF EXISTS `tbl_draft`;
CREATE TABLE `tbl_draft` (
`draft_id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`to` text NOT NULL,
`subject` varchar(300) NOT NULL,
`message_body` text NOT NULL,
`attach_file` varchar(200) DEFAULT NULL,
`attach_file_path` text,
`attach_filename` text,
`message_time` datetime NOT NULL,
`deleted` enum('Yes','No') NOT NULL DEFAULT 'No',
PRIMARY KEY (`draft_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `tbl_email_templates`;
CREATE TABLE `tbl_email_templates` (
`email_templates_id` int(11) NOT NULL AUTO_INCREMENT,
`email_group` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
`subject` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`template_body` text COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`email_templates_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `tbl_email_templates` (`email_templates_id`, `email_group`, `subject`, `template_body`) VALUES
(1, 'registration', 'Registration successful', '<div style=\"height: 7px; background-color: #535353;\"></div><div style=\"background-color:#E8E8E8; margin:0px; padding:55px 20px 40px 20px; font-family:Open Sans, Helvetica, sans-serif; font-size:12px; color:#535353;\"><div style=\"text-align:center; font-size:24px; font-weight:bold; color:#535353;\">Welcome to {SITE_NAME}</div><div style=\"border-radius: 5px 5px 5px 5px; padding:20px; margin-top:45px; background-color:#FFFFFF; font-family:Open Sans, Helvetica, sans-serif; font-size:13px;\">Thanks for joining {SITE_NAME}. We listed your sign in details below, make sure you keep them safe.<br>To open your {SITE_NAME} homepage, please follow this link:<br><big><b><a href=\"{SITE_URL}\">{SITE_NAME} Account!</a></b></big><br>Link doesn\'t work? Copy the following link to your browser address bar:<br><a href=\"{SITE_URL}\">{SITE_URL}</a><br>Your username: {USERNAME}<br>Your email address: {EMAIL}<br>Your password: {PASSWORD}<br>Have fun!<br>The {SITE_NAME} Team.<br><br></div></div>'),
(2, 'forgot_password', 'Forgot Password', ' <div style=\"height: 7px; background-color: #535353;\"></div><div style=\"background-color:#E8E8E8; margin:0px; padding:55px 20px 40px 20px; font-family:Open Sans, Helvetica, sans-serif; font-size:12px; color:#535353;\"><div style=\"text-align:center; font-size:24px; font-weight:bold; color:#535353;\">New Password</div><div style=\"border-radius: 5px 5px 5px 5px; padding:20px; margin-top:45px; background-color:#FFFFFF; font-family:Open Sans, Helvetica, sans-serif; font-size:13px;\">Forgot your password, huh? No big deal.<br>To create a new password, just follow this link:<br><br><big><b><a href=\"{PASS_KEY_URL}\">Create a new password</a></b></big><br>Link doesn\'t work? Copy the following link to your browser address bar:<br><a href=\"{PASS_KEY_URL}\">{PASS_KEY_URL}</a><br><br><br>You received this email, because it was requested by a <a href=\"{SITE_URL}\">{SITE_NAME}</a> user. <p></p><p>This is part of the procedure to create a new password on the system. If you DID NOT request a new password then please ignore this email and your password will remain the same.</p><br>Thank you,<br>The {SITE_NAME} Team</div></div>'),
(3, 'change_email', 'Change Email', '<div style=\"height: 7px; background-color: #535353;\"></div>\r\n<div style=\"background-color:#E8E8E8; margin:0px; padding:55px 20px 40px 20px; font-family:Open Sans, Helvetica, sans-serif; font-size:12px; color:#535353;\"><div style=\"text-align:center; font-size:24px; font-weight:bold; color:#535353;\">New email address on {SITE_NAME}</div>\r\n\r\n<div style=\"border-radius: 5px 5px 5px 5px; padding:20px; margin-top:45px; background-color:#FFFFFF; font-family:Open Sans, Helvetica, sans-serif; font-size:13px;\">You have changed your email address for {SITE_NAME}.<br>Follow this link to confirm your new email address:<br><big><b><a href=\"{NEW_EMAIL_KEY_URL}\">Confirm your new email</a></b></big><br>Link doesn\'t work? Copy the following link to your browser address bar:<br><a href=\"{NEW_EMAIL_KEY_URL}\">{NEW_EMAIL_KEY_URL}</a><br><br>Your email address: {NEW_EMAIL}<br><br>You received this email, because it was requested by a <a href=\"{SITE_URL}\">{SITE_NAME}</a> user. If you have received this by mistake, please DO NOT click the confirmation link, and simply delete this email. After a short time, the request will be removed from the system.<br>Thank you,<br>The {SITE_NAME} Team</div>\r\n\r\n</div>'),
(4, 'activate_account', 'Activate Account', '<p>Welcome to {SITE_NAME}!</p>\r\n\r\n<p>Thanks for joining {SITE_NAME}. We listed your sign in details below, make sure you keep them safe.</p>\r\n\r\n<p>To verify your email address, please follow this link:<br />\r\n<big><strong><a href=\"{ACTIVATE_URL}\">Finish your registration...</a></strong></big><br />\r\nLink doesn't work? Copy the following link to your browser address bar:<br />\r\n<a href=\"{ACTIVATE_URL}\">{ACTIVATE_URL}</a></p>\r\n\r\n<p><br />\r\n<br />\r\nPlease verify your email within {ACTIVATION_PERIOD} hours, otherwise your registration will become invalid and you will have to register again.<br />\r\n<br />\r\n<br />\r\nYour username: {USERNAME}<br />\r\nYour email address: {EMAIL}<br />\r\nYour password: {PASSWORD}<br />\r\n<br />\r\nHave fun!<br />\r\nThe {SITE_NAME} Team</p>\r\n'),
(5, 'reset_password', 'Reset Password', '<div style=\"height: 7px; background-color: #535353;\"></div>\r\n<div style=\"background-color:#E8E8E8; margin:0px; padding:55px 20px 40px 20px; font-family:Open Sans, Helvetica, sans-serif; font-size:12px; color:#535353;\"><div style=\"text-align:center; font-size:24px; font-weight:bold; color:#535353;\">New password on {SITE_NAME}</div>\r\n<div style=\"border-radius: 5px 5px 5px 5px; padding:20px; margin-top:45px; background-color:#FFFFFF; font-family:Open Sans, Helvetica, sans-serif; font-size:13px;\"><p>You have changed your password.<br>Please, keep it in your records so you don\'t forget it.<br></p>\r\nYour username: {USERNAME}<br>Your email address: {EMAIL}<br>Your new password: {<PASSWORD>}<br><br>Thank you,<br>The {SITE_NAME} Team</div>\r\n</div>'),
(13, 'refund_confirmation', 'Refund Confirmation', '<p>Refund Confirmation</p>\r\n\r\n<p>Hello {CLIENT}</p>\r\n\r\n<p>This is confirmation that a refund has been processed for Invoice of {CURRENCY} {AMOUNT} sent on {INVOICE_DATE}.<br />\r\nYou can view the invoice online at:<br />\r\n<big><strong><a href=\"{INVOICE_LINK}\">View Invoice</a></strong></big><br />\r\n<br />\r\nBest Regards,<br />\r\nThe {SITE_NAME} Team</p>\r\n'),
(14, 'payment_confirmation', 'Payment Confirmation', '<p>Payment Confirmation</p>\r\n\r\n<p>Hello {CLIENT}</p>\r\n\r\n<p>This is a payment receipt for your invoice of {CURRENCY} {AMOUNT} sent on {INVOICE_DATE}.<br />\r\nYou can view the invoice online at:<br />\r\n<big><strong><a href=\"{INVOICE_LINK}\">View Invoice</a></strong></big><br />\r\n<br />\r\nBest Regards,<br />\r\nThe {SITE_NAME} Team</p>\r\n'),
(15, 'payment_email', 'Payment Received', '<div style=\"height: 7px; background-color: #535353;\"></div>\n<div style=\"background-color:#E8E8E8; margin:0px; padding:55px 20px 40px 20px; font-family:Open Sans, Helvetica, sans-serif; font-size:12px; color:#535353;\"><div style=\"text-align:center; font-size:24px; font-weight:bold; color:#535353;\">Payment Received</div>\n<div style=\"border-radius: 5px 5px 5px 5px; padding:20px; margin-top:45px; background-color:#FFFFFF; font-family:Open Sans, Helvetica, sans-serif; font-size:13px;\"><p>Dear Customer</p>\n<p>We have received your payment of {INVOICE_CURRENCY} {PAID_AMOUNT}. </p>\n<p>Thank you for your Payment and business. We look forward to working with you again.</p>\n--------------------------<br>Regards<br>The {SITE_NAME} Team</div>\n</div>'),
(16, 'invoice_overdue_email', 'Invoice Overdue Notice', '<p>Invoice Overdue</p>\r\n\r\n<p>INVOICE {REF}</p>\r\n\r\n<p><strong>Hello {CLIENT}</strong></p>\r\n\r\n<p>This is the notice that your invoice overdue. The invoice {CURRENCY} {AMOUNT}. and Due Date: {DUE_DATE}</p>\r\n\r\n<p>You can view the invoice online at:<br />\r\n<big><strong><a href=\"{INVOICE_LINK}\">View Invoice</a></strong></big><br />\r\n<br />\r\nBest Regards,<br />\r\nThe {SITE_NAME} Team</p>\r\n\r\n<p> </p>\r\n'),
(17, 'invoice_message', 'New Invoice', '<div style=\"height: 7px; background-color: #535353;\"></div><div style=\"background-color:#E8E8E8; margin:0px; padding:55px 20px 40px 20px; font-family:Open Sans, Helvetica, sans-serif; font-size:12px; color:#535353;\"><div style=\"text-align:center; font-size:24px; font-weight:bold; color:#535353;\">INVOICE {REF}</div><div style=\"border-radius: 5px 5px 5px 5px; padding:20px; margin-top:45px; background-color:#FFFFFF; font-family:Open Sans, Helvetica, sans-serif; font-size:13px;\"><span class=\"style1\"><span style=\"font-weight:bold;\">Hello {CLIENT}</span></span><br><br>Here is the invoice of {CURRENCY} {AMOUNT}.<br><br>You can view the invoice online at:<br><big><b><a href=\"{INVOICE_LINK}\">View Invoice</a></b></big><br><br>Best Regards<br><br>The {SITE_NAME} Team</div></div>'),
(18, 'invoice_reminder', 'Invoice Reminder', '<div style=\"height: 7px; background-color: #535353;\"></div>\r\n<div style=\"background-color:#E8E8E8; margin:0px; padding:55px 20px 40px 20px; font-family:Open Sans, Helvetica, sans-serif; font-size:12px; color:#535353;\"><div style=\"text-align:center; font-size:24px; font-weight:bold; color:#535353;\">Invoice Reminder</div>\r\n<div style=\"border-radius: 5px 5px 5px 5px; padding:20px; margin-top:45px; background-color:#FFFFFF; font-family:Open Sans, Helvetica, sans-serif; font-size:13px;\"><p>Hello {CLIENT}</p>\r\n<br><p>This is a friendly reminder to pay your invoice of {CURRENCY} {AMOUNT}<br>You can view the invoice online at:<br><big><b><a href=\"{INVOICE_LINK}\">View Invoice</a></b></big><br><br>Best Regards,<br>The {SITE_NAME} Team</p>\r\n</div>\r\n</div>'),
(19, 'message_received', 'Message Received', '<div style=\"height: 7px; background-color: #535353;\"></div>\r\n<div style=\"background-color:#E8E8E8; margin:0px; padding:55px 20px 40px 20px; font-family:Open Sans, Helvetica, sans-serif; font-size:12px; color:#535353;\"><div style=\"text-align:center; font-size:24px; font-weight:bold; color:#535353;\">Message Received</div>\r\n<div style=\"border-radius: 5px 5px 5px 5px; padding:20px; margin-top:45px; background-color:#FFFFFF; font-family:Open Sans, Helvetica, sans-serif; font-size:13px;\"><p>Hi {RECIPIENT},</p>\r\n<p>You have received a message from {SENDER}. </p>\r\n------------------------------------------------------------------<br><blockquote>\r\n{MESSAGE}</blockquote>\r\n<big><b><a href=\"{SITE_URL}\">Go to Account</a></b></big><br><br>Regards<br>The {SITE_NAME} Team</div>\r\n</div>'),
(20, 'estimate_email', 'New Estimate', '<p>Estimate {ESTIMATE_REF}</p>\r\n\r\n<p>Hi {CLIENT}</p>\r\n\r\n<p>Thanks for your business inquiry.</p>\r\n\r\n<p>The estimate {ESTIMATE_REF} is attached with this email.<br />\r\nEstimate Overview:<br />\r\nEstimate # : {ESTIMATE_REF}<br />\r\nAmount: {CURRENCY} {AMOUNT}<br />\r\n<br />\r\nYou can view the estimate online at:<br />\r\n<big><strong><a href=\"{ESTIMATE_LINK}\">View Estimate</a></strong></big><br />\r\n<br />\r\nBest Regards,<br />\r\nThe {SITE_NAME} Team</p>\r\n'),
(21, 'ticket_staff_email', 'New Ticket [TICKET_CODE]', '<div style=\"height: 7px; background-color: #535353;\"></div>\r\n<div style=\"background-color:#E8E8E8; margin:0px; padding:55px 20px 40px 20px; font-family:Open Sans, Helvetica, sans-serif; font-size:12px; color:#535353;\"><div style=\"text-align:center; font-size:24px; font-weight:bold; color:#535353;\">New Ticket</div>\r\n<div style=\"border-radius: 5px 5px 5px 5px; padding:20px; margin-top:45px; background-color:#FFFFFF; font-family:Open Sans, Helvetica, sans-serif; font-size:13px;\"><p>Ticket #{TICKET_CODE} has been created by the client.</p>\r\n<p>You may view the ticket by clicking on the following link <br><br> Client Email : {REPORTER_EMAIL}<br><br> <big><b><a href=\"{TICKET_LINK}\">View Ticket</a></b></big> <br><br>Regards<br><br>{SITE_NAME}</p>\r\n</div>\r\n</div>'),
(22, 'ticket_client_email', 'Ticket [TICKET_CODE] Opened', '<div style=\"height: 7px; background-color: #535353;\"></div>\r\n<div style=\"background-color:#E8E8E8; margin:0px; padding:55px 20px 40px 20px; font-family:Open Sans, Helvetica, sans-serif; font-size:12px; color:#535353;\"><div style=\"text-align:center; font-size:24px; font-weight:bold; color:#535353;\">Ticket Opened</div>\r\n<div style=\"border-radius: 5px 5px 5px 5px; padding:20px; margin-top:45px; background-color:#FFFFFF; font-family:Open Sans, Helvetica, sans-serif; font-size:13px;\"><p>Hello {CLIENT_EMAIL},<br><br></p>\r\n<p>Your ticket has been opened with us.<br><br>Ticket #{TICKET_CODE}<br>Status : Open<br><br>Click on the below link to see the ticket details and post additional comments.<br><br><big><b><a href=\"{TICKET_LINK}\">View Ticket</a></b></big><br><br>Regards<br><br>The {SITE_NAME} Team<br></p>\r\n</div>\r\n</div>'),
(23, 'ticket_reply_email', 'Ticket [TICKET_CODE] Response', '<div style=\"height: 7px; background-color: #535353;\"></div>\r\n<div style=\"background-color:#E8E8E8; margin:0px; padding:55px 20px 40px 20px; font-family:Open Sans, Helvetica, sans-serif; font-size:12px; color:#535353;\"><div style=\"text-align:center; font-size:24px; font-weight:bold; color:#535353;\">Ticket Response</div>\r\n<div style=\"border-radius: 5px 5px 5px 5px; padding:20px; margin-top:45px; background-color:#FFFFFF; font-family:Open Sans, Helvetica, sans-serif; font-size:13px;\"><p>A new response has been added to Ticket #{TICKET_CODE}<br><br> Ticket : #{TICKET_CODE} <br>Status : {TICKET_STATUS} <br><br></p>\r\nTo see the response and post additional comments, click on the link below.<br><br> <big><b><a href=\"{TICKET_LINK}\">View Reply</a> </b></big><br><br> Note: Do not reply to this email as this email is not monitored.<br><br> Regards<br>The {SITE_NAME} Team<br></div>\r\n</div>'),
(24, 'ticket_closed_email', 'Ticket [TICKET_CODE] Closed', '<div style=\"height: 7px; background-color: #535353;\"></div>\r\n<div style=\"background-color:#E8E8E8; margin:0px; padding:55px 20px 40px 20px; font-family:Open Sans, Helvetica, sans-serif; font-size:12px; color:#535353;\"><div style=\"text-align:center; font-size:24px; font-weight:bold; color:#535353;\">Ticket Closed</div>\r\n<div style=\"border-radius: 5px 5px 5px 5px; padding:20px; margin-top:45px; background-color:#FFFFFF; font-family:Open Sans, Helvetica, sans-serif; font-size:13px;\">Hi {REPORTER_EMAIL}<br><br>Ticket #{TICKET_CODE} has been closed by {STAFF_USERNAME} <br><br> Ticket : #{TICKET_CODE} <br> Status : {TICKET_STATUS}<br><br>Replies : {NO_OF_REPLIES}<br><br> To see the responses or open the ticket, click on the link below.<br><br> <big><b><a href=\"{TICKET_LINK}\">View Ticket</a></b></big> <br><br> Note: Do not reply to this email as this email is not monitored.<br><br> Regards<br>The {SITE_NAME} Team</div>\r\n</div>'),
(25, 'project_updated', 'Project updated', '<div style=\"height: 7px; background-color: #535353;\"></div>\r\n<div style=\"background-color:#E8E8E8; margin:0px; padding:55px 20px 40px 20px; font-family:Open Sans, Helvetica, sans-serif; font-size:12px; color:#535353;\"><div style=\"text-align:center; font-size:24px; font-weight:bold; color:#535353;\">Project updated</div>\r\n<div style=\"border-radius: 5px 5px 5px 5px; padding:20px; margin-top:45px; background-color:#FFFFFF; font-family:Open Sans, Helvetica, sans-serif; font-size:13px;\"><p>Hi there,</p>\r\n<p>{PROJECT_TITLE} ) has been updated by {ASSIGNED_BY}.</p>\r\n<p>You can view this project by logging in to the portal using the link below.</p>\r\n-----------------------------------<br><big><b><a href=\"{PROJECT_URL}\">View Project</a></b></big><br><br>Regards<br>The {SITE_NAME} Team</div>\r\n</div>'),
(26, 'task_updated', 'Task updated', '<div style=\"height: 7px; background-color: #535353;\"></div>\r\n<div style=\"background-color:#E8E8E8; margin:0px; padding:55px 20px 40px 20px; font-family:Open Sans, Helvetica, sans-serif; font-size:12px; color:#535353;\"><div style=\"text-align:center; font-size:24px; font-weight:bold; color:#535353;\">Task updated</div>\r\n<div style=\"border-radius: 5px 5px 5px 5px; padding:20px; margin-top:45px; background-color:#FFFFFF; font-family:Open Sans, Helvetica, sans-serif; font-size:13px;\"><p>Hi there,</p>\r\n<p>{TASK_NAME} in {PROJECT_TITLE} has been updated by {ASSIGNED_BY}.</p>\r\n<p>You can view this project by logging in to the portal using the link below.</p>\r\n-----------------------------------<br><big><b><a href=\"{PROJECT_URL}\">View Project</a></b></big><br><br>Regards<br>The {SITE_NAME} Team</div>\r\n</div>'),
(27, 'quotations_form', 'Your Quotation Request', '<p>QUOTATION</p>\r\n\r\n<p><strong>Hello {CLIENT}</strong><br />\r\n </p>\r\n\r\n<p>Thank you for you for filling in our Quotation Request Form.<br />\r\n<br />\r\nPlease find below are our quotation:</p>\r\n\r\n<p> </p>\r\n\r\n<table cellpadding=\"8\" style=\"width:100%\">\r\n <tbody>\r\n <tr>\r\n <td>Quotation Date</td>\r\n <td><strong>{DATE}</strong></td>\r\n </tr>\r\n <tr>\r\n <td>Our Quotation</td>\r\n <td><strong>{CURRENCY} {AMOUNT}</strong></td>\r\n </tr>\r\n <tr>\r\n <td>Addtitional Comments</td>\r\n <td><strong>{NOTES}</strong></td>\r\n </tr>\r\n </tbody>\r\n</table>\r\n\r\n<p><br />\r\nYou can view the estimate online at:<br />\r\n<big><strong><a href=\"{QUOTATION LINK}\">View Quotation</a></strong></big></p>\r\n\r\n<p> </p>\r\n\r\n<p><br />\r\nThank you and we look forward to working with you.<br />\r\n<br />\r\nBest Regards,<br />\r\nThe {SITE_NAME} Team</p>\r\n\r\n<p> </p>\r\n');
DROP TABLE IF EXISTS `tbl_estimates`;
CREATE TABLE `tbl_estimates` (
`estimates_id` int(11) NOT NULL AUTO_INCREMENT,
`reference_no` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
`client_id` int(11) DEFAULT NULL,
`due_date` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL,
`currency` varchar(32) COLLATE utf8_unicode_ci DEFAULT 'USD',
`discount` float NOT NULL,
`notes` text COLLATE utf8_unicode_ci,
`tax` int(11) NOT NULL DEFAULT '0',
`status` enum('Accepted','Declined','Pending') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Pending',
`date_sent` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
`est_deleted` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
`date_saved` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`emailed` enum('Yes','No') COLLATE utf8_unicode_ci DEFAULT 'No',
`show_client` enum('Yes','No') COLLATE utf8_unicode_ci DEFAULT 'No',
`invoiced` enum('Yes','No') COLLATE utf8_unicode_ci DEFAULT 'No',
`permission` text COLLATE utf8_unicode_ci,
PRIMARY KEY (`estimates_id`),
UNIQUE KEY `reference_no` (`reference_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `tbl_estimate_items`;
CREATE TABLE `tbl_estimate_items` (
`estimate_items_id` int(11) NOT NULL AUTO_INCREMENT,
`estimates_id` int(11) NOT NULL,
`item_tax_rate` decimal(10,2) NOT NULL DEFAULT '0.00',
`item_name` varchar(150) COLLATE utf8_unicode_ci DEFAULT 'Item Name',
`item_desc` longtext COLLATE utf8_unicode_ci,
`unit_cost` decimal(10,2) DEFAULT '0.00',
`quantity` decimal(10,2) DEFAULT '0.00',
`item_tax_total` decimal(10,2) DEFAULT '0.00',
`total_cost` decimal(10,2) DEFAULT '0.00',
`date_saved` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`item_order` int(11) DEFAULT '0',
PRIMARY KEY (`estimate_items_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `tbl_expense`;
CREATE TABLE `tbl_expense` (
`expense_id` int(5) NOT NULL AUTO_INCREMENT,
`expense_category_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`item_name` varchar(300) NOT NULL,
`purchase_from` varchar(300) NOT NULL,
`purchase_date` date NOT NULL,
`amount` double NOT NULL,
PRIMARY KEY (`expense_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `tbl_expense_bill_copy`;
CREATE TABLE `tbl_expense_bill_copy` (
`expense_bill_copy_id` int(11) NOT NULL AUTO_INCREMENT,
`expense_id` int(11) NOT NULL,
`bill_copy` text NOT NULL,
`bill_copy_filename` text NOT NULL,
`bill_copy_path` text NOT NULL,
PRIMARY KEY (`expense_bill_copy_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `tbl_expense_category`;
CREATE TABLE `tbl_expense_category` (
`expense_category_id` int(11) NOT NULL AUTO_INCREMENT,
`expense_category` varchar(200) NOT NULL,
`description` varchar(200) NOT NULL,
PRIMARY KEY (`expense_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `tbl_files`;
CREATE TABLE `tbl_files` (
`files_id` int(11) NOT NULL AUTO_INCREMENT,
`project_id` int(11) NOT NULL,
`title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`description` text COLLATE utf8_unicode_ci,
`uploaded_by` int(11) NOT NULL,
`date_posted` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`files_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `tbl_inbox`;
CREATE TABLE `tbl_inbox` (
`inbox_id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`to` varchar(100) NOT NULL,
`from` varchar(100) NOT NULL,
`subject` varchar(300) NOT NULL,
`message_body` text NOT NULL,
`attach_file` varchar(200) DEFAULT NULL,
`attach_file_path` text,
`attach_filename` text,
`message_time` datetime NOT NULL,
`view_status` tinyint(1) NOT NULL DEFAULT '2' COMMENT '1=Read 2=Unread',
`favourites` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0= no 1=yes',
`notify_me` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1=on 0=off',
`deleted` enum('Yes','No') NOT NULL DEFAULT 'No',
PRIMARY KEY (`inbox_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `tbl_inbox` (`inbox_id`, `user_id`, `to`, `from`, `subject`, `message_body`, `attach_file`, `attach_file_path`, `attach_filename`, `message_time`, `view_status`, `favourites`, `notify_me`, `deleted`) VALUES
(1, 1, '<EMAIL>', '<EMAIL>', 'Test', '<p>Hello </p>\n\n<p> </p>\n\n<p>How are you?</p>\n\n<p> </p>\n\n<p>Regards</p>\n', NULL, NULL, NULL, '2015-12-13 00:19:34', 1, 0, 1, 'No'),
(2, 1, '<EMAIL>', '<EMAIL>', 'Test', '<p>Hello</p>\n\n<p> </p>\n\n<p> </p>\n\n<p>How are you?</p>\n\n<p> </p>\n\n<p> </p>\n\n<p>Regards</p>\n', NULL, NULL, NULL, '2015-12-13 00:24:54', 1, 0, 1, 'No'),
(3, 3, '<EMAIL>', '<EMAIL>', 'Test', '<p>Hello</p>\n', NULL, NULL, NULL, '2015-12-14 12:12:37', 1, 0, 1, 'No');
DROP TABLE IF EXISTS `tbl_income_category`;
CREATE TABLE `tbl_income_category` (
`income_category_id` int(11) NOT NULL AUTO_INCREMENT,
`income_category` varchar(200) CHARACTER SET utf8 NOT NULL,
`description` varchar(200) CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`income_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `tbl_invoices`;
CREATE TABLE `tbl_invoices` (
`invoices_id` int(11) NOT NULL AUTO_INCREMENT,
`recur_start_date` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
`recur_end_date` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
`reference_no` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
`client_id` int(11) NOT NULL,
`due_date` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL,
`notes` text COLLATE utf8_unicode_ci NOT NULL,
`tax` decimal(10,2) NOT NULL DEFAULT '0.00',
`discount` decimal(10,2) NOT NULL DEFAULT '0.00',
`recurring` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
`recuring_frequency` int(11) NOT NULL DEFAULT '31',
`recur_frequency` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL,
`recur_next_date` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
`currency` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'USD',
`status` enum('Unpaid','Paid') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Unpaid',
`archived` int(11) DEFAULT '0',
`date_sent` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
`inv_deleted` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
`date_saved` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`emailed` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
`show_client` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Yes',
`viewed` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
`allow_paypal` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Yes',
`allow_stripe` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Yes',
`allow_2checkout` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Yes',
`allow_authorize` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
`allow_ccavenue` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
`allow_braintree` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
`permission` text COLLATE utf8_unicode_ci,
PRIMARY KEY (`invoices_id`),
UNIQUE KEY `reference_no` (`reference_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `tbl_invoices` (`invoices_id`, `recur_start_date`, `recur_end_date`, `reference_no`, `client_id`, `due_date`, `notes`, `tax`, `discount`, `recurring`, `recuring_frequency`, `recur_frequency`, `recur_next_date`, `currency`, `status`, `archived`, `date_sent`, `inv_deleted`, `date_saved`, `emailed`, `show_client`, `viewed`, `allow_paypal`, `allow_stripe`, `allow_2checkout`, `allow_authorize`, `allow_ccavenue`, `allow_braintree`, `permission`) VALUES
(2, '', '', 'INV-0001', 2, '2015-12-04', 'Thank you for <span >your</span> business. ', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2015-12-12 18:47:06', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(3, '', '', 'INV-0003', 3, '2015-12-19', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2015-12-19 17:43:11', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(4, '', '', 'INV-0004', 4, '2015-12-28', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2015-12-28 12:00:49', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(5, '', '', 'INV-0005', 4, '2016-01-13', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2016-01-14 06:40:47', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(6, '', '', 'INV-0006', 5, '2016-01-14', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2016-01-14 06:43:19', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(7, '', '', 'INV-0007', 6, '2016-01-10', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2016-01-14 09:57:20', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(8, '', '', 'INV-0008', 7, '2016-01-18', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2016-01-18 07:13:58', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(9, '', '', 'INV-0009', 8, '2016-01-27', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2016-02-01 16:50:24', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(10, '', '', 'INV-0010', 9, '2016-02-08', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'GBP', 'Unpaid', 0, NULL, 'No', '2016-02-08 13:02:47', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(11, '', '', 'INV-0011', 8, '2016-02-12', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2016-02-12 06:56:04', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(12, '', '', 'INV-0012', 11, '2016-02-21', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2016-02-24 10:42:59', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(13, '', '', 'INV-0013', 4, '2016-03-09', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2016-03-12 11:07:04', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(14, '', '', 'INV-0014', 4, '2016-03-15', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2016-03-15 06:43:57', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(16, '', '', 'INV-0015', 4, '2016-04-01', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2016-04-01 05:53:15', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(17, '', '', 'INV-0017', 5, '2016-04-06', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2016-04-06 07:22:15', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(18, '', '', 'INV-0018', 9, '2016-04-06', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'GBP', 'Unpaid', 0, NULL, 'No', '2016-04-06 12:17:17', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(19, '', '', 'INV-0019', 12, '2016-04-08', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2016-04-08 10:26:35', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(20, '', '', 'INV-0020', 13, '2016-04-16', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2016-04-16 10:19:54', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(21, '', '', 'INV-0021', 14, '2016-04-21', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2016-04-21 07:18:59', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(22, '', '', 'INV-0022', 15, '2016-04-25', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2016-04-25 10:45:41', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(23, '', '', 'INV-0023', 16, '2016-04-25', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2016-04-25 11:16:46', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(24, '', '', 'INV-0024', 17, '2016-04-25', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'PKR', 'Unpaid', 0, NULL, 'No', '2016-04-25 11:17:31', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL),
(26, '', '', 'INV-0025', 18, '2016-04-26', 'Thank you for <span >your</span> business. Please process this invoice within the due date.', 0.00, 0.00, 'No', 31, NULL, NULL, 'USD', 'Unpaid', 0, NULL, 'No', '2016-04-26 11:03:22', 'No', 'Yes', 'No', 'No', 'No', 'No', 'No', 'No', 'No', NULL);
DROP TABLE IF EXISTS `tbl_items`;
CREATE TABLE `tbl_items` (
`items_id` int(11) NOT NULL AUTO_INCREMENT,
`invoices_id` int(11) NOT NULL,
`item_tax_rate` decimal(10,2) NOT NULL DEFAULT '0.00',
`item_tax_total` decimal(10,2) NOT NULL DEFAULT '0.00',
`quantity` decimal(10,2) DEFAULT '0.00',
`total_cost` decimal(10,2) DEFAULT '0.00',
`item_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT 'Item Name',
`item_desc` longtext COLLATE utf8_unicode_ci,
`unit_cost` decimal(10,2) DEFAULT '0.00',
`item_order` int(11) DEFAULT '0',
`date_saved` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`items_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `tbl_items` (`items_id`, `invoices_id`, `item_tax_rate`, `item_tax_total`, `quantity`, `total_cost`, `item_name`, `item_desc`, `unit_cost`, `item_order`, `date_saved`) VALUES
(1, 2, 0.00, 0.00, 1.00, 8000.00, 'AlbatoolQuran.com', 'Static Website + Domain + Hosting', 8000.00, 1, '2015-12-12 18:47:37'),
(2, 3, 0.00, 0.00, 1.00, 10000.00, 'Domain + Hosting + Website', 'KhanKebab.co', 10000.00, 1, '2015-12-19 17:43:44'),
(3, 4, 0.00, 0.00, 1.00, 56238.00, 'Received from CanadaWebServices.com', 'Received from CanadaWebServices.com', 56238.00, 1, '2015-12-28 12:01:40'),
(4, 5, 0.00, 0.00, 1.00, 51004.00, 'Payments from Canada Web Services', 'Art Gallery Site', 51004.00, 2, '2016-01-14 06:41:25'),
(5, 6, 0.00, 0.00, 1.00, 7192.00, 'From upwork', 'Massete changes', 7192.00, 1, '2016-01-14 06:43:44'),
(6, 7, 0.00, 0.00, 1.00, 10000.00, 'Inaam Distribution Software', 'Inaam Distribution Software\nFirst Payment Received', 10000.00, 1, '2016-01-14 09:58:12'),
(7, 8, 0.00, 0.00, 1.00, 1342.00, 'ecosurg.net', 'ecosurg.net', 1342.00, 1, '2016-01-18 07:14:41'),
(8, 9, 0.00, 0.00, 1.00, 20000.00, 'Shehsaaz Website', 'http://shehersaaz.com/', 20000.00, 1, '2016-02-01 16:51:21'),
(9, 10, 0.00, 0.00, 1.00, 480.00, 'eCommerce Website', 'https://www.inkcartridges.london/', 480.00, 1, '2016-02-08 13:03:20'),
(10, 11, 0.00, 0.00, 1.00, 2000.00, 'Domain ', 'Century21.pk for 2 years', 2000.00, 3, '2016-02-12 06:57:38'),
(11, 11, 0.00, 0.00, 1.00, 2000.00, 'Hosting', 'for 2 years', 2000.00, 1, '2016-02-12 06:57:38'),
(12, 12, 0.00, 0.00, 1.00, 15000.00, 'Desktop Software for Shop', 'Desktop Software for Shop', 15000.00, 1, '2016-02-24 10:43:28'),
(13, 13, 0.00, 0.00, 1.00, 50000.00, 'Payments from Canada Web Services', 'Received through PayPal', 50000.00, 1, '2016-03-12 11:07:34'),
(14, 14, 0.00, 0.00, 1.00, 8200.00, 'Payments from Canada Web Services', 'From PayPal', 8200.00, 1, '2016-03-15 06:44:26'),
(16, 16, 0.00, 0.00, 1.00, 54471.00, 'From Canada Web Services', 'From Canada Web Services', 54471.00, 1, '2016-04-01 05:55:07'),
(17, 17, 0.00, 0.00, 1.00, 12300.00, 'Elance Payment for ebay template.', 'Payment from Elance', 12300.00, 1, '2016-04-06 07:23:46'),
(18, 18, 0.00, 0.00, 1.00, 234.00, 'Data Entry', '1170 Products added @ 20 products per hour.', 234.00, 1, '2016-04-06 12:22:02'),
(19, 18, 0.00, 0.00, 1.00, 40.00, 'Modifications of Products and Categories', 'Added images, modified products descriptions, added extra options to products - Total time: 10 hours', 40.00, 1, '2016-04-06 12:22:02'),
(20, 18, 0.00, 0.00, 1.00, 40.00, 'Products Comparison', 'Generated Products Comparison Sheet - Total Time: 10 hours', 40.00, 1, '2016-04-06 12:22:02'),
(21, 19, 0.00, 0.00, 1.00, 1100.00, 'Domain Transfer', 'justonereligion.com', 1100.00, 1, '2016-04-08 10:26:58'),
(22, 20, 0.00, 0.00, 1.00, 46350.00, 'Website Development', 'NYDC Website Development', 46350.00, 1, '2016-04-16 10:20:40'),
(23, 21, 0.00, 0.00, 1.00, 35000.00, 'Mobile Application', 'Mobile Application Development for Idara-tul-Mustafa', 35000.00, 1, '2016-04-21 07:20:21'),
(24, 22, 0.00, 0.00, 1.00, 28000.00, 'Distributor Management Software', 'Software for Jhelum Traders', 28000.00, 2, '2016-04-25 10:47:09'),
(25, 23, 0.00, 0.00, 1.00, 25000.00, 'CodeBite POS', 'Software for Hassan Optics', 25000.00, 1, '2016-04-25 11:17:05'),
(26, 24, 0.00, 0.00, 1.00, 60000.00, 'Branch Management Software', 'Software for Master Celeste Centaurus Mall', 60000.00, 1, '2016-04-25 11:18:24'),
(28, 26, 0.00, 0.00, 1.00, 280.00, 'www.sys-archi.com', 'Magento Theme Installation and Site Modifications', 280.00, 1, '2016-04-26 11:03:56');
DROP TABLE IF EXISTS `tbl_languages`;
CREATE TABLE `tbl_languages` (
`code` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
`name` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`icon` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`active` int(2) DEFAULT '0',
PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `tbl_languages` (`code`, `name`, `icon`, `active`) VALUES
('en', 'english', 'us', 1);
DROP TABLE IF EXISTS `tbl_leads`;
CREATE TABLE `tbl_leads` (
`leads_id` int(11) NOT NULL AUTO_INCREMENT,
`lead_name` varchar(50) NOT NULL,
`client_id` int(11) DEFAULT NULL,
`company_name` varchar(255) NOT NULL,
`address` text NOT NULL,
`country` varchar(20) NOT NULL,
`state` varchar(20) NOT NULL,
`city` varchar(50) NOT NULL,
`contact_name` varchar(255) NOT NULL,
`title` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`phone` varchar(32) NOT NULL,
`mobile` varchar(32) NOT NULL,
`facebook` varchar(32) NOT NULL,
`notes` text NOT NULL,
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`skype` varchar(200) NOT NULL,
`twitter` varchar(100) NOT NULL,
`permission` text,
PRIMARY KEY (`leads_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `tbl_lead_source`;
CREATE TABLE `tbl_lead_source` (
`lead_source_id` int(11) NOT NULL AUTO_INCREMENT,
`lead_source` varchar(100) NOT NULL,
PRIMARY KEY (`lead_source_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `tbl_lead_status`;
CREATE TABLE `tbl_lead_status` (
`lead_status_id` int(11) NOT NULL AUTO_INCREMENT,
`lead_status` varchar(50) NOT NULL,
`lead_type` enum('open','close') NOT NULL,
PRIMARY KEY (`lead_status_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `tbl_locales`;
CREATE TABLE `tbl_locales` (
`locale` varchar(10) NOT NULL,
`code` varchar(10) DEFAULT NULL,
`language` varchar(100) DEFAULT NULL,
`name` varchar(250) NOT NULL DEFAULT '',
PRIMARY KEY (`locale`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `tbl_locales` (`locale`, `code`, `language`, `name`) VALUES
('aa_DJ', 'aa', 'afar', 'Afar (Djibouti)'),
('aa_ER', 'aa', 'afar', 'Afar (Eritrea)'),
('aa_ET', 'aa', 'afar', 'Afar (Ethiopia)'),
('af_ZA', 'af', 'afrikaans', 'Afrikaans (South Africa)'),
('am_ET', 'am', 'amharic', 'Amharic (Ethiopia)'),
('an_ES', 'an', 'aragonese', 'Aragonese (Spain)'),
('ar_AE', 'ar', 'arabic', 'Arabic (United Arab Emirates)'),
('ar_BH', 'ar', 'arabic', 'Arabic (Bahrain)'),
('ar_DZ', 'ar', 'arabic', 'Arabic (Algeria)'),
('ar_EG', 'ar', 'arabic', 'Arabic (Egypt)'),
('ar_IN', 'ar', 'arabic', 'Arabic (India)'),
('ar_IQ', 'ar', 'arabic', 'Arabic (Iraq)'),
('ar_JO', 'ar', 'arabic', 'Arabic (Jordan)'),
('ar_KW', 'ar', 'arabic', 'Arabic (Kuwait)'),
('ar_LB', 'ar', 'arabic', 'Arabic (Lebanon)'),
('ar_LY', 'ar', 'arabic', 'Arabic (Libya)'),
('ar_MA', 'ar', 'arabic', 'Arabic (Morocco)'),
('ar_OM', 'ar', 'arabic', 'Arabic (Oman)'),
('ar_QA', 'ar', 'arabic', 'Arabic (Qatar)'),
('ar_SA', 'ar', 'arabic', 'Arabic (Saudi Arabia)'),
('ar_SD', 'ar', 'arabic', 'Arabic (Sudan)'),
('ar_SY', 'ar', 'arabic', 'Arabic (Syria)'),
('ar_TN', 'ar', 'arabic', 'Arabic (Tunisia)'),
('ar_YE', 'ar', 'arabic', 'Arabic (Yemen)'),
('ast_ES', 'ast', 'asturian', 'Asturian (Spain)'),
('as_IN', 'as', 'assamese', 'Assamese (India)'),
('az_AZ', 'az', 'azerbaijani', 'Azerbaijani (Azerbaijan)'),
('az_TR', 'az', 'azerbaijani', 'Azerbaijani (Turkey)'),
('bem_ZM', 'bem', 'bemba', 'Bemba (Zambia)'),
('ber_DZ', 'ber', 'berber', 'Berber (Algeria)'),
('ber_MA', 'ber', 'berber', 'Berber (Morocco)'),
('be_BY', 'be', 'belarusian', 'Belarusian (Belarus)'),
('bg_BG', 'bg', 'bulgarian', 'Bulgarian (Bulgaria)'),
('bn_BD', 'bn', 'bengali', 'Bengali (Bangladesh)'),
('bn_IN', 'bn', 'bengali', 'Bengali (India)'),
('bo_CN', 'bo', 'tibetan', 'Tibetan (China)'),
('bo_IN', 'bo', 'tibetan', 'Tibetan (India)'),
('br_FR', 'br', 'breton', 'Breton (France)'),
('bs_BA', 'bs', 'bosnian', 'Bosnian (Bosnia and Herzegovina)'),
('byn_ER', 'byn', 'blin', 'Blin (Eritrea)'),
('ca_AD', 'ca', 'catalan', 'Catalan (Andorra)'),
('ca_ES', 'ca', 'catalan', 'Catalan (Spain)'),
('ca_FR', 'ca', 'catalan', 'Catalan (France)'),
('ca_IT', 'ca', 'catalan', 'Catalan (Italy)'),
('crh_UA', 'crh', 'crimean turkish', 'Crimean Turkish (Ukraine)'),
('csb_PL', 'csb', 'kashubian', 'Kashubian (Poland)'),
('cs_CZ', 'cs', 'czech', 'Czech (Czech Republic)'),
('cv_RU', 'cv', 'chuvash', 'Chuvash (Russia)'),
('cy_GB', 'cy', 'welsh', 'Welsh (United Kingdom)'),
('da_DK', 'da', 'danish', 'Danish (Denmark)'),
('de_AT', 'de', 'german', 'German (Austria)'),
('de_BE', 'de', 'german', 'German (Belgium)'),
('de_CH', 'de', 'german', 'German (Switzerland)'),
('de_DE', 'de', 'german', 'German (Germany)'),
('de_LI', 'de', 'german', 'German (Liechtenstein)'),
('de_LU', 'de', 'german', 'German (Luxembourg)'),
('dv_MV', 'dv', 'divehi', 'Divehi (Maldives)'),
('dz_BT', 'dz', 'dzongkha', 'Dzongkha (Bhutan)'),
('ee_GH', 'ee', 'ewe', 'Ewe (Ghana)'),
('el_CY', 'el', 'greek', 'Greek (Cyprus)'),
('el_GR', 'el', 'greek', 'Greek (Greece)'),
('en_AG', 'en', 'english', 'English (Antigua and Barbuda)'),
('en_AS', 'en', 'english', 'English (American Samoa)'),
('en_AU', 'en', 'english', 'English (Australia)'),
('en_BW', 'en', 'english', 'English (Botswana)'),
('en_CA', 'en', 'english', 'English (Canada)'),
('en_DK', 'en', 'english', 'English (Denmark)'),
('en_GB', 'en', 'english', 'English (United Kingdom)'),
('en_GU', 'en', 'english', 'English (Guam)'),
('en_HK', 'en', 'english', 'English (Hong Kong SAR China)'),
('en_IE', 'en', 'english', 'English (Ireland)'),
('en_IN', 'en', 'english', 'English (India)'),
('en_JM', 'en', 'english', 'English (Jamaica)'),
('en_MH', 'en', 'english', 'English (Marshall Islands)'),
('en_MP', 'en', 'english', 'English (Northern Mariana Islands)'),
('en_MU', 'en', 'english', 'English (Mauritius)'),
('en_NG', 'en', 'english', 'English (Nigeria)'),
('en_NZ', 'en', 'english', 'English (New Zealand)'),
('en_PH', 'en', 'english', 'English (Philippines)'),
('en_SG', 'en', 'english', 'English (Singapore)'),
('en_TT', 'en', 'english', 'English (Trinidad and Tobago)'),
('en_US', 'en', 'english', 'English (United States)'),
('en_VI', 'en', 'english', 'English (Virgin Islands)'),
('en_ZA', 'en', 'english', 'English (South Africa)'),
('en_ZM', 'en', 'english', 'English (Zambia)'),
('en_ZW', 'en', 'english', 'English (Zimbabwe)'),
('eo', 'eo', 'esperanto', 'Esperanto'),
('es_AR', 'es', 'spanish', 'Spanish (Argentina)'),
('es_BO', 'es', 'spanish', 'Spanish (Bolivia)'),
('es_CL', 'es', 'spanish', 'Spanish (Chile)'),
('es_CO', 'es', 'spanish', 'Spanish (Colombia)'),
('es_CR', 'es', 'spanish', 'Spanish (Costa Rica)'),
('es_DO', 'es', 'spanish', 'Spanish (Dominican Republic)'),
('es_EC', 'es', 'spanish', 'Spanish (Ecuador)'),
('es_ES', 'es', 'spanish', 'Spanish (Spain)'),
('es_GT', 'es', 'spanish', 'Spanish (Guatemala)'),
('es_HN', 'es', 'spanish', 'Spanish (Honduras)'),
('es_MX', 'es', 'spanish', 'Spanish (Mexico)'),
('es_NI', 'es', 'spanish', 'Spanish (Nicaragua)'),
('es_PA', 'es', 'spanish', 'Spanish (Panama)'),
('es_PE', 'es', 'spanish', 'Spanish (Peru)'),
('es_PR', 'es', 'spanish', 'Spanish (Puerto Rico)'),
('es_PY', 'es', 'spanish', 'Spanish (Paraguay)'),
('es_SV', 'es', 'spanish', 'Spanish (El Salvador)'),
('es_US', 'es', 'spanish', 'Spanish (United States)'),
('es_UY', 'es', 'spanish', 'Spanish (Uruguay)'),
('es_VE', 'es', 'spanish', 'Spanish (Venezuela)'),
('et_EE', 'et', 'estonian', 'Estonian (Estonia)'),
('eu_ES', 'eu', 'basque', 'Basque (Spain)'),
('eu_FR', 'eu', 'basque', 'Basque (France)'),
('fa_AF', 'fa', 'persian', 'Persian (Afghanistan)'),
('fa_IR', 'fa', 'persian', 'Persian (Iran)'),
('ff_SN', 'ff', 'fulah', 'Fulah (Senegal)'),
('fil_PH', 'fil', 'filipino', 'Filipino (Philippines)'),
('fi_FI', 'fi', 'finnish', 'Finnish (Finland)'),
('fo_FO', 'fo', 'faroese', 'Faroese (Faroe Islands)'),
('fr_BE', 'fr', 'french', 'French (Belgium)'),
('fr_BF', 'fr', 'french', 'French (Burkina Faso)'),
('fr_BI', 'fr', 'french', 'French (Burundi)'),
('fr_BJ', 'fr', 'french', 'French (Benin)'),
('fr_CA', 'fr', 'french', 'French (Canada)'),
('fr_CF', 'fr', 'french', 'French (Central African Republic)'),
('fr_CG', 'fr', 'french', 'French (Congo)'),
('fr_CH', 'fr', 'french', 'French (Switzerland)'),
('fr_CM', 'fr', 'french', 'French (Cameroon)'),
('fr_FR', 'fr', 'french', 'French (France)'),
('fr_GA', 'fr', 'french', 'French (Gabon)'),
('fr_GN', 'fr', 'french', 'French (Guinea)'),
('fr_GP', 'fr', 'french', 'French (Guadeloupe)'),
('fr_GQ', 'fr', 'french', 'French (Equatorial Guinea)'),
('fr_KM', 'fr', 'french', 'French (Comoros)'),
('fr_LU', 'fr', 'french', 'French (Luxembourg)'),
('fr_MC', 'fr', 'french', 'French (Monaco)'),
('fr_MG', 'fr', 'french', 'French (Madagascar)'),
('fr_ML', 'fr', 'french', 'French (Mali)'),
('fr_MQ', 'fr', 'french', 'French (Martinique)'),
('fr_NE', 'fr', 'french', 'French (Niger)'),
('fr_SN', 'fr', 'french', 'French (Senegal)'),
('fr_TD', 'fr', 'french', 'French (Chad)'),
('fr_TG', 'fr', 'french', 'French (Togo)'),
('fur_IT', 'fur', 'friulian', 'Friulian (Italy)'),
('fy_DE', 'fy', 'western frisian', 'Western Frisian (Germany)'),
('fy_NL', 'fy', 'western frisian', 'Western Frisian (Netherlands)'),
('ga_IE', 'ga', 'irish', 'Irish (Ireland)'),
('gd_GB', 'gd', 'scottish gaelic', 'Scottish Gaelic (United Kingdom)'),
('gez_ER', 'gez', 'geez', 'Geez (Eritrea)'),
('gez_ET', 'gez', 'geez', 'Geez (Ethiopia)'),
('gl_ES', 'gl', 'galician', 'Galician (Spain)'),
('gu_IN', 'gu', 'gujarati', 'Gujarati (India)'),
('gv_GB', 'gv', 'manx', 'Manx (United Kingdom)'),
('ha_NG', 'ha', 'hausa', 'Hausa (Nigeria)'),
('he_IL', 'he', 'hebrew', 'Hebrew (Israel)'),
('hi_IN', 'hi', 'hindi', 'Hindi (India)'),
('hr_HR', 'hr', 'croatian', 'Croatian (Croatia)'),
('hsb_DE', 'hsb', 'upper sorbian', 'Upper Sorbian (Germany)'),
('ht_HT', 'ht', 'haitian', 'Haitian (Haiti)'),
('hu_HU', 'hu', 'hungarian', 'Hungarian (Hungary)'),
('hy_AM', 'hy', 'armenian', 'Armenian (Armenia)'),
('ia', 'ia', 'interlingua', 'Interlingua'),
('id_ID', 'id', 'indonesian', 'Indonesian (Indonesia)'),
('ig_NG', 'ig', 'igbo', 'Igbo (Nigeria)'),
('ik_CA', 'ik', 'inupiaq', 'Inupiaq (Canada)'),
('is_IS', 'is', 'icelandic', 'Icelandic (Iceland)'),
('it_CH', 'it', 'italian', 'Italian (Switzerland)'),
('it_IT', 'it', 'italian', 'Italian (Italy)'),
('iu_CA', 'iu', 'inuktitut', 'Inuktitut (Canada)'),
('ja_JP', 'ja', 'japanese', 'Japanese (Japan)'),
('ka_GE', 'ka', 'georgian', 'Georgian (Georgia)'),
('kk_KZ', 'kk', 'kazakh', 'Kazakh (Kazakhstan)'),
('kl_GL', 'kl', 'kalaallisut', 'Kalaallisut (Greenland)'),
('km_KH', 'km', 'khmer', 'Khmer (Cambodia)'),
('kn_IN', 'kn', 'kannada', 'Kannada (India)'),
('kok_IN', 'kok', 'konkani', 'Konkani (India)'),
('ko_KR', 'ko', 'korean', 'Korean (South Korea)'),
('ks_IN', 'ks', 'kashmiri', 'Kashmiri (India)'),
('ku_TR', 'ku', 'kurdish', 'Kurdish (Turkey)'),
('kw_GB', 'kw', 'cornish', 'Cornish (United Kingdom)'),
('ky_KG', 'ky', 'kirghiz', 'Kirghiz (Kyrgyzstan)'),
('lg_UG', 'lg', 'ganda', 'Ganda (Uganda)'),
('li_BE', 'li', 'limburgish', 'Limburgish (Belgium)'),
('li_NL', 'li', 'limburgish', 'Limburgish (Netherlands)'),
('lo_LA', 'lo', 'lao', 'Lao (Laos)'),
('lt_LT', 'lt', 'lithuanian', 'Lithuanian (Lithuania)'),
('lv_LV', 'lv', 'latvian', 'Latvian (Latvia)'),
('mai_IN', 'mai', 'maithili', 'Maithili (India)'),
('mg_MG', 'mg', 'malagasy', 'Malagasy (Madagascar)'),
('mi_NZ', 'mi', 'maori', 'Maori (New Zealand)'),
('mk_MK', 'mk', 'macedonian', 'Macedonian (Macedonia)'),
('ml_IN', 'ml', 'malayalam', 'Malayalam (India)'),
('mn_MN', 'mn', 'mongolian', 'Mongolian (Mongolia)'),
('mr_IN', 'mr', 'marathi', 'Marathi (India)'),
('ms_BN', 'ms', 'malay', 'Malay (Brunei)'),
('ms_MY', 'ms', 'malay', 'Malay (Malaysia)'),
('mt_MT', 'mt', 'maltese', 'Maltese (Malta)'),
('my_MM', 'my', 'burmese', 'Burmese (Myanmar)'),
('naq_NA', 'naq', 'namibia', 'Namibia'),
('nb_NO', 'nb', 'norwegian bokmål', 'Norwegian Bokmål (Norway)'),
('nds_DE', 'nds', 'low german', 'Low German (Germany)'),
('nds_NL', 'nds', 'low german', 'Low German (Netherlands)'),
('ne_NP', 'ne', 'nepali', 'Nepali (Nepal)'),
('nl_AW', 'nl', 'dutch', 'Dutch (Aruba)'),
('nl_BE', 'nl', 'dutch', 'Dutch (Belgium)'),
('nl_NL', 'nl', 'dutch', 'Dutch (Netherlands)'),
('nn_NO', 'nn', 'norwegian nynorsk', 'Norwegian Nynorsk (Norway)'),
('no_NO', 'no', 'norwegian', 'Norwegian (Norway)'),
('nr_ZA', 'nr', 'south ndebele', 'South Ndebele (South Africa)'),
('nso_ZA', 'nso', 'northern sotho', 'Northern Sotho (South Africa)'),
('oc_FR', 'oc', 'occitan', 'Occitan (France)'),
('om_ET', 'om', 'oromo', 'Oromo (Ethiopia)'),
('om_KE', 'om', 'oromo', 'Oromo (Kenya)'),
('or_IN', 'or', 'oriya', 'Oriya (India)'),
('os_RU', 'os', 'ossetic', 'Ossetic (Russia)'),
('pap_AN', 'pap', 'papiamento', 'Papiamento (Netherlands Antilles)'),
('pa_IN', 'pa', 'punjabi', 'Punjabi (India)'),
('pa_PK', 'pa', 'punjabi', 'Punjabi (Pakistan)'),
('pl_PL', 'pl', 'polish', 'Polish (Poland)'),
('ps_AF', 'ps', 'pashto', 'Pashto (Afghanistan)'),
('pt_BR', 'pt', 'portuguese', 'Portuguese (Brazil)'),
('pt_GW', 'pt', 'portuguese', 'Portuguese (Guinea-Bissau)'),
('pt_PT', 'pt', 'portuguese', 'Portuguese (Portugal)'),
('ro_MD', 'ro', 'romanian', 'Romanian (Moldova)'),
('ro_RO', 'ro', 'romanian', 'Romanian (Romania)'),
('ru_RU', 'ru', 'russian', 'Russian (Russia)'),
('ru_UA', 'ru', 'russian', 'Russian (Ukraine)'),
('rw_RW', 'rw', 'kinyarwanda', 'Kinyarwanda (Rwanda)'),
('sa_IN', 'sa', 'sanskrit', 'Sanskrit (India)'),
('sc_IT', 'sc', 'sardinian', 'Sardinian (Italy)'),
('sd_IN', 'sd', 'sindhi', 'Sindhi (India)'),
('seh_MZ', 'seh', 'sena', 'Sena (Mozambique)'),
('se_NO', 'se', 'northern sami', 'Northern Sami (Norway)'),
('sid_ET', 'sid', 'sidamo', 'Sidamo (Ethiopia)'),
('si_LK', 'si', 'sinhala', 'Sinhala (Sri Lanka)'),
('sk_SK', 'sk', 'slovak', 'Slovak (Slovakia)'),
('sl_SI', 'sl', 'slovenian', 'Slovenian (Slovenia)'),
('sn_ZW', 'sn', 'shona', 'Shona (Zimbabwe)'),
('so_DJ', 'so', 'somali', 'Somali (Djibouti)'),
('so_ET', 'so', 'somali', 'Somali (Ethiopia)'),
('so_KE', 'so', 'somali', 'Somali (Kenya)'),
('so_SO', 'so', 'somali', 'Somali (Somalia)'),
('sq_AL', 'sq', 'albanian', 'Albanian (Albania)'),
('sq_MK', 'sq', 'albanian', 'Albanian (Macedonia)'),
('sr_BA', 'sr', 'serbian', 'Serbian (Bosnia and Herzegovina)'),
('sr_ME', 'sr', 'serbian', 'Serbian (Montenegro)'),
('sr_RS', 'sr', 'serbian', 'Serbian (Serbia)'),
('ss_ZA', 'ss', 'swati', 'Swati (South Africa)'),
('st_ZA', 'st', 'southern sotho', 'Southern Sotho (South Africa)'),
('sv_FI', 'sv', 'swedish', 'Swedish (Finland)'),
('sv_SE', 'sv', 'swedish', 'Swedish (Sweden)'),
('sw_KE', 'sw', 'swahili', 'Swahili (Kenya)'),
('sw_TZ', 'sw', 'swahili', 'Swahili (Tanzania)'),
('ta_IN', 'ta', 'tamil', 'Tamil (India)'),
('teo_UG', 'teo', 'teso', 'Teso (Uganda)'),
('te_IN', 'te', 'telugu', 'Telugu (India)'),
('tg_TJ', 'tg', 'tajik', 'Tajik (Tajikistan)'),
('th_TH', 'th', 'thai', 'Thai (Thailand)'),
('tig_ER', 'tig', 'tigre', 'Tigre (Eritrea)'),
('ti_ER', 'ti', 'tigrinya', 'Tigrinya (Eritrea)'),
('ti_ET', 'ti', 'tigrinya', 'Tigrinya (Ethiopia)'),
('tk_TM', 'tk', 'turkmen', 'Turkmen (Turkmenistan)'),
('tl_PH', 'tl', 'tagalog', 'Tagalog (Philippines)'),
('tn_ZA', 'tn', 'tswana', 'Tswana (South Africa)'),
('to_TO', 'to', 'tongan', 'Tongan (Tonga)'),
('tr_CY', 'tr', 'turkish', 'Turkish (Cyprus)'),
('tr_TR', 'tr', 'turkish', 'Turkish (Turkey)'),
('ts_ZA', 'ts', 'tsonga', 'Tsonga (South Africa)'),
('tt_RU', 'tt', 'tatar', 'Tatar (Russia)'),
('ug_CN', 'ug', 'uighur', 'Uighur (China)'),
('uk_UA', 'uk', 'ukrainian', 'Ukrainian (Ukraine)'),
('ur_PK', 'ur', 'urdu', 'Urdu (Pakistan)'),
('uz_UZ', 'uz', 'uzbek', 'Uzbek (Uzbekistan)'),
('ve_ZA', 've', 'venda', 'Venda (South Africa)'),
('vi_VN', 'vi', 'vietnamese', 'Vietnamese (Vietnam)'),
('wa_BE', 'wa', 'walloon', 'Walloon (Belgium)'),
('wo_SN', 'wo', 'wolof', 'Wolof (Senegal)'),
('xh_ZA', 'xh', 'xhosa', 'Xhosa (South Africa)'),
('yi_US', 'yi', 'yiddish', 'Yiddish (United States)'),
('yo_NG', 'yo', 'yoruba', 'Yoruba (Nigeria)'),
('zh_CN', 'zh', 'chinese', 'Chinese (China)'),
('zh_HK', 'zh', 'chinese', 'Chinese (Hong Kong SAR China)'),
('zh_SG', 'zh', 'chinese', 'Chinese (Singapore)'),
('zh_TW', 'zh', 'chinese', 'Chinese (Taiwan)'),
('zu_ZA', 'zu', 'zulu', 'Zulu (South Africa)');
DROP TABLE IF EXISTS `tbl_menu`;
CREATE TABLE `tbl_menu` (
`menu_id` int(11) NOT NULL AUTO_INCREMENT,
`label` varchar(100) NOT NULL,
`link` varchar(100) NOT NULL,
`icon` varchar(100) NOT NULL,
`parent` int(11) NOT NULL DEFAULT '0',
`sort` int(11) NOT NULL,
PRIMARY KEY (`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `tbl_menu` (`menu_id`, `label`, `link`, `icon`, `parent`, `sort`) VALUES
(1, 'dashboard', 'admin/dashboard', 'fa fa-dashboard', 0, 1),
(4, 'client', 'admin/client/manage_client', 'fa fa-users', 0, 4),
(5, 'mailbox', 'admin/mailbox', 'fa fa-envelope-o', 0, 5),
(6, 'tickets', '#', 'fa fa-ticket', 0, 6),
(7, 'all_tickets', 'admin/tickets', 'fa fa-ticket', 6, 5),
(8, 'answered', 'admin/tickets/answered', 'fa fa-circle-o', 6, 1),
(9, 'open', 'admin/tickets/open', 'fa fa-circle-o', 6, 2),
(10, 'in_progress', 'admin/tickets/in_progress', 'fa fa-circle-o', 6, 3),
(11, 'closed', 'admin/tickets/closed', 'fa fa-circle-o', 6, 4),
(12, 'sales', '#', 'fa fa-shopping-cart', 0, 3),
(13, 'invoice', 'admin/invoice/manage_invoice', 'fa fa-circle-o', 12, 1),
(14, 'estimates', 'admin/estimates', 'fa fa-circle-o', 12, 3),
(15, 'payments_received', 'admin/invoice/all_payments', 'fa fa-circle-o', 12, 3),
(16, 'tax_rates', 'admin/invoice/tax_rates', 'fa fa-circle-o', 12, 4),
(21, 'quotations', '#', 'fa fa-paste', 0, 9),
(22, 'quotations', 'admin/quotations', 'fa fa-circle-o', 21, 1),
(23, 'quotations_form', 'admin/quotations/quotations_form', 'fa fa-circle-o', 21, 2),
(24, 'user', 'admin/user/user_list', 'fa fa-users', 0, 10),
(25, 'settings', 'admin/settings', 'fa fa-cogs', 0, 11),
(26, 'database_backup', 'admin/settings/database_backup', 'fa fa-database', 0, 12),
(29, 'transactions', '#', 'fa fa-building-o', 0, 2),
(30, 'deposit', 'admin/transactions/deposit', 'fa fa-circle-o', 29, 1),
(31, 'expense', 'admin/transactions/expense', 'fa fa-circle-o', 29, 2),
(32, 'transfer', 'admin/transactions/transfer', 'fa fa-circle-o', 29, 3),
(33, 'transactions_report', 'admin/transactions/transactions_report', 'fa fa-circle-o', 29, 4),
(34, 'balance_sheet', 'admin/transactions/balance_sheet', 'fa fa-circle-o', 29, 6),
(36, 'bank_cash', 'admin/account/manage_account', 'fa fa-money', 0, 7),
(39, 'items', 'admin/items/items_list', 'fa fa-cube', 0, 8),
(42, 'report', '#', 'fa fa-bar-chart', 0, 9),
(43, 'account_statement', 'admin/report/account_statement', 'fa fa-circle-o', 42, 1),
(44, 'income_report', 'admin/report/income_report', 'fa fa-circle-o', 42, 2),
(45, 'expense_report', 'admin/report/expense_report', 'fa fa-circle-o', 42, 3),
(46, 'income_expense', 'admin/report/income_expense', 'fa fa-circle-o', 42, 4),
(47, 'date_wise_report', 'admin/report/date_wise_report', 'fa fa-circle-o', 42, 5),
(48, 'all_income', 'admin/report/all_income', 'fa fa-circle-o', 42, 7),
(49, 'all_expense', 'admin/report/all_expense', 'fa fa-circle-o', 42, 7),
(50, 'all_transaction', 'admin/report/all_transaction', 'fa fa-circle-o', 42, 8),
(51, 'recurring_invoice', 'admin/invoice/recurring_invoice', 'fa fa-circle-o', 12, 2),
(52, 'transfer_report', 'admin/transactions/transfer_report', 'fa fa-circle-o', 29, 5),
(53, 'report_by_month', 'admin/report/report_by_month', 'fa fa-circle-o', 42, 6),
(54, 'tasks', 'admin/tasks/all_task', 'fa fa-tasks', 0, 4),
(55, 'leads', 'admin/leads', 'fa fa-rocket', 0, 4),
(60, 'tasks_report', 'admin/report/tasks_report', 'fa fa-circle-o', 42, 2),
(62, 'tickets_report', 'admin/report/tickets_report', 'fa fa-circle-o', 42, 4),
(63, 'client_report', 'admin/report/client_report', 'fa fa-circle-o', 42, 5);
DROP TABLE IF EXISTS `tbl_mettings`;
CREATE TABLE `tbl_mettings` (
`mettings_id` int(11) NOT NULL AUTO_INCREMENT,
`leads_id` int(11) NOT NULL,
`meeting_subject` varchar(200) NOT NULL,
`attendees` varchar(300) NOT NULL,
`user_id` int(11) NOT NULL,
`start_date` varchar(100) NOT NULL,
`end_date` varchar(100) NOT NULL,
`location` varchar(100) NOT NULL,
`description` text NOT NULL,
PRIMARY KEY (`mettings_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `tbl_online_payment`;
CREATE TABLE `tbl_online_payment` (
`online_payment_id` int(11) NOT NULL AUTO_INCREMENT,
`gateway_name` varchar(20) NOT NULL,
`icon` text NOT NULL,
PRIMARY KEY (`online_payment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `tbl_online_payment` (`online_payment_id`, `gateway_name`, `icon`) VALUES
(1, 'paypal', 'paypal.png'),
(2, 'Stripe', 'stripe.jpg'),
(3, '2checkout', '2checkout.jpg'),
(4, 'Authorize.net', 'Authorizenet.png'),
(5, 'CCAvenue', 'CCAvenue.jpg'),
(6, 'Braintree', 'Braintree.png');
DROP TABLE IF EXISTS `tbl_payments`;
CREATE TABLE `tbl_payments` (
`payments_id` int(11) NOT NULL AUTO_INCREMENT,
`invoices_id` int(11) NOT NULL,
`trans_id` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
`payer_email` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`payment_method` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
`amount` longtext COLLATE utf8_unicode_ci,
`currency` varchar(64) COLLATE utf8_unicode_ci DEFAULT 'USD',
`notes` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`payment_date` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
`month_paid` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
`year_paid` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
`paid_by` int(11) NOT NULL,
`created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`payments_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `tbl_payments` (`payments_id`, `invoices_id`, `trans_id`, `payer_email`, `payment_method`, `amount`, `currency`, `notes`, `payment_date`, `month_paid`, `year_paid`, `paid_by`, `created_date`) VALUES
(1, 2, '639996', NULL, '2', '8000', '₨', 'Received by Shoaib', '2015-12-04', '12', '2015', 2, '2015-12-12 18:48:35'),
(2, 3, '169524', NULL, '2', '10000', '₨', '', '2015-12-19', '12', '2015', 3, '2015-12-19 17:48:09'),
(3, 4, '877361', NULL, '3', '56238', '₨', '', '2015-12-28', '12', '2015', 4, '2015-12-28 12:01:54'),
(4, 5, '522186', NULL, '1', '51004', '₨', '', '2016-01-13', '01', '2016', 4, '2016-01-14 06:42:00'),
(5, 6, '272527', NULL, '1', '7192', '₨', '', '2016-01-14', '01', '2016', 5, '2016-01-14 06:43:52'),
(6, 7, '936572', NULL, '1', '10000', '₨', '', '2016-01-10', '01', '2016', 6, '2016-01-14 09:58:32'),
(7, 8, '867612', NULL, '3', '1342', '₨', '', '2016-01-18', '01', '2016', 7, '2016-01-18 07:14:55'),
(8, 9, '412389', NULL, '2', '20000', '₨', '', '2016-02-01', '02', '2016', 8, '2016-02-01 16:52:55'),
(9, 10, '321171', NULL, '2', '200', '£', '', '2015-12-20', '12', '2015', 9, '2016-02-08 13:03:53'),
(10, 10, '886671', NULL, '3', '280', '₨', '', '2016-02-19', '02', '2016', 9, '2016-02-19 10:25:42'),
(11, 12, '518449', NULL, '2', '15000', '₨', '', '2016-02-21', '02', '2016', 11, '2016-02-24 10:45:19'),
(12, 13, '475346', NULL, '1', '50000', '₨', '', '2016-03-09', '03', '2016', 4, '2016-03-12 11:07:51'),
(13, 14, '219474', NULL, '1', '8200', '₨', '', '2016-03-15', '03', '2016', 4, '2016-03-15 06:44:42'),
(15, 11, '124676', NULL, '2', '4000', '₨', '', '2016-03-24', '03', '2016', 8, '2016-03-24 06:36:17'),
(16, 16, '896277', NULL, '2', '54471', '₨', '50K Received by Amer\nRest amount received by Rehan', '2016-04-01', '04', '2016', 4, '2016-04-01 05:57:05'),
(17, 17, '563881', NULL, '1', '12300', '₨', '', '2016-04-06', '04', '2016', 5, '2016-04-06 07:24:09'),
(18, 19, '691134', NULL, '1', '1100', '₨', '', '2016-04-08', '04', '2016', 12, '2016-04-08 10:27:03'),
(19, 20, '567765', NULL, '1', '46350', '₨', '', '2016-04-16', '04', '2016', 13, '2016-04-16 10:21:13'),
(20, 18, '161822', NULL, '1', '282', '₨', '', '2016-04-16', '04', '2016', 9, '2016-04-16 10:24:51'),
(21, 21, '349272', NULL, '2', '10000', '₨', '', '2016-04-21', '04', '2016', 14, '2016-04-21 07:21:46'),
(22, 22, '879975', NULL, '2', '28000', '₨', '', '2016-04-25', '04', '2016', 15, '2016-04-25 10:48:01'),
(23, 24, '884753', NULL, '2', '10000', '₨', '', '2016-04-25', '04', '2016', 17, '2016-04-25 11:18:32'),
(25, 26, '327583', NULL, '6', '100', '$', '', '2016-04-26', '04', '2016', 18, '2016-04-26 11:04:13');
DROP TABLE IF EXISTS `tbl_payment_methods`;
CREATE TABLE `tbl_payment_methods` (
`payment_methods_id` int(11) NOT NULL AUTO_INCREMENT,
`method_name` varchar(64) NOT NULL DEFAULT 'Paypal',
PRIMARY KEY (`payment_methods_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `tbl_payment_methods` (`payment_methods_id`, `method_name`) VALUES
(1, 'Online'),
(2, 'Cash'),
(3, 'Bank Deposit'),
(5, 'Cheque'),
(6, 'PayPal');
DROP TABLE IF EXISTS `tbl_priorities`;
CREATE TABLE `tbl_priorities` (
`priority` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `tbl_priorities` (`priority`) VALUES
('Low'),
('Medium'),
('High');
DROP TABLE IF EXISTS `tbl_private_message_send`;
CREATE TABLE `tbl_private_message_send` (
`private_message_send_id` int(11) NOT NULL AUTO_INCREMENT,
`send_user_id` int(11) NOT NULL,
`receive_user_id` int(11) NOT NULL,
`message` text NOT NULL,
`message_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`private_message_send_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `tbl_private_message_send` (`private_message_send_id`, `send_user_id`, `receive_user_id`, `message`, `message_time`) VALUES
(1, 1, 3, 'Hi', '2015-12-11 20:24:23'),
(2, 3, 1, 'Hello', '2016-01-05 10:05:06');
DROP TABLE IF EXISTS `tbl_quotationforms`;
CREATE TABLE `tbl_quotationforms` (
`quotationforms_id` int(11) NOT NULL AUTO_INCREMENT,
`quotationforms_title` varchar(200) NOT NULL,
`quotationforms_code` text NOT NULL,
`quotationforms_status` varchar(20) NOT NULL DEFAULT 'enabled' COMMENT 'enabled/disabled',
`quotations_created_by_id` int(11) NOT NULL,
`quotationforms_date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`quotationforms_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `tbl_quotations`;
CREATE TABLE `tbl_quotations` (
`quotations_id` int(11) NOT NULL AUTO_INCREMENT,
`quotations_form_title` varchar(250) NOT NULL,
`user_id` int(11) DEFAULT NULL,
`client_id` int(11) DEFAULT NULL,
`name` varchar(100) DEFAULT NULL,
`email` varchar(100) DEFAULT NULL,
`mobile` varchar(100) DEFAULT NULL,
`quotations_amount` decimal(10,2) DEFAULT NULL,
`notes` text,
`reviewer_id` int(11) DEFAULT NULL,
`reviewed_date` date DEFAULT NULL,
`quotations_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`quotations_status` varchar(15) DEFAULT 'pending' COMMENT 'completed/pending',
PRIMARY KEY (`quotations_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `tbl_quotation_details`;
CREATE TABLE `tbl_quotation_details` (
`quotation_details_id` int(11) NOT NULL AUTO_INCREMENT,
`quotations_id` int(11) NOT NULL,
`quotation_form_data` text,
`quotation_data` text,
PRIMARY KEY (`quotation_details_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `tbl_saved_items`;
CREATE TABLE `tbl_saved_items` (
`saved_items_id` int(11) NOT NULL AUTO_INCREMENT,
`item_name` varchar(200) COLLATE utf8_unicode_ci DEFAULT 'Item Name',
`item_desc` longtext COLLATE utf8_unicode_ci,
`unit_cost` decimal(10,2) DEFAULT '0.00',
`item_tax_rate` decimal(10,2) DEFAULT '0.00',
`item_tax_total` decimal(10,2) DEFAULT '0.00',
`quantity` decimal(10,2) DEFAULT '0.00',
`total_cost` decimal(10,2) DEFAULT '0.00',
PRIMARY KEY (`saved_items_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `tbl_sent`;
CREATE TABLE `tbl_sent` (
`sent_id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`to` varchar(100) NOT NULL,
`subject` varchar(300) NOT NULL,
`message_body` text NOT NULL,
`attach_file` varchar(200) DEFAULT NULL,
`attach_file_path` text,
`attach_filename` text,
`message_time` datetime NOT NULL,
`deleted` enum('Yes','No') NOT NULL DEFAULT 'No',
PRIMARY KEY (`sent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `tbl_sent` (`sent_id`, `user_id`, `to`, `subject`, `message_body`, `attach_file`, `attach_file_path`, `attach_filename`, `message_time`, `deleted`) VALUES
(1, 1, '<EMAIL>', 'Test', '<p>Hello </p>\n\n<p> </p>\n\n<p>How are you?</p>\n\n<p> </p>\n\n<p>Regards</p>\n', NULL, NULL, NULL, '2015-12-13 00:19:33', 'No'),
(2, 1, '<EMAIL>', 'Test', '<p>Hello</p>\n\n<p> </p>\n\n<p> </p>\n\n<p>How are you?</p>\n\n<p> </p>\n\n<p> </p>\n\n<p>Regards</p>\n', NULL, NULL, NULL, '2015-12-13 00:24:53', 'No'),
(3, 3, '<EMAIL>', 'Test', '<p>Hello</p>\n', NULL, NULL, NULL, '2015-12-14 12:12:37', 'No');
DROP TABLE IF EXISTS `tbl_status`;
CREATE TABLE `tbl_status` (
`status_id` int(11) NOT NULL AUTO_INCREMENT,
`status` varchar(200) NOT NULL,
PRIMARY KEY (`status_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO `tbl_status` (`status_id`, `status`) VALUES
(1, 'answered'),
(2, 'closed'),
(3, 'open'),
(5, 'in_progress');
DROP TABLE IF EXISTS `tbl_task`;
CREATE TABLE `tbl_task` (
`task_id` int(5) NOT NULL AUTO_INCREMENT,
`task_name` varchar(200) NOT NULL,
`task_description` text NOT NULL,
`task_start_date` date NOT NULL,
`due_date` date NOT NULL,
`task_created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`task_status` varchar(30) DEFAULT NULL,
`task_progress` int(2) NOT NULL,
`task_hour` varchar(10) NOT NULL,
`tasks_notes` text,
`leads_id` int(11) DEFAULT NULL,
`bug_id` int(11) DEFAULT NULL,
`created_by` int(11) DEFAULT NULL,
`permission` text,
`client_visible` varchar(5) DEFAULT NULL,
PRIMARY KEY (`task_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `tbl_tasks_timer`;
CREATE TABLE `tbl_tasks_timer` (
`tasks_timer_id` int(11) NOT NULL AUTO_INCREMENT,
`task_id` int(11) NOT NULL,
`user_id` int(11) DEFAULT NULL,
`start_time` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
`end_time` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
`date_timed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`reason` text CHARACTER SET utf8,
`edited_by` int(11) DEFAULT NULL,
`project_id` int(11) DEFAULT NULL,
PRIMARY KEY (`tasks_timer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `tbl_task_attachment`;
CREATE TABLE `tbl_task_attachment` (
`task_attachment_id` int(5) NOT NULL AUTO_INCREMENT,
`task_id` int(5) NOT NULL,
`user_id` int(11) DEFAULT NULL,
`title` varchar(200) NOT NULL,
`description` text NOT NULL,
`upload_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`task_attachment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `tbl_task_comment`;
CREATE TABLE `tbl_task_comment` (
`task_comment_id` int(5) NOT NULL AUTO_INCREMENT,
`task_id` int(5) NOT NULL,
`user_id` int(11) DEFAULT NULL,
`employee_id` int(11) DEFAULT NULL,
`comment` text NOT NULL,
`comment_datetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`task_comment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `tbl_task_uploaded_files`;
CREATE TABLE `tbl_task_uploaded_files` (
`uploaded_files_id` int(11) NOT NULL AUTO_INCREMENT,
`task_attachment_id` int(11) NOT NULL,
`files` text NOT NULL,
`uploaded_path` text NOT NULL,
`file_name` text NOT NULL,
`size` int(10) NOT NULL,
`ext` varchar(100) NOT NULL,
`is_image` int(2) NOT NULL,
`image_width` int(5) NOT NULL,
`image_height` int(5) NOT NULL,
PRIMARY KEY (`uploaded_files_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `tbl_tax_rates`;
CREATE TABLE `tbl_tax_rates` (
`tax_rates_id` int(11) NOT NULL AUTO_INCREMENT,
`tax_rate_name` varchar(25) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
`tax_rate_percent` decimal(10,2) NOT NULL DEFAULT '0.00',
`permission` text COLLATE utf8_unicode_ci,
KEY `Index 1` (`tax_rates_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `tbl_tickets`;
CREATE TABLE `tbl_tickets` (
`tickets_id` int(10) NOT NULL AUTO_INCREMENT,
`ticket_code` varchar(32) DEFAULT NULL,
`subject` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`body` text,
`status` varchar(200) DEFAULT NULL,
`departments_id` int(11) DEFAULT NULL,
`reporter` int(10) DEFAULT '0',
`priority` varchar(50) DEFAULT NULL,
`upload_file` text,
`comment` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`permission` text,
PRIMARY KEY (`tickets_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `tbl_tickets_replies`;
CREATE TABLE `tbl_tickets_replies` (
`tickets_replies_id` int(10) NOT NULL AUTO_INCREMENT,
`tickets_id` bigint(10) DEFAULT NULL,
`body` text COLLATE utf8_unicode_ci,
`replier` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
`replierid` int(10) DEFAULT NULL,
`attachment` text COLLATE utf8_unicode_ci,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`tickets_replies_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `tbl_todo`;
CREATE TABLE `tbl_todo` (
`todo_id` int(11) NOT NULL AUTO_INCREMENT,
`title` longtext COLLATE utf8_unicode_ci NOT NULL,
`user_id` longtext COLLATE utf8_unicode_ci NOT NULL,
`status` int(11) NOT NULL DEFAULT '0',
`order` int(11) NOT NULL,
PRIMARY KEY (`todo_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `tbl_transactions`;
CREATE TABLE `tbl_transactions` (
`transactions_id` int(11) NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`type` enum('Income','Expense','Transfer') NOT NULL,
`category_id` int(11) NOT NULL,
`amount` decimal(18,2) NOT NULL,
`paid_by` int(11) NOT NULL DEFAULT '0',
`payment_methods_id` int(11) NOT NULL,
`reference` varchar(200) NOT NULL,
`status` enum('Cleared','Uncleared','Reconciled','Void') NOT NULL DEFAULT 'Cleared',
`notes` text NOT NULL,
`tags` text NOT NULL,
`tax` decimal(18,2) NOT NULL DEFAULT '0.00',
`date` date NOT NULL,
`debit` decimal(18,2) NOT NULL DEFAULT '0.00',
`credit` decimal(18,2) NOT NULL DEFAULT '0.00',
`total_balance` decimal(18,2) NOT NULL DEFAULT '0.00',
`transfer_id` int(11) NOT NULL DEFAULT '0',
`permission` text,
PRIMARY KEY (`transactions_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `tbl_transactions` (`transactions_id`, `account_id`, `type`, `category_id`, `amount`, `paid_by`, `payment_methods_id`, `reference`, `status`, `notes`, `tags`, `tax`, `date`, `debit`, `credit`, `total_balance`, `transfer_id`, `permission`) VALUES
(1, 2, 'Expense', 0, 9000.00, 0, 2, '', 'Cleared', 'Purchased Desktop PC for company', '', 0.00, '2015-12-08', 9000.00, 0.00, 89936.00, 0, NULL),
(2, 1, 'Expense', 0, 2142.00, 0, 1, '', 'Cleared', 'Paid for Android News App', '', 0.00, '2015-12-12', 2142.00, 0.00, 107986.00, 0, NULL),
(3, 1, 'Expense', 0, 40000.00, 0, 2, '', 'Cleared', '<NAME> Salary for November 2015', '', 0.00, '2015-12-01', 40000.00, 0.00, 67986.00, 0, NULL),
(4, 2, 'Expense', 0, 40000.00, 0, 1, '', 'Cleared', '<NAME> Salary for November 2015', '', 0.00, '2015-12-12', 40000.00, 0.00, 49936.00, 0, NULL),
(5, 3, 'Income', 0, 8000.00, 2, 2, '', 'Cleared', 'Cash received for AlbatoolQuran.com', '', 0.00, '2015-12-04', 0.00, 8000.00, 5800.00, 0, NULL),
(6, 1, 'Expense', 0, 4200.00, 0, 0, '', 'Cleared', 'Shoaib November 2015 Salary Adjustments', '', 0.00, '2015-12-13', 4200.00, 0.00, 63786.00, 0, NULL),
(7, 3, 'Expense', 0, 5800.00, 0, 0, '', 'Cleared', 'Shoaib November 2015 Salary Adjustments + Paid 2200 due for Lahore trip', '', 0.00, '2015-12-13', 5800.00, 0.00, 0.00, 0, NULL),
(8, 1, 'Expense', 0, 4283.60, 0, 1, '', 'Cleared', 'Paid for Accounting Application for CodeBite', '', 0.00, '2015-12-11', 4283.60, 0.00, 59502.40, 0, NULL),
(9, 1, 'Income', 0, 5000.00, 3, 2, '', 'Cleared', 'Received half payment for KhanKebab', '', 0.00, '2015-12-19', 0.00, 5000.00, 64502.40, 0, NULL),
(10, 2, 'Income', 0, 5000.00, 3, 2, '', 'Cleared', 'Received half payment for KhanKebab', '', 0.00, '2015-12-19', 0.00, 5000.00, 54936.00, 0, NULL),
(11, 1, 'Expense', 0, 948.38, 0, 1, '', 'Cleared', 'Paid for KhanKebab.co domain', '', 0.00, '2015-12-14', 948.38, 0.00, 63554.02, 0, NULL),
(12, 2, 'Expense', 0, 3000.00, 0, 3, '', 'Cleared', 'Paid Office Rent December', '', 0.00, '2015-12-24', 3000.00, 0.00, 51936.00, 0, NULL),
(13, 1, 'Expense', 0, 2360.00, 0, 1, '', 'Cleared', 'PTCL Bill for Nov 2015', '', 0.00, '2015-12-26', 2360.00, 0.00, 61194.02, 0, NULL),
(14, 1, 'Expense', 0, 6285.00, 0, 1, '', 'Cleared', 'VPS Server purchased from HostOnARope.com', '', 0.00, '2015-12-26', 6285.00, 0.00, 54909.02, 0, NULL),
(15, 1, 'Expense', 0, 240.00, 0, 0, '', 'Cleared', 'Tea expenses', '', 0.00, '2015-12-28', 240.00, 0.00, 54669.02, 0, NULL),
(16, 1, 'Income', 0, 56238.00, 4, 0, '', 'Cleared', '', '', 0.00, '2015-12-28', 0.00, 56238.00, 110907.02, 0, NULL),
(18, 2, 'Expense', 0, 450.00, 0, 2, '', 'Cleared', 'For Noor Burgers', '', 0.00, '2015-12-29', 450.00, 0.00, 51486.00, 0, NULL),
(19, 1, 'Expense', 0, 8300.00, 0, 1, '', 'Cleared', '1. Theme purchased from Envato\n2. SSL certificate purchased for CanadaWebServices.com\n3. 1GB RAM purchased for VPS Server', '', 0.00, '2015-12-29', 8300.00, 0.00, 102607.02, 0, NULL),
(20, 1, 'Expense', 0, 1500.00, 0, 2, '', 'Cleared', 'Food for Mashood Meeting', '', 0.00, '2015-12-19', 1500.00, 0.00, 101107.02, 0, NULL),
(21, 1, 'Expense', 0, 180.00, 0, 2, '', 'Cleared', 'Tea expenses', '', 0.00, '2015-12-30', 180.00, 0.00, 100927.02, 0, NULL),
(22, 1, 'Expense', 0, 700.00, 0, 2, '', 'Cleared', 'Paid for office chair wheels', '', 0.00, '2015-12-31', 700.00, 0.00, 100227.02, 0, NULL),
(23, 1, 'Expense', 0, 40000.00, 0, 3, '', 'Cleared', '<NAME> Salary for December 2015', '', 0.00, '2016-01-05', 40000.00, 0.00, 60227.02, 0, NULL),
(24, 2, 'Expense', 0, 40000.00, 0, 3, '', 'Cleared', '<NAME> Salary for December 2015', '', 0.00, '2016-01-05', 40000.00, 0.00, 11486.00, 0, NULL),
(25, 2, 'Expense', 0, 6000.00, 0, 2, '', 'Cleared', 'Saad Salary for December 2015', '', 0.00, '2016-01-05', 6000.00, 0.00, 5486.00, 0, NULL),
(26, 2, 'Expense', 0, 220.00, 0, 2, '', 'Cleared', 'Daily Tea Expenses', '', 0.00, '2016-01-05', 220.00, 0.00, 5266.00, 0, NULL),
(27, 2, 'Expense', 0, 3000.00, 0, 3, '', 'Cleared', 'Rent for January 2016', '', 0.00, '2016-01-06', 3000.00, 0.00, 2266.00, 0, NULL),
(28, 2, 'Expense', 0, 320.00, 0, 2, '', 'Cleared', 'Tea Expenses', '', 0.00, '2016-01-09', 320.00, 0.00, 1946.00, 0, NULL),
(29, 2, 'Income', 0, 51004.00, 4, 6, '', 'Cleared', 'PayPal Payment Received ', '', 0.00, '2016-01-13', 0.00, 51004.00, 52950.00, 0, NULL),
(30, 2, 'Income', 0, 7192.00, 0, 0, 'Elance', 'Cleared', 'Elance Payment', '', 0.00, '2016-01-13', 0.00, 7192.00, 60142.00, 0, NULL),
(31, 1, 'Expense', 0, 4240.00, 0, 1, '', 'Cleared', 'Purchased 2 HTML5 templates for Art Gallery', '', 0.00, '2016-01-14', 4240.00, 0.00, 55987.02, 0, NULL),
(32, 3, 'Income', 0, 10000.00, 6, 2, '', 'Cleared', '', '', 0.00, '2016-01-10', 0.00, 10000.00, 10000.00, 0, NULL),
(33, 3, 'Expense', 0, 10000.00, 0, 0, '', 'Cleared', '<NAME> Dec 15.', '', 0.00, '2016-01-10', 10000.00, 0.00, 0.00, 0, NULL),
(34, 1, 'Income', 0, 1342.00, 7, 0, '', 'Cleared', 'Payment received for ecosurg.net', '', 0.00, '2016-01-18', 0.00, 1342.00, 57329.02, 0, NULL),
(35, 2, 'Expense', 0, 360.00, 0, 2, '', 'Cleared', 'Tea expenses', '', 0.00, '2016-01-14', 360.00, 0.00, 59782.00, 0, NULL),
(36, 2, 'Expense', 0, 320.00, 0, 2, '', 'Cleared', 'Tea Expenses', '', 0.00, '2016-01-19', 320.00, 0.00, 59462.00, 0, NULL),
(37, 1, 'Expense', 0, 5769.00, 0, 2, '', 'Cleared', 'Classifieds site theme + tea expenses', '', 0.00, '2016-01-23', 5769.00, 0.00, 51560.02, 0, NULL),
(38, 2, 'Expense', 0, 3400.00, 0, 2, '', 'Cleared', 'Electricity charges from Oct to Dec 85 x 40', '', 0.00, '2016-01-23', 3400.00, 0.00, 56062.00, 0, NULL),
(39, 1, 'Expense', 0, 2320.00, 0, 1, '', 'Cleared', 'PTCL Bill for December 2015', '', 0.00, '2016-01-23', 2320.00, 0.00, 49240.02, 0, NULL),
(40, 2, 'Income', 0, 20000.00, 8, 2, '', 'Cleared', 'http://shehersaaz.com/ Website Payment', '', 0.00, '2016-01-27', 0.00, 20000.00, 76062.00, 0, NULL),
(41, 2, 'Expense', 0, 8000.00, 0, 2, '', 'Cleared', '<NAME> ', '', 0.00, '2016-02-01', 8000.00, 0.00, 68062.00, 0, NULL),
(42, 2, 'Income', 0, 43040.00, 5, 1, '', 'Cleared', 'Upwork Payment', '', 0.00, '2016-02-01', 0.00, 43040.00, 111102.00, 0, NULL),
(43, 1, 'Expense', 0, 40000.00, 0, 3, '', 'Cleared', 'Amer salary for January 2016', '', 0.00, '2016-02-01', 40000.00, 0.00, 9240.02, 0, NULL),
(44, 1, 'Expense', 0, 300.00, 0, 2, '', 'Cleared', 'Tea expenses', '', 0.00, '2016-02-01', 300.00, 0.00, 8940.02, 0, NULL),
(45, 2, 'Expense', 0, 40000.00, 0, 3, '', 'Cleared', 'Rehan Salary for January 2016', '', 0.00, '2016-02-01', 40000.00, 0.00, 71102.00, 0, NULL),
(46, 2, 'Expense', 0, 3000.00, 0, 3, '', 'Cleared', 'Office Rent for February 2016', '', 0.00, '2016-02-01', 3000.00, 0.00, 68102.00, 0, NULL),
(47, 1, 'Expense', 0, 2055.00, 0, 1, '', 'Cleared', 'Paid for Century21.pk domain', '', 0.00, '2016-02-12', 2055.00, 0.00, 6885.02, 0, NULL),
(48, 2, 'Expense', 0, 18000.00, 0, 1, '', 'Cleared', 'Transferred to Shoaib for Mirpur Client', '', 0.00, '2016-02-12', 18000.00, 0.00, 50102.00, 0, NULL),
(49, 2, 'Income', 0, 49435.00, 0, 1, '', 'Cleared', 'Payment received from PayPal', '', 0.00, '2016-02-12', 0.00, 49435.00, 99537.00, 0, NULL),
(50, 2, 'Expense', 0, 340.00, 0, 2, '', 'Cleared', 'Tea expenses', '', 0.00, '2016-02-15', 340.00, 0.00, 99197.00, 0, NULL),
(51, 1, 'Income', 0, 41720.00, 9, 3, '', 'Cleared', 'Remaining payment received from Mr. Marjan', '', 0.00, '2016-02-19', 0.00, 41720.00, 48605.02, 0, NULL),
(52, 1, 'Income', 0, 15000.00, 11, 2, '', 'Cleared', 'Amount received from Amjad for Desktop software for his shop', '', 0.00, '2016-02-21', 0.00, 15000.00, 63605.02, 0, NULL),
(53, 1, 'Expense', 0, 200.00, 0, 2, '', 'Cleared', 'Tea Expenses', '', 0.00, '2016-03-02', 200.00, 0.00, 63405.02, 0, NULL),
(54, 1, 'Expense', 0, 2350.00, 0, 2, '', 'Cleared', 'PTCL bill paid', '', 0.00, '2016-03-02', 2350.00, 0.00, 61055.02, 0, NULL),
(55, 2, 'Expense', 0, 40000.00, 0, 2, '', 'Cleared', 'Salary for Feb 2016', '', 0.00, '2016-03-03', 40000.00, 0.00, 59197.00, 0, NULL),
(56, 1, 'Expense', 0, 40000.00, 0, 2, '', 'Cleared', 'Amer Salary for February 2016', '', 0.00, '2016-03-03', 40000.00, 0.00, 21055.02, 0, NULL),
(57, 2, 'Expense', 0, 500.00, 0, 2, '', 'Cleared', 'Tea Expenses', '', 0.00, '2016-03-08', 500.00, 0.00, 58697.00, 0, NULL),
(58, 1, 'Expense', 0, 2060.00, 0, 2, '', 'Cleared', 'Paid for Table + 1 Tissue Box', '', 0.00, '2016-03-08', 2060.00, 0.00, 18995.02, 0, NULL),
(59, 1, 'Expense', 0, 7000.00, 0, 1, '', 'Cleared', 'Paid for Eli theme + SSL Certificate for Ahmad', '', 0.00, '2016-03-08', 7000.00, 0.00, 11995.02, 0, NULL),
(60, 1, 'Income', 0, 50000.00, 4, 1, '', 'Cleared', 'Payment received from PayPal', '', 0.00, '2016-03-09', 0.00, 50000.00, 61995.02, 0, NULL),
(61, 1, 'Expense', 0, 12060.00, 0, 1, '', 'Cleared', 'For Eli Plugins - Wholesale Suite Plugins', '', 0.00, '2016-03-11', 12060.00, 0.00, 49935.02, 0, NULL),
(62, 1, 'Expense', 0, 4000.00, 0, 2, '', 'Cleared', 'Remaining payment for Tables', '', 0.00, '2016-03-12', 4000.00, 0.00, 45935.02, 0, NULL),
(63, 1, 'Expense', 0, 5000.00, 0, 2, '', 'Cleared', 'Donation to Wall of Kindness', '', 0.00, '2016-03-12', 5000.00, 0.00, 40935.02, 0, NULL),
(64, 2, 'Expense', 0, 1500.00, 0, 2, '', 'Cleared', 'Zong 4G Internet Charges', '', 0.00, '2016-03-14', 1500.00, 0.00, 57197.00, 0, NULL),
(65, 2, 'Income', 0, 8200.00, 4, 2, '', 'Cleared', 'Payments from PayPal', '', 0.00, '2016-03-15', 0.00, 8200.00, 65397.00, 0, NULL),
(66, 2, 'Expense', 0, 6670.00, 0, 2, '', 'Cleared', 'Office Shifting Expenses', '', 0.00, '2016-03-23', 6670.00, 0.00, 58727.00, 0, NULL),
(67, 1, 'Expense', 0, 1570.00, 0, 2, '', 'Cleared', 'Office shifting expenses!', '', 0.00, '2016-03-23', 1570.00, 0.00, 39365.02, 0, NULL),
(68, 1, 'Expense', 0, 6330.00, 0, 1, '', 'Cleared', 'WordPress Theme for DavidTomlin', '', 0.00, '2016-03-23', 6330.00, 0.00, 33035.02, 0, NULL),
(69, 2, 'Income', 0, 4000.00, 8, 2, '', 'Cleared', 'Amount received from <NAME>', '', 0.00, '2016-03-24', 0.00, 4000.00, 62727.00, 0, NULL),
(70, 2, 'Expense', 0, 600.00, 0, 2, '', 'Cleared', 'PTCL Wire Changed', '', 0.00, '2016-03-26', 600.00, 0.00, 62127.00, 0, NULL),
(71, 2, 'Expense', 0, 100.00, 0, 2, '', 'Cleared', 'Tea Expenses', '', 0.00, '2016-03-26', 100.00, 0.00, 62027.00, 0, NULL),
(72, 2, 'Expense', 0, 3000.00, 0, 2, '', 'Cleared', 'Rent for Office', '', 0.00, '2016-03-24', 3000.00, 0.00, 59027.00, 0, NULL),
(73, 2, 'Expense', 0, 400.00, 0, 2, '', 'Cleared', 'Tea + Biscuits', '', 0.00, '2016-03-30', 400.00, 0.00, 58627.00, 0, NULL),
(74, 1, 'Expense', 0, 3170.00, 0, 2, '', 'Cleared', '2 Brochures purchased for Hamza Nagree', '', 0.00, '2016-03-30', 3170.00, 0.00, 29865.02, 0, NULL),
(75, 1, 'Income', 0, 50000.00, 4, 2, '', 'Cleared', 'Received from CanadaWebServices', '', 0.00, '2016-04-01', 0.00, 50000.00, 79865.02, 0, NULL),
(76, 2, 'Income', 0, 4471.00, 4, 3, '', 'Cleared', 'Received from CanadaWebServices', '', 0.00, '2016-04-01', 0.00, 4471.00, 63098.00, 0, NULL),
(77, 2, 'Expense', 0, 40000.00, 0, 1, '', 'Cleared', 'Amer Salary for March 2016', '', 0.00, '2016-04-01', 40000.00, 0.00, 23098.00, 0, NULL),
(78, 1, 'Expense', 0, 40000.00, 0, 1, '', 'Cleared', '<NAME> for March 2016', '', 0.00, '2016-04-01', 40000.00, 0.00, 39865.02, 0, NULL),
(79, 1, 'Expense', 0, 10000.00, 0, 2, '', 'Cleared', '<NAME> for March 2016', '', 0.00, '2016-04-01', 10000.00, 0.00, 29865.02, 0, NULL),
(80, 2, 'Expense', 0, 10000.00, 0, 2, '', 'Cleared', '<NAME> for March 2016', '', 0.00, '2016-04-01', 10000.00, 0.00, 13098.00, 0, NULL),
(81, 1, 'Expense', 0, 2360.00, 0, 1, '', 'Cleared', 'PTCL bill paid', '', 0.00, '2016-04-01', 2360.00, 0.00, 27505.02, 0, NULL),
(82, 1, 'Expense', 0, 6341.00, 0, 1, '', 'Cleared', 'Purchased Business Affairs theme', '', 0.00, '2016-04-01', 6341.00, 0.00, 21164.02, 0, NULL),
(83, 1, 'Expense', 0, 650.00, 0, 0, '', 'Cleared', 'Food Expense', '', 0.00, '2016-04-06', 650.00, 0.00, 20514.02, 0, NULL),
(84, 2, 'Expense', 0, 1290.00, 0, 2, '', 'Cleared', 'Tea + Office Cleaning Tools ', '', 0.00, '2016-04-06', 1290.00, 0.00, 11808.00, 0, NULL),
(85, 2, 'Expense', 0, 6000.00, 0, 2, '', 'Cleared', 'Office Rent May 2015.', '', 0.00, '2016-04-06', 6000.00, 0.00, 5808.00, 0, NULL),
(86, 2, 'Income', 0, 12300.00, 5, 1, '', 'Cleared', 'From Elance!', '', 0.00, '2016-04-06', 0.00, 12300.00, 18108.00, 0, NULL),
(87, 1, 'Income', 0, 1100.00, 12, 3, '', 'Cleared', 'Domain Transferred: justonereligion.com', '', 0.00, '2016-04-08', 0.00, 1100.00, 21614.02, 0, NULL),
(88, 2, 'Expense', 0, 3179.00, 0, 2, '', 'Cleared', 'Tea + Cleaning + Books Donation \n\n-1959 Books', '', 0.00, '2016-04-16', 3179.00, 0.00, 14929.00, 0, NULL),
(89, 2, 'Transfer', 0, 19000.00, 0, 2, '', 'Cleared', 'Cash received.', '', 0.00, '2016-04-16', 0.00, 19000.00, 33929.00, 1, NULL),
(90, 1, 'Transfer', 0, 19000.00, 0, 2, '', 'Cleared', 'Cash received.', '', 0.00, '2016-04-16', 19000.00, 0.00, 2614.02, 1, NULL),
(91, 2, 'Expense', 0, 8432.00, 0, 1, '', 'Cleared', 'Paid for Isacc Theme', '', 0.00, '2016-04-16', 8432.00, 0.00, 25497.00, 0, NULL),
(92, 2, 'Income', 0, 46350.00, 13, 2, '', 'Cleared', 'NYDC Website', '', 0.00, '2016-04-16', 0.00, 46350.00, 71847.00, 0, NULL),
(93, 2, 'Income', 0, 29600.00, 9, 3, '', 'Cleared', 'Marjan Payment Received ', '', 0.00, '2016-04-16', 0.00, 29600.00, 101447.00, 0, NULL),
(94, 2, 'Expense', 0, 22000.00, 0, 0, '', 'Cleared', 'Paid to dasktech for data entry work', '', 0.00, '2016-04-16', 22000.00, 0.00, 79447.00, 0, NULL),
(95, 2, 'Expense', 0, 1500.00, 0, 1, '', 'Cleared', 'Zong Device Internet Package', '', 0.00, '2016-04-16', 1500.00, 0.00, 77947.00, 0, NULL),
(96, 2, 'Expense', 0, 17000.00, 0, 2, '', 'Cleared', 'Dispenser and Oven\n5800+11200', '', 0.00, '2016-04-22', 17000.00, 0.00, 60947.00, 0, NULL),
(97, 2, 'Expense', 0, 500.00, 0, 2, '', 'Cleared', 'Paid to Cleaner', '', 0.00, '2016-04-22', 500.00, 0.00, 60447.00, 0, NULL),
(98, 1, 'Transfer', 0, 10.00, 0, 2, '', 'Cleared', '', '', 0.00, '2016-04-22', 0.00, 10.00, 2624.02, 2, NULL),
(99, 2, 'Transfer', 0, 10.00, 0, 2, '', 'Cleared', '', '', 0.00, '2016-04-22', 10.00, 0.00, 60437.00, 2, NULL),
(100, 1, 'Transfer', 0, 10000.00, 0, 2, '', 'Cleared', 'Cash', '', 0.00, '2016-04-22', 0.00, 10000.00, 12624.02, 3, NULL),
(101, 2, 'Transfer', 0, 10000.00, 0, 2, '', 'Cleared', 'Cash', '', 0.00, '2016-04-22', 10000.00, 0.00, 50437.00, 3, NULL),
(102, 2, 'Expense', 0, 1400.00, 0, 2, '', 'Cleared', 'Office Expenses\n\n', '', 0.00, '2016-04-22', 1400.00, 0.00, 49037.00, 0, NULL),
(103, 1, 'Expense', 0, 4556.00, 0, 1, '', 'Cleared', 'Paid for Zeeshan Dasktech.net GoDaddy Hosting', '', 0.00, '2016-04-25', 4556.00, 0.00, 8068.02, 0, NULL),
(104, 2, 'Income', 0, 25000.00, 15, 2, '', 'Cleared', 'Amount received from Jhelum Traders', '', 0.00, '2016-04-25', 0.00, 25000.00, 74037.00, 0, NULL),
(105, 3, 'Income', 0, 10000.00, 17, 2, '', 'Cleared', 'Payment received from Master Celeste', '', 0.00, '2016-04-25', 0.00, 10000.00, 10000.00, 0, NULL),
(106, 3, 'Expense', 0, 10000.00, 0, 1, '', 'Cleared', '<NAME> for April 2016', '', 0.00, '2016-04-25', 10000.00, 0.00, 0.00, 0, NULL);
DROP TABLE IF EXISTS `tbl_transfer`;
CREATE TABLE `tbl_transfer` (
`transfer_id` int(11) NOT NULL AUTO_INCREMENT,
`to_account_id` int(11) NOT NULL,
`from_account_id` int(11) NOT NULL,
`amount` decimal(18,2) NOT NULL,
`payment_methods_id` int(11) NOT NULL,
`reference` varchar(200) CHARACTER SET utf8 NOT NULL,
`status` enum('Cleared','Uncleared','Reconciled','Void') CHARACTER SET utf8 NOT NULL DEFAULT 'Cleared',
`notes` text CHARACTER SET utf8 NOT NULL,
`date` date NOT NULL,
`type` varchar(20) CHARACTER SET utf8 NOT NULL DEFAULT 'Transfer',
`permission` text,
PRIMARY KEY (`transfer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `tbl_transfer` (`transfer_id`, `to_account_id`, `from_account_id`, `amount`, `payment_methods_id`, `reference`, `status`, `notes`, `date`, `type`, `permission`) VALUES
(1, 2, 1, 19000.00, 2, '', 'Cleared', 'Cash received.', '2016-04-16', 'Transfer', NULL),
(2, 1, 2, 10.00, 2, '', 'Cleared', '', '2016-04-22', 'Transfer', NULL),
(3, 1, 2, 10000.00, 2, '', 'Cleared', 'Cash', '2016-04-22', 'Transfer', NULL);
DROP TABLE IF EXISTS `tbl_updates`;
CREATE TABLE `tbl_updates` (
`build` int(11) NOT NULL DEFAULT '0',
`code` varchar(50) DEFAULT NULL,
`date` timestamp NULL DEFAULT NULL,
`version` varchar(10) DEFAULT NULL,
`title` varchar(255) DEFAULT NULL,
`description` text,
`filename` varchar(255) DEFAULT NULL,
`importance` enum('low','medium','high') DEFAULT 'low',
`dependencies` varchar(255) DEFAULT NULL,
`installed` int(11) DEFAULT '0',
`sql` text,
`files` text,
`depends` varchar(255) DEFAULT NULL,
`includes` varchar(255) DEFAULT NULL,
PRIMARY KEY (`build`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `tbl_uploaded_files`;
CREATE TABLE `tbl_uploaded_files` (
`uploaded_files_id` int(11) NOT NULL AUTO_INCREMENT,
`files_id` int(11) NOT NULL,
`files` text NOT NULL,
`uploaded_path` text NOT NULL,
`file_name` text NOT NULL,
`size` int(10) NOT NULL,
`ext` varchar(100) NOT NULL,
`is_image` int(2) NOT NULL,
`image_width` int(5) NOT NULL,
`image_height` int(5) NOT NULL,
PRIMARY KEY (`uploaded_files_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `tbl_users`;
CREATE TABLE `tbl_users` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`role_id` int(11) NOT NULL DEFAULT '2',
`activated` tinyint(1) NOT NULL DEFAULT '0',
`banned` tinyint(4) NOT NULL DEFAULT '0',
`ban_reason` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`new_password_key` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`new_password_requested` datetime DEFAULT NULL,
`new_email` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`new_email_key` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`last_ip` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL,
`last_login` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`online_status` tinyint(1) NOT NULL COMMENT '1 = online 0 = offline ',
`permission` text COLLATE utf8_unicode_ci,
PRIMARY KEY (`user_id`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `tbl_users` (`user_id`, `username`, `password`, `email`, `role_id`, `activated`, `banned`, `ban_reason`, `new_password_key`, `new_password_requested`, `new_email`, `new_email_key`, `last_ip`, `last_login`, `created`, `modified`, `online_status`, `permission`) VALUES
(1, 'amer', '<PASSWORD>', '<EMAIL>', 1, 1, 0, '', NULL, NULL, '<EMAIL>', '49315fd6116d162eea47a98904e37b9a', '::1', '2016-04-26 22:20:25', '0000-00-00 00:00:00', '2016-04-26 17:43:08', 1, NULL),
(3, 'rehan', '<PASSWORD>cf', '<EMAIL>', 1, 1, 0, NULL, NULL, NULL, NULL, NULL, '192.168.3.11', '2016-04-19 13:20:08', '0000-00-00 00:00:00', '2016-04-21 07:17:04', 1, NULL),
(4, 'shoaib', '<PASSWORD>', '<EMAIL>', 1, 0, 0, NULL, NULL, NULL, NULL, NULL, '192.168.3.11', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '2015-12-12 19:13:58', 0, NULL);
DROP TABLE IF EXISTS `tbl_user_role`;
CREATE TABLE `tbl_user_role` (
`user_role_id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`menu_id` int(11) NOT NULL,
PRIMARY KEY (`user_role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 2016-04-26 17:46:27
|
-- MySQL dump 10.13 Distrib 5.6.19, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: reporting
-- ------------------------------------------------------
-- Server version 5.6.19-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES 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 `contract`
--
DROP TABLE IF EXISTS `contract`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `contract` (
`ext_vertragnr` int(11) NOT NULL,
`techauftrag_id` int(11) NOT NULL,
`bz_id` int(11) NOT NULL,
`tariff_id` int(11) NOT NULL,
PRIMARY KEY (`techauftrag_id`),
UNIQUE KEY `unique_techauftrag_id` (`techauftrag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `customer`
--
DROP TABLE IF EXISTS `customer`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `customer` (
`ext_kdnr` int(11) DEFAULT NULL,
`ext_vertragnr` int(11) DEFAULT NULL,
UNIQUE KEY `unique_ext_kdnr` (`ext_kdnr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `project`
--
DROP TABLE IF EXISTS `project`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `project` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`techauftrag_id` int(11) DEFAULT NULL,
`wsc_id` varchar(255) DEFAULT NULL,
`wsb_id` varchar(255) DEFAULT NULL,
`dsc_id` varchar(255) DEFAULT NULL,
`page_count` int(11) DEFAULT NULL,
`theme` varchar(255) NOT NULL,
`domain_name` varchar(255) DEFAULT NULL,
`domain_id` int(11) DEFAULT NULL,
`is_currently_wsc` tinyint(1) DEFAULT NULL,
`has_wsc_intro` tinyint(1) NOT NULL,
`status_code` int(11) DEFAULT NULL,
`is_currently_wsb` tinyint(1) DEFAULT NULL,
`error` varchar(255) NOT NULL,
`timestamp` DATE DEFAULT NULL,
`is_currently_dsc` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `techauftrag_id_index` (`techauftrag_id`),
KEY `wsb_id_index` (`wsb_id`)
) ENGINE=InnoDB AUTO_INCREMENT=41007912 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tariff`
--
DROP TABLE IF EXISTS `tariff`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tariff` (
`tariff_id` int(11) NOT NULL,
`tariff_name` varchar(255) DEFAULT NULL,
`market` varchar(10) DEFAULT NULL,
`is_access` tinyint(1) NOT NULL,
`has_wsc` tinyint(1) NOT NULL,
`has_wsb` tinyint(1) NOT NULL,
`is_windows` tinyint(1) NOT NULL,
`tariff_family` varchar(255) NOT NULL,
`has_mws` tinyint(1) NOT NULL,
PRIMARY KEY (`tariff_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Table structure for table `testdata`
--
DROP TABLE IF EXISTS `testdata`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `testdata` (
`techauftrag_id` int(11) DEFAULT NULL,
`wsc_id` varchar(255) DEFAULT NULL,
`wsb_id` varchar(255) DEFAULT NULL,
`domain_name` varchar(255) DEFAULT NULL,
`domain_id` int(11) DEFAULT NULL,
`is_currently_wsc` tinyint(1) DEFAULT NULL,
`is_currently_wsb` tinyint(1) DEFAULT NULL,
`status_code` int(11) DEFAULT NULL,
`error` varchar(255) NOT NULL,
`contract_id` int(11) DEFAULT NULL,
`customer_id` int(11) DEFAULT NULL,
PRIMARY KEY (`wsb_id`)
) ENGINE=InnoDB AUTO_INCREMENT=41007912 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2015-10-14 16:33:58
|
<reponame>xhafan/databasecreator<filename>src/DatabaseScriptsExample/ChangeScripts/1.0.0.1.sql
-- first change script - creates Version table
create table "Version"
(
"Major" int
, "Minor" int
, "Revision" int
, "ScriptNumber" int
);
INSERT INTO "Version" ("Major", "Minor", "Revision", "ScriptNumber") VALUES (0, 0, 0, 0);
|
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 22, 2015 at 08:48 AM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
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 */;
--
--
--
-- --------------------------------------------------------
--
-- Table structure for table `admin`
--
DROP TABLE IF EXISTS `admin`;
CREATE TABLE IF NOT EXISTS `admin` (
`admin_id` int(11) NOT NULL,
`name` longtext COLLATE utf8_unicode_ci NOT NULL,
`email` longtext COLLATE utf8_unicode_ci NOT NULL,
`password` longtext COLLATE utf8_unicode_ci NOT NULL,
`level` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
--
-- Dumping data for table `admin`
--
INSERT INTO `admin` (`admin_id`, `name`, `email`, `password`, `level`) VALUES
(1, 'Mr. Admin', '<EMAIL>', '<PASSWORD>', '1');
-- --------------------------------------------------------
--
-- Table structure for table `attendance`
--
DROP TABLE IF EXISTS `attendance`;
CREATE TABLE IF NOT EXISTS `attendance` (
`attendance_id` int(11) NOT NULL,
`status` int(11) NOT NULL COMMENT '0 undefined , 1 present , 2 absent',
`student_id` int(11) NOT NULL,
`date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `book`
--
DROP TABLE IF EXISTS `book`;
CREATE TABLE IF NOT EXISTS `book` (
`book_id` int(11) NOT NULL,
`name` longtext COLLATE utf8_unicode_ci NOT NULL,
`description` longtext COLLATE utf8_unicode_ci NOT NULL,
`author` longtext COLLATE utf8_unicode_ci NOT NULL,
`class_id` longtext COLLATE utf8_unicode_ci NOT NULL,
`status` longtext COLLATE utf8_unicode_ci NOT NULL,
`price` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `ci_sessions`
--
DROP TABLE IF EXISTS `ci_sessions`;
CREATE TABLE IF NOT EXISTS `ci_sessions` (
`id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
`ip_address` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
`timestamp` int(10) unsigned NOT NULL DEFAULT '0',
`data` blob NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `class`
--
DROP TABLE IF EXISTS `class`;
CREATE TABLE IF NOT EXISTS `class` (
`class_id` int(11) NOT NULL,
`name` longtext COLLATE utf8_unicode_ci NOT NULL,
`name_numeric` longtext COLLATE utf8_unicode_ci NOT NULL,
`teacher_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `class_routine`
--
DROP TABLE IF EXISTS `class_routine`;
CREATE TABLE IF NOT EXISTS `class_routine` (
`class_routine_id` int(11) NOT NULL,
`class_id` int(11) NOT NULL,
`subject_id` int(11) NOT NULL,
`time_start` int(11) NOT NULL,
`time_end` int(11) NOT NULL,
`day` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `document`
--
DROP TABLE IF EXISTS `document`;
CREATE TABLE IF NOT EXISTS `document` (
`document_id` int(11) NOT NULL,
`title` longtext COLLATE utf8_unicode_ci NOT NULL,
`description` longtext COLLATE utf8_unicode_ci NOT NULL,
`file_name` longtext COLLATE utf8_unicode_ci NOT NULL,
`file_type` longtext COLLATE utf8_unicode_ci NOT NULL,
`class_id` longtext COLLATE utf8_unicode_ci NOT NULL,
`teacher_id` int(11) NOT NULL,
`timestamp` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `dormitory`
--
DROP TABLE IF EXISTS `dormitory`;
CREATE TABLE IF NOT EXISTS `dormitory` (
`dormitory_id` int(11) NOT NULL,
`name` longtext COLLATE utf8_unicode_ci NOT NULL,
`number_of_room` longtext COLLATE utf8_unicode_ci NOT NULL,
`description` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `exam`
--
DROP TABLE IF EXISTS `exam`;
CREATE TABLE IF NOT EXISTS `exam` (
`exam_id` int(11) NOT NULL,
`name` longtext COLLATE utf8_unicode_ci NOT NULL,
`date` longtext COLLATE utf8_unicode_ci NOT NULL,
`comment` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `expense_category`
--
DROP TABLE IF EXISTS `expense_category`;
CREATE TABLE IF NOT EXISTS `expense_category` (
`expense_category_id` int(11) NOT NULL,
`name` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=6 ;
--
-- Dumping data for table `expense_category`
--
INSERT INTO `expense_category` (`expense_category_id`, `name`) VALUES
(1, 'Teacher Salary'),
(2, 'Classroom Equipments'),
(3, 'Classroom Decorations'),
(4, 'Inventory Purchase'),
(5, 'Exam Accessories');
-- --------------------------------------------------------
--
-- Table structure for table `grade`
--
DROP TABLE IF EXISTS `grade`;
CREATE TABLE IF NOT EXISTS `grade` (
`grade_id` int(11) NOT NULL,
`name` longtext COLLATE utf8_unicode_ci NOT NULL,
`grade_point` longtext COLLATE utf8_unicode_ci NOT NULL,
`mark_from` int(11) NOT NULL,
`mark_upto` int(11) NOT NULL,
`comment` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `invoice`
--
DROP TABLE IF EXISTS `invoice`;
CREATE TABLE IF NOT EXISTS `invoice` (
`invoice_id` int(11) NOT NULL,
`student_id` int(11) NOT NULL,
`title` longtext COLLATE utf8_unicode_ci NOT NULL,
`description` longtext COLLATE utf8_unicode_ci NOT NULL,
`amount` int(11) NOT NULL,
`amount_paid` longtext COLLATE utf8_unicode_ci NOT NULL,
`due` longtext COLLATE utf8_unicode_ci NOT NULL,
`creation_timestamp` int(11) NOT NULL,
`payment_timestamp` longtext COLLATE utf8_unicode_ci NOT NULL,
`payment_method` longtext COLLATE utf8_unicode_ci NOT NULL,
`payment_details` longtext COLLATE utf8_unicode_ci NOT NULL,
`status` longtext COLLATE utf8_unicode_ci NOT NULL COMMENT 'paid or unpaid'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `language`
--
DROP TABLE IF EXISTS `language`;
CREATE TABLE IF NOT EXISTS `language` (
`phrase_id` int(11) NOT NULL,
`phrase` longtext COLLATE utf8_unicode_ci NOT NULL,
`english` longtext COLLATE utf8_unicode_ci NOT NULL,
`bengali` longtext COLLATE utf8_unicode_ci NOT NULL,
`spanish` longtext COLLATE utf8_unicode_ci NOT NULL,
`arabic` longtext COLLATE utf8_unicode_ci NOT NULL,
`dutch` longtext COLLATE utf8_unicode_ci NOT NULL,
`russian` longtext COLLATE utf8_unicode_ci NOT NULL,
`chinese` longtext COLLATE utf8_unicode_ci NOT NULL,
`turkish` longtext COLLATE utf8_unicode_ci NOT NULL,
`portuguese` longtext COLLATE utf8_unicode_ci NOT NULL,
`hungarian` longtext COLLATE utf8_unicode_ci NOT NULL,
`french` longtext COLLATE utf8_unicode_ci NOT NULL,
`greek` longtext COLLATE utf8_unicode_ci NOT NULL,
`german` longtext COLLATE utf8_unicode_ci NOT NULL,
`italian` longtext COLLATE utf8_unicode_ci NOT NULL,
`thai` longtext COLLATE utf8_unicode_ci NOT NULL,
`urdu` longtext COLLATE utf8_unicode_ci NOT NULL,
`hindi` longtext COLLATE utf8_unicode_ci NOT NULL,
`latin` longtext COLLATE utf8_unicode_ci NOT NULL,
`indonesian` longtext COLLATE utf8_unicode_ci NOT NULL,
`japanese` longtext COLLATE utf8_unicode_ci NOT NULL,
`korean` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=372 ;
--
-- Dumping data for table `language`
--
INSERT INTO `language` (`phrase_id`, `phrase`, `english`, `bengali`, `spanish`, `arabic`, `dutch`, `russian`, `chinese`, `turkish`, `portuguese`, `hungarian`, `french`, `greek`, `german`, `italian`, `thai`, `urdu`, `hindi`, `latin`, `indonesian`, `japanese`, `korean`) VALUES
(1, 'login', 'login', 'লগইন', 'login', 'دخول', 'login', 'Войти', '注册', 'giriş', 'login', 'bejelentkezés', 'Connexion', 'σύνδεση', 'Login', 'login', 'เข้าสู่ระบบ', 'لاگ ان', 'लॉगिन', 'login', 'login', 'ログイン', '로그인'),
(2, 'account_type', 'account type', 'অ্যাকাউন্ট টাইপ', 'tipo de cuenta', 'نوع الحساب', 'type account', 'тип счета', '账户类型', 'hesap türü', 'tipo de conta', 'fiók típusát', 'Type de compte', 'τον τύπο του λογαριασμού', 'Kontotyp', 'tipo di account', 'ประเภทบัญชี', 'اکاؤنٹ کی قسم', 'खाता प्रकार', 'propter speciem', 'Jenis akun', '口座の種類', '계정 유형'),
(3, 'admin', 'admin', 'অ্যাডমিন', 'administración', 'مشرف', 'admin', 'админ', '管理', 'yönetim', 'administrador', 'admin', 'administrateur', 'το admin', 'Admin', 'Admin', 'ผู้ดูแลระบบ', 'منتظم', 'प्रशासन', 'Lorem ipsum dolor sit', 'admin', '管理者', '관리자'),
(4, 'teacher', 'teacher', 'শিক্ষক', 'profesor', 'معلم', 'leraar', 'учитель', '老师', 'öğretmen', 'professor', 'tanár', 'professeur', 'δάσκαλος', 'Lehrer', 'insegnante', 'ครู', 'استاد', 'शिक्षक', 'Magister', 'guru', '教師', '선생'),
(5, 'student', 'student', 'ছাত্র', 'estudiante', 'طالب', 'student', 'студент', '学生', 'öğrenci', 'estudante', 'diák', 'étudiant', 'φοιτητής', 'Schüler', 'studente', 'นักเรียน', 'طالب علم', 'छात्र', 'discipulo', 'mahasiswa', '学生', '학생'),
(6, 'parent', 'parent', 'পিতা বা মাতা', 'padre', 'أصل', 'ouder', 'родитель', '亲', 'ebeveyn', 'parente', 'szülő', 'mère', 'μητρική εταιρεία', 'Elternteil', 'genitore', 'ผู้ปกครอง', 'والدین', 'माता - पिता', 'parente', 'induk', '親', '부모의'),
(7, 'email', 'email', 'ইমেইল', 'email', 'البريد الإلكتروني', 'e-mail', 'по электронной почте', '电子邮件', 'E-posta', 'e-mail', 'E-mail', 'email', 'e-mail', 'E-Mail-', 'e-mail', 'อีเมล์', 'ای میل', 'ईमेल', 'email', 'email', 'メール', '이메일'),
(8, 'password', 'password', 'পাসওয়ার্ড', 'contraseña', 'كلمة السر', 'wachtwoord', 'пароль', '密码', '<PASSWORD>', 'senha', 'jelszó', 'mot de passe', 'τον κωδικό', 'Passwort', 'password', 'รหัสผ่าน', 'پاس', 'पासवर्ड', 'Signum', 'kata sandi', 'パスワード', '암호'),
(9, 'forgot_password ?', 'forgot password ?', 'পাসওয়ার্ড ভুলে গেছেন?', '¿Olvidó su contraseña?', 'نسيت كلمة المرور؟', 'wachtwoord vergeten?', 'забыли пароль?', '忘记密码?', 'Şifremi unuttum?', 'Esqueceu a senha?', 'Elfelejtett jelszó?', 'Mot de passe oublié?', 'Ξεχάσατε τον κωδικό;', 'Passwort vergessen?', 'dimenticato la password?', 'ลืมรหัสผ่าน', 'پاس ورڈ بھول گیا؟', 'क्या संभावनाएं हैं?', 'oblitus esne verbi?', 'lupa password?', 'パスワードを忘れた?', '비밀번호를 잊으 셨나요?'),
(10, 'reset_password', 'reset password', 'পাসওয়ার্ড রিসেট', 'restablecer la contraseña', 'إعادة تعيين كلمة المرور', 'reset wachtwoord', 'сбросить пароль', '重设密码', 'şifrenizi sıfırlamak', 'redefinir a senha', 'Jelszó visszaállítása', 'réinitialiser le mot de passe', 'επαναφέρετε τον κωδικό πρόσβασης', 'Kennwort zurücksetzen', 'reimpostare la password', 'ตั้งค่ารหัสผ่าน', 'پاس ورڈ ری سیٹ', 'पासवर्ड रीसेट', 'Duis adipiscing', 'reset password', 'パスワードを再設定する', '암호를 재설정'),
(11, 'reset', 'reset', 'রিসেট করুন', 'reajustar', 'إعادة تعيين', 'reset', 'сброс', '重置', 'ayarlamak', 'restabelecer', 'vissza', 'remettre', 'επαναφορά', 'rücksetzen', 'reset', 'ตั้งใหม่', 'ری سیٹ', 'रीसेट करें', 'Duis', 'ulang', 'リセット', '재설정'),
(12, 'admin_dashboard', 'admin dashboard', 'অ্যাডমিন ড্যাশবোর্ড', 'administrador salpicadero', 'المشرف وحة القيادة', 'admin dashboard', 'админ панель', '管理面板', 'Admin paneli', 'Admin Dashboard', 'admin műszerfal', 'administrateur tableau de bord', 'πίνακα ελέγχου του διαχειριστή', 'Admin-Dashboard', 'Admin Dashboard', 'แผงควบคุมของผู้ดูแลระบบ', 'ایڈمن ڈیش بورڈ', 'व्यवस्थापक डैशबोर्ड', 'Lorem ipsum dolor sit Dashboard', 'admin dashboard', '管理ダッシュボード', '관리자 대시 보드'),
(13, 'account', 'account', 'হিসাব', 'cuenta', 'حساب', 'rekening', 'счет', '帐户', 'hesap', 'conta', 'számla', 'compte', 'λογαριασμός', 'Konto', 'conto', 'บัญชี', 'اکاؤنٹ', 'खाता', 'propter', 'rekening', 'アカウント', '계정'),
(14, 'profile', 'profile', 'পরিলেখ', 'perfil', 'ملف', 'profiel', 'профиль', '轮廓', 'profil', 'perfil', 'profil', 'profil', 'προφίλ', 'Profil', 'profilo', 'โปรไฟล์', 'پروفائل', 'रूपरेखा', 'profile', 'profil', 'プロフィール', '프로필'),
(15, 'change_password', 'change password', 'পাসওয়ার্ড পরিবর্তন', 'cambiar la contraseña', 'تغيير كلمة المرور', 'wachtwoord wijzigen', 'изменить пароль', '更改密码', 'şifresini değiştirmek', 'alterar a senha', 'jelszó megváltoztatása', 'changer le mot de passe', 'αλλάξετε τον κωδικό πρόσβασης', 'Kennwort ändern', 'cambiare la password', 'เปลี่ยนรหัสผ่าน', 'پاس ورڈ تبدیل', 'पासवर्ड परिवर्तित', 'mutare password', '<PASSWORD>', 'パスワードを変更する', '암호를 변경'),
(16, 'logout', 'logout', 'লগ আউট', 'logout', 'تسجيل الخروج', 'logout', 'выход', '注销', 'logout', 'Sair', 'logout', 'Déconnexion', 'αποσύνδεση', 'logout', 'Esci', 'ออกจากระบบ', 'لاگ آؤٹ کریں', 'लॉगआउट', 'logout', 'logout', 'ログアウト', '로그 아웃'),
(17, 'panel', 'panel', 'প্যানেল', 'panel', 'لوحة', 'paneel', 'панель', '面板', 'panel', 'painel', 'bizottság', 'panneau', 'πίνακας', 'Platte', 'pannello', 'แผงหน้าปัด', 'پینل', 'पैनल', 'panel', 'panel', 'パネル', '패널'),
(18, 'dashboard_help', 'dashboard help', 'ড্যাশবোর্ড সহায়তা', 'salpicadero ayuda', 'لوحة القيادة مساعدة', 'dashboard hulp', 'Приборная панель помощь', '仪表板帮助', 'pano yardım', 'dashboard ajuda', 'műszerfal help', 'tableau de bord aide', 'ταμπλό βοήθεια', 'Dashboard-Hilfe', 'dashboard aiuto', 'แผงควบคุมความช่วยเหลือ', 'ڈیش بورڈ مدد', 'डैशबोर्ड मदद', 'Dashboard auxilium', 'dashboard bantuan', 'ダッシュボードヘルプ', '대시 보드 도움말'),
(19, 'dashboard', 'dashboard', 'ড্যাশবোর্ড', 'salpicadero', 'لوحة القيادة', 'dashboard', 'приборная панель', '仪表盘', 'gösterge paneli', 'painel de instrumentos', 'műszerfal', 'tableau de bord', 'ταμπλό', 'Armaturenbrett', 'cruscotto', 'หน้าปัด', 'ڈیش بورڈ', 'डैशबोर्ड', 'Dashboard', 'dasbor', 'ダッシュボード', '계기판'),
(20, 'student_help', 'student help', 'শিক্ষার্থীর সাহায্য', 'ayuda estudiantil', 'مساعدة الطالب', 'student hulp', 'студент помощь', '学生的帮助', 'Öğrenci yardım', 'ajuda estudante', 'diák segítségével', 'aide aux étudiants', 'φοιτητής βοήθεια', 'Schüler-Hilfe', 'help studente', 'ช่วยเหลือนักเรียน', 'طالب علم کی مدد', 'छात्र मदद', 'Discipulus auxilium', 'membantu siswa', '学生のヘルプ', '학생 도움말'),
(21, 'teacher_help', 'teacher help', 'শিক্ষক সাহায্য', 'ayuda del maestro', 'مساعدة المعلم', 'leraar hulp', 'Учитель помощь', '老师的帮助', 'öğretmen yardım', 'ajuda de professores', 'tanár segítségével', 'aide de l''enseignant', 'βοήθεια των εκπαιδευτικών', 'Lehrer-Hilfe', 'aiuto dell''insegnante', 'ครูช่วยเหลือ', 'استاد کی مدد', 'शिक्षक मदद', 'doctor auxilium', 'bantuan guru', '教師のヘルプ', '교사의 도움'),
(22, 'subject_help', 'subject help', 'বিষয় সাহায্য', 'ayuda sujeto', 'مساعدة الموضوع', 'Onderwerp hulp', 'Заголовок помощь', '主题帮助', 'konusu yardım', 'ajuda assunto', 'tárgy segítségével', 'l''objet de l''aide', 'υπόκεινται βοήθεια', 'Thema Hilfe', 'Aiuto Subject', 'ความช่วยเหลือเรื่อง', 'موضوع مدد', 'विषय मदद', 'agitur salus', 'bantuan subjek', '件名ヘルプ', '주제 도움'),
(23, 'subject', 'subject', 'বিষয়', 'sujeto', 'موضوع', 'onderwerp', 'тема', '主题', 'konu', 'assunto', 'tárgy', 'sujet', 'θέμα', 'Thema', 'soggetto', 'เรื่อง', 'موضوع', 'विषय', 'agitur', 'subyek', 'テーマ', '제목'),
(24, 'class_help', 'class help', 'বর্গ সাহায্য', 'clase de ayuda', 'الطبقة مساعدة', 'klasse hulp', 'Класс помощь', '类的帮助', 'sınıf yardım', 'classe ajuda', 'osztály segítségével', 'aide de la classe', 'Κατηγορία βοήθεια', 'Klasse Hilfe', 'help classe', 'ความช่วยเหลือในชั้นเรียน', 'کلاس مدد', 'कक्षा मदद', 'genus auxilii', 'kelas bantuan', 'クラスのヘルプ', '클래스 도움'),
(25, 'class', 'class', 'বর্গ', 'clase', 'فئة', 'klasse', 'класс', '类', 'sınıf', 'classe', 'osztály', 'classe', 'κατηγορία', 'Klasse', 'classe', 'ชั้น', 'کلاس', 'वर्ग', 'class', 'kelas', 'クラス', '클래스'),
(26, 'exam_help', 'exam help', 'পরীক্ষায় সাহায্য', 'ayuda examen', 'امتحان مساعدة', 'examen hulp', 'Экзамен помощь', '考试帮助', 'sınav yardım', 'exame ajuda', 'vizsga help', 'aide à l''examen', 'εξετάσεις βοήθεια', 'Prüfung Hilfe', 'esame di guida', 'การสอบความช่วยเหลือ', 'امتحان مدد', 'परीक्षा मदद', 'ipsum Auxilium', 'ujian bantuan', '試験ヘルプ', '시험에 도움'),
(27, 'exam', 'exam', 'পরীক্ষা', 'examen', 'امتحان', 'tentamen', 'экзамен', '考试', 'sınav', 'exame', 'vizsgálat', 'exam', 'εξέταση', 'Prüfung', 'esame', 'การสอบ', 'امتحان', 'परीक्षा', 'Lorem ipsum', 'ujian', '試験', '시험'),
(28, 'marks_help', 'marks help', 'চিহ্ন সাহায্য', 'marcas ayudan', 'علامات مساعدة', 'markeringen helpen', 'метки помогают', '标记帮助', 'işaretleri yardım', 'marcas ajudar', 'jelek segítenek', 'marques aident', 'σήματα βοηθήσει', 'Markierungen helfen', 'segni aiutano', 'เครื่องหมายช่วย', 'نمبر مدد', 'निशान मदद', 'notas auxilio', 'tanda membantu', 'マークのヘルプ', '마크는 데 도움이'),
(29, 'marks-attendance', 'marks-attendance', 'চিহ্ন-উপস্থিতির', 'marcas-asistencia', 'علامات-الحضور', 'merken-deelname', 'знаки-посещаемости', '标记缺席', 'işaretleri-katılım', 'marcas de comparecimento', 'jelek-ellátás', 'marques-participation', 'σήματα προσέλευση', 'Marken-Teilnahme', 'marchi-presenze', 'เครื่องหมายการเข้าร่วม', 'نمبر حاضری', 'निशान उपस्थिति', 'signa eius ministrabant,', 'tanda-pertemuan', 'マーク·出席', '마크 출석'),
(30, 'grade_help', 'grade help', 'গ্রেড সাহায্য', 'ayuda de grado', 'مساعدة الصف', 'leerjaar hulp', 'оценка помощь', '级帮助', 'sınıf yardım', 'ajuda grau', 'fokozat help', 'aide de qualité', 'βαθμού βοήθεια', 'Grade-Hilfe', 'aiuto grade', 'ช่วยเหลือเกรด', 'گریڈ مدد', 'ग्रेड मदद', 'gradus ope', 'kelas bantuan', 'グレードのヘルプ', '급 도움'),
(31, 'exam-grade', 'exam-grade', 'পরীক্ষার শ্রেণী', 'examen de grado', 'امتحان الصف', 'examen-grade', 'экзамен класса', '考试级别', 'sınav notu', 'exame de grau', 'vizsga-grade', 'examen de qualité', 'εξετάσεις ποιότητας', 'Prüfung-Grade', 'esami-grade', 'สอบเกรด', 'امتحان گریڈ', 'परीक्षा ग्रेड', 'ipsum turpis,', 'ujian-grade', '試験グレード', '시험 등급'),
(32, 'class_routine_help', 'class routine help', 'ক্লাসের রুটিন সাহায্য', 'clase ayuda rutina', 'الطبقة مساعدة روتينية', 'klasroutine hulp', 'класс рутина помощь', '类常规帮助', 'sınıf rutin yardım', 'classe ajuda rotina', 'osztály rutin segít', 'classe aide routine', 'κατηγορία ρουτίνας βοήθεια', 'Klasse Routine Hilfe', 'Classe aiuto di routine', 'ระดับความช่วยเหลือตามปกติ', 'کلاس معمول مدد', 'वर्ग दिनचर्या मदद', 'uno genere auxilium', 'kelas bantuan rutin', 'クラスルーチンのヘルプ', '클래스 루틴 도움'),
(33, 'class_routine', 'class routine', 'ক্লাসের রুটিন', 'rutina de la clase', 'فئة الروتينية', 'klasroutine', 'класс подпрограмм', '常规类', 'sınıf rutin', 'rotina classe', 'osztály rutin', 'routine de classe', 'Κατηγορία ρουτίνα', 'Klasse Routine', 'classe di routine', 'ประจำชั้น', 'کلاس معمول', 'वर्ग दिनचर्या', 'in genere uno,', 'rutin kelas', 'クラス·ルーチン', '클래스 루틴'),
(34, 'invoice_help', 'invoice help', 'চালান সাহায্য', 'ayuda factura', 'مساعدة الفاتورة', 'factuur hulp', 'счет-фактура помощь', '发票帮助', 'fatura yardım', 'ajuda factura', 'számla segítségével', 'aide facture', 'τιμολόγιο βοήθεια', 'Rechnungs Hilfe', 'help fattura', 'ช่วยเหลือใบแจ้งหนี้', 'انوائس مدد', 'चालान सहायता', 'auxilium cautionem', 'bantuan faktur', '送り状ヘルプ', '송장 도움'),
(35, 'payment', 'payment', 'প্রদান', 'pago', 'دفع', 'betaling', 'оплата', '付款', 'ödeme', 'pagamento', 'fizetés', 'paiement', 'πληρωμή', 'Zahlung', 'pagamento', 'การชำระเงิน', 'ادائیگی', 'भुगतान', 'pecunia', 'pembayaran', '支払い', '지불'),
(36, 'book_help', 'book help', 'বইয়ের সাহায্য', 'libro de ayuda', 'كتاب المساعدة', 'boek hulp', 'Книга помощь', '本书帮助', 'kitap yardımı', 'livro ajuda', 'könyv segít', 'livre aide', 'βοήθεια του βιβλίου', 'Buch-Hilfe', 'della guida', 'ช่วยเหลือหนังสือ', 'کتاب مدد', 'पुस्तक मदद', 'auxilium libro,', 'Buku bantuan', 'ブックのヘルプ', '책 도움말'),
(37, 'library', 'library', 'লাইব্রেরি', 'biblioteca', 'مكتبة', 'bibliotheek', 'библиотека', '文库', 'kütüphane', 'biblioteca', 'könyvtár', 'bibliothèque', 'βιβλιοθήκη', 'Bibliothek', 'biblioteca', 'ห้องสมุด', 'لائبریری', 'पुस्तकालय', 'library', 'perpustakaan', '図書館', '도서관'),
(38, 'transport_help', 'transport help', 'যানবাহনের সাহায্য', 'ayuda de transporte', 'مساعدة النقل', 'vervoer help', 'транспорт помощь', '运输帮助', 'ulaşım yardım', 'ajuda de transporte', 'szállítás Súgó', 'le transport de l''aide', 'βοηθούν τη μεταφορά', 'Transport Hilfe', 'help trasporti', 'ช่วยเหลือการขนส่ง', 'نقل و حمل مدد', 'परिवहन मदद', 'auxilium onerariis', 'transportasi bantuan', '輸送のヘルプ', '전송 도움'),
(39, 'transport', 'transport', 'পরিবহন', 'transporte', 'نقل', 'vervoer', 'транспорт', '运输', 'taşıma', 'transporte', 'szállítás', 'transport', 'μεταφορά', 'Transport', 'trasporto', 'การขนส่ง', 'نقل و حمل', 'परिवहन', 'onerariis', 'angkutan', '輸送', '수송'),
(40, 'dormitory_help', 'dormitory help', 'আস্তানা সাহায্য', 'dormitorio de ayuda', 'عنبر المساعدة', 'slaapzaal hulp', 'общежитие помощь', '宿舍帮助', 'yatakhane yardım', 'dormitório ajuda', 'kollégiumi help', 'dortoir aide', 'κοιτώνα βοήθεια', 'Wohnheim Hilfe', 'dormitorio aiuto', 'หอพักช่วยเหลือ', 'شیناگار مدد', 'छात्रावास मदद', 'dormitorium auxilium', 'asrama bantuan', '寮のヘルプ', '기숙사 도움말'),
(41, 'dormitory', 'dormitory', 'শ্রমিক - আস্তানা', 'dormitorio', 'المهجع', 'slaapzaal', 'спальня', '宿舍', 'yatakhane', 'dormitório', 'hálóterem', 'dortoir', 'κοιτώνα', 'Wohnheim', 'dormitorio', 'หอพัก', 'شیناگار', 'छात्रावास', 'dormitorium', 'asrama mahasiswa', '寮', '기숙사'),
(42, 'noticeboard_help', 'noticeboard help', 'নোটিশবোর্ড সাহায্য', 'tablón de anuncios de la ayuda', 'اللافتة مساعدة', 'prikbord hulp', 'доска для объявлений помощь', '布告帮助', 'noticeboard yardım', 'avisos ajuda', 'üzenőfalán help', 'panneau d''aide', 'ανακοινώσεων βοήθεια', 'Brett-Hilfe', 'bacheca aiuto', 'ป้ายประกาศความช่วยเหลือ', 'noticeboard مدد', 'Noticeboard मदद', 'auxilium noticeboard', 'pengumuman bantuan', '伝言板のヘルプ', '의 noticeboard 도움말'),
(43, 'noticeboard-event', 'noticeboard-event', 'নোটিশবোর্ড-ইভেন্ট', 'tablón de anuncios de eventos', 'اللافتة الحدث', 'prikbord-event', 'доска для объявлений-событие', '布告牌事件', 'noticeboard olay', 'avisos de eventos', 'üzenőfalán esemény', 'panneau d''événement', 'ανακοινώσεων εκδήλωση', 'Brett-Ereignis', 'bacheca-evento', 'ป้ายประกาศของเหตุการณ์', 'noticeboard ایونٹ', 'Noticeboard घटना', 'noticeboard eventus,', 'pengumuman-acara', '伝言板イベント', '의 noticeboard 이벤트'),
(44, 'bed_ward_help', 'bed ward help', 'বিছানা ওয়ার্ড সাহায্য', 'cama ward ayuda', 'جناح سرير المساعدة', 'bed ward hulp', 'кровать подопечный помощь', '床病房的帮助', 'yatak koğuş yardım', 'ajuda cama enfermaria', 'ágy Ward help', 'lit salle de l''aide', 'κρεβάτι πτέρυγα βοήθεια', 'Betten-Station Hilfe', 'Letto reparto aiuto', 'วอร์ดเตียงช่วยเหลือ', 'بستر وارڈ مدد', 'बिस्तर वार्ड मदद', 'lectum stans auxilium', 'tidur bangsal bantuan', 'ベッド病棟のヘルプ', '침대 병동 도움'),
(45, 'settings', 'settings', 'সেটিংস', 'configuración', 'إعدادات', 'instellingen', 'настройки', '设置', 'ayarları', 'definições', 'beállítások', 'paramètres', 'Ρυθμίσεις', 'Einstellungen', 'Impostazioni', 'การตั้งค่า', 'ترتیبات', 'सेटिंग्स', 'occasus', 'Pengaturan', '設定', '설정'),
(46, 'system_settings', 'system settings', 'সিস্টেম সেটিংস', 'configuración del sistema', 'إعدادات النظام', 'systeeminstellingen', 'настройки системы', '系统设置', 'sistem ayarları', 'configurações do sistema', 'rendszerbeállításokat', 'les paramètres du système', 'ρυθμίσεις του συστήματος', 'Systemeinstellungen', 'impostazioni di sistema', 'การตั้งค่าระบบ', 'نظام کی ترتیبات', 'प्रणाली सेटिंग्स', 'ratio occasus', 'pengaturan sistem', 'システム設定', '시스템 설정'),
(47, 'manage_language', 'manage language', 'ভাষা ও পরিচালনা', 'gestionar idioma', 'إدارة اللغة', 'beheren taal', 'управлять язык', '管理语言', 'dil yönetmek', 'gerenciar língua', 'kezelni nyelv', 'gérer langue', 'διαχείριση γλώσσα', 'verwalten Sprache', 'gestire lingua', 'จัดการภาษา', 'زبان کا انتظام', 'भाषा का प्रबंधन', 'moderari linguam,', 'mengelola bahasa', '言語を管理', '언어를 관리'),
(48, 'backup_restore', 'backup restore', 'ব্যাকআপ পুনঃস্থাপন', 'copia de seguridad a restaurar', 'استعادة النسخ الاحتياطي', 'backup terugzetten', 'восстановить резервного копирования', '备份还原', 'yedekleme geri', 'de backup restaurar', 'Backup Restore', 'restauration de sauvegarde', 'επαναφοράς αντιγράφων ασφαλείας', 'Backup wiederherstellen', 'ripristino di backup', 'การสำรองข้อมูลเรียกคืน', 'بیک اپ بحال', 'बैकअप बहाल', 'tergum restituunt', 'backup restore', 'バックアップは、リストア', '백업 복원'),
(49, 'profile_help', 'profile help', 'সাহায্য প্রোফাইল', 'Perfil Ayuda', 'ملف المساعدة', 'profile hulp', 'анкета помощь', '简介帮助', 'yardım profile', 'Perfil ajuda', 'profile help', 'profil aide', 'προφίλ βοήθεια', 'Profil Hilfe', 'profilo di aiuto', 'โปรไฟล์ความช่วยเหลือ', 'مدد پروفائل', 'प्रोफाइल में', 'Auctor nullam opem', 'Profil bantuan', 'プロフィールヘルプ', '도움 프로필'),
(50, 'manage_student', 'manage student', 'শিক্ষার্থী ও পরিচালনা', 'gestionar estudiante', 'إدارة الطلبة', 'beheren student', 'управлять студента', '管理学生', 'öğrenci yönetmek', 'gerenciar estudante', 'kezelni diák', 'gérer étudiant', 'διαχείριση των φοιτητών', 'Schüler verwalten', 'gestire studente', 'การจัดการศึกษา', 'طالب علم کا انتظام', 'छात्र का प्रबंधन', 'curo alumnorum', 'mengelola siswa', '生徒を管理', '학생 관리'),
(51, 'manage_teacher', 'manage teacher', 'শিক্ষক ও পরিচালনা', 'gestionar maestro', 'إدارة المعلم', 'beheren leraar', 'управлять учителя', '管理老师', 'öğretmen yönetmek', 'gerenciar professor', '<NAME>', 'gérer enseignant', 'διαχείριση των εκπαιδευτικών', 'Lehrer verwalten', 'gestire insegnante', 'จัดการครู', 'ٹیچر کا انتظام', 'शिक्षक का प्रबंधन', 'magister curo', 'mengelola guru', '教師を管理', '교사 관리'),
(52, 'noticeboard', 'noticeboard', 'নোটিশবোর্ড', 'tablón de anuncios', 'اللافتة', 'prikbord', 'доска для объявлений', '布告', 'noticeboard', 'quadro de avisos', 'üzenőfalán', 'panneau d''affichage', 'ανακοινώσεων', 'Brett', 'bacheca', 'ป้ายประกาศ', 'noticeboard', 'Noticeboard', 'noticeboard', 'pengumuman', '伝言板', '의 noticeboard'),
(53, 'language', 'language', 'ভাষা', 'idioma', 'لغة', 'taal', 'язык', '语', 'dil', 'língua', 'nyelv', 'langue', 'γλώσσα', 'Sprache', 'lingua', 'ภาษา', 'زبان', 'भाषा', 'Lingua', 'bahasa', '言語', '언어'),
(54, 'backup', 'backup', 'ব্যাকআপ', 'reserva', 'دعم', 'reservekopie', 'резервный', '备用', 'yedek', 'backup', 'mentés', 'sauvegarde', 'εφεδρικός', 'Sicherungskopie', 'di riserva', 'การสำรองข้อมูล', 'بیک اپ', 'बैकअप', 'tergum', 'backup', 'バックアップ', '지원'),
(55, 'calendar_schedule', 'calendar schedule', 'ক্যালেন্ডার সময়সূচী', 'horario de calendario', 'الجدول الزمني', 'kalender schema', 'Календарь Расписание', '日历日程', 'takvim programı', 'agenda calendário', 'naptári ütemezés', 'calendrier calendrier', 'χρονοδιαγράμματος του ημερολογίου', 'Kalender Zeitplan', 'programma di calendario', 'ปฏิทินตารางนัดหมาย', 'کیلنڈر شیڈول', 'कैलेंडर अनुसूची', 'kalendarium ipsum', 'jadwal kalender', 'カレンダーのスケジュール', '캘린더 일정'),
(56, 'select_a_class', 'select a class', 'একটি শ্রেণী নির্বাচন', 'seleccionar una clase', 'حدد فئة', 'selecteer een class', 'выберите класс', '选择一个类', 'bir sınıf seçin', 'selecionar uma classe', 'válasszon ki egy osztályt', 'sélectionner une classe', 'επιλέξτε μια κατηγορία', 'Wählen Sie eine Klasse', 'selezionare una classe', 'เลือกชั้น', 'ایک کلاس منتخب کریں', 'एक वर्ग का चयन करें', 'eligere genus', 'pilih kelas', 'クラスを選択', '클래스를 선택'),
(57, 'student_list', 'student list', 'শিক্ষার্থীর তালিকা', 'lista de alumnos', 'قائمة الطلاب', 'student lijst', 'Список студент', '学生名单', 'öğrenci listesi', 'lista de alunos', 'diák lista', 'liste des étudiants', 'κατάλογο των φοιτητών', 'Schülerliste', 'elenco degli studenti', 'รายชื่อนักเรียน', 'طالب علم کی فہرست', 'छात्र सूची', 'Discipulus album', 'daftar mahasiswa', '学生のリスト', '학생 목록'),
(58, 'add_student', 'add student', 'ছাত্র যোগ', 'añadir estudiante', 'إضافة طالب', 'voeg student', 'добавить студента', '新增学生', 'öğrenci eklemek', 'adicionar estudante', 'hozzá hallgató', 'ajouter étudiant', 'προσθέστε φοιτητής', 'Student hinzufügen', 'aggiungere studente', 'เพิ่มนักเรียน', 'طالب علم شامل', 'छात्र जोड़', 'adde elit', 'menambahkan mahasiswa', '学生を追加', '학생을 추가'),
(59, 'roll', 'roll', 'রোল', 'rollo', 'لفة', 'broodje', 'рулон', '滚', 'rulo', 'rolo', 'tekercs', 'rouleau', 'ρολό', 'Rolle', 'rotolo', 'ม้วน', 'رول', 'रोल', 'volumen', 'gulungan', 'ロール', '롤'),
(60, 'photo', 'photo', 'ছবি', 'foto', 'صور', 'foto', 'фото', '照片', 'fotoğraf', 'foto', 'fénykép', 'photo', 'φωτογραφία', 'Foto', 'foto', 'ภาพถ่าย', 'تصویر', 'फ़ोटो', 'Lorem ipsum', 'foto', '写真', '사진'),
(61, 'student_name', 'student name', 'শিক্ষার্থীর নাম', 'Nombre del estudiante', 'اسم الطالب', '<NAME>', 'Имя студента', '学生姓名', 'Öğrenci adı', 'nome do aluno', 'tanuló nevét', 'nom de l''étudiant', 'το όνομα του μαθητή', 'Studentennamen', 'nome dello studente', 'ชื่อนักเรียน', 'طالب علم کے نام', 'छात्र का नाम', 'ipsum est nomen', 'nama siswa', '学生の名前', '학생의 이름'),
(62, 'address', 'address', 'ঠিকানা', 'dirección', 'عنوان', 'adres', 'адрес', '地址', 'adres', 'endereço', 'cím', 'adresse', 'διεύθυνση', 'Adresse', 'indirizzo', 'ที่อยู่', 'ایڈریس', 'पता', 'Oratio', 'alamat', 'アドレス', '주소'),
(63, 'options', 'options', 'অপশন', 'Opciones', 'خيارات', 'opties', 'опции', '选项', 'seçenekleri', 'opções', 'lehetőségek', 'les options', 'Επιλογές', 'Optionen', 'Opzioni', 'ตัวเลือก', 'اختیارات', 'विकल्प', 'options', 'Pilihan', 'オプション', '옵션'),
(64, 'marksheet', 'marksheet', 'marksheet', 'marksheet', 'marksheet', 'Marksheet', 'marksheet', 'marksheet', 'Marksheet', 'marksheet', 'Marksheet', 'relevé de notes', 'Marksheet', 'marksheet', 'Marksheet', 'marksheet', 'marksheet', 'अंकपत्र', 'marksheet', 'marksheet', 'marksheet', 'marksheet'),
(65, 'id_card', 'id card', 'আইডি কার্ড', 'carnet de identidad', 'بطاقة الهوية', 'id-kaart', 'удостоверение личности', '身份证', 'kimlik kartı', 'carteira de identidade', 'személyi igazolvány', 'carte d''identité', 'id κάρτα', 'Ausweis', 'carta d''identità', 'บัตรประชาชน', 'شناختی کارڈ', 'औ डी कार्ड', 'id ipsum', 'id card', 'IDカード', '신분증'),
(66, 'edit', 'edit', 'সম্পাদন করা', 'editar', 'تحرير', 'uitgeven', 'редактировать', '编辑', 'düzenleme', 'editar', 'szerkeszt', 'modifier', 'edit', 'bearbeiten', 'modifica', 'แก้ไข', 'میں ترمیم کریں', 'संपादित करें', 'edit', 'mengedit', '編集', '편집'),
(67, 'delete', 'delete', 'মুছে ফেলা', 'borrar', 'حذف', 'verwijderen', 'удалять', '删除', 'silmek', 'excluir', 'töröl', 'effacer', 'διαγραφή', 'löschen', 'cancellare', 'ลบ', 'خارج', 'हटाना', 'vel deleri,', 'menghapus', '削除する', '삭제'),
(68, 'personal_profile', 'personal profile', 'ব্যক্তিগত প্রোফাইল', 'perfil personal', 'ملف شخصي', 'persoonlijk profiel', 'личный профиль', '个人简介', 'kişisel profil', 'perfil pessoal', 'személyes profil', 'profil personnel', 'προσωπικό προφίλ', 'persönliches Profil', 'profilo personale', 'รายละเอียดข้อมูลส่วนตัว', 'ذاتی پروفائل', 'व्यक्तिगत प्रोफाइल', 'personal profile', 'profil pribadi', '人物点描', '개인 프로필'),
(69, 'academic_result', 'academic result', 'একাডেমিক ফলাফল', 'resultado académico', 'نتيجة الأكاديمية', 'academische resultaat', 'академический результат', '学术成果', 'akademik sonuç', 'resultado acadêmico', 'tudományos eredmény', 'résultat académique', 'ακαδημαϊκή αποτέλεσμα', 'Studienergebnis', 'risultato accademico', 'ผลการศึกษา', 'تعلیمی نتیجہ', 'शैक्षिक परिणाम', 'Ex academicis', 'Hasil akademik', '学術結果', '학습 결과'),
(70, 'name', 'name', 'নাম', 'nombre', 'اسم', 'naam', 'название', '名称', 'isim', 'nome', 'név', 'nom', 'όνομα', 'Name', 'nome', 'ชื่อ', 'نام', 'नाम', 'nomen,', 'nama', '名前', '이름'),
(71, 'birthday', 'birthday', 'জন্মদিন', 'cumpleaños', 'عيد ميلاد', 'verjaardag', 'день рождения', '生日', 'doğum günü', 'aniversário', 'születésnap', 'anniversaire', 'γενέθλια', 'Geburtstag', 'compleanno', 'วันเกิด', 'سالگرہ', 'जन्मदिन', 'natalis', 'ulang tahun', '誕生日', '생일'),
(72, 'sex', 'sex', 'লিঙ্গ', 'sexo', 'جنس', 'seks', 'секс', '性别', 'seks', 'sexo', 'szex', 'sexe', 'φύλο', 'Sex', 'sesso', 'เพศ', 'جنسی', 'लिंग', 'sex', 'seks', 'セックス', '섹스'),
(73, 'male', 'male', 'পুরুষ', 'masculino', 'ذكر', 'mannelijk', 'мужской', '男性', 'erkek', 'masculino', 'férfi', 'mâle', 'αρσενικός', 'männlich', 'maschio', 'เพศชาย', 'پروفائل', 'नर', 'masculus', 'laki-laki', '男性', '남성'),
(74, 'female', 'female', 'মহিলা', 'femenino', 'أنثى', 'vrouw', 'женский', '女', 'kadın', 'feminino', 'női', 'femelle', 'θηλυκός', 'weiblich', 'femminile', 'เพศหญิง', 'خواتین', 'महिला', 'femina,', 'perempuan', '女性', '여성'),
(75, 'religion', 'religion', 'ধর্ম', 'religión', 'دين', 'religie', 'религия', '宗教', 'din', 'religião', 'vallás', 'religion', 'θρησκεία', 'Religion', 'religione', 'ศาสนา', 'مذہب', 'धर्म', 'religionis,', 'agama', '宗教', '종교'),
(76, 'blood_group', 'blood group', 'রক্তের বিভাগ', 'grupo sanguíneo', 'فصيلة الدم', 'bloedgroep', 'группа крови', '血型', 'kan grubu', 'grupo sanguíneo', 'vércsoport', 'groupe sanguin', 'ομάδα αίματος', 'Blutgruppe', 'gruppo sanguigno', 'กรุ๊ปเลือด', 'خون کے گروپ', 'रक्त वर्ग', 'sanguine coetus', 'golongan darah', '血液型', '혈액형'),
(77, 'phone', 'phone', 'ফোন', 'teléfono', 'هاتف', 'telefoon', 'телефон', '电话', 'telefon', 'telefone', 'telefon', 'téléphone', 'τηλέφωνο', 'Telefon', 'telefono', 'โทรศัพท์', 'فون', 'फ़ोन', 'Praesent', 'telepon', '電話', '전화'),
(78, 'father_name', 'father name', 'পিতার নাম', 'Nombre del padre', 'اسم الأب', 'naam van de vader', 'отчество', '父亲姓名', 'baba adı', 'nome pai', 'apa név', 'nom de père', 'Το όνομα του πατέρα', 'Der Name des Vaters', 'nome del padre', 'ชื่อพ่อ', 'والد کا نام', 'पिता का नाम', 'nomine Patris,', 'Nama ayah', '父親の名前', '아버지의 이름'),
(79, 'mother_name', 'mother name', 'মায়ের নাম', 'Nombre de la madre', 'اسم الأم', 'moeder naam', 'Имя матери', '母亲的名字', 'anne adı', 'Nome mãe', 'anyja név', 'nom de la mère', 'το όνομα της μητέρας', 'Name der Mutter', 'Nome madre', 'ชื่อแม่', 'ماں کا نام', 'माता का नाम', 'matris nomen,', 'Nama ibu', '母の名前', '어머니 이름'),
(80, 'edit_student', 'edit student', 'সম্পাদনা ছাত্র', 'edit estudiante', 'تحرير الطالب', 'bewerk student', 'редактирования студент', '编辑学生', 'edit öğrenci', 'edição aluno', 'szerkesztés diák', 'modifier étudiant', 'επεξεργασία των φοιτητών', 'Schüler bearbeiten', 'modifica dello studente', 'แก้ไขนักเรียน', 'ترمیم کے طالب علم', 'संपादित छात्र', 'edit studiosum', 'mengedit siswa', '編集学生', '편집 학생'),
(81, 'teacher_list', 'teacher list', 'শিক্ষক তালিকা', 'lista maestra', 'قائمة المعلم', 'leraar lijst', 'Список учителей', '老师名单', 'öğretmen listesi', 'lista de professores', 'tanár lista', 'Liste des enseignants', 'Λίστα των εκπαιδευτικών', 'Lehrer-Liste', 'elenco degli insegnanti', 'รายชื่อครู', 'استاد فہرست', 'शिक्षक सूची', 'magister album', 'daftar guru', '教員リスト', '교사의 목록'),
(82, 'add_teacher', 'add teacher', 'শিক্ষক যোগ', 'añadir profesor', 'إضافة المعلم', 'voeg leraar', 'добавить учителя', '加上老师', 'öğretmen ekle', 'adicionar professor', 'hozzá tanár', 'ajouter enseignant', 'προσθέστε δάσκαλος', 'Lehrer hinzufügen', 'aggiungere insegnante', 'เพิ่มครู', 'استاد شامل', 'शिक्षक जोड़', 'Magister addit', 'menambah guru', '先生を追加', '교사를 추가'),
(83, 'teacher_name', 'teacher name', 'শিক্ষক নাম', 'Nombre del profesor', 'اسم المعلم', 'leraarsnaam', 'Имя учителя', '老师姓名', 'öğretmen adı', 'nome professor', '<NAME>', 'nom des enseignants', 'όνομα των εκπαιδευτικών', 'Lehrer Name', 'Nome del docente', 'ชื่อครู', 'استاد کا نام', 'शिक्षक का नाम', 'magister nomine', 'nama guru', '教員名', '교사 이름'),
(84, 'edit_teacher', 'edit teacher', 'সম্পাদনা শিক্ষক', 'edit maestro', 'تحرير المعلم', 'leraar bewerken', 'править учитель', '编辑老师', 'edit öğretmen', 'editar professor', 'szerkesztés tanár', 'modifier enseignant', 'edit εκπαιδευτικών', 'edit Lehrer', 'modifica insegnante', 'แก้ไขครู', 'ترمیم استاد', 'संपादित करें शिक्षक', 'edit magister', 'mengedit guru', '編集の先生', '편집 교사'),
(85, 'manage_parent', 'manage parent', 'অভিভাবক ও পরিচালনা', 'gestionar los padres', 'إدارة الأم', 'beheren ouder', 'управлять родителей', '母公司管理', 'ebeveyn yönetmek', 'gerenciar pai', 'kezelni szülő', 'gérer parent', 'διαχείριση μητρική', 'verwalten Mutter', 'gestione genitore', 'จัดการปกครอง', 'والدین کا انتظام', 'माता - पिता का प्रबंधन', 'curo parent', 'mengelola orang tua', '親を管理', '부모 관리'),
(86, 'parent_list', 'parent list', 'মূল তালিকা', 'lista primaria', 'قائمة الوالد', 'ouder lijst', 'родительского списка', '父列表', 'ebeveyn listesi', 'lista pai', 'szülő lista', 'liste parent', 'μητρική λίστα', 'geordneten Liste', 'elenco padre', 'รายชื่อผู้ปกครอง', 'والدین کی فہرست', 'माता - पिता सूची', 'parente album', 'daftar induk', '親リスト', '상위 목록'),
(87, 'parent_name', 'parent name', 'মূল নাম', 'Nombre del padre', 'اسم الوالد', 'oudernaam', 'родитель название', '父名', 'ebeveyn isim', 'nome do pai', 'szülő név', 'nom du parent', 'μητρικό όνομα', 'Mutternamen', 'nome del padre', 'ชื่อผู้ปกครอง', 'والدین کے نام', 'माता - पिता का नाम', 'Nomen parentis,', 'nama orang tua', '親の名前', '부모 이름'),
(88, 'relation_with_student', 'relation with student', 'ছাত্রদের সঙ্গে সম্পর্ক', 'relación con el estudiante', 'العلاقة مع الطالب', 'relatie met student', 'отношения с учеником', '与学生关系', 'öğrenci ile ilişkisi', 'relação com o aluno', 'kapcsolatban diák', 'relation avec l''élève', 'σχέση με τον μαθητή', 'Zusammenhang mit Studenten', 'rapporto con lo studente', 'ความสัมพันธ์กับนักเรียน', 'طالب علم کے ساتھ تعلق', 'छात्रा के साथ संबंध', 'cum inter ipsum', 'hubungan dengan siswa', '学生との関係', '학생과의 관계'),
(89, 'parent_email', 'parent email', 'মূল ইমেইল', 'correo electrónico de los padres', 'البريد الإلكتروني الأم', 'ouder email', 'родитель письмо', '父母的电子邮件', 'ebeveyn email', 'e-mail dos pais', 'szülő e-mail', 'parent email', 'email του γονέα', 'Eltern per E-Mail', 'email genitore', 'อีเมล์ผู้ปกครอง', 'والدین کا ای میل', 'माता - पिता ईमेल', 'parente email', 'email induk', '親電子メール', '부모의 이메일'),
(90, 'parent_phone', 'parent phone', 'ঊর্ধ্বতন ফোন', 'teléfono de los padres', 'الهاتف الوالدين', 'ouder telefoon', 'родитель телефон', '家长电话', 'ebeveyn telefon', 'telefone dos pais', 'szülő telefon', 'mère de téléphone', 'μητρική τηλέφωνο', 'Elterntelefon', 'telefono genitore', 'โทรศัพท์ของผู้ปกครอง', 'والدین فون', 'माता - पिता को फोन', 'parentis phone', 'telepon orang tua', '親の携帯電話', '부모 전화'),
(91, 'parrent_address', 'parrent address', 'parrent ঠিকানা', 'Dirección Parrent', 'عنوان parrent', 'parrent adres', 'Parrent адрес', 'parrent地址', 'parrent adresi', 'endereço Parrent', 'parrent cím', 'adresse Parrent', 'parrent διεύθυνση', 'parrent Adresse', 'Indirizzo parrent', 'ที่อยู่ parrent', 'parrent ایڈریس', 'parrent पता', 'oratio parrent', 'alamat parrent', 'parrentアドレス', 'parrent 주소'),
(92, 'parrent_occupation', 'parrent occupation', 'parrent বৃত্তি', 'ocupación Parrent', 'الاحتلال parrent', 'parrent bezetting', 'Parrent оккупация', 'parrent职业', 'parrent işgal', 'ocupação Parrent', 'parrent Foglalkozás', 'occupation Parrent', 'parrent επάγγελμα', 'parrent Beruf', 'occupazione parrent', 'อาชีพ parrent', 'parrent قبضے', 'parrent कब्जे', 'opus parrent', 'pendudukan parrent', 'parrent職業', 'parrent 직업'),
(93, 'add', 'add', 'যোগ করা', 'añadir', 'إضافة', 'toevoegen', 'добавлять', '加', 'eklemek', 'adicionar', 'hozzáad', 'ajouter', 'προσθήκη', 'hinzufügen', 'aggiungere', 'เพิ่ม', 'شامل', 'जोड़ना', 'Adde', 'menambahkan', '加える', '추가'),
(94, 'parent_of', 'parent of', 'অভিভাবক', 'matriz de', 'الأم ل', 'ouder van', 'родитель', '父', 'ebeveyn', 'pai', 'szülő', 'parent d''', 'γονέας', 'Muttergesellschaft der', 'madre di', 'ผู้ปกครองของ', 'والدین', 'के माता - पिता', 'parentem,', 'induk dari', 'の親', '의 부모'),
(95, 'profession', 'profession', 'পেশা', 'profesión', 'مهنة', 'beroep', 'профессия', '职业', 'meslek', 'profissão', 'szakma', 'profession', 'επάγγελμα', 'Beruf', 'professione', 'อาชีพ', 'پیشہ', 'व्यवसाय', 'professio', 'profesi', '職業', '직업'),
(96, 'edit_parent', 'edit parent', 'সম্পাদনা ঊর্ধ্বতন', 'edit padres', 'تحرير الوالدين', 'bewerk ouder', 'править родитель', '编辑父', 'edit ebeveyn', 'edição pai', 'szerkesztés szülő', 'modifier parent', 'edit γονέα', 'edit Mutter', 'modifica genitore', 'แก้ไขผู้ปกครอง', 'میں ترمیم کریں والدین', 'संपादित जनक', 'edit parent', 'mengedit induk', '編集親', '편집 부모'),
(97, 'add_parent', 'add parent', 'ঊর্ধ্বতন যোগ', 'añadir los padres', 'إضافة الوالد', 'Voeg een ouder', 'добавить родителя', '添加父', 'ebeveyn ekle', 'adicionar pai', 'hozzá szülő', 'ajouter parent', 'προσθέστε μητρική', 'Mutter hinzufügen', 'aggiungere genitore', 'เพิ่มผู้ปกครอง', 'والدین شامل', 'माता - पिता जोड़', 'adde parent', 'menambahkan orang tua', '親を追加', '부모를 추가'),
(98, 'manage_subject', 'manage subject', 'বিষয় ও পরিচালনা', 'gestionar sujeto', 'إدارة الموضوع', 'beheren onderwerp', 'управлять тему', '管理主题', 'konuyu yönetmek', 'gerenciar assunto', 'kezelni tárgy', 'gérer sujet', 'διαχείριση υπόκειται', 'Thema verwalten', 'gestire i soggetti', 'การจัดการเรื่อง', 'موضوع کا انتظام', 'विषय का प्रबंधन', 'subiectum disponat', 'mengelola subjek', '対象を管理', '대상 관리'),
(99, 'subject_list', 'subject list', 'বিষয় তালিকা', 'lista por materia', 'قائمة الموضوع', 'Onderwerp lijst', 'Список подлежит', '主题列表', 'konu listesi', 'lista por assunto', 'téma lista', 'liste de sujets', 'υπόκεινται λίστα', 'Themenliste', 'lista soggetto', 'รายการเรื่อง', 'موضوع کی فہرست', 'विषय सूची', 'subiectum album', 'daftar subjek', 'サブジェクトリスト', '주제 목록'),
(100, 'add_subject', 'add subject', 'বিষয় যোগ', 'Añadir asunto', 'إضافة الموضوع', 'Onderwerp toevoegen', 'добавить тему', '新增主题', 'konu ekle', 'adicionar assunto', 'Tárgy hozzáadása', 'ajouter l''objet', 'Προσθήκη θέματος', 'Thema hinzufügen', 'aggiungere soggetto', 'เพิ่มเรื่อง', 'موضوع', 'जोड़ें विषय', 're addere', 'menambahkan subjek', '件名を追加', '제목을 추가'),
(101, 'subject_name', 'subject name', 'বিষয় নাম', 'nombre del sujeto', 'اسم الموضوع', 'Onderwerp naam', 'имя субъекта', '主题名称', 'konu adı', 'nome do assunto', 'tárgy megnevezése', 'nom du sujet', 'υπόκεινται όνομα', 'Thema Namen', 'nome del soggetto', 'ชื่อเรื่อง', 'موضوع کے نام', 'विषय का नाम', 'agitur nomine', 'nama subjek', 'サブジェクト名', '주체 이름'),
(102, 'edit_subject', 'edit subject', 'সম্পাদনা বিষয়', 'Editar asunto', 'تحرير الموضوع', 'Onderwerp bewerken', 'Изменить тему', '编辑主题', 'düzenleme konusu', 'Editar assunto', 'Tárgy szerkesztése', 'modifier l''objet', 'edit θέμα', 'Betreff bearbeiten', 'Modifica oggetto', 'แก้ไขเรื่อง', 'موضوع میں ترمیم کریں', 'विषय संपादित करें', 'edit subiecto', 'mengedit subjek', '編集対象', '제목 수정'),
(103, 'manage_class', 'manage class', 'ক্লাস ও পরিচালনা', 'gestionar clase', 'إدارة الصف', 'beheren klasse', 'управлять класс', '管理类', 'sınıf yönetmek', 'gerenciar classe', 'kezelni osztály', 'gérer classe', 'διαχείριση τάξης', 'Klasse verwalten', 'gestione della classe', 'การจัดการชั้นเรียน', 'کلاس کا انتظام', 'वर्ग का प्रबंधन', 'genus regendi', 'mengelola kelas', 'クラスを管理', '클래스에게 관리'),
(104, 'class_list', 'class list', 'বর্গ তালিকা', 'lista de la clase', 'قائمة فئة', 'klasse lijst', 'Список класс', '类列表', 'sınıf listesi', 'lista de classe', 'class lista', 'liste de classe', 'πίνακας αποτελεσμάτων', 'Klassenliste', 'elenco di classe', 'รายการชั้น', 'کلاس فہرست', 'कक्षा सूची', 'genus album', 'daftar kelas', 'クラスリスト', '클래스 목록'),
(105, 'add_class', 'add class', 'ক্লাসে যোগ', 'agregar la clase', 'إضافة فئة', 'voeg klasse', 'добавить класс', '添加类', 'sınıf eklemek', 'adicionar classe', 'hozzá osztály', 'ajouter la classe', 'προσθέσετε τάξη', 'Klasse hinzufügen', 'aggiungere classe', 'เพิ่มระดับ', 'کلاس شامل کریں', 'वर्ग जोड़', 'adde genus', 'menambahkan kelas', 'クラスを追加', '클래스를 추가'),
(106, 'class_name', 'class name', 'শ্রেণীর নাম', 'nombre de la clase', 'اسم الفئة', 'class naam', 'Имя класса', '类名', 'sınıf adı', 'nome da classe', 'osztály neve', 'nom de la classe', 'όνομα της κλάσης', 'Klassennamen', 'nome della classe', 'ชื่อชั้น', 'کلاس نام', 'वर्ग के नाम', 'Classis nomine', 'nama kelas', 'クラス名', '클래스 이름'),
(107, 'numeric_name', 'numeric name', 'সাংখ্যিক নাম', 'nombre numérico', 'اسم رقمية', 'numerieke naam', 'числовое имя', '数字名称', 'Sayısal isim', 'nome numérico', 'numerikus név', 'nom numérique', 'αριθμητικό όνομα', 'numerischen Namen', 'nome numerico', 'ชื่อตัวเลข', 'عددی نام', 'सांख्यिक नाम', 'secundum numerum est secundum nomen,', 'Nama numerik', '数値の名前', '숫자 이름');
INSERT INTO `language` (`phrase_id`, `phrase`, `english`, `bengali`, `spanish`, `arabic`, `dutch`, `russian`, `chinese`, `turkish`, `portuguese`, `hungarian`, `french`, `greek`, `german`, `italian`, `thai`, `urdu`, `hindi`, `latin`, `indonesian`, `japanese`, `korean`) VALUES
(108, 'name_numeric', 'name numeric', 'সাংখ্যিক নাম দিন', 'nombre numérico', 'تسمية رقمية', 'naam numerieke', 'назвать числовой', '数字命名', 'sayısal isim', 'nome numérico', 'név numerikus', 'nommer numérique', 'όνομα αριθμητικό', 'nennen numerischen', 'nome numerico', 'ชื่อตัวเลข', 'عددی نام', 'सांख्यिक का नाम', 'secundum numerum est secundum nomen,', 'nama numerik', '数値に名前を付ける', '숫자 이름을'),
(109, 'edit_class', 'edit class', 'সম্পাদনা বর্গ', 'clase de edición', 'الطبقة تحرير', 'bewerken klasse', 'править класс', '编辑类', 'sınıf düzenle', 'edição classe', 'szerkesztés osztály', 'modifier la classe', 'edit κατηγορία', 'Klasse bearbeiten', 'modifica della classe', 'แก้ไขระดับ', 'ترمیم کلاس', 'संपादित वर्ग', 'edit genere', 'mengedit kelas', '編集クラス', '편집 클래스'),
(110, 'manage_exam', 'manage exam', 'পরীক্ষা পরিচালনা', 'gestionar examen', 'إدارة الامتحان', 'beheren examen', 'управлять экзамен', '考试管理', 'sınavı yönetmek', 'gerenciar exame', 'kezelni vizsga', 'gérer examen', 'διαχείριση εξετάσεις', 'Prüfung verwalten', 'gestire esame', 'การจัดการสอบ', 'امتحان کا انتظام', 'परीक्षा का प्रबंधन', 'curo ipsum', 'mengelola ujian', '試験を管理', '시험 관리'),
(111, 'exam_list', 'exam list', 'পরীক্ষার তালিকা', 'lista de exámenes', 'قائمة الامتحان', 'examen lijst', 'Список экзамен', '考试名单', 'sınav listesi', 'lista de exames', 'vizsga lista', 'liste d''examen', 'Λίστα εξετάσεις', 'Prüfungsliste', 'elenco esami', 'รายการสอบ', 'امتحان فہرست', 'परीक्षा सूची', 'Lorem ipsum album', 'daftar ujian', '試験のリスト', '시험 목록'),
(112, 'add_exam', 'add exam', 'পরীক্ষার যোগ', 'agregar examen', 'إضافة امتحان', 'voeg examen', 'добавить экзамен', '新增考试', 'sınav eklemek', 'adicionar exame', 'hozzá vizsga', 'ajouter examen', 'προσθέσετε εξετάσεις', 'Prüfung hinzufügen', 'aggiungere esame', 'เพิ่มการสอบ', 'امتحان میں شامل کریں', 'परीक्षा जोड़', 'adde ipsum', 'menambahkan ujian', '試験を追加', '시험에 추가'),
(113, 'exam_name', 'exam name', 'পরীক্ষার নাম', 'nombre del examen', 'اسم الامتحان', 'examen naam', 'Название экзамен', '考试名称', 'sınav adı', 'nome do exame', 'Vizsga neve', 'nom de l''examen', 'Το όνομά εξετάσεις', 'Prüfungsnamen', 'nome dell''esame', 'ชื่อสอบ', 'امتحان کے نام', 'परीक्षा का नाम', 'ipsum nomen,', 'Nama ujian', '試験名', '시험 이름'),
(114, 'date', 'date', 'তারিখ', 'fecha', 'تاريخ', 'datum', 'дата', '日期', 'tarih', 'data', 'dátum', 'date', 'ημερομηνία', 'Datum', 'data', 'วันที่', 'تاریخ', 'तारीख', 'date', 'tanggal', '日付', '날짜'),
(115, 'comment', 'comment', 'মন্তব্য', 'comentario', 'تعليق', 'commentaar', 'комментарий', '评论', 'yorum', 'comentário', 'megjegyzés', 'commentaire', 'σχόλιο', 'Kommentar', 'commento', 'ความเห็น', 'تبصرہ', 'टिप्पणी', 'comment', 'komentar', 'コメント', '논평'),
(116, 'edit_exam', 'edit exam', 'সম্পাদনা পরীক্ষা', 'examen de edición', 'امتحان تحرير', 'bewerk examen', 'править экзамен', '编辑考试', 'edit sınavı', 'edição do exame', 'szerkesztés vizsga', 'modifier examen', 'edit εξετάσεις', 'edit Prüfung', 'modifica esame', 'แก้ไขการสอบ', 'ترمیم امتحان', 'संपादित परीक्षा', 'edit ipsum', 'mengedit ujian', '編集試験', '편집 시험'),
(117, 'manage_exam_marks', 'manage exam marks', 'পরীক্ষা চিহ্ন ও পরিচালনা', 'gestionar marcas de examen', 'إدارة علامات الامتحان', 'beheren examencijfers', 'управлять экзаменационные отметки', '管理考试痕', 'sınav işaretleri yönetmek', 'gerenciar marcas exame', 'kezelni vizsga jelek', 'gérer les marques d''examen', 'διαχείριση των σημάτων εξετάσεις', 'Prüfungsnoten verwalten', 'gestire i voti degli esami', 'จัดการสอบเครื่องหมาย', 'امتحان کے نشانات کا انتظام', 'परीक्षा के निशान का प्रबंधन', 'ipsum curo indicia', 'mengelola nilai ujian', '試験マークを管理', '시험 점수를 관리'),
(118, 'manage_marks', 'manage marks', 'চিহ্ন ও পরিচালনা', 'gestionar marcas', 'إدارة علامات', 'beheren merken', 'управлять знаки', '商标管理', 'işaretleri yönetmek', 'gerenciar marcas', 'kezelni jelek', 'gérer les marques', 'διαχείριση των σημάτων', 'Markierungen verwalten', 'gestire i marchi', 'จัดการเครื่องหมาย', 'نمبروں کا انتظام', 'निशान का प्रबंधन', 'curo indicia', 'mengelola tanda', 'マークを管理', '마크를 관리'),
(119, 'select_exam', 'select exam', 'পরীক্ষার নির্বাচন', 'seleccione examen', 'حدد الامتحان', 'selecteer examen', 'выбрать экзамен', '选择考试', 'sınavı seçin', 'selecionar exame', 'válassza ki a vizsga', 'sélectionnez examen', 'επιλέξτε εξετάσεις', 'Prüfung wählen', 'seleziona esame', 'เลือกสอบ', 'امتحان منتخب کریں', 'परीक्षा का चयन', 'velit ipsum', 'pilih ujian', '受験を選択', '시험을 선택'),
(120, 'select_class', 'select class', 'বর্গ নির্বাচন', 'seleccione clase', 'حدد فئة', 'selecteren klasse', 'выбрать класс', '选择产品类别', 'sınıf seçin', 'selecionar classe', 'válassza osztály', 'sélectionnez classe', 'Επιλέξτε κατηγορία', 'Klasse wählen', 'seleziona classe', 'เลือกชั้น', 'کلاس منتخب کریں', 'वर्ग का चयन करें', 'genus eligere,', 'pilih kelas', 'クラスを選択', '클래스를 선택'),
(121, 'select_subject', 'select subject', 'বিষয় নির্বাচন করুন', 'seleccione tema', 'حدد الموضوع', 'Selecteer onderwerp', 'выберите тему', '选择主题', 'konu seçin', 'selecionar assunto', 'Válassza a Tárgy', 'sélectionner le sujet', 'επιλέξτε θέμα', 'Thema wählen', 'seleziona argomento', 'เลือกเรื่อง', 'موضوع منتخب کریں', 'विषय का चयन', 'eligere subditos', 'pilih subjek', '件名を選択', '주제를 선택'),
(122, 'select_an_exam', 'select an exam', 'একটি পরীক্ষা নির্বাচন', 'seleccione un examen', 'حدد الامتحان', 'selecteer een examen', 'выбрать экзамен', '选择考试', 'Bir sınav seçin', 'selecionar um exame', 'válasszon ki egy vizsga', 'sélectionner un examen', 'επιλέξτε μια εξέταση', 'Wählen Sie eine Prüfung', 'selezionare un esame', 'เลือกสอบ', 'امتحان منتخب کریں', 'एक परीक्षा का चयन', 'Eligebatur autem ipsum', 'pilih ujian', '受験を選択', '시험을 선택'),
(123, 'mark_obtained', 'mark obtained', 'চিহ্নিত প্রাপ্ত', 'calificación obtenida', 'بمناسبة الحصول على', 'markeren verkregen', 'отметить получены', '获得标', 'işaretlemek elde', 'marca obtida', 'jelölje kapott', 'marquer obtenu', 'σήμα που λαμβάνεται', 'Markieren Sie erhalten', 'contrassegnare ottenuto', 'ทำเครื่องหมายที่ได้รับ', 'نشان زد حاصل', 'अंक प्राप्त', 'attende obtinuit', 'menandai diperoleh', 'マークが得', '마크 획득'),
(124, 'attendance', 'attendance', 'উপস্থিতি', 'asistencia', 'الحضور', 'opkomst', 'посещаемость', '护理', 'katılım', 'comparecimento', 'részvétel', 'présence', 'παρουσία', 'Teilnahme', 'partecipazione', 'การดูแลรักษา', 'حاضری', 'उपस्थिति', 'auscultant', 'kehadiran', '出席', '출석'),
(125, 'manage_grade', 'manage grade', 'গ্রেড পরিচালনা', 'gestión de calidad', 'إدارة الصف', 'beheren leerjaar', 'управлять класс', '管理级', 'notu yönetmek', 'gerenciar grau', 'kezelni fokozat', 'gérer de qualité', 'διαχείριση ποιότητας', 'Klasse verwalten', 'gestione grade', 'จัดการเกรด', 'گریڈ کا انتظام', 'ग्रेड का प्रबंधन', 'moderari gradu', 'mengelola kelas', 'グレードを管理', '등급 관리'),
(126, 'grade_list', 'grade list', 'গ্রেড তালিকা', 'Lista de grado', 'قائمة الصف', 'cijferlijst', 'Список класса', '等级列表', 'sınıf listesi', 'lista grau', 'fokozat lista', 'liste de qualité', 'Λίστα βαθμού', 'Notenliste', 'elenco grade', 'รายการเกรด', 'گریڈ فہرست', 'ग्रेड की सूची', 'gradus album', 'daftar kelas', 'グレード一覧', '등급 목록'),
(127, 'add_grade', 'add grade', 'গ্রেড যোগ করুন', 'añadir grado', 'إضافة الصف', 'voeg leerjaar', 'добавить класс', '添加级', 'not eklemek', 'adicionar grau', 'hozzá fokozat', 'ajouter note', 'προσθήκη βαθμού', 'Klasse hinzufügen', 'aggiungere grade', 'เพิ่มเกรด', 'گریڈ میں شامل کریں', 'ग्रेड जोड़', 'adde gradum,', 'menambahkan kelas', 'グレードを追加', '등급을 추가'),
(128, 'grade_name', 'grade name', 'গ্রেড নাম', 'Nombre de grado', 'اسم الصف', 'rangnaam', 'Название сорта', '等级名称', 'sınıf adı', 'nome da classe', 'fokozat név', 'nom de la catégorie', 'Όνομα βαθμού', 'Klasse Name', 'nome del grado', 'ชื่อชั้น', 'گریڈ نام', 'ग्रेड का नाम', 'nomen, gradus,', 'nama kelas', 'グレード名', '등급 이름'),
(129, 'grade_point', 'grade point', 'গ্রেড পয়েন্ট', 'de calificaciones', 'تراكمي', 'rangpunt', 'балл', '成绩', 'not', 'ponto de classe', 'fokozatú pont', 'cumulative', 'βαθμών', 'Noten', 'punto di grado', 'จุดเกรด', 'گریڈ پوائنٹ', 'ग्रेड बिंदु', 'gradus punctum', 'indeks prestasi', '成績評価点', '학점'),
(130, 'mark_from', 'mark from', 'চিহ্ন থেকে', 'marca de', 'علامة من', 'mark uit', 'знак от', '从商标', 'mark dan', 'marca de', 'jelölést', 'marque de', 'σήμα από', 'Marke aus', 'segno da', 'เครื่องหมายจาก', 'نشان سے', 'मार्क से', 'marcam', 'mark dari', 'マークから', '표에서'),
(131, 'mark_upto', 'mark upto', 'পর্যন্ত চিহ্নিত', 'marcar hasta', 'بمناسبة تصل', 'mark tot', 'отметить ДО', '高达标记', 'kadar işaretlemek', 'marcar até', 'jelölje upto', 'marquer jusqu''à', 'σήμα μέχρι', 'Markieren Sie bis zu', 'contrassegnare fino a', 'ทำเครื่องหมายเกิน', 'تک کے موقع', 'तक चिह्नित', 'Genitus est notare', 'menandai upto', '点で最大マーク', '표까지'),
(132, 'edit_grade', 'edit grade', 'সম্পাদনা গ্রেড', 'edit grado', 'تحرير الصف', 'Cijfer bewerken', 'править класса', '编辑等级', 'edit notu', 'edição grau', 'szerkesztés fokozat', 'edit qualité', 'edit βαθμού', 'edit Grad', 'modifica grade', 'แก้ไขเกรด', 'ترمیم گریڈ', 'संपादित ग्रेड', 'edit gradu', 'mengedit kelas', '編集グレード', '편집 등급'),
(133, 'manage_class_routine', 'manage class routine', 'ক্লাসের রুটিন পরিচালনা', 'gestionar rutina de la clase', 'إدارة الطبقة الروتينية', 'beheren klasroutine', 'управлять рутину класса', '管理类常规', 'sınıf rutin yönetmek', 'gerenciar rotina classe', 'kezelni class rutin', 'gérer la routine de classe', 'διαχειρίζονται τάξη ρουτίνα', 'verwalten Klasse Routine', 'gestione classe di routine', 'การจัดการชั้นเรียนตามปกติ', 'کلاس معمول کا انتظام', 'वर्ग दिनचर्या का प्रबंधन', 'uno in genere tractare', 'mengelola rutinitas kelas', 'クラスルーチンを管理', '수준의 일상적인 관리'),
(134, 'class_routine_list', 'class routine list', 'ক্লাসের রুটিন তালিকা', 'clase de lista de rutina', 'قائمة الروتينية الطبقة', 'klasroutine lijst', 'класс рутина список', '班级常规列表', 'sınıf rutin listesi', 'classe de lista de rotina', 'osztály rutin lista', 'classe liste routine', 'κλάση list ρουτίνας', 'Klasse Routine Liste', 'classe lista di routine', 'รายการประจำชั้น', 'کلاس معمول کے مطابق فہرست', 'वर्ग दिनचर्या सूची', 'uno genere album', 'Daftar rutin kelas', 'クラスルーチン一覧', '클래스 루틴 목록'),
(135, 'add_class_routine', 'add class routine', 'ক্লাসের রুটিন যুক্ত', 'añadir rutina de la clase', 'إضافة فئة الروتينية', 'voeg klasroutine', 'добавить подпрограмму класса', '添加类常规', 'sınıf rutin eklemek', 'adicionar rotina classe', 'hozzá class rutin', 'ajouter routine de classe', 'προσθέσετε τάξη ρουτίνα', 'Klasse hinzufügen Routine', 'aggiungere classe di routine', 'เพิ่มระดับตามปกติ', 'کلاس معمول میں شامل کریں', 'वर्ग दिनचर्या जोड़', 'adde genus moris', 'menambahkan rutin kelas', 'クラス·ルーチンを追加', '클래스 루틴을 추가'),
(136, 'day', 'day', 'দিন', 'día', 'يوم', 'dag', 'день', '日', 'gün', 'dia', 'nap', 'jour', 'ημέρα', 'Tag', 'giorno', 'วัน', 'دن', 'दिन', 'die,', 'hari', '日', '일'),
(137, 'starting_time', 'starting time', 'সময়ের শুরু', 'tiempo de inicio', 'بدءا الوقت', 'starttijd', 'время начала', '开始时间', 'başlangıç zamanı', 'tempo começando', 'indítási idő', 'temps de démarrage', 'ώρα έναρξης', 'Startzeit', 'tempo di avviamento', 'เวลาเริ่มต้น', 'وقت شروع ہونے', 'समय की शुरुआत के', 'tum satus', 'waktu mulai', '起動時間', '시작 시간'),
(138, 'ending_time', 'ending time', 'সময় শেষ', 'hora de finalización', 'تنتهي الساعة', 'eindtijd', 'время окончания', '结束时间', 'bitiş zamanını', 'tempo final', 'befejezési időpont', 'heure de fin', 'ώρα λήξης', 'Endzeit', 'ora finale', 'สิ้นสุดเวลา', 'وقت ختم', 'समय समाप्त होने के', 'et finis temporis,', 'akhir waktu', '終了時刻', '종료 시간'),
(139, 'edit_class_routine', 'edit class routine', 'সম্পাদনা ক্লাস রুটিন', 'rutina de la clase de edición', 'الطبقة تحرير الروتينية', 'bewerk klasroutine', 'Процедура редактирования класс', '编辑类常规', 'sınıf düzenle rutin', 'rotina de edição de classe', 'szerkesztés osztály rutin', 'routine modifier de classe', 'edit τάξη ρουτίνα', 'edit Klasse Routine', 'modifica della classe di routine', 'แก้ไขชั้นเรียนตามปกติ', 'ترمیم کلاس معمول', 'संपादित वर्ग दिनचर्या', 'edit uno genere', 'rutin mengedit kelas', '編集クラスのルーチン', '편집 클래스 루틴'),
(140, 'manage_invoice/payment', 'manage invoice/payment', 'চালান / পেমেন্ট পরিচালনা', 'gestionar factura / pago', 'إدارة فاتورة / دفع', 'beheren factuur / betaling', 'управлять счета / оплата', '管理发票/付款', 'fatura / ödeme yönetmek', 'gerenciar fatura / pagamento', 'kezelni számla / fizetési', 'gérer facture / paiement', 'διαχείριση τιμολογίου / πληρωμής', 'Verwaltung Rechnung / Zahlung', 'gestione fattura / pagamento', 'จัดการใบแจ้งหนี้ / การชำระเงิน', 'انوائس / ادائیگی کا انتظام', 'चालान / भुगतान का प्रबंधन', 'curo cautionem / solutionem', 'mengelola tagihan / pembayaran', '請求書/支払管理', '인보이스 / 결제 관리'),
(141, 'invoice/payment_list', 'invoice/payment list', 'চালান / পেমেন্ট তালিকা', 'lista de facturas / pagos', 'قائمة فاتورة / دفع', 'factuur / betaling lijst', 'Список счета / оплата', '发票/付款清单', 'fatura / ödeme listesi', 'lista de fatura / pagamento', 'számla / fizetési lista', 'liste facture / paiement', 'Λίστα τιμολογίου / πληρωμής', 'Rechnung / Zahlungsliste', 'elenco fattura / pagamento', 'รายการใบแจ้งหนี้ / การชำระเงิน', 'انوائس / ادائیگی کی فہرست', 'चालान / भुगतान सूची', 'cautionem / list pretium', 'daftar tagihan / pembayaran', '請求書/支払一覧', '인보이스 / 결제리스트'),
(142, 'add_invoice/payment', 'add invoice/payment', 'চালান / পেমেন্ট যোগ', 'añadir factura / pago', 'إضافة فاتورة / دفع', 'voeg factuur / betaling', 'добавить счета / оплата', '添加发票/付款', 'fatura / ödeme eklemek', 'adicionar factura / pagamento', 'hozzá számla / fizetési', 'ajouter facture / paiement', 'προσθήκη τιμολογίου / πληρωμής', 'hinzufügen Rechnung / Zahlung', 'aggiungere fatturazione / pagamento', 'เพิ่มใบแจ้งหนี้ / การชำระเงิน', 'انوائس / ادائیگی شامل', 'चालान / भुगतान जोड़ें', 'add cautionem / solutionem', 'menambahkan tagihan / pembayaran', '請求書/支払を追加', '송장 / 지불을 추가'),
(143, 'title', 'title', 'খেতাব', 'título', 'لقب', 'titel', 'название', '标题', 'başlık', 'título', 'cím', 'titre', 'τίτλος', 'Titel', 'titolo', 'ชื่อเรื่อง', 'عنوان', 'शीर्षक', 'title', 'judul', 'タイトル', '표제'),
(144, 'description', 'description', 'বিবরণ', 'descripción', 'وصف', 'beschrijving', 'описание', '描述', 'tanım', 'descrição', 'leírás', 'description', 'περιγραφή', 'Beschreibung', 'descrizione', 'ลักษณะ', 'تفصیل', 'विवरण', 'description', 'deskripsi', '説明', '기술'),
(145, 'amount', 'amount', 'পরিমাণ', 'cantidad', 'مبلغ', 'bedrag', 'количество', '量', 'miktar', 'quantidade', 'mennyiség', 'montant', 'ποσό', 'Menge', 'importo', 'จำนวน', 'رقم', 'राशि', 'tantum', 'jumlah', '額', '양'),
(146, 'status', 'status', 'অবস্থা', 'estado', 'حالة', 'toestand', 'статус', '状态', 'durum', 'estado', 'állapot', 'statut', 'κατάσταση', 'Status', 'stato', 'สถานะ', 'درجہ', 'हैसियत', 'status', 'status', 'ステータス', '지위'),
(147, 'view_invoice', 'view invoice', 'দেখুন চালান', 'vista de la factura', 'عرض الفاتورة', 'view factuur', 'вид счета-фактуры', '查看发票', 'view fatura', 'vista da fatura', 'view számla', 'vue facture', 'προβολή τιμολόγιο', 'Ansicht Rechnung', 'vista fattura', 'ดูใบแจ้งหนี้', 'دیکھیں انوائس', 'देखें चालान', 'propter cautionem', 'lihat faktur', 'ビュー請求書', '보기 송장'),
(148, 'paid', 'paid', 'পরিশোধ', 'pagado', 'مدفوع', 'betaald', 'оплаченный', '支付', 'ücretli', 'pago', 'fizetett', 'payé', 'καταβληθεί', 'bezahlt', 'pagato', 'ต้องจ่าย', 'ادا کیا', 'प्रदत्त', 'solutis', 'dibayar', '支払われた', '지급'),
(149, 'unpaid', 'unpaid', 'অবৈতনিক', 'no pagado', 'غير مدفوع', 'onbetaald', 'неоплаченный', '未付', 'ödenmemiş', 'não remunerado', 'kifizetetlen', 'non rémunéré', 'απλήρωτη', 'unbezahlt', 'non pagato', 'ยังไม่ได้ชำระ', 'بلا معاوضہ', 'अवैतनिक', 'non est constitutus,', 'dibayar', '未払い', '지불하지 않은'),
(150, 'add_invoice', 'add invoice', 'চালান যোগ', 'añadir factura', 'إضافة الفاتورة', 'voeg factuur', 'добавить счет', '添加发票', 'faturayı eklemek', 'adicionar fatura', 'hozzá számla', 'ajouter facture', 'προσθέστε τιμολόγιο', 'Rechnung hinzufügen', 'aggiungere fattura', 'เพิ่มใบแจ้งหนี้', 'انوائس میں شامل', 'चालान जोड़', 'add cautionem', 'menambahkan faktur', '請求書を追加', '송장을 추가'),
(151, 'payment_to', 'payment to', 'পেমেন্ট', 'pago a', 'دفع ل', 'betaling aan', 'оплата', '支付', 'için ödeme', 'pagamento', 'fizetés', 'paiement', 'πληρωμή', 'Zahlung an', 'pagamento', 'ชำระเงินให้กับ', 'ادائیگی', 'को भुगतान', 'pecunia', 'pembayaran kepada', 'への支払い', '에 지불'),
(152, 'bill_to', 'bill to', 'বিল', 'proyecto de ley para', 'مشروع قانون ل', 'wetsvoorstel om', 'Законопроект о', '法案', 'bill', 'projeto de lei para', 'törvényjavaslat', 'projet de loi', 'νομοσχέδιο για την', 'Gesetzentwurf zur', 'disegno di legge per', 'บิล', 'بل', 'बिल के लिए', 'latumque', 'RUU untuk', '請求する', '법안'),
(153, 'invoice_title', 'invoice title', 'চালান শিরোনাম', 'Título de la factura', 'عنوان الفاتورة', 'factuur titel', 'Название счета', '发票抬头', 'fatura başlık', 'título fatura', 'számla cím', 'titre de la facture', 'Τίτλος τιμολόγιο', 'Rechnungs Titel', 'title fattura', 'ชื่อใบแจ้งหนี้', 'انوائس عنوان', 'चालान शीर्षक', 'title cautionem', 'judul faktur', '請求書のタイトル', '송장 제목'),
(154, 'invoice_id', 'invoice id', 'চালান আইডি', 'Identificación de la factura', 'فاتورة معرف', 'factuur id', 'счет-фактура ID', '发票编号', 'fatura id', 'id fatura', 'számla id', 'Identifiant facture', 'id τιμολόγιο', 'Rechnung-ID', 'fattura id', 'ใบแจ้งหนี้หมายเลข', 'انوائس ID', 'चालान आईडी', 'id cautionem', 'faktur id', '請求書ID', '송장 ID'),
(155, 'edit_invoice', 'edit invoice', 'সম্পাদনা চালান', 'edit factura', 'تحرير الفاتورة', 'bewerk factuur', 'редактирования счета-фактуры', '编辑发票', 'edit fatura', 'edição fatura', 'szerkesztés számla', 'modifier la facture', 'edit τιμολόγιο', 'edit Rechnung', 'modifica fattura', 'แก้ไขใบแจ้งหนี้', 'ترمیم انوائس', 'संपादित चालान', 'edit cautionem', 'mengedit faktur', '編集送り状', '편집 송장'),
(156, 'manage_library_books', 'manage library books', 'লাইব্রেরির বই ও পরিচালনা', 'gestionar libros de la biblioteca', 'إدارة مكتبة الكتب', 'beheren bibliotheekboeken', 'управлять библиотечные книги', '管理图书', 'kitapları kütüphane yönetmek', 'gerenciar os livros da biblioteca', 'kezelni könyvtári könyvek', 'gérer des livres de bibliothèque', 'διαχειριστείτε τα βιβλία της βιβλιοθήκης', 'Bücher aus der Bibliothek verwalten', 'gestire i libri della biblioteca', 'จัดการหนังสือห้องสมุด', 'کتب خانے کی کتابیں منظم', 'पुस्तकालय की पुस्तकों का प्रबंधन', 'curo bibliotheca librorum,', 'mengelola buku perpustakaan', '図書館の本を管理', '도서관 책 관리'),
(157, 'book_list', 'book list', 'পাঠ্যতালিকা', 'lista de libros', 'قائمة الكتب', 'boekenlijst', 'Список книг', '书单', 'kitap listesi', 'lista de livros', 'book lista', 'liste de livres', 'λίστα βιβλίων', 'Buchliste', 'elenco libri', 'รายการหนังสือ', 'کتاب کی فہرست', 'पुस्तक सूची', 'album', 'daftar buku', 'ブックリスト', '도서 목록'),
(158, 'add_book', 'add book', 'বই যোগ', 'Añadir libro', 'إضافة كتاب', 'boek toevoegen', 'добавить книгу', '加入书', 'kitap eklemek', 'adicionar livro', 'Könyv hozzáadása', 'ajouter livre', 'προσθέστε το βιβλίο', 'Buch hinzufügen', 'aggiungere il libro', 'เพิ่มหนังสือ', 'کتاب شامل', 'पुस्तक जोड़', 'adde libri', 'menambahkan buku', '本を追加', '책을 추가'),
(159, 'book_name', 'book name', 'বইয়ের নাম', 'Nombre del libro', 'اسم الكتاب', 'boeknaam', 'Название книги', '书名', 'kitap adı', 'nome livro', 'book név', 'nom de livre', 'το όνομα του βιβλίου', 'Buchnamen', 'nome del libro', 'ชื่อหนังสือ', 'کتاب کا نام', 'किताब का नाम', 'librum nomine', 'nama buku', 'ブック名', '책 이름'),
(160, 'author', 'author', 'লেখক', 'autor', 'الكاتب', 'auteur', 'автор', '作者', 'yazar', 'autor', 'szerző', 'auteur', 'συγγραφέας', 'Autor', 'autore', 'ผู้เขียน', 'مصنف', 'लेखक', 'auctor', 'penulis', '著者', '저자'),
(161, 'price', 'price', 'দাম', 'precio', 'السعر', 'prijs', 'цена', '价格', 'fiyat', 'preço', 'ár', 'prix', 'τιμή', 'Preis', 'prezzo', 'ราคา', 'قیمت', 'कीमत', 'price', 'harga', '価格', '가격'),
(162, 'available', 'available', 'উপলব্ধ', 'disponible', 'متاح', 'beschikbaar', 'доступный', '可用的', 'mevcut', 'disponível', 'rendelkezésre álló', 'disponible', 'διαθέσιμος', 'verfügbar', 'disponibile', 'สามารถใช้ได้', 'دستیاب', 'उपलब्ध', 'available', 'tersedia', '利用できる', '유효한'),
(163, 'unavailable', 'unavailable', 'অপ্রাপ্য', 'indisponible', 'غير متاح', 'niet beschikbaar', 'недоступен', '不可用', 'yok', 'indisponível', 'érhető el', 'indisponible', 'διαθέσιμο', 'nicht verfügbar', 'non disponibile', 'ไม่มี', 'دستیاب نہیں', 'अनुपलब्ध', 'unavailable', 'tidak tersedia', '利用できない', '없는'),
(164, 'edit_book', 'edit book', 'সম্পাদনা বই', 'libro de edición', 'كتاب تحرير', 'bewerk boek', 'править книга', '编辑本书', 'edit kitap', 'edição do livro', 'edit könyv', 'edit livre', 'επεξεργαστείτε το βιβλίο', 'edit Buch', 'modifica book', 'แก้ไขหนังสือ', 'ترمیم کتاب', 'संपादित पुस्तक', 'edit Liber', 'mengedit buku', '編集の本', '편집 책'),
(165, 'manage_transport', 'manage transport', 'পরিবহন ও পরিচালনা', 'gestionar el transporte', 'إدارة النقل', 'beheren van vervoerssystemen', 'управлять транспортом', '运输管理', 'ulaşım yönetmek', 'gerenciar o transporte', 'kezelni a közlekedés', 'la gestion du transport', 'διαχείριση των μεταφορών', 'Transport verwalten', 'gestire i trasporti', 'การจัดการการขนส่ง', 'نقل و حمل کے انتظام', 'परिवहन का प्रबंधन', 'curo onerariis', 'mengelola transportasi', '輸送を管理', '교통 관리'),
(166, 'transport_list', 'transport list', 'পরিবহন তালিকা', 'Lista de transportes', 'قائمة النقل', 'lijst vervoer', 'лист транспорт', '运输名单', 'taşıma listesi', 'Lista de transportes', 'szállítás lista', 'liste de transport', 'Λίστα των μεταφορών', 'Transportliste', 'elenco trasporti', 'รายการการขนส่ง', 'نقل و حمل کی فہرست', 'परिवहन सूची', 'turpis album', 'daftar transport', '輸送一覧', '전송 목록'),
(167, 'add_transport', 'add transport', 'পরিবহন যোগ করুন', 'añadir el transporte', 'إضافة النقل', 'voeg vervoer', 'добавить транспорт', '加上运输', 'taşıma ekle', 'adicionar transporte', 'hozzá a közlekedés', 'ajouter transports', 'προσθέστε μεταφορών', 'add-Transport', 'aggiungere il trasporto', 'เพิ่มการขนส่ง', 'نقل و حمل شامل', 'परिवहन जोड़', 'adde onerariis', 'tambahkan transportasi', 'トランスポートを追加', '전송을 추가'),
(168, 'route_name', 'route name', 'রুট নাম', 'nombre de la ruta', 'اسم توجيه', 'naam van de route', 'Имя маршрут', '路由名称', 'rota ismi', 'nome da rota', 'útvonal nevét', 'nom de la route', 'Όνομα διαδρομής', 'Routennamen', 'nome del percorso', 'ชื่อเส้นทาง', 'راستے نام', 'मार्ग का नाम', 'iter nomine', 'Nama rute', 'ルートの名前', '경로 이름'),
(169, 'number_of_vehicle', 'number of vehicle', 'গাড়ীর সংখ্যা', 'número de vehículo', 'عدد من المركبات', 'aantal voertuigkilometers', 'количество автомобиля', '车辆的数量', 'Aracın sayısı', 'número de veículo', 'számú gépjármű', 'nombre de véhicules', 'αριθμός των οχημάτων', 'Anzahl der Fahrzeug', 'numero di veicolo', 'จำนวนของยานพาหนะ', 'گاڑی کی تعداد', 'वाहन की संख्या', 'de numero scilicet vehiculum', 'jumlah kendaraan', '車両の数', '차량의 수'),
(170, 'route_fare', 'route fare', 'রুট করবেন', 'ruta hacer', 'المسار تفعل', 'route doen', 'маршрут делать', '路线做', 'yol yapmak', 'rota fazer', 'útvonal do', 'itinéraire faire', 'διαδρομή κάνει', 'Route zu tun', 'r', 'เส้นทางทำ', 'راستے کرتے', 'मार्ग करना', 'iter faciunt,', 'rute lakukan', 'ルートか', '경로는 할'),
(171, 'edit_transport', 'edit transport', 'সম্পাদনা পরিবহন', 'transporte de edición', 'النقل تحرير', 'vervoer bewerken', 'править транспорт', '编辑运输', 'edit ulaşım', 'edição transporte', 'szerkesztés szállítás', 'transport modifier', 'edit μεταφορών', 'edit Transport', 'modifica dei trasporti', 'แก้ไขการขนส่ง', 'ترمیم نقل و حمل', 'संपादित परिवहन', 'edit onerariis', 'mengedit transportasi', '編集輸送', '편집 전송'),
(172, 'manage_dormitory', 'manage dormitory', 'আস্তানা ও পরিচালনা', 'gestionar dormitorio', 'إدارة مهجع', 'beheren slaapzaal', 'управлять общежитие', '宿舍管理', 'yurt yönetmek', 'gerenciar dormitório', 'kezelni kollégiumi', 'gérer dortoir', 'διαχείριση κοιτώνα', 'Schlafsaal verwalten', 'gestione dormitorio', 'จัดการหอพัก', 'شیناگار کا انتظام', 'छात्रावास का प्रबंधन', 'curo dormitorio', 'mengelola asrama', '寮を管理', '기숙사를 관리'),
(173, 'dormitory_list', 'dormitory list', 'আস্তানা তালিকা', 'lista dormitorio', 'قائمة مهجع', 'slaapzaal lijst', 'Список общежитие', '宿舍名单', 'yurt listesi', 'lista dormitório', 'kollégiumi lista', 'liste de dortoir', 'Λίστα κοιτώνα', 'Schlafsaal Liste', 'elenco dormitorio', 'รายชื่อหอพัก', 'شیناگار فہرست', 'छात्रावास सूची', 'dormitorium album', 'daftar asrama', '寮のリスト', '기숙사 목록'),
(174, 'add_dormitory', 'add dormitory', 'আস্তানা যোগ', 'añadir dormitorio', 'إضافة مهجع', 'voeg slaapzaal', 'добавить общежитие', '添加宿舍', 'yurt ekle', 'adicionar dormitório', 'hozzá kollégiumi', 'ajouter dortoir', 'προσθήκη κοιτώνα', 'Schlaf hinzufügen', 'aggiungere dormitorio', 'เพิ่มหอพัก', 'شیناگار شامل', 'छात्रावास जोड़', 'adde dormitorio', 'menambahkan asrama', '寮を追加', '기숙사를 추가'),
(175, 'dormitory_name', 'dormitory name', 'আস্তানা নাম', 'Nombre del dormitorio', 'اسم المهجع', 'slaapzaal naam', 'Имя общежитие', '宿舍名', 'yurt adı', 'nome dormitório', 'kollégiumi név', 'nom de dortoir', 'Όνομα κοιτώνα', 'Schlaf Namen', 'Nome dormitorio', 'ชื่อหอพัก', 'شیناگار نام', 'छात्रावास नाम', 'dormitorium nomine', 'Nama asrama', '寮名', '기숙사 이름'),
(176, 'number_of_room', 'number of room', 'ঘরের সংখ্যা', 'número de habitación', 'عدد الغرف', 'aantal kamer', 'число комнате', '房间数量', 'oda sayısı', 'número de quarto', 'száma szobában', 'nombre de salle', 'τον αριθμό των δωματίων', 'Anzahl der Zimmer', 'numero delle camera', 'จำนวนห้องพัก', 'کمرے کی تعداد', 'कमरे की संख्या', 'numerus locus', 'Jumlah kamar', 'お部屋数', '객실 수'),
(177, 'manage_noticeboard', 'manage noticeboard', 'নোটিশবোর্ড পরিচালনা', 'gestionar tablón de anuncios', 'إدارة اللافتة', 'beheren prikbord', 'управлять доске объявлений', '管理布告', 'Noticeboard yönetmek', 'gerenciar avisos', 'kezelni üzenőfalán', 'gérer panneau d''affichage', 'διαχείριση ανακοινώσεων', 'Brett verwalten', 'gestione bacheca', 'จัดการป้ายประกาศ', 'noticeboard کا انتظام', 'Noticeboard का प्रबंधन', 'curo noticeboard', 'mengelola pengumuman', '伝言板を管理', '의 noticeboard 관리'),
(178, 'noticeboard_list', 'noticeboard list', 'নোটিশবোর্ড তালিকা', 'tablón de anuncios de la lista', 'قائمة اللافتة', 'prikbord lijst', 'Список доска для объявлений', '布告名单', 'noticeboard listesi', 'lista de avisos', 'üzenőfalán lista', 'liste de panneau d''affichage', 'λίστα ανακοινώσεων', 'Brett-Liste', 'elenco bacheca', 'รายการป้ายประกาศ', 'noticeboard فہرست', 'Noticeboard सूची', 'noticeboard album', 'daftar pengumuman', '伝言板一覧', '의 noticeboard 목록'),
(179, 'add_noticeboard', 'add noticeboard', 'নোটিশবোর্ড যোগ', 'añadir tablón de anuncios', 'إضافة اللافتة', 'voeg prikbord', 'добавить доске объявлений', '添加布告', 'Noticeboard ekle', 'adicionar avisos', 'hozzá üzenőfalán', 'ajouter panneau d''affichage', 'προσθήκη ανακοινώσεων', 'Brett hinzufügen', 'aggiungere bacheca', 'เพิ่มป้ายประกาศ', 'noticeboard شامل', 'Noticeboard जोड़', 'adde noticeboard', 'menambahkan pengumuman', '伝言板を追加', '의 noticeboard 추가'),
(180, 'notice', 'notice', 'বিজ্ঞপ্তি', 'aviso', 'إشعار', 'kennisgeving', 'уведомление', '通知', 'uyarı', 'aviso', 'értesítés', 'délai', 'ειδοποίηση', 'Bekanntmachung', 'avviso', 'แจ้งให้ทราบ', 'نوٹس', 'नोटिस', 'Observa', 'pemberitahuan', '予告', '통지'),
(181, 'add_notice', 'add notice', 'নোটিশ যোগ করুন', 'añadir aviso', 'إضافة إشعار', 'voeg bericht', 'добавить уведомление', '添加通知', 'haber ekle', 'adicionar aviso', 'hozzá értesítés', 'ajouter un avis', 'προσθέστε ανακοίνωση', 'Hinweis hinzufügen', 'aggiungere preavviso', 'เพิ่มแจ้งให้ทราบล่วงหน้า', 'نوٹس کا اضافہ کریں', 'नोटिस जोड़', 'addunt et titulum', 'tambahkan pemberitahuan', '通知を追加', '통지를 추가'),
(182, 'edit_noticeboard', 'edit noticeboard', 'সম্পাদনা নোটিশবোর্ড', 'edit tablón de anuncios', 'تحرير اللافتة', 'bewerk prikbord', 'править доска для объявлений', '编辑布告', 'edit noticeboard', 'edição de avisos', 'szerkesztés üzenőfalán', 'modifier panneau d''affichage', 'edit ανακοινώσεων', 'Brett bearbeiten', 'modifica bacheca', 'แก้ไขป้ายประกาศ', 'میں ترمیم کریں noticeboard', 'संपादित Noticeboard', 'edit noticeboard', 'mengedit pengumuman', '編集伝言板', '편집의 noticeboard'),
(183, 'system_name', 'system name', 'সিস্টেমের নাম', 'Nombre del sistema', 'اسم النظام', 'Name System', 'Имя системы', '系统名称', 'sistemi adı', 'nome do sistema', 'rendszer neve', 'nom du système', 'όνομα του συστήματος', 'Systemnamen', 'nome del sistema', 'ชื่อระบบ', 'نظام کا نام', 'सिस्टम नाम', 'ratio nominis', 'Nama sistem', 'システム名', '시스템 이름'),
(184, 'save', 'save', 'রক্ষা', 'guardar', 'حفظ', 'besparen', 'экономить', '节省', 'kurtarmak', 'salvar', 'kivéve', 'sauver', 'εκτός', 'sparen', 'salvare', 'ประหยัด', 'کو بچانے کے', 'बचाना', 'salvum', 'menyimpan', '保存', '저장'),
(185, 'system_title', 'system title', 'সিস্টেম শিরোনাম', 'Título de sistema', 'عنوان النظام', 'systeem titel', 'Название системы', '系统标题', 'Sistem başlık', 'título sistema', 'rendszer cím', 'titre du système', 'Τίτλος του συστήματος', 'System-Titel', 'titolo di sistema', 'ชื่อระบบ', 'نظام عنوان', 'सिस्टम शीर्षक', 'ratio title', 'title sistem', 'システムのタイトル', '시스템 제목'),
(186, 'paypal_email', 'paypal email', 'PayPal ইমেইল', 'paypal email', 'باي بال البريد الإلكتروني', 'paypal e-mail', 'PayPal по электронной почте', 'PayPal电子邮件', 'paypal e-posta', 'paypal e-mail', 'paypal email', 'paypal email', 'paypal ηλεκτρονικό ταχυδρομείο', 'paypal E-Mail', 'paypal-mail', 'paypal อีเมล์', 'پے پال ای میل', 'पेपैल ईमेल', 'Paypal email', 'email paypal', 'Paypalのメール', '페이팔 이메일'),
(187, 'currency', 'currency', 'মুদ্রা', 'moneda', 'عملة', 'valuta', 'валюта', '货币', 'para', 'moeda', 'valuta', 'monnaie', 'νόμισμα', 'Währung', 'valuta', 'เงินตรา', 'کرنسی', 'मुद्रा', 'currency', 'mata uang', '通貨', '통화'),
(188, 'phrase_list', 'phrase list', 'ফ্রেজ তালিকা', 'lista de frases', 'قائمة جملة', 'zinnenlijst', 'Список фраза', '短语列表', 'ifade listesi', 'lista de frases', 'kifejezés lista', 'liste de phrase', 'Λίστα φράση', 'Phrasenliste', 'elenco frasi', 'รายการวลี', 'جملہ فہرست', 'वाक्यांश सूची', 'dicitur album', 'Daftar frase', 'フレーズリスト', '문구 목록'),
(189, 'add_phrase', 'add phrase', 'শব্দগুচ্ছ যুক্ত', 'añadir la frase', 'إضافة عبارة', 'voeg zin', 'добавить фразу', '添加词组', 'ifade eklemek', 'adicionar frase', 'adjunk kifejezést', 'ajouter la phrase', 'προσθέστε φράση', 'Begriff hinzufügen', 'aggiungere la frase', 'เพิ่มวลี', 'جملہ شامل', 'वाक्यांश जोड़ना', 'addere phrase', 'menambahkan frase', 'フレーズを追加', '문구를 추가'),
(190, 'add_language', 'add language', 'ভাষা যুক্ত', 'añadir idioma', 'إضافة لغة', 'add taal', 'добавить язык', '新增语言', 'dil ekle', 'adicionar língua', 'nyelv hozzáadása', 'ajouter la langue', 'προσθέστε γλώσσα', 'Sprache hinzufügen', 'aggiungere la lingua', 'เพิ่มภาษา', 'زبان کو شامل', 'भाषा जोड़ना', 'addere verbis', 'menambahkan bahasa', '言語を追加', '언어를 추가'),
(191, 'phrase', 'phrase', 'বাক্য', 'frase', 'العبارة', 'frase', 'фраза', '短语', 'ifade', 'frase', 'kifejezés', 'phrase', 'φράση', 'Ausdruck', 'frase', 'วลี', 'جملہ', 'वाक्यांश', 'phrase', 'frasa', 'フレーズ', '구'),
(192, 'manage_backup_restore', 'manage backup restore', 'ব্যাকআপ পুনঃস্থাপন ও পরিচালনা', 'gestionar copias de seguridad a restaurar', 'إدارة استعادة النسخ الاحتياطي', 'beheer van back-up herstellen', 'управлять восстановить резервного копирования', '管理备份恢复', 'yedekleme geri yönetmek', 'gerenciar o backup de restauração', 'kezelni a biztonsági mentés visszaállítása', 'gérer de restauration de sauvegarde', 'διαχείριση επαναφοράς αντιγράφων ασφαλείας', 'verwalten Backup wiederherstellen', 'gestire il ripristino di backup', 'จัดการการสำรองข้อมูลเรียกคืน', 'بیک اپ بحال انتظام', 'बैकअप बहाल का प्रबंधन', 'curo tergum restituunt', 'mengelola backup restore', 'バックアップ、リストアを管理', '백업 복원 관리'),
(193, 'restore', 'restore', 'প্রত্যর্পণ করা', 'restaurar', 'استعادة', 'herstellen', 'восстановление', '恢复', 'geri', 'restaurar', 'visszaad', 'restaurer', 'επαναφέρετε', 'wiederherstellen', 'ripristinare', 'ฟื้นฟู', 'بحال', 'बहाल', 'reddite', 'mengembalikan', '復元する', '복원'),
(194, 'mark', 'mark', 'ছাপ', 'marca', 'علامة', 'mark', 'знак', '标志', 'işaret', 'marca', 'jel', 'marque', 'σημάδι', 'Marke', 'marchio', 'เครื่องหมาย', 'نشان', 'निशान', 'Marcus', 'tanda', 'マーク', '표'),
(195, 'grade', 'grade', 'গ্রেড', 'grado', 'درجة', 'graad', 'класс', '等级', 'sınıf', 'grau', 'fokozat', 'grade', 'βαθμός', 'Klasse', 'grado', 'เกรด', 'گریڈ', 'ग्रेड', 'gradus,', 'kelas', 'グレード', '학년'),
(196, 'invoice', 'invoice', 'চালান', 'factura', 'فاتورة', 'factuur', 'счет-фактура', '发票', 'fatura', 'fatura', 'számla', 'facture', 'τιμολόγιο', 'Rechnung', 'fattura', 'ใบกำกับสินค้า', 'انوائس', 'बीजक', 'cautionem', 'faktur', 'インボイス', '송장'),
(197, 'book', 'book', 'বই', 'libro', 'كتاب', 'boek', 'книга', '书', 'kitap', 'livro', 'könyv', 'livre', 'βιβλίο', 'Buch', 'libro', 'หนังสือ', 'کتاب', 'किताब', 'Liber', 'buku', '本', '책'),
(198, 'all', 'all', 'সব', 'todo', 'كل', 'alle', 'все', '所有', 'tüm', 'tudo', 'minden', 'tout', 'όλα', 'alle', 'tutto', 'ทั้งหมด', 'تمام', 'सब', 'omnes', 'semua', 'すべて', '모든'),
(199, 'upload_&_restore_from_backup', 'upload & restore from backup', 'আপলোড & ব্যাকআপ থেকে পুনঃস্থাপন', 'cargar y restaurar copia de seguridad', 'تحميل واستعادة من النسخة الاحتياطية', 'uploaden en terugzetten van een backup', 'загрузить и восстановить из резервной копии', '上传及从备份中恢复', 'yükleyebilir ve yedekten geri yükleme', 'fazer upload e restauração de backup', 'feltölteni és visszaállítani backup', 'télécharger et restauration de la sauvegarde', 'ανεβάσετε και επαναφορά από backup', 'Upload & Wiederherstellung von Backups', 'caricare e ripristinare dal backup', 'อัปโหลดและเรียกคืนจากการสำรองข้อมูล', 'اپ لوڈ کریں اور بیک اپ سے بحال', 'अपलोड और बैकअप से बहाल', 'restituo ex tergum upload,', 'meng-upload & restore dari backup', 'アップロード&バックアップから復元', '업로드 및 백업에서 복원'),
(200, 'manage_profile', 'manage profile', 'প্রফাইলটি পরিচালনা', 'gestionar el perfil', 'إدارة الملف الشخصي', 'te beheren!', 'управлять профилем', '管理配置文件', 'profilini yönetmek', 'gerenciar o perfil', 'Profil kezelése', 'gérer le profil', 'διαχειριστείτε το προφίλ', 'Profil verwalten', 'gestire il profilo', 'จัดการรายละเอียด', 'پروفائل کا نظم کریں', 'प्रोफाइल का प्रबंधन', 'curo profile', 'mengelola profil', 'プロファイル(個人情報)の管理', '프로필 (내 정보) 관리'),
(201, 'update_profile', 'update profile', 'প্রোফাইল আপডেট', 'actualizar el perfil', 'تحديث الملف الشخصي', 'Profiel bijwerken', 'обновить профиль', '更新个人资料', 'profilinizi güncelleyin', 'atualizar o perfil', 'frissíteni profil', 'mettre à jour le profil', 'ενημερώσετε το προφίλ', 'Profil aktualisieren', 'aggiornare il profilo', 'อัปเดตโปรไฟล์', 'پروفائل کو اپ ڈیٹ', 'प्रोफ़ाइल अपडेट', 'magna eget ipsum', 'memperbarui profil', 'プロファイルを更新', '프로필을 업데이트'),
(202, 'new_password', 'new password', 'নতুন পাসওয়ার্ড', 'nueva contraseña', 'كلمة مرور جديدة', 'nieuw wachtwoord', 'новый пароль', '新密码', 'Yeni şifre', 'nova senha', 'Új jelszó', 'nouveau mot de passe', 'νέο κωδικό', 'Neues Passwort', 'nuova password', 'รหัสผ่านใหม่', 'نیا پاس ورڈ', 'नया पासवर्ड', 'novum password', 'kata sandi baru', '新しいパスワード', '새 암호'),
(203, 'confirm_new_password', 'confirm new password', 'নতুন পাসওয়ার্ড নিশ্চিত করুন', 'confirmar nueva contraseña', 'تأكيد كلمة المرور الجديدة', 'Bevestig nieuw wachtwoord', 'подтвердить новый пароль', '确认新密码', 'yeni parolayı onaylayın', 'confirmar nova senha', 'erősítse meg az új jelszót', 'confirmer le nouveau mot de passe', 'επιβεβαιώσετε το νέο κωδικό', 'Bestätigen eines neuen Kennwortes', 'conferma la nuova password', 'ยืนยันรหัสผ่านใหม่', 'نئے پاس ورڈ کی توثیق', 'नए पासवर्ड की पुष्टि', 'confirma novum password', 'konfirmasi password baru', '新しいパスワードを確認', '새 암호를 확인합니다');
INSERT INTO `language` (`phrase_id`, `phrase`, `english`, `bengali`, `spanish`, `arabic`, `dutch`, `russian`, `chinese`, `turkish`, `portuguese`, `hungarian`, `french`, `greek`, `german`, `italian`, `thai`, `urdu`, `hindi`, `latin`, `indonesian`, `japanese`, `korean`) VALUES
(204, 'update_password', 'update password', 'পাসওয়ার্ড আপডেট', 'actualizar la contraseña', 'تحديث كلمة السر', 'updaten wachtwoord', 'обновить пароль', '更新密码', 'Parolanızı güncellemek', 'atualizar senha', 'frissíti jelszó', 'mettre à jour le mot de passe', 'ενημερώσετε τον κωδικό πρόσβασης', 'Kennwort aktualisieren', 'aggiornare la password', 'ปรับปรุงรหัสผ่าน', 'پاس اپ ڈیٹ', 'पासवर्ड अद्यतन', 'scelerisque eget', 'memperbarui sandi', 'パスワードを更新', '암호를 업데이트'),
(205, 'teacher_dashboard', 'teacher dashboard', 'শিক্ষক ড্যাশবোর্ড', 'tablero maestro', 'لوحة أجهزة القياس المعلم', 'leraar dashboard', 'учитель приборной панели', '老师仪表板', 'öğretmen pano', 'dashboard professor', '<NAME>', 'enseignant tableau de bord', 'ταμπλό των εκπαιδευτικών', 'Lehrer-Dashboard', 'dashboard insegnante', 'กระดานครู', 'استاد ڈیش بورڈ', 'शिक्षक डैशबोर्ड', 'magister Dashboard', 'dashboard guru', '教師のダッシュボード', '교사 대시 보드'),
(206, 'backup_restore_help', 'backup restore help', 'ব্যাকআপ পুনঃস্থাপন সাহায্য', 'copia de seguridad restaurar ayuda', 'استعادة النسخ الاحتياطي المساعدة', 'backup helpen herstellen', 'восстановить резервную копию помощь', '备份恢复的帮助', 'yedekleme yardım geri', 'de backup restaurar ajuda', 'Backup Restore segítségével', 'restauration de sauvegarde de l''aide', 'επαναφοράς αντιγράφων ασφαλείας βοήθεια', 'Backup wiederherstellen Hilfe', 'Backup Restore aiuto', 'การสำรองข้อมูลเรียกคืนความช่วยเหลือ', 'بیک اپ کی مدد بحال', 'बैकअप मदद बहाल', 'auxilium tergum restituunt', 'backup restore bantuan', 'バックアップヘルプを復元', '백업 도움을 복원'),
(207, 'student_dashboard', 'student dashboard', 'ছাত্র ড্যাশবোর্ড', 'salpicadero estudiante', 'لوحة القيادة الطلابية', 'student dashboard', 'студент приборной панели', '学生的仪表板', 'Öğrenci paneli', 'dashboard estudante', 'tanuló műszerfal', 'tableau de bord de l''élève', 'ταμπλό των φοιτητών', '<NAME>', 'studente dashboard', 'แผงควบคุมนักเรียน', 'طالب علم کے ڈیش بورڈ', 'छात्र डैशबोर्ड', 'Discipulus Dashboard', 'dashboard mahasiswa', '学生のダッシュボード', '학생 대시 보드'),
(208, 'parent_dashboard', 'parent dashboard', 'অভিভাবক ড্যাশবোর্ড', 'salpicadero padres', 'لوحة أجهزة القياس الأم', 'ouder dashboard', 'родитель приборной панели', '家长仪表板', 'ebeveyn kontrol paneli', 'dashboard pai', 'szülő műszerfal', 'parent tableau de bord', 'μητρική ταμπλό', '<NAME>', 'dashboard genitore', 'แผงควบคุมของผู้ปกครอง', 'والدین کے ڈیش بورڈ', 'माता - पिता डैशबोर्ड', 'Dashboard parent', 'orangtua dashboard', '親ダッシュ', '부모 대시 보드'),
(209, 'view_marks', 'view marks', 'দেখুন চিহ্ন', 'Vista marcas', 'علامات رأي', 'view merken', 'вид знаки', '鉴于商标', 'görünümü işaretleri', 'vista marcas', 'view jelek', 'Vue marques', 'σήματα άποψη', 'Ansicht Marken', 'Vista marchi', 'เครื่องหมายมุมมอง', 'دیکھیں نشانات', 'देखने के निशान', 'propter signa', 'lihat tanda', 'ビューマーク', '보기 마크'),
(210, 'delete_language', 'delete language', 'ভাষা মুছতে', 'eliminar el lenguaje', 'حذف اللغة', 'verwijderen taal', 'удалить язык', '删除语言', 'dili silme', 'excluir língua', 'törlése nyelv', 'supprimer la langue', 'διαγραφή γλώσσα', 'Sprache löschen', 'eliminare lingua', 'ลบภาษา', 'زبان کو خارج کر دیں', 'भाषा को हटाना', 'linguam turpis', 'menghapus bahasa', '言語を削除する', '언어를 삭제'),
(211, 'settings_updated', 'settings updated', 'সেটিংস আপডেট', 'configuración actualizado', 'الإعدادات المحدثة', 'instellingen bijgewerkt', 'Настройки обновлены', '设置更新', 'ayarları güncellendi', 'definições atualizadas', 'beállítások frissítve', 'paramètres mis à jour', 'Ρυθμίσεις ενημέρωση', 'Einstellungen aktualisiert', 'impostazioni aggiornate', 'การตั้งค่าการปรับปรุง', 'ترتیبات کی تازہ کاری', 'सेटिंग्स अद्यतन', 'venenatis eu', 'pengaturan diperbarui', '設定が更新', '설정이 업데이트'),
(212, 'update_phrase', 'update phrase', 'আপডেট ফ্রেজ', 'actualización de la frase', 'تحديث العبارة', 'Update zin', 'обновление фраза', '更新短语', 'güncelleme ifade', 'atualização frase', 'frissítést kifejezés', 'mise à jour phrase', 'ενημέρωση φράση', 'Update Begriff', 'aggiornamento frase', 'ปรับปรุงวลี', 'اپ ڈیٹ جملہ', 'अद्यतन वाक्यांश', 'eget dictum', 'frase pembaruan', '更新フレーズ', '업데이트 구문'),
(213, 'login_failed', 'login failed', 'লগইন ব্যর্থ হয়েছে', 'Error de acceso', 'فشل تسجيل الدخول', 'inloggen is mislukt', 'Ошибка входа', '登录失败', 'giriş başarısız oldu', 'Falha no login', 'bejelentkezés sikertelen', 'Échec de la connexion', 'Είσοδος απέτυχε', 'Fehler bei der Anmeldung', 'Accesso non riuscito', 'เข้าสู่ระบบล้มเหลว', 'لاگ ان ناکام', 'लॉगिन विफल', 'tincidunt defecit', 'Login gagal', 'ログインに失敗しました', '로그인 실패'),
(214, 'live_chat', 'live chat', 'লাইভ চ্যাট', 'chat en vivo', 'الدردشة الحية', 'live chat', 'Онлайн-чат', '即时聊天', 'canlı sohbet', 'chat ao vivo', 'élő chat', 'chat en direct', 'live chat', 'Live-Chat', 'live chat', 'อยู่สนทนา', 'لائیو چیٹ', 'लाइव चैट', 'Vivamus nibh', 'live chat', 'ライブチャット', '라이브 채팅'),
(215, 'client 1', 'client 1', 'ক্লায়েন্টের 1', 'cliente 1', 'العميل 1', 'client 1', 'Клиент 1', '客户端1', 'istemcisi 1', 'cliente 1', 'ügyfél 1', 'client 1', 'πελάτη 1', 'Client 1', 'client 1', 'ลูกค้า 1', 'کلائنٹ 1', 'ग्राहक 1', 'I huius', 'client 1', 'クライアント1', '클라이언트 1'),
(216, 'buyer', 'buyer', 'ক্রেতা', 'comprador', 'مشتر', 'koper', 'покупатель', '买方', 'alıcı', 'comprador', 'vevő', 'acheteur', 'αγοραστής', 'Käufer', 'compratore', 'ผู้ซื้อ', 'خریدار', 'खरीददार', 'qui emit,', 'pembeli', 'バイヤー', '구매자'),
(217, 'purchase_code', 'purchase code', 'ক্রয় কোড', 'código de compra', 'كود الشراء', 'aankoop code', 'покупка код', '申购代码', 'satın alma kodu', 'código de compra', 'vásárlási kódot', 'code d''achat', 'Κωδικός αγορά', 'Kauf-Code', 'codice di acquisto', 'รหัสการสั่งซื้อ', 'خریداری کے کوڈ', 'खरीद कोड', 'Mauris euismod', 'kode pembelian', '購入コード', '구매 코드'),
(218, 'system_email', 'system email', 'সিস্টেম ইমেইল', 'correo electrónico del sistema', 'نظام البريد الإلكتروني', 'systeem e-mail', 'система электронной почты', '邮件系统', 'sistem e-posta', 'e-mail do sistema', 'a rendszer az e-mail', 'email de système', 'e-mail συστήματος', 'E-Mail-System', 'email sistema', 'อีเมล์ระบบ', 'نظام کی ای میل', 'प्रणाली ईमेल', 'Praesent sit amet', 'email sistem', 'システムの電子メール', '시스템 전자 메일'),
(219, 'option', 'option', 'বিকল্প', 'opción', 'خيار', 'optie', 'вариант', '选项', 'seçenek', 'opção', 'opció', 'option', 'επιλογή', 'Option', 'opzione', 'ตัวเลือกที่', 'آپشن', 'विकल्प', 'optio', 'pilihan', 'オプション', '선택권'),
(220, 'edit_phrase', 'edit phrase', 'সম্পাদনা ফ্রেজ', 'edit frase', 'تحرير العبارة', 'bewerk zin', 'править фраза', '编辑语', 'edit ifade', 'edição frase', 'szerkesztés kifejezés', 'modifier phrase', 'edit φράση', 'edit Begriff', 'modifica frase', 'แก้ไขวลี', 'ترمیم کے جملہ', 'संपादित वाक्यांश', 'edit phrase', 'mengedit frase', '編集フレーズ', '편집 구'),
(221, 'forgot_your_password', 'Forgot Your Password', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(222, 'forgot_password', 'Forgot Password', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(223, 'back_to_login', 'Back To Login', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(224, 'return_to_login_page', 'Return to Login Page', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(225, 'admit_student', 'Admit Student', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(226, 'admit_bulk_student', 'Admit Bulk Student', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(227, 'student_information', 'Student Information', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(228, 'student_marksheet', 'Student Mark Sheet', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(229, 'daily_attendance', 'Daily Attendance', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(230, 'exam_grades', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(231, 'message', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(232, 'general_settings', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(233, 'language_settings', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(234, 'edit_profile', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(235, 'event_schedule', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(236, 'cancel', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(237, 'addmission_form', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(238, 'value_required', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(239, 'select', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(240, 'gender', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(241, 'add_bulk_student', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(242, 'student_bulk_add_form', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(243, 'select_excel_file', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(244, 'upload_and_import', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(245, 'manage_classes', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(246, 'manage_sections', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(247, 'add_new_teacher', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(248, 'section_name', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(249, 'nick_name', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(250, 'add_new_section', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(251, 'add_section', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(252, 'update', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(253, 'section', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(254, 'select_class_first', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(255, 'parent_information', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(256, 'relation', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(257, 'add_form', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(258, 'all_parents', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(259, 'parents', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(260, 'add_new_parent', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(261, 'add_new_student', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(262, 'all_students', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(263, 'view_marksheet', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(264, 'text_align', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(265, 'clickatell_username', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(266, 'clickatell_password', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(267, 'clickatell_api_id', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(268, 'sms_settings', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(269, 'data_updated', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(270, 'data_added_successfully', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(271, 'edit_notice', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(272, 'private_messaging', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(273, 'messages', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(274, 'new_message', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(275, 'write_new_message', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(276, 'recipient', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(277, 'select_a_user', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(278, 'write_your_message', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(279, 'send', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(280, 'current_password', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(281, 'exam_marks', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(282, 'marks_obtained', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(283, 'total_marks', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(284, 'comments', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(285, 'theme_settings', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(286, 'select_theme', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(287, 'theme_selected', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(288, 'language_list', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(289, 'payment_cancelled', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(290, 'study_material', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(291, 'download', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(292, 'select_a_theme_to_make_changes', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(293, 'manage_daily_attendance', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(294, 'select_date', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(295, 'select_month', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(296, 'select_year', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(297, 'manage_attendance', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(298, 'twilio_account', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(299, 'authentication_token', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(300, 'registered_phone_number', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(301, 'select_a_service', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(302, 'active', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(303, 'disable_sms_service', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(304, 'not_selected', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(305, 'disabled', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(306, 'present', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(307, 'absent', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(308, 'accounting', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(309, 'income', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(310, 'expense', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(311, 'incomes', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(312, 'invoice_informations', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(313, 'payment_informations', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(314, 'total', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(315, 'enter_total_amount', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(316, 'enter_payment_amount', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(317, 'payment_status', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(318, 'method', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(319, 'cash', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(320, 'check', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(321, 'card', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(322, 'data_deleted', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(323, 'total_amount', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(324, 'take_payment', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(325, 'payment_history', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(326, 'amount_paid', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(327, 'due', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(328, 'payment_successfull', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(329, 'creation_date', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(330, 'invoice_entries', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(331, 'paid_amount', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(332, 'send_sms_to_all', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(333, 'yes', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(334, 'no', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(335, 'activated', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(336, 'sms_service_not_activated', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(337, 'add_study_material', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(338, 'file', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(339, 'file_type', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(340, 'select_file_type', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(341, 'image', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(342, 'doc', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(343, 'pdf', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(344, 'excel', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(345, 'other', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(346, 'expenses', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(347, 'add_new_expense', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(348, 'add_expense', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(349, 'edit_expense', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(350, 'total_mark', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(351, 'send_marks_by_sms', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(352, 'send_marks', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(353, 'select_receiver', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(354, 'students', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(355, 'marks_of', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(356, 'for', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(357, 'message_sent', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(358, 'expense_category', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(359, 'add_new_expense_category', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(360, 'add_expense_category', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(361, 'category', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(362, 'select_expense_category', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(363, 'message_sent!', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(364, 'reply_message', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(365, 'account_updated', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(366, 'upload_logo', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(367, 'upload', 'Upload', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(368, 'study_material_info_saved_successfuly', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(369, 'edit_study_material', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(370, 'default_theme', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
(371, 'default', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
-- --------------------------------------------------------
--
-- Table structure for table `mark`
--
DROP TABLE IF EXISTS `mark`;
CREATE TABLE IF NOT EXISTS `mark` (
`mark_id` int(11) NOT NULL,
`student_id` int(11) NOT NULL,
`subject_id` int(11) NOT NULL,
`class_id` int(11) NOT NULL,
`exam_id` int(11) NOT NULL,
`mark_obtained` int(11) NOT NULL DEFAULT '0',
`mark_total` int(11) NOT NULL DEFAULT '100',
`comment` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `message`
--
DROP TABLE IF EXISTS `message`;
CREATE TABLE IF NOT EXISTS `message` (
`message_id` int(11) NOT NULL,
`message_thread_code` longtext NOT NULL,
`message` longtext NOT NULL,
`sender` longtext NOT NULL,
`timestamp` longtext NOT NULL,
`read_status` int(11) NOT NULL DEFAULT '0' COMMENT '0 unread 1 read'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `message_thread`
--
DROP TABLE IF EXISTS `message_thread`;
CREATE TABLE IF NOT EXISTS `message_thread` (
`message_thread_id` int(11) NOT NULL,
`message_thread_code` longtext COLLATE utf8_unicode_ci NOT NULL,
`sender` longtext COLLATE utf8_unicode_ci NOT NULL,
`reciever` longtext COLLATE utf8_unicode_ci NOT NULL,
`last_message_timestamp` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `noticeboard`
--
DROP TABLE IF EXISTS `noticeboard`;
CREATE TABLE IF NOT EXISTS `noticeboard` (
`notice_id` int(11) NOT NULL,
`notice_title` longtext COLLATE utf8_unicode_ci NOT NULL,
`notice` longtext COLLATE utf8_unicode_ci NOT NULL,
`create_timestamp` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `parent`
--
DROP TABLE IF EXISTS `parent`;
CREATE TABLE IF NOT EXISTS `parent` (
`parent_id` int(11) NOT NULL,
`name` longtext COLLATE utf8_unicode_ci NOT NULL,
`email` longtext COLLATE utf8_unicode_ci NOT NULL,
`password` longtext COLLATE utf8_unicode_ci NOT NULL,
`phone` longtext COLLATE utf8_unicode_ci NOT NULL,
`address` longtext COLLATE utf8_unicode_ci NOT NULL,
`profession` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `payment`
--
DROP TABLE IF EXISTS `payment`;
CREATE TABLE IF NOT EXISTS `payment` (
`payment_id` int(11) NOT NULL,
`expense_category_id` int(11) NOT NULL,
`title` longtext COLLATE utf8_unicode_ci NOT NULL,
`payment_type` longtext COLLATE utf8_unicode_ci NOT NULL,
`invoice_id` int(11) NOT NULL,
`student_id` int(11) NOT NULL,
`method` longtext COLLATE utf8_unicode_ci NOT NULL,
`description` longtext COLLATE utf8_unicode_ci NOT NULL,
`amount` longtext COLLATE utf8_unicode_ci NOT NULL,
`timestamp` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `section`
--
DROP TABLE IF EXISTS `section`;
CREATE TABLE IF NOT EXISTS `section` (
`section_id` int(11) NOT NULL,
`name` longtext COLLATE utf8_unicode_ci NOT NULL,
`nick_name` longtext COLLATE utf8_unicode_ci NOT NULL,
`class_id` int(11) NOT NULL,
`teacher_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `settings`
--
DROP TABLE IF EXISTS `settings`;
CREATE TABLE IF NOT EXISTS `settings` (
`settings_id` int(11) NOT NULL,
`type` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`description` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=21 ;
--
-- Dumping data for table `settings`
--
INSERT INTO `settings` (`settings_id`, `type`, `description`) VALUES
(1, 'system_name', 'PencilCrunch School Management System'),
(2, 'system_title', 'PencilCrunch School'),
(3, 'address', 'New YorK, NY'),
(4, 'phone', '+3476649161'),
(5, 'paypal_email', '<EMAIL>'),
(6, 'currency', 'usd'),
(7, 'system_email', '<EMAIL>'),
(20, 'active_sms_service', 'disabled'),
(11, 'language', 'english'),
(12, 'text_align', 'left-to-right'),
(13, 'clickatell_user', ''),
(14, 'clickatell_password', ''),
(15, 'clickatell_api_id', ''),
(16, 'skin_colour', 'default'),
(17, 'twilio_account_sid', ''),
(18, 'twilio_auth_token', ''),
(19, 'twilio_sender_phone_number', '');
-- --------------------------------------------------------
--
-- Table structure for table `student`
--
DROP TABLE IF EXISTS `student`;
CREATE TABLE IF NOT EXISTS `student` (
`student_id` int(11) NOT NULL,
`name` longtext COLLATE utf8_unicode_ci NOT NULL,
`birthday` longtext COLLATE utf8_unicode_ci NOT NULL,
`sex` longtext COLLATE utf8_unicode_ci NOT NULL,
`religion` longtext COLLATE utf8_unicode_ci NOT NULL,
`blood_group` longtext COLLATE utf8_unicode_ci NOT NULL,
`address` longtext COLLATE utf8_unicode_ci NOT NULL,
`phone` longtext COLLATE utf8_unicode_ci NOT NULL,
`email` longtext COLLATE utf8_unicode_ci NOT NULL,
`password` longtext COLLATE utf8_unicode_ci NOT NULL,
`father_name` longtext COLLATE utf8_unicode_ci NOT NULL,
`mother_name` longtext COLLATE utf8_unicode_ci NOT NULL,
`class_id` longtext COLLATE utf8_unicode_ci NOT NULL,
`section_id` int(11) NOT NULL,
`parent_id` int(11) NOT NULL,
`roll` longtext COLLATE utf8_unicode_ci NOT NULL,
`transport_id` int(11) NOT NULL,
`dormitory_id` int(11) NOT NULL,
`dormitory_room_number` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `subject`
--
DROP TABLE IF EXISTS `subject`;
CREATE TABLE IF NOT EXISTS `subject` (
`subject_id` int(11) NOT NULL,
`name` longtext COLLATE utf8_unicode_ci NOT NULL,
`class_id` int(11) NOT NULL,
`teacher_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `teacher`
--
DROP TABLE IF EXISTS `teacher`;
CREATE TABLE IF NOT EXISTS `teacher` (
`teacher_id` int(11) NOT NULL,
`name` longtext COLLATE utf8_unicode_ci NOT NULL,
`birthday` longtext COLLATE utf8_unicode_ci NOT NULL,
`sex` longtext COLLATE utf8_unicode_ci NOT NULL,
`religion` longtext COLLATE utf8_unicode_ci NOT NULL,
`blood_group` longtext COLLATE utf8_unicode_ci NOT NULL,
`address` longtext COLLATE utf8_unicode_ci NOT NULL,
`phone` longtext COLLATE utf8_unicode_ci NOT NULL,
`email` longtext COLLATE utf8_unicode_ci NOT NULL,
`password` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `transport`
--
DROP TABLE IF EXISTS `transport`;
CREATE TABLE IF NOT EXISTS `transport` (
`transport_id` int(11) NOT NULL,
`route_name` longtext COLLATE utf8_unicode_ci NOT NULL,
`number_of_vehicle` longtext COLLATE utf8_unicode_ci NOT NULL,
`description` longtext COLLATE utf8_unicode_ci NOT NULL,
`route_fare` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `admin`
--
ALTER TABLE `admin`
ADD PRIMARY KEY (`admin_id`);
--
-- Indexes for table `attendance`
--
ALTER TABLE `attendance`
ADD PRIMARY KEY (`attendance_id`);
--
-- Indexes for table `book`
--
ALTER TABLE `book`
ADD PRIMARY KEY (`book_id`);
--
-- Indexes for table `ci_sessions`
--
ALTER TABLE `ci_sessions`
ADD PRIMARY KEY (`id`), ADD KEY `ci_sessions_timestamp` (`timestamp`);
--
-- Indexes for table `class`
--
ALTER TABLE `class`
ADD PRIMARY KEY (`class_id`);
--
-- Indexes for table `class_routine`
--
ALTER TABLE `class_routine`
ADD PRIMARY KEY (`class_routine_id`);
--
-- Indexes for table `document`
--
ALTER TABLE `document`
ADD PRIMARY KEY (`document_id`);
--
-- Indexes for table `dormitory`
--
ALTER TABLE `dormitory`
ADD PRIMARY KEY (`dormitory_id`);
--
-- Indexes for table `exam`
--
ALTER TABLE `exam`
ADD PRIMARY KEY (`exam_id`);
--
-- Indexes for table `expense_category`
--
ALTER TABLE `expense_category`
ADD PRIMARY KEY (`expense_category_id`);
--
-- Indexes for table `grade`
--
ALTER TABLE `grade`
ADD PRIMARY KEY (`grade_id`);
--
-- Indexes for table `invoice`
--
ALTER TABLE `invoice`
ADD PRIMARY KEY (`invoice_id`);
--
-- Indexes for table `language`
--
ALTER TABLE `language`
ADD PRIMARY KEY (`phrase_id`);
--
-- Indexes for table `mark`
--
ALTER TABLE `mark`
ADD PRIMARY KEY (`mark_id`);
--
-- Indexes for table `message`
--
ALTER TABLE `message`
ADD PRIMARY KEY (`message_id`);
--
-- Indexes for table `message_thread`
--
ALTER TABLE `message_thread`
ADD PRIMARY KEY (`message_thread_id`);
--
-- Indexes for table `noticeboard`
--
ALTER TABLE `noticeboard`
ADD PRIMARY KEY (`notice_id`);
--
-- Indexes for table `parent`
--
ALTER TABLE `parent`
ADD PRIMARY KEY (`parent_id`);
--
-- Indexes for table `payment`
--
ALTER TABLE `payment`
ADD PRIMARY KEY (`payment_id`);
--
-- Indexes for table `section`
--
ALTER TABLE `section`
ADD PRIMARY KEY (`section_id`);
--
-- Indexes for table `settings`
--
ALTER TABLE `settings`
ADD PRIMARY KEY (`settings_id`);
--
-- Indexes for table `student`
--
ALTER TABLE `student`
ADD PRIMARY KEY (`student_id`);
--
-- Indexes for table `subject`
--
ALTER TABLE `subject`
ADD PRIMARY KEY (`subject_id`);
--
-- Indexes for table `teacher`
--
ALTER TABLE `teacher`
ADD PRIMARY KEY (`teacher_id`);
--
-- Indexes for table `transport`
--
ALTER TABLE `transport`
ADD PRIMARY KEY (`transport_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
MODIFY `admin_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `attendance`
--
ALTER TABLE `attendance`
MODIFY `attendance_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `book`
--
ALTER TABLE `book`
MODIFY `book_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `class`
--
ALTER TABLE `class`
MODIFY `class_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `class_routine`
--
ALTER TABLE `class_routine`
MODIFY `class_routine_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `document`
--
ALTER TABLE `document`
MODIFY `document_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `dormitory`
--
ALTER TABLE `dormitory`
MODIFY `dormitory_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `exam`
--
ALTER TABLE `exam`
MODIFY `exam_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `expense_category`
--
ALTER TABLE `expense_category`
MODIFY `expense_category_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `grade`
--
ALTER TABLE `grade`
MODIFY `grade_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `invoice`
--
ALTER TABLE `invoice`
MODIFY `invoice_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `language`
--
ALTER TABLE `language`
MODIFY `phrase_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=372;
--
-- AUTO_INCREMENT for table `mark`
--
ALTER TABLE `mark`
MODIFY `mark_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `message`
--
ALTER TABLE `message`
MODIFY `message_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `message_thread`
--
ALTER TABLE `message_thread`
MODIFY `message_thread_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `noticeboard`
--
ALTER TABLE `noticeboard`
MODIFY `notice_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `parent`
--
ALTER TABLE `parent`
MODIFY `parent_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `payment`
--
ALTER TABLE `payment`
MODIFY `payment_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `section`
--
ALTER TABLE `section`
MODIFY `section_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `settings`
--
ALTER TABLE `settings`
MODIFY `settings_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=21;
--
-- AUTO_INCREMENT for table `student`
--
ALTER TABLE `student`
MODIFY `student_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `subject`
--
ALTER TABLE `subject`
MODIFY `subject_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `teacher`
--
ALTER TABLE `teacher`
MODIFY `teacher_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `transport`
--
ALTER TABLE `transport`
MODIFY `transport_id` int(11) NOT NULL AUTO_INCREMENT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
CREATE PROCEDURE [dbo].[LoadTargetCloneTables]
(@Run_Id bigint)
AS
-- ====================================================================================
-- Author: <NAME>
-- Create Date: 10/07/2019
-- Description: Load Target Tables from Staging Post Validation Checks
-- ====================================================================================
BEGIN TRY
DECLARE @vSQL NVARCHAR(MAX)
DECLARE @DateStamp VARCHAR(10)
DECLARE @LogID int
--DECLARE @Run_ID int
--SELECT @Run_ID= RunId FROM dbo.Staging_TPR
select @DateStamp = CAST(CAST(YEAR(GETDATE()) AS VARCHAR)+RIGHT('0' + RTRIM(cast(MONTH(getdate()) as varchar)), 2) +RIGHT('0' +RTRIM(CAST(DAY(GETDATE()) AS VARCHAR)),2) as int)
/* Start Logging Execution */
INSERT INTO Mgmt.Log_Execution_Results
(
RunId
,StepNo
,StoredProcedureName
,StartDateTime
,Execution_Status
)
SELECT
@Run_Id
,'Step-4'
,'LoadTargetCloneTables'
,getdate()
,0
SELECT @LogID=MAX(LogId) FROM Mgmt.Log_Execution_Results
WHERE StoredProcedureName='LoadTargetCloneTables'
AND RunId=@Run_ID
/* Insert Organisation Table */
set xact_abort on
IF ((SELECT COUNT(*) FROM Tpr.StagingData) > 4500000) --- Checking if the No. Of Valid Records Count are within the threshold, If not don't refresh
BEGIN
--BEGIN TRANSACTION
/* Drop Existing Indexes and Rebuild later after the load is complete */
DROP INDEX IF EXISTS NCI_Organisation_AORN ON ShadowTpr.Organisation
DROP INDEX IF EXISTS NCI_Organisation_PAYEScheme ON ShadowTpr.OrganisationPAYEScheme
DROP INDEX IF EXISTS NCI_Organisation_SK ON ShadowTpr.Organisation
DROP INDEX IF EXISTS NCI_Organisation_SK ON ShadowTpr.OrganisationAddress
DROP INDEX IF EXISTS NCI_Organisation_SK ON ShadowTpr.OrganisationPAYEScheme
--ALTER INDEX PK_Org_OrgSK ON Shadow.Organisation DISABLE
--ALTER INDEX PK_OrgAdd_OrgAddSK ON Shadow.OrganisationAddress DISABLE;
--ALTER INDEX PK_OrgPAYEScheme_OrgSchemeSK ON Shadow.OrganisationPAYEScheme DISABLE;
/* Clear Existing Tables before Load */
TRUNCATE TABLE ShadowTpr.OrganisationPAYEScheme
TRUNCATE TABLE ShadowTpr.OrganisationAddress
TRUNCATE TABLE ShadowTpr.Organisation
/* Break down the Insert Statement */
--DECLARE @SourceSK INT
-- DECLARE @Loop INT
-- SET @SourceSK = 0
-- SET @Loop = 1
-- WHILE @Loop = 1
-- BEGIN
/* Start Data Load into Main Tables */
INSERT INTO [ShadowTpr].[Organisation]
([TPRUniqueId]
,[OrganisationName]
,[DistrictNumber]
,[Reference]
,[CompanyRegNo]
,[TradeClass]
,[AODistrict]
,[AOTaxType]
,[AOCheckChar]
,[AOReference]
,[AORN]
,[AOInd]
,[AOIndDesc]
,[TransferType]
,[TransferTypeDesc]
,[UniqueRefDistrict]
,[UniqueReference]
,[SourceSK]
,[RunId]
,[SourceFileName]
,[RecordCreatedDate])
SELECT --TOP 100000
TPRUniqueID
,COALESCE(LTRIM(RTRIM(REPLACE(Name1,'NULL',''))),'')+' '+COALESCE(LTRIM(RTRIM(REPLACE(Name2,'NULL',''))),'')
,DistrictNumber
,Reference
,CASE WHEN CompanyRegNo='NULL' THEN NULL ELSE CompanyRegNo END as CompanyRegNo
,CASE WHEN TradeClass='NULL' THEN NULL ELSE TradeClass END as TradeClass
,cast(AODistrict as int) as AODistrict
,AOTaxType as AOTaxType
,AOCheckChar as AOCheckChar
,AOReference as AOReference
,right('000'+CAST(AODistrict AS VARCHAR(3)),3)+AOTaxType+AOCheckChar+AOReference as AORN
,CASE WHEN AOInd='NULL' THEN NULL ELSE AOInd END as AOInd
,CASE WHEN REPLACE(AOInd,'NULL','N/A')='Y' THEN 'The xfer is within an AO'
WHEN REPLACE(AOInd,'NULL','N/A')='N' THEN 'The xfer is across AOs'
ELSE 'Unknown'
END as AOIndDesc
,CASE WHEN XferType='NULL' THEN NULL ELSE cast(XferType AS tinyint) END as TransferType
,CASE WHEN REPLACE(XferType,'NULL',-1)=1 THEN 'Transfer'
WHEN REPLACE(XferType,'NULL',-1)=2 THEN 'Merger'
WHEN REPLACE(XferType,'NULL',-1)=3 THEN 'Succession'
WHEN REPLACE(XferType,'NULL',-1)=4 THEN 'Reversal'
ELSE 'Unknown'
END as TransferTypeDesc
,CASE WHEN UniqueRefDistrict='NULL' THEN NULL
ELSE UniqueRefDistrict
END as UniqueRefDistrict
,CASE WHEN UniqueReference='NULL' THEN NULL
ELSE UniqueReference
END as UniqueReference
,SourceSK
,RunID
,SourceFileName
,GETDATE()
FROM Tpr.StagingData
WHERE IsValid=1
-- AND SourceSK > @SourceSK
-- ORDER BY SourceSK
-- IF @@ROWCOUNT > 0
-- SELECT @SourceSK = MAX(SOURCESK)
-- FROM shadow.Organisation
-- ELSE
-- SET @Loop = 0
--PRINT @SOURCESK
-- END
/* Insert Organisation Address Table */
--SET @SourceSK = 0
--SET @Loop = 1
--WHILE @Loop = 1
--BEGIN
INSERT INTO [ShadowTpr].[OrganisationAddress]
([OrgSK]
,[TPRUniqueID]
,[OrganisationFullAddress]
,[AddressLine1]
,[AddressLine2]
,[AddressLine3]
,[AddressLine4]
,[AddressLine5]
,[PostCode]
,[EmailAddress]
,[TelephoneNumber]
,[AddressType]
,[AddressTypeDesc]
,[ForeignCountry]
,[AddressVerifiedIndicator]
,[AddressVerifiedIndicatorDesc]
,[ADI]
,[SourceSK]
,[RunId]
,[SourceFileName]
,[RecordCreatedDate])
SELECT --TOP 100000
Org.OrgSK
,Stpr.TPRUniqueID
,LTRIM(RTRIM(CASE WHEN Stpr.AddressLine1='NULL' THEN NULL ELSE Stpr.AddressLine1 END))+' '
+LTRIM(RTRIM(CASE WHEN Stpr.AddressLine2='NULL' THEN NULL ELSE Stpr.AddressLine2 END))+' '
+LTRIM(RTRIM(CASE WHEN Stpr.AddressLine3='NULL' THEN NULL ELSE Stpr.AddressLine3 END))+' '
+LTRIM(RTRIM(CASE WHEN Stpr.AddressLine4='NULL' THEN NULL ELSE Stpr.AddressLine4 END))+' '
+LTRIM(RTRIM(CASE WHEN Stpr.AddressLine5='NULL' THEN NULL ELSE Stpr.AddressLine5 END)) as FullAddress
,LTRIM(RTRIM(CASE WHEN Stpr.AddressLine1='NULL' THEN NULL ELSE Stpr.AddressLine1 END)) as AddressLine1
,LTRIM(RTRIM(CASE WHEN Stpr.AddressLine2='NULL' THEN NULL ELSE Stpr.AddressLine2 END)) as AddressLine2
,LTRIM(RTRIM(CASE WHEN Stpr.AddressLine3='NULL' THEN NULL ELSE Stpr.AddressLine3 END)) as AddressLine3
,LTRIM(RTRIM(CASE WHEN Stpr.AddressLine4='NULL' THEN NULL ELSE Stpr.AddressLine4 END)) as AddressLine4
,LTRIM(RTRIM(CASE WHEN Stpr.AddressLine5='NULL' THEN NULL ELSE Stpr.AddressLine5 END)) as AddressLine5
,LTRIM(RTRIM(CASE WHEN Stpr.PostCode='NULL' THEN NULL ELSE Stpr.PostCode END)) as PostCode
,LTRIM(RTRIM(CASE WHEN Stpr.EmailAddress='NULL' THEN NULL ELSE Stpr.EmailAddress END)) as EmailAddress
,LTRIM(RTRIM(CASE WHEN Stpr.TelephoneNumber='NULL' THEN NULL ELSE Stpr.TelephoneNumber END)) as TelephoneNumber
,LTRIM(RTRIM(CASE WHEN Stpr.AddressType='NULL' THEN NULL ELSE Stpr.AddressType END)) as AddressType
,CASE WHEN Stpr.AddressType=1 THEN 'UK' WHEN Stpr.AddressType=2 THEN 'NON-UK' ELSE 'Unknown' END as AddressTypeDesc
,LTRIM(RTRIM(CASE WHEN Stpr.ForeignCountry='NULL' THEN NULL ELSE Stpr.ForeignCountry END)) as ForeignCountry
,LTRIM(RTRIM(CASE WHEN Stpr.AddressVerifiedIndicator='NULL' THEN NULL ELSE Stpr.AddressVerifiedIndicator END)) as AddressVerifiedIndicator
,CASE WHEN LTRIM(RTRIM(Stpr.AddressVerifiedIndicator))=1 THEN 'Verified by PAF'
WHEN LTRIM(RTRIM(Stpr.AddressVerifiedIndicator))=3 THEN 'Input for Verification'
ELSE 'Unknown'
END as AddressVerifiedIndicatorDesc
,LTRIM(RTRIM(CASE WHEN Stpr.ADI='NULL' THEN NULL ELSE Stpr.ADI END)) as ADI
,stpr.SourceSK
,stpr.RunID
,stpr.SourceFileName
,getdate() as insertdate
--into #temp1
FROM Tpr.StagingData stpr
LEFT
JOIN ShadowTpr.Organisation Org
ON stpr.SourceSK=Org.SourceSK
AND stpr.TPRUniqueID=Org.TPRUniqueId
WHERE stpr.IsValid=1
-- AND stpr.SourceSK > @SourceSK
--ORDER BY stpr.SourceSK
-- IF @@ROWCOUNT > 0
-- SELECT @SourceSK = MAX(SOURCESK)
-- FROM shadow.OrganisationAddress
-- ELSE
-- SET @Loop = 0
-- END
/* Insert into Organisation PAYEScheme */
--SET @SourceSK = 0
--SET @Loop = 1
--WHILE @Loop = 1
--BEGIN
INSERT INTO [ShadowTpr].[OrganisationPAYEScheme]
([OrgSK]
,[TPRUniqueID]
,[PAYEScheme]
,[SchemeStartDate]
,[SchemeEndDate]
,[SchemeEndDateCode]
,[SchemeEndDateCodeDesc]
,[RestartDate]
,[ReviewYear]
,[LiveEmployeeCount]
,[EmployeeCountDateTaken]
,[EmployeeCountCode]
,[EmployeeCountCodeDesc]
,[SignalCode]
,[SignalCodeDesc]
,[SignalChanged]
,[SignalChangedDesc]
,[SignalStartYear]
,[SignalEndYear]
,[SignalValue]
,[HistorySchemeStartYear]
,[HistorySchemeEndYear]
,[HistorySchemeType]
,[HistorySchemeTypeDesc]
,[SourceSK]
,[RunId]
,[SourceFileName]
,[RecordCreatedDate])
SELECT --TOP 100000
Org.OrgSK
,stpr.TPRUniqueId
,ltrim(rtrim(stpr.DistrictNumber))+'/'+ltrim(rtrim(stpr.Reference))
,CASE WHEN stpr.StartDate='NULL' THEN NULL ELSE CONVERT(VARCHAR,stpr.StartDate,23) END as SchemeStartDate
,CASE WHEN stpr.EndDate='NULL' THEN NULL ELSE CONVERT(VARCHAR,stpr.EndDate,23) END as SchemeEndDate
,CASE WHEN stpr.EndDateCode='NULL' THEN NULL ELSE CAST(stpr.EndDateCode as tinyint) END as SchemeEndDateCode
,CASE WHEN stpr.EndDateCode=0 THEN 'Not Closed'
WHEN stpr.EndDateCode=1 THEN 'Transfer Out'
WHEN stpr.EndDateCode=2 THEN 'Merger Out'
WHEN stpr.EndDateCode=3 THEN 'Succession Out'
WHEN stpr.EndDateCode=4 THEN 'Ceased'
WHEN stpr.EndDateCode=5 THEN 'Cancelled'
ELSE 'Unknown'
END as SchemeStatus
,CASE WHEN stpr.RestartDate='NULL' THEN NULL ELSE CONVERT(VARCHAR,stpr.RestartDate,23) END as RestartDate
,CASE WHEN stpr.ReviewYr='NULL' THEN NULL ELSE stpr.ReviewYr END as ReviewYear
,CASE WHEN stpr.NumberCounted='NULL' THEN NULL ELSE stpr.NumberCounted END as LiveEmployeeCount
,CASE WHEN stpr.DateTaken='NULL' THEN NULL ELSE CONVERT(VARCHAR,stpr.DateTaken,23) END as EmployeeCountDateTaken
,CASE WHEN stpr.EEC_Code='NULL' THEN NULL ELSE stpr.EEC_Code END as EmployeeCountCode
,CASE WHEN stpr.EEC_Code='L' THEN 'Live' ELSE 'Not-Live' END as EmployeeCountCodeDesc
,CASE WHEN stpr.SignalCode='NULL' THEN NULL ELSE stpr.SignalCode END as SignalCode
,CASE WHEN stpr.SignalCode='AGNT' THEN 'Agent'
WHEN stpr.SignalCode='C1Y' THEN 'Cancel 1 Year Only(COYO)'
WHEN stpr.SignalCode='CRO' THEN 'Correspondence Address Is Registered Office'
WHEN stpr.SignalCode='RO' THEN 'Address is Registered Office'
WHEN stpr.SignalCode='DORM' THEN 'Dormant'
WHEN stpr.SignalCode='DEAD' THEN 'Deceased'
WHEN stpr.SignalCode='INSL' THEN 'Insolvent'
WHEN stpr.SignalCode='LONG' THEN 'Long Name'
WHEN stpr.SignalCode='POBF' THEN 'Post in BF Box'
WHEN stpr.SignalCode='ENFT' THEN 'Enforcement'
WHEN stpr.SignalCode='SPEC' THEN 'Special Care'
WHEN stpr.SignalCode='AURP' THEN 'Audit Report'
WHEN stpr.SignalCode='DSSR' THEN 'DSS Report'
WHEN stpr.SignalCode='RCAC' THEN 'Recovery Action'
WHEN stpr.SignalCode='PIOP' THEN 'PAYE Incorrect Operator'
ELSE 'Unknown'
END as SignalCodeDesc
,CASE WHEN stpr.SignalChanged='NULL' THEN NULL ELSE stpr.SignalChanged END
,CASE WHEN stpr.SignalChanged='C' THEN 'Created'
WHEN stpr.SignalChanged='U' THEN 'Updated'
WHEN stpr.SignalChanged='D' THEN 'Deleted'
ELSE 'Unknown'
END as SignalChangedDesc
,CAST((CASE WHEN stpr.SignalStartYear='NULL' THEN NULL ELSE stpr.SignalStartYear END)as Int) as SignalStartYear
,CAST((CASE WHEN stpr.SignalEndYear='NULL' THEN NULL ELSE stpr.SignalEndYear END)as Int) as SignalEndYear
,CASE WHEN stpr.SignalValue='NULL' THEN NULL ELSE stpr.SignalValue END
,CAST((CASE WHEN stpr.EmployerSchemeHistStartYear='NULL' THEN NULL ELSE stpr.EmployerSchemeHistStartYear END) as Int) as EmployerSchemeHistStartYear
,CAST((CASE WHEN stpr.EmployerSchemeHistEndYear='NULL' THEN NULL ELSE stpr.EmployerSchemeHistEndYear END) as Int) as EmployerSchemeHistEndYear
,CAST((CASE WHEN stpr.SchemeType='NULL' THEN NULL ELSE stpr.SchemeType END) as Int) as EmployerSchemeHistType
,CASE WHEN stpr.SchemeType='00' THEN 'No Longer Of Interest to TPR'
WHEN stpr.SchemeType='01' THEN 'P (PAYE)'
WHEN stpr.SchemeType='06' THEN 'PSC (PAYE SUB CONTRACTORS)'
WHEN stpr.SchemeType='02' THEN 'DOME (DOMESTIC)'
WHEN stpr.SchemeType='04' THEN 'NI (NATIONAL INSURANCE)'
WHEN stpr.SchemeType='15' THEN 'ELECT (ELECTORAL)'
WHEN stpr.SchemeType='12' THEN 'EXAM (EXAMINATION)'
WHEN stpr.SchemeType='18' THEN 'PSS (PROFIT SHARING)'
ELSE 'Unknown'
END as EmployerSchemeHistTypeDesc
,stpr.SourceSK
,stpr.RunID
,stpr.SourceFileName
,getdate()
FROM Tpr.StagingData stpr
LEFT
JOIN ShadowTpr.Organisation Org
ON stpr.SourceSK=Org.SourceSK
AND stpr.TPRUniqueID=Org.TPRUniqueId
WHERE stpr.IsValid=1
--AND stpr.SourceSK > @SourceSK
-- ORDER BY stpr.SourceSK
-- IF @@ROWCOUNT > 0
-- SELECT @SourceSK = MAX(SOURCESK)
-- FROM shadow.OrganisationPAYEScheme
-- ELSE
-- SET @Loop = 0
-- END
/* Log Record Counts */
INSERT INTO Mgmt.Log_Record_Counts
(LogId,RunId,SourceTableName,TargetTableName,SourceRecordCount,TargetRecordCount)
SELECT @LogID
,@Run_Id
,'StagingData'
,'Organisation-shadow'
,(SELECT COUNT(*) FROM Tpr.StagingData WHERE RunID=@Run_ID)
,(SELECT COUNT(*) FROM ShadowTpr.Organisation WHERE RunId=@Run_ID)
/* Log Record Counts */
INSERT INTO Mgmt.Log_Record_Counts
(LogId,RunId,SourceTableName,TargetTableName,SourceRecordCount,TargetRecordCount)
SELECT @LogID
,@Run_Id
,'StagingData'
,'OrganisationAddress-shadow'
,(SELECT COUNT(*) FROM Tpr.StagingData WHERE RunID=@Run_ID)
,(SELECT COUNT(*) FROM ShadowTpr.Organisation WHERE RunId=@Run_ID)
/* Log Record Counts */
INSERT INTO Mgmt.Log_Record_Counts
(LogId,RunId,SourceTableName,TargetTableName,SourceRecordCount,TargetRecordCount)
SELECT @LogID
,@Run_Id
,'StagingData'
,'OrganisationPAYEScheme-shadow'
,(SELECT COUNT(*) FROM Tpr.StagingData WHERE RunID=@Run_ID)
,(SELECT COUNT(*) FROM ShadowTpr.OrganisationPAYEScheme WHERE RunId=@Run_ID)
/* Recreate Indexes after finishing Load */
CREATE NONCLUSTERED INDEX NCI_Organisation_AORN ON ShadowTpr.Organisation(AORN)
CREATE NONCLUSTERED INDEX NCI_Organisation_PAYEScheme ON ShadowTpr.OrganisationPAYEScheme(PAYEScheme)
CREATE NONCLUSTERED INDEX NCI_Organisation_SK ON ShadowTpr.Organisation(TPRUniqueID,SourceSK)
CREATE NONCLUSTERED INDEX NCI_Organisation_SK ON ShadowTpr.OrganisationAddress(OrgSK,TPRUniqueId,SourceSK)
CREATE NONCLUSTERED INDEX NCI_Organisation_SK ON ShadowTpr.OrganisationPAYEScheme(OrgSK,TPRUniqueId,SourceSK)
--ALTER INDEX PK_Org_OrgSK ON Shadow.Organisation REBUILD
--ALTER INDEX PK_OrgAdd_OrgAddSK ON Shadow.OrganisationAddress REBUILD
--ALTER INDEX PK_OrgPAYEScheme_OrgSchemeSK ON Shadow.OrganisationPAYEScheme REBUILD
/* Update Log Execution Results as Success if the query ran succesfully*/
UPDATE Mgmt.Log_Execution_Results
SET Execution_Status=1
,EndDateTime=getdate()
,FullJobStatus='Pending- Go To Step5 LoadTargetTables'
WHERE LogId=@LogID
AND RunID=@Run_Id
--COMMIT TRANSACTION
END
ELSE
BEGIN
DECLARE @RangeErrorId int
INSERT INTO Mgmt.Log_Error_Details
(UserName
,ErrorNumber
,ErrorState
,ErrorSeverity
,ErrorLine
,ErrorProcedure
,ErrorMessage
,ErrorDateTime
,Run_Id
)
SELECT
SUSER_SNAME(),
99999,
ERROR_STATE(),
9,
ERROR_LINE(),
'LoadTargetCloneTables' AS ErrorProcedure,
'Valid Staged Records are less than expected',
GETDATE(),
@Run_Id as RunId;
SELECT @RangeErrorId=MAX(ErrorId) FROM Mgmt.Log_Error_Details
/* Update Log Execution Results as Fail if there is an Error*/
UPDATE Mgmt.Log_Execution_Results
SET Execution_Status=0
,EndDateTime=getdate()
,ErrorId=@RangeErrorId
WHERE LogId=@LogID
AND RunID=@Run_Id
END
END TRY
BEGIN CATCH
IF @@TRANCOUNT > 0
ROLLBACK TRAN
DECLARE @ErrorId int
INSERT INTO Mgmt.Log_Error_Details
(UserName
,ErrorNumber
,ErrorState
,ErrorSeverity
,ErrorLine
,ErrorProcedure
,ErrorMessage
,ErrorDateTime
,Run_Id
)
SELECT
SUSER_SNAME(),
ERROR_NUMBER(),
ERROR_STATE(),
ERROR_SEVERITY(),
ERROR_LINE(),
'LoadTargetCloneTables' AS ErrorProcedure,
ERROR_MESSAGE(),
GETDATE(),
@Run_Id as RunId;
SELECT @ErrorId=MAX(ErrorId) FROM Mgmt.Log_Error_Details
/* Update Log Execution Results as Fail if there is an Error*/
UPDATE Mgmt.Log_Execution_Results
SET Execution_Status=0
,EndDateTime=getdate()
,ErrorId=@ErrorId
WHERE LogId=@LogID
AND RunID=@Run_Id
END CATCH
|
USE [Koski_SA]
GO
/****** Object: Table [sa].[temp_tutkinnot_ja_tutkinnonosat_paatason_suoritukset] Script Date: 5.2.2020 15:16:23 ******/
DROP TABLE [sa].[temp_tutkinnot_ja_tutkinnonosat_paatason_suoritukset]
GO
/****** Object: Table [sa].[temp_tutkinnot_ja_tutkinnonosat_paatason_suoritukset] Script Date: 5.2.2020 15:16:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [sa].[temp_tutkinnot_ja_tutkinnonosat_paatason_suoritukset](
[toimipiste_oid] [varchar](max) NULL,
[oppilaitos_oid] [varchar](max) NULL,
[koulutustoimija_oid] [varchar](max) NULL,
[opiskeluoikeus_oid] [varchar](max) NULL,
[ylempi_opiskeluoikeus_oid] [varchar](max) NULL,
[paatason_suoritus_id] [bigint] NULL,
[tutkinto_koodi] [varchar](max) NULL,
[osaamisala_koodiarvo] [int] NULL,
[tutkinto_ja_osaamisala_koodi] [int] NULL,
[eper_tutkinto_ja_osaamisala_koodi] [varchar](41) NULL,
[diaarinumero] [varchar](max) NULL,
[diaarinumero_tutkinto_koodi] [int] NULL,
[diaarinumero_tutkinto_ja_osaamisala_koodi] [int] NULL,
[suorituksen_tyyppi] [varchar](max) NULL,
[kustannusryhma_koodi] [varchar](10) NULL,
[alkup_kustannusryhmakoodi] [varchar](10) NULL,
[suorittaa_koko_tutkintoa] [int] NOT NULL,
[tutkintotyyppi_koodi] [varchar](2) NULL,
[tutkintotyyppi_fi] [nvarchar](60) NULL,
[koulutusluokitus_fi] [nvarchar](200) NULL,
[vahvistus_paiva] [datetime] NULL,
[vahvistus_paiva_muokattu] [datetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
USE [ANTERO]
|
<filename>src/test/resources/sql/select/1812e350.sql
-- file:join.sql ln:135 expect:true
SELECT '' AS "xxx", *
FROM J1_TBL t1 (a, b, c) NATURAL JOIN J2_TBL t2 (d, a)
|
<gh_stars>100-1000
CREATE TABLE [dbo].[sqlwatch_meta_repository_import_queue]
(
[sql_instance] varchar(32) not null,
[object_name] nvarchar(512) not null,
[time_queued] datetime2(7) not null,
[import_batch_id] uniqueidentifier not null,
[parent_object_name] nvarchar(512) null,
[priority] tinyint not null,
[load_type] char(1) not null,
[import_status] varchar(50),
[import_start_time] datetime2(7),
[import_end_time] datetime2(7),
constraint pk_sqlwatch_repository_import_queue primary key clustered (
[sql_instance], [object_name]
)
)
|
<reponame>Arvato-Systems/t9t<filename>t9t-io-jpa/src/main/sql/POSTGRES/Migration/V5.0.20201201_1244__TBE374.sql
-- TBE-374 - new columns in p42_cfg_data_sinks POSTGRES
DROP VIEW IF EXISTS p42_cfg_data_sinks_nt;
DROP VIEW IF EXISTS p42_cfg_data_sinks_v;
ALTER TABLE p42_cfg_data_sinks ADD COLUMN lines_to_skip integer;
ALTER TABLE p42_cfg_data_sinks ADD COLUMN single_line_comment varchar(8);
ALTER TABLE p42_his_data_sinks ADD COLUMN lines_to_skip integer;
ALTER TABLE p42_his_data_sinks ADD COLUMN single_line_comment varchar(8);
COMMENT ON COLUMN p42_cfg_data_sinks.lines_to_skip IS 'skip a number of initial lines. (does not count comment lines)';
COMMENT ON COLUMN p42_cfg_data_sinks.single_line_comment IS 'line starting with this line should be ignored';
|
<gh_stars>1-10
select round ( power( ( 1 + sqrt( 5 ) ) / 2, level ) / sqrt( 5 ) ) fib
from dual
connect by level <= 10;
|
--
-- PostgreSQL database cluster dump
--
SET default_transaction_read_only = off;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
--
-- Drop databases (except postgres and template1)
--
DROP DATABASE sigdiv_development;
DROP DATABASE sigdiv_production;
DROP DATABASE sigdiv_test;
--
-- Drop roles
--
DROP ROLE postgres;
--
-- Roles
--
CREATE ROLE postgres;
ALTER ROLE postgres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN REPLICATION BYPASSRLS PASSWORD '<PASSWORD>';
--
-- Databases
--
--
-- Database "template1" dump
--
--
-- PostgreSQL database dump
--
-- Dumped from database version 13.0 (Debian 13.0-1.pgdg100+1)
-- Dumped by pg_dump version 13.0 (Debian 13.0-1.pgdg100+1)
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;
UPDATE pg_catalog.pg_database SET datistemplate = false WHERE datname = 'template1';
DROP DATABASE template1;
--
-- Name: template1; Type: DATABASE; Schema: -; Owner: postgres
--
CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE = 'en_US.utf8';
ALTER DATABASE template1 OWNER TO postgres;
\connect template1
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;
--
-- Name: DATABASE template1; Type: COMMENT; Schema: -; Owner: postgres
--
COMMENT ON DATABASE template1 IS 'default template for new databases';
--
-- Name: template1; Type: DATABASE PROPERTIES; Schema: -; Owner: postgres
--
ALTER DATABASE template1 IS_TEMPLATE = true;
\connect template1
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;
--
-- Name: DATABASE template1; Type: ACL; Schema: -; Owner: postgres
--
REVOKE CONNECT,TEMPORARY ON DATABASE template1 FROM PUBLIC;
GRANT CONNECT ON DATABASE template1 TO PUBLIC;
--
-- PostgreSQL database dump complete
--
--
-- Database "postgres" dump
--
--
-- PostgreSQL database dump
--
-- Dumped from database version 13.0 (Debian 13.0-1.pgdg100+1)
-- Dumped by pg_dump version 13.0 (Debian 13.0-1.pgdg100+1)
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 postgres;
--
-- Name: postgres; Type: DATABASE; Schema: -; Owner: postgres
--
CREATE DATABASE postgres WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE = 'en_US.utf8';
ALTER DATABASE postgres OWNER TO postgres;
\connect postgres
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;
--
-- Name: DATABASE postgres; Type: COMMENT; Schema: -; Owner: postgres
--
COMMENT ON DATABASE postgres IS 'default administrative connection database';
--
-- PostgreSQL database dump complete
--
--
-- Database "sigdiv_development" dump
--
--
-- PostgreSQL database dump
--
-- Dumped from database version 13.0 (Debian 13.0-1.pgdg100+1)
-- Dumped by pg_dump version 13.0 (Debian 13.0-1.pgdg100+1)
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;
--
-- Name: sigdiv_development; Type: DATABASE; Schema: -; Owner: postgres
--
CREATE DATABASE sigdiv_development WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE = 'en_US.utf8';
ALTER DATABASE sigdiv_development OWNER TO postgres;
\connect sigdiv_development
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: active_storage_attachments; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.active_storage_attachments (
id bigint NOT NULL,
name character varying NOT NULL,
record_type character varying NOT NULL,
record_id bigint NOT NULL,
blob_id bigint NOT NULL,
created_at timestamp without time zone NOT NULL
);
ALTER TABLE public.active_storage_attachments OWNER TO postgres;
--
-- Name: active_storage_attachments_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.active_storage_attachments_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.active_storage_attachments_id_seq OWNER TO postgres;
--
-- Name: active_storage_attachments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.active_storage_attachments_id_seq OWNED BY public.active_storage_attachments.id;
--
-- Name: active_storage_blobs; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.active_storage_blobs (
id bigint NOT NULL,
key character varying NOT NULL,
filename character varying NOT NULL,
content_type character varying,
metadata text,
byte_size bigint NOT NULL,
checksum character varying NOT NULL,
created_at timestamp without time zone NOT NULL
);
ALTER TABLE public.active_storage_blobs OWNER TO postgres;
--
-- Name: active_storage_blobs_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.active_storage_blobs_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.active_storage_blobs_id_seq OWNER TO postgres;
--
-- Name: active_storage_blobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.active_storage_blobs_id_seq OWNED BY public.active_storage_blobs.id;
--
-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.ar_internal_metadata (
key character varying NOT NULL,
value character varying,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
ALTER TABLE public.ar_internal_metadata OWNER TO postgres;
--
-- Name: attachments; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.attachments (
id bigint NOT NULL,
name character varying,
description text,
file character varying,
debt_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.attachments OWNER TO postgres;
--
-- Name: attachments_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.attachments_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.attachments_id_seq OWNER TO postgres;
--
-- Name: attachments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.attachments_id_seq OWNED BY public.attachments.id;
--
-- Name: creditors; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.creditors (
id bigint NOT NULL,
name character varying,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
financial_agent boolean DEFAULT false
);
ALTER TABLE public.creditors OWNER TO postgres;
--
-- Name: creditors_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.creditors_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.creditors_id_seq OWNER TO postgres;
--
-- Name: creditors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.creditors_id_seq OWNED BY public.creditors.id;
--
-- Name: currencies; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.currencies (
id bigint NOT NULL,
name character varying,
formula character varying,
description text,
last_currency character varying,
date_currency date,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.currencies OWNER TO postgres;
--
-- Name: currencies_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.currencies_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.currencies_id_seq OWNER TO postgres;
--
-- Name: currencies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.currencies_id_seq OWNED BY public.currencies.id;
--
-- Name: debts; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.debts (
id bigint NOT NULL,
code integer,
contract_value numeric,
signature_date date,
creditor_id integer,
grace_period date,
amortization_period date,
purpose text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
amortization_type integer,
financial_agent_id integer,
applicable_legislation character varying,
legislation_level integer,
name character varying,
notes text,
category integer,
currency_id integer,
loan_term integer,
interest_rate numeric,
decimal_places integer,
start_amt_next_month_to_grace_period boolean
);
ALTER TABLE public.debts OWNER TO postgres;
--
-- Name: debts_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.debts_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.debts_id_seq OWNER TO postgres;
--
-- Name: debts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.debts_id_seq OWNED BY public.debts.id;
--
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.schema_migrations (
version character varying NOT NULL
);
ALTER TABLE public.schema_migrations OWNER TO postgres;
--
-- Name: transaction_infos; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.transaction_infos (
id bigint NOT NULL,
formula character varying,
payment_day integer,
description text,
debt_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
frequency integer,
category_number integer,
slug character varying,
base numeric,
bind_withdraw boolean
);
ALTER TABLE public.transaction_infos OWNER TO postgres;
--
-- Name: transaction_infos_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.transaction_infos_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.transaction_infos_id_seq OWNER TO postgres;
--
-- Name: transaction_infos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.transaction_infos_id_seq OWNED BY public.transaction_infos.id;
--
-- Name: transaction_items; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.transaction_items (
id bigint NOT NULL,
value numeric,
value_brl numeric,
date date,
exchange_rate numeric,
start_balance numeric,
start_outstanding_balance_brl numeric,
transaction_info_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
internalization_date date,
confirmed boolean,
formula character varying
);
ALTER TABLE public.transaction_items OWNER TO postgres;
--
-- Name: transaction_items_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.transaction_items_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.transaction_items_id_seq OWNER TO postgres;
--
-- Name: transaction_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.transaction_items_id_seq OWNED BY public.transaction_items.id;
--
-- Name: active_storage_attachments id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.active_storage_attachments ALTER COLUMN id SET DEFAULT nextval('public.active_storage_attachments_id_seq'::regclass);
--
-- Name: active_storage_blobs id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.active_storage_blobs ALTER COLUMN id SET DEFAULT nextval('public.active_storage_blobs_id_seq'::regclass);
--
-- Name: attachments id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.attachments ALTER COLUMN id SET DEFAULT nextval('public.attachments_id_seq'::regclass);
--
-- Name: creditors id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.creditors ALTER COLUMN id SET DEFAULT nextval('public.creditors_id_seq'::regclass);
--
-- Name: currencies id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.currencies ALTER COLUMN id SET DEFAULT nextval('public.currencies_id_seq'::regclass);
--
-- Name: debts id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.debts ALTER COLUMN id SET DEFAULT nextval('public.debts_id_seq'::regclass);
--
-- Name: transaction_infos id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.transaction_infos ALTER COLUMN id SET DEFAULT nextval('public.transaction_infos_id_seq'::regclass);
--
-- Name: transaction_items id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.transaction_items ALTER COLUMN id SET DEFAULT nextval('public.transaction_items_id_seq'::regclass);
--
-- Data for Name: active_storage_attachments; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.active_storage_attachments (id, name, record_type, record_id, blob_id, created_at) FROM stdin;
\.
--
-- Data for Name: active_storage_blobs; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.active_storage_blobs (id, key, filename, content_type, metadata, byte_size, checksum, created_at) FROM stdin;
\.
--
-- Data for Name: ar_internal_metadata; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.ar_internal_metadata (key, value, created_at, updated_at) FROM stdin;
environment development 2020-11-05 18:18:51.279647 2020-11-05 18:18:51.279647
\.
--
-- Data for Name: attachments; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.attachments (id, name, description, file, debt_id, created_at, updated_at) FROM stdin;
1 contrato ct_0412.704-29.2013_TransOceânica.pdf 1 2020-01-07 17:18:24.916505 2020-01-07 17:18:24.916505
2 Contrato CAF CONTRATO_CAF_0161-2016_-_ASSINADO_PELO_PREFEITO.pdf 2 2020-03-16 19:12:34.648126 2020-03-16 19:12:34.648126
4 contrato CONTRATO_CAF_0161-2016_-_ASSINADO_PELO_PREFEITO.pdf 3 2020-03-17 18:17:42.515291 2020-03-17 18:17:42.515291
6 teste upload teste de upload 1 PDF_em_Branco.pdf 3 2020-04-28 14:38:11.293423 2020-04-28 14:38:11.293423
7 Contrato de Empréstimo Contrato_de_Emprestimo_2941OC__BR_BID.pdf 5 2020-04-29 16:02:32.157885 2020-04-29 16:02:32.157885
8 Contrato de Emprestimo Contrato valor total de R$ 28.089.000,00 divido em 2 subcréditos, sendo o subcrédito "A" no valor de R$ 6.642.000,00 e subcrédito "B" R$ 21.847.000,00. ct._14.2.01161.1_-_BNDES_pmat.pdf 6 2020-04-29 17:05:40.712469 2020-04-29 17:05:40.712469
9 Contrato de Emprestimo Contrato valor total de R$ 28.089.000,00 divido em 2 subcréditos, sendo o subcrédito "A" no valor de R$ 6.642.000,00 e subcrédito "B" no valor de R$ 21.847.000,00. ct._14.2.01161.1_-_BNDES_pmat.pdf 7 2020-04-29 17:11:19.083227 2020-04-29 17:11:55.553223
10 planilha R.O._Sustentávél_-_CAF.xlsx 4 2020-04-30 01:30:22.41765 2020-04-30 01:30:22.41765
13 planilha planilha_caixa_v2.xlsx 3 2020-05-07 00:28:29.000724 2020-05-07 00:28:29.000724
15 CONTRATO CONTRATO_CAF_0161-2016_-_ASSINADO_PELO_PREFEITO.pdf 8 2020-05-18 03:13:33.091448 2020-05-18 03:13:33.091448
\.
--
-- Data for Name: creditors; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.creditors (id, name, created_at, updated_at, financial_agent) FROM stdin;
1 CAIXA ECONÔMICA FEDERAL 2020-11-05 18:18:51.463421 2020-11-05 18:18:51.463421 t
2 Corporação Andina de Fomento - CAF 2020-11-05 18:18:51.471311 2020-11-05 18:18:51.471311 f
3 BNDES 2020-11-05 18:18:51.475838 2020-11-05 18:18:51.475838 t
4 BANCO DO BRASIL 2020-11-05 18:18:51.480439 2020-11-05 18:18:51.480439 t
5 BID 2020-11-05 18:18:51.485037 2020-11-05 18:18:51.485037 f
\.
--
-- Data for Name: currencies; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.currencies (id, name, formula, description, last_currency, date_currency, created_at, updated_at) FROM stdin;
1 BRL 1 \N \N \N 2020-11-05 18:18:51.504361 2020-11-05 18:18:51.504361
2 USD [BACEN1] \N \N \N 2020-11-05 18:18:51.510309 2020-11-05 18:18:51.510309
3 URTJLP [BNDES314] \N \N \N 2020-11-05 18:18:51.514272 2020-11-05 18:18:51.514272
4 BRL 1 \N \N \N 2020-03-17 16:47:03.982513 2020-03-17 16:47:03.982513
5 USD [BACEN1] \N \N \N 2020-03-17 16:47:03.990784 2020-03-17 16:47:03.990784
6 URTJLP [BNDES314] \N \N \N 2020-03-17 16:47:03.999125 2020-03-17 16:47:03.999125
7 SELIC-2 [BNDES143] \N \N 2020-06-24 23:03:21.770042 2020-06-24 23:08:35.852729
8 LIBOR3 25 A 48M [BNDES038] \N \N 2020-06-24 23:16:34.639846 2020-06-24 23:16:34.639846
\.
--
-- Data for Name: debts; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.debts (id, code, contract_value, signature_date, creditor_id, grace_period, amortization_period, purpose, created_at, updated_at, amortization_type, financial_agent_id, applicable_legislation, legislation_level, name, notes, category, currency_id, loan_term, interest_rate, decimal_places, start_amt_next_month_to_grace_period) FROM stdin;
1 123456 292320000.0 2013-11-19 1 2017-11-19 2033-11-19 Programa destinado à Implantação do Corredor BRT TransOcênica - Charitas/Centro 2020-11-05 18:18:51.564145 2020-11-05 18:18:51.564145 1 \N \N \N Caixa Transoceânica \N 0 1 240 0.005 5 t
2 123789 100000000.0 2016-11-30 2 2021-05-30 2028-11-30 Programa região oceânica sustentável 2020-11-05 18:18:51.575838 2020-11-05 18:18:51.575838 0 1 \N CAF 1 2 16 1.95 2 f
3 123799 26470000.0 2016-11-30 5 2019-04-15 2038-10-15 ProCidades - Programa de Desenvolvimento Urbano e Inclusão Social de Niterói 2020-11-05 18:18:51.585952 2020-11-05 18:18:51.585952 0 4 \N BID 1 2 40 2.75 2 f
4 212345 6242000.0 2014-12-22 3 2017-02-15 2023-11-15 Programa de Modernização da Administração Tributária e da Gestão dos Setores Sociais Básicos - PMAT 2020-11-05 18:18:51.595513 2020-11-05 18:18:51.595513 0 3 \N PMAT - BNDES - SubC. A 0 1 72 2.2 4 f
5 212346 21847000.0 2014-12-22 3 2017-02-15 2023-11-15 Programa de Modernização da Administração Tributária e da Gestão dos Setores Sociais Básicos - PMAT 2020-11-05 18:18:51.613196 2020-11-05 18:18:51.613196 0 3 \N PMAT - BNDES - SubC. B 0 1 72 2.2 6 f
\.
--
-- Data for Name: schema_migrations; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.schema_migrations (version) FROM stdin;
20181123150812
20181123150845
20181204154339
20181204160614
20181204161949
20181204162827
20181204165320
20181204165354
20181204172415
20181214151944
20181214152035
20181214152402
20181217152939
20181218165740
20181221175527
20181221180221
20181227165515
20190109173130
20190110145821
20190116190903
20190117134059
20190122133804
20190122133844
20190218153020
20190218153106
20190218173752
20190218194936
20190219174653
20190225153116
20190227190850
20190227190953
20190227191021
20190227195217
20190228172511
20190228184229
20190326163958
20190326164558
20190329164210
20190329164225
20190329165048
20190329165114
20190404200906
20190409160627
20190409161126
20190509180846
20190509180910
20190509180933
20190509185645
20190509185858
20190509190013
20190524180248
20190524181004
20190527192353
20190605181907
20190605184638
20190606184647
20190607182344
20190802152325
20190802153441
20190802183529
20190806190924
20190806193127
20190813140250
20190814164515
20190910152147
20191008155630
20191025174708
20200310144724
20200310150056
20200506094533
20200604170956
20201008211338
20201102142940
\.
--
-- Data for Name: transaction_infos; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.transaction_infos (id, formula, payment_day, description, debt_id, created_at, updated_at, frequency, category_number, slug, base, bind_withdraw) FROM stdin;
1 15 \N 1 2020-11-05 18:18:51.638577 2020-11-05 18:18:51.638577 \N 1 D \N \N
2 [PGTO] - [SALDO] * [JUROS] 15 \N 1 2020-11-05 18:18:51.644265 2020-11-05 18:18:51.644265 1 2 A \N \N
3 [SALDO] * [JUROS] 15 \N 1 2020-11-05 18:18:51.648851 2020-11-05 18:18:51.648851 1 3 J \N \N
4 [SALDO] * (0.02 / 12) 15 Taxa Adm 1 2020-11-05 18:18:51.653487 2020-11-05 18:18:51.653487 1 4 TA 2.0 \N
5 [SALDO] * (0.007 / 12) 15 Taxa Risco 1 2020-11-05 18:18:51.658032 2020-11-05 18:18:51.658032 1 4 TR 0.7 \N
6 \N \N \N 1 2020-11-05 18:18:51.662678 2020-11-05 18:18:51.662678 \N 5 EE \N \N
7 30 \N 2 2020-11-05 18:18:51.668385 2020-11-05 18:18:51.668385 \N 1 D \N \N
8 [SALDO] / ([PARCELAS] - [N_PARCELA]) 30 \N 2 2020-11-05 18:18:51.673242 2020-11-05 18:18:51.673242 6 2 A \N \N
9 [SALDO] * ((1.95 / 100 / 360) * [DELTA_DATA]) 30 \N 2 2020-11-05 18:18:51.678397 2020-11-05 18:18:51.678397 6 3 J \N \N
10 ([VALOR_CONTRATO] - [SALDO]) * ((0.35 / 100 / 360) * [DELTA_DATA]) 30 Comissão de crédito 2 2020-11-05 18:18:51.683078 2020-11-05 18:18:51.683078 6 4 CC 0.35 t
11 \N \N \N 2 2020-11-05 18:18:51.687857 2020-11-05 18:18:51.687857 \N 5 EE \N \N
12 15 \N 3 2020-11-05 18:18:51.692813 2020-11-05 18:18:51.692813 \N 1 D \N \N
13 [SALDO] / ([PARCELAS] - [N_PARCELA]) 15 \N 3 2020-11-05 18:18:51.697167 2020-11-05 18:18:51.697167 6 2 A \N \N
14 [SALDO] * ((1.95 / 100 / 360) * [DELTA_DATA]) 15 \N 3 2020-11-05 18:18:51.701689 2020-11-05 18:18:51.701689 6 3 J \N \N
15 ([VALOR_CONTRATO] - [SALDO]) * ((0.35 / 100 / 360) * [DELTA_DATA]) 15 Comissão de crédito 3 2020-11-05 18:18:51.706023 2020-11-05 18:18:51.706023 6 4 CC 0.35 t
16 15 \N 4 2020-11-05 18:18:51.710995 2020-11-05 18:18:51.710995 \N 1 D \N \N
17 [SALDO] / ([PARCELAS] - [N_PARCELA]) 15 \N 4 2020-11-05 18:18:51.71543 2020-11-05 18:18:51.71543 1 2 A \N \N
18 [SALDO] * ((1.95 / 100 / 360) * [DELTA_DATA]) 15 \N 4 2020-11-05 18:18:51.720127 2020-11-05 18:18:51.720127 1 3 J \N \N
19 \N \N \N 4 2020-11-05 18:18:51.7245 2020-11-05 18:18:51.7245 \N 5 EE \N \N
20 15 \N 5 2020-11-05 18:18:51.728728 2020-11-05 18:18:51.728728 \N 1 D \N \N
21 [SALDO] / ([PARCELAS] - [N_PARCELA]) 15 \N 5 2020-11-05 18:18:51.733046 2020-11-05 18:18:51.733046 1 2 A \N \N
22 [SALDO] * ((1.95 / 100 / 360) * [DELTA_DATA]) 15 \N 5 2020-11-05 18:18:51.737628 2020-11-05 18:18:51.737628 1 3 J \N \N
23 \N \N \N 5 2020-11-05 18:18:51.742117 2020-11-05 18:18:51.742117 \N 5 EE \N \N
\.
--
-- Data for Name: transaction_items; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.transaction_items (id, value, value_brl, date, exchange_rate, start_balance, start_outstanding_balance_brl, transaction_info_id, created_at, updated_at, internalization_date, confirmed, formula) FROM stdin;
1 38267.1771676987 800224.9 2015-05-08 20.91152155 0.0 \N 1 2020-11-05 18:18:51.771084 2020-11-05 18:18:51.771084 \N t \N
2 100178.304001591 2099165.37 2015-06-19 20.95429136 38267.17717 \N 1 2020-11-05 18:18:51.778805 2020-11-05 18:18:51.778805 \N t \N
3 269454.113840257 5659740.67 2015-07-24 21.00446933 138445.48117 \N 1 2020-11-05 18:18:51.784593 2020-11-05 18:18:51.784593 \N t \N
4 172811.612402003 3636516.2 2015-08-21 21.0432398 407899.59501 \N 1 2020-11-05 18:18:51.790662 2020-11-05 18:18:51.790662 \N t \N
5 388238.148837079 8185330.12 2015-09-22 21.08327104 580711.20741 \N 1 2020-11-05 18:18:51.79615 2020-11-05 18:18:51.79615 \N t \N
6 180241.335471127 3807043.73 2015-10-22 21.12192367 968949.35625 \N 1 2020-11-05 18:18:51.801184 2020-11-05 18:18:51.801184 \N t \N
7 776149.536786542 16418436.94 2015-11-23 21.1537032 1149190.69172 \N 1 2020-11-05 18:18:51.807625 2020-11-05 18:18:51.807625 \N t \N
8 2027839.19399659 42965630.86 2015-12-17 21.18788856 1925340.22851 \N 1 2020-11-05 18:18:51.813246 2020-11-05 18:18:51.813246 \N t \N
9 1480367.51522129 31500447.14 2016-03-15 21.27880193 3953179.4225 \N 1 2020-11-05 18:18:51.818562 2020-11-05 18:18:51.818562 \N t \N
10 1986775.5527745 42393733.38 2016-05-06 21.33795804 5433546.93772 \N 1 2020-11-05 18:18:51.823582 2020-11-05 18:18:51.823582 \N t \N
11 383515.163323288 8207278.03 2016-06-27 21.40013959 7420322.4905 \N 1 2020-11-05 18:18:51.828518 2020-11-05 18:18:51.828518 \N t \N
12 611973.657811069 13121407.28 2016-07-29 21.44113086 7803837.65382 \N 1 2020-11-05 18:18:51.833503 2020-11-05 18:18:51.833503 \N t \N
13 573211.706951141 12319813.16 2016-08-30 21.49260563 8415811.31163 \N 1 2020-11-05 18:18:51.839508 2020-11-05 18:18:51.839508 \N t \N
14 577590.254823738 12435287.93 2016-09-30 21.52960135 8989023.01858 \N 1 2020-11-05 18:18:51.845104 2020-11-05 18:18:51.845104 \N t \N
15 508924.2218972 10973544.54 2016-10-28 21.56223671 9566613.27341 \N 1 2020-11-05 18:18:51.850259 2020-11-05 18:18:51.850259 \N t \N
16 715325.306302176 15447408.0 2016-11-30 21.5949413 10075537.49531 \N 1 2020-11-05 18:18:51.855394 2020-11-05 18:18:51.855394 \N t \N
17 550758.880241646 11909445.03 2016-12-22 21.62370042 10790862.80161 \N 1 2020-11-05 18:18:51.860226 2020-11-05 18:18:51.860226 \N t \N
18 270839.770669423 5869510.23 2017-01-31 21.67152267 11341621.68185 \N 1 2020-11-05 18:18:51.865178 2020-11-05 18:18:51.865178 \N t \N
19 286313.741213063 6207267.82 2017-03-02 21.67995079 11612461.45252 \N 1 2020-11-05 18:18:51.872379 2020-11-05 18:18:51.872379 \N t \N
20 109984.5161992 2388057.81 2017-05-02 21.71267277 11898775.19373 \N 1 2020-11-05 18:18:51.878003 2020-11-05 18:18:51.878003 \N t \N
21 295191.232075548 6417561.7 2017-06-30 21.74035338 12008759.70993 \N 1 2020-11-05 18:18:51.883554 2020-11-05 18:18:51.883554 \N t \N
22 351624.161135471 7653284.73 2017-09-18 21.76552574 12303950.94201 \N 1 2020-11-05 18:18:51.888953 2020-11-05 18:18:51.888953 \N t \N
23 252538.2031043 5496626.76 2017-11-13 21.76552574 12655575.10314 \N 1 2020-11-05 18:18:51.894076 2020-11-05 18:18:51.894076 \N t \N
24 288019.18248541 5496626.76 2018-02-15 1.0 12852099.2879 \N 1 2020-11-05 18:18:51.900057 2020-11-05 18:18:51.900057 \N t \N
25 208970.05587 5496626.76 2018-10-31 1.0 12905242.14372 \N 1 2020-11-05 18:18:51.905553 2020-11-05 18:18:51.905553 \N t \N
26 191.33589 4002.277414461063 2015-05-15 20.9175467 38267.17717 \N 3 2020-11-05 18:18:51.911105 2020-11-05 18:18:51.911105 \N t \N
27 692.22741 14500.1311260631854 2015-06-15 20.94706294 38267.17717 \N 3 2020-11-05 18:18:51.916132 2020-11-05 18:18:51.916132 \N t \N
28 2039.49798 42808.565676517173 2015-07-15 20.98975635 138445.48117 \N 3 2020-11-05 18:18:51.921381 2020-11-05 18:18:51.921381 \N t \N
29 2903.55604 61078.5217087749088 2015-08-15 21.03576472 407899.59501 \N 3 2020-11-05 18:18:51.926335 2020-11-05 18:18:51.926335 \N t \N
30 4844.74678 102096.4708982124998 2015-09-15 21.07364441 580711.20741 \N 3 2020-11-05 18:18:51.932121 2020-11-05 18:18:51.932121 \N t \N
31 5745.95346 121313.9227799800782 2015-10-15 21.11293167 968949.35625 \N 3 2020-11-05 18:18:51.937785 2020-11-05 18:18:51.937785 \N t \N
32 9626.70114 203574.4018255976238 2015-11-15 21.14684967 1149190.69172 \N 3 2020-11-05 18:18:51.943693 2020-11-05 18:18:51.943693 \N t \N
33 19765.89711 418712.0671858526289 2015-12-15 21.18355999 1925340.22851 \N 3 2020-11-05 18:18:51.950552 2020-11-05 18:18:51.950552 \N t \N
34 19765.89711 419474.6082194184171 2016-01-15 21.22213861 3953179.4225 \N 3 2020-11-05 18:18:51.955674 2020-11-05 18:18:51.955674 \N t \N
35 19765.89711 419948.1583964259705 2016-02-15 21.24609655 3953179.4225 \N 3 2020-11-05 18:18:51.96271 2020-11-05 18:18:51.96271 \N t \N
36 19765.89711 420594.6095724494223 2016-03-15 21.27880193 3953179.4225 \N 3 2020-11-05 18:18:51.969386 2020-11-05 18:18:51.969386 \N t \N
37 27167.73469 579157.3761854300146 2016-04-15 21.31783834 5433546.93772 \N 3 2020-11-05 18:18:51.974602 2020-11-05 18:18:51.974602 \N t \N
38 27167.73469 579957.7544933929224 2016-05-15 21.34729896 5433546.93772 \N 3 2020-11-05 18:18:51.98007 2020-11-05 18:18:51.98007 \N t \N
39 37101.61245 793390.650969422583 2016-06-15 21.38426334 7420322.4905 \N 3 2020-11-05 18:18:51.985818 2020-11-05 18:18:51.985818 \N t \N
40 39019.18827 835970.5056917445924 2016-07-15 21.42460012 7803837.65382 \N 3 2020-11-05 18:18:51.992968 2020-11-05 18:18:51.992968 \N t \N
41 42079.05656 903289.8357896383544 2016-08-15 21.46649449 8415811.31163 \N 3 2020-11-05 18:18:51.998459 2020-11-05 18:18:51.998459 \N t \N
42 44945.11509 966853.0554109991139 2016-09-15 21.51186071 8989023.01858 \N 3 2020-11-05 18:18:52.004054 2020-11-05 18:18:52.004054 \N t \N
43 47833.06637 1030645.697382419674 2016-10-15 21.5467202 9566613.27341 \N 3 2020-11-05 18:18:52.00939 2020-11-05 18:18:52.00939 \N t \N
44 50377.68748 1087127.27170447172 2016-11-15 21.579539 10075537.49531 \N 3 2020-11-05 18:18:52.014538 2020-11-05 18:18:52.014538 \N t \N
45 53954.31401 1166202.2024109351385 2016-12-15 21.61462385 10790862.80161 \N 3 2020-11-05 18:18:52.020568 2020-11-05 18:18:52.020568 \N t \N
46 56708.10841 1227907.7786289570253 2017-01-15 21.65312533 11341621.68185 \N 3 2020-11-05 18:18:52.027153 2020-11-05 18:18:52.027153 \N t \N
47 58062.30726 1258606.8782655311022 2017-02-15 21.67683197 11612461.45252 \N 3 2020-11-05 18:18:52.032649 2020-11-05 18:18:52.032649 \N t \N
48 59493.87597 1290663.3073926878055 2017-03-15 21.69405315 11898775.19373 \N 3 2020-11-05 18:18:52.038527 2020-11-05 18:18:52.038527 \N t \N
49 60043.79855 1303711.3497839504835 2017-04-15 21.71267277 12008759.70993 \N 3 2020-11-05 18:18:52.051615 2020-11-05 18:18:52.051615 \N t \N
50 60043.79855 1304118.727142658712 2017-05-15 21.71945744 12008759.70993 \N 3 2020-11-05 18:18:52.058107 2020-11-05 18:18:52.058107 \N t \N
51 60043.79855 1305040.3496140484155 2017-06-15 21.73480661 12008759.70993 \N 3 2020-11-05 18:18:52.063746 2020-11-05 18:18:52.063746 \N t \N
52 61519.75471 1337892.0608484309048 2017-07-17 21.74735688 12303950.94201 \N 3 2020-11-05 18:18:52.070914 2020-11-05 18:18:52.070914 \N t \N
53 61519.75471 1338624.7303671496498 2017-08-15 21.75926638 12303950.94201 \N 3 2020-11-05 18:18:52.075883 2020-11-05 18:18:52.075883 \N t \N
54 61519.75471 1339009.8046589912354 2017-09-15 21.76552574 12303950.94201 \N 3 2020-11-05 18:18:52.081231 2020-11-05 18:18:52.081231 \N t \N
55 63277.87552 1377276.2284030758848 2017-10-16 21.76552574 12655575.10314 \N 3 2020-11-05 18:18:52.086849 2020-11-05 18:18:52.086849 \N t \N
56 63277.87552 1377276.2284030758848 2017-11-16 21.76552574 12655575.10314 \N 3 2020-11-05 18:18:52.092829 2020-11-05 18:18:52.092829 \N t \N
57 64540.5665312297 1404759.362109662549202478 2017-12-15 21.76552574 12908113.30625 \N 3 2020-11-05 18:18:52.098003 2020-11-05 18:18:52.098003 \N t \N
58 64400.8806999382 1401719.026553174108509268 2018-01-15 21.76552574 12880176.13999 \N 3 2020-11-05 18:18:52.10325 2020-11-05 18:18:52.10325 \N t \N
59 64740.5284102816 1409111.637535185445448384 2018-02-15 21.76552574 12852099.2879 \N 3 2020-11-05 18:18:52.108108 2020-11-05 18:18:52.108108 \N t \N
60 65556.3443889012 1426868.301216933638916888 2018-03-15 21.76552574 13111268.87778 \N 3 2020-11-05 18:18:52.113711 2020-11-05 18:18:52.113711 \N t \N
61 65411.3751860724 1423712.970301256111703576 2018-04-15 21.76552574 13082275.03721 \N 3 2020-11-05 18:18:52.11868 2020-11-05 18:18:52.11868 \N t \N
62 65265.6811372294 1420541.862730998977984756 2018-05-15 21.76552574 13053136.22745 \N 3 2020-11-05 18:18:52.124679 2020-11-05 18:18:52.124679 \N t \N
63 65119.2586181423 1417354.899622893061632802 2018-06-15 21.76552574 13023851.72363 \N 3 2020-11-05 18:18:52.129472 2020-11-05 18:18:52.129472 \N t \N
64 64972.10399 1414152.0017763017026 2018-07-16 21.76552574 12994420.79729 \N 3 2020-11-05 18:18:52.134302 2020-11-05 18:18:52.134302 \N t \N
65 64824.21358 1410933.0892507475492 2018-08-15 21.76552574 12964842.71632 \N 3 2020-11-05 18:18:52.139246 2020-11-05 18:18:52.139246 \N t \N
66 64675.58372 1407698.0822071849528 2018-09-17 21.76552574 12935116.74495 \N 3 2020-11-05 18:18:52.144359 2020-11-05 18:18:52.144359 \N t \N
67 64526.21072 1404446.9003308239328 2018-10-15 21.76552574 12905242.14372 \N 3 2020-11-05 18:18:52.149295 2020-11-05 18:18:52.149295 \N t \N
68 64863.68764 1411792.2629197398536 2018-11-16 21.76552574 13084188.22536 \N 3 2020-11-05 18:18:52.15473 2020-11-05 18:18:52.15473 \N t \N
69 65267.62197 1420584.1059766245078 2018-12-15 21.76552574 13053524.39336 \N 3 2020-11-05 18:18:52.159649 2020-11-05 18:18:52.159649 \N t \N
70 65113.53621 1417230.3484011770454 2019-01-15 21.76552574 13022707.24221 \N 3 2020-11-05 18:18:52.164521 2020-11-05 18:18:52.164521 \N t \N
71 64958.68003 1413859.8222293889722 2019-02-15 21.76552574 12991736.0053 \N 3 2020-11-05 18:18:52.170963 2020-11-05 18:18:52.170963 \N t \N
72 64803.04956 1410472.4432286756744 2019-03-15 21.76552574 12960609.91221 \N 3 2020-11-05 18:18:52.177083 2020-11-05 18:18:52.177083 \N t \N
73 64646.64094 1407068.1273841077956 2019-04-15 21.76552574 12929328.18865 \N 3 2020-11-05 18:18:52.182219 2020-11-05 18:18:52.182219 \N t \N
74 64489.45028 1403646.7900277902072 2019-05-15 21.76552574 12897890.05647 \N 3 2020-11-05 18:18:52.187511 2020-11-05 18:18:52.187511 \N t \N
75 64331.47367 1400208.3460565172658 2019-06-15 21.76552574 12866294.73363 \N 3 2020-11-05 18:18:52.192511 2020-11-05 18:18:52.192511 \N t \N
76 64172.70717 1396752.7097141175558 2019-07-15 21.76552574 12834541.43418 \N 3 2020-11-05 18:18:52.197746 2020-11-05 18:18:52.197746 \N t \N
77 63.77863 1334.092471487021 2015-05-15 20.9175467 38267.17717 \N 4 2020-11-05 18:18:52.202695 2020-11-05 18:18:52.202695 \N t \N
78 230.74247 4833.3770420210618 2015-06-15 20.94706294 38267.17717 \N 4 2020-11-05 18:18:52.208887 2020-11-05 18:18:52.208887 \N t \N
79 679.83266 14269.521892172391 2015-07-15 20.98975635 138445.48117 \N 4 2020-11-05 18:18:52.214326 2020-11-05 18:18:52.214326 \N t \N
80 967.85201 20359.5071661390872 2015-08-15 21.03576472 407899.59501 \N 4 2020-11-05 18:18:52.219672 2020-11-05 18:18:52.219672 \N t \N
81 1614.91559 34032.1568958253519 2015-09-15 21.07364441 580711.20741 \N 4 2020-11-05 18:18:52.224458 2020-11-05 18:18:52.224458 \N t \N
82 1915.31782 40437.9742599933594 2015-10-15 21.11293167 968949.35625 \N 4 2020-11-05 18:18:52.229311 2020-11-05 18:18:52.229311 \N t \N
83 3208.90038 67858.1339418658746 2015-11-15 21.14684967 1149190.69172 \N 4 2020-11-05 18:18:52.234583 2020-11-05 18:18:52.234583 \N t \N
84 6588.63237 139570.6890619508763 2015-12-15 21.18355999 1925340.22851 \N 4 2020-11-05 18:18:52.240683 2020-11-05 18:18:52.240683 \N t \N
85 6588.63237 139824.8694064728057 2016-01-15 21.22213861 3953179.4225 \N 4 2020-11-05 18:18:52.246078 2020-11-05 18:18:52.246078 \N t \N
86 6588.63237 139982.7194654753235 2016-02-15 21.24609655 3953179.4225 \N 4 2020-11-05 18:18:52.251305 2020-11-05 18:18:52.251305 \N t \N
87 6588.63237 140198.2031908164741 2016-03-15 21.27880193 3953179.4225 \N 4 2020-11-05 18:18:52.256296 2020-11-05 18:18:52.256296 \N t \N
88 9055.91156 193052.4586574172104 2016-04-15 21.31783834 5433546.93772 \N 4 2020-11-05 18:18:52.26125 2020-11-05 18:18:52.26125 \N t \N
89 9055.91156 193319.2514266399776 2016-05-15 21.34729896 5433546.93772 \N 4 2020-11-05 18:18:52.268496 2020-11-05 18:18:52.268496 \N t \N
90 12367.20415 264463.550323140861 2016-06-15 21.38426334 7420322.4905 \N 4 2020-11-05 18:18:52.274517 2020-11-05 18:18:52.274517 \N t \N
91 13006.39609 278656.8352305815308 2016-07-15 21.42460012 7803837.65382 \N 4 2020-11-05 18:18:52.280284 2020-11-05 18:18:52.280284 \N t \N
92 14026.35219 301096.6120014344331 2016-08-15 21.46649449 8415811.31163 \N 4 2020-11-05 18:18:52.285733 2020-11-05 18:18:52.285733 \N t \N
93 14981.70503 322284.3518036663713 2016-09-15 21.51186071 8989023.01858 \N 4 2020-11-05 18:18:52.290493 2020-11-05 18:18:52.290493 \N t \N
94 15944.35546 343548.565865962292 2016-10-15 21.5467202 9566613.27341 \N 4 2020-11-05 18:18:52.295359 2020-11-05 18:18:52.295359 \N t \N
95 16792.56249 362375.75716289211 2016-11-15 21.579539 10075537.49531 \N 4 2020-11-05 18:18:52.300837 2020-11-05 18:18:52.300837 \N t \N
96 17984.77134 388734.067542360459 2016-12-15 21.61462385 10790862.80161 \N 4 2020-11-05 18:18:52.30635 2020-11-05 18:18:52.30635 \N t \N
97 18902.7028 409302.592804141924 2017-01-15 21.65312533 11341621.68185 \N 4 2020-11-05 18:18:52.311765 2020-11-05 18:18:52.311765 \N t \N
98 19354.10242 419535.6260885103674 2017-02-15 21.67683197 11612461.45252 \N 4 2020-11-05 18:18:52.316845 2020-11-05 18:18:52.316845 \N t \N
99 19831.29199 430221.1024642292685 2017-03-15 21.69405315 11898775.19373 \N 4 2020-11-05 18:18:52.321889 2020-11-05 18:18:52.321889 \N t \N
100 20014.59952 434570.4500003590704 2017-04-15 21.71267277 12008759.70993 \N 4 2020-11-05 18:18:52.326724 2020-11-05 18:18:52.326724 \N t \N
101 20014.59952 434706.2424532844288 2017-05-15 21.71945744 12008759.70993 \N 4 2020-11-05 18:18:52.33234 2020-11-05 18:18:52.33234 \N t \N
102 20014.59952 435013.4499437988272 2017-06-15 21.73480661 12008759.70993 \N 4 2020-11-05 18:18:52.337908 2020-11-05 18:18:52.337908 \N t \N
103 20506.5849 445964.020210319112 2017-07-17 21.74735688 12303950.94201 \N 4 2020-11-05 18:18:52.343474 2020-11-05 18:18:52.343474 \N t \N
104 20506.5849 446208.243383185662 2017-08-15 21.75926638 12303950.94201 \N 4 2020-11-05 18:18:52.348571 2020-11-05 18:18:52.348571 \N t \N
105 20506.5849 446336.601480445326 2017-09-15 21.76552574 12303950.94201 \N 4 2020-11-05 18:18:52.353866 2020-11-05 18:18:52.353866 \N t \N
106 21092.62517 459092.0760618068758 2017-10-16 21.76552574 12655575.10314 \N 4 2020-11-05 18:18:52.35927 2020-11-05 18:18:52.35927 \N t \N
107 21092.62517 459092.0760618068758 2017-11-16 21.76552574 12655575.10314 \N 4 2020-11-05 18:18:52.364766 2020-11-05 18:18:52.364766 \N t \N
108 21513.52218 468253.1207668509132 2017-12-15 21.76552574 12908113.30625 \N 4 2020-11-05 18:18:52.372012 2020-11-05 18:18:52.372012 \N t \N
109 21466.96023 467239.6754456213202 2018-01-15 21.76552574 12880176.13999 \N 4 2020-11-05 18:18:52.37767 2020-11-05 18:18:52.37767 \N t \N
110 21580.17614 469703.8792489038436 2018-02-15 21.76552574 12852099.2879 \N 4 2020-11-05 18:18:52.382486 2020-11-05 18:18:52.382486 \N t \N
111 21852.1148 475622.767152834952 2018-03-15 21.76552574 13111268.87778 \N 4 2020-11-05 18:18:52.387725 2020-11-05 18:18:52.387725 \N t \N
112 21803.79173 474570.9901289141302 2018-04-15 21.76552574 13082275.03721 \N 4 2020-11-05 18:18:52.393708 2020-11-05 18:18:52.393708 \N t \N
113 21755.22705 473513.954336319267 2018-05-15 21.76552574 13053136.22745 \N 4 2020-11-05 18:18:52.399039 2020-11-05 18:18:52.399039 \N t \N
114 21706.41954 472451.6332211089596 2018-06-15 21.76552574 13023851.72363 \N 4 2020-11-05 18:18:52.404271 2020-11-05 18:18:52.404271 \N t \N
115 21657.368 471384.00066465232 2018-07-16 21.76552574 12994420.79729 \N 4 2020-11-05 18:18:52.409518 2020-11-05 18:18:52.409518 \N t \N
116 21608.07119 470311.0296776974306 2018-08-15 21.76552574 12964842.71632 \N 4 2020-11-05 18:18:52.414472 2020-11-05 18:18:52.414472 \N t \N
117 21558.52791 469232.6941416134034 2018-09-17 21.76552574 12935116.74495 \N 4 2020-11-05 18:18:52.419704 2020-11-05 18:18:52.419704 \N t \N
118 21508.73691 468148.9668494930634 2018-10-15 21.76552574 12905242.14372 \N 4 2020-11-05 18:18:52.425763 2020-11-05 18:18:52.425763 \N t \N
119 21621.22921 470597.4209006948654 2018-11-16 21.76552574 13084188.22536 \N 4 2020-11-05 18:18:52.431378 2020-11-05 18:18:52.431378 \N t \N
120 21755.87399 473528.0353255415026 2018-12-15 21.76552574 13053524.39336 \N 4 2020-11-05 18:18:52.436836 2020-11-05 18:18:52.436836 \N t \N
121 21704.51207 472410.1161337256818 2019-01-15 21.76552574 13022707.24221 \N 4 2020-11-05 18:18:52.441966 2020-11-05 18:18:52.441966 \N t \N
122 21652.89334 471286.6073372445716 2019-02-15 21.76552574 12991736.0053 \N 4 2020-11-05 18:18:52.447148 2020-11-05 18:18:52.447148 \N t \N
123 21601.01652 470157.4810762252248 2019-03-15 21.76552574 12960609.91221 \N 4 2020-11-05 18:18:52.453481 2020-11-05 18:18:52.453481 \N t \N
124 21548.88031 469022.7090554841794 2019-04-15 21.76552574 12929328.18865 \N 4 2020-11-05 18:18:52.460536 2020-11-05 18:18:52.460536 \N t \N
125 21496.48343 467882.2634151484882 2019-05-15 21.76552574 12897890.05647 \N 4 2020-11-05 18:18:52.472856 2020-11-05 18:18:52.472856 \N t \N
126 21443.82456 466736.1154247241744 2019-06-15 21.76552574 12866294.73363 \N 4 2020-11-05 18:18:52.477948 2020-11-05 18:18:52.477948 \N t \N
127 21390.90239 465584.2365713725186 2019-07-15 21.76552574 12834541.43418 \N 4 2020-11-05 18:18:52.484128 2020-11-05 18:18:52.484128 \N t \N
128 22.32252 466.932354561684 2015-05-15 20.9175467 38267.17717 \N 5 2020-11-05 18:18:52.490673 2020-11-05 18:18:52.490673 \N t \N
129 80.75986 1691.6818704455884 2015-06-15 20.94706294 38267.17717 \N 5 2020-11-05 18:18:52.496272 2020-11-05 18:18:52.496272 \N t \N
130 237.94143 4994.3326412705805 2015-07-15 20.98975635 138445.48117 \N 5 2020-11-05 18:18:52.501556 2020-11-05 18:18:52.501556 \N t \N
131 338.7482 7125.827434523504 2015-08-15 21.03576472 407899.59501 \N 5 2020-11-05 18:18:52.50651 2020-11-05 18:18:52.50651 \N t \N
132 565.22046 11911.2549872966286 2015-09-15 21.07364441 580711.20741 \N 5 2020-11-05 18:18:52.511649 2020-11-05 18:18:52.511649 \N t \N
133 670.36124 14153.2910543364708 2015-10-15 21.11293167 968949.35625 \N 5 2020-11-05 18:18:52.51779 2020-11-05 18:18:52.51779 \N t \N
134 1123.11513 23750.3468162125071 2015-11-15 21.14684967 1149190.69172 \N 5 2020-11-05 18:18:52.523991 2020-11-05 18:18:52.523991 \N t \N
135 2306.02133 48849.7411822745867 2015-12-15 21.18355999 1925340.22851 \N 5 2020-11-05 18:18:52.529403 2020-11-05 18:18:52.529403 \N t \N
136 2306.02133 48938.7043028765513 2016-01-15 21.22213861 3953179.4225 \N 5 2020-11-05 18:18:52.534541 2020-11-05 18:18:52.534541 \N t \N
137 2306.02133 48993.9518235394115 2016-02-15 21.24609655 3953179.4225 \N 5 2020-11-05 18:18:52.5394 2020-11-05 18:18:52.5394 \N t \N
138 2306.02133 49069.3711274251669 2016-03-15 21.27880193 3953179.4225 \N 5 2020-11-05 18:18:52.545065 2020-11-05 18:18:52.545065 \N t \N
139 3169.56905 67568.360615367377 2016-04-15 21.31783834 5433546.93772 \N 5 2020-11-05 18:18:52.550707 2020-11-05 18:18:52.550707 \N t \N
140 3169.56905 67661.738084713188 2016-05-15 21.34729896 5433546.93772 \N 5 2020-11-05 18:18:52.555813 2020-11-05 18:18:52.555813 \N t \N
141 4328.52145 92562.242559638643 2016-06-15 21.38426334 7420322.4905 \N 5 2020-11-05 18:18:52.56122 2020-11-05 18:18:52.56122 \N t \N
142 4552.23863 97529.8922985666356 2016-07-15 21.42460012 7803837.65382 \N 5 2020-11-05 18:18:52.568383 2020-11-05 18:18:52.568383 \N t \N
143 4909.22327 105383.8142756347823 2016-08-15 21.46649449 8415811.31163 \N 5 2020-11-05 18:18:52.573349 2020-11-05 18:18:52.573349 \N t \N
144 5243.59676 112799.5231205272996 2016-09-15 21.51186071 8989023.01858 \N 5 2020-11-05 18:18:52.579817 2020-11-05 18:18:52.579817 \N t \N
145 5580.52441 120241.998031540082 2016-10-15 21.5467202 9566613.27341 \N 5 2020-11-05 18:18:52.585345 2020-11-05 18:18:52.585345 \N t \N
146 5877.39687 126831.51497464293 2016-11-15 21.579539 10075537.49531 \N 5 2020-11-05 18:18:52.590285 2020-11-05 18:18:52.590285 \N t \N
147 6294.66997 136056.9236614407845 2016-12-15 21.61462385 10790862.80161 \N 5 2020-11-05 18:18:52.595205 2020-11-05 18:18:52.595205 \N t \N
148 6615.94598 143255.9074814496734 2017-01-15 21.65312533 11341621.68185 \N 5 2020-11-05 18:18:52.600233 2020-11-05 18:18:52.600233 \N t \N
149 6773.93585 146837.4691960091245 2017-02-15 21.67683197 11612461.45252 \N 5 2020-11-05 18:18:52.605556 2020-11-05 18:18:52.605556 \N t \N
150 6940.9522 150577.38593840943 2017-03-15 21.69405315 11898775.19373 \N 5 2020-11-05 18:18:52.614211 2020-11-05 18:18:52.614211 \N t \N
151 7005.10983 152099.6574567003291 2017-04-15 21.71267277 12008759.70993 \N 5 2020-11-05 18:18:52.620062 2020-11-05 18:18:52.620062 \N t \N
152 7005.10983 152147.1848152106352 2017-05-15 21.71945744 12008759.70993 \N 5 2020-11-05 18:18:52.62498 2020-11-05 18:18:52.62498 \N t \N
153 7005.10983 152254.7074368599763 2017-06-15 21.73480661 12008759.70993 \N 5 2020-11-05 18:18:52.629824 2020-11-05 18:18:52.629824 \N t \N
154 7177.30472 156087.4071823484736 2017-07-17 21.74735688 12303950.94201 \N 5 2020-11-05 18:18:52.634974 2020-11-05 18:18:52.634974 \N t \N
155 7177.30472 156172.8852929113136 2017-08-15 21.75926638 12303950.94201 \N 5 2020-11-05 18:18:52.64065 2020-11-05 18:18:52.64065 \N t \N
156 7177.30472 156217.8106269834928 2017-09-15 21.76552574 12303950.94201 \N 5 2020-11-05 18:18:52.646428 2020-11-05 18:18:52.646428 \N t \N
157 7382.41881 159066.912498286962 2017-10-16 21.5467202 12655575.10314 \N 5 2020-11-05 18:18:52.652073 2020-11-05 18:18:52.652073 \N t \N
158 7382.41881 160682.2266325151694 2017-11-16 21.76552574 12655575.10314 \N 5 2020-11-05 18:18:52.656713 2020-11-05 18:18:52.656713 \N t \N
159 7529.73276 163888.5922031012424 2017-12-15 21.76552574 12908113.30625 \N 5 2020-11-05 18:18:52.661557 2020-11-05 18:18:52.661557 \N t \N
160 7513.43608 163533.8863950846992 2018-01-15 21.76552574 12880176.13999 \N 5 2020-11-05 18:18:52.668301 2020-11-05 18:18:52.668301 \N t \N
161 7665.06911 166834.2590125838914 2018-02-15 21.76552574 12852099.2879 \N 5 2020-11-05 18:18:52.674115 2020-11-05 18:18:52.674115 \N t \N
162 7648.24018 166467.9685034922332 2018-03-15 21.76552574 13111268.87778 \N 5 2020-11-05 18:18:52.679853 2020-11-05 18:18:52.679853 \N t \N
163 7631.32711 166099.8466430648114 2018-04-15 21.76552574 13082275.03721 \N 5 2020-11-05 18:18:52.685655 2020-11-05 18:18:52.685655 \N t \N
164 7614.32947 165729.8840721255578 2018-05-15 21.76552574 13053136.22745 \N 5 2020-11-05 18:18:52.691184 2020-11-05 18:18:52.691184 \N t \N
165 7597.24684 165358.0716491536616 2018-06-15 21.76552574 13023851.72363 \N 5 2020-11-05 18:18:52.696512 2020-11-05 18:18:52.696512 \N t \N
166 7580.0788 164984.400232628312 2018-07-16 21.76552574 12994420.79729 \N 5 2020-11-05 18:18:52.702211 2020-11-05 18:18:52.702211 \N t \N
167 7562.82492 164608.8604633734408 2018-08-15 21.76552574 12964842.71632 \N 5 2020-11-05 18:18:52.708017 2020-11-05 18:18:52.708017 \N t \N
168 7545.48477 164231.4429822129798 2018-09-17 21.76552574 12935116.74495 \N 5 2020-11-05 18:18:52.713259 2020-11-05 18:18:52.713259 \N t \N
169 7528.05792 163852.1384299708608 2018-10-15 21.76552574 12905242.14372 \N 5 2020-11-05 18:18:52.718611 2020-11-05 18:18:52.718611 \N t \N
170 7632.44313 166124.1374051011662 2018-11-16 21.76552574 13084188.22536 \N 5 2020-11-05 18:18:52.72368 2020-11-05 18:18:52.72368 \N t \N
171 7614.5559 165734.812440118866 2018-12-15 21.76552574 13053524.39336 \N 5 2020-11-05 18:18:52.728845 2020-11-05 18:18:52.728845 \N t \N
172 7596.57922 165343.5405488591228 2019-01-15 21.76552574 13022707.24221 \N 5 2020-11-05 18:18:52.734585 2020-11-05 18:18:52.734585 \N t \N
173 7578.51267 164950.3125898011258 2019-02-15 21.76552574 12991736.0053 \N 5 2020-11-05 18:18:52.739851 2020-11-05 18:18:52.739851 \N t \N
174 7560.35578 164555.1183331477772 2019-03-15 21.76552574 12960609.91221 \N 5 2020-11-05 18:18:52.745161 2020-11-05 18:18:52.745161 \N t \N
175 7542.10811 164157.9482020677514 2019-04-15 21.76552574 12929328.18865 \N 5 2020-11-05 18:18:52.750245 2020-11-05 18:18:52.750245 \N t \N
176 7523.7692 163758.792184419208 2019-05-15 21.76552574 12897890.05647 \N 5 2020-11-05 18:18:52.755357 2020-11-05 18:18:52.755357 \N t \N
177 7505.33859 163357.6402680603066 2019-06-15 21.76552574 12866294.73363 \N 5 2020-11-05 18:18:52.761159 2020-11-05 18:18:52.761159 \N t \N
178 7486.81584 162954.4828761597216 2019-07-15 21.76552574 12834541.43418 \N 5 2020-11-05 18:18:52.768251 2020-11-05 18:18:52.768251 \N t \N
179 27937.1662582689 608067.111297011230791486 2017-12-15 21.76552574 12908113.30625 \N 2 2020-11-05 18:18:52.774172 2020-11-05 18:18:52.774172 \N t \N
180 28076.8520900616 611107.446864408552985584 2018-01-15 21.76552574 12880176.13999 \N 2 2020-11-05 18:18:52.77999 2020-11-05 18:18:52.77999 \N t \N
181 28849.5926027462 627926.550383586010787188 2018-02-15 21.76552574 12852099.2879 \N 2 2020-11-05 18:18:52.785389 2020-11-05 18:18:52.785389 \N t \N
182 28993.8405657599 631066.183135503266109826 2018-03-15 21.76552574 13111268.87778 \N 2 2020-11-05 18:18:52.791464 2020-11-05 18:18:52.791464 \N t \N
183 29138.8097685887 634221.514051180793323138 2018-04-15 21.76552574 13082275.03721 \N 2 2020-11-05 18:18:52.797386 2020-11-05 18:18:52.797386 \N t \N
184 29284.5038174316 637392.621621435750489384 2018-05-15 21.76552574 13053136.22745 \N 2 2020-11-05 18:18:52.802983 2020-11-05 18:18:52.802983 \N t \N
185 29430.9263365188 640579.584729543843393912 2018-06-15 21.76552574 13023851.72363 \N 2 2020-11-05 18:18:52.807969 2020-11-05 18:18:52.807969 \N t \N
186 29578.08097 643782.4826923391678 2018-07-16 21.76552574 12994420.79729 \N 2 2020-11-05 18:18:52.813099 2020-11-05 18:18:52.813099 \N t \N
187 29725.97137 647001.3950002380638 2018-08-15 21.76552574 12964842.71632 \N 2 2020-11-05 18:18:52.818324 2020-11-05 18:18:52.818324 \N t \N
188 29874.60123 650236.4020438006602 2018-09-17 21.76552574 12935116.74495 \N 2 2020-11-05 18:18:52.82444 2020-11-05 18:18:52.82444 \N t \N
189 30023.97424 653487.5841378169376 2018-10-15 21.76552574 12905242.14372 \N 2 2020-11-05 18:18:52.830182 2020-11-05 18:18:52.830182 \N t \N
190 30663.83199 667414.4244653804226 2018-11-16 21.76552574 13084188.22536 \N 2 2020-11-05 18:18:52.835728 2020-11-05 18:18:52.835728 \N t \N
191 30817.15115 670751.496588795601 2018-12-15 21.76552574 13053524.39336 \N 2 2020-11-05 18:18:52.840766 2020-11-05 18:18:52.840766 \N t \N
192 30971.236912 674105.25420777411488 2019-01-15 21.76552574 13022707.24221 \N 2 2020-11-05 18:18:52.845971 2020-11-05 18:18:52.845971 \N t \N
193 31126.09309 677475.7803360311366 2019-02-15 21.76552574 12991736.0053 \N 2 2020-11-05 18:18:52.851766 2020-11-05 18:18:52.851766 \N t \N
194 31281.72356 680863.1593367444344 2019-03-15 21.76552574 12960609.91221 \N 2 2020-11-05 18:18:52.857503 2020-11-05 18:18:52.857503 \N t \N
195 31438.13218 684267.4751813123132 2019-04-15 21.76552574 12929328.18865 \N 2 2020-11-05 18:18:52.863036 2020-11-05 18:18:52.863036 \N t \N
196 31595.32284 687688.8125376299016 2019-05-15 21.76552574 12897890.05647 \N 2 2020-11-05 18:18:52.870004 2020-11-05 18:18:52.870004 \N t \N
197 31753.29945 691127.256508902843 2019-06-15 21.76552574 12866294.73363 \N 2 2020-11-05 18:18:52.875368 2020-11-05 18:18:52.875368 \N t \N
198 31912.06595 694582.892851302553 2019-07-15 21.76552574 12834541.43418 \N 2 2020-11-05 18:18:52.881019 2020-11-05 18:18:52.881019 \N t \N
199 2408990.48 7836446.03144 2017-05-30 3.253 0.0 \N 7 2020-11-05 18:18:52.887268 2020-11-05 18:18:52.887268 \N t \N
200 11015060.44 36140413.30364 2017-06-05 3.281 2408990.48 \N 7 2020-11-05 18:18:52.896237 2020-11-05 18:18:52.896237 \N t \N
201 4029385.92 13081401.38928 2017-10-20 3.2465 13424050.92 \N 7 2020-11-05 18:18:52.901217 2020-11-05 18:18:52.901217 \N t \N
202 2581628.5 8281864.228 2017-11-22 3.208 17453436.84 \N 7 2020-11-05 18:18:52.905808 2020-11-05 18:18:52.905808 \N t \N
203 4685650.71 15518875.15152 2017-12-20 3.312 20035065.34 \N 7 2020-11-05 18:18:52.910675 2020-11-05 18:18:52.910675 2017-12-22 t \N
204 1380706.92 4960879.96356 2018-05-04 3.593 24720716.05 \N 7 2020-11-05 18:18:52.916719 2020-11-05 18:18:52.916719 2018-05-09 t \N
205 3987951.0 15403460.7375 2018-07-05 3.8625 26101422.97 \N 7 2020-11-05 18:18:52.922355 2020-11-05 18:18:52.922355 2018-07-11 t \N
206 6500000.0 23981750.0 2018-10-26 3.6895 30089373.97 \N 7 2020-11-05 18:18:52.927493 2020-11-05 18:18:52.927493 2018-10-30 t \N
207 3350000.0 12830500.0 2019-03-12 3.83 36589373.97 \N 7 2020-11-05 18:18:52.932328 2020-11-05 18:18:52.932328 2018-03-18 t \N
208 215629.57 697130.39981 2017-11-30 3.233 17453436.84 \N 9 2020-11-05 18:18:52.937359 2020-11-05 18:18:52.937359 \N t \N
209 434329.9 1617010.2177 2018-05-30 3.723 24720716.05 \N 9 2020-11-05 18:18:52.941946 2020-11-05 18:18:52.941946 \N t \N
210 638654.3 2471911.46815 2018-11-30 3.8705 36589373.97 \N 9 2020-11-05 18:18:52.948317 2020-11-05 18:18:52.948317 \N t \N
211 914022.69 3689909.59953 2019-05-30 4.037 39939373.97 \N 9 2020-11-05 18:18:52.952851 2020-11-05 18:18:52.952851 \N t \N
212 987323.42 3985824.64654 2019-11-30 4.037 39939373.97 \N 9 2020-11-05 18:18:52.95736 2020-11-05 18:18:52.95736 \N t \N
213 155517.3 502787.4309 2017-11-30 3.233 17453436.84 \N 10 2020-11-05 18:18:52.961987 2020-11-05 18:18:52.961987 \N t \N
214 131574.78 489852.90594 2018-05-30 3.723 24720716.05 \N 10 2020-11-05 18:18:52.968046 2020-11-05 18:18:52.968046 \N t \N
215 126109.11 488105.310255 2018-11-30 3.8705 36589373.97 \N 10 2020-11-05 18:18:52.972575 2020-11-05 18:18:52.972575 \N t \N
216 106800.29 431152.77073 2019-05-30 4.037 39939373.97 \N 10 2020-11-05 18:18:52.977482 2020-11-05 18:18:52.977482 \N t \N
217 107441.79 433742.50623 2019-11-30 4.037 39939373.97 \N 10 2020-11-05 18:18:52.982457 2020-11-05 18:18:52.982457 \N t \N
218 12030000.0 3006657.9 2014-11-14 0.400112931 0.0 \N 12 2020-11-05 18:18:52.987126 2020-11-05 18:18:52.987126 \N t \N
219 9943227.53 34304134.98 2016-05-31 0.289855072 1203000.0 \N 12 2020-11-05 18:18:52.993034 2020-11-05 18:18:52.993034 \N t \N
220 7591386.98 24296234.03 2017-12-22 0.3124511795 11146227.53 \N 12 2020-11-05 18:18:52.998038 2020-11-05 18:18:52.998038 2018-01-19 t \N
221 5051688.4 3006657.9 2019-06-21 0.260960334 23320862.55 \N 12 2020-11-05 18:18:53.002669 2020-11-05 18:18:53.002669 2019-06-26 t \N
222 5713.75 17426.92 2015-04-15 0.327869181702790854608846543 1203000.0 \N 14 2020-11-05 18:18:53.007872 2020-11-05 18:18:53.007872 \N \N \N
223 7165.93 28240.93 2015-10-15 0.253742706065274762552083094 1203000.0 \N 14 2020-11-05 18:18:53.013119 2020-11-05 18:18:53.013119 \N \N \N
224 11414.32 40264.01 2016-04-15 0.283486915486063111945382489 1203000.0 \N 14 2020-11-05 18:18:53.018189 2020-11-05 18:18:53.018189 \N \N \N
225 82242.95 260874.64 2016-10-15 0.315258508837808075173577623 11146227.53 \N 14 2020-11-05 18:18:53.023366 2020-11-05 18:18:53.023366 \N \N \N
226 114972.74 356530.47 2017-04-15 0.32247661749639518888806334 11146227.53 \N 14 2020-11-05 18:18:53.028918 2020-11-05 18:18:53.028918 \N \N \N
227 122525.9 390122.47 2017-10-15 0.314070348216548511035521743 11146227.53 \N 14 2020-11-05 18:18:53.034375 2020-11-05 18:18:53.034375 \N \N \N
228 202229.9 686853.63 2018-04-15 0.294429396842526696699557371 18737614.51 \N 14 2020-11-05 18:18:53.039083 2020-11-05 18:18:53.039083 \N \N \N
229 309632.66 1164373.62 2018-10-15 0.265922084356394127170280618 18737614.51 \N 14 2020-11-05 18:18:53.044663 2020-11-05 18:18:53.044663 \N \N \N
230 341394.19 1316928.09 2019-04-15 0.259235255586354756849328045 18737614.51 \N 14 2020-11-05 18:18:53.050299 2020-11-05 18:18:53.050299 \N \N \N
231 358098.87 1466056.77 2019-10-15 0.24425989315543353754302434 23320862.55 \N 14 2020-11-05 18:18:53.054982 2020-11-05 18:18:53.054982 \N \N \N
232 30639.93 74455.03 2014-10-15 0.411522633192142962000015311 0.0 \N 15 2020-11-05 18:18:53.059638 2020-11-05 18:18:53.059638 \N \N \N
233 31772.41 96905.85 2015-04-15 0.327868854150704008065560541 1203000.0 \N 15 2020-11-05 18:18:53.064301 2020-11-05 18:18:53.064301 \N \N \N
234 31670.28 124812.57 2015-10-15 0.253742711972039354689996368 1203000.0 \N 15 2020-11-05 18:18:53.07053 2020-11-05 18:18:53.07053 \N \N \N
235 81585.81 287793.94 2016-04-15 0.283486893434934731426241984 1203000.0 \N 15 2020-11-05 18:18:53.075466 2020-11-05 18:18:53.075466 \N \N \N
236 44557.91 141337.69 2016-10-15 0.315258513139701094591258708 11146227.53 \N 15 2020-11-05 18:18:53.080423 2020-11-05 18:18:53.080423 \N \N \N
237 38159.74 118333.35 2017-04-15 0.322476630637094276465594864 11146227.53 \N 15 2020-11-05 18:18:53.08538 2020-11-05 18:18:53.08538 \N \N \N
238 38414.39 122311.42 2017-10-15 0.314070346006938681604710337 11146227.53 \N 15 2020-11-05 18:18:53.090019 2020-11-05 18:18:53.090019 \N \N \N
239 26349.43 89493.2 2018-04-15 0.294429409161813411521769252 18737614.51 \N 15 2020-11-05 18:18:53.094632 2020-11-05 18:18:53.094632 \N \N \N
240 19383.93 72893.27 2018-10-15 0.265922080323739077695375718 18737614.51 \N 15 2020-11-05 18:18:53.099161 2020-11-05 18:18:53.099161 \N \N \N
241 19278.0 74364.89 2019-04-15 0.259235238564865758558911336 18737614.51 \N 15 2020-11-05 18:18:53.103546 2020-11-05 18:18:53.103546 \N \N \N
242 11356.59 46493.88 2019-10-15 0.244259889688707416976169767 23320862.55 \N 15 2020-11-05 18:18:53.107708 2020-11-05 18:18:53.107708 \N \N \N
243 468440.36 1807008.69 2019-04-15 0.259235255808316007600384036 18737614.51 \N 13 2020-11-05 18:18:53.11195 2020-11-05 18:18:53.11195 \N \N \N
244 597970.87 2448092.74 2019-10-15 0.244259892703247835292383572 23320862.55 \N 13 2020-11-05 18:18:53.116106 2020-11-05 18:18:53.116106 \N \N \N
245 125371.278 175000.0 2015-01-29 1.395854 0.0 \N 16 2020-11-05 18:18:53.120331 2020-11-05 18:18:53.120331 \N t \N
246 206385.691 290189.22 2015-02-24 1.406053 125371.278 \N 16 2020-11-05 18:18:53.124486 2020-11-05 18:18:53.124486 \N t \N
247 624784.5539 896391.52 2015-04-28 1.434721 331756.969 \N 16 2020-11-05 18:18:53.128629 2020-11-05 18:18:53.128629 \N t \N
248 522952.5584 799858.03 2015-10-26 1.529504 956541.5229 \N 16 2020-11-05 18:18:53.132759 2020-11-05 18:18:53.132759 \N t \N
249 858739.6504 1371244.92 2016-02-24 1.596811 1479494.0813 \N 16 2020-11-05 18:18:53.1371 2020-11-05 18:18:53.1371 \N t \N
250 548930.0373 884398.2 2016-03-18 1.611131 2338233.7317 \N 16 2020-11-05 18:18:53.141232 2020-11-05 18:18:53.141232 \N t \N
251 1094681.3614 1824918.12 2016-06-22 1.667077 2887163.769 \N 16 2020-11-05 18:18:53.145496 2020-11-05 18:18:53.145496 \N t \N
252 1178.1416 5678.8467 2015-04-15 1.12459645 331756.969 \N 18 2020-11-05 18:18:53.149833 2020-11-05 18:18:53.149833 \N \N \N
253 4701.1907 1.73571224 2015-07-15 1.12459645 956541.5229 \N 18 2020-11-05 18:18:53.154084 2020-11-05 18:18:53.154084 \N \N \N
254 5301.1531 4301.5484 2015-10-15 1.12459645 956541.5229 \N 18 2020-11-05 18:18:53.158259 2020-11-05 18:18:53.158259 \N \N \N
255 7754.1005 4301.5484 2016-01-15 1.12459645 1479494.0813 \N 18 2020-11-05 18:18:53.162536 2020-11-05 18:18:53.162536 \N \N \N
256 11517.4879 1.73571224 2016-04-15 1.65748987 2887163.769 \N 18 2020-11-05 18:18:53.16815 2020-11-05 18:18:53.16815 \N \N \N
\.
--
-- Name: active_storage_attachments_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.active_storage_attachments_id_seq', 1, false);
--
-- Name: active_storage_blobs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.active_storage_blobs_id_seq', 1, false);
--
-- Name: attachments_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.attachments_id_seq', 15, true);
--
-- Name: creditors_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.creditors_id_seq', 10, true);
--
-- Name: currencies_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.currencies_id_seq', 8, true);
--
-- Name: debts_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.debts_id_seq', 15, true);
--
-- Name: transaction_infos_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.transaction_infos_id_seq', 78, true);
--
-- Name: transaction_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.transaction_items_id_seq', 509, true);
--
-- Name: active_storage_attachments active_storage_attachments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.active_storage_attachments
ADD CONSTRAINT active_storage_attachments_pkey PRIMARY KEY (id);
--
-- Name: active_storage_blobs active_storage_blobs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.active_storage_blobs
ADD CONSTRAINT active_storage_blobs_pkey PRIMARY KEY (id);
--
-- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.ar_internal_metadata
ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);
--
-- Name: attachments attachments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.attachments
ADD CONSTRAINT attachments_pkey PRIMARY KEY (id);
--
-- Name: creditors creditors_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.creditors
ADD CONSTRAINT creditors_pkey PRIMARY KEY (id);
--
-- Name: currencies currencies_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.currencies
ADD CONSTRAINT currencies_pkey PRIMARY KEY (id);
--
-- Name: debts debts_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.debts
ADD CONSTRAINT debts_pkey PRIMARY KEY (id);
--
-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.schema_migrations
ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
--
-- Name: transaction_infos transaction_infos_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.transaction_infos
ADD CONSTRAINT transaction_infos_pkey PRIMARY KEY (id);
--
-- Name: transaction_items transaction_items_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.transaction_items
ADD CONSTRAINT transaction_items_pkey PRIMARY KEY (id);
--
-- Name: index_active_storage_attachments_on_blob_id; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX index_active_storage_attachments_on_blob_id ON public.active_storage_attachments USING btree (blob_id);
--
-- Name: index_active_storage_attachments_uniqueness; Type: INDEX; Schema: public; Owner: postgres
--
CREATE UNIQUE INDEX index_active_storage_attachments_uniqueness ON public.active_storage_attachments USING btree (record_type, record_id, name, blob_id);
--
-- Name: index_active_storage_blobs_on_key; Type: INDEX; Schema: public; Owner: postgres
--
CREATE UNIQUE INDEX index_active_storage_blobs_on_key ON public.active_storage_blobs USING btree (key);
--
-- Name: active_storage_attachments fk_rails_c3b3935057; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.active_storage_attachments
ADD CONSTRAINT fk_rails_c3b3935057 FOREIGN KEY (blob_id) REFERENCES public.active_storage_blobs(id);
--
-- PostgreSQL database dump complete
--
--
-- Database "sigdiv_production" dump
--
--
-- PostgreSQL database dump
--
-- Dumped from database version 13.0 (Debian 13.0-1.pgdg100+1)
-- Dumped by pg_dump version 13.0 (Debian 13.0-1.pgdg100+1)
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;
--
-- Name: sigdiv_production; Type: DATABASE; Schema: -; Owner: postgres
--
CREATE DATABASE sigdiv_production WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE = 'en_US.utf8';
ALTER DATABASE sigdiv_production OWNER TO postgres;
\connect sigdiv_production
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: ar_internal_metadata; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.ar_internal_metadata (
key character varying NOT NULL,
value character varying,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
ALTER TABLE public.ar_internal_metadata OWNER TO postgres;
--
-- Name: attachments; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.attachments (
id bigint NOT NULL,
name character varying,
description text,
file character varying,
debt_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.attachments OWNER TO postgres;
--
-- Name: attachments_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.attachments_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.attachments_id_seq OWNER TO postgres;
--
-- Name: attachments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.attachments_id_seq OWNED BY public.attachments.id;
--
-- Name: creditors; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.creditors (
id bigint NOT NULL,
name character varying,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
financial_agent boolean DEFAULT false
);
ALTER TABLE public.creditors OWNER TO postgres;
--
-- Name: creditors_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.creditors_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.creditors_id_seq OWNER TO postgres;
--
-- Name: creditors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.creditors_id_seq OWNED BY public.creditors.id;
--
-- Name: currencies; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.currencies (
id bigint NOT NULL,
name character varying,
formula character varying,
description text,
last_currency character varying,
date_currency date,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.currencies OWNER TO postgres;
--
-- Name: currencies_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.currencies_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.currencies_id_seq OWNER TO postgres;
--
-- Name: currencies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.currencies_id_seq OWNED BY public.currencies.id;
--
-- Name: debts; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.debts (
id bigint NOT NULL,
code integer,
contract_value numeric,
signature_date date,
creditor_id integer,
grace_period date,
amortization_period date,
purpose text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
amortization_type integer,
financial_agent_id integer,
applicable_legislation character varying,
legislation_level integer,
name character varying,
notes text,
category integer,
currency_id integer,
loan_term integer,
interest_rate numeric,
decimal_places integer,
start_amt_next_month_to_grace_period boolean
);
ALTER TABLE public.debts OWNER TO postgres;
--
-- Name: debts_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.debts_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.debts_id_seq OWNER TO postgres;
--
-- Name: debts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.debts_id_seq OWNED BY public.debts.id;
--
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.schema_migrations (
version character varying NOT NULL
);
ALTER TABLE public.schema_migrations OWNER TO postgres;
--
-- Name: transaction_infos; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.transaction_infos (
id bigint NOT NULL,
formula character varying,
payment_day integer,
description text,
debt_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
frequency integer,
category_number integer,
slug character varying,
base numeric,
bind_withdraw boolean
);
ALTER TABLE public.transaction_infos OWNER TO postgres;
--
-- Name: transaction_infos_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.transaction_infos_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.transaction_infos_id_seq OWNER TO postgres;
--
-- Name: transaction_infos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.transaction_infos_id_seq OWNED BY public.transaction_infos.id;
--
-- Name: transaction_items; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.transaction_items (
id bigint NOT NULL,
value numeric,
value_brl numeric,
date date,
exchange_rate numeric,
start_balance numeric,
start_outstanding_balance_brl numeric,
transaction_info_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
internalization_date date,
confirmed boolean,
formula character varying
);
ALTER TABLE public.transaction_items OWNER TO postgres;
--
-- Name: transaction_items_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.transaction_items_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.transaction_items_id_seq OWNER TO postgres;
--
-- Name: transaction_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.transaction_items_id_seq OWNED BY public.transaction_items.id;
--
-- Name: attachments id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.attachments ALTER COLUMN id SET DEFAULT nextval('public.attachments_id_seq'::regclass);
--
-- Name: creditors id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.creditors ALTER COLUMN id SET DEFAULT nextval('public.creditors_id_seq'::regclass);
--
-- Name: currencies id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.currencies ALTER COLUMN id SET DEFAULT nextval('public.currencies_id_seq'::regclass);
--
-- Name: debts id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.debts ALTER COLUMN id SET DEFAULT nextval('public.debts_id_seq'::regclass);
--
-- Name: transaction_infos id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.transaction_infos ALTER COLUMN id SET DEFAULT nextval('public.transaction_infos_id_seq'::regclass);
--
-- Name: transaction_items id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.transaction_items ALTER COLUMN id SET DEFAULT nextval('public.transaction_items_id_seq'::regclass);
--
-- Data for Name: ar_internal_metadata; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.ar_internal_metadata (key, value, created_at, updated_at) FROM stdin;
environment production 2020-10-27 21:01:34.259257 2020-10-27 21:01:34.259257
\.
--
-- Data for Name: attachments; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.attachments (id, name, description, file, debt_id, created_at, updated_at) FROM stdin;
\.
--
-- Data for Name: creditors; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.creditors (id, name, created_at, updated_at, financial_agent) FROM stdin;
1 CAIXA ECONÔMICA FEDERAL 2020-10-27 21:01:34.383808 2020-10-27 21:01:34.383808 t
2 Corporação Andina de Fomento - CAF 2020-10-27 21:01:34.389306 2020-10-27 21:01:34.389306 f
3 BNDES 2020-10-27 21:01:34.391531 2020-10-27 21:01:34.391531 t
4 BANCO DO BRASIL 2020-10-27 21:01:34.394827 2020-10-27 21:01:34.394827 t
5 BID 2020-10-27 21:01:34.397309 2020-10-27 21:01:34.397309 f
\.
--
-- Data for Name: currencies; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.currencies (id, name, formula, description, last_currency, date_currency, created_at, updated_at) FROM stdin;
1 BRL 1 \N \N \N 2020-10-27 21:01:34.41078 2020-10-27 21:01:34.41078
2 USD [BACEN1] \N \N \N 2020-10-27 21:01:34.413362 2020-10-27 21:01:34.413362
3 URTJLP [BNDES314] \N \N \N 2020-10-27 21:01:34.415346 2020-10-27 21:01:34.415346
\.
--
-- Data for Name: debts; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.debts (id, code, contract_value, signature_date, creditor_id, grace_period, amortization_period, purpose, created_at, updated_at, amortization_type, financial_agent_id, applicable_legislation, legislation_level, name, notes, category, currency_id, loan_term, interest_rate, decimal_places, start_amt_next_month_to_grace_period) FROM stdin;
1 123456 292320000.0 2013-11-19 1 2017-11-19 2033-11-19 Programa destinado à Implantação do Corredor BRT TransOcênica - Charitas/Centro 2020-10-27 21:01:34.448745 2020-10-27 21:01:34.448745 1 \N \N \N Caixa Transoceânica \N 0 1 240 0.005 5 t
2 123789 100000000.0 2016-11-30 2 2021-05-30 2028-11-30 Programa região oceânica sustentável 2020-10-27 21:01:34.454653 2020-10-27 21:01:34.454653 0 1 \N CAF 1 2 16 1.95 2 f
3 123799 26470000.0 2016-11-30 5 2019-04-15 2038-10-15 ProCidades - Programa de Desenvolvimento Urbano e Inclusão Social de Niterói 2020-10-27 21:01:34.459633 2020-10-27 21:01:34.459633 0 4 \N BID 1 2 40 2.75 2 f
4 212345 6242000.0 2014-12-22 3 2017-02-15 2023-11-15 Programa de Modernização da Administração Tributária e da Gestão dos Setores Sociais Básicos - PMAT 2020-10-27 21:01:34.465354 2020-10-27 21:01:34.465354 0 3 \N PMAT - BNDES - SubC. A 0 1 72 2.2 4 f
5 212346 21847000.0 2014-12-22 3 2017-02-15 2023-11-15 Programa de Modernização da Administração Tributária e da Gestão dos Setores Sociais Básicos - PMAT 2020-10-27 21:01:34.470223 2020-10-27 21:01:34.470223 0 3 \N PMAT - BNDES - SubC. B 0 1 72 2.2 6 f
\.
--
-- Data for Name: schema_migrations; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.schema_migrations (version) FROM stdin;
20181123150812
20181123150845
20181204154339
20181204160614
20181204161949
20181204162827
20181204165320
20181204165354
20181204172415
20181214151944
20181214152035
20181214152402
20181217152939
20181218165740
20181221175527
20181221180221
20181227165515
20190109173130
20190110145821
20190116190903
20190117134059
20190122133804
20190122133844
20190218153020
20190218153106
20190218173752
20190218194936
20190219174653
20190225153116
20190227190850
20190227190953
20190227191021
20190227195217
20190228172511
20190228184229
20190326163958
20190326164558
20190329164210
20190329164225
20190329165048
20190329165114
20190404200906
20190409160627
20190409161126
20190509180846
20190509180910
20190509180933
20190509185645
20190509185858
20190509190013
20190524180248
20190524181004
20190527192353
20190605181907
20190605184638
20190606184647
20190607182344
20190802152325
20190802153441
20190802183529
20190806190924
20190806193127
20190813140250
20190814164515
20190910152147
20191008155630
20191025174708
20200310144724
20200310150056
20200506094533
20200604170956
20201008211338
\.
--
-- Data for Name: transaction_infos; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.transaction_infos (id, formula, payment_day, description, debt_id, created_at, updated_at, frequency, category_number, slug, base, bind_withdraw) FROM stdin;
1 15 \N 1 2020-10-27 21:01:34.487752 2020-10-27 21:01:34.487752 \N 1 D \N \N
2 [PGTO] - [SALDO] * [JUROS] 15 \N 1 2020-10-27 21:01:34.490236 2020-10-27 21:01:34.490236 1 2 A \N \N
3 [SALDO] * [JUROS] 15 \N 1 2020-10-27 21:01:34.492514 2020-10-27 21:01:34.492514 1 3 J \N \N
4 [SALDO] * (0.02 / 12) 15 Taxa Adm 1 2020-10-27 21:01:34.495576 2020-10-27 21:01:34.495576 1 4 TA 2.0 \N
5 [SALDO] * (0.007 / 12) 15 Taxa Risco 1 2020-10-27 21:01:34.497788 2020-10-27 21:01:34.497788 1 4 TR 0.7 \N
6 \N \N \N 1 2020-10-27 21:01:34.500224 2020-10-27 21:01:34.500224 \N 5 EE \N \N
7 30 \N 2 2020-10-27 21:01:34.502436 2020-10-27 21:01:34.502436 \N 1 D \N \N
8 [SALDO] / ([PARCELAS] - [N_PARCELA]) 30 \N 2 2020-10-27 21:01:34.504706 2020-10-27 21:01:34.504706 6 2 A \N \N
9 [SALDO] * ((1.95 / 100 / 360) * [DELTA_DATA]) 30 \N 2 2020-10-27 21:01:34.506829 2020-10-27 21:01:34.506829 6 3 J \N \N
10 ([VALOR_CONTRATO] - [SALDO]) * ((0.35 / 100 / 360) * [DELTA_DATA]) 30 Comissão de crédito 2 2020-10-27 21:01:34.509136 2020-10-27 21:01:34.509136 6 4 CC 0.35 t
11 \N \N \N 2 2020-10-27 21:01:34.512477 2020-10-27 21:01:34.512477 \N 5 EE \N \N
12 15 \N 3 2020-10-27 21:01:34.514717 2020-10-27 21:01:34.514717 \N 1 D \N \N
13 [SALDO] / ([PARCELAS] - [N_PARCELA]) 15 \N 3 2020-10-27 21:01:34.517524 2020-10-27 21:01:34.517524 6 2 A \N \N
14 [SALDO] * ((1.95 / 100 / 360) * [DELTA_DATA]) 15 \N 3 2020-10-27 21:01:34.5211 2020-10-27 21:01:34.5211 6 3 J \N \N
15 ([VALOR_CONTRATO] - [SALDO]) * ((0.35 / 100 / 360) * [DELTA_DATA]) 15 Comissão de crédito 3 2020-10-27 21:01:34.523617 2020-10-27 21:01:34.523617 6 4 CC 0.35 t
16 15 \N 4 2020-10-27 21:01:34.526774 2020-10-27 21:01:34.526774 \N 1 D \N \N
17 [SALDO] / ([PARCELAS] - [N_PARCELA]) 15 \N 4 2020-10-27 21:01:34.529506 2020-10-27 21:01:34.529506 1 2 A \N \N
18 [SALDO] * ((1.95 / 100 / 360) * [DELTA_DATA]) 15 \N 4 2020-10-27 21:01:34.531914 2020-10-27 21:01:34.531914 1 3 J \N \N
19 \N \N \N 4 2020-10-27 21:01:34.534152 2020-10-27 21:01:34.534152 \N 5 EE \N \N
20 15 \N 5 2020-10-27 21:01:34.536216 2020-10-27 21:01:34.536216 \N 1 D \N \N
21 [SALDO] / ([PARCELAS] - [N_PARCELA]) 15 \N 5 2020-10-27 21:01:34.538376 2020-10-27 21:01:34.538376 1 2 A \N \N
22 [SALDO] * ((1.95 / 100 / 360) * [DELTA_DATA]) 15 \N 5 2020-10-27 21:01:34.540557 2020-10-27 21:01:34.540557 1 3 J \N \N
23 \N \N \N 5 2020-10-27 21:01:34.54312 2020-10-27 21:01:34.54312 \N 5 EE \N \N
\.
--
-- Data for Name: transaction_items; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.transaction_items (id, value, value_brl, date, exchange_rate, start_balance, start_outstanding_balance_brl, transaction_info_id, created_at, updated_at, internalization_date, confirmed, formula) FROM stdin;
1 38267.1771676987 800224.9 2015-05-08 20.91152155 0.0 \N 1 2020-10-27 21:01:34.563999 2020-10-27 21:01:34.563999 \N t \N
2 100178.304001591 2099165.37 2015-06-19 20.95429136 38267.17717 \N 1 2020-10-27 21:01:34.567216 2020-10-27 21:01:34.567216 \N t \N
3 269454.113840257 5659740.67 2015-07-24 21.00446933 138445.48117 \N 1 2020-10-27 21:01:34.570215 2020-10-27 21:01:34.570215 \N t \N
4 172811.612402003 3636516.2 2015-08-21 21.0432398 407899.59501 \N 1 2020-10-27 21:01:34.573273 2020-10-27 21:01:34.573273 \N t \N
5 388238.148837079 8185330.12 2015-09-22 21.08327104 580711.20741 \N 1 2020-10-27 21:01:34.575833 2020-10-27 21:01:34.575833 \N t \N
6 180241.335471127 3807043.73 2015-10-22 21.12192367 968949.35625 \N 1 2020-10-27 21:01:34.57926 2020-10-27 21:01:34.57926 \N t \N
7 776149.536786542 16418436.94 2015-11-23 21.1537032 1149190.69172 \N 1 2020-10-27 21:01:34.581822 2020-10-27 21:01:34.581822 \N t \N
8 2027839.19399659 42965630.86 2015-12-17 21.18788856 1925340.22851 \N 1 2020-10-27 21:01:34.584693 2020-10-27 21:01:34.584693 \N t \N
9 1480367.51522129 31500447.14 2016-03-15 21.27880193 3953179.4225 \N 1 2020-10-27 21:01:34.587474 2020-10-27 21:01:34.587474 \N t \N
10 1986775.5527745 42393733.38 2016-05-06 21.33795804 5433546.93772 \N 1 2020-10-27 21:01:34.590276 2020-10-27 21:01:34.590276 \N t \N
11 383515.163323288 8207278.03 2016-06-27 21.40013959 7420322.4905 \N 1 2020-10-27 21:01:34.593219 2020-10-27 21:01:34.593219 \N t \N
12 611973.657811069 13121407.28 2016-07-29 21.44113086 7803837.65382 \N 1 2020-10-27 21:01:34.596586 2020-10-27 21:01:34.596586 \N t \N
13 573211.706951141 12319813.16 2016-08-30 21.49260563 8415811.31163 \N 1 2020-10-27 21:01:34.59921 2020-10-27 21:01:34.59921 \N t \N
14 577590.254823738 12435287.93 2016-09-30 21.52960135 8989023.01858 \N 1 2020-10-27 21:01:34.601854 2020-10-27 21:01:34.601854 \N t \N
15 508924.2218972 10973544.54 2016-10-28 21.56223671 9566613.27341 \N 1 2020-10-27 21:01:34.604382 2020-10-27 21:01:34.604382 \N t \N
16 715325.306302176 15447408.0 2016-11-30 21.5949413 10075537.49531 \N 1 2020-10-27 21:01:34.606572 2020-10-27 21:01:34.606572 \N t \N
17 550758.880241646 11909445.03 2016-12-22 21.62370042 10790862.80161 \N 1 2020-10-27 21:01:34.608961 2020-10-27 21:01:34.608961 \N t \N
18 270839.770669423 5869510.23 2017-01-31 21.67152267 11341621.68185 \N 1 2020-10-27 21:01:34.61232 2020-10-27 21:01:34.61232 \N t \N
19 286313.741213063 6207267.82 2017-03-02 21.67995079 11612461.45252 \N 1 2020-10-27 21:01:34.614988 2020-10-27 21:01:34.614988 \N t \N
20 109984.5161992 2388057.81 2017-05-02 21.71267277 11898775.19373 \N 1 2020-10-27 21:01:34.617656 2020-10-27 21:01:34.617656 \N t \N
21 295191.232075548 6417561.7 2017-06-30 21.74035338 12008759.70993 \N 1 2020-10-27 21:01:34.621506 2020-10-27 21:01:34.621506 \N t \N
22 351624.161135471 7653284.73 2017-09-18 21.76552574 12303950.94201 \N 1 2020-10-27 21:01:34.624962 2020-10-27 21:01:34.624962 \N t \N
23 252538.2031043 5496626.76 2017-11-13 21.76552574 12655575.10314 \N 1 2020-10-27 21:01:34.62993 2020-10-27 21:01:34.62993 \N t \N
24 288019.18248541 5496626.76 2018-02-15 1.0 12852099.2879 \N 1 2020-10-27 21:01:34.633012 2020-10-27 21:01:34.633012 \N t \N
25 208970.05587 5496626.76 2018-10-31 1.0 12905242.14372 \N 1 2020-10-27 21:01:34.636152 2020-10-27 21:01:34.636152 \N t \N
26 191.33589 4002.277414461063 2015-05-15 20.9175467 38267.17717 \N 3 2020-10-27 21:01:34.638961 2020-10-27 21:01:34.638961 \N t \N
27 692.22741 14500.1311260631854 2015-06-15 20.94706294 38267.17717 \N 3 2020-10-27 21:01:34.641448 2020-10-27 21:01:34.641448 \N t \N
28 2039.49798 42808.565676517173 2015-07-15 20.98975635 138445.48117 \N 3 2020-10-27 21:01:34.645914 2020-10-27 21:01:34.645914 \N t \N
29 2903.55604 61078.5217087749088 2015-08-15 21.03576472 407899.59501 \N 3 2020-10-27 21:01:34.648788 2020-10-27 21:01:34.648788 \N t \N
30 4844.74678 102096.4708982124998 2015-09-15 21.07364441 580711.20741 \N 3 2020-10-27 21:01:34.651748 2020-10-27 21:01:34.651748 \N t \N
31 5745.95346 121313.9227799800782 2015-10-15 21.11293167 968949.35625 \N 3 2020-10-27 21:01:34.654867 2020-10-27 21:01:34.654867 \N t \N
32 9626.70114 203574.4018255976238 2015-11-15 21.14684967 1149190.69172 \N 3 2020-10-27 21:01:34.657808 2020-10-27 21:01:34.657808 \N t \N
33 19765.89711 418712.0671858526289 2015-12-15 21.18355999 1925340.22851 \N 3 2020-10-27 21:01:34.661313 2020-10-27 21:01:34.661313 \N t \N
34 19765.89711 419474.6082194184171 2016-01-15 21.22213861 3953179.4225 \N 3 2020-10-27 21:01:34.663888 2020-10-27 21:01:34.663888 \N t \N
35 19765.89711 419948.1583964259705 2016-02-15 21.24609655 3953179.4225 \N 3 2020-10-27 21:01:34.666708 2020-10-27 21:01:34.666708 \N t \N
36 19765.89711 420594.6095724494223 2016-03-15 21.27880193 3953179.4225 \N 3 2020-10-27 21:01:34.669495 2020-10-27 21:01:34.669495 \N t \N
37 27167.73469 579157.3761854300146 2016-04-15 21.31783834 5433546.93772 \N 3 2020-10-27 21:01:34.672162 2020-10-27 21:01:34.672162 \N t \N
38 27167.73469 579957.7544933929224 2016-05-15 21.34729896 5433546.93772 \N 3 2020-10-27 21:01:34.67453 2020-10-27 21:01:34.67453 \N t \N
39 37101.61245 793390.650969422583 2016-06-15 21.38426334 7420322.4905 \N 3 2020-10-27 21:01:34.677656 2020-10-27 21:01:34.677656 \N t \N
40 39019.18827 835970.5056917445924 2016-07-15 21.42460012 7803837.65382 \N 3 2020-10-27 21:01:34.680792 2020-10-27 21:01:34.680792 \N t \N
41 42079.05656 903289.8357896383544 2016-08-15 21.46649449 8415811.31163 \N 3 2020-10-27 21:01:34.683412 2020-10-27 21:01:34.683412 \N t \N
42 44945.11509 966853.0554109991139 2016-09-15 21.51186071 8989023.01858 \N 3 2020-10-27 21:01:34.68607 2020-10-27 21:01:34.68607 \N t \N
43 47833.06637 1030645.697382419674 2016-10-15 21.5467202 9566613.27341 \N 3 2020-10-27 21:01:34.688694 2020-10-27 21:01:34.688694 \N t \N
44 50377.68748 1087127.27170447172 2016-11-15 21.579539 10075537.49531 \N 3 2020-10-27 21:01:34.691394 2020-10-27 21:01:34.691394 \N t \N
45 53954.31401 1166202.2024109351385 2016-12-15 21.61462385 10790862.80161 \N 3 2020-10-27 21:01:34.694625 2020-10-27 21:01:34.694625 \N t \N
46 56708.10841 1227907.7786289570253 2017-01-15 21.65312533 11341621.68185 \N 3 2020-10-27 21:01:34.697738 2020-10-27 21:01:34.697738 \N t \N
47 58062.30726 1258606.8782655311022 2017-02-15 21.67683197 11612461.45252 \N 3 2020-10-27 21:01:34.700551 2020-10-27 21:01:34.700551 \N t \N
48 59493.87597 1290663.3073926878055 2017-03-15 21.69405315 11898775.19373 \N 3 2020-10-27 21:01:34.703391 2020-10-27 21:01:34.703391 \N t \N
49 60043.79855 1303711.3497839504835 2017-04-15 21.71267277 12008759.70993 \N 3 2020-10-27 21:01:34.706519 2020-10-27 21:01:34.706519 \N t \N
50 60043.79855 1304118.727142658712 2017-05-15 21.71945744 12008759.70993 \N 3 2020-10-27 21:01:34.710203 2020-10-27 21:01:34.710203 \N t \N
51 60043.79855 1305040.3496140484155 2017-06-15 21.73480661 12008759.70993 \N 3 2020-10-27 21:01:34.713373 2020-10-27 21:01:34.713373 \N t \N
52 61519.75471 1337892.0608484309048 2017-07-17 21.74735688 12303950.94201 \N 3 2020-10-27 21:01:34.716027 2020-10-27 21:01:34.716027 \N t \N
53 61519.75471 1338624.7303671496498 2017-08-15 21.75926638 12303950.94201 \N 3 2020-10-27 21:01:34.720444 2020-10-27 21:01:34.720444 \N t \N
54 61519.75471 1339009.8046589912354 2017-09-15 21.76552574 12303950.94201 \N 3 2020-10-27 21:01:34.723426 2020-10-27 21:01:34.723426 \N t \N
55 63277.87552 1377276.2284030758848 2017-10-16 21.76552574 12655575.10314 \N 3 2020-10-27 21:01:34.726514 2020-10-27 21:01:34.726514 \N t \N
56 63277.87552 1377276.2284030758848 2017-11-16 21.76552574 12655575.10314 \N 3 2020-10-27 21:01:34.729931 2020-10-27 21:01:34.729931 \N t \N
57 64540.5665312297 1404759.362109662549202478 2017-12-15 21.76552574 12908113.30625 \N 3 2020-10-27 21:01:34.732538 2020-10-27 21:01:34.732538 \N t \N
58 64400.8806999382 1401719.026553174108509268 2018-01-15 21.76552574 12880176.13999 \N 3 2020-10-27 21:01:34.735 2020-10-27 21:01:34.735 \N t \N
59 64740.5284102816 1409111.637535185445448384 2018-02-15 21.76552574 12852099.2879 \N 3 2020-10-27 21:01:34.737313 2020-10-27 21:01:34.737313 \N t \N
60 65556.3443889012 1426868.301216933638916888 2018-03-15 21.76552574 13111268.87778 \N 3 2020-10-27 21:01:34.739932 2020-10-27 21:01:34.739932 \N t \N
61 65411.3751860724 1423712.970301256111703576 2018-04-15 21.76552574 13082275.03721 \N 3 2020-10-27 21:01:34.742367 2020-10-27 21:01:34.742367 \N t \N
62 65265.6811372294 1420541.862730998977984756 2018-05-15 21.76552574 13053136.22745 \N 3 2020-10-27 21:01:34.745575 2020-10-27 21:01:34.745575 \N t \N
63 65119.2586181423 1417354.899622893061632802 2018-06-15 21.76552574 13023851.72363 \N 3 2020-10-27 21:01:34.748019 2020-10-27 21:01:34.748019 \N t \N
64 64972.10399 1414152.0017763017026 2018-07-16 21.76552574 12994420.79729 \N 3 2020-10-27 21:01:34.750371 2020-10-27 21:01:34.750371 \N t \N
65 64824.21358 1410933.0892507475492 2018-08-15 21.76552574 12964842.71632 \N 3 2020-10-27 21:01:34.752815 2020-10-27 21:01:34.752815 \N t \N
66 64675.58372 1407698.0822071849528 2018-09-17 21.76552574 12935116.74495 \N 3 2020-10-27 21:01:34.754993 2020-10-27 21:01:34.754993 \N t \N
67 64526.21072 1404446.9003308239328 2018-10-15 21.76552574 12905242.14372 \N 3 2020-10-27 21:01:34.7573 2020-10-27 21:01:34.7573 \N t \N
68 64863.68764 1411792.2629197398536 2018-11-16 21.76552574 13084188.22536 \N 3 2020-10-27 21:01:34.760473 2020-10-27 21:01:34.760473 \N t \N
69 65267.62197 1420584.1059766245078 2018-12-15 21.76552574 13053524.39336 \N 3 2020-10-27 21:01:34.763331 2020-10-27 21:01:34.763331 \N t \N
70 65113.53621 1417230.3484011770454 2019-01-15 21.76552574 13022707.24221 \N 3 2020-10-27 21:01:34.765879 2020-10-27 21:01:34.765879 \N t \N
71 64958.68003 1413859.8222293889722 2019-02-15 21.76552574 12991736.0053 \N 3 2020-10-27 21:01:34.768408 2020-10-27 21:01:34.768408 \N t \N
72 64803.04956 1410472.4432286756744 2019-03-15 21.76552574 12960609.91221 \N 3 2020-10-27 21:01:34.770833 2020-10-27 21:01:34.770833 \N t \N
73 64646.64094 1407068.1273841077956 2019-04-15 21.76552574 12929328.18865 \N 3 2020-10-27 21:01:34.773387 2020-10-27 21:01:34.773387 \N t \N
74 64489.45028 1403646.7900277902072 2019-05-15 21.76552574 12897890.05647 \N 3 2020-10-27 21:01:34.775929 2020-10-27 21:01:34.775929 \N t \N
75 64331.47367 1400208.3460565172658 2019-06-15 21.76552574 12866294.73363 \N 3 2020-10-27 21:01:34.779073 2020-10-27 21:01:34.779073 \N t \N
76 64172.70717 1396752.7097141175558 2019-07-15 21.76552574 12834541.43418 \N 3 2020-10-27 21:01:34.781659 2020-10-27 21:01:34.781659 \N t \N
77 63.77863 1334.092471487021 2015-05-15 20.9175467 38267.17717 \N 4 2020-10-27 21:01:34.784441 2020-10-27 21:01:34.784441 \N t \N
78 230.74247 4833.3770420210618 2015-06-15 20.94706294 38267.17717 \N 4 2020-10-27 21:01:34.787248 2020-10-27 21:01:34.787248 \N t \N
79 679.83266 14269.521892172391 2015-07-15 20.98975635 138445.48117 \N 4 2020-10-27 21:01:34.789923 2020-10-27 21:01:34.789923 \N t \N
80 967.85201 20359.5071661390872 2015-08-15 21.03576472 407899.59501 \N 4 2020-10-27 21:01:34.792578 2020-10-27 21:01:34.792578 \N t \N
81 1614.91559 34032.1568958253519 2015-09-15 21.07364441 580711.20741 \N 4 2020-10-27 21:01:34.79592 2020-10-27 21:01:34.79592 \N t \N
82 1915.31782 40437.9742599933594 2015-10-15 21.11293167 968949.35625 \N 4 2020-10-27 21:01:34.7985 2020-10-27 21:01:34.7985 \N t \N
83 3208.90038 67858.1339418658746 2015-11-15 21.14684967 1149190.69172 \N 4 2020-10-27 21:01:34.801346 2020-10-27 21:01:34.801346 \N t \N
84 6588.63237 139570.6890619508763 2015-12-15 21.18355999 1925340.22851 \N 4 2020-10-27 21:01:34.804167 2020-10-27 21:01:34.804167 \N t \N
85 6588.63237 139824.8694064728057 2016-01-15 21.22213861 3953179.4225 \N 4 2020-10-27 21:01:34.80688 2020-10-27 21:01:34.80688 \N t \N
86 6588.63237 139982.7194654753235 2016-02-15 21.24609655 3953179.4225 \N 4 2020-10-27 21:01:34.80975 2020-10-27 21:01:34.80975 \N t \N
87 6588.63237 140198.2031908164741 2016-03-15 21.27880193 3953179.4225 \N 4 2020-10-27 21:01:34.813026 2020-10-27 21:01:34.813026 \N t \N
88 9055.91156 193052.4586574172104 2016-04-15 21.31783834 5433546.93772 \N 4 2020-10-27 21:01:34.816243 2020-10-27 21:01:34.816243 \N t \N
89 9055.91156 193319.2514266399776 2016-05-15 21.34729896 5433546.93772 \N 4 2020-10-27 21:01:34.820464 2020-10-27 21:01:34.820464 \N t \N
90 12367.20415 264463.550323140861 2016-06-15 21.38426334 7420322.4905 \N 4 2020-10-27 21:01:34.823534 2020-10-27 21:01:34.823534 \N t \N
91 13006.39609 278656.8352305815308 2016-07-15 21.42460012 7803837.65382 \N 4 2020-10-27 21:01:34.826662 2020-10-27 21:01:34.826662 \N t \N
92 14026.35219 301096.6120014344331 2016-08-15 21.46649449 8415811.31163 \N 4 2020-10-27 21:01:34.830548 2020-10-27 21:01:34.830548 \N t \N
93 14981.70503 322284.3518036663713 2016-09-15 21.51186071 8989023.01858 \N 4 2020-10-27 21:01:34.833898 2020-10-27 21:01:34.833898 \N t \N
94 15944.35546 343548.565865962292 2016-10-15 21.5467202 9566613.27341 \N 4 2020-10-27 21:01:34.837211 2020-10-27 21:01:34.837211 \N t \N
95 16792.56249 362375.75716289211 2016-11-15 21.579539 10075537.49531 \N 4 2020-10-27 21:01:34.840318 2020-10-27 21:01:34.840318 \N t \N
96 17984.77134 388734.067542360459 2016-12-15 21.61462385 10790862.80161 \N 4 2020-10-27 21:01:34.851655 2020-10-27 21:01:34.851655 \N t \N
97 18902.7028 409302.592804141924 2017-01-15 21.65312533 11341621.68185 \N 4 2020-10-27 21:01:34.854251 2020-10-27 21:01:34.854251 \N t \N
98 19354.10242 419535.6260885103674 2017-02-15 21.67683197 11612461.45252 \N 4 2020-10-27 21:01:34.856839 2020-10-27 21:01:34.856839 \N t \N
99 19831.29199 430221.1024642292685 2017-03-15 21.69405315 11898775.19373 \N 4 2020-10-27 21:01:34.859433 2020-10-27 21:01:34.859433 \N t \N
100 20014.59952 434570.4500003590704 2017-04-15 21.71267277 12008759.70993 \N 4 2020-10-27 21:01:34.862834 2020-10-27 21:01:34.862834 \N t \N
101 20014.59952 434706.2424532844288 2017-05-15 21.71945744 12008759.70993 \N 4 2020-10-27 21:01:34.865373 2020-10-27 21:01:34.865373 \N t \N
102 20014.59952 435013.4499437988272 2017-06-15 21.73480661 12008759.70993 \N 4 2020-10-27 21:01:34.868248 2020-10-27 21:01:34.868248 \N t \N
103 20506.5849 445964.020210319112 2017-07-17 21.74735688 12303950.94201 \N 4 2020-10-27 21:01:34.87086 2020-10-27 21:01:34.87086 \N t \N
104 20506.5849 446208.243383185662 2017-08-15 21.75926638 12303950.94201 \N 4 2020-10-27 21:01:34.873533 2020-10-27 21:01:34.873533 \N t \N
105 20506.5849 446336.601480445326 2017-09-15 21.76552574 12303950.94201 \N 4 2020-10-27 21:01:34.876292 2020-10-27 21:01:34.876292 \N t \N
106 21092.62517 459092.0760618068758 2017-10-16 21.76552574 12655575.10314 \N 4 2020-10-27 21:01:34.879603 2020-10-27 21:01:34.879603 \N t \N
107 21092.62517 459092.0760618068758 2017-11-16 21.76552574 12655575.10314 \N 4 2020-10-27 21:01:34.882345 2020-10-27 21:01:34.882345 \N t \N
108 21513.52218 468253.1207668509132 2017-12-15 21.76552574 12908113.30625 \N 4 2020-10-27 21:01:34.885175 2020-10-27 21:01:34.885175 \N t \N
109 21466.96023 467239.6754456213202 2018-01-15 21.76552574 12880176.13999 \N 4 2020-10-27 21:01:34.887756 2020-10-27 21:01:34.887756 \N t \N
110 21580.17614 469703.8792489038436 2018-02-15 21.76552574 12852099.2879 \N 4 2020-10-27 21:01:34.890181 2020-10-27 21:01:34.890181 \N t \N
111 21852.1148 475622.767152834952 2018-03-15 21.76552574 13111268.87778 \N 4 2020-10-27 21:01:34.892886 2020-10-27 21:01:34.892886 \N t \N
112 21803.79173 474570.9901289141302 2018-04-15 21.76552574 13082275.03721 \N 4 2020-10-27 21:01:34.896519 2020-10-27 21:01:34.896519 \N t \N
113 21755.22705 473513.954336319267 2018-05-15 21.76552574 13053136.22745 \N 4 2020-10-27 21:01:34.899172 2020-10-27 21:01:34.899172 \N t \N
114 21706.41954 472451.6332211089596 2018-06-15 21.76552574 13023851.72363 \N 4 2020-10-27 21:01:34.901964 2020-10-27 21:01:34.901964 \N t \N
115 21657.368 471384.00066465232 2018-07-16 21.76552574 12994420.79729 \N 4 2020-10-27 21:01:34.904701 2020-10-27 21:01:34.904701 \N t \N
116 21608.07119 470311.0296776974306 2018-08-15 21.76552574 12964842.71632 \N 4 2020-10-27 21:01:34.907215 2020-10-27 21:01:34.907215 \N t \N
117 21558.52791 469232.6941416134034 2018-09-17 21.76552574 12935116.74495 \N 4 2020-10-27 21:01:34.909878 2020-10-27 21:01:34.909878 \N t \N
118 21508.73691 468148.9668494930634 2018-10-15 21.76552574 12905242.14372 \N 4 2020-10-27 21:01:34.912884 2020-10-27 21:01:34.912884 \N t \N
119 21621.22921 470597.4209006948654 2018-11-16 21.76552574 13084188.22536 \N 4 2020-10-27 21:01:34.91595 2020-10-27 21:01:34.91595 \N t \N
120 21755.87399 473528.0353255415026 2018-12-15 21.76552574 13053524.39336 \N 4 2020-10-27 21:01:34.920402 2020-10-27 21:01:34.920402 \N t \N
121 21704.51207 472410.1161337256818 2019-01-15 21.76552574 13022707.24221 \N 4 2020-10-27 21:01:34.923489 2020-10-27 21:01:34.923489 \N t \N
122 21652.89334 471286.6073372445716 2019-02-15 21.76552574 12991736.0053 \N 4 2020-10-27 21:01:34.926664 2020-10-27 21:01:34.926664 \N t \N
123 21601.01652 470157.4810762252248 2019-03-15 21.76552574 12960609.91221 \N 4 2020-10-27 21:01:34.929486 2020-10-27 21:01:34.929486 \N t \N
124 21548.88031 469022.7090554841794 2019-04-15 21.76552574 12929328.18865 \N 4 2020-10-27 21:01:34.932605 2020-10-27 21:01:34.932605 \N t \N
125 21496.48343 467882.2634151484882 2019-05-15 21.76552574 12897890.05647 \N 4 2020-10-27 21:01:34.935303 2020-10-27 21:01:34.935303 \N t \N
126 21443.82456 466736.1154247241744 2019-06-15 21.76552574 12866294.73363 \N 4 2020-10-27 21:01:34.937821 2020-10-27 21:01:34.937821 \N t \N
127 21390.90239 465584.2365713725186 2019-07-15 21.76552574 12834541.43418 \N 4 2020-10-27 21:01:34.94018 2020-10-27 21:01:34.94018 \N t \N
128 22.32252 466.932354561684 2015-05-15 20.9175467 38267.17717 \N 5 2020-10-27 21:01:34.942876 2020-10-27 21:01:34.942876 \N t \N
129 80.75986 1691.6818704455884 2015-06-15 20.94706294 38267.17717 \N 5 2020-10-27 21:01:34.946018 2020-10-27 21:01:34.946018 \N t \N
130 237.94143 4994.3326412705805 2015-07-15 20.98975635 138445.48117 \N 5 2020-10-27 21:01:34.948736 2020-10-27 21:01:34.948736 \N t \N
131 338.7482 7125.827434523504 2015-08-15 21.03576472 407899.59501 \N 5 2020-10-27 21:01:34.951359 2020-10-27 21:01:34.951359 \N t \N
132 565.22046 11911.2549872966286 2015-09-15 21.07364441 580711.20741 \N 5 2020-10-27 21:01:34.953769 2020-10-27 21:01:34.953769 \N t \N
133 670.36124 14153.2910543364708 2015-10-15 21.11293167 968949.35625 \N 5 2020-10-27 21:01:34.956209 2020-10-27 21:01:34.956209 \N t \N
134 1123.11513 23750.3468162125071 2015-11-15 21.14684967 1149190.69172 \N 5 2020-10-27 21:01:34.958801 2020-10-27 21:01:34.958801 \N t \N
135 2306.02133 48849.7411822745867 2015-12-15 21.18355999 1925340.22851 \N 5 2020-10-27 21:01:34.961455 2020-10-27 21:01:34.961455 \N t \N
136 2306.02133 48938.7043028765513 2016-01-15 21.22213861 3953179.4225 \N 5 2020-10-27 21:01:34.963979 2020-10-27 21:01:34.963979 \N t \N
137 2306.02133 48993.9518235394115 2016-02-15 21.24609655 3953179.4225 \N 5 2020-10-27 21:01:34.966394 2020-10-27 21:01:34.966394 \N t \N
138 2306.02133 49069.3711274251669 2016-03-15 21.27880193 3953179.4225 \N 5 2020-10-27 21:01:34.969021 2020-10-27 21:01:34.969021 \N t \N
139 3169.56905 67568.360615367377 2016-04-15 21.31783834 5433546.93772 \N 5 2020-10-27 21:01:34.971623 2020-10-27 21:01:34.971623 \N t \N
140 3169.56905 67661.738084713188 2016-05-15 21.34729896 5433546.93772 \N 5 2020-10-27 21:01:34.974922 2020-10-27 21:01:34.974922 \N t \N
141 4328.52145 92562.242559638643 2016-06-15 21.38426334 7420322.4905 \N 5 2020-10-27 21:01:34.978389 2020-10-27 21:01:34.978389 \N t \N
142 4552.23863 97529.8922985666356 2016-07-15 21.42460012 7803837.65382 \N 5 2020-10-27 21:01:34.981196 2020-10-27 21:01:34.981196 \N t \N
143 4909.22327 105383.8142756347823 2016-08-15 21.46649449 8415811.31163 \N 5 2020-10-27 21:01:34.984219 2020-10-27 21:01:34.984219 \N t \N
144 5243.59676 112799.5231205272996 2016-09-15 21.51186071 8989023.01858 \N 5 2020-10-27 21:01:34.987386 2020-10-27 21:01:34.987386 \N t \N
145 5580.52441 120241.998031540082 2016-10-15 21.5467202 9566613.27341 \N 5 2020-10-27 21:01:34.990241 2020-10-27 21:01:34.990241 \N t \N
146 5877.39687 126831.51497464293 2016-11-15 21.579539 10075537.49531 \N 5 2020-10-27 21:01:34.992904 2020-10-27 21:01:34.992904 \N t \N
147 6294.66997 136056.9236614407845 2016-12-15 21.61462385 10790862.80161 \N 5 2020-10-27 21:01:34.99556 2020-10-27 21:01:34.99556 \N t \N
148 6615.94598 143255.9074814496734 2017-01-15 21.65312533 11341621.68185 \N 5 2020-10-27 21:01:34.99795 2020-10-27 21:01:34.99795 \N t \N
149 6773.93585 146837.4691960091245 2017-02-15 21.67683197 11612461.45252 \N 5 2020-10-27 21:01:35.000638 2020-10-27 21:01:35.000638 \N t \N
150 6940.9522 150577.38593840943 2017-03-15 21.69405315 11898775.19373 \N 5 2020-10-27 21:01:35.003492 2020-10-27 21:01:35.003492 \N t \N
151 7005.10983 152099.6574567003291 2017-04-15 21.71267277 12008759.70993 \N 5 2020-10-27 21:01:35.006693 2020-10-27 21:01:35.006693 \N t \N
152 7005.10983 152147.1848152106352 2017-05-15 21.71945744 12008759.70993 \N 5 2020-10-27 21:01:35.009934 2020-10-27 21:01:35.009934 \N t \N
153 7005.10983 152254.7074368599763 2017-06-15 21.73480661 12008759.70993 \N 5 2020-10-27 21:01:35.013646 2020-10-27 21:01:35.013646 \N t \N
154 7177.30472 156087.4071823484736 2017-07-17 21.74735688 12303950.94201 \N 5 2020-10-27 21:01:35.016721 2020-10-27 21:01:35.016721 \N t \N
155 7177.30472 156172.8852929113136 2017-08-15 21.75926638 12303950.94201 \N 5 2020-10-27 21:01:35.02069 2020-10-27 21:01:35.02069 \N t \N
156 7177.30472 156217.8106269834928 2017-09-15 21.76552574 12303950.94201 \N 5 2020-10-27 21:01:35.023246 2020-10-27 21:01:35.023246 \N t \N
157 7382.41881 159066.912498286962 2017-10-16 21.5467202 12655575.10314 \N 5 2020-10-27 21:01:35.025773 2020-10-27 21:01:35.025773 \N t \N
158 7382.41881 160682.2266325151694 2017-11-16 21.76552574 12655575.10314 \N 5 2020-10-27 21:01:35.028488 2020-10-27 21:01:35.028488 \N t \N
159 7529.73276 163888.5922031012424 2017-12-15 21.76552574 12908113.30625 \N 5 2020-10-27 21:01:35.03094 2020-10-27 21:01:35.03094 \N t \N
160 7513.43608 163533.8863950846992 2018-01-15 21.76552574 12880176.13999 \N 5 2020-10-27 21:01:35.033289 2020-10-27 21:01:35.033289 \N t \N
161 7665.06911 166834.2590125838914 2018-02-15 21.76552574 12852099.2879 \N 5 2020-10-27 21:01:35.035787 2020-10-27 21:01:35.035787 \N t \N
162 7648.24018 166467.9685034922332 2018-03-15 21.76552574 13111268.87778 \N 5 2020-10-27 21:01:35.038689 2020-10-27 21:01:35.038689 \N t \N
163 7631.32711 166099.8466430648114 2018-04-15 21.76552574 13082275.03721 \N 5 2020-10-27 21:01:35.041269 2020-10-27 21:01:35.041269 \N t \N
164 7614.32947 165729.8840721255578 2018-05-15 21.76552574 13053136.22745 \N 5 2020-10-27 21:01:35.044196 2020-10-27 21:01:35.044196 \N t \N
165 7597.24684 165358.0716491536616 2018-06-15 21.76552574 13023851.72363 \N 5 2020-10-27 21:01:35.046769 2020-10-27 21:01:35.046769 \N t \N
166 7580.0788 164984.400232628312 2018-07-16 21.76552574 12994420.79729 \N 5 2020-10-27 21:01:35.049471 2020-10-27 21:01:35.049471 \N t \N
167 7562.82492 164608.8604633734408 2018-08-15 21.76552574 12964842.71632 \N 5 2020-10-27 21:01:35.052088 2020-10-27 21:01:35.052088 \N t \N
168 7545.48477 164231.4429822129798 2018-09-17 21.76552574 12935116.74495 \N 5 2020-10-27 21:01:35.05453 2020-10-27 21:01:35.05453 \N t \N
169 7528.05792 163852.1384299708608 2018-10-15 21.76552574 12905242.14372 \N 5 2020-10-27 21:01:35.057033 2020-10-27 21:01:35.057033 \N t \N
170 7632.44313 166124.1374051011662 2018-11-16 21.76552574 13084188.22536 \N 5 2020-10-27 21:01:35.059413 2020-10-27 21:01:35.059413 \N t \N
171 7614.5559 165734.812440118866 2018-12-15 21.76552574 13053524.39336 \N 5 2020-10-27 21:01:35.061972 2020-10-27 21:01:35.061972 \N t \N
172 7596.57922 165343.5405488591228 2019-01-15 21.76552574 13022707.24221 \N 5 2020-10-27 21:01:35.064327 2020-10-27 21:01:35.064327 \N t \N
173 7578.51267 164950.3125898011258 2019-02-15 21.76552574 12991736.0053 \N 5 2020-10-27 21:01:35.066735 2020-10-27 21:01:35.066735 \N t \N
174 7560.35578 164555.1183331477772 2019-03-15 21.76552574 12960609.91221 \N 5 2020-10-27 21:01:35.070679 2020-10-27 21:01:35.070679 \N t \N
175 7542.10811 164157.9482020677514 2019-04-15 21.76552574 12929328.18865 \N 5 2020-10-27 21:01:35.073166 2020-10-27 21:01:35.073166 \N t \N
176 7523.7692 163758.792184419208 2019-05-15 21.76552574 12897890.05647 \N 5 2020-10-27 21:01:35.075894 2020-10-27 21:01:35.075894 \N t \N
177 7505.33859 163357.6402680603066 2019-06-15 21.76552574 12866294.73363 \N 5 2020-10-27 21:01:35.078444 2020-10-27 21:01:35.078444 \N t \N
178 7486.81584 162954.4828761597216 2019-07-15 21.76552574 12834541.43418 \N 5 2020-10-27 21:01:35.081038 2020-10-27 21:01:35.081038 \N t \N
179 27937.1662582689 608067.111297011230791486 2017-12-15 21.76552574 12908113.30625 \N 2 2020-10-27 21:01:35.083524 2020-10-27 21:01:35.083524 \N t \N
180 28076.8520900616 611107.446864408552985584 2018-01-15 21.76552574 12880176.13999 \N 2 2020-10-27 21:01:35.086017 2020-10-27 21:01:35.086017 \N t \N
181 28849.5926027462 627926.550383586010787188 2018-02-15 21.76552574 12852099.2879 \N 2 2020-10-27 21:01:35.08838 2020-10-27 21:01:35.08838 \N t \N
182 28993.8405657599 631066.183135503266109826 2018-03-15 21.76552574 13111268.87778 \N 2 2020-10-27 21:01:35.090708 2020-10-27 21:01:35.090708 \N t \N
183 29138.8097685887 634221.514051180793323138 2018-04-15 21.76552574 13082275.03721 \N 2 2020-10-27 21:01:35.093312 2020-10-27 21:01:35.093312 \N t \N
184 29284.5038174316 637392.621621435750489384 2018-05-15 21.76552574 13053136.22745 \N 2 2020-10-27 21:01:35.095716 2020-10-27 21:01:35.095716 \N t \N
185 29430.9263365188 640579.584729543843393912 2018-06-15 21.76552574 13023851.72363 \N 2 2020-10-27 21:01:35.098486 2020-10-27 21:01:35.098486 \N t \N
186 29578.08097 643782.4826923391678 2018-07-16 21.76552574 12994420.79729 \N 2 2020-10-27 21:01:35.102918 2020-10-27 21:01:35.102918 \N t \N
187 29725.97137 647001.3950002380638 2018-08-15 21.76552574 12964842.71632 \N 2 2020-10-27 21:01:35.105572 2020-10-27 21:01:35.105572 \N t \N
188 29874.60123 650236.4020438006602 2018-09-17 21.76552574 12935116.74495 \N 2 2020-10-27 21:01:35.108492 2020-10-27 21:01:35.108492 \N t \N
189 30023.97424 653487.5841378169376 2018-10-15 21.76552574 12905242.14372 \N 2 2020-10-27 21:01:35.111145 2020-10-27 21:01:35.111145 \N t \N
190 30663.83199 667414.4244653804226 2018-11-16 21.76552574 13084188.22536 \N 2 2020-10-27 21:01:35.114061 2020-10-27 21:01:35.114061 \N t \N
191 30817.15115 670751.496588795601 2018-12-15 21.76552574 13053524.39336 \N 2 2020-10-27 21:01:35.116798 2020-10-27 21:01:35.116798 \N t \N
192 30971.236912 674105.25420777411488 2019-01-15 21.76552574 13022707.24221 \N 2 2020-10-27 21:01:35.120798 2020-10-27 21:01:35.120798 \N t \N
193 31126.09309 677475.7803360311366 2019-02-15 21.76552574 12991736.0053 \N 2 2020-10-27 21:01:35.123474 2020-10-27 21:01:35.123474 \N t \N
194 31281.72356 680863.1593367444344 2019-03-15 21.76552574 12960609.91221 \N 2 2020-10-27 21:01:35.126512 2020-10-27 21:01:35.126512 \N t \N
195 31438.13218 684267.4751813123132 2019-04-15 21.76552574 12929328.18865 \N 2 2020-10-27 21:01:35.129641 2020-10-27 21:01:35.129641 \N t \N
196 31595.32284 687688.8125376299016 2019-05-15 21.76552574 12897890.05647 \N 2 2020-10-27 21:01:35.133674 2020-10-27 21:01:35.133674 \N t \N
197 31753.29945 691127.256508902843 2019-06-15 21.76552574 12866294.73363 \N 2 2020-10-27 21:01:35.137001 2020-10-27 21:01:35.137001 \N t \N
198 31912.06595 694582.892851302553 2019-07-15 21.76552574 12834541.43418 \N 2 2020-10-27 21:01:35.139774 2020-10-27 21:01:35.139774 \N t \N
199 2408990.48 7836446.03144 2017-05-30 3.253 0.0 \N 7 2020-10-27 21:01:35.142594 2020-10-27 21:01:35.142594 \N t \N
200 11015060.44 36140413.30364 2017-06-05 3.281 2408990.48 \N 7 2020-10-27 21:01:35.145633 2020-10-27 21:01:35.145633 \N t \N
201 4029385.92 13081401.38928 2017-10-20 3.2465 13424050.92 \N 7 2020-10-27 21:01:35.148567 2020-10-27 21:01:35.148567 \N t \N
202 2581628.5 8281864.228 2017-11-22 3.208 17453436.84 \N 7 2020-10-27 21:01:35.151477 2020-10-27 21:01:35.151477 \N t \N
203 4685650.71 15518875.15152 2017-12-20 3.312 20035065.34 \N 7 2020-10-27 21:01:35.154353 2020-10-27 21:01:35.154353 2017-12-22 t \N
204 1380706.92 4960879.96356 2018-05-04 3.593 24720716.05 \N 7 2020-10-27 21:01:35.157271 2020-10-27 21:01:35.157271 2018-05-09 t \N
205 3987951.0 15403460.7375 2018-07-05 3.8625 26101422.97 \N 7 2020-10-27 21:01:35.160447 2020-10-27 21:01:35.160447 2018-07-11 t \N
206 6500000.0 23981750.0 2018-10-26 3.6895 30089373.97 \N 7 2020-10-27 21:01:35.163759 2020-10-27 21:01:35.163759 2018-10-30 t \N
207 3350000.0 12830500.0 2019-03-12 3.83 36589373.97 \N 7 2020-10-27 21:01:35.166501 2020-10-27 21:01:35.166501 2018-03-18 t \N
208 215629.57 697130.39981 2017-11-30 3.233 17453436.84 \N 9 2020-10-27 21:01:35.169583 2020-10-27 21:01:35.169583 \N t \N
209 434329.9 1617010.2177 2018-05-30 3.723 24720716.05 \N 9 2020-10-27 21:01:35.172243 2020-10-27 21:01:35.172243 \N t \N
210 638654.3 2471911.46815 2018-11-30 3.8705 36589373.97 \N 9 2020-10-27 21:01:35.174445 2020-10-27 21:01:35.174445 \N t \N
211 914022.69 3689909.59953 2019-05-30 4.037 39939373.97 \N 9 2020-10-27 21:01:35.177135 2020-10-27 21:01:35.177135 \N t \N
212 987323.42 3985824.64654 2019-11-30 4.037 39939373.97 \N 9 2020-10-27 21:01:35.179534 2020-10-27 21:01:35.179534 \N t \N
213 155517.3 502787.4309 2017-11-30 3.233 17453436.84 \N 10 2020-10-27 21:01:35.181875 2020-10-27 21:01:35.181875 \N t \N
214 131574.78 489852.90594 2018-05-30 3.723 24720716.05 \N 10 2020-10-27 21:01:35.184086 2020-10-27 21:01:35.184086 \N t \N
215 126109.11 488105.310255 2018-11-30 3.8705 36589373.97 \N 10 2020-10-27 21:01:35.187326 2020-10-27 21:01:35.187326 \N t \N
216 106800.29 431152.77073 2019-05-30 4.037 39939373.97 \N 10 2020-10-27 21:01:35.189785 2020-10-27 21:01:35.189785 \N t \N
217 107441.79 433742.50623 2019-11-30 4.037 39939373.97 \N 10 2020-10-27 21:01:35.191988 2020-10-27 21:01:35.191988 \N t \N
218 12030000.0 3006657.9 2014-11-14 0.400112931 0.0 \N 12 2020-10-27 21:01:35.194248 2020-10-27 21:01:35.194248 \N t \N
219 9943227.53 34304134.98 2016-05-31 0.289855072 1203000.0 \N 12 2020-10-27 21:01:35.19644 2020-10-27 21:01:35.19644 \N t \N
220 7591386.98 24296234.03 2017-12-22 0.3124511795 11146227.53 \N 12 2020-10-27 21:01:35.198409 2020-10-27 21:01:35.198409 2018-01-19 t \N
221 5051688.4 3006657.9 2019-06-21 0.260960334 23320862.55 \N 12 2020-10-27 21:01:35.200432 2020-10-27 21:01:35.200432 2019-06-26 t \N
222 5713.75 17426.92 2015-04-15 0.327869181702790854608846543 1203000.0 \N 14 2020-10-27 21:01:35.202506 2020-10-27 21:01:35.202506 \N \N \N
223 7165.93 28240.93 2015-10-15 0.253742706065274762552083094 1203000.0 \N 14 2020-10-27 21:01:35.204427 2020-10-27 21:01:35.204427 \N \N \N
224 11414.32 40264.01 2016-04-15 0.283486915486063111945382489 1203000.0 \N 14 2020-10-27 21:01:35.206508 2020-10-27 21:01:35.206508 \N \N \N
225 82242.95 260874.64 2016-10-15 0.315258508837808075173577623 11146227.53 \N 14 2020-10-27 21:01:35.208688 2020-10-27 21:01:35.208688 \N \N \N
226 114972.74 356530.47 2017-04-15 0.32247661749639518888806334 11146227.53 \N 14 2020-10-27 21:01:35.210902 2020-10-27 21:01:35.210902 \N \N \N
227 122525.9 390122.47 2017-10-15 0.314070348216548511035521743 11146227.53 \N 14 2020-10-27 21:01:35.213068 2020-10-27 21:01:35.213068 \N \N \N
228 202229.9 686853.63 2018-04-15 0.294429396842526696699557371 18737614.51 \N 14 2020-10-27 21:01:35.215224 2020-10-27 21:01:35.215224 \N \N \N
229 309632.66 1164373.62 2018-10-15 0.265922084356394127170280618 18737614.51 \N 14 2020-10-27 21:01:35.217363 2020-10-27 21:01:35.217363 \N \N \N
230 341394.19 1316928.09 2019-04-15 0.259235255586354756849328045 18737614.51 \N 14 2020-10-27 21:01:35.220704 2020-10-27 21:01:35.220704 \N \N \N
231 358098.87 1466056.77 2019-10-15 0.24425989315543353754302434 23320862.55 \N 14 2020-10-27 21:01:35.223293 2020-10-27 21:01:35.223293 \N \N \N
232 30639.93 74455.03 2014-10-15 0.411522633192142962000015311 0.0 \N 15 2020-10-27 21:01:35.225655 2020-10-27 21:01:35.225655 \N \N \N
233 31772.41 96905.85 2015-04-15 0.327868854150704008065560541 1203000.0 \N 15 2020-10-27 21:01:35.228151 2020-10-27 21:01:35.228151 \N \N \N
234 31670.28 124812.57 2015-10-15 0.253742711972039354689996368 1203000.0 \N 15 2020-10-27 21:01:35.230549 2020-10-27 21:01:35.230549 \N \N \N
235 81585.81 287793.94 2016-04-15 0.283486893434934731426241984 1203000.0 \N 15 2020-10-27 21:01:35.232986 2020-10-27 21:01:35.232986 \N \N \N
236 44557.91 141337.69 2016-10-15 0.315258513139701094591258708 11146227.53 \N 15 2020-10-27 21:01:35.235317 2020-10-27 21:01:35.235317 \N \N \N
237 38159.74 118333.35 2017-04-15 0.322476630637094276465594864 11146227.53 \N 15 2020-10-27 21:01:35.237498 2020-10-27 21:01:35.237498 \N \N \N
238 38414.39 122311.42 2017-10-15 0.314070346006938681604710337 11146227.53 \N 15 2020-10-27 21:01:35.239788 2020-10-27 21:01:35.239788 \N \N \N
239 26349.43 89493.2 2018-04-15 0.294429409161813411521769252 18737614.51 \N 15 2020-10-27 21:01:35.24193 2020-10-27 21:01:35.24193 \N \N \N
240 19383.93 72893.27 2018-10-15 0.265922080323739077695375718 18737614.51 \N 15 2020-10-27 21:01:35.244168 2020-10-27 21:01:35.244168 \N \N \N
241 19278.0 74364.89 2019-04-15 0.259235238564865758558911336 18737614.51 \N 15 2020-10-27 21:01:35.246307 2020-10-27 21:01:35.246307 \N \N \N
242 11356.59 46493.88 2019-10-15 0.244259889688707416976169767 23320862.55 \N 15 2020-10-27 21:01:35.248588 2020-10-27 21:01:35.248588 \N \N \N
243 468440.36 1807008.69 2019-04-15 0.259235255808316007600384036 18737614.51 \N 13 2020-10-27 21:01:35.250622 2020-10-27 21:01:35.250622 \N \N \N
244 597970.87 2448092.74 2019-10-15 0.244259892703247835292383572 23320862.55 \N 13 2020-10-27 21:01:35.252782 2020-10-27 21:01:35.252782 \N \N \N
245 125371.278 175000.0 2015-01-29 1.395854 0.0 \N 16 2020-10-27 21:01:35.254685 2020-10-27 21:01:35.254685 \N t \N
246 206385.691 290189.22 2015-02-24 1.406053 125371.278 \N 16 2020-10-27 21:01:35.256666 2020-10-27 21:01:35.256666 \N t \N
247 624784.5539 896391.52 2015-04-28 1.434721 331756.969 \N 16 2020-10-27 21:01:35.258959 2020-10-27 21:01:35.258959 \N t \N
248 522952.5584 799858.03 2015-10-26 1.529504 956541.5229 \N 16 2020-10-27 21:01:35.261285 2020-10-27 21:01:35.261285 \N t \N
249 858739.6504 1371244.92 2016-02-24 1.596811 1479494.0813 \N 16 2020-10-27 21:01:35.263674 2020-10-27 21:01:35.263674 \N t \N
250 548930.0373 884398.2 2016-03-18 1.611131 2338233.7317 \N 16 2020-10-27 21:01:35.26595 2020-10-27 21:01:35.26595 \N t \N
251 1094681.3614 1824918.12 2016-06-22 1.667077 2887163.769 \N 16 2020-10-27 21:01:35.268075 2020-10-27 21:01:35.268075 \N t \N
252 1178.1416 5678.8467 2015-04-15 1.12459645 331756.969 \N 18 2020-10-27 21:01:35.271008 2020-10-27 21:01:35.271008 \N \N \N
253 4701.1907 1.73571224 2015-07-15 1.12459645 956541.5229 \N 18 2020-10-27 21:01:35.273947 2020-10-27 21:01:35.273947 \N \N \N
254 5301.1531 4301.5484 2015-10-15 1.12459645 956541.5229 \N 18 2020-10-27 21:01:35.276518 2020-10-27 21:01:35.276518 \N \N \N
255 7754.1005 4301.5484 2016-01-15 1.12459645 1479494.0813 \N 18 2020-10-27 21:01:35.27984 2020-10-27 21:01:35.27984 \N \N \N
256 11517.4879 1.73571224 2016-04-15 1.65748987 2887163.769 \N 18 2020-10-27 21:01:35.282931 2020-10-27 21:01:35.282931 \N \N \N
\.
--
-- Name: attachments_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.attachments_id_seq', 1, false);
--
-- Name: creditors_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.creditors_id_seq', 5, true);
--
-- Name: currencies_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.currencies_id_seq', 4, true);
--
-- Name: debts_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.debts_id_seq', 5, true);
--
-- Name: transaction_infos_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.transaction_infos_id_seq', 23, true);
--
-- Name: transaction_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.transaction_items_id_seq', 256, true);
--
-- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.ar_internal_metadata
ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);
--
-- Name: attachments attachments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.attachments
ADD CONSTRAINT attachments_pkey PRIMARY KEY (id);
--
-- Name: creditors creditors_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.creditors
ADD CONSTRAINT creditors_pkey PRIMARY KEY (id);
--
-- Name: currencies currencies_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.currencies
ADD CONSTRAINT currencies_pkey PRIMARY KEY (id);
--
-- Name: debts debts_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.debts
ADD CONSTRAINT debts_pkey PRIMARY KEY (id);
--
-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.schema_migrations
ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
--
-- Name: transaction_infos transaction_infos_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.transaction_infos
ADD CONSTRAINT transaction_infos_pkey PRIMARY KEY (id);
--
-- Name: transaction_items transaction_items_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.transaction_items
ADD CONSTRAINT transaction_items_pkey PRIMARY KEY (id);
--
-- PostgreSQL database dump complete
--
--
-- Database "sigdiv_test" dump
--
--
-- PostgreSQL database dump
--
-- Dumped from database version 13.0 (Debian 13.0-1.pgdg100+1)
-- Dumped by pg_dump version 13.0 (Debian 13.0-1.pgdg100+1)
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;
--
-- Name: sigdiv_test; Type: DATABASE; Schema: -; Owner: postgres
--
CREATE DATABASE sigdiv_test WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE = 'en_US.utf8';
ALTER DATABASE sigdiv_test OWNER TO postgres;
\connect sigdiv_test
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;
--
-- PostgreSQL database dump complete
--
--
-- PostgreSQL database cluster dump complete
--
|
<filename>.sh/db/postgresql/sql/create_functions.sql
CREATE OR REPLACE FUNCTION public.to_ascii(bytea, name) RETURNS text
AS 'to_ascii_encname' LANGUAGE internal STRICT;
CREATE OR REPLACE FUNCTION public.ci_ai(text_value text) RETURNS text
AS $$
SELECT lower(public.to_ascii(convert_to(text_value, 'latin1'), 'latin1'));
$$ LANGUAGE 'sql' IMMUTABLE STRICT;
|
<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : stuinfor
Source Server Version : 50553
Source Host : localhost:3306
Source Database : shop_hm01
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2017-12-12 16:36:39
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `sp_goods`
-- ----------------------------
DROP TABLE IF EXISTS `sp_goods`;
CREATE TABLE `sp_goods` (
`goods_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
`goods_name` varchar(128) NOT NULL COMMENT '商品名称',
`goods_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品价格',
`goods_number` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '商品数量',
`goods_weight` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '商品重量',
`type_id` smallint(3) NOT NULL DEFAULT '0' COMMENT '类型id',
`goods_introduce` text COMMENT '商品详情介绍',
`brand_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '商品所属品牌',
`cat_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '商品所属分类',
`goods_big_logo` char(128) NOT NULL DEFAULT '' COMMENT '图片logo大图',
`goods_small_logo` char(128) NOT NULL DEFAULT '' COMMENT '图片logo小图',
`sale_time` int(11) NOT NULL DEFAULT '0' COMMENT '商品上架时间',
`is_del` enum('0','1') NOT NULL DEFAULT '0' COMMENT '0:正常 1:删除',
`add_time` int(11) NOT NULL COMMENT '添加商品时间',
`upd_time` int(11) NOT NULL COMMENT '修改商品时间',
PRIMARY KEY (`goods_id`),
UNIQUE KEY `goods_name` (`goods_name`),
KEY `goods_price` (`goods_price`),
KEY `add_time` (`add_time`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='商品表';
-- ----------------------------
-- Records of sp_goods
-- ----------------------------
INSERT INTO `sp_goods` VALUES ('1', '三星', '4999.00', '1', '120', '0', '物美价廉 还有一个响', '0', '0', '', '', '0', '1', '1483945990', '1483945990');
INSERT INTO `sp_goods` VALUES ('2', '苹果', '5999.00', '1', '129', '0', '<p>乔布斯说是我创造的</p>', '0', '0', './public/Upload/2017-01-13/5878d4f467080.gif', './public/Upload/2017-01-13/thomb_5878d4f467080.gif', '0', '1', '1484313842', '1484313842');
INSERT INTO `sp_goods` VALUES ('6', '红米', '1.00', '1', '1', '1', '<p>啊啊啊啊<br /></p>', '0', '0', './public/Upload/2017-01-16/587c8f488c8ee.gif', './public/Upload/2017-01-16/thomb_587c8f488c8ee.gif', '0', '1', '1484558151', '1484558151');
INSERT INTO `sp_goods` VALUES ('7', '格力', '2222.00', '1', '1200', '5', '<p>$parent=M(\'Auth\')->where(\'auth_pid = 0\')->select();<br /> $this->assign(\'parent\',$parent);<br /> $this->display();<br /> }<br /> }<br /> public function del(){<br /> $auth_id=I(\'get.auth_id\');<br /> if(M(\'Auth\')->delete($auth_id)){<br /> $this->success(\'删除权限成功\',U(\'showList\'),3);<br /> }else{<br /> $this->error(\'删除权限失败\');<br /> }</p>', '0', '0', './public/Upload/2017-02-11/589eed14a33ec.jpg', './public/Upload/2017-02-11/thomb_589eed14a33ec.jpg', '0', '1', '1486810387', '1486810387');
INSERT INTO `sp_goods` VALUES ('8', '小米', '1333.00', '1', '1', '0', '', '0', '0', '', '', '0', '0', '1490514699', '1490514699');
|
-- Reverting constraints til proper examination of issues introduced by it
SELECT fn_db_drop_constraint('async_tasks', 'fk_async_tasks_command_entities_command_id');
SELECT fn_db_drop_constraint('async_tasks', 'fk_async_tasks_command_entities_root_command_id');
|
<filename>MCResources/Assets/db/update_14_to_15.sql
CREATE INDEX ix_activity_reference ON activity (reference);
|
<reponame>blackjokie/arkademy-test<gh_stars>0
-- Adminer 4.7.8 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `produk`;
CREATE TABLE `produk` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nama_produk` varchar(100) DEFAULT NULL,
`keterangan` varchar(100) DEFAULT NULL,
`harga` int(95) DEFAULT NULL,
`jumlah` int(95) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
INSERT INTO `produk` (`id`, `nama_produk`, `keterangan`, `harga`, `jumlah`) VALUES
(2, 'Building Event-Driven Microservices', 'Book', 200000, 3);
-- 2021-04-14 03:51:14
|
<filename>exportlibrary.traverser/scripts/other_queries/querying_.sql
--
-- Copyright (C) 2013 <NAME> <j.atienza at har.mrc.ac.uk>
--
-- MEDICAL RESEARCH COUNCIL UK MRC
--
-- Harwell Mammalian Genetics Unit
--
-- http://www.har.mrc.ac.uk
--
-- 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.
--
SELECT VALIDATIONREPORT.SUBMISSION_VALIDATIONREPORT__0 AS submission,
VALIDATIONREPORT.CENTREPROCEDURE_VALIDATIONRE_0 AS centreProcedure,
VALIDATIONREPORT.CENTRESPECIMEN_VALIDATIONREP_0 AS centreSpecimen,
VALIDATIONREPORT.EXPERIMENT_VALIDATIONREPORT__0 AS experiment,
VALIDATIONREPORT.SPECIMEN_VALIDATIONREPORT_HJ_0 AS specimen
FROM phenodcc_raw_m2m.VALIDATIONREPORT
order by submission, centreProcedure,experiment, centreSpecimen, specimen;
|
create or alter proc dbo.uspSaveSpecialEvents @TVP dbo.SpecialEventType READONLY as
begin
set nocount on
MERGE dbo.SpecialEvent AS t
USING @TVP s
ON (t.Id = s.Id and t.SpecialId = s.SpecialId)
WHEN MATCHED THEN
UPDATE
SET PeriodNumber = s.PeriodNumber,
Home = s.Home,
Away = s.Away,
UpdatedAt = sysdatetimeoffset()
WHEN NOT MATCHED THEN
INSERT (Id,
PeriodNumber,
Home,
Away,
SpecialId)
VALUES (s.Id,
s.PeriodNumber,
s.Home,
s.Away,
s.SpecialId);
end
|
CREATE TABLE flights_2008_7M (
flight_year SMALLINT,
flight_month SMALLINT,
flight_dayofmonth SMALLINT,
flight_dayofweek SMALLINT,
deptime SMALLINT,
crsdeptime SMALLINT,
arrtime SMALLINT,
crsarrtime SMALLINT,
uniquecarrier TEXT ENCODING DICT(32),
flightnum SMALLINT,
tailnum TEXT ENCODING DICT(32),
actualelapsedtime SMALLINT,
crselapsedtime SMALLINT,
airtime SMALLINT,
arrdelay SMALLINT,
depdelay SMALLINT,
origin TEXT ENCODING DICT(32),
dest TEXT ENCODING DICT(32),
distance SMALLINT,
taxiin SMALLINT,
taxiout SMALLINT,
cancelled SMALLINT,
cancellationcode TEXT ENCODING DICT(32),
diverted SMALLINT,
carrierdelay SMALLINT,
weatherdelay SMALLINT,
nasdelay SMALLINT,
securitydelay SMALLINT,
lateaircraftdelay SMALLINT,
dep_timestamp TIMESTAMP(0),
arr_timestamp TIMESTAMP(0),
carrier_name TEXT ENCODING DICT(32),
plane_type TEXT ENCODING DICT(32),
plane_manufacturer TEXT ENCODING DICT(32),
plane_issue_date DATE ENCODING DAYS(32),
plane_model TEXT ENCODING DICT(32),
plane_status TEXT ENCODING DICT(32),
plane_aircraft_type TEXT ENCODING DICT(32),
plane_engine_type TEXT ENCODING DICT(32),
plane_year SMALLINT,
origin_name TEXT ENCODING DICT(32),
origin_city TEXT ENCODING DICT(32),
origin_state TEXT ENCODING DICT(32),
origin_country TEXT ENCODING DICT(32),
origin_lat FLOAT,
origin_lon FLOAT,
dest_name TEXT ENCODING DICT(32),
dest_city TEXT ENCODING DICT(32),
dest_state TEXT ENCODING DICT(32),
dest_country TEXT ENCODING DICT(32),
dest_lat FLOAT,
dest_lon FLOAT,
origin_merc_x FLOAT,
origin_merc_y FLOAT,
dest_merc_x FLOAT,
dest_merc_y FLOAT)
WITH (FRAGMENT_SIZE=2000000);
copy flights_2008_7M from 's3://omnisci-community/datasets/airline_on-time_performance/flights_2008_7M.csv.gz' with (header='true');
|
ALTER TABLE system_intake ADD COLUMN project_acronym text;
ALTER TABLE system_intake ADD COLUMN grt_date timestamp with time zone;
ALTER TABLE system_intake ADD COLUMN grb_date timestamp with time zone;
|
INSERT INTO bank_info (bank_name, bank_short_name, card_type, create_time, create_user, modify_time, modify_user)
VALUES ('中国工商银行', 'ICBC', 'DebitCard', now(), 'system', NULL, NULL),
('中国建设银行', 'CBC', 'DebitCard', now(), 'system', NULL, NULL),
('中国银行', 'BC', 'DebitCard', now(), 'system', NULL, NULL),
('中国农业银行', 'ABC', 'DebitCard', now(), 'system', NULL, NULL),
('民生银行', 'CMSB', 'DebitCard', now(), 'system', NULL, NULL),
('招商银行', 'CMBC', 'DebitCard', now(), 'system', NULL, NULL),
('兴业银行', 'CIB', 'DebitCard', now(), 'system', NULL, NULL),
('国家开发银行', 'CDB', 'DebitCard', now(), 'system', NULL, NULL);
|
CREATE TABLE `identity_verifiable_addresses` (
`id` char(36) NOT NULL,
PRIMARY KEY(`id`),
`code` VARCHAR (32) NOT NULL,
`status` VARCHAR (16) NOT NULL,
`via` VARCHAR (16) NOT NULL,
`verified` bool NOT NULL,
`value` VARCHAR (400) NOT NULL,
`verified_at` DATETIME,
`expires_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`identity_id` char(36) NOT NULL,
`created_at` DATETIME NOT NULL,
`updated_at` DATETIME NOT NULL,
FOREIGN KEY (`identity_id`) REFERENCES `identities` (`id`) ON DELETE cascade
) ENGINE=InnoDB;
|
.bail on
.echo on
BEGIN TRANSACTION;
-- update schema version --
DELETE FROM meta WHERE key='schema_version' AND value='4';
INSERT OR ROLLBACK INTO meta (key, value) VALUES ('schema_version', '5');
-- database changes --
CREATE TABLE api_access (
api_user TEXT NOT NULL
REFERENCES users ( user_name ) ON DELETE CASCADE
ON UPDATE CASCADE,
api_right TEXT NOT NULL,
CONSTRAINT api_user_right UNIQUE ( api_user, api_right ) ON CONFLICT FAIL
);
CREATE TABLE api_address_delegates (
api_user TEXT NOT NULL
REFERENCES users ( user_name ) ON DELETE CASCADE
ON UPDATE CASCADE,
api_expression TEXT NOT NULL,
CONSTRAINT api_user_expression UNIQUE ( api_user, api_expression ) ON CONFLICT FAIL
);
CREATE TABLE api_user_delegates (
api_user TEXT NOT NULL
REFERENCES users ( user_name ) ON DELETE CASCADE
ON UPDATE CASCADE,
api_delegate TEXT NOT NULL
REFERENCES users ( user_name ) ON DELETE CASCADE
ON UPDATE CASCADE,
CONSTRAINT api_user_delegate UNIQUE ( api_user, api_delegate ) ON CONFLICT FAIL
);
-- add admin right to every user (to avoid lock outs) --
-- IMPORTANT: remove access to non admin users!!!! --
INSERT INTO api_access (api_user, api_right) SELECT user_name as api_user, 'admin' AS api_right FROM users;
COMMIT;
|
<reponame>andrebian/curso-zf-avancado-son
-- MySQL dump 10.13 Distrib 8.0.11, for macos10.13 (x86_64)
--
-- Host: 127.0.0.1 Database: iniciando_zf
-- ------------------------------------------------------
-- Server version 8.0.11
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
SET NAMES utf8mb4 ;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `posts`
--
DROP TABLE IF EXISTS `posts`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `posts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`titulo` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`conteudo` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`dataCriacao` datetime NOT NULL,
`dataAtualizacao` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `posts`
--
LOCK TABLES `posts` WRITE;
/*!40000 ALTER TABLE `posts` DISABLE KEYS */;
INSERT INTO `posts` VALUES (1,'Primeiro Post','Conteúdo do primeiro post','2018-08-05 17:57:22','2018-08-05 17:57:24'),(2,'Post 2','Conteúdo 2\r\nTeste','2018-08-08 20:45:34',NULL),(3,'Titulo 3','Conteúdo 2\r\nTeste','2018-08-08 20:48:51',NULL),(4,'POst #4','Conteúdo do post #4','2018-08-08 20:50:55',NULL);
/*!40000 ALTER TABLE `posts` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-06-02 21:12:35
|
ALTER TABLE `ecommerce_shipment_positions` DROP `tax_type`;
ALTER TABLE `ecommerce_shipment_positions` CHANGE `tax_rate` `amount_rate` INT(5) UNSIGNED NOT NULL;
ALTER TABLE `ecommerce_shipment_positions` MODIFY COLUMN `amount_rate` INT(5) UNSIGNED NOT NULL AFTER `amount_type`;
|
<reponame>CUBRID/cubrid-testcase
--+ holdcas on;
--[er]Revoke user privilege of select on superclass and subclass with keyword of except(select from DCL1,DCL3)
CALL login('dba','') ON CLASS db_user;
CREATE CLASS DCL1 (id INTEGER);
CREATE CLASS DCL2 UNDER DCL1 (id INTEGER);
CREATE CLASS DCL3 UNDER DCL1 (id INTEGER);
CALL add_user('DCL_USER1','DCL1') ON CLASS db_user;
GRANT SELECT ON ALL DCL1 (EXCEPT DCL2) TO DCL_USER1;
REVOKE SELECT ON ALL DCL1 (EXCEPT DCL2) FROM DCL_USER1;
CALL login('DCL_USER1','DCL1') ON CLASS db_user;
SELECT id FROM dba.DCL1;
SELECT id FROM dba.DCL3;
CALL login('dba','') ON CLASS db_user;
CALL drop_user('DCL_USER1') ON CLASS db_user;
DROP CLASS ALL DCL1;
--+ holdcas off;
|
<filename>migrations/82-remove-toolbar-category.sql
-- bug 592168
INSERT INTO users_tags_addons (user_id, tag_id, addon_id, created)
SELECT '9945', '119', addon_id, NOW() FROM addons_categories WHERE category_id=92;
DELETE FROM addons_categories WHERE category_id=92;
DELETE FROM categories WHERE id=92;
|
<reponame>iotconnect-apps/AppConnect-SmartElevator
/*******************************************************************
DECLARE @count INT
,@output INT = 0
,@fieldName nvarchar(255)
EXEC [dbo].[Alert_List]
@deviceGuid = 'FA973382-0321-4701-A03E-CDDEAEC9F68B'
,@pagesize = 30
,@pageNumber = 1
,@orderby = NULL
,@count = @count OUTPUT
,@invokinguser = '7D31E738-5E24-4EA2-AAEF-47BB0F3CCD41'
,@version = 'v1'
,@output = @output OUTPUT
,@fieldname = @fieldName OUTPUT
SELECT @count count, @output status, @fieldName fieldName
001 SAQM-1 17-03-2020 [<NAME>] Added Initial Version to List Alerts
*******************************************************************/
CREATE PROCEDURE [dbo].[Alert_List]
( @companyGuid UNIQUEIDENTIFIER = NULL
,@entityGuid UNIQUEIDENTIFIER = NULL
,@deviceGuid UNIQUEIDENTIFIER = NULL
,@search VARCHAR(100) = NULL
,@pageSize INT
,@pageNumber INT
,@count INT OUTPUT
,@orderby VARCHAR(100) = NULL
,@invokingUser UNIQUEIDENTIFIER
,@version VARCHAR(10)
,@output SMALLINT OUTPUT
,@fieldName VARCHAR(255) OUTPUT
,@culture VARCHAR(10) = 'en-Us'
,@enableDebugInfo CHAR(1) = '0'
)
AS
BEGIN
SET NOCOUNT ON
IF (@enableDebugInfo = 1)
BEGIN
DECLARE @Param XML
SELECT @Param =
(
SELECT 'Alert_List' AS '@procName'
, CONVERT(VARCHAR(MAX),@companyGuid) AS '@companyGuid'
, CONVERT(VARCHAR(MAX),@entityGuid) AS '@entityGuid'
, CONVERT(VARCHAR(MAX),@deviceGuid) AS '@deviceGuid'
, CONVERT(VARCHAR(MAX),@search) AS '@search'
, CONVERT(VARCHAR(MAX),@pageSize) AS '@pageSize'
, CONVERT(VARCHAR(MAX),@pageNumber) AS '@pageNumber'
, CONVERT(VARCHAR(MAX),@orderby) AS '@orderby'
, CONVERT(VARCHAR(MAX),@version) AS '@version'
, CONVERT(VARCHAR(MAX),@invokingUser) AS '@invokingUser'
FOR XML PATH('Params')
)
INSERT INTO DebugInfo(data, dt) VALUES(Convert(VARCHAR(MAX), @Param), GETUTCDATE())
END
DECLARE @dt DATETIME = GETUTCDATE()
DECLARE @poutput SMALLINT,@pfieldname nvarchar(100)
IF(@poutput!=1)
BEGIN
SET @output = @poutput
SET @fieldName = @pfieldName
RETURN;
END
BEGIN TRY
SELECT
@output = 1
,@count = -1
IF OBJECT_ID('tempdb..#temp_alerts') IS NOT NULL DROP TABLE #temp_alerts
CREATE TABLE #temp_alerts
(
[guid] UNIQUEIDENTIFIER
,[message] NVARCHAR(500)
,[eventDate] DATETIME
,[uniqueId] NVARCHAR(500)
,[severity] NVARCHAR(200)
,[buildingName] NVARCHAR(500)
,[wingName] NVARCHAR(500)
,[elevatorName] NVARCHAR(500)
,[rowNum] INT
)
IF LEN(ISNULL(@orderby, '')) = 0
SET @orderby = 'uniqueId asc'
DECLARE @Sql nvarchar(MAX) = ''
SET @Sql = ' SELECT
*, ROW_NUMBER() OVER (ORDER BY '+@orderby+') AS rowNum
FROM
( SELECT
I.[guid]
, I.[message]
, I.[eventDate]
, E.[uniqueId]
, I.[severity]
, EP.[name] AS [buildingName]
, G.[name] AS [wingName]
, E.[name] AS [elevatorName]
FROM dbo.[IOTConnectAlert] I WITH (NOLOCK)
JOIN dbo.[Elevator] E WITH (NOLOCK) ON I.[deviceGuid] = E.[guid] AND E.[isDeleted] = 0
JOIN dbo.[Entity] G WITH (NOLOCK) ON I.[entityGuid] = G.[guid] AND G.[isDeleted] = 0
LEFT JOIN [dbo].[Entity] EP WITH (NOLOCK) ON G.[parentEntityGuid] = EP.[guid] AND EP.[isDeleted] = 0
WHERE I.[companyGuid] = ISNULL(@companyGuid,I.[companyGuid])
AND (G.[parentEntityGuid] = ISNULL(@entityGuid,G.[parentEntityGuid]) OR I.[entityGuid] = ISNULL(@entityGuid,I.[entityGuid]))
AND I.[deviceGuid] = ISNULL(@deviceGuid,I.[deviceGuid]) '
+ CASE WHEN @search IS NULL THEN '' ELSE ' AND (E.[uniqueId] LIKE ''%' + @search + '%'')
OR E.name LIKE ''%' + @search + '%''
OR G.[name] LIKE ''%' + @search + '%''
OR EP.[name] LIKE ''%' + @search + '%'' '
END +
') data'
INSERT INTO #temp_alerts
EXEC sp_executesql
@Sql
, N'@orderby VARCHAR(100), @invokingUser UNIQUEIDENTIFIER, @companyGuid UNIQUEIDENTIFIER, @entityGuid UNIQUEIDENTIFIER, @deviceGuid UNIQUEIDENTIFIER '
, @orderby = @orderby
, @invokingUser = @invokingUser
, @companyGuid = @companyGuid
, @entityGuid = @entityGuid
, @deviceGuid = @deviceGuid
SET @count = @@ROWCOUNT
IF(@pageSize <> -1 AND @pageNumber <> -1)
BEGIN
SELECT [guid]
,[message]
,[eventDate]
,[uniqueId]
,[severity]
,[buildingName]
,[wingName]
,[elevatorName]
FROM #temp_alerts
WHERE rowNum BETWEEN ((@pageNumber - 1) * @pageSize) + 1 AND (@pageSize * @pageNumber)
END
ELSE
BEGIN
SELECT [guid]
,[message]
,[eventDate]
,[uniqueId]
,[severity]
,[buildingName]
,[wingName]
,[elevatorName]
FROM #temp_alerts
END
SET @output = 1
SET @fieldName = 'Success'
END TRY
BEGIN CATCH
DECLARE @errorReturnMessage VARCHAR(MAX)
SET @output = 0
SELECT @errorReturnMessage =
ISNULL(@errorReturnMessage, '') + SPACE(1) +
'ErrorNumber:' + ISNULL(CAST(ERROR_NUMBER() as VARCHAR), '') +
'ErrorSeverity:' + ISNULL(CAST(ERROR_SEVERITY() as VARCHAR), '') +
'ErrorState:' + ISNULL(CAST(ERROR_STATE() as VARCHAR), '') +
'ErrorLine:' + ISNULL(CAST(ERROR_LINE () as VARCHAR), '') +
'ErrorProcedure:' + ISNULL(CAST(ERROR_PROCEDURE() as VARCHAR), '') +
'ErrorMessage:' + ISNULL(CAST(ERROR_MESSAGE() as VARCHAR(max)), '')
RAISERROR (@errorReturnMessage, 11, 1)
IF (XACT_STATE()) = -1
BEGIN
ROLLBACK TRANSACTION
END
IF (XACT_STATE()) = 1
BEGIN
ROLLBACK TRANSACTION
END
RAISERROR (@errorReturnMessage, 11, 1)
END CATCH
END
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.