diff --git a/migrations/0008_open_forgotten_one.sql b/migrations/0008_open_forgotten_one.sql
new file mode 100644
index 0000000..8d020da
--- /dev/null
+++ b/migrations/0008_open_forgotten_one.sql
@@ -0,0 +1,18 @@
+CREATE TABLE IF NOT EXISTS "adventures" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "userId" text NOT NULL,
+ "adventureName" text NOT NULL,
+ "location" text,
+ "activityTypes" json,
+ "description" text,
+ "rating" integer,
+ "link" text,
+ "imageUrl" text,
+ "date" text
+);
+--> statement-breakpoint
+DO $$ BEGIN
+ ALTER TABLE "adventures" ADD CONSTRAINT "adventures_userId_user_id_fk" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE no action ON UPDATE no action;
+EXCEPTION
+ WHEN duplicate_object THEN null;
+END $$;
diff --git a/migrations/0009_clammy_meteorite.sql b/migrations/0009_clammy_meteorite.sql
new file mode 100644
index 0000000..9ba6b21
--- /dev/null
+++ b/migrations/0009_clammy_meteorite.sql
@@ -0,0 +1 @@
+ALTER TABLE "adventures" RENAME COLUMN "adventureName" TO "name";
\ No newline at end of file
diff --git a/migrations/0010_dazzling_morbius.sql b/migrations/0010_dazzling_morbius.sql
new file mode 100644
index 0000000..e49b9b0
--- /dev/null
+++ b/migrations/0010_dazzling_morbius.sql
@@ -0,0 +1 @@
+ALTER TABLE "userPlannedAdventures" ALTER COLUMN "userId" DROP NOT NULL;
\ No newline at end of file
diff --git a/migrations/0011_bizarre_silver_samurai.sql b/migrations/0011_bizarre_silver_samurai.sql
new file mode 100644
index 0000000..313722a
--- /dev/null
+++ b/migrations/0011_bizarre_silver_samurai.sql
@@ -0,0 +1 @@
+ALTER TABLE "userPlannedAdventures" ALTER COLUMN "userId" SET NOT NULL;
\ No newline at end of file
diff --git a/migrations/meta/0008_snapshot.json b/migrations/meta/0008_snapshot.json
new file mode 100644
index 0000000..3b1af89
--- /dev/null
+++ b/migrations/meta/0008_snapshot.json
@@ -0,0 +1,559 @@
+{
+ "id": "4ef5cc7c-16cb-44d1-8a35-9989fbae87b2",
+ "prevId": "2dd5d59b-9e77-4a7a-9287-65e6b2456eab",
+ "version": "5",
+ "dialect": "pg",
+ "tables": {
+ "adventures": {
+ "name": "adventures",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "adventureName": {
+ "name": "adventureName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "location": {
+ "name": "location",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "activityTypes": {
+ "name": "activityTypes",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rating": {
+ "name": "rating",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link": {
+ "name": "link",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "imageUrl": {
+ "name": "imageUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date": {
+ "name": "date",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "adventures_userId_user_id_fk": {
+ "name": "adventures_userId_user_id_fk",
+ "tableFrom": "adventures",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {}
+ },
+ "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": {}
+ },
+ "userPlannedAdventures": {
+ "name": "userPlannedAdventures",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "adventureName": {
+ "name": "adventureName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "location": {
+ "name": "location",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "activityTypes": {
+ "name": "activityTypes",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "plannedDate": {
+ "name": "plannedDate",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "userPlannedAdventures_userId_user_id_fk": {
+ "name": "userPlannedAdventures_userId_user_id_fk",
+ "tableFrom": "userPlannedAdventures",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "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
+ },
+ "signup_date": {
+ "name": "signup_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_login": {
+ "name": "last_login",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "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": {}
+ },
+ "userVisitedWorldTravel": {
+ "name": "userVisitedWorldTravel",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "country_code": {
+ "name": "country_code",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "region_id": {
+ "name": "region_id",
+ "type": "varchar",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "userVisitedWorldTravel_country_code_worldTravelCountries_country_code_fk": {
+ "name": "userVisitedWorldTravel_country_code_worldTravelCountries_country_code_fk",
+ "tableFrom": "userVisitedWorldTravel",
+ "tableTo": "worldTravelCountries",
+ "columnsFrom": [
+ "country_code"
+ ],
+ "columnsTo": [
+ "country_code"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "userVisitedWorldTravel_user_id_user_id_fk": {
+ "name": "userVisitedWorldTravel_user_id_user_id_fk",
+ "tableFrom": "userVisitedWorldTravel",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "userVisitedWorldTravel_region_id_worldTravelCountryRegions_id_fk": {
+ "name": "userVisitedWorldTravel_region_id_worldTravelCountryRegions_id_fk",
+ "tableFrom": "userVisitedWorldTravel",
+ "tableTo": "worldTravelCountryRegions",
+ "columnsFrom": [
+ "region_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
+ },
+ "info": {
+ "name": "info",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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": {}
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/migrations/meta/0009_snapshot.json b/migrations/meta/0009_snapshot.json
new file mode 100644
index 0000000..2b780c0
--- /dev/null
+++ b/migrations/meta/0009_snapshot.json
@@ -0,0 +1,559 @@
+{
+ "id": "e79b9053-4a84-4d6f-b6ac-b28a12a2edb8",
+ "prevId": "4ef5cc7c-16cb-44d1-8a35-9989fbae87b2",
+ "version": "5",
+ "dialect": "pg",
+ "tables": {
+ "adventures": {
+ "name": "adventures",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "location": {
+ "name": "location",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "activityTypes": {
+ "name": "activityTypes",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rating": {
+ "name": "rating",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link": {
+ "name": "link",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "imageUrl": {
+ "name": "imageUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date": {
+ "name": "date",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "adventures_userId_user_id_fk": {
+ "name": "adventures_userId_user_id_fk",
+ "tableFrom": "adventures",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {}
+ },
+ "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": {}
+ },
+ "userPlannedAdventures": {
+ "name": "userPlannedAdventures",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "adventureName": {
+ "name": "adventureName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "location": {
+ "name": "location",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "activityTypes": {
+ "name": "activityTypes",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "plannedDate": {
+ "name": "plannedDate",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "userPlannedAdventures_userId_user_id_fk": {
+ "name": "userPlannedAdventures_userId_user_id_fk",
+ "tableFrom": "userPlannedAdventures",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "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
+ },
+ "signup_date": {
+ "name": "signup_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_login": {
+ "name": "last_login",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "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": {}
+ },
+ "userVisitedWorldTravel": {
+ "name": "userVisitedWorldTravel",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "country_code": {
+ "name": "country_code",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "region_id": {
+ "name": "region_id",
+ "type": "varchar",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "userVisitedWorldTravel_country_code_worldTravelCountries_country_code_fk": {
+ "name": "userVisitedWorldTravel_country_code_worldTravelCountries_country_code_fk",
+ "tableFrom": "userVisitedWorldTravel",
+ "tableTo": "worldTravelCountries",
+ "columnsFrom": [
+ "country_code"
+ ],
+ "columnsTo": [
+ "country_code"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "userVisitedWorldTravel_user_id_user_id_fk": {
+ "name": "userVisitedWorldTravel_user_id_user_id_fk",
+ "tableFrom": "userVisitedWorldTravel",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "userVisitedWorldTravel_region_id_worldTravelCountryRegions_id_fk": {
+ "name": "userVisitedWorldTravel_region_id_worldTravelCountryRegions_id_fk",
+ "tableFrom": "userVisitedWorldTravel",
+ "tableTo": "worldTravelCountryRegions",
+ "columnsFrom": [
+ "region_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
+ },
+ "info": {
+ "name": "info",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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": {}
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/migrations/meta/0010_snapshot.json b/migrations/meta/0010_snapshot.json
new file mode 100644
index 0000000..c63b3cc
--- /dev/null
+++ b/migrations/meta/0010_snapshot.json
@@ -0,0 +1,559 @@
+{
+ "id": "a826933a-d744-4ac7-8858-43be4f4fd078",
+ "prevId": "e79b9053-4a84-4d6f-b6ac-b28a12a2edb8",
+ "version": "5",
+ "dialect": "pg",
+ "tables": {
+ "adventures": {
+ "name": "adventures",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "location": {
+ "name": "location",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "activityTypes": {
+ "name": "activityTypes",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rating": {
+ "name": "rating",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link": {
+ "name": "link",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "imageUrl": {
+ "name": "imageUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date": {
+ "name": "date",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "adventures_userId_user_id_fk": {
+ "name": "adventures_userId_user_id_fk",
+ "tableFrom": "adventures",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {}
+ },
+ "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": {}
+ },
+ "userPlannedAdventures": {
+ "name": "userPlannedAdventures",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "adventureName": {
+ "name": "adventureName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "location": {
+ "name": "location",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "activityTypes": {
+ "name": "activityTypes",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "plannedDate": {
+ "name": "plannedDate",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "userPlannedAdventures_userId_user_id_fk": {
+ "name": "userPlannedAdventures_userId_user_id_fk",
+ "tableFrom": "userPlannedAdventures",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "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
+ },
+ "signup_date": {
+ "name": "signup_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_login": {
+ "name": "last_login",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "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": {}
+ },
+ "userVisitedWorldTravel": {
+ "name": "userVisitedWorldTravel",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "country_code": {
+ "name": "country_code",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "region_id": {
+ "name": "region_id",
+ "type": "varchar",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "userVisitedWorldTravel_country_code_worldTravelCountries_country_code_fk": {
+ "name": "userVisitedWorldTravel_country_code_worldTravelCountries_country_code_fk",
+ "tableFrom": "userVisitedWorldTravel",
+ "tableTo": "worldTravelCountries",
+ "columnsFrom": [
+ "country_code"
+ ],
+ "columnsTo": [
+ "country_code"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "userVisitedWorldTravel_user_id_user_id_fk": {
+ "name": "userVisitedWorldTravel_user_id_user_id_fk",
+ "tableFrom": "userVisitedWorldTravel",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "userVisitedWorldTravel_region_id_worldTravelCountryRegions_id_fk": {
+ "name": "userVisitedWorldTravel_region_id_worldTravelCountryRegions_id_fk",
+ "tableFrom": "userVisitedWorldTravel",
+ "tableTo": "worldTravelCountryRegions",
+ "columnsFrom": [
+ "region_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
+ },
+ "info": {
+ "name": "info",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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": {}
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/migrations/meta/0011_snapshot.json b/migrations/meta/0011_snapshot.json
new file mode 100644
index 0000000..3d17ff8
--- /dev/null
+++ b/migrations/meta/0011_snapshot.json
@@ -0,0 +1,559 @@
+{
+ "id": "d1a58675-3daf-43e2-a9a1-c56767fc3d0e",
+ "prevId": "a826933a-d744-4ac7-8858-43be4f4fd078",
+ "version": "5",
+ "dialect": "pg",
+ "tables": {
+ "adventures": {
+ "name": "adventures",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "location": {
+ "name": "location",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "activityTypes": {
+ "name": "activityTypes",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rating": {
+ "name": "rating",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link": {
+ "name": "link",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "imageUrl": {
+ "name": "imageUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date": {
+ "name": "date",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "adventures_userId_user_id_fk": {
+ "name": "adventures_userId_user_id_fk",
+ "tableFrom": "adventures",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {}
+ },
+ "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": {}
+ },
+ "userPlannedAdventures": {
+ "name": "userPlannedAdventures",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "adventureName": {
+ "name": "adventureName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "location": {
+ "name": "location",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "activityTypes": {
+ "name": "activityTypes",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "plannedDate": {
+ "name": "plannedDate",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "userPlannedAdventures_userId_user_id_fk": {
+ "name": "userPlannedAdventures_userId_user_id_fk",
+ "tableFrom": "userPlannedAdventures",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "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
+ },
+ "signup_date": {
+ "name": "signup_date",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_login": {
+ "name": "last_login",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "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": {}
+ },
+ "userVisitedWorldTravel": {
+ "name": "userVisitedWorldTravel",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "country_code": {
+ "name": "country_code",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "region_id": {
+ "name": "region_id",
+ "type": "varchar",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "userVisitedWorldTravel_country_code_worldTravelCountries_country_code_fk": {
+ "name": "userVisitedWorldTravel_country_code_worldTravelCountries_country_code_fk",
+ "tableFrom": "userVisitedWorldTravel",
+ "tableTo": "worldTravelCountries",
+ "columnsFrom": [
+ "country_code"
+ ],
+ "columnsTo": [
+ "country_code"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "userVisitedWorldTravel_user_id_user_id_fk": {
+ "name": "userVisitedWorldTravel_user_id_user_id_fk",
+ "tableFrom": "userVisitedWorldTravel",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "userVisitedWorldTravel_region_id_worldTravelCountryRegions_id_fk": {
+ "name": "userVisitedWorldTravel_region_id_worldTravelCountryRegions_id_fk",
+ "tableFrom": "userVisitedWorldTravel",
+ "tableTo": "worldTravelCountryRegions",
+ "columnsFrom": [
+ "region_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
+ },
+ "info": {
+ "name": "info",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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": {}
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/migrations/meta/_journal.json b/migrations/meta/_journal.json
index e2109e8..cbf0339 100644
--- a/migrations/meta/_journal.json
+++ b/migrations/meta/_journal.json
@@ -57,6 +57,34 @@
"when": 1713739446962,
"tag": "0007_clear_sinister_six",
"breakpoints": true
+ },
+ {
+ "idx": 8,
+ "version": "5",
+ "when": 1713746555380,
+ "tag": "0008_open_forgotten_one",
+ "breakpoints": true
+ },
+ {
+ "idx": 9,
+ "version": "5",
+ "when": 1713746620778,
+ "tag": "0009_clammy_meteorite",
+ "breakpoints": true
+ },
+ {
+ "idx": 10,
+ "version": "5",
+ "when": 1713746685965,
+ "tag": "0010_dazzling_morbius",
+ "breakpoints": true
+ },
+ {
+ "idx": 11,
+ "version": "5",
+ "when": 1713746739294,
+ "tag": "0011_bizarre_silver_samurai",
+ "breakpoints": true
}
]
}
\ No newline at end of file
diff --git a/sql/parks.sql b/sql/parks.sql
index b8697f4..0afcd4e 100644
--- a/sql/parks.sql
+++ b/sql/parks.sql
@@ -1,15 +1,15 @@
-INSERT INTO "featuredAdventures" (name, location) VALUES
- ('Yellowstone National Park', 'Wyoming, Montana, Idaho, USA'),
- ('Yosemite National Park', 'California, USA'),
- ('Banff National Park', 'Alberta, Canada'),
- ('Kruger National Park', 'Limpopo, South Africa'),
- ('Grand Canyon National Park', 'Arizona, USA'),
- ('Great Smoky Mountains National Park', 'North Carolina, Tennessee, USA'),
- ('Zion National Park', 'Utah, USA'),
- ('Glacier National Park', 'Montana, USA'),
- ('Rocky Mountain National Park', 'Colorado, USA'),
- ('Everglades National Park', 'Florida, USA'),
- ('Arches National Park', 'Utah, USA'),
- ('Acadia National Park', 'Maine, USA'),
- ('Sequoia National Park', 'California, USA')
-ON CONFLICT (name) DO NOTHING;
\ No newline at end of file
+-- INSERT INTO "adventures" (name, location) VALUES
+-- ('Yellowstone National Park', 'Wyoming, Montana, Idaho, USA'),
+-- ('Yosemite National Park', 'California, USA'),
+-- ('Banff National Park', 'Alberta, Canada'),
+-- ('Kruger National Park', 'Limpopo, South Africa'),
+-- ('Grand Canyon National Park', 'Arizona, USA'),
+-- ('Great Smoky Mountains National Park', 'North Carolina, Tennessee, USA'),
+-- ('Zion National Park', 'Utah, USA'),
+-- ('Glacier National Park', 'Montana, USA'),
+-- ('Rocky Mountain National Park', 'Colorado, USA'),
+-- ('Everglades National Park', 'Florida, USA'),
+-- ('Arches National Park', 'Utah, USA'),
+-- ('Acadia National Park', 'Maine, USA'),
+-- ('Sequoia National Park', 'California, USA')
+-- ON CONFLICT (name) DO NOTHING;
\ No newline at end of file
diff --git a/src/lib/db/schema.ts b/src/lib/db/schema.ts
index 4d77090..99fc714 100644
--- a/src/lib/db/schema.ts
+++ b/src/lib/db/schema.ts
@@ -103,3 +103,19 @@ export const userPlannedAdventures = pgTable("userPlannedAdventures", {
description: text("description"),
date: text("plannedDate"),
});
+
+export const adventureTable = pgTable("adventures", {
+ id: serial("id").primaryKey(),
+ type: text("type").notNull(),
+ userId: text("userId")
+ .notNull()
+ .references(() => userTable.id),
+ name: text("name").notNull(),
+ location: text("location"),
+ activityTypes: json("activityTypes"),
+ description: text("description"),
+ rating: integer("rating"),
+ link: text("link"),
+ imageUrl: text("imageUrl"),
+ date: text("date"),
+});
diff --git a/src/lib/utils/types.ts b/src/lib/utils/types.ts
index 824a53c..831c609 100644
--- a/src/lib/utils/types.ts
+++ b/src/lib/utils/types.ts
@@ -1,41 +1,12 @@
export interface Adventure {
- id?: number;
- name?: string;
- location?: string | undefined;
- date?: string | undefined;
- description?: string | undefined;
- activityTypes?: string[] | undefined;
-}
-
-export interface RegionInfo {
+ id: number;
+ type: string;
name: string;
- abbreviation: string;
- description: string;
- capital: string;
- largest_city: string;
- area: {
- total: number;
- units: string;
- };
- population: {
- estimate: number;
- year: number;
- };
- state_flower: string;
- state_bird: string;
- state_tree: string;
- climate: {
- description: string;
- summer_highs: string;
- winter_lows: string;
- precipitation: string;
- };
- economy: {
- industries: string[];
- agricultural_products: string[];
- };
- tourism: {
- attractions: string[];
- };
- major_sports_teams: string[];
+ location?: string | undefined;
+ activityTypes?: string[] | undefined;
+ description?: string | undefined;
+ rating?: number | undefined;
+ link?: string | undefined;
+ imageUrl?: string | undefined;
+ date?: string | undefined;
}
diff --git a/src/routes/setup/+page.svelte b/src/routes/setup/+page.svelte
index 5fc47db..b0d5be5 100644
--- a/src/routes/setup/+page.svelte
+++ b/src/routes/setup/+page.svelte
@@ -39,7 +39,7 @@
id="password"
class="block mb-2 input input-bordered w-full max-w-xs"
/>
-
+