mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-03 20:25:18 +02:00
Add country regions for GB, FR, AR, CA, MX, and DE
This commit is contained in:
parent
d9116b2a15
commit
3887ac845e
14 changed files with 891 additions and 89 deletions
1
migrations/0014_wet_wong.sql
Normal file
1
migrations/0014_wet_wong.sql
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE "worldTravelCountryRegions" ALTER COLUMN "id" SET DATA TYPE varchar;
|
1
migrations/0015_nappy_spot.sql
Normal file
1
migrations/0015_nappy_spot.sql
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE "worldTravelCountryRegions" ADD CONSTRAINT "worldTravelCountryRegions_id_unique" UNIQUE("id");
|
319
migrations/meta/0014_snapshot.json
Normal file
319
migrations/meta/0014_snapshot.json
Normal file
|
@ -0,0 +1,319 @@
|
||||||
|
{
|
||||||
|
"id": "9570801b-297b-432f-bfb0-26e00e378f8d",
|
||||||
|
"prevId": "09cc6e72-191b-4579-ad62-e24dbc03bacf",
|
||||||
|
"version": "5",
|
||||||
|
"dialect": "pg",
|
||||||
|
"tables": {
|
||||||
|
"featuredAdventures": {
|
||||||
|
"name": "featuredAdventures",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"name": "name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"location": {
|
||||||
|
"name": "location",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {
|
||||||
|
"featuredAdventures_name_unique": {
|
||||||
|
"name": "featuredAdventures_name_unique",
|
||||||
|
"nullsNotDistinct": false,
|
||||||
|
"columns": [
|
||||||
|
"name"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"session": {
|
||||||
|
"name": "session",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"name": "user_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"expires_at": {
|
||||||
|
"name": "expires_at",
|
||||||
|
"type": "timestamp with time zone",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"session_user_id_user_id_fk": {
|
||||||
|
"name": "session_user_id_user_id_fk",
|
||||||
|
"tableFrom": "session",
|
||||||
|
"tableTo": "user",
|
||||||
|
"columnsFrom": [
|
||||||
|
"user_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {}
|
||||||
|
},
|
||||||
|
"sharedAdventures": {
|
||||||
|
"name": "sharedAdventures",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"name": "data",
|
||||||
|
"type": "json",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"name": "name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"date": {
|
||||||
|
"name": "date",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {}
|
||||||
|
},
|
||||||
|
"user": {
|
||||||
|
"name": "user",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"name": "username",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"first_name": {
|
||||||
|
"name": "first_name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"last_name": {
|
||||||
|
"name": "last_name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"icon": {
|
||||||
|
"name": "icon",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"hashed_password": {
|
||||||
|
"name": "hashed_password",
|
||||||
|
"type": "varchar",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {}
|
||||||
|
},
|
||||||
|
"userVisitedAdventures": {
|
||||||
|
"name": "userVisitedAdventures",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"adventure_id": {
|
||||||
|
"name": "adventure_id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"name": "user_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"adventure_name": {
|
||||||
|
"name": "adventure_name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"location": {
|
||||||
|
"name": "location",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"visited_date": {
|
||||||
|
"name": "visited_date",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"userVisitedAdventures_user_id_user_id_fk": {
|
||||||
|
"name": "userVisitedAdventures_user_id_user_id_fk",
|
||||||
|
"tableFrom": "userVisitedAdventures",
|
||||||
|
"tableTo": "user",
|
||||||
|
"columnsFrom": [
|
||||||
|
"user_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {}
|
||||||
|
},
|
||||||
|
"worldTravelCountries": {
|
||||||
|
"name": "worldTravelCountries",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"name": "name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"country_code": {
|
||||||
|
"name": "country_code",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"continent": {
|
||||||
|
"name": "continent",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {
|
||||||
|
"worldTravelCountries_country_code_unique": {
|
||||||
|
"name": "worldTravelCountries_country_code_unique",
|
||||||
|
"nullsNotDistinct": false,
|
||||||
|
"columns": [
|
||||||
|
"country_code"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"worldTravelCountryRegions": {
|
||||||
|
"name": "worldTravelCountryRegions",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "varchar",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"name": "name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"country_code": {
|
||||||
|
"name": "country_code",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"worldTravelCountryRegions_country_code_worldTravelCountries_country_code_fk": {
|
||||||
|
"name": "worldTravelCountryRegions_country_code_worldTravelCountries_country_code_fk",
|
||||||
|
"tableFrom": "worldTravelCountryRegions",
|
||||||
|
"tableTo": "worldTravelCountries",
|
||||||
|
"columnsFrom": [
|
||||||
|
"country_code"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"country_code"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {
|
||||||
|
"worldTravelCountryRegions_name_unique": {
|
||||||
|
"name": "worldTravelCountryRegions_name_unique",
|
||||||
|
"nullsNotDistinct": false,
|
||||||
|
"columns": [
|
||||||
|
"name"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"enums": {},
|
||||||
|
"schemas": {},
|
||||||
|
"_meta": {
|
||||||
|
"columns": {},
|
||||||
|
"schemas": {},
|
||||||
|
"tables": {}
|
||||||
|
}
|
||||||
|
}
|
326
migrations/meta/0015_snapshot.json
Normal file
326
migrations/meta/0015_snapshot.json
Normal file
|
@ -0,0 +1,326 @@
|
||||||
|
{
|
||||||
|
"id": "08e82a7f-26df-4a30-a7d0-8e6043a2de43",
|
||||||
|
"prevId": "9570801b-297b-432f-bfb0-26e00e378f8d",
|
||||||
|
"version": "5",
|
||||||
|
"dialect": "pg",
|
||||||
|
"tables": {
|
||||||
|
"featuredAdventures": {
|
||||||
|
"name": "featuredAdventures",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"name": "name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"location": {
|
||||||
|
"name": "location",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {
|
||||||
|
"featuredAdventures_name_unique": {
|
||||||
|
"name": "featuredAdventures_name_unique",
|
||||||
|
"nullsNotDistinct": false,
|
||||||
|
"columns": [
|
||||||
|
"name"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"session": {
|
||||||
|
"name": "session",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"name": "user_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"expires_at": {
|
||||||
|
"name": "expires_at",
|
||||||
|
"type": "timestamp with time zone",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"session_user_id_user_id_fk": {
|
||||||
|
"name": "session_user_id_user_id_fk",
|
||||||
|
"tableFrom": "session",
|
||||||
|
"tableTo": "user",
|
||||||
|
"columnsFrom": [
|
||||||
|
"user_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {}
|
||||||
|
},
|
||||||
|
"sharedAdventures": {
|
||||||
|
"name": "sharedAdventures",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"name": "data",
|
||||||
|
"type": "json",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"name": "name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"date": {
|
||||||
|
"name": "date",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {}
|
||||||
|
},
|
||||||
|
"user": {
|
||||||
|
"name": "user",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"name": "username",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"first_name": {
|
||||||
|
"name": "first_name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"last_name": {
|
||||||
|
"name": "last_name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"icon": {
|
||||||
|
"name": "icon",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"hashed_password": {
|
||||||
|
"name": "hashed_password",
|
||||||
|
"type": "varchar",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {}
|
||||||
|
},
|
||||||
|
"userVisitedAdventures": {
|
||||||
|
"name": "userVisitedAdventures",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"adventure_id": {
|
||||||
|
"name": "adventure_id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"name": "user_id",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"adventure_name": {
|
||||||
|
"name": "adventure_name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"location": {
|
||||||
|
"name": "location",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"visited_date": {
|
||||||
|
"name": "visited_date",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"userVisitedAdventures_user_id_user_id_fk": {
|
||||||
|
"name": "userVisitedAdventures_user_id_user_id_fk",
|
||||||
|
"tableFrom": "userVisitedAdventures",
|
||||||
|
"tableTo": "user",
|
||||||
|
"columnsFrom": [
|
||||||
|
"user_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {}
|
||||||
|
},
|
||||||
|
"worldTravelCountries": {
|
||||||
|
"name": "worldTravelCountries",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"name": "name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"country_code": {
|
||||||
|
"name": "country_code",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"continent": {
|
||||||
|
"name": "continent",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {
|
||||||
|
"worldTravelCountries_country_code_unique": {
|
||||||
|
"name": "worldTravelCountries_country_code_unique",
|
||||||
|
"nullsNotDistinct": false,
|
||||||
|
"columns": [
|
||||||
|
"country_code"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"worldTravelCountryRegions": {
|
||||||
|
"name": "worldTravelCountryRegions",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "varchar",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"name": "name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"country_code": {
|
||||||
|
"name": "country_code",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"worldTravelCountryRegions_country_code_worldTravelCountries_country_code_fk": {
|
||||||
|
"name": "worldTravelCountryRegions_country_code_worldTravelCountries_country_code_fk",
|
||||||
|
"tableFrom": "worldTravelCountryRegions",
|
||||||
|
"tableTo": "worldTravelCountries",
|
||||||
|
"columnsFrom": [
|
||||||
|
"country_code"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"country_code"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {
|
||||||
|
"worldTravelCountryRegions_id_unique": {
|
||||||
|
"name": "worldTravelCountryRegions_id_unique",
|
||||||
|
"nullsNotDistinct": false,
|
||||||
|
"columns": [
|
||||||
|
"id"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"worldTravelCountryRegions_name_unique": {
|
||||||
|
"name": "worldTravelCountryRegions_name_unique",
|
||||||
|
"nullsNotDistinct": false,
|
||||||
|
"columns": [
|
||||||
|
"name"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"enums": {},
|
||||||
|
"schemas": {},
|
||||||
|
"_meta": {
|
||||||
|
"columns": {},
|
||||||
|
"schemas": {},
|
||||||
|
"tables": {}
|
||||||
|
}
|
||||||
|
}
|
|
@ -99,6 +99,20 @@
|
||||||
"when": 1712886259872,
|
"when": 1712886259872,
|
||||||
"tag": "0013_high_unicorn",
|
"tag": "0013_high_unicorn",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 14,
|
||||||
|
"version": "5",
|
||||||
|
"when": 1712928449165,
|
||||||
|
"tag": "0014_wet_wong",
|
||||||
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 15,
|
||||||
|
"version": "5",
|
||||||
|
"when": 1712928491810,
|
||||||
|
"tag": "0015_nappy_spot",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
105
sql/002_us.sql
105
sql/002_us.sql
|
@ -1,54 +1,53 @@
|
||||||
INSERT INTO "worldTravelCountryRegions" (name, country_code)
|
INSERT INTO "worldTravelCountryRegions" (id, name, country_code)
|
||||||
VALUES
|
VALUES
|
||||||
('Alabama', 'us'),
|
('US-AL', 'Alabama', 'us'),
|
||||||
('Alaska', 'us'),
|
('US-AK', 'Alaska', 'us'),
|
||||||
('Arizona', 'us'),
|
('US-AZ', 'Arizona', 'us'),
|
||||||
('Arkansas', 'us'),
|
('US-AR', 'Arkansas', 'us'),
|
||||||
('California', 'us'),
|
('US-CA', 'California', 'us'),
|
||||||
('Colorado', 'us'),
|
('US-CO', 'Colorado', 'us'),
|
||||||
('Connecticut', 'us'),
|
('US-CT', 'Connecticut', 'us'),
|
||||||
('Delaware', 'us'),
|
('US-DE', 'Delaware', 'us'),
|
||||||
('Florida', 'us'),
|
('US-FL', 'Florida', 'us'),
|
||||||
('Georgia', 'us'),
|
('US-GA', 'Georgia', 'us'),
|
||||||
('Hawaii', 'us'),
|
('US-HI', 'Hawaii', 'us'),
|
||||||
('Idaho', 'us'),
|
('US-ID', 'Idaho', 'us'),
|
||||||
('Illinois', 'us'),
|
('US-IL', 'Illinois', 'us'),
|
||||||
('Indiana', 'us'),
|
('US-IN', 'Indiana', 'us'),
|
||||||
('Iowa', 'us'),
|
('US-IA', 'Iowa', 'us'),
|
||||||
('Kansas', 'us'),
|
('US-KS', 'Kansas', 'us'),
|
||||||
('Kentucky', 'us'),
|
('US-KY', 'Kentucky', 'us'),
|
||||||
('Louisiana', 'us'),
|
('US-LA', 'Louisiana', 'us'),
|
||||||
('Maine', 'us'),
|
('US-ME', 'Maine', 'us'),
|
||||||
('Maryland', 'us'),
|
('US-MD', 'Maryland', 'us'),
|
||||||
('Massachusetts', 'us'),
|
('US-MA', 'Massachusetts', 'us'),
|
||||||
('Michigan', 'us'),
|
('US-MI', 'Michigan', 'us'),
|
||||||
('Minnesota', 'us'),
|
('US-MN', 'Minnesota', 'us'),
|
||||||
('Mississippi', 'us'),
|
('US-MS', 'Mississippi', 'us'),
|
||||||
('Missouri', 'us'),
|
('US-MO', 'Missouri', 'us'),
|
||||||
('Montana', 'us'),
|
('US-MT', 'Montana', 'us'),
|
||||||
('Nebraska', 'us'),
|
('US-NE', 'Nebraska', 'us'),
|
||||||
('Nevada', 'us'),
|
('US-NV', 'Nevada', 'us'),
|
||||||
('New Hampshire', 'us'),
|
('US-NH', 'New Hampshire', 'us'),
|
||||||
('New Jersey', 'us'),
|
('US-NJ', 'New Jersey', 'us'),
|
||||||
('New Mexico', 'us'),
|
('US-NM', 'New Mexico', 'us'),
|
||||||
('New York', 'us'),
|
('US-NY', 'New York', 'us'),
|
||||||
('North Carolina', 'us'),
|
('US-NC', 'North Carolina', 'us'),
|
||||||
('North Dakota', 'us'),
|
('US-ND', 'North Dakota', 'us'),
|
||||||
('Ohio', 'us'),
|
('US-OH', 'Ohio', 'us'),
|
||||||
('Oklahoma', 'us'),
|
('US-OK', 'Oklahoma', 'us'),
|
||||||
('Oregon', 'us'),
|
('US-OR', 'Oregon', 'us'),
|
||||||
('Pennsylvania', 'us'),
|
('US-PA', 'Pennsylvania', 'us'),
|
||||||
('Rhode Island', 'us'),
|
('US-RI', 'Rhode Island', 'us'),
|
||||||
('South Carolina', 'us'),
|
('US-SC', 'South Carolina', 'us'),
|
||||||
('South Dakota', 'us'),
|
('US-SD', 'South Dakota', 'us'),
|
||||||
('Tennessee', 'us'),
|
('US-TN', 'Tennessee', 'us'),
|
||||||
('Texas', 'us'),
|
('US-TX', 'Texas', 'us'),
|
||||||
('Utah', 'us'),
|
('US-UT', 'Utah', 'us'),
|
||||||
('Vermont', 'us'),
|
('US-VT', 'Vermont', 'us'),
|
||||||
('Virginia', 'us'),
|
('US-VA', 'Virginia', 'us'),
|
||||||
('Washington', 'us'),
|
('US-WA', 'Washington', 'us'),
|
||||||
('West Virginia', 'us'),
|
('US-WV', 'West Virginia', 'us'),
|
||||||
('Wisconsin', 'us'),
|
('US-WI', 'Wisconsin', 'us'),
|
||||||
('Wyoming', 'us')
|
('US-WY', 'Wyoming', 'us')
|
||||||
|
ON CONFLICT (id) DO NOTHING;
|
||||||
ON CONFLICT (name) DO NOTHING;
|
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
INSERT INTO "worldTravelCountryRegions" (name, country_code)
|
INSERT INTO "worldTravelCountryRegions" (id, name, country_code)
|
||||||
VALUES
|
VALUES
|
||||||
('Alberta', 'ca'),
|
('CA-AB', 'Alberta', 'ca'),
|
||||||
('British Columbia', 'ca'),
|
('CA-BC', 'British Columbia', 'ca'),
|
||||||
('Manitoba', 'ca'),
|
('CA-MB', 'Manitoba', 'ca'),
|
||||||
('New Brunswick', 'ca'),
|
('CA-NB', 'New Brunswick', 'ca'),
|
||||||
('Newfoundland and Labrador', 'ca'),
|
('CA-NL', 'Newfoundland and Labrador', 'ca'),
|
||||||
('Nova Scotia', 'ca'),
|
('CA-NS', 'Nova Scotia', 'ca'),
|
||||||
('Ontario', 'ca'),
|
('CA-ON', 'Ontario', 'ca'),
|
||||||
('Prince Edward Island', 'ca'),
|
('CA-PE', 'Prince Edward Island', 'ca'),
|
||||||
('Quebec', 'ca'),
|
('CA-QC', 'Quebec', 'ca'),
|
||||||
('Saskatchewan', 'ca'),
|
('CA-SK', 'Saskatchewan', 'ca'),
|
||||||
('Northwest Territories', 'ca'),
|
('CA-NT', 'Northwest Territories', 'ca'),
|
||||||
('Nunavut', 'ca'),
|
('CA-NU', 'Nunavut', 'ca'),
|
||||||
('Yukon', 'ca')
|
('CA-YT', 'Yukon', 'ca')
|
||||||
|
ON CONFLICT (id) DO NOTHING;
|
||||||
ON CONFLICT (name) DO NOTHING;
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
INSERT INTO "worldTravelCountryRegions" (name, country_code)
|
INSERT INTO "worldTravelCountryRegions" (id, name, country_code)
|
||||||
VALUES
|
VALUES
|
||||||
('Baden-Württemberg', 'de'),
|
('DE-BW', 'Baden-Württemberg', 'de'),
|
||||||
('Bavaria', 'de'),
|
('DE-BY', 'Bavaria', 'de'),
|
||||||
('Berlin', 'de'),
|
('DE-BE', 'Berlin', 'de'),
|
||||||
('Brandenburg', 'de'),
|
('DE-BB', 'Brandenburg', 'de'),
|
||||||
('Bremen', 'de'),
|
('DE-HB', 'Bremen', 'de'),
|
||||||
('Hamburg', 'de'),
|
('DE-HH', 'Hamburg', 'de'),
|
||||||
('Hesse', 'de'),
|
('DE-HE', 'Hesse', 'de'),
|
||||||
('Lower Saxony', 'de'),
|
('DE-NI', 'Lower Saxony', 'de'),
|
||||||
('Mecklenburg-Vorpommern', 'de'),
|
('DE-MV', 'Mecklenburg-Vorpommern', 'de'),
|
||||||
('North Rhine-Westphalia', 'de'),
|
('DE-NW', 'North Rhine-Westphalia', 'de'),
|
||||||
('Rhineland-Palatinate', 'de'),
|
('DE-RP', 'Rhineland-Palatinate', 'de'),
|
||||||
('Saarland', 'de'),
|
('DE-SL', 'Saarland', 'de'),
|
||||||
('Saxony', 'de'),
|
('DE-SN', 'Saxony', 'de'),
|
||||||
('Saxony-Anhalt', 'de'),
|
('DE-ST', 'Saxony-Anhalt', 'de'),
|
||||||
('Schleswig-Holstein', 'de'),
|
('DE-SH', 'Schleswig-Holstein', 'de'),
|
||||||
('Thuringia', 'de')
|
('DE-TH', 'Thuringia', 'de');
|
||||||
|
|
||||||
ON CONFLICT (name) DO NOTHING;
|
ON CONFLICT (id) DO NOTHING;
|
||||||
|
|
22
sql/005_fr.sql
Normal file
22
sql/005_fr.sql
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
INSERT INTO "worldTravelCountryRegions" (id, name, country_code)
|
||||||
|
VALUES
|
||||||
|
('FR-ARA', 'Auvergne-Rhône-Alpes', 'fr'),
|
||||||
|
('FR-BFC', 'Bourgogne-Franche-Comté', 'fr'),
|
||||||
|
('FR-BRE', 'Brittany', 'fr'),
|
||||||
|
('FR-CVL', 'Centre-Val de Loire', 'fr'),
|
||||||
|
('FR-GES', 'Grand Est', 'fr'),
|
||||||
|
('FR-HDF', 'Hauts-de-France', 'fr'),
|
||||||
|
('FR-IDF', 'Île-de-France', 'fr'),
|
||||||
|
('FR-NOR', 'Normandy', 'fr'),
|
||||||
|
('FR-NAQ', 'Nouvelle-Aquitaine', 'fr'),
|
||||||
|
('FR-OCC', 'Occitanie', 'fr'),
|
||||||
|
('FR-PDL', 'Pays de la Loire', 'fr'),
|
||||||
|
('FR-PAC', 'Provence-Alpes-Côte d''Azur', 'fr'),
|
||||||
|
('FR-COR', 'Corsica', 'fr'),
|
||||||
|
('FR-MQ', 'Martinique', 'fr'),
|
||||||
|
('FR-GF', 'French Guiana', 'fr'),
|
||||||
|
('FR-RÉ', 'Réunion', 'fr'),
|
||||||
|
('FR-YT', 'Mayotte', 'fr'),
|
||||||
|
('FR-GP', 'Guadeloupe', 'fr')
|
||||||
|
|
||||||
|
ON CONFLICT (id) DO NOTHING;
|
8
sql/006_gb.sql
Normal file
8
sql/006_gb.sql
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
INSERT INTO "worldTravelCountryRegions" (id, name, country_code)
|
||||||
|
VALUES
|
||||||
|
('GB-ENG', 'England', 'gb'),
|
||||||
|
('GB-NIR', 'Northern Ireland', 'gb'),
|
||||||
|
('GB-SCT', 'Scotland', 'gb'),
|
||||||
|
('GB-WLS', 'Wales', 'gb')
|
||||||
|
|
||||||
|
ON CONFLICT (id) DO NOTHING;
|
28
sql/007_ar.sql
Normal file
28
sql/007_ar.sql
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
INSERT INTO "worldTravelCountryRegions" (id, name, country_code)
|
||||||
|
VALUES
|
||||||
|
('AR-C', 'Ciudad Autónoma de Buenos Aires', 'ar'),
|
||||||
|
('AR-B', 'Buenos Aires', 'ar'),
|
||||||
|
('AR-K', 'Catamarca', 'ar'),
|
||||||
|
('AR-H', 'Chaco', 'ar'),
|
||||||
|
('AR-U', 'Chubut', 'ar'),
|
||||||
|
('AR-W', 'Córdoba', 'ar'),
|
||||||
|
('AR-X', 'Corrientes', 'ar'),
|
||||||
|
('AR-E', 'Entre Ríos', 'ar'),
|
||||||
|
('AR-P', 'Formosa', 'ar'),
|
||||||
|
('AR-Y', 'Jujuy', 'ar'),
|
||||||
|
('AR-L', 'La Pampa', 'ar'),
|
||||||
|
('AR-F', 'La Rioja', 'ar'),
|
||||||
|
('AR-M', 'Mendoza', 'ar'),
|
||||||
|
('AR-N', 'Misiones', 'ar'),
|
||||||
|
('AR-Q', 'Neuquén', 'ar'),
|
||||||
|
('AR-R', 'Río Negro', 'ar'),
|
||||||
|
('AR-A', 'Salta', 'ar'),
|
||||||
|
('AR-J', 'San Juan', 'ar'),
|
||||||
|
('AR-D', 'San Luis', 'ar'),
|
||||||
|
('AR-Z', 'Santa Cruz', 'ar'),
|
||||||
|
('AR-S', 'Santa Fe', 'ar'),
|
||||||
|
('AR-G', 'Santiago del Estero', 'ar'),
|
||||||
|
('AR-V', 'Tierra del Fuego', 'ar'),
|
||||||
|
('AR-T', 'Tucumán', 'ar')
|
||||||
|
|
||||||
|
ON CONFLICT (id) DO NOTHING;
|
35
sql/008_mx.sql
Normal file
35
sql/008_mx.sql
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
INSERT INTO "worldTravelCountryRegions" (id, name, country_code)
|
||||||
|
VALUES
|
||||||
|
('MX-AGU', 'Aguascalientes', 'mx'),
|
||||||
|
('MX-BCN', 'Baja California', 'mx'),
|
||||||
|
('MX-BCS', 'Baja California Sur', 'mx'),
|
||||||
|
('MX-CAM', 'Campeche', 'mx'),
|
||||||
|
('MX-CHP', 'Chiapas', 'mx'),
|
||||||
|
('MX-CHH', 'Chihuahua', 'mx'),
|
||||||
|
('MX-COA', 'Coahuila', 'mx'),
|
||||||
|
('MX-COL', 'Colima', 'mx'),
|
||||||
|
('MX-DUR', 'Durango', 'mx'),
|
||||||
|
('MX-GUA', 'Guanajuato', 'mx'),
|
||||||
|
('MX-GRO', 'Guerrero', 'mx'),
|
||||||
|
('MX-HID', 'Hidalgo', 'mx'),
|
||||||
|
('MX-JAL', 'Jalisco', 'mx'),
|
||||||
|
('MX-MEX', 'State of Mexico', 'mx'),
|
||||||
|
('MX-MIC', 'Michoacán', 'mx'),
|
||||||
|
('MX-MOR', 'Morelos', 'mx'),
|
||||||
|
('MX-NAY', 'Nayarit', 'mx'),
|
||||||
|
('MX-NLE', 'Nuevo León', 'mx'),
|
||||||
|
('MX-OAX', 'Oaxaca', 'mx'),
|
||||||
|
('MX-PUE', 'Puebla', 'mx'),
|
||||||
|
('MX-QUE', 'Querétaro', 'mx'),
|
||||||
|
('MX-ROO', 'Quintana Roo', 'mx'),
|
||||||
|
('MX-SLP', 'San Luis Potosí', 'mx'),
|
||||||
|
('MX-SIN', 'Sinaloa', 'mx'),
|
||||||
|
('MX-SON', 'Sonora', 'mx'),
|
||||||
|
('MX-TAB', 'Tabasco', 'mx'),
|
||||||
|
('MX-TAM', 'Tamaulipas', 'mx'),
|
||||||
|
('MX-TLA', 'Tlaxcala', 'mx'),
|
||||||
|
('MX-VER', 'Veracruz', 'mx'),
|
||||||
|
('MX-YUC', 'Yucatán', 'mx'),
|
||||||
|
('MX-ZAC', 'Zacatecas', 'mx')
|
||||||
|
|
||||||
|
ON CONFLICT (id) DO NOTHING;
|
51
sql/009_jp.sql
Normal file
51
sql/009_jp.sql
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
INSERT INTO "worldTravelCountryRegions" (id, name, country_code)
|
||||||
|
VALUES
|
||||||
|
('JP-01', 'Hokkaido', 'jp'),
|
||||||
|
('JP-02', 'Aomori', 'jp'),
|
||||||
|
('JP-03', 'Iwate', 'jp'),
|
||||||
|
('JP-04', 'Miyagi', 'jp'),
|
||||||
|
('JP-05', 'Akita', 'jp'),
|
||||||
|
('JP-06', 'Yamagata', 'jp'),
|
||||||
|
('JP-07', 'Fukushima', 'jp'),
|
||||||
|
('JP-08', 'Ibaraki', 'jp'),
|
||||||
|
('JP-09', 'Tochigi', 'jp'),
|
||||||
|
('JP-10', 'Gunma', 'jp'),
|
||||||
|
('JP-11', 'Saitama', 'jp'),
|
||||||
|
('JP-12', 'Chiba', 'jp'),
|
||||||
|
('JP-13', 'Tokyo', 'jp'),
|
||||||
|
('JP-14', 'Kanagawa', 'jp'),
|
||||||
|
('JP-15', 'Niigata', 'jp'),
|
||||||
|
('JP-16', 'Toyama', 'jp'),
|
||||||
|
('JP-17', 'Ishikawa', 'jp'),
|
||||||
|
('JP-18', 'Fukui', 'jp'),
|
||||||
|
('JP-19', 'Yamanashi', 'jp'),
|
||||||
|
('JP-20', 'Nagano', 'jp'),
|
||||||
|
('JP-21', 'Gifu', 'jp'),
|
||||||
|
('JP-22', 'Shizuoka', 'jp'),
|
||||||
|
('JP-23', 'Aichi', 'jp'),
|
||||||
|
('JP-24', 'Mie', 'jp'),
|
||||||
|
('JP-25', 'Shiga', 'jp'),
|
||||||
|
('JP-26', 'Kyoto', 'jp'),
|
||||||
|
('JP-27', 'Osaka', 'jp'),
|
||||||
|
('JP-28', 'Hyogo', 'jp'),
|
||||||
|
('JP-29', 'Nara', 'jp'),
|
||||||
|
('JP-30', 'Wakayama', 'jp'),
|
||||||
|
('JP-31', 'Tottori', 'jp'),
|
||||||
|
('JP-32', 'Shimane', 'jp'),
|
||||||
|
('JP-33', 'Okayama', 'jp'),
|
||||||
|
('JP-34', 'Hiroshima', 'jp'),
|
||||||
|
('JP-35', 'Yamaguchi', 'jp'),
|
||||||
|
('JP-36', 'Tokushima', 'jp'),
|
||||||
|
('JP-37', 'Kagawa', 'jp'),
|
||||||
|
('JP-38', 'Ehime', 'jp'),
|
||||||
|
('JP-39', 'Kochi', 'jp'),
|
||||||
|
('JP-40', 'Fukuoka', 'jp'),
|
||||||
|
('JP-41', 'Saga', 'jp'),
|
||||||
|
('JP-42', 'Nagasaki', 'jp'),
|
||||||
|
('JP-43', 'Kumamoto', 'jp'),
|
||||||
|
('JP-44', 'Oita', 'jp'),
|
||||||
|
('JP-45', 'Miyazaki', 'jp'),
|
||||||
|
('JP-46', 'Kagoshima', 'jp'),
|
||||||
|
('JP-47', 'Okinawa', 'jp')
|
||||||
|
|
||||||
|
ON CONFLICT (id) DO NOTHING;
|
|
@ -5,7 +5,6 @@ import {
|
||||||
json,
|
json,
|
||||||
serial,
|
serial,
|
||||||
varchar,
|
varchar,
|
||||||
foreignKey,
|
|
||||||
integer,
|
integer,
|
||||||
} from "drizzle-orm/pg-core";
|
} from "drizzle-orm/pg-core";
|
||||||
|
|
||||||
|
@ -62,7 +61,7 @@ export const worldTravelCountries = pgTable("worldTravelCountries", {
|
||||||
});
|
});
|
||||||
|
|
||||||
export const worldTravelCountryRegions = pgTable("worldTravelCountryRegions", {
|
export const worldTravelCountryRegions = pgTable("worldTravelCountryRegions", {
|
||||||
id: serial("id").primaryKey(),
|
id: varchar("id").primaryKey().unique(),
|
||||||
name: text("name").notNull().unique(),
|
name: text("name").notNull().unique(),
|
||||||
country_code: text("country_code")
|
country_code: text("country_code")
|
||||||
.notNull()
|
.notNull()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue