data(seeder): add location SQL data files
- regions.sql (continents) - subregions.sql - countries.sql - states.sql - cities.sql.gz (compressed, 150K+ records) - world.sql.gz (full database backup) - schema.sql
This commit is contained in:
parent
b72c63f947
commit
37c339e34e
7 changed files with 6237 additions and 0 deletions
BIN
seeder-api/sql/cities.sql.gz
Normal file
BIN
seeder-api/sql/cities.sql.gz
Normal file
Binary file not shown.
400
seeder-api/sql/countries.sql
Normal file
400
seeder-api/sql/countries.sql
Normal file
File diff suppressed because one or more lines are too long
97
seeder-api/sql/regions.sql
Normal file
97
seeder-api/sql/regions.sql
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
--
|
||||
-- PostgreSQL database dump
|
||||
--
|
||||
|
||||
\restrict wx9eQgtv8yvcEFegln3dKbUMMHO4dVO2nEJGvljMAR0mdtm1eqYEaImPxhK0SIR
|
||||
|
||||
-- Dumped from database version 16.11 (Ubuntu 16.11-1.pgdg24.04+1)
|
||||
-- Dumped by pg_dump version 16.11 (Ubuntu 16.11-1.pgdg24.04+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;
|
||||
|
||||
ALTER TABLE IF EXISTS ONLY public.regions DROP CONSTRAINT IF EXISTS regions_pkey;
|
||||
DROP TABLE IF EXISTS public.regions;
|
||||
SET default_tablespace = '';
|
||||
|
||||
SET default_table_access_method = heap;
|
||||
|
||||
--
|
||||
-- Name: regions; Type: TABLE; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
CREATE TABLE public.regions (
|
||||
id bigint NOT NULL,
|
||||
name character varying(100) NOT NULL,
|
||||
translations text,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
flag smallint DEFAULT 1 NOT NULL,
|
||||
"wikiDataId" character varying(255)
|
||||
);
|
||||
|
||||
|
||||
ALTER TABLE public.regions OWNER TO postgres;
|
||||
|
||||
--
|
||||
-- Name: COLUMN regions."wikiDataId"; Type: COMMENT; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
COMMENT ON COLUMN public.regions."wikiDataId" IS 'Rapid API GeoDB Cities';
|
||||
|
||||
|
||||
--
|
||||
-- Name: regions_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
ALTER TABLE public.regions ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
|
||||
SEQUENCE NAME public.regions_id_seq
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Data for Name: regions; Type: TABLE DATA; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
INSERT INTO public.regions VALUES (1, 'Africa', '{"br": "Afrika", "ko": "아프리카", "pt-BR": "África", "pt": "África", "nl": "Afrika", "hr": "Afrika", "fa": "آفریقا", "de": "Afrika", "es": "África", "fr": "Afrique", "ja": "アフリカ", "it": "Africa", "zh-CN": "非洲", "tr": "Afrika", "ru": "Африка", "uk": "Африка", "pl": "Afryka"}', '2023-08-14 21:41:03', '2023-08-14 21:41:03', 1, 'Q15');
|
||||
INSERT INTO public.regions VALUES (2, 'Americas', '{"br": "Amerika", "ko": "아메리카", "pt-BR": "América", "pt": "América", "nl": "Amerika", "hr": "Amerika", "fa": "قاره آمریکا", "de": "Amerika", "es": "América", "fr": "Amérique", "ja": "アメリカ州", "it": "America", "zh-CN": "美洲", "tr": "Amerika", "ru": "Америка", "uk": "Америка", "pl": "Ameryka"}', '2023-08-14 21:41:03', '2024-06-16 15:09:55', 1, 'Q828');
|
||||
INSERT INTO public.regions VALUES (3, 'Asia', '{"br": "Azia", "ko": "아시아", "pt-BR": "Ásia", "pt": "Ásia", "nl": "Azië", "hr": "Ázsia", "fa": "آسیا", "de": "Asien", "es": "Asia", "fr": "Asie", "ja": "アジア", "it": "Asia", "zh-CN": "亚洲", "tr": "Asya", "ru": "Азия", "uk": "Азія", "pl": "Azja"}', '2023-08-14 21:41:03', '2023-08-14 21:41:03', 1, 'Q48');
|
||||
INSERT INTO public.regions VALUES (4, 'Europe', '{"br": "Europa", "ko": "유럽", "pt-BR": "Europa", "pt": "Europa", "nl": "Europa", "hr": "Európa", "fa": "اروپا", "de": "Europa", "es": "Europa", "fr": "Europe", "ja": "ヨーロッパ", "it": "Europa", "zh-CN": "欧洲", "tr": "Avrupa", "ru": "Европа", "uk": "Європа", "pl": "Europa"}', '2023-08-14 21:41:03', '2023-08-14 21:41:03', 1, 'Q46');
|
||||
INSERT INTO public.regions VALUES (5, 'Oceania', '{"br": "Okeania", "ko": "오세아니아", "pt-BR": "Oceania", "pt": "Oceania", "nl": "Oceanië en Australië", "hr": "Óceánia és Ausztrália", "fa": "اقیانوسیه", "de": "Ozeanien und Australien", "es": "Oceanía", "fr": "Océanie", "ja": "オセアニア", "it": "Oceania", "zh-CN": "大洋洲", "tr": "Okyanusya", "ru": "Океания", "uk": "Океанія", "pl": "Oceania"}', '2023-08-14 21:41:03', '2023-08-14 21:41:03', 1, 'Q55643');
|
||||
INSERT INTO public.regions VALUES (6, 'Polar', '{"br": "Antartika", "ko": "남극", "pt-BR": "Antártida", "pt": "Antártida", "nl": "Antarctica", "hr": "Antarktika", "fa": "جنوبگان", "de": "Antarktika", "es": "Antártida", "fr": "Antarctique", "ja": "南極大陸", "it": "Antartide", "zh-CN": "南極洲", "tr": "Antarktika", "ru": "Антарктика", "uk": "Антарктика", "pl": "Antarktyka"}', '2023-08-14 21:41:03', '2024-06-16 15:20:26', 1, 'Q51');
|
||||
|
||||
|
||||
--
|
||||
-- Name: regions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
SELECT pg_catalog.setval('public.regions_id_seq', 6, true);
|
||||
|
||||
|
||||
--
|
||||
-- Name: regions regions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.regions
|
||||
ADD CONSTRAINT regions_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- PostgreSQL database dump complete
|
||||
--
|
||||
|
||||
\unrestrict wx9eQgtv8yvcEFegln3dKbUMMHO4dVO2nEJGvljMAR0mdtm1eqYEaImPxhK0SIR
|
||||
|
||||
185
seeder-api/sql/schema.sql
Normal file
185
seeder-api/sql/schema.sql
Normal file
|
|
@ -0,0 +1,185 @@
|
|||
-- MySQL dump 10.13 Distrib 8.0.44, for Linux (x86_64)
|
||||
--
|
||||
-- Host: localhost Database: world
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 8.0.44-0ubuntu0.24.04.2
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!50503 SET NAMES utf8mb4 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Table structure for table `cities`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `cities`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `cities` (
|
||||
`id` mediumint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`state_id` mediumint unsigned NOT NULL,
|
||||
`state_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`country_id` mediumint unsigned NOT NULL,
|
||||
`country_code` char(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`level` int DEFAULT NULL,
|
||||
`parent_id` int unsigned DEFAULT NULL,
|
||||
`latitude` decimal(10,8) NOT NULL,
|
||||
`longitude` decimal(11,8) NOT NULL,
|
||||
`native` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`population` bigint unsigned DEFAULT NULL,
|
||||
`timezone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'IANA timezone identifier (e.g., America/New_York)',
|
||||
`translations` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
||||
`created_at` timestamp NOT NULL DEFAULT '2014-01-01 12:01:01',
|
||||
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`flag` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`wikiDataId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Rapid API GeoDB Cities',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `cities_test_ibfk_1` (`state_id`),
|
||||
KEY `cities_test_ibfk_2` (`country_id`),
|
||||
CONSTRAINT `cities_ibfk_1` FOREIGN KEY (`state_id`) REFERENCES `states` (`id`),
|
||||
CONSTRAINT `cities_ibfk_2` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=160557 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `countries`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `countries`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `countries` (
|
||||
`id` mediumint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`iso3` char(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`numeric_code` char(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`iso2` char(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`phonecode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`capital` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`currency` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`currency_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`currency_symbol` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`tld` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`native` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`population` bigint unsigned DEFAULT NULL,
|
||||
`gdp` bigint unsigned DEFAULT NULL,
|
||||
`region` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`region_id` mediumint unsigned DEFAULT NULL,
|
||||
`subregion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`subregion_id` mediumint unsigned DEFAULT NULL,
|
||||
`nationality` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`area_sq_km` double DEFAULT NULL,
|
||||
`postal_code_format` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`postal_code_regex` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`timezones` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
||||
`translations` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
||||
`latitude` decimal(10,8) DEFAULT NULL,
|
||||
`longitude` decimal(11,8) DEFAULT NULL,
|
||||
`emoji` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`emojiU` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`flag` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`wikiDataId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Rapid API GeoDB Cities',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `country_continent` (`region_id`),
|
||||
KEY `country_subregion` (`subregion_id`),
|
||||
CONSTRAINT `country_continent_final` FOREIGN KEY (`region_id`) REFERENCES `regions` (`id`),
|
||||
CONSTRAINT `country_subregion_final` FOREIGN KEY (`subregion_id`) REFERENCES `subregions` (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=251 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `regions`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `regions`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `regions` (
|
||||
`id` mediumint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`translations` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`flag` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`wikiDataId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Rapid API GeoDB Cities',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `states`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `states`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `states` (
|
||||
`id` mediumint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`country_id` mediumint unsigned NOT NULL,
|
||||
`country_code` char(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`fips_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`iso2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`iso3166_2` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`level` int DEFAULT NULL,
|
||||
`parent_id` int unsigned DEFAULT NULL,
|
||||
`native` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`latitude` decimal(10,8) DEFAULT NULL,
|
||||
`longitude` decimal(11,8) DEFAULT NULL,
|
||||
`timezone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'IANA timezone identifier (e.g., America/New_York)',
|
||||
`translations` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`flag` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`wikiDataId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Rapid API GeoDB Cities',
|
||||
`population` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `country_region` (`country_id`),
|
||||
CONSTRAINT `country_region_final` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5815 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `subregions`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `subregions`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `subregions` (
|
||||
`id` mediumint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`translations` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
||||
`region_id` mediumint unsigned NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`flag` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`wikiDataId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Rapid API GeoDB Cities',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `subregion_continent` (`region_id`),
|
||||
CONSTRAINT `subregion_continent_final` FOREIGN KEY (`region_id`) REFERENCES `regions` (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!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 2025-12-13 9:10:51
|
||||
5424
seeder-api/sql/states.sql
Normal file
5424
seeder-api/sql/states.sql
Normal file
File diff suppressed because it is too large
Load diff
131
seeder-api/sql/subregions.sql
Normal file
131
seeder-api/sql/subregions.sql
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
--
|
||||
-- PostgreSQL database dump
|
||||
--
|
||||
|
||||
\restrict gqD4dEyMLWGPwDoVVGSqoN0mWLhBeG1i9qqmQ0cGrgplk5Pj3p9mrHsZRng6CyU
|
||||
|
||||
-- Dumped from database version 16.11 (Ubuntu 16.11-1.pgdg24.04+1)
|
||||
-- Dumped by pg_dump version 16.11 (Ubuntu 16.11-1.pgdg24.04+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;
|
||||
|
||||
ALTER TABLE IF EXISTS ONLY public.subregions DROP CONSTRAINT IF EXISTS subregions_region_id_fkey;
|
||||
DROP INDEX IF EXISTS public.subregions_region_id_idx;
|
||||
ALTER TABLE IF EXISTS ONLY public.subregions DROP CONSTRAINT IF EXISTS subregions_pkey;
|
||||
DROP TABLE IF EXISTS public.subregions;
|
||||
SET default_tablespace = '';
|
||||
|
||||
SET default_table_access_method = heap;
|
||||
|
||||
--
|
||||
-- Name: subregions; Type: TABLE; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
CREATE TABLE public.subregions (
|
||||
id bigint NOT NULL,
|
||||
name character varying(100) NOT NULL,
|
||||
translations text,
|
||||
region_id bigint NOT NULL,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
flag smallint DEFAULT 1 NOT NULL,
|
||||
"wikiDataId" character varying(255)
|
||||
);
|
||||
|
||||
|
||||
ALTER TABLE public.subregions OWNER TO postgres;
|
||||
|
||||
--
|
||||
-- Name: COLUMN subregions."wikiDataId"; Type: COMMENT; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
COMMENT ON COLUMN public.subregions."wikiDataId" IS 'Rapid API GeoDB Cities';
|
||||
|
||||
|
||||
--
|
||||
-- Name: subregions_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
ALTER TABLE public.subregions ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
|
||||
SEQUENCE NAME public.subregions_id_seq
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Data for Name: subregions; Type: TABLE DATA; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
INSERT INTO public.subregions VALUES (1, 'Northern Africa', '{"br": "Afrika an North", "ko": "북아프리카", "pt": "Norte de África", "nl": "Noord-Afrika", "hr": "Sjeverna Afrika", "fa": "شمال آفریقا", "de": "Nordafrika", "es": "Norte de África", "fr": "Afrique du Nord", "ja": "北アフリカ", "it": "Nordafrica", "zh-CN": "北部非洲", "ru": "Северная Африка", "uk": "Північна Африка", "pl": "Afryka Północna"}', 1, '2023-08-14 21:41:03', '2023-08-25 10:40:23', 1, 'Q27381');
|
||||
INSERT INTO public.subregions VALUES (2, 'Middle Africa', '{"br": "Afrika ar C''hreiz", "ko": "중앙아프리카", "pt": "África Central", "nl": "Centraal-Afrika", "hr": "Srednja Afrika", "fa": "مرکز آفریقا", "de": "Zentralafrika", "es": "África Central", "fr": "Afrique centrale", "ja": "中部アフリカ", "it": "Africa centrale", "zh-CN": "中部非洲", "ru": "Средняя Африка", "uk": "Середня Африка", "pl": "Afryka Środkowa"}', 1, '2023-08-14 21:41:03', '2023-08-25 10:52:09', 1, 'Q27433');
|
||||
INSERT INTO public.subregions VALUES (3, 'Western Africa', '{"br": "Afrika ar C''hornaoueg", "ko": "서아프리카", "pt": "África Ocidental", "nl": "West-Afrika", "hr": "Zapadna Afrika", "fa": "غرب آفریقا", "de": "Westafrika", "es": "África Occidental", "fr": "Afrique de l''Ouest", "ja": "西アフリカ", "it": "Africa occidentale", "zh-CN": "西非", "ru": "Западная Африка", "uk": "Західна Африка", "pl": "Afryka Zachodnia"}', 1, '2023-08-14 21:41:03', '2023-08-25 10:52:09', 1, 'Q4412');
|
||||
INSERT INTO public.subregions VALUES (4, 'Eastern Africa', '{"br": "Afrika ar Reter", "ko": "동아프리카", "pt": "África Oriental", "nl": "Oost-Afrika", "hr": "Istočna Afrika", "fa": "شرق آفریقا", "de": "Ostafrika", "es": "África Oriental", "fr": "Afrique de l''Est", "ja": "東アフリカ", "it": "Africa orientale", "zh-CN": "东部非洲", "ru": "Восточная Африка", "uk": "Східна Африка", "pl": "Afryka Wschodnia"}', 1, '2023-08-14 21:41:03', '2023-08-25 10:52:10', 1, 'Q27407');
|
||||
INSERT INTO public.subregions VALUES (5, 'Southern Africa', '{"br": "Suafrika", "ko": "남아프리카", "pt": "África Austral", "nl": "Zuidelijk Afrika", "hr": "Južna Afrika", "fa": "جنوب آفریقا", "de": "Südafrika", "es": "África austral", "fr": "Afrique australe", "ja": "南部アフリカ", "it": "Africa australe", "zh-CN": "南部非洲", "ru": "Южная Африка", "uk": "Південна Африка", "pl": "Afryka Południowa"}', 1, '2023-08-14 21:41:03', '2023-08-25 10:52:10', 1, 'Q27394');
|
||||
INSERT INTO public.subregions VALUES (6, 'Northern America', '{"br": "Norzhamerika", "ko": "북미", "pt": "América Setentrional", "nl": "Noord-Amerika", "fa": "شمال آمریکا", "de": "Nordamerika", "es": "América Norteña", "fr": "Amérique septentrionale", "ja": "北部アメリカ", "it": "America settentrionale", "zh-CN": "北美地區", "ru": "Северная Америка", "uk": "Північна Америка", "pl": "Ameryka Północna"}', 2, '2023-08-14 21:41:03', '2023-08-25 10:52:10', 1, 'Q2017699');
|
||||
INSERT INTO public.subregions VALUES (7, 'Caribbean', '{"br": "Karib", "ko": "카리브", "pt": "Caraíbas", "nl": "Caraïben", "hr": "Karibi", "fa": "کارائیب", "de": "Karibik", "es": "Caribe", "fr": "Caraïbes", "ja": "カリブ海地域", "it": "Caraibi", "zh-CN": "加勒比地区", "ru": "Карибы", "uk": "Кариби", "pl": "Karaiby"}', 2, '2023-08-14 21:41:03', '2024-06-16 15:42:18', 1, 'Q664609');
|
||||
INSERT INTO public.subregions VALUES (8, 'South America', '{"br": "Suamerika", "ko": "남아메리카", "pt": "América do Sul", "nl": "Zuid-Amerika", "hr": "Južna Amerika", "fa": "آمریکای جنوبی", "de": "Südamerika", "es": "América del Sur", "fr": "Amérique du Sud", "ja": "南アメリカ", "it": "America meridionale", "zh-CN": "南美洲", "ru": "Южная Америка", "uk": "Південна Америка", "pl": "Ameryka Południowa"}', 2, '2023-08-14 21:41:03', '2023-08-25 10:52:10', 1, 'Q18');
|
||||
INSERT INTO public.subregions VALUES (9, 'Central America', '{"br": "Kreizamerika", "ko": "중앙아메리카", "pt": "América Central", "nl": "Centraal-Amerika", "hr": "Srednja Amerika", "fa": "آمریکای مرکزی", "de": "Zentralamerika", "es": "América Central", "fr": "Amérique centrale", "ja": "中央アメリカ", "it": "America centrale", "zh-CN": "中美洲", "ru": "Центральная Америка", "uk": "Центральна Америка", "pl": "Ameryka Środkowa"}', 2, '2023-08-14 21:41:03', '2023-08-25 10:52:11', 1, 'Q27611');
|
||||
INSERT INTO public.subregions VALUES (10, 'Central Asia', '{"br": "Azia ar C''hreiz", "ko": "중앙아시아", "pt": "Ásia Central", "nl": "Centraal-Azië", "hr": "Srednja Azija", "fa": "آسیای میانه", "de": "Zentralasien", "es": "Asia Central", "fr": "Asie centrale", "ja": "中央アジア", "it": "Asia centrale", "zh-CN": "中亚", "ru": "Центральная Азия", "uk": "Центральна Азія", "pl": "Azja Środkowa"}', 3, '2023-08-14 21:41:03', '2023-08-25 10:52:11', 1, 'Q27275');
|
||||
INSERT INTO public.subregions VALUES (11, 'Western Asia', '{"br": "Azia ar Mervent", "ko": "서아시아", "pt": "Sudoeste Asiático", "nl": "Zuidwest-Azië", "hr": "Jugozapadna Azija", "fa": "غرب آسیا", "de": "Vorderasien", "es": "Asia Occidental", "fr": "Asie de l''Ouest", "ja": "西アジア", "it": "Asia occidentale", "zh-CN": "西亚", "ru": "Западная Азия", "uk": "Західна Азія", "pl": "Azja Zachodnia"}', 3, '2023-08-14 21:41:03', '2023-08-25 10:52:11', 1, 'Q27293');
|
||||
INSERT INTO public.subregions VALUES (12, 'Eastern Asia', '{"br": "Azia ar Reter", "ko": "동아시아", "pt": "Ásia Oriental", "nl": "Oost-Azië", "hr": "Istočna Azija", "fa": "شرق آسیا", "de": "Ostasien", "es": "Asia Oriental", "fr": "Asie de l''Est", "ja": "東アジア", "it": "Asia orientale", "zh-CN": "東亞", "ru": "Восточная Азия", "uk": "Східна Азія", "pl": "Azja Wschodnia"}', 3, '2023-08-14 21:41:03', '2023-08-25 10:52:11', 1, 'Q27231');
|
||||
INSERT INTO public.subregions VALUES (13, 'South-Eastern Asia', '{"br": "Azia ar Gevred", "ko": "동남아시아", "pt": "Sudeste Asiático", "nl": "Zuidoost-Azië", "hr": "Jugoistočna Azija", "fa": "جنوب شرق آسیا", "de": "Südostasien", "es": "Sudeste Asiático", "fr": "Asie du Sud-Est", "ja": "東南アジア", "it": "Sud-est asiatico", "zh-CN": "东南亚", "ru": "Юго-Восточная Азия", "uk": "Південно-Східна Азія", "pl": "Azja Południowo-Wschodnia"}', 3, '2023-08-14 21:41:03', '2023-08-25 10:52:12', 1, 'Q11708');
|
||||
INSERT INTO public.subregions VALUES (14, 'Southern Asia', '{"br": "Azia ar Su", "ko": "남아시아", "pt": "Ásia Meridional", "nl": "Zuid-Azië", "hr": "Južna Azija", "fa": "جنوب آسیا", "de": "Südasien", "es": "Asia del Sur", "fr": "Asie du Sud", "ja": "南アジア", "it": "Asia meridionale", "zh-CN": "南亚", "ru": "Южная Азия", "uk": "Південна Азія", "pl": "Azja Południowa"}', 3, '2023-08-14 21:41:03', '2023-08-25 10:52:12', 1, 'Q771405');
|
||||
INSERT INTO public.subregions VALUES (15, 'Eastern Europe', '{"br": "Europa ar Reter", "ko": "동유럽", "pt": "Europa de Leste", "nl": "Oost-Europa", "hr": "Istočna Europa", "fa": "شرق اروپا", "de": "Osteuropa", "es": "Europa Oriental", "fr": "Europe de l''Est", "ja": "東ヨーロッパ", "it": "Europa orientale", "zh-CN": "东欧", "ru": "Восточная Европа", "uk": "Східна Європа", "pl": "Europa Wschodnia"}', 4, '2023-08-14 21:41:03', '2023-08-25 10:52:12', 1, 'Q27468');
|
||||
INSERT INTO public.subregions VALUES (16, 'Southern Europe', '{"br": "Europa ar Su", "ko": "남유럽", "pt": "Europa meridional", "nl": "Zuid-Europa", "hr": "Južna Europa", "fa": "جنوب اروپا", "de": "Südeuropa", "es": "Europa del Sur", "fr": "Europe du Sud", "ja": "南ヨーロッパ", "it": "Europa meridionale", "zh-CN": "南欧", "ru": "Южная Европа", "uk": "Південна Європа", "pl": "Europa Południowa"}', 4, '2023-08-14 21:41:03', '2023-08-25 10:52:12', 1, 'Q27449');
|
||||
INSERT INTO public.subregions VALUES (17, 'Western Europe', '{"br": "Europa ar C''hornaoueg", "ko": "서유럽", "pt": "Europa Ocidental", "nl": "West-Europa", "hr": "Zapadna Europa", "fa": "غرب اروپا", "de": "Westeuropa", "es": "Europa Occidental", "fr": "Europe de l''Ouest", "ja": "西ヨーロッパ", "it": "Europa occidentale", "zh-CN": "西欧", "ru": "Западная Европа", "uk": "Західна Європа", "pl": "Europa Zachodnia"}', 4, '2023-08-14 21:41:03', '2023-08-25 10:52:12', 1, 'Q27496');
|
||||
INSERT INTO public.subregions VALUES (18, 'Northern Europe', '{"br": "Europa an North", "ko": "북유럽", "pt": "Europa Setentrional", "nl": "Noord-Europa", "hr": "Sjeverna Europa", "fa": "شمال اروپا", "de": "Nordeuropa", "es": "Europa del Norte", "fr": "Europe du Nord", "ja": "北ヨーロッパ", "it": "Europa settentrionale", "zh-CN": "北歐", "ru": "Северная Европа", "uk": "Північна Європа", "pl": "Europa Północna"}', 4, '2023-08-14 21:41:03', '2023-08-25 10:52:13', 1, 'Q27479');
|
||||
INSERT INTO public.subregions VALUES (19, 'Australia and New Zealand', '{"br": "Aostralia ha Zeland-Nevez", "ko": "오스트랄라시아", "pt": "Australásia", "nl": "Australazië", "hr": "Australazija", "fa": "استرالزی", "de": "Australasien", "es": "Australasia", "fr": "Australasie", "ja": "オーストララシア", "it": "Australasia", "zh-CN": "澳大拉西亞", "ru": "Австралия и Новая Зеландия", "uk": "Австралія та Нова Зеландія", "pl": "Australia i Nowa Zelandia"}', 5, '2023-08-14 21:41:03', '2023-08-25 10:52:13', 1, 'Q45256');
|
||||
INSERT INTO public.subregions VALUES (20, 'Melanesia', '{"br": "Melanezia", "ko": "멜라네시아", "pt": "Melanésia", "nl": "Melanesië", "hr": "Melanezija", "fa": "ملانزی", "de": "Melanesien", "es": "Melanesia", "fr": "Mélanésie", "ja": "メラネシア", "it": "Melanesia", "zh-CN": "美拉尼西亚", "ru": "Меланезия", "uk": "Меланезія", "pl": "Melanezja"}', 5, '2023-08-14 21:41:03', '2023-08-25 10:52:13', 1, 'Q37394');
|
||||
INSERT INTO public.subregions VALUES (21, 'Micronesia', '{"br": "Mikronezia", "ko": "미크로네시아", "pt": "Micronésia", "nl": "Micronesië", "hr": "Mikronezija", "fa": "میکرونزی", "de": "Mikronesien", "es": "Micronesia", "fr": "Micronésie", "ja": "ミクロネシア", "it": "Micronesia", "zh-CN": "密克罗尼西亚群岛", "ru": "Микронезия", "uk": "Мікронезія", "pl": "Mikronezja"}', 5, '2023-08-14 21:41:03', '2023-08-25 10:52:13', 1, 'Q3359409');
|
||||
INSERT INTO public.subregions VALUES (22, 'Polynesia', '{"br": "Polisezia", "ko": "폴리네시아", "pt": "Polinésia", "nl": "Polynesië", "hr": "Polinezija", "fa": "پلینزی", "de": "Polynesien", "es": "Polinesia", "fr": "Polynésie", "ja": "ポリネシア", "it": "Polinesia", "zh-CN": "玻里尼西亞", "ru": "Полинезия", "uk": "Полінезія", "pl": "Polinezja"}', 5, '2023-08-14 21:41:03', '2023-08-25 10:52:13', 1, 'Q35942');
|
||||
|
||||
|
||||
--
|
||||
-- Name: subregions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
SELECT pg_catalog.setval('public.subregions_id_seq', 22, true);
|
||||
|
||||
|
||||
--
|
||||
-- Name: subregions subregions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.subregions
|
||||
ADD CONSTRAINT subregions_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: subregions_region_id_idx; Type: INDEX; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
CREATE INDEX subregions_region_id_idx ON public.subregions USING btree (region_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: subregions subregions_region_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.subregions
|
||||
ADD CONSTRAINT subregions_region_id_fkey FOREIGN KEY (region_id) REFERENCES public.regions(id);
|
||||
|
||||
|
||||
--
|
||||
-- PostgreSQL database dump complete
|
||||
--
|
||||
|
||||
\unrestrict gqD4dEyMLWGPwDoVVGSqoN0mWLhBeG1i9qqmQ0cGrgplk5Pj3p9mrHsZRng6CyU
|
||||
|
||||
BIN
seeder-api/sql/world.sql.gz
Normal file
BIN
seeder-api/sql/world.sql.gz
Normal file
Binary file not shown.
Loading…
Reference in a new issue