From 9c13af313285e61f4257885fb84a96eb40ae8e9c Mon Sep 17 00:00:00 2001 From: Zhihang Yao Date: Fri, 8 Oct 2021 13:32:52 +0200 Subject: [PATCH] Revert "new database schema using bigint data type" This reverts commit 91d59f1580ddde3c39551dd9f432c519960a4212. --- .../3dcitydb/oracle/CREATE_ADE_DB.sql | 250 ++++++++-------- .../oracle/DISABLE_ADE_VERSIONING.sql | 2 +- .../database/3dcitydb/oracle/DROP_ADE_DB.sql | 24 +- .../3dcitydb/oracle/ENABLE_ADE_VERSIONING.sql | 2 +- .../3dcitydb/postgreSQL/CREATE_ADE_DB.sql | 280 +++++++++--------- .../3dcitydb/postgreSQL/DROP_ADE_DB.sql | 24 +- .../schema-mapping/schema-mapping.xml | 4 +- 7 files changed, 293 insertions(+), 293 deletions(-) diff --git a/resources/database/3dcitydb/oracle/CREATE_ADE_DB.sql b/resources/database/3dcitydb/oracle/CREATE_ADE_DB.sql index 48e8434..4ba7dae 100644 --- a/resources/database/3dcitydb/oracle/CREATE_ADE_DB.sql +++ b/resources/database/3dcitydb/oracle/CREATE_ADE_DB.sql @@ -1,4 +1,4 @@ --- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2021-10-08 12:36:36 +-- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2020-08-25 11:09:20 -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- *********************************** Create tables ************************************** -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -7,7 +7,7 @@ -- -------------------------------------------------------------------- CREATE TABLE ur_agency ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, address VARCHAR2(1000), email VARCHAR2(1000), fareurl VARCHAR2(1000), @@ -30,10 +30,10 @@ CREATE TABLE ur_agency -- -------------------------------------------------------------------- CREATE TABLE ur_areaofannualdiversions ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, area NUMBER, area_uom VARCHAR2(1000), - landusediver_areaofannual_id NUMBER(38), + landusediver_areaofannual_id INTEGER, year DATE, PRIMARY KEY (id) ); @@ -43,16 +43,16 @@ CREATE TABLE ur_areaofannualdiversions -- -------------------------------------------------------------------- CREATE TABLE ur_attribution ( - id NUMBER(38) NOT NULL, - agency_id NUMBER(38), + id INTEGER NOT NULL, + agency_id INTEGER, email VARCHAR2(1000), isauthority NUMBER, isoperator NUMBER, isproducer NUMBER, organizationname VARCHAR2(1000), phonenumber VARCHAR2(1000), - route_id NUMBER(38), - trip_id NUMBER(38), + route_id INTEGER, + trip_id INTEGER, url VARCHAR2(1000), PRIMARY KEY (id) ); @@ -62,9 +62,9 @@ CREATE TABLE ur_attribution -- -------------------------------------------------------------------- CREATE TABLE ur_building ( - id NUMBER(38) NOT NULL, - buildingdetails_id NUMBER(38), - largecustomerfacilities_id NUMBER(38), + id INTEGER NOT NULL, + buildingdetails_id INTEGER, + largecustomerfacilities_id INTEGER, PRIMARY KEY (id) ); @@ -73,7 +73,7 @@ CREATE TABLE ur_building -- -------------------------------------------------------------------- CREATE TABLE ur_buildingdetails ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, areaclassification_codespace VARCHAR2(1000), areaclassificationtype VARCHAR2(1000), buildingfootprintarea NUMBER, @@ -113,7 +113,7 @@ CREATE TABLE ur_buildingdetails -- -------------------------------------------------------------------- CREATE TABLE ur_calendar ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, enddate TIMESTAMP, friday NUMBER, monday NUMBER, @@ -131,8 +131,8 @@ CREATE TABLE ur_calendar -- -------------------------------------------------------------------- CREATE TABLE ur_calendardate ( - id NUMBER(38) NOT NULL, - calendar_id NUMBER(38), + id INTEGER NOT NULL, + calendar_id INTEGER, date_ TIMESTAMP, exceptiontype VARCHAR2(1000), exceptiontype_codespace VARCHAR2(1000), @@ -144,7 +144,7 @@ CREATE TABLE ur_calendardate -- -------------------------------------------------------------------- CREATE TABLE ur_censusblock ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, daytimepopulation INTEGER, daytimepopulationdensity NUMBER, numberofmainhouseholds INTEGER, @@ -157,7 +157,7 @@ CREATE TABLE ur_censusblock -- -------------------------------------------------------------------- CREATE TABLE ur_cityobjectgroup ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, fiscalyearofpublication DATE, language VARCHAR2(1000), language_codespace VARCHAR2(1000), @@ -169,7 +169,7 @@ CREATE TABLE ur_cityobjectgroup -- -------------------------------------------------------------------- CREATE TABLE ur_cityobjectgroup_1 ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, fiscalyearofpublication DATE, language VARCHAR2(1000), language_codespace VARCHAR2(1000), @@ -181,7 +181,7 @@ CREATE TABLE ur_cityobjectgroup_1 -- -------------------------------------------------------------------- CREATE TABLE ur_cityobjectgroup_2 ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, fiscalyearofpublication DATE, language VARCHAR2(1000), language_codespace VARCHAR2(1000), @@ -193,7 +193,7 @@ CREATE TABLE ur_cityobjectgroup_2 -- -------------------------------------------------------------------- CREATE TABLE ur_cityobjectgroup_3 ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, PRIMARY KEY (id) ); @@ -202,7 +202,7 @@ CREATE TABLE ur_cityobjectgroup_3 -- -------------------------------------------------------------------- CREATE TABLE ur_description ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, description VARCHAR2(1000), frequencyofservice INTEGER, numberofcustomers INTEGER, @@ -214,7 +214,7 @@ CREATE TABLE ur_description -- -------------------------------------------------------------------- CREATE TABLE ur_developmentproject ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, benefitarea NUMBER, benefitarea_uom VARCHAR2(1000), benefitperiod VARCHAR2(1000), @@ -239,7 +239,7 @@ CREATE TABLE ur_developmentproject -- -------------------------------------------------------------------- CREATE TABLE ur_disasterdamage ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, damagedarea NUMBER, damagedarea_uom VARCHAR2(1000), maximumrainfallperhour INTEGER, @@ -255,8 +255,8 @@ CREATE TABLE ur_disasterdamage -- -------------------------------------------------------------------- CREATE TABLE ur_fareattribute ( - id NUMBER(38) NOT NULL, - agency_id NUMBER(38), + id INTEGER NOT NULL, + agency_id INTEGER, currencytype VARCHAR2(1000), currencytype_codespace VARCHAR2(1000), paymentmethod VARCHAR2(1000), @@ -273,15 +273,15 @@ CREATE TABLE ur_fareattribute -- -------------------------------------------------------------------- CREATE TABLE ur_farerule ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, containsid VARCHAR2(1000), containsid_codespace VARCHAR2(1000), destinationid VARCHAR2(1000), destinationid_codespace VARCHAR2(1000), - fare_id NUMBER(38), + fare_id INTEGER, originid VARCHAR2(1000), originid_codespace VARCHAR2(1000), - route_id NUMBER(38), + route_id INTEGER, PRIMARY KEY (id) ); @@ -290,7 +290,7 @@ CREATE TABLE ur_farerule -- -------------------------------------------------------------------- CREATE TABLE ur_feedinfo ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, contactemail VARCHAR2(1000), contacturl VARCHAR2(1000), defaultlanguage VARCHAR2(1000), @@ -311,13 +311,13 @@ CREATE TABLE ur_feedinfo -- -------------------------------------------------------------------- CREATE TABLE ur_frequency ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, endtime TIMESTAMP, exacttimes VARCHAR2(1000), exacttimes_codespace VARCHAR2(1000), headwaysecs INTEGER, starttime TIMESTAMP, - trip_id NUMBER(38), + trip_id INTEGER, PRIMARY KEY (id) ); @@ -326,7 +326,7 @@ CREATE TABLE ur_frequency -- -------------------------------------------------------------------- CREATE TABLE ur_households ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, numberofmainhousehold INTEGER, numberofordinaryhousehold INTEGER, PRIMARY KEY (id) @@ -337,7 +337,7 @@ CREATE TABLE ur_households -- -------------------------------------------------------------------- CREATE TABLE ur_keyvaluepair ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, codevalue VARCHAR2(1000), codevalue_codespace VARCHAR2(1000), datevalue TIMESTAMP, @@ -347,7 +347,7 @@ CREATE TABLE ur_keyvaluepair key_codespace VARCHAR2(1000), measuredvalue NUMBER, measuredvalue_uom VARCHAR2(1000), - statisticalg_genericvalue_id NUMBER(38), + statisticalg_genericvalue_id INTEGER, stringvalue VARCHAR2(1000), urivalue VARCHAR2(1000), PRIMARY KEY (id) @@ -358,8 +358,8 @@ CREATE TABLE ur_keyvaluepair -- -------------------------------------------------------------------- CREATE TABLE ur_keyvaluepair_1 ( - id NUMBER(38) NOT NULL, - building_extendedattribut_id NUMBER(38), + id INTEGER NOT NULL, + building_extendedattribut_id INTEGER, codevalue VARCHAR2(1000), codevalue_codespace VARCHAR2(1000), datevalue TIMESTAMP, @@ -379,7 +379,7 @@ CREATE TABLE ur_keyvaluepair_1 -- -------------------------------------------------------------------- CREATE TABLE ur_land_use ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, areaclassification_codespace VARCHAR2(1000), areaclassificationtype VARCHAR2(1000), areainha NUMBER, @@ -412,7 +412,7 @@ CREATE TABLE ur_land_use -- -------------------------------------------------------------------- CREATE TABLE ur_landprice ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, currencyunit VARCHAR2(1000), currencyunit_codespace VARCHAR2(1000), PRIMARY KEY (id) @@ -423,9 +423,9 @@ CREATE TABLE ur_landprice -- -------------------------------------------------------------------- CREATE TABLE ur_landpriceperlanduse ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, landprice INTEGER, - landprice_landprice_id NUMBER(38), + landprice_landprice_id INTEGER, landuse VARCHAR2(1000), landuse_codespace VARCHAR2(1000), PRIMARY KEY (id) @@ -436,7 +436,7 @@ CREATE TABLE ur_landpriceperlanduse -- -------------------------------------------------------------------- CREATE TABLE ur_landusediversion ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, PRIMARY KEY (id) ); @@ -445,7 +445,7 @@ CREATE TABLE ur_landusediversion -- -------------------------------------------------------------------- CREATE TABLE ur_largecustomerfacilitie ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, areaclassification_codespace VARCHAR2(1000), areaclassificationtype VARCHAR2(1000), availability NUMBER, @@ -481,7 +481,7 @@ CREATE TABLE ur_largecustomerfacilitie -- -------------------------------------------------------------------- CREATE TABLE ur_legalgrounds ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, articlesofregulati_codespace VARCHAR2(1000), articlesofregulation VARCHAR2(1000), date_ TIMESTAMP, @@ -495,9 +495,9 @@ CREATE TABLE ur_legalgrounds -- -------------------------------------------------------------------- CREATE TABLE ur_numberofannualdiversio ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, count INTEGER, - landusediver_numberofannu_id NUMBER(38), + landusediver_numberofannu_id INTEGER, year DATE, PRIMARY KEY (id) ); @@ -507,11 +507,11 @@ CREATE TABLE ur_numberofannualdiversio -- -------------------------------------------------------------------- CREATE TABLE ur_numberofhouseholds ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, class VARCHAR2(1000), class_codespace VARCHAR2(1000), - households_numberofhous_id_1 NUMBER(38), - households_numberofhouseh_id NUMBER(38), + households_numberofhous_id_1 INTEGER, + households_numberofhouseh_id INTEGER, number_ INTEGER, PRIMARY KEY (id) ); @@ -521,9 +521,9 @@ CREATE TABLE ur_numberofhouseholds -- -------------------------------------------------------------------- CREATE TABLE ur_numberofhouseholds_1 ( - id NUMBER(38) NOT NULL, - censusblock_numberofhou_id_1 NUMBER(38), - censusblock_numberofhouse_id NUMBER(38), + id INTEGER NOT NULL, + censusblock_numberofhou_id_1 INTEGER, + censusblock_numberofhouse_id INTEGER, class VARCHAR2(1000), class_codespace VARCHAR2(1000), number_ INTEGER, @@ -535,7 +535,7 @@ CREATE TABLE ur_numberofhouseholds_1 -- -------------------------------------------------------------------- CREATE TABLE ur_office ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, name VARCHAR2(1000), phone VARCHAR2(1000), url VARCHAR2(1000), @@ -547,7 +547,7 @@ CREATE TABLE ur_office -- -------------------------------------------------------------------- CREATE TABLE ur_officesandemployees ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, numberofemployees INTEGER, numberofoffices INTEGER, PRIMARY KEY (id) @@ -558,8 +558,8 @@ CREATE TABLE ur_officesandemployees -- -------------------------------------------------------------------- CREATE TABLE ur_pathway ( - id NUMBER(38) NOT NULL, - from_id NUMBER(38), + id INTEGER NOT NULL, + from_id INTEGER, isbidirectional VARCHAR2(1000), isbidirectional_codespace VARCHAR2(1000), length NUMBER, @@ -571,7 +571,7 @@ CREATE TABLE ur_pathway reversedsignpostedas VARCHAR2(1000), signpostedas VARCHAR2(1000), staircount INTEGER, - to_id NUMBER(38), + to_id INTEGER, traversaltime INTEGER, PRIMARY KEY (id) ); @@ -581,13 +581,13 @@ CREATE TABLE ur_pathway -- -------------------------------------------------------------------- CREATE TABLE ur_point ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, latitude NUMBER, longitude NUMBER, point MDSYS.SDO_GEOMETRY, pointdistancetraveled NUMBER, pointsequence INTEGER, - publictransit_point_id NUMBER(38), + publictransit_point_id INTEGER, PRIMARY KEY (id) ); @@ -596,7 +596,7 @@ CREATE TABLE ur_point -- -------------------------------------------------------------------- CREATE TABLE ur_pollution ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, cause VARCHAR2(1000), damagedarea NUMBER, damagedarea_uom VARCHAR2(1000), @@ -608,7 +608,7 @@ CREATE TABLE ur_pollution -- -------------------------------------------------------------------- CREATE TABLE ur_population ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, births INTEGER, daytimepopulation INTEGER, daytimepopulationdensity NUMBER, @@ -629,11 +629,11 @@ CREATE TABLE ur_population -- -------------------------------------------------------------------- CREATE TABLE ur_populationbyageandsex ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, ageandsex VARCHAR2(1000), ageandsex_codespace VARCHAR2(1000), number_ INTEGER, - population_populationbyag_id NUMBER(38), + population_populationbyag_id INTEGER, PRIMARY KEY (id) ); @@ -642,11 +642,11 @@ CREATE TABLE ur_populationbyageandsex -- -------------------------------------------------------------------- CREATE TABLE ur_publictransit ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, index_ NUMBER, objectclass_id INTEGER, orgid VARCHAR2(1000), - target_id NUMBER(38), + target_id INTEGER, PRIMARY KEY (id) ); @@ -655,8 +655,8 @@ CREATE TABLE ur_publictransit -- -------------------------------------------------------------------- CREATE TABLE ur_publictransitdatatype ( - id NUMBER(38) NOT NULL, - cityobjectgroup_datatype_id NUMBER(38), + id INTEGER NOT NULL, + cityobjectgroup_datatype_id INTEGER, objectclass_id INTEGER, PRIMARY KEY (id) ); @@ -666,7 +666,7 @@ CREATE TABLE ur_publictransitdatatype -- -------------------------------------------------------------------- CREATE TABLE ur_publictransportationfa ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, companyname VARCHAR2(1000), frequencyofservice INTEGER, numberofcustomers NUMBER, @@ -680,7 +680,7 @@ CREATE TABLE ur_publictransportationfa -- -------------------------------------------------------------------- CREATE TABLE ur_recreations ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, capacity INTEGER, numberofusers INTEGER, PRIMARY KEY (id) @@ -691,19 +691,19 @@ CREATE TABLE ur_recreations -- -------------------------------------------------------------------- CREATE TABLE ur_route ( - id NUMBER(38) NOT NULL, - agency_id NUMBER(38), + id INTEGER NOT NULL, + agency_id INTEGER, color VARCHAR2(1000), continuousdropoff VARCHAR2(1000), continuousdropoff_codespace VARCHAR2(1000), continuouspickup VARCHAR2(1000), continuouspickup_codespace VARCHAR2(1000), - description_id NUMBER(38), + description_id INTEGER, destinationstop VARCHAR2(1000), lod0multicurve MDSYS.SDO_GEOMETRY, longname VARCHAR2(1000), originstop VARCHAR2(1000), - parentroute_id NUMBER(38), + parentroute_id INTEGER, routesortorder INTEGER, shortname VARCHAR2(1000), textcolor VARCHAR2(1000), @@ -720,7 +720,7 @@ CREATE TABLE ur_route -- -------------------------------------------------------------------- CREATE TABLE ur_statisticalgrid ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, areaclassification_codespace VARCHAR2(1000), areaclassificationtype VARCHAR2(1000), availability NUMBER, @@ -728,8 +728,8 @@ CREATE TABLE ur_statisticalgrid city_codespace VARCHAR2(1000), class VARCHAR2(1000), class_codespace VARCHAR2(1000), - lod_1multisurface_id NUMBER(38), - lod_2multisurface_id NUMBER(38), + lod_1multisurface_id INTEGER, + lod_2multisurface_id INTEGER, objectclass_id INTEGER, prefecture VARCHAR2(1000), prefecture_codespace VARCHAR2(1000), @@ -745,15 +745,15 @@ CREATE TABLE ur_statisticalgrid -- -------------------------------------------------------------------- CREATE TABLE ur_stop ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, code VARCHAR2(1000), code_codespace VARCHAR2(1000), latitude NUMBER, - level_id NUMBER(38), + level_id INTEGER, locationtype VARCHAR2(1000), locationtype_codespace VARCHAR2(1000), longitude NUMBER, - parentstation_id NUMBER(38), + parentstation_id INTEGER, platformcode VARCHAR2(1000), point MDSYS.SDO_GEOMETRY, timezone VARCHAR2(1000), @@ -772,7 +772,7 @@ CREATE TABLE ur_stop -- -------------------------------------------------------------------- CREATE TABLE ur_stoptime ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, arrivaltime TIMESTAMP, continuousdropofft_codespace VARCHAR2(1000), continuousdropofftype VARCHAR2(1000), @@ -785,11 +785,11 @@ CREATE TABLE ur_stoptime pickuptype VARCHAR2(1000), pickuptype_codespace VARCHAR2(1000), shapedistancetraveled NUMBER, - stop_id NUMBER(38), + stop_id INTEGER, stopsequence INTEGER, timepoint VARCHAR2(1000), timepoint_codespace VARCHAR2(1000), - trip_id NUMBER(38), + trip_id INTEGER, PRIMARY KEY (id) ); @@ -798,7 +798,7 @@ CREATE TABLE ur_stoptime -- -------------------------------------------------------------------- CREATE TABLE ur_trafficvolume ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, areaclassification_codespace VARCHAR2(1000), areaclassificationtype VARCHAR2(1000), averagetravelspeedincongesti NUMBER, @@ -824,10 +824,10 @@ CREATE TABLE ur_trafficvolume -- -------------------------------------------------------------------- CREATE TABLE ur_transfer ( - id NUMBER(38) NOT NULL, - from_id NUMBER(38), + id INTEGER NOT NULL, + from_id INTEGER, mintransfertime INTEGER, - to_id NUMBER(38), + to_id INTEGER, transfertype VARCHAR2(1000), transfertype_codespace VARCHAR2(1000), PRIMARY KEY (id) @@ -838,12 +838,12 @@ CREATE TABLE ur_transfer -- -------------------------------------------------------------------- CREATE TABLE ur_translation ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, fieldname VARCHAR2(1000), fieldvalue VARCHAR2(1000), language VARCHAR2(1000), language_codespace VARCHAR2(1000), - recordid_id NUMBER(38), + recordid_id INTEGER, recordsubid VARCHAR2(1000), tablename VARCHAR2(1000), tablename_codespace VARCHAR2(1000), @@ -856,7 +856,7 @@ CREATE TABLE ur_translation -- -------------------------------------------------------------------- CREATE TABLE ur_translationjp ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, language VARCHAR2(1000), language_codespace VARCHAR2(1000), translation VARCHAR2(1000), @@ -868,8 +868,8 @@ CREATE TABLE ur_translationjp -- -------------------------------------------------------------------- CREATE TABLE ur_transportation_complex ( - id NUMBER(38) NOT NULL, - trafficvolume_id NUMBER(38), + id INTEGER NOT NULL, + trafficvolume_id INTEGER, width NUMBER, width_uom VARCHAR2(1000), widthtype VARCHAR2(1000), @@ -882,19 +882,19 @@ CREATE TABLE ur_transportation_complex -- -------------------------------------------------------------------- CREATE TABLE ur_trip ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, bikeallowed VARCHAR2(1000), bikeallowed_codespace VARCHAR2(1000), blockid VARCHAR2(1000), - calendar_id NUMBER(38), - calendardate_id NUMBER(38), + calendar_id INTEGER, + calendardate_id INTEGER, directionid VARCHAR2(1000), directionid_codespace VARCHAR2(1000), headsign VARCHAR2(1000), lod0multicurve MDSYS.SDO_GEOMETRY, - office_id NUMBER(38), - route_id NUMBER(38), - shape_id NUMBER(38), + office_id INTEGER, + route_id INTEGER, + shape_id INTEGER, shortname VARCHAR2(1000), symbol VARCHAR2(1000), wheelchairaccessib_codespace VARCHAR2(1000), @@ -907,8 +907,8 @@ CREATE TABLE ur_trip -- -------------------------------------------------------------------- CREATE TABLE ur_urbanfunc_to_cityobjec ( - cityobject_id NUMBER(38) NOT NULL, - urbanfunction_id NUMBER(38) NOT NULL, + cityobject_id INTEGER NOT NULL, + urbanfunction_id INTEGER NOT NULL, PRIMARY KEY (cityobject_id, urbanfunction_id) ); @@ -917,7 +917,7 @@ CREATE TABLE ur_urbanfunc_to_cityobjec -- -------------------------------------------------------------------- CREATE TABLE ur_urbanfunction ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, abstract VARCHAR2(1000), areaclassification_codespace VARCHAR2(1000), areaclassificationtype VARCHAR2(1000), @@ -933,16 +933,16 @@ CREATE TABLE ur_urbanfunction expirationfiscalyear DATE, function VARCHAR2(1000), function_codespace VARCHAR2(1000), - legalgrounds_id NUMBER(38), + legalgrounds_id INTEGER, lod0multicurve MDSYS.SDO_GEOMETRY, lod0multipoint MDSYS.SDO_GEOMETRY, - lod0multisurface_id NUMBER(38), + lod0multisurface_id INTEGER, lod_1multicurve MDSYS.SDO_GEOMETRY, lod_1multipoint MDSYS.SDO_GEOMETRY, - lod_1multisurface_id NUMBER(38), + lod_1multisurface_id INTEGER, lod_2multicurve MDSYS.SDO_GEOMETRY, lod_2multipoint MDSYS.SDO_GEOMETRY, - lod_2multisurface_id NUMBER(38), + lod_2multisurface_id INTEGER, nominalarea NUMBER, nominalarea_uom VARCHAR2(1000), note VARCHAR2(1000), @@ -962,7 +962,7 @@ CREATE TABLE ur_urbanfunction -- -------------------------------------------------------------------- CREATE TABLE ur_urbanization ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, period VARCHAR2(1000), resources VARCHAR2(1000), PRIMARY KEY (id) @@ -973,7 +973,7 @@ CREATE TABLE ur_urbanization -- -------------------------------------------------------------------- CREATE TABLE ur_zone ( - id NUMBER(38) NOT NULL, + id INTEGER NOT NULL, areaapplied VARCHAR2(1000), finalpublicationdate TIMESTAMP, objectclass_id INTEGER, @@ -1001,14 +1001,14 @@ REFERENCES ur_landusediversion (id); ALTER TABLE ur_attribution ADD CONSTRAINT ur_attribution_fk FOREIGN KEY (id) REFERENCES ur_publictransit (id); -ALTER TABLE ur_attribution ADD CONSTRAINT ur_attribution_route_fk FOREIGN KEY (route_id) -REFERENCES ur_route (id) -ON DELETE SET NULL; - ALTER TABLE ur_attribution ADD CONSTRAINT ur_attribution_agency_fk FOREIGN KEY (agency_id) REFERENCES ur_agency (id) ON DELETE SET NULL; +ALTER TABLE ur_attribution ADD CONSTRAINT ur_attribution_route_fk FOREIGN KEY (route_id) +REFERENCES ur_route (id) +ON DELETE SET NULL; + ALTER TABLE ur_attribution ADD CONSTRAINT ur_attribution_trip_fk FOREIGN KEY (trip_id) REFERENCES ur_trip (id) ON DELETE SET NULL; @@ -1101,14 +1101,14 @@ ON DELETE SET NULL; ALTER TABLE ur_farerule ADD CONSTRAINT ur_farerule_fk FOREIGN KEY (id) REFERENCES ur_publictransitdatatype (id); -ALTER TABLE ur_farerule ADD CONSTRAINT ur_farerule_route_fk FOREIGN KEY (route_id) -REFERENCES ur_route (id) -ON DELETE SET NULL; - ALTER TABLE ur_farerule ADD CONSTRAINT ur_farerule_fare_fk FOREIGN KEY (fare_id) REFERENCES ur_fareattribute (id) ON DELETE SET NULL; +ALTER TABLE ur_farerule ADD CONSTRAINT ur_farerule_route_fk FOREIGN KEY (route_id) +REFERENCES ur_route (id) +ON DELETE SET NULL; + -- -------------------------------------------------------------------- -- ur_feedinfo -- -------------------------------------------------------------------- @@ -1281,14 +1281,14 @@ REFERENCES ur_urbanfunction (id); ALTER TABLE ur_route ADD CONSTRAINT ur_route_fk FOREIGN KEY (id) REFERENCES ur_publictransit (id); -ALTER TABLE ur_route ADD CONSTRAINT ur_route_parentroute_fk FOREIGN KEY (parentroute_id) -REFERENCES ur_route (id) -ON DELETE SET NULL; - ALTER TABLE ur_route ADD CONSTRAINT ur_route_description_fk FOREIGN KEY (description_id) REFERENCES ur_description (id) ON DELETE SET NULL; +ALTER TABLE ur_route ADD CONSTRAINT ur_route_parentroute_fk FOREIGN KEY (parentroute_id) +REFERENCES ur_route (id) +ON DELETE SET NULL; + ALTER TABLE ur_route ADD CONSTRAINT ur_route_agency_fk FOREIGN KEY (agency_id) REFERENCES ur_agency (id) ON DELETE SET NULL; @@ -1328,14 +1328,14 @@ ON DELETE SET NULL; ALTER TABLE ur_stoptime ADD CONSTRAINT ur_stoptime_fk FOREIGN KEY (id) REFERENCES ur_publictransitdatatype (id); -ALTER TABLE ur_stoptime ADD CONSTRAINT ur_stoptime_stop_fk FOREIGN KEY (stop_id) -REFERENCES ur_stop (id) -ON DELETE SET NULL; - ALTER TABLE ur_stoptime ADD CONSTRAINT ur_stoptime_trip_fk FOREIGN KEY (trip_id) REFERENCES ur_trip (id) ON DELETE SET NULL; +ALTER TABLE ur_stoptime ADD CONSTRAINT ur_stoptime_stop_fk FOREIGN KEY (stop_id) +REFERENCES ur_stop (id) +ON DELETE SET NULL; + -- -------------------------------------------------------------------- -- ur_transfer -- -------------------------------------------------------------------- @@ -1382,10 +1382,6 @@ ON DELETE SET NULL; ALTER TABLE ur_trip ADD CONSTRAINT ur_trip_fk FOREIGN KEY (id) REFERENCES ur_publictransit (id); -ALTER TABLE ur_trip ADD CONSTRAINT ur_trip_shape_fk FOREIGN KEY (shape_id) -REFERENCES ur_publictransit (id) -ON DELETE SET NULL; - ALTER TABLE ur_trip ADD CONSTRAINT ur_trip_route_fk FOREIGN KEY (route_id) REFERENCES ur_route (id) ON DELETE SET NULL; @@ -1402,6 +1398,10 @@ ALTER TABLE ur_trip ADD CONSTRAINT ur_trip_office_fk FOREIGN KEY (office_id) REFERENCES ur_office (id) ON DELETE SET NULL; +ALTER TABLE ur_trip ADD CONSTRAINT ur_trip_shape_fk FOREIGN KEY (shape_id) +REFERENCES ur_publictransit (id) +ON DELETE SET NULL; + -- -------------------------------------------------------------------- -- ur_urbanfunc_to_cityobjec -- -------------------------------------------------------------------- diff --git a/resources/database/3dcitydb/oracle/DISABLE_ADE_VERSIONING.sql b/resources/database/3dcitydb/oracle/DISABLE_ADE_VERSIONING.sql index 62d7526..dfc986a 100644 --- a/resources/database/3dcitydb/oracle/DISABLE_ADE_VERSIONING.sql +++ b/resources/database/3dcitydb/oracle/DISABLE_ADE_VERSIONING.sql @@ -1,4 +1,4 @@ --- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2021-10-08 12:36:36 +-- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2020-08-25 11:09:20 -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- *********************************** Disable Versioning ********************************* -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/resources/database/3dcitydb/oracle/DROP_ADE_DB.sql b/resources/database/3dcitydb/oracle/DROP_ADE_DB.sql index d371fa9..da3d85c 100644 --- a/resources/database/3dcitydb/oracle/DROP_ADE_DB.sql +++ b/resources/database/3dcitydb/oracle/DROP_ADE_DB.sql @@ -1,4 +1,4 @@ --- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2021-10-08 12:36:36 +-- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2020-08-25 11:09:20 -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- *********************************** Drop foreign keys ********************************** -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -21,10 +21,10 @@ ALTER TABLE ur_attribution DROP CONSTRAINT ur_attribution_fk; ALTER TABLE ur_attribution - DROP CONSTRAINT ur_attribution_route_fk; + DROP CONSTRAINT ur_attribution_agency_fk; ALTER TABLE ur_attribution - DROP CONSTRAINT ur_attribution_agency_fk; + DROP CONSTRAINT ur_attribution_route_fk; ALTER TABLE ur_attribution DROP CONSTRAINT ur_attribution_trip_fk; @@ -114,10 +114,10 @@ ALTER TABLE ur_farerule DROP CONSTRAINT ur_farerule_fk; ALTER TABLE ur_farerule - DROP CONSTRAINT ur_farerule_route_fk; + DROP CONSTRAINT ur_farerule_fare_fk; ALTER TABLE ur_farerule - DROP CONSTRAINT ur_farerule_fare_fk; + DROP CONSTRAINT ur_farerule_route_fk; -- -------------------------------------------------------------------- -- ur_feedinfo @@ -288,10 +288,10 @@ ALTER TABLE ur_route DROP CONSTRAINT ur_route_fk; ALTER TABLE ur_route - DROP CONSTRAINT ur_route_parentroute_fk; + DROP CONSTRAINT ur_route_description_fk; ALTER TABLE ur_route - DROP CONSTRAINT ur_route_description_fk; + DROP CONSTRAINT ur_route_parentroute_fk; ALTER TABLE ur_route DROP CONSTRAINT ur_route_agency_fk; @@ -330,10 +330,10 @@ ALTER TABLE ur_stoptime DROP CONSTRAINT ur_stoptime_fk; ALTER TABLE ur_stoptime - DROP CONSTRAINT ur_stoptime_stop_fk; + DROP CONSTRAINT ur_stoptime_trip_fk; ALTER TABLE ur_stoptime - DROP CONSTRAINT ur_stoptime_trip_fk; + DROP CONSTRAINT ur_stoptime_stop_fk; -- -------------------------------------------------------------------- -- ur_transfer @@ -377,9 +377,6 @@ ALTER TABLE ur_transportation_complex ALTER TABLE ur_trip DROP CONSTRAINT ur_trip_fk; -ALTER TABLE ur_trip - DROP CONSTRAINT ur_trip_shape_fk; - ALTER TABLE ur_trip DROP CONSTRAINT ur_trip_route_fk; @@ -392,6 +389,9 @@ ALTER TABLE ur_trip ALTER TABLE ur_trip DROP CONSTRAINT ur_trip_office_fk; +ALTER TABLE ur_trip + DROP CONSTRAINT ur_trip_shape_fk; + -- -------------------------------------------------------------------- -- ur_urbanfunc_to_cityobjec -- -------------------------------------------------------------------- diff --git a/resources/database/3dcitydb/oracle/ENABLE_ADE_VERSIONING.sql b/resources/database/3dcitydb/oracle/ENABLE_ADE_VERSIONING.sql index 27ba5da..ad49928 100644 --- a/resources/database/3dcitydb/oracle/ENABLE_ADE_VERSIONING.sql +++ b/resources/database/3dcitydb/oracle/ENABLE_ADE_VERSIONING.sql @@ -1,4 +1,4 @@ --- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2021-10-08 12:36:36 +-- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2020-08-25 11:09:20 -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- *********************************** Enable Versioning ********************************** -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/resources/database/3dcitydb/postgreSQL/CREATE_ADE_DB.sql b/resources/database/3dcitydb/postgreSQL/CREATE_ADE_DB.sql index 09dcd93..cbb4f24 100644 --- a/resources/database/3dcitydb/postgreSQL/CREATE_ADE_DB.sql +++ b/resources/database/3dcitydb/postgreSQL/CREATE_ADE_DB.sql @@ -1,4 +1,4 @@ --- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2021-10-08 12:36:36 +-- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2020-08-25 11:09:20 -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- *********************************** Create tables ************************************** -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -7,7 +7,7 @@ -- -------------------------------------------------------------------- CREATE TABLE ur_agency ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, address VARCHAR(1000), email VARCHAR(1000), fareurl VARCHAR(1000), @@ -30,10 +30,10 @@ CREATE TABLE ur_agency -- -------------------------------------------------------------------- CREATE TABLE ur_areaofannualdiversions ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, area NUMERIC, area_uom VARCHAR(1000), - landusediver_areaofannual_id BIGINT, + landusediver_areaofannual_id INTEGER, year DATE, PRIMARY KEY (id) ); @@ -43,16 +43,16 @@ CREATE TABLE ur_areaofannualdiversions -- -------------------------------------------------------------------- CREATE TABLE ur_attribution ( - id BIGINT NOT NULL, - agency_id BIGINT, + id INTEGER NOT NULL, + agency_id INTEGER, email VARCHAR(1000), isauthority NUMERIC, isoperator NUMERIC, isproducer NUMERIC, organizationname VARCHAR(1000), phonenumber VARCHAR(1000), - route_id BIGINT, - trip_id BIGINT, + route_id INTEGER, + trip_id INTEGER, url VARCHAR(1000), PRIMARY KEY (id) ); @@ -62,9 +62,9 @@ CREATE TABLE ur_attribution -- -------------------------------------------------------------------- CREATE TABLE ur_building ( - id BIGINT NOT NULL, - buildingdetails_id BIGINT, - largecustomerfacilities_id BIGINT, + id INTEGER NOT NULL, + buildingdetails_id INTEGER, + largecustomerfacilities_id INTEGER, PRIMARY KEY (id) ); @@ -73,7 +73,7 @@ CREATE TABLE ur_building -- -------------------------------------------------------------------- CREATE TABLE ur_buildingdetails ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, areaclassification_codespace VARCHAR(1000), areaclassificationtype VARCHAR(1000), buildingfootprintarea NUMERIC, @@ -113,7 +113,7 @@ CREATE TABLE ur_buildingdetails -- -------------------------------------------------------------------- CREATE TABLE ur_calendar ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, enddate TIMESTAMP WITH TIME ZONE, friday NUMERIC, monday NUMERIC, @@ -131,8 +131,8 @@ CREATE TABLE ur_calendar -- -------------------------------------------------------------------- CREATE TABLE ur_calendardate ( - id BIGINT NOT NULL, - calendar_id BIGINT, + id INTEGER NOT NULL, + calendar_id INTEGER, date_ TIMESTAMP WITH TIME ZONE, exceptiontype VARCHAR(1000), exceptiontype_codespace VARCHAR(1000), @@ -144,7 +144,7 @@ CREATE TABLE ur_calendardate -- -------------------------------------------------------------------- CREATE TABLE ur_censusblock ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, daytimepopulation INTEGER, daytimepopulationdensity NUMERIC, numberofmainhouseholds INTEGER, @@ -157,7 +157,7 @@ CREATE TABLE ur_censusblock -- -------------------------------------------------------------------- CREATE TABLE ur_cityobjectgroup ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, fiscalyearofpublication DATE, language VARCHAR(1000), language_codespace VARCHAR(1000), @@ -169,7 +169,7 @@ CREATE TABLE ur_cityobjectgroup -- -------------------------------------------------------------------- CREATE TABLE ur_cityobjectgroup_1 ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, fiscalyearofpublication DATE, language VARCHAR(1000), language_codespace VARCHAR(1000), @@ -181,7 +181,7 @@ CREATE TABLE ur_cityobjectgroup_1 -- -------------------------------------------------------------------- CREATE TABLE ur_cityobjectgroup_2 ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, fiscalyearofpublication DATE, language VARCHAR(1000), language_codespace VARCHAR(1000), @@ -193,7 +193,7 @@ CREATE TABLE ur_cityobjectgroup_2 -- -------------------------------------------------------------------- CREATE TABLE ur_cityobjectgroup_3 ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, PRIMARY KEY (id) ); @@ -202,7 +202,7 @@ CREATE TABLE ur_cityobjectgroup_3 -- -------------------------------------------------------------------- CREATE TABLE ur_description ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, description VARCHAR(1000), frequencyofservice INTEGER, numberofcustomers INTEGER, @@ -214,7 +214,7 @@ CREATE TABLE ur_description -- -------------------------------------------------------------------- CREATE TABLE ur_developmentproject ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, benefitarea NUMERIC, benefitarea_uom VARCHAR(1000), benefitperiod VARCHAR(1000), @@ -239,7 +239,7 @@ CREATE TABLE ur_developmentproject -- -------------------------------------------------------------------- CREATE TABLE ur_disasterdamage ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, damagedarea NUMERIC, damagedarea_uom VARCHAR(1000), maximumrainfallperhour INTEGER, @@ -255,8 +255,8 @@ CREATE TABLE ur_disasterdamage -- -------------------------------------------------------------------- CREATE TABLE ur_fareattribute ( - id BIGINT NOT NULL, - agency_id BIGINT, + id INTEGER NOT NULL, + agency_id INTEGER, currencytype VARCHAR(1000), currencytype_codespace VARCHAR(1000), paymentmethod VARCHAR(1000), @@ -273,15 +273,15 @@ CREATE TABLE ur_fareattribute -- -------------------------------------------------------------------- CREATE TABLE ur_farerule ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, containsid VARCHAR(1000), containsid_codespace VARCHAR(1000), destinationid VARCHAR(1000), destinationid_codespace VARCHAR(1000), - fare_id BIGINT, + fare_id INTEGER, originid VARCHAR(1000), originid_codespace VARCHAR(1000), - route_id BIGINT, + route_id INTEGER, PRIMARY KEY (id) ); @@ -290,7 +290,7 @@ CREATE TABLE ur_farerule -- -------------------------------------------------------------------- CREATE TABLE ur_feedinfo ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, contactemail VARCHAR(1000), contacturl VARCHAR(1000), defaultlanguage VARCHAR(1000), @@ -311,13 +311,13 @@ CREATE TABLE ur_feedinfo -- -------------------------------------------------------------------- CREATE TABLE ur_frequency ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, endtime TIMESTAMP WITH TIME ZONE, exacttimes VARCHAR(1000), exacttimes_codespace VARCHAR(1000), headwaysecs INTEGER, starttime TIMESTAMP WITH TIME ZONE, - trip_id BIGINT, + trip_id INTEGER, PRIMARY KEY (id) ); @@ -326,7 +326,7 @@ CREATE TABLE ur_frequency -- -------------------------------------------------------------------- CREATE TABLE ur_households ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, numberofmainhousehold INTEGER, numberofordinaryhousehold INTEGER, PRIMARY KEY (id) @@ -337,7 +337,7 @@ CREATE TABLE ur_households -- -------------------------------------------------------------------- CREATE TABLE ur_keyvaluepair ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, codevalue VARCHAR(1000), codevalue_codespace VARCHAR(1000), datevalue TIMESTAMP WITH TIME ZONE, @@ -347,7 +347,7 @@ CREATE TABLE ur_keyvaluepair key_codespace VARCHAR(1000), measuredvalue NUMERIC, measuredvalue_uom VARCHAR(1000), - statisticalg_genericvalue_id BIGINT, + statisticalg_genericvalue_id INTEGER, stringvalue VARCHAR(1000), urivalue VARCHAR(1000), PRIMARY KEY (id) @@ -358,8 +358,8 @@ CREATE TABLE ur_keyvaluepair -- -------------------------------------------------------------------- CREATE TABLE ur_keyvaluepair_1 ( - id BIGINT NOT NULL, - building_extendedattribut_id BIGINT, + id INTEGER NOT NULL, + building_extendedattribut_id INTEGER, codevalue VARCHAR(1000), codevalue_codespace VARCHAR(1000), datevalue TIMESTAMP WITH TIME ZONE, @@ -379,7 +379,7 @@ CREATE TABLE ur_keyvaluepair_1 -- -------------------------------------------------------------------- CREATE TABLE ur_land_use ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, areaclassification_codespace VARCHAR(1000), areaclassificationtype VARCHAR(1000), areainha NUMERIC, @@ -412,7 +412,7 @@ CREATE TABLE ur_land_use -- -------------------------------------------------------------------- CREATE TABLE ur_landprice ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, currencyunit VARCHAR(1000), currencyunit_codespace VARCHAR(1000), PRIMARY KEY (id) @@ -423,9 +423,9 @@ CREATE TABLE ur_landprice -- -------------------------------------------------------------------- CREATE TABLE ur_landpriceperlanduse ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, landprice INTEGER, - landprice_landprice_id BIGINT, + landprice_landprice_id INTEGER, landuse VARCHAR(1000), landuse_codespace VARCHAR(1000), PRIMARY KEY (id) @@ -436,7 +436,7 @@ CREATE TABLE ur_landpriceperlanduse -- -------------------------------------------------------------------- CREATE TABLE ur_landusediversion ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, PRIMARY KEY (id) ); @@ -445,7 +445,7 @@ CREATE TABLE ur_landusediversion -- -------------------------------------------------------------------- CREATE TABLE ur_largecustomerfacilitie ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, areaclassification_codespace VARCHAR(1000), areaclassificationtype VARCHAR(1000), availability NUMERIC, @@ -481,7 +481,7 @@ CREATE TABLE ur_largecustomerfacilitie -- -------------------------------------------------------------------- CREATE TABLE ur_legalgrounds ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, articlesofregulati_codespace VARCHAR(1000), articlesofregulation VARCHAR(1000), date_ TIMESTAMP WITH TIME ZONE, @@ -495,9 +495,9 @@ CREATE TABLE ur_legalgrounds -- -------------------------------------------------------------------- CREATE TABLE ur_numberofannualdiversio ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, count INTEGER, - landusediver_numberofannu_id BIGINT, + landusediver_numberofannu_id INTEGER, year DATE, PRIMARY KEY (id) ); @@ -507,11 +507,11 @@ CREATE TABLE ur_numberofannualdiversio -- -------------------------------------------------------------------- CREATE TABLE ur_numberofhouseholds ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, class VARCHAR(1000), class_codespace VARCHAR(1000), - households_numberofhous_id_1 BIGINT, - households_numberofhouseh_id BIGINT, + households_numberofhous_id_1 INTEGER, + households_numberofhouseh_id INTEGER, number_ INTEGER, PRIMARY KEY (id) ); @@ -521,9 +521,9 @@ CREATE TABLE ur_numberofhouseholds -- -------------------------------------------------------------------- CREATE TABLE ur_numberofhouseholds_1 ( - id BIGINT NOT NULL, - censusblock_numberofhou_id_1 BIGINT, - censusblock_numberofhouse_id BIGINT, + id INTEGER NOT NULL, + censusblock_numberofhou_id_1 INTEGER, + censusblock_numberofhouse_id INTEGER, class VARCHAR(1000), class_codespace VARCHAR(1000), number_ INTEGER, @@ -535,7 +535,7 @@ CREATE TABLE ur_numberofhouseholds_1 -- -------------------------------------------------------------------- CREATE TABLE ur_office ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, name VARCHAR(1000), phone VARCHAR(1000), url VARCHAR(1000), @@ -547,7 +547,7 @@ CREATE TABLE ur_office -- -------------------------------------------------------------------- CREATE TABLE ur_officesandemployees ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, numberofemployees INTEGER, numberofoffices INTEGER, PRIMARY KEY (id) @@ -558,8 +558,8 @@ CREATE TABLE ur_officesandemployees -- -------------------------------------------------------------------- CREATE TABLE ur_pathway ( - id BIGINT NOT NULL, - from_id BIGINT, + id INTEGER NOT NULL, + from_id INTEGER, isbidirectional VARCHAR(1000), isbidirectional_codespace VARCHAR(1000), length NUMERIC, @@ -571,7 +571,7 @@ CREATE TABLE ur_pathway reversedsignpostedas VARCHAR(1000), signpostedas VARCHAR(1000), staircount INTEGER, - to_id BIGINT, + to_id INTEGER, traversaltime INTEGER, PRIMARY KEY (id) ); @@ -581,13 +581,13 @@ CREATE TABLE ur_pathway -- -------------------------------------------------------------------- CREATE TABLE ur_point ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, latitude NUMERIC, longitude NUMERIC, point geometry(GEOMETRYZ), pointdistancetraveled NUMERIC, pointsequence INTEGER, - publictransit_point_id BIGINT, + publictransit_point_id INTEGER, PRIMARY KEY (id) ); @@ -596,7 +596,7 @@ CREATE TABLE ur_point -- -------------------------------------------------------------------- CREATE TABLE ur_pollution ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, cause VARCHAR(1000), damagedarea NUMERIC, damagedarea_uom VARCHAR(1000), @@ -608,7 +608,7 @@ CREATE TABLE ur_pollution -- -------------------------------------------------------------------- CREATE TABLE ur_population ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, births INTEGER, daytimepopulation INTEGER, daytimepopulationdensity NUMERIC, @@ -629,11 +629,11 @@ CREATE TABLE ur_population -- -------------------------------------------------------------------- CREATE TABLE ur_populationbyageandsex ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, ageandsex VARCHAR(1000), ageandsex_codespace VARCHAR(1000), number_ INTEGER, - population_populationbyag_id BIGINT, + population_populationbyag_id INTEGER, PRIMARY KEY (id) ); @@ -642,11 +642,11 @@ CREATE TABLE ur_populationbyageandsex -- -------------------------------------------------------------------- CREATE TABLE ur_publictransit ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, index_ NUMERIC, objectclass_id INTEGER, orgid VARCHAR(1000), - target_id BIGINT, + target_id INTEGER, PRIMARY KEY (id) ); @@ -655,8 +655,8 @@ CREATE TABLE ur_publictransit -- -------------------------------------------------------------------- CREATE TABLE ur_publictransitdatatype ( - id BIGINT NOT NULL, - cityobjectgroup_datatype_id BIGINT, + id INTEGER NOT NULL, + cityobjectgroup_datatype_id INTEGER, objectclass_id INTEGER, PRIMARY KEY (id) ); @@ -666,7 +666,7 @@ CREATE TABLE ur_publictransitdatatype -- -------------------------------------------------------------------- CREATE TABLE ur_publictransportationfa ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, companyname VARCHAR(1000), frequencyofservice INTEGER, numberofcustomers NUMERIC, @@ -680,7 +680,7 @@ CREATE TABLE ur_publictransportationfa -- -------------------------------------------------------------------- CREATE TABLE ur_recreations ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, capacity INTEGER, numberofusers INTEGER, PRIMARY KEY (id) @@ -691,19 +691,19 @@ CREATE TABLE ur_recreations -- -------------------------------------------------------------------- CREATE TABLE ur_route ( - id BIGINT NOT NULL, - agency_id BIGINT, + id INTEGER NOT NULL, + agency_id INTEGER, color VARCHAR(1000), continuousdropoff VARCHAR(1000), continuousdropoff_codespace VARCHAR(1000), continuouspickup VARCHAR(1000), continuouspickup_codespace VARCHAR(1000), - description_id BIGINT, + description_id INTEGER, destinationstop VARCHAR(1000), lod0multicurve geometry(GEOMETRYZ), longname VARCHAR(1000), originstop VARCHAR(1000), - parentroute_id BIGINT, + parentroute_id INTEGER, routesortorder INTEGER, shortname VARCHAR(1000), textcolor VARCHAR(1000), @@ -720,7 +720,7 @@ CREATE TABLE ur_route -- -------------------------------------------------------------------- CREATE TABLE ur_statisticalgrid ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, areaclassification_codespace VARCHAR(1000), areaclassificationtype VARCHAR(1000), availability NUMERIC, @@ -728,8 +728,8 @@ CREATE TABLE ur_statisticalgrid city_codespace VARCHAR(1000), class VARCHAR(1000), class_codespace VARCHAR(1000), - lod_1multisurface_id BIGINT, - lod_2multisurface_id BIGINT, + lod_1multisurface_id INTEGER, + lod_2multisurface_id INTEGER, objectclass_id INTEGER, prefecture VARCHAR(1000), prefecture_codespace VARCHAR(1000), @@ -745,15 +745,15 @@ CREATE TABLE ur_statisticalgrid -- -------------------------------------------------------------------- CREATE TABLE ur_stop ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, code VARCHAR(1000), code_codespace VARCHAR(1000), latitude NUMERIC, - level_id BIGINT, + level_id INTEGER, locationtype VARCHAR(1000), locationtype_codespace VARCHAR(1000), longitude NUMERIC, - parentstation_id BIGINT, + parentstation_id INTEGER, platformcode VARCHAR(1000), point geometry(GEOMETRYZ), timezone VARCHAR(1000), @@ -772,7 +772,7 @@ CREATE TABLE ur_stop -- -------------------------------------------------------------------- CREATE TABLE ur_stoptime ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, arrivaltime TIMESTAMP WITH TIME ZONE, continuousdropofft_codespace VARCHAR(1000), continuousdropofftype VARCHAR(1000), @@ -785,11 +785,11 @@ CREATE TABLE ur_stoptime pickuptype VARCHAR(1000), pickuptype_codespace VARCHAR(1000), shapedistancetraveled NUMERIC, - stop_id BIGINT, + stop_id INTEGER, stopsequence INTEGER, timepoint VARCHAR(1000), timepoint_codespace VARCHAR(1000), - trip_id BIGINT, + trip_id INTEGER, PRIMARY KEY (id) ); @@ -798,7 +798,7 @@ CREATE TABLE ur_stoptime -- -------------------------------------------------------------------- CREATE TABLE ur_trafficvolume ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, areaclassification_codespace VARCHAR(1000), areaclassificationtype VARCHAR(1000), averagetravelspeedincongesti NUMERIC, @@ -824,10 +824,10 @@ CREATE TABLE ur_trafficvolume -- -------------------------------------------------------------------- CREATE TABLE ur_transfer ( - id BIGINT NOT NULL, - from_id BIGINT, + id INTEGER NOT NULL, + from_id INTEGER, mintransfertime INTEGER, - to_id BIGINT, + to_id INTEGER, transfertype VARCHAR(1000), transfertype_codespace VARCHAR(1000), PRIMARY KEY (id) @@ -838,12 +838,12 @@ CREATE TABLE ur_transfer -- -------------------------------------------------------------------- CREATE TABLE ur_translation ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, fieldname VARCHAR(1000), fieldvalue VARCHAR(1000), language VARCHAR(1000), language_codespace VARCHAR(1000), - recordid_id BIGINT, + recordid_id INTEGER, recordsubid VARCHAR(1000), tablename VARCHAR(1000), tablename_codespace VARCHAR(1000), @@ -856,7 +856,7 @@ CREATE TABLE ur_translation -- -------------------------------------------------------------------- CREATE TABLE ur_translationjp ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, language VARCHAR(1000), language_codespace VARCHAR(1000), translation VARCHAR(1000), @@ -868,8 +868,8 @@ CREATE TABLE ur_translationjp -- -------------------------------------------------------------------- CREATE TABLE ur_transportation_complex ( - id BIGINT NOT NULL, - trafficvolume_id BIGINT, + id INTEGER NOT NULL, + trafficvolume_id INTEGER, width NUMERIC, width_uom VARCHAR(1000), widthtype VARCHAR(1000), @@ -882,19 +882,19 @@ CREATE TABLE ur_transportation_complex -- -------------------------------------------------------------------- CREATE TABLE ur_trip ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, bikeallowed VARCHAR(1000), bikeallowed_codespace VARCHAR(1000), blockid VARCHAR(1000), - calendar_id BIGINT, - calendardate_id BIGINT, + calendar_id INTEGER, + calendardate_id INTEGER, directionid VARCHAR(1000), directionid_codespace VARCHAR(1000), headsign VARCHAR(1000), lod0multicurve geometry(GEOMETRYZ), - office_id BIGINT, - route_id BIGINT, - shape_id BIGINT, + office_id INTEGER, + route_id INTEGER, + shape_id INTEGER, shortname VARCHAR(1000), symbol VARCHAR(1000), wheelchairaccessib_codespace VARCHAR(1000), @@ -907,8 +907,8 @@ CREATE TABLE ur_trip -- -------------------------------------------------------------------- CREATE TABLE ur_urbanfunc_to_cityobjec ( - cityobject_id BIGINT NOT NULL, - urbanfunction_id BIGINT NOT NULL, + cityobject_id INTEGER NOT NULL, + urbanfunction_id INTEGER NOT NULL, PRIMARY KEY (cityobject_id, urbanfunction_id) ); @@ -917,7 +917,7 @@ CREATE TABLE ur_urbanfunc_to_cityobjec -- -------------------------------------------------------------------- CREATE TABLE ur_urbanfunction ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, abstract VARCHAR(1000), areaclassification_codespace VARCHAR(1000), areaclassificationtype VARCHAR(1000), @@ -933,16 +933,16 @@ CREATE TABLE ur_urbanfunction expirationfiscalyear DATE, function VARCHAR(1000), function_codespace VARCHAR(1000), - legalgrounds_id BIGINT, + legalgrounds_id INTEGER, lod0multicurve geometry(GEOMETRYZ), lod0multipoint geometry(GEOMETRYZ), - lod0multisurface_id BIGINT, + lod0multisurface_id INTEGER, lod_1multicurve geometry(GEOMETRYZ), lod_1multipoint geometry(GEOMETRYZ), - lod_1multisurface_id BIGINT, + lod_1multisurface_id INTEGER, lod_2multicurve geometry(GEOMETRYZ), lod_2multipoint geometry(GEOMETRYZ), - lod_2multisurface_id BIGINT, + lod_2multisurface_id INTEGER, nominalarea NUMERIC, nominalarea_uom VARCHAR(1000), note VARCHAR(1000), @@ -962,7 +962,7 @@ CREATE TABLE ur_urbanfunction -- -------------------------------------------------------------------- CREATE TABLE ur_urbanization ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, period VARCHAR(1000), resources VARCHAR(1000), PRIMARY KEY (id) @@ -973,7 +973,7 @@ CREATE TABLE ur_urbanization -- -------------------------------------------------------------------- CREATE TABLE ur_zone ( - id BIGINT NOT NULL, + id INTEGER NOT NULL, areaapplied VARCHAR(1000), finalpublicationdate TIMESTAMP WITH TIME ZONE, objectclass_id INTEGER, @@ -1001,14 +1001,14 @@ REFERENCES ur_landusediversion (id); ALTER TABLE ur_attribution ADD CONSTRAINT ur_attribution_fk FOREIGN KEY (id) REFERENCES ur_publictransit (id); -ALTER TABLE ur_attribution ADD CONSTRAINT ur_attribution_route_fk FOREIGN KEY (route_id) -REFERENCES ur_route (id) -ON DELETE SET NULL; - ALTER TABLE ur_attribution ADD CONSTRAINT ur_attribution_agency_fk FOREIGN KEY (agency_id) REFERENCES ur_agency (id) ON DELETE SET NULL; +ALTER TABLE ur_attribution ADD CONSTRAINT ur_attribution_route_fk FOREIGN KEY (route_id) +REFERENCES ur_route (id) +ON DELETE SET NULL; + ALTER TABLE ur_attribution ADD CONSTRAINT ur_attribution_trip_fk FOREIGN KEY (trip_id) REFERENCES ur_trip (id) ON DELETE SET NULL; @@ -1101,14 +1101,14 @@ ON DELETE SET NULL; ALTER TABLE ur_farerule ADD CONSTRAINT ur_farerule_fk FOREIGN KEY (id) REFERENCES ur_publictransitdatatype (id); -ALTER TABLE ur_farerule ADD CONSTRAINT ur_farerule_route_fk FOREIGN KEY (route_id) -REFERENCES ur_route (id) -ON DELETE SET NULL; - ALTER TABLE ur_farerule ADD CONSTRAINT ur_farerule_fare_fk FOREIGN KEY (fare_id) REFERENCES ur_fareattribute (id) ON DELETE SET NULL; +ALTER TABLE ur_farerule ADD CONSTRAINT ur_farerule_route_fk FOREIGN KEY (route_id) +REFERENCES ur_route (id) +ON DELETE SET NULL; + -- -------------------------------------------------------------------- -- ur_feedinfo -- -------------------------------------------------------------------- @@ -1281,14 +1281,14 @@ REFERENCES ur_urbanfunction (id); ALTER TABLE ur_route ADD CONSTRAINT ur_route_fk FOREIGN KEY (id) REFERENCES ur_publictransit (id); -ALTER TABLE ur_route ADD CONSTRAINT ur_route_parentroute_fk FOREIGN KEY (parentroute_id) -REFERENCES ur_route (id) -ON DELETE SET NULL; - ALTER TABLE ur_route ADD CONSTRAINT ur_route_description_fk FOREIGN KEY (description_id) REFERENCES ur_description (id) ON DELETE SET NULL; +ALTER TABLE ur_route ADD CONSTRAINT ur_route_parentroute_fk FOREIGN KEY (parentroute_id) +REFERENCES ur_route (id) +ON DELETE SET NULL; + ALTER TABLE ur_route ADD CONSTRAINT ur_route_agency_fk FOREIGN KEY (agency_id) REFERENCES ur_agency (id) ON DELETE SET NULL; @@ -1328,14 +1328,14 @@ ON DELETE SET NULL; ALTER TABLE ur_stoptime ADD CONSTRAINT ur_stoptime_fk FOREIGN KEY (id) REFERENCES ur_publictransitdatatype (id); -ALTER TABLE ur_stoptime ADD CONSTRAINT ur_stoptime_stop_fk FOREIGN KEY (stop_id) -REFERENCES ur_stop (id) -ON DELETE SET NULL; - ALTER TABLE ur_stoptime ADD CONSTRAINT ur_stoptime_trip_fk FOREIGN KEY (trip_id) REFERENCES ur_trip (id) ON DELETE SET NULL; +ALTER TABLE ur_stoptime ADD CONSTRAINT ur_stoptime_stop_fk FOREIGN KEY (stop_id) +REFERENCES ur_stop (id) +ON DELETE SET NULL; + -- -------------------------------------------------------------------- -- ur_transfer -- -------------------------------------------------------------------- @@ -1382,10 +1382,6 @@ ON DELETE SET NULL; ALTER TABLE ur_trip ADD CONSTRAINT ur_trip_fk FOREIGN KEY (id) REFERENCES ur_publictransit (id); -ALTER TABLE ur_trip ADD CONSTRAINT ur_trip_shape_fk FOREIGN KEY (shape_id) -REFERENCES ur_publictransit (id) -ON DELETE SET NULL; - ALTER TABLE ur_trip ADD CONSTRAINT ur_trip_route_fk FOREIGN KEY (route_id) REFERENCES ur_route (id) ON DELETE SET NULL; @@ -1402,6 +1398,10 @@ ALTER TABLE ur_trip ADD CONSTRAINT ur_trip_office_fk FOREIGN KEY (office_id) REFERENCES ur_office (id) ON DELETE SET NULL; +ALTER TABLE ur_trip ADD CONSTRAINT ur_trip_shape_fk FOREIGN KEY (shape_id) +REFERENCES ur_publictransit (id) +ON DELETE SET NULL; + -- -------------------------------------------------------------------- -- ur_urbanfunc_to_cityobjec -- -------------------------------------------------------------------- @@ -1931,7 +1931,7 @@ CREATE INDEX ur_zone_objectclass_fkx ON ur_zone CREATE SEQUENCE ur_populationbyageand_seq INCREMENT BY 1 MINVALUE 0 -MAXVALUE 9223372036854775807 +MAXVALUE 2147483647 START WITH 1 CACHE 1 NO CYCLE @@ -1941,7 +1941,7 @@ OWNED BY NONE; CREATE SEQUENCE ur_landpriceperlandus_seq INCREMENT BY 1 MINVALUE 0 -MAXVALUE 9223372036854775807 +MAXVALUE 2147483647 START WITH 1 CACHE 1 NO CYCLE @@ -1951,7 +1951,7 @@ OWNED BY NONE; CREATE SEQUENCE ur_numberofannualdive_seq INCREMENT BY 1 MINVALUE 0 -MAXVALUE 9223372036854775807 +MAXVALUE 2147483647 START WITH 1 CACHE 1 NO CYCLE @@ -1961,7 +1961,7 @@ OWNED BY NONE; CREATE SEQUENCE ur_areaofannualdivers_seq INCREMENT BY 1 MINVALUE 0 -MAXVALUE 9223372036854775807 +MAXVALUE 2147483647 START WITH 1 CACHE 1 NO CYCLE @@ -1971,7 +1971,7 @@ OWNED BY NONE; CREATE SEQUENCE ur_numberofhouseholds_seq INCREMENT BY 1 MINVALUE 0 -MAXVALUE 9223372036854775807 +MAXVALUE 2147483647 START WITH 1 CACHE 1 NO CYCLE @@ -1981,7 +1981,7 @@ OWNED BY NONE; CREATE SEQUENCE ur_keyvaluepair_seq INCREMENT BY 1 MINVALUE 0 -MAXVALUE 9223372036854775807 +MAXVALUE 2147483647 START WITH 1 CACHE 1 NO CYCLE @@ -1991,7 +1991,7 @@ OWNED BY NONE; CREATE SEQUENCE ur_buildingdetails_seq INCREMENT BY 1 MINVALUE 0 -MAXVALUE 9223372036854775807 +MAXVALUE 2147483647 START WITH 1 CACHE 1 NO CYCLE @@ -2001,7 +2001,7 @@ OWNED BY NONE; CREATE SEQUENCE ur_largecustomerfacil_seq INCREMENT BY 1 MINVALUE 0 -MAXVALUE 9223372036854775807 +MAXVALUE 2147483647 START WITH 1 CACHE 1 NO CYCLE @@ -2011,7 +2011,7 @@ OWNED BY NONE; CREATE SEQUENCE ur_keyvaluepair_seq_1 INCREMENT BY 1 MINVALUE 0 -MAXVALUE 9223372036854775807 +MAXVALUE 2147483647 START WITH 1 CACHE 1 NO CYCLE @@ -2021,7 +2021,7 @@ OWNED BY NONE; CREATE SEQUENCE ur_trafficvolume_seq INCREMENT BY 1 MINVALUE 0 -MAXVALUE 9223372036854775807 +MAXVALUE 2147483647 START WITH 1 CACHE 1 NO CYCLE @@ -2031,7 +2031,7 @@ OWNED BY NONE; CREATE SEQUENCE ur_legalgrounds_seq INCREMENT BY 1 MINVALUE 0 -MAXVALUE 9223372036854775807 +MAXVALUE 2147483647 START WITH 1 CACHE 1 NO CYCLE @@ -2041,7 +2041,7 @@ OWNED BY NONE; CREATE SEQUENCE ur_numberofhousehol_seq_1 INCREMENT BY 1 MINVALUE 0 -MAXVALUE 9223372036854775807 +MAXVALUE 2147483647 START WITH 1 CACHE 1 NO CYCLE @@ -2051,7 +2051,7 @@ OWNED BY NONE; CREATE SEQUENCE ur_description_seq INCREMENT BY 1 MINVALUE 0 -MAXVALUE 9223372036854775807 +MAXVALUE 2147483647 START WITH 1 CACHE 1 NO CYCLE @@ -2061,7 +2061,7 @@ OWNED BY NONE; CREATE SEQUENCE ur_point_seq INCREMENT BY 1 MINVALUE 0 -MAXVALUE 9223372036854775807 +MAXVALUE 2147483647 START WITH 1 CACHE 1 NO CYCLE @@ -2071,7 +2071,7 @@ OWNED BY NONE; CREATE SEQUENCE ur_publictransitdatat_seq INCREMENT BY 1 MINVALUE 0 -MAXVALUE 9223372036854775807 +MAXVALUE 2147483647 START WITH 1 CACHE 1 NO CYCLE diff --git a/resources/database/3dcitydb/postgreSQL/DROP_ADE_DB.sql b/resources/database/3dcitydb/postgreSQL/DROP_ADE_DB.sql index 7c296c7..4707c82 100644 --- a/resources/database/3dcitydb/postgreSQL/DROP_ADE_DB.sql +++ b/resources/database/3dcitydb/postgreSQL/DROP_ADE_DB.sql @@ -1,4 +1,4 @@ --- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2021-10-08 12:36:36 +-- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2020-08-25 11:09:20 -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- *********************************** Drop foreign keys ********************************** -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -21,10 +21,10 @@ ALTER TABLE ur_attribution DROP CONSTRAINT ur_attribution_fk; ALTER TABLE ur_attribution - DROP CONSTRAINT ur_attribution_route_fk; + DROP CONSTRAINT ur_attribution_agency_fk; ALTER TABLE ur_attribution - DROP CONSTRAINT ur_attribution_agency_fk; + DROP CONSTRAINT ur_attribution_route_fk; ALTER TABLE ur_attribution DROP CONSTRAINT ur_attribution_trip_fk; @@ -114,10 +114,10 @@ ALTER TABLE ur_farerule DROP CONSTRAINT ur_farerule_fk; ALTER TABLE ur_farerule - DROP CONSTRAINT ur_farerule_route_fk; + DROP CONSTRAINT ur_farerule_fare_fk; ALTER TABLE ur_farerule - DROP CONSTRAINT ur_farerule_fare_fk; + DROP CONSTRAINT ur_farerule_route_fk; -- -------------------------------------------------------------------- -- ur_feedinfo @@ -288,10 +288,10 @@ ALTER TABLE ur_route DROP CONSTRAINT ur_route_fk; ALTER TABLE ur_route - DROP CONSTRAINT ur_route_parentroute_fk; + DROP CONSTRAINT ur_route_description_fk; ALTER TABLE ur_route - DROP CONSTRAINT ur_route_description_fk; + DROP CONSTRAINT ur_route_parentroute_fk; ALTER TABLE ur_route DROP CONSTRAINT ur_route_agency_fk; @@ -330,10 +330,10 @@ ALTER TABLE ur_stoptime DROP CONSTRAINT ur_stoptime_fk; ALTER TABLE ur_stoptime - DROP CONSTRAINT ur_stoptime_stop_fk; + DROP CONSTRAINT ur_stoptime_trip_fk; ALTER TABLE ur_stoptime - DROP CONSTRAINT ur_stoptime_trip_fk; + DROP CONSTRAINT ur_stoptime_stop_fk; -- -------------------------------------------------------------------- -- ur_transfer @@ -377,9 +377,6 @@ ALTER TABLE ur_transportation_complex ALTER TABLE ur_trip DROP CONSTRAINT ur_trip_fk; -ALTER TABLE ur_trip - DROP CONSTRAINT ur_trip_shape_fk; - ALTER TABLE ur_trip DROP CONSTRAINT ur_trip_route_fk; @@ -392,6 +389,9 @@ ALTER TABLE ur_trip ALTER TABLE ur_trip DROP CONSTRAINT ur_trip_office_fk; +ALTER TABLE ur_trip + DROP CONSTRAINT ur_trip_shape_fk; + -- -------------------------------------------------------------------- -- ur_urbanfunc_to_cityobjec -- -------------------------------------------------------------------- diff --git a/resources/database/schema-mapping/schema-mapping.xml b/resources/database/schema-mapping/schema-mapping.xml index 44e62dc..43dd910 100644 --- a/resources/database/schema-mapping/schema-mapping.xml +++ b/resources/database/schema-mapping/schema-mapping.xml @@ -381,10 +381,10 @@ - + - +