From 9e4fd2dd10a58304f78f5c63268f1674bf2de0d7 Mon Sep 17 00:00:00 2001 From: Maurici Abad Gutierrez Date: Mon, 8 Apr 2024 01:08:15 +0200 Subject: [PATCH] Migrate from Planetscale to Neon (Part 1) (#267) * Update drizzle * Most part of it * Add prepared statements names' * Remove insertId * captureDate is timestamp * Add missing hashedPassword * Fix CustomAdapter type * better error * Merge drizzle files * Fix amountOfPeopleEnum * WTF * Nulls last * Fix with translations * type placeholders * SKIP_ENV_VALIDATION * remove random hola * update migration ci * Update readme * more rm * uppercasse * cfjghvj * argvfd * ef --- .env.example | 10 +- .../workflows/comment-if-db-migrations.yaml | 9 +- README.md | 24 +- drizzle.config.ts | 31 +- drizzle/0000_mute_harrier.sql | 43 - drizzle/0000_previous_ozymandias.sql | 217 ++ drizzle/0001_friendly_yellowjacket.sql | 4 - drizzle/0002_productive_thunderbolt.sql | 1 - drizzle/0003_colorful_fat_cobra.sql | 1 - drizzle/0004_curvy_colleen_wing.sql | 7 - drizzle/0005_daily_sersi.sql | 1 - drizzle/0006_orange_morbius.sql | 27 - drizzle/0007_nifty_shinko_yamashiro.sql | 1 - drizzle/0008_military_punisher.sql | 31 - drizzle/0009_blue_selene.sql | 1 - drizzle/0010_fixed_mongoose.sql | 14 - drizzle/0011_dapper_la_nuit.sql | 18 - drizzle/0012_sad_wilson_fisk.sql | 9 - drizzle/0013_pretty_magma.sql | 11 - drizzle/0014_white_shatterstar.sql | 1 - drizzle/0015_even_zuras.sql | 10 - drizzle/0016_robust_goliath.sql | 1 - drizzle/0017_tricky_hellfire_club.sql | 1 - drizzle/0018_blushing_daimon_hellstrom.sql | 1 - drizzle/0019_warm_zaladane.sql | 55 - drizzle/0020_lyrical_white_queen.sql | 9 - drizzle/0021_brainy_tyrannus.sql | 3 - drizzle/0022_purple_scarlet_witch.sql | 20 - drizzle/0023_melodic_dragon_man.sql | 16 - drizzle/0024_confused_the_liberteens.sql | 2 - drizzle/0025_quiet_stark_industries.sql | 1 - drizzle/0026_thick_ben_parker.sql | 24 - drizzle/0027_lonely_goliath.sql | 1 - drizzle/meta/0000_snapshot.json | 1653 +++++++++++++-- drizzle/meta/0001_snapshot.json | 279 --- drizzle/meta/0002_snapshot.json | 278 --- drizzle/meta/0003_snapshot.json | 285 --- drizzle/meta/0004_snapshot.json | 329 --- drizzle/meta/0005_snapshot.json | 336 --- drizzle/meta/0006_snapshot.json | 491 ----- drizzle/meta/0007_snapshot.json | 490 ----- drizzle/meta/0008_snapshot.json | 683 ------ drizzle/meta/0009_snapshot.json | 691 ------- drizzle/meta/0010_snapshot.json | 767 ------- drizzle/meta/0011_snapshot.json | 871 -------- drizzle/meta/0012_snapshot.json | 879 -------- drizzle/meta/0013_snapshot.json | 930 --------- drizzle/meta/0014_snapshot.json | 937 --------- drizzle/meta/0015_snapshot.json | 1000 --------- drizzle/meta/0016_snapshot.json | 1007 --------- drizzle/meta/0017_snapshot.json | 1014 --------- drizzle/meta/0018_snapshot.json | 1014 --------- drizzle/meta/0019_snapshot.json | 1337 ------------ drizzle/meta/0020_snapshot.json | 1400 ------------- drizzle/meta/0021_snapshot.json | 1421 ------------- drizzle/meta/0022_snapshot.json | 1561 -------------- drizzle/meta/0023_snapshot.json | 1656 --------------- drizzle/meta/0024_snapshot.json | 1670 --------------- drizzle/meta/0025_snapshot.json | 1677 --------------- drizzle/meta/0026_snapshot.json | 1817 ---------------- drizzle/meta/0027_snapshot.json | 1824 ----------------- drizzle/meta/_journal.json | 195 +- package.json | 12 +- pnpm-lock.yaml | 144 +- src/app/api/upload/place-image/route.ts | 24 +- src/env.mjs | 23 +- src/server/api/router/admin/images.ts | 11 +- src/server/api/router/admin/places.ts | 74 +- src/server/api/router/admin/routes.ts | 70 +- src/server/api/router/explore.ts | 4 +- src/server/api/router/map.ts | 4 +- src/server/api/router/metadata.ts | 10 +- src/server/api/router/missions.ts | 24 +- src/server/api/router/placeLists.ts | 20 +- src/server/api/router/places.ts | 9 +- src/server/api/router/routes.ts | 7 +- src/server/api/router/search.ts | 28 +- .../db/constants/features-display-data.ts | 5 +- src/server/db/constants/features.ts | 86 - src/server/db/db.ts | 35 +- src/server/db/migrate.mjs | 18 +- src/server/db/schema/auth.ts | 47 +- src/server/db/schema/externalLinks.ts | 12 +- src/server/db/schema/features.ts | 157 +- src/server/db/schema/images.ts | 19 +- src/server/db/schema/index.ts | 1 + src/server/db/schema/placeCategories.ts | 24 +- src/server/db/schema/placeCategoryGroups.ts | 22 +- src/server/db/schema/placeLists.ts | 14 +- src/server/db/schema/places.ts | 18 +- src/server/db/schema/routeCategories.ts | 24 +- src/server/db/schema/routes.ts | 31 +- src/server/db/schema/users.ts | 24 +- src/server/db/schema/utils.ts | 3 + .../db/schema/verificationRequirements.ts | 6 +- src/server/db/schema/verifications.ts | 8 +- src/server/db/utilities.ts | 13 +- src/server/helpers/auth/custom-adapter.ts | 172 +- src/server/helpers/auth/initialize-user.ts | 46 +- src/server/helpers/db-queries/placeLists.ts | 12 +- src/server/helpers/order-by.ts | 14 +- src/server/helpers/spatial-data/multi-line.ts | 6 +- src/server/helpers/spatial-data/point.ts | 6 +- src/server/helpers/translations/db-tables.ts | 23 +- .../translations/query/with-translations.ts | 4 +- src/server/helpers/translations/select.ts | 4 +- 106 files changed, 2400 insertions(+), 28015 deletions(-) delete mode 100644 drizzle/0000_mute_harrier.sql create mode 100644 drizzle/0000_previous_ozymandias.sql delete mode 100644 drizzle/0001_friendly_yellowjacket.sql delete mode 100644 drizzle/0002_productive_thunderbolt.sql delete mode 100644 drizzle/0003_colorful_fat_cobra.sql delete mode 100644 drizzle/0004_curvy_colleen_wing.sql delete mode 100644 drizzle/0005_daily_sersi.sql delete mode 100644 drizzle/0006_orange_morbius.sql delete mode 100644 drizzle/0007_nifty_shinko_yamashiro.sql delete mode 100644 drizzle/0008_military_punisher.sql delete mode 100644 drizzle/0009_blue_selene.sql delete mode 100644 drizzle/0010_fixed_mongoose.sql delete mode 100644 drizzle/0011_dapper_la_nuit.sql delete mode 100644 drizzle/0012_sad_wilson_fisk.sql delete mode 100644 drizzle/0013_pretty_magma.sql delete mode 100644 drizzle/0014_white_shatterstar.sql delete mode 100644 drizzle/0015_even_zuras.sql delete mode 100644 drizzle/0016_robust_goliath.sql delete mode 100644 drizzle/0017_tricky_hellfire_club.sql delete mode 100644 drizzle/0018_blushing_daimon_hellstrom.sql delete mode 100644 drizzle/0019_warm_zaladane.sql delete mode 100644 drizzle/0020_lyrical_white_queen.sql delete mode 100644 drizzle/0021_brainy_tyrannus.sql delete mode 100644 drizzle/0022_purple_scarlet_witch.sql delete mode 100644 drizzle/0023_melodic_dragon_man.sql delete mode 100644 drizzle/0024_confused_the_liberteens.sql delete mode 100644 drizzle/0025_quiet_stark_industries.sql delete mode 100644 drizzle/0026_thick_ben_parker.sql delete mode 100644 drizzle/0027_lonely_goliath.sql delete mode 100644 drizzle/meta/0001_snapshot.json delete mode 100644 drizzle/meta/0002_snapshot.json delete mode 100644 drizzle/meta/0003_snapshot.json delete mode 100644 drizzle/meta/0004_snapshot.json delete mode 100644 drizzle/meta/0005_snapshot.json delete mode 100644 drizzle/meta/0006_snapshot.json delete mode 100644 drizzle/meta/0007_snapshot.json delete mode 100644 drizzle/meta/0008_snapshot.json delete mode 100644 drizzle/meta/0009_snapshot.json delete mode 100644 drizzle/meta/0010_snapshot.json delete mode 100644 drizzle/meta/0011_snapshot.json delete mode 100644 drizzle/meta/0012_snapshot.json delete mode 100644 drizzle/meta/0013_snapshot.json delete mode 100644 drizzle/meta/0014_snapshot.json delete mode 100644 drizzle/meta/0015_snapshot.json delete mode 100644 drizzle/meta/0016_snapshot.json delete mode 100644 drizzle/meta/0017_snapshot.json delete mode 100644 drizzle/meta/0018_snapshot.json delete mode 100644 drizzle/meta/0019_snapshot.json delete mode 100644 drizzle/meta/0020_snapshot.json delete mode 100644 drizzle/meta/0021_snapshot.json delete mode 100644 drizzle/meta/0022_snapshot.json delete mode 100644 drizzle/meta/0023_snapshot.json delete mode 100644 drizzle/meta/0024_snapshot.json delete mode 100644 drizzle/meta/0025_snapshot.json delete mode 100644 drizzle/meta/0026_snapshot.json delete mode 100644 drizzle/meta/0027_snapshot.json create mode 100644 src/server/db/schema/utils.ts diff --git a/.env.example b/.env.example index 10529b9d..d4f523e5 100644 --- a/.env.example +++ b/.env.example @@ -8,13 +8,9 @@ GOOGLE_CLIENT_SECRET=toBeChanged BASE_URL=http://localhost:3000 NEXTAUTH_URL=http://localhost:3000 -DATABASE_HOST=toBeChanged -DATABASE_NAME=toBeChanged - # Prod # NEXT_PUBLIC_ENV_LABEL=prod -# DATABASE_USERNAME=toBeChanged -# DATABASE_PASSWORD=toBeChanged +# DATABASE_URL=toBeChanged # AWS_ACCESS_KEY_ID=toBeChanged # AWS_SECRET_ACCESS_KEY=toBeChanged # NEXT_PUBLIC_AWS_BUCKET_REGION=toBeChanged @@ -22,8 +18,7 @@ DATABASE_NAME=toBeChanged # Stage NEXT_PUBLIC_ENV_LABEL=stage -DATABASE_USERNAME=toBeChanged -DATABASE_PASSWORD=toBeChanged +DATABASE_URL=toBeChanged AWS_ACCESS_KEY_ID=toBeChanged AWS_SECRET_ACCESS_KEY=toBeChanged NEXT_PUBLIC_AWS_BUCKET_REGION=toBeChanged @@ -32,3 +27,4 @@ NEXT_PUBLIC_AWS_BUCKET_NAME=toBeChanged # Local # NEXT_PUBLIC_ENV_LABEL=local # USE_LOCAL_DB=true +# DATABASE_URL=toBeChanged diff --git a/.github/workflows/comment-if-db-migrations.yaml b/.github/workflows/comment-if-db-migrations.yaml index 9dd7b8d8..f270b094 100644 --- a/.github/workflows/comment-if-db-migrations.yaml +++ b/.github/workflows/comment-if-db-migrations.yaml @@ -21,12 +21,7 @@ jobs: > [!NOTE] > This PR introduces changes to the database. - **Remember to:** + **Remember to migrate the DB** - 1. Run the migrations in [stage database branch](https://app.planetscale.com/begursecret/descobreix-begur-app/stage) with: - ```bash - pnpm db:push - ``` - 1. Create a [deploy request in Planetscale](https://app.planetscale.com/begursecret/descobreix-begur-app/deploy-requests/) - 1. Merge the deploy request from Planetscale just before merging the PR. + For now it is not possible to run the migrations automatically, so you need to do it manually. comment_tag: execution diff --git a/README.md b/README.md index a7a6586a..72e893f0 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,10 @@ Discover incredible places and explore Begur like never before. #### Using local database -By default, the app will connect to stage database in PlanetScale, but you can run it locally too. +> [!CAUTION] +> This guide is outdated! The migration to Neon was very fast and I didn't have time to standarize the procedure. + +By default, the app will connect to stage database in Neon, but you can run it locally too. 1. Install [docker](https://www.docker.com/products/docker-desktop/). 1. Run the database **in another console**: @@ -79,6 +82,9 @@ By default, the app will connect to stage database in PlanetScale, but you can r #### How to deploy changes in the database +> [!CAUTION] +> This guide is outdated! The migration to Neon was very fast and I didn't have time to standarize the procedure. + 1. Make the changes in your code, testing them with the local database. 1. Run `pnpm db:generate` to generate the migrations. 1. Run `pnpm db:push` to upload the migrations to PlanetScale stage branch. @@ -88,13 +94,27 @@ By default, the app will connect to stage database in PlanetScale, but you can r 1. Right before merging the PR, go to PlanetScale dashboard and create a deploy preview and deploy it. 1. Merge the PR in GitHub. +##### New procedure random thoughts + +1. Run `pnpm db:generate`, to generate the new sql file. +2. DON'T run `pnpm db:push`, because it won't work. Instead, go to the Neon website, and in a SQL console paste the generated SQL. + +Besides that. These are the manual changes I did to the migration files: + +1. Add `CREATE EXTENSION IF NOT EXISTS postgis;` to the top +2. Remove the double quotes (`"`) from `Geometry(Point, 25831)` and `Geometry(MultiLineString, 25831)`. + +Something else: + +The script `db:local:run-db` is not done, it is commented out. + #### Access to other services Ask @mauriciabad for access. These are the services we use related to the code: -- [PlanetScale](https://app.planetscale.com/begursecret/descobreix-begur-app) +- [Neon](https://console.neon.tech/app/projects/spring-brook-65910694) - [AWS S3](https://aws.amazon.com/s3) - [Vercel](https://vercel.com/mauriciabad/begursecret) - [GitHub](https://github.com/mauriciabad/begursecret) diff --git a/drizzle.config.ts b/drizzle.config.ts index 6469ccb6..a83897d3 100644 --- a/drizzle.config.ts +++ b/drizzle.config.ts @@ -5,33 +5,16 @@ import path from 'node:path' dotenv.config({ path: path.resolve(process.cwd(), '.env.local') }) dotenv.config({ path: path.resolve(process.cwd(), '.env') }) -if ( - process.env.USE_LOCAL_DB !== 'true' && - process.env.SKIP_ENV_VALIDATION !== 'true' -) { - if (!process.env.DATABASE_HOST) - throw new Error('Missing environment variable DATABASE_HOST') - if (!process.env.DATABASE_NAME) - throw new Error('Missing environment variable DATABASE_NAME') - if (!process.env.DATABASE_USERNAME) - throw new Error('Missing environment variable DATABASE_USERNAME') - if (!process.env.DATABASE_PASSWORD) - throw new Error('Missing environment variable DATABASE_PASSWORD') +if (process.env.SKIP_ENV_VALIDATION !== 'true') { + if (!process.env.DATABASE_URL) + throw new Error('Missing environment variable DATABASE_URL') } export default { schema: './src/server/db/schema/*', out: './drizzle', - driver: 'mysql2', - dbCredentials: - process.env.USE_LOCAL_DB === 'true' - ? { - host: '127.0.0.1', - user: 'root', - password: 'unsafePaswordOnlyForLocalhost', - database: 'descobreix-begur-app', - } - : { - uri: `mysql://${process.env.DATABASE_USERNAME}:${process.env.DATABASE_PASSWORD}@${process.env.DATABASE_HOST}/${process.env.DATABASE_NAME}?ssl={"rejectUnauthorized":true}`, - }, + driver: 'pg', + dbCredentials: { + connectionString: process.env.DATABASE_URL!, + }, } satisfies Config diff --git a/drizzle/0000_mute_harrier.sql b/drizzle/0000_mute_harrier.sql deleted file mode 100644 index 36defd23..00000000 --- a/drizzle/0000_mute_harrier.sql +++ /dev/null @@ -1,43 +0,0 @@ -CREATE TABLE `place` ( - `id` serial AUTO_INCREMENT NOT NULL, - `name` text NOT NULL, - CONSTRAINT `place_id` PRIMARY KEY(`id`) -); ---> statement-breakpoint -CREATE TABLE `account` ( - `userId` varchar(255) NOT NULL, - `type` varchar(255) NOT NULL, - `provider` varchar(255) NOT NULL, - `providerAccountId` varchar(255) NOT NULL, - `refresh_token` varchar(255), - `access_token` varchar(255), - `expires_at` int, - `token_type` varchar(255), - `scope` varchar(255), - `id_token` text, - `session_state` varchar(255), - CONSTRAINT `account_provider_providerAccountId` PRIMARY KEY(`provider`,`providerAccountId`) -); ---> statement-breakpoint -CREATE TABLE `session` ( - `sessionToken` varchar(255) NOT NULL, - `userId` varchar(255) NOT NULL, - `expires` timestamp NOT NULL, - CONSTRAINT `session_sessionToken` PRIMARY KEY(`sessionToken`) -); ---> statement-breakpoint -CREATE TABLE `user` ( - `id` varchar(255) NOT NULL, - `name` varchar(255), - `email` varchar(255) NOT NULL, - `emailVerified` timestamp(3) DEFAULT (now()), - `image` varchar(255), - CONSTRAINT `user_id` PRIMARY KEY(`id`) -); ---> statement-breakpoint -CREATE TABLE `verificationToken` ( - `identifier` varchar(255) NOT NULL, - `token` varchar(255) NOT NULL, - `expires` timestamp NOT NULL, - CONSTRAINT `verificationToken_identifier_token` PRIMARY KEY(`identifier`,`token`) -); diff --git a/drizzle/0000_previous_ozymandias.sql b/drizzle/0000_previous_ozymandias.sql new file mode 100644 index 00000000..e46d2e26 --- /dev/null +++ b/drizzle/0000_previous_ozymandias.sql @@ -0,0 +1,217 @@ +CREATE EXTENSION IF NOT EXISTS postgis; +--> statement-breakpoint +DO $$ +BEGIN + CREATE TYPE "allowedAccess" AS ENUM( + 'public', 'permissive', 'customers', 'permit', 'private', 'mixed' + ); + EXCEPTION WHEN duplicate_object THEN null; +END +$$; +--> statement-breakpoint +DO $$ +BEGIN + CREATE TYPE "amountOfPeople" AS ENUM( + 'none', 'few', 'some', 'many', 'crowded' + ); + EXCEPTION WHEN duplicate_object THEN null; +END +$$; +--> statement-breakpoint +DO $$ +BEGIN + CREATE TYPE "difficulty" AS ENUM( + 'accessible', 'normal', 'smallEffort', 'hard', 'dangerous' + ); + EXCEPTION WHEN duplicate_object THEN null; +END +$$; +--> statement-breakpoint +DO $$ +BEGIN + CREATE TYPE "groundType" AS ENUM( + 'sand', 'pebbles', 'rocks', 'concrete', 'dirt', 'pavimented' + ); + EXCEPTION WHEN duplicate_object THEN null; +END +$$; +--> statement-breakpoint +DO $$ +BEGIN + CREATE TYPE "howNarrow" AS ENUM( + 'extremlyNarrow', 'narrow', 'extraSpace', 'wide', 'veryWide' + ); + EXCEPTION WHEN duplicate_object THEN null; +END +$$; +--> statement-breakpoint +DO $$ +BEGIN + CREATE TYPE "placeToArriveFrom" AS ENUM( + 'townCenter', 'parking', 'beach', 'road' + ); + EXCEPTION WHEN duplicate_object THEN null; +END +$$; +--> statement-breakpoint +DO $$ +BEGIN + CREATE TYPE "priceUnit" AS ENUM( + 'eur', 'eur/minute', 'eur/hour', 'eur/day' + ); + EXCEPTION WHEN duplicate_object THEN null; +END +$$; +--> statement-breakpoint +DO $$ +BEGIN + CREATE TYPE "scubaDivingLevel" AS ENUM( + 'discoverScubaDiving', 'openWater', 'advancedOpenWater', 'specialtyDiver', 'technicalDiver' + ); + EXCEPTION WHEN duplicate_object THEN null; +END +$$; +--> statement-breakpoint +DO $$ +BEGIN + CREATE TYPE "trainingLevel" AS ENUM( + 'noTraining', 'amateur', 'entryLevel', 'advanced', 'professional', 'elite' + ); + EXCEPTION WHEN duplicate_object THEN null; +END +$$; +--> statement-breakpoint +DO $$ +BEGIN + CREATE TYPE "gender" AS ENUM('masculine', 'feminine'); + EXCEPTION WHEN duplicate_object THEN null; +END +$$; +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "account" ( + "userId" text NOT NULL, "type" text NOT NULL, "provider" text NOT NULL, "providerAccountId" text NOT NULL, "refresh_token" text, "access_token" text, "expires_at" integer, "token_type" text, "scope" text, "id_token" text, "session_state" text, CONSTRAINT "account_provider_providerAccountId_pk" PRIMARY KEY ( + "provider", "providerAccountId" + ) +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "session" ( + "sessionToken" text PRIMARY KEY NOT NULL, "userId" text NOT NULL, "expires" timestamp NOT NULL +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "verificationToken" ( + "identifier" text NOT NULL, "token" text NOT NULL, "expires" timestamp NOT NULL, CONSTRAINT "verificationToken_identifier_token_pk" PRIMARY KEY ("identifier", "token") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "externalLink" ( + "id" serial PRIMARY KEY NOT NULL, "placeId" integer, "routeId" integer, "isOfficialWebsite" boolean, "url" text NOT NULL, "title" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "externalLink_translation" ( + "id" serial PRIMARY KEY NOT NULL, "externalLink_id" integer NOT NULL, "locale" varchar(10) NOT NULL, "url" text NOT NULL, "title" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "feature" ( + "id" serial PRIMARY KEY NOT NULL, "amountOfPeople" "amountOfPeople", "difficulty" "difficulty", "groundType" "groundType", "hasBus" boolean, "hasParking" boolean, "parkingSpaces" integer, "hasToilet" boolean, "hasRestaurant" boolean, "hasDrinkingWater" boolean, "hasShower" boolean, "hasLifeguard" boolean, "hasLeisure" boolean, "isNudist" boolean, "hasUnofficialName" boolean, "hasInacurateLocation" boolean, "date" text, "isBoatOnly" boolean, "trainingLevel" "trainingLevel", "hasMissingInfo" boolean, "height" integer, "depth" integer, "depthMin" integer, "depthMax" integer, "scubaDivingLevel" "scubaDivingLevel", "notThereAnymore" boolean, "isOutOfTheMunicipality" boolean, "hasBench" boolean, "allowedAccess" "allowedAccess", "dimensions" text, "price" double precision, "priceUnit" "priceUnit", "isCovered" boolean, "duration" integer, "distance" integer, "slope" integer, "timeToArrive" integer, "placeToArriveFrom" "placeToArriveFrom", "isFreeWithLocalStamp" boolean, "howNarrow" "howNarrow", "difficultyNotes" text, "priceNotes" text, "allowedAccessNotes" text, "hasInacurateLocationNotes" text, "hasMissingInfoNotes" text, "notThereAnymoreNotes" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "feature_translation" ( + "id" serial PRIMARY KEY NOT NULL, "feature_id" integer NOT NULL, "locale" varchar(10) NOT NULL, "difficultyNotes" text, "priceNotes" text, "allowedAccessNotes" text, "hasInacurateLocationNotes" text, "hasMissingInfoNotes" text, "notThereAnymoreNotes" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "image" ( + "id" serial PRIMARY KEY NOT NULL, "key" varchar(1024) NOT NULL, "width" integer NOT NULL, "height" integer NOT NULL, "source" text, "captureDate" timestamp, "alt" text, "blurDataURL" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "placeCategory" ( + "id" serial PRIMARY KEY NOT NULL, "icon" text NOT NULL, "color" text NOT NULL, "hasVisitMission" boolean DEFAULT true NOT NULL, "order" integer, "name" text NOT NULL, "namePlural" text NOT NULL, "nameGender" "gender" +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "placeCategory_translation" ( + "id" serial PRIMARY KEY NOT NULL, "placeCategory_id" integer NOT NULL, "locale" varchar(10) NOT NULL, "name" text NOT NULL, "namePlural" text NOT NULL, "nameGender" "gender" +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "placeToPlaceCategory" ( + "placeId" integer NOT NULL, "categoryId" integer NOT NULL, CONSTRAINT "placeToPlaceCategory_categoryId_placeId_pk" PRIMARY KEY ("categoryId", "placeId") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "placeCategoryToPlaceCategoryGroup" ( + "categoryGroupId" integer NOT NULL, "categoryId" integer NOT NULL, "highlight" boolean, CONSTRAINT "placeCategoryToPlaceCategoryGroup_categoryGroupId_categoryId_pk" PRIMARY KEY ( + "categoryGroupId", "categoryId" + ) +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "placeCategoryGroup" ( + "id" serial PRIMARY KEY NOT NULL, "icon" text NOT NULL, "color" text NOT NULL, "order" integer, "name" text NOT NULL, "nameGender" "gender" +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "placeCategoryGroup_translation" ( + "id" serial PRIMARY KEY NOT NULL, "placeCategoryGroup_id" integer NOT NULL, "locale" varchar(10) NOT NULL, "name" text NOT NULL, "nameGender" "gender" +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "placeListToPlace" ( + "placeListId" integer NOT NULL, "placeId" integer NOT NULL, "addedAt" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, CONSTRAINT "placeListToPlace_placeId_placeListId_pk" PRIMARY KEY ("placeId", "placeListId") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "placeList" ( + "id" serial PRIMARY KEY NOT NULL, "userId" varchar(255) NOT NULL +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "place" ( + "id" serial PRIMARY KEY NOT NULL, "mainImageId" integer, "googleMapsId" text, "location" Geometry (Point, 25831) NOT NULL, "mainCategoryId" integer NOT NULL, "featuresId" integer NOT NULL, "verificationRequirementsId" integer, "importance" double precision, "name" text NOT NULL, "description" text, "content" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "place_translation" ( + "id" serial PRIMARY KEY NOT NULL, "place_id" integer NOT NULL, "locale" varchar(10) NOT NULL, "name" text NOT NULL, "description" text, "content" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "routeCategory" ( + "id" serial PRIMARY KEY NOT NULL, "icon" text NOT NULL, "color" text NOT NULL, "hasVisitMission" boolean DEFAULT true NOT NULL, "order" integer, "name" text NOT NULL, "namePlural" text NOT NULL, "nameGender" "gender" +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "routeCategory_translation" ( + "id" serial PRIMARY KEY NOT NULL, "routeCategory_id" integer NOT NULL, "locale" varchar(10) NOT NULL, "name" text NOT NULL, "namePlural" text NOT NULL, "nameGender" "gender" +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "routeToRouteCategory" ( + "routeId" integer NOT NULL, "categoryId" integer NOT NULL, CONSTRAINT "routeToRouteCategory_categoryId_routeId_pk" PRIMARY KEY ("categoryId", "routeId") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "route" ( + "id" serial PRIMARY KEY NOT NULL, "mainImageId" integer, "path" Geometry (MultiLineString, 25831) NOT NULL, "mainCategoryId" integer NOT NULL, "featuresId" integer NOT NULL, "verificationRequirementsId" integer, "importance" double precision, "name" text NOT NULL, "description" text, "content" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "routeToPlace" ( + "routeId" integer NOT NULL, "placeId" integer NOT NULL, CONSTRAINT "routeToPlace_placeId_routeId_pk" PRIMARY KEY ("placeId", "routeId") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "route_translation" ( + "id" serial PRIMARY KEY NOT NULL, "route_id" integer NOT NULL, "locale" varchar(10) NOT NULL, "name" text NOT NULL, "description" text, "content" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "user" ( + "id" varchar(255) PRIMARY KEY NOT NULL, "name" text, "hashedPassword" varchar(255), "email" text NOT NULL, "emailVerified" timestamp, "image" text, "role" text DEFAULT 'user' NOT NULL, "visitedPlaceListId" integer NOT NULL +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "verificationRequirement" ( + "id" serial PRIMARY KEY NOT NULL, "isLocationRequired" boolean DEFAULT true NOT NULL, "maxLocationDistance" integer +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "verification" ( + "id" serial PRIMARY KEY NOT NULL, "placeId" integer NOT NULL, "userId" varchar(255) NOT NULL, "validatedOn" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, "deviceLocation" Geometry (Point, 25831), "deviceLocationAccuracy" integer +); +--> statement-breakpoint +DO $$ +BEGIN + ALTER TABLE "account" + ADD CONSTRAINT "account_userId_user_id_fk" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION WHEN duplicate_object THEN null; +END +$$; +--> statement-breakpoint +DO $$ +BEGIN + ALTER TABLE "session" + ADD CONSTRAINT "session_userId_user_id_fk" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION WHEN duplicate_object THEN null; +END +$$; \ No newline at end of file diff --git a/drizzle/0001_friendly_yellowjacket.sql b/drizzle/0001_friendly_yellowjacket.sql deleted file mode 100644 index fede98f3..00000000 --- a/drizzle/0001_friendly_yellowjacket.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `account` MODIFY COLUMN `refresh_token` text;--> statement-breakpoint -ALTER TABLE `account` MODIFY COLUMN `access_token` text;--> statement-breakpoint -ALTER TABLE `user` ADD `hashedPassword` varchar(255);--> statement-breakpoint -ALTER TABLE `user` ADD CONSTRAINT `user_email_unique` UNIQUE(`email`); \ No newline at end of file diff --git a/drizzle/0002_productive_thunderbolt.sql b/drizzle/0002_productive_thunderbolt.sql deleted file mode 100644 index 043923ef..00000000 --- a/drizzle/0002_productive_thunderbolt.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `user` MODIFY COLUMN `emailVerified` timestamp(3); \ No newline at end of file diff --git a/drizzle/0003_colorful_fat_cobra.sql b/drizzle/0003_colorful_fat_cobra.sql deleted file mode 100644 index 95ec8f43..00000000 --- a/drizzle/0003_colorful_fat_cobra.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `place` ADD `mainImage` varchar(1024); \ No newline at end of file diff --git a/drizzle/0004_curvy_colleen_wing.sql b/drizzle/0004_curvy_colleen_wing.sql deleted file mode 100644 index a4cd8e89..00000000 --- a/drizzle/0004_curvy_colleen_wing.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE `place_translation` ( - `id` serial AUTO_INCREMENT NOT NULL, - `place_id` int NOT NULL, - `locale` varchar(10) NOT NULL, - `name` text NOT NULL, - CONSTRAINT `place_translation_id` PRIMARY KEY(`id`) -); diff --git a/drizzle/0005_daily_sersi.sql b/drizzle/0005_daily_sersi.sql deleted file mode 100644 index 3d4ea052..00000000 --- a/drizzle/0005_daily_sersi.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `place` ADD `location` POINT SRID 25831 NOT NULL; \ No newline at end of file diff --git a/drizzle/0006_orange_morbius.sql b/drizzle/0006_orange_morbius.sql deleted file mode 100644 index cccd2171..00000000 --- a/drizzle/0006_orange_morbius.sql +++ /dev/null @@ -1,27 +0,0 @@ -CREATE TABLE `placeCategory` ( - `id` serial AUTO_INCREMENT NOT NULL, - `icon` tinytext NOT NULL, - `color` tinytext NOT NULL, - `name` tinytext NOT NULL, - `namePlural` tinytext NOT NULL, - `nameGender` enum('masculine','feminine'), - CONSTRAINT `placeCategory_id` PRIMARY KEY(`id`) -); ---> statement-breakpoint -CREATE TABLE `placeCategory_translation` ( - `id` serial AUTO_INCREMENT NOT NULL, - `placeCategory_id` int NOT NULL, - `locale` varchar(10) NOT NULL, - `name` tinytext NOT NULL, - `namePlural` tinytext NOT NULL, - `nameGender` enum('masculine','feminine'), - CONSTRAINT `placeCategory_translation_id` PRIMARY KEY(`id`) -); ---> statement-breakpoint -CREATE TABLE `placeToPlaceCategory` ( - `placeId` int NOT NULL, - `categoryId` int NOT NULL, - CONSTRAINT `placeToPlaceCategory_categoryId_placeId` PRIMARY KEY(`categoryId`,`placeId`) -); ---> statement-breakpoint -ALTER TABLE `place` ADD `mainCategoryId` int DEFAULT 1 NOT NULL; \ No newline at end of file diff --git a/drizzle/0007_nifty_shinko_yamashiro.sql b/drizzle/0007_nifty_shinko_yamashiro.sql deleted file mode 100644 index 6d686555..00000000 --- a/drizzle/0007_nifty_shinko_yamashiro.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `place` MODIFY COLUMN `mainCategoryId` int NOT NULL; \ No newline at end of file diff --git a/drizzle/0008_military_punisher.sql b/drizzle/0008_military_punisher.sql deleted file mode 100644 index cc771bda..00000000 --- a/drizzle/0008_military_punisher.sql +++ /dev/null @@ -1,31 +0,0 @@ -CREATE TABLE `feature` ( - `id` serial AUTO_INCREMENT NOT NULL, - `amountOfPeople` enum('none','few','some','many','crowded'), - `difficulty` enum('accessible','normal','smallEffort','hard','dangerous'), - `groundType` enum('sand','pebbles','rocks','concrete'), - `hasBus` boolean, - `hasParking` boolean, - `hasToilet` boolean, - `hasRestaurant` boolean, - `hasDrinkingWater` boolean, - `hasShower` boolean, - `hasLifeguard` boolean, - `hasLeisure` boolean, - `dimensions` tinytext, - `difficultyNotes` text, - CONSTRAINT `feature_id` PRIMARY KEY(`id`) -); ---> statement-breakpoint -CREATE TABLE `feature_translation` ( - `id` serial AUTO_INCREMENT NOT NULL, - `feature_id` int NOT NULL, - `locale` varchar(10) NOT NULL, - `difficultyNotes` text, - CONSTRAINT `feature_translation_id` PRIMARY KEY(`id`) -); ---> statement-breakpoint -ALTER TABLE `place` ADD `featuresId` int;--> statement-breakpoint -ALTER TABLE `place` ADD `description` tinytext;--> statement-breakpoint -ALTER TABLE `place` ADD `content` text;--> statement-breakpoint -ALTER TABLE `place_translation` ADD `description` tinytext;--> statement-breakpoint -ALTER TABLE `place_translation` ADD `content` text; \ No newline at end of file diff --git a/drizzle/0009_blue_selene.sql b/drizzle/0009_blue_selene.sql deleted file mode 100644 index 205ca7f6..00000000 --- a/drizzle/0009_blue_selene.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `placeCategory` ADD `hasVisitMission` boolean DEFAULT true NOT NULL; \ No newline at end of file diff --git a/drizzle/0010_fixed_mongoose.sql b/drizzle/0010_fixed_mongoose.sql deleted file mode 100644 index f94732ca..00000000 --- a/drizzle/0010_fixed_mongoose.sql +++ /dev/null @@ -1,14 +0,0 @@ -CREATE TABLE `placeListToPlace` ( - `placeListId` int NOT NULL, - `placeId` int NOT NULL, - `addedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - CONSTRAINT `placeListToPlace_placeId_placeListId` PRIMARY KEY(`placeId`,`placeListId`) -); ---> statement-breakpoint -CREATE TABLE `placeList` ( - `id` serial AUTO_INCREMENT NOT NULL, - `userId` varchar(255) NOT NULL, - CONSTRAINT `placeList_id` PRIMARY KEY(`id`) -); ---> statement-breakpoint -ALTER TABLE `user` ADD `visitedPlaceListId` int NOT NULL; \ No newline at end of file diff --git a/drizzle/0011_dapper_la_nuit.sql b/drizzle/0011_dapper_la_nuit.sql deleted file mode 100644 index 45584ca7..00000000 --- a/drizzle/0011_dapper_la_nuit.sql +++ /dev/null @@ -1,18 +0,0 @@ -CREATE TABLE `verificationRequirement` ( - `id` serial AUTO_INCREMENT NOT NULL, - `isLocationRequired` boolean NOT NULL DEFAULT true, - `maxLocationDistance` int, - CONSTRAINT `verificationRequirement_id` PRIMARY KEY(`id`) -); ---> statement-breakpoint -CREATE TABLE `verification` ( - `id` serial AUTO_INCREMENT NOT NULL, - `placeId` int NOT NULL, - `userId` varchar(255) NOT NULL, - `validatedOn` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `deviceLocation` POINT SRID 25831, - `deviceLocationAccuracy` int, - CONSTRAINT `verification_id` PRIMARY KEY(`id`) -); ---> statement-breakpoint -ALTER TABLE `place` ADD `verificationRequirementsId` int; \ No newline at end of file diff --git a/drizzle/0012_sad_wilson_fisk.sql b/drizzle/0012_sad_wilson_fisk.sql deleted file mode 100644 index dcc803b7..00000000 --- a/drizzle/0012_sad_wilson_fisk.sql +++ /dev/null @@ -1,9 +0,0 @@ -ALTER TABLE `account` DROP PRIMARY KEY;--> statement-breakpoint -ALTER TABLE `verificationToken` DROP PRIMARY KEY;--> statement-breakpoint -ALTER TABLE `placeListToPlace` DROP PRIMARY KEY;--> statement-breakpoint -ALTER TABLE `placeToPlaceCategory` DROP PRIMARY KEY;--> statement-breakpoint -ALTER TABLE `account` ADD PRIMARY KEY(`provider`,`providerAccountId`);--> statement-breakpoint -ALTER TABLE `verificationToken` ADD PRIMARY KEY(`identifier`,`token`);--> statement-breakpoint -ALTER TABLE `placeListToPlace` ADD PRIMARY KEY(`placeId`,`placeListId`);--> statement-breakpoint -ALTER TABLE `placeToPlaceCategory` ADD PRIMARY KEY(`categoryId`,`placeId`);--> statement-breakpoint -ALTER TABLE `user` ADD `role` varchar(255) DEFAULT 'user' NOT NULL; \ No newline at end of file diff --git a/drizzle/0013_pretty_magma.sql b/drizzle/0013_pretty_magma.sql deleted file mode 100644 index 70ee4e7a..00000000 --- a/drizzle/0013_pretty_magma.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE `image` ( - `id` serial AUTO_INCREMENT NOT NULL, - `key` varchar(1024) NOT NULL, - `width` int NOT NULL, - `height` int NOT NULL, - `alt` tinytext, - CONSTRAINT `image_id` PRIMARY KEY(`id`) -); ---> statement-breakpoint -ALTER TABLE `place` ADD `mainImageId` int;--> statement-breakpoint -ALTER TABLE `place` DROP COLUMN `mainImage`; \ No newline at end of file diff --git a/drizzle/0014_white_shatterstar.sql b/drizzle/0014_white_shatterstar.sql deleted file mode 100644 index be0a164b..00000000 --- a/drizzle/0014_white_shatterstar.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `image` ADD `blurDataURL` text; \ No newline at end of file diff --git a/drizzle/0015_even_zuras.sql b/drizzle/0015_even_zuras.sql deleted file mode 100644 index d18d0e0e..00000000 --- a/drizzle/0015_even_zuras.sql +++ /dev/null @@ -1,10 +0,0 @@ -ALTER TABLE `feature` MODIFY COLUMN `groundType` enum('sand','pebbles','rocks','concrete','dirt','pavimented');--> statement-breakpoint -ALTER TABLE `feature` ADD `parkingSpaces` int;--> statement-breakpoint -ALTER TABLE `feature` ADD `price` double;--> statement-breakpoint -ALTER TABLE `feature` ADD `priceUnit` enum('eur','eur/minute','eur/hour','eur/day');--> statement-breakpoint -ALTER TABLE `feature` ADD `isCovered` boolean;--> statement-breakpoint -ALTER TABLE `feature` ADD `timeToArrive` int;--> statement-breakpoint -ALTER TABLE `feature` ADD `placeToArriveFrom` enum('townCenter','parking','beach','road');--> statement-breakpoint -ALTER TABLE `feature` ADD `isFreeWithLocalStamp` boolean;--> statement-breakpoint -ALTER TABLE `feature` ADD `priceNotes` text;--> statement-breakpoint -ALTER TABLE `feature_translation` ADD `priceNotes` text; \ No newline at end of file diff --git a/drizzle/0016_robust_goliath.sql b/drizzle/0016_robust_goliath.sql deleted file mode 100644 index 32397b99..00000000 --- a/drizzle/0016_robust_goliath.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `image` ADD `source` text; \ No newline at end of file diff --git a/drizzle/0017_tricky_hellfire_club.sql b/drizzle/0017_tricky_hellfire_club.sql deleted file mode 100644 index e86c548e..00000000 --- a/drizzle/0017_tricky_hellfire_club.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `image` ADD `captureDate` date; \ No newline at end of file diff --git a/drizzle/0018_blushing_daimon_hellstrom.sql b/drizzle/0018_blushing_daimon_hellstrom.sql deleted file mode 100644 index 60357f25..00000000 --- a/drizzle/0018_blushing_daimon_hellstrom.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `place` MODIFY COLUMN `featuresId` int NOT NULL; \ No newline at end of file diff --git a/drizzle/0019_warm_zaladane.sql b/drizzle/0019_warm_zaladane.sql deleted file mode 100644 index fdf64892..00000000 --- a/drizzle/0019_warm_zaladane.sql +++ /dev/null @@ -1,55 +0,0 @@ -CREATE TABLE `routeCategory` ( - `id` serial AUTO_INCREMENT NOT NULL, - `icon` tinytext NOT NULL, - `color` tinytext NOT NULL, - `hasVisitMission` boolean NOT NULL DEFAULT true, - `name` tinytext NOT NULL, - `namePlural` tinytext NOT NULL, - `nameGender` enum('masculine','feminine'), - CONSTRAINT `routeCategory_id` PRIMARY KEY(`id`) -); ---> statement-breakpoint -CREATE TABLE `routeCategory_translation` ( - `id` serial AUTO_INCREMENT NOT NULL, - `routeCategory_id` int NOT NULL, - `locale` varchar(10) NOT NULL, - `name` tinytext NOT NULL, - `namePlural` tinytext NOT NULL, - `nameGender` enum('masculine','feminine'), - CONSTRAINT `routeCategory_translation_id` PRIMARY KEY(`id`) -); ---> statement-breakpoint -CREATE TABLE `route` ( - `id` serial AUTO_INCREMENT NOT NULL, - `mainImageId` int, - `path` MULTILINESTRING SRID 25831 NOT NULL, - `mainCategoryId` int NOT NULL, - `featuresId` int NOT NULL, - `verificationRequirementsId` int, - `name` text NOT NULL, - `description` tinytext, - `content` text, - CONSTRAINT `route_id` PRIMARY KEY(`id`) -); ---> statement-breakpoint -CREATE TABLE `routeToPlace` ( - `routeId` int NOT NULL, - `placeId` int NOT NULL, - CONSTRAINT `routeToPlace_placeId_routeId_pk` PRIMARY KEY(`placeId`,`routeId`) -); ---> statement-breakpoint -CREATE TABLE `routeToRouteCategory` ( - `routeId` int NOT NULL, - `categoryId` int NOT NULL, - CONSTRAINT `routeToRouteCategory_categoryId_routeId_pk` PRIMARY KEY(`categoryId`,`routeId`) -); ---> statement-breakpoint -CREATE TABLE `route_translation` ( - `id` serial AUTO_INCREMENT NOT NULL, - `route_id` int NOT NULL, - `locale` varchar(10) NOT NULL, - `name` text NOT NULL, - `description` tinytext, - `content` text, - CONSTRAINT `route_translation_id` PRIMARY KEY(`id`) -); diff --git a/drizzle/0020_lyrical_white_queen.sql b/drizzle/0020_lyrical_white_queen.sql deleted file mode 100644 index 56bfb2de..00000000 --- a/drizzle/0020_lyrical_white_queen.sql +++ /dev/null @@ -1,9 +0,0 @@ -ALTER TABLE `feature` ADD `isNudist` boolean;--> statement-breakpoint -ALTER TABLE `feature` ADD `hasUnofficialName` boolean;--> statement-breakpoint -ALTER TABLE `feature` ADD `isOutOfTheMunicipality` boolean;--> statement-breakpoint -ALTER TABLE `feature` ADD `allowedAccess` enum('public','permissive','customers','permit','private','mixed');--> statement-breakpoint -ALTER TABLE `feature` ADD `duration` int;--> statement-breakpoint -ALTER TABLE `feature` ADD `distance` int;--> statement-breakpoint -ALTER TABLE `feature` ADD `slope` int;--> statement-breakpoint -ALTER TABLE `feature` ADD `allowedAccessNotes` text;--> statement-breakpoint -ALTER TABLE `feature_translation` ADD `allowedAccessNotes` text; \ No newline at end of file diff --git a/drizzle/0021_brainy_tyrannus.sql b/drizzle/0021_brainy_tyrannus.sql deleted file mode 100644 index 65b7e70b..00000000 --- a/drizzle/0021_brainy_tyrannus.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `feature` ADD `hasInacurateLocation` boolean;--> statement-breakpoint -ALTER TABLE `feature` ADD `hasInacurateLocationNotes` text;--> statement-breakpoint -ALTER TABLE `feature_translation` ADD `hasInacurateLocationNotes` text; \ No newline at end of file diff --git a/drizzle/0022_purple_scarlet_witch.sql b/drizzle/0022_purple_scarlet_witch.sql deleted file mode 100644 index 81646a51..00000000 --- a/drizzle/0022_purple_scarlet_witch.sql +++ /dev/null @@ -1,20 +0,0 @@ -ALTER TABLE `feature` ADD `date` tinytext;--> statement-breakpoint -ALTER TABLE `feature` ADD `isBoatOnly` boolean;--> statement-breakpoint -ALTER TABLE `feature` ADD `trainingLevel` enum('noTraining','amateur','entryLevel','advanced','professional','elite');--> statement-breakpoint -ALTER TABLE `feature` ADD `hasMissingInfo` boolean;--> statement-breakpoint -ALTER TABLE `feature` ADD `height` int;--> statement-breakpoint -ALTER TABLE `feature` ADD `depth` int;--> statement-breakpoint -ALTER TABLE `feature` ADD `depthMin` int;--> statement-breakpoint -ALTER TABLE `feature` ADD `depthMax` int;--> statement-breakpoint -ALTER TABLE `feature` ADD `scubaDivingLevel` enum('discoverScubaDiving','openWater','advancedOpenWater','specialtyDiver','technicalDiver');--> statement-breakpoint -ALTER TABLE `feature` ADD `notThereAnymore` boolean;--> statement-breakpoint -ALTER TABLE `feature` ADD `hasBench` boolean;--> statement-breakpoint -ALTER TABLE `feature` ADD `howNarrow` enum('extremlyNarrow','narrow','extraSpace','wide','veryWide');--> statement-breakpoint -ALTER TABLE `feature` ADD `hasMissingInfoNotes` text;--> statement-breakpoint -ALTER TABLE `feature` ADD `notThereAnymoreNotes` text;--> statement-breakpoint -ALTER TABLE `feature_translation` ADD `hasMissingInfoNotes` text;--> statement-breakpoint -ALTER TABLE `feature_translation` ADD `notThereAnymoreNotes` text;--> statement-breakpoint -ALTER TABLE `placeCategory` ADD `order` int;--> statement-breakpoint -ALTER TABLE `place` ADD `importance` double;--> statement-breakpoint -ALTER TABLE `routeCategory` ADD `order` int;--> statement-breakpoint -ALTER TABLE `route` ADD `importance` double; \ No newline at end of file diff --git a/drizzle/0023_melodic_dragon_man.sql b/drizzle/0023_melodic_dragon_man.sql deleted file mode 100644 index a44b9374..00000000 --- a/drizzle/0023_melodic_dragon_man.sql +++ /dev/null @@ -1,16 +0,0 @@ -CREATE TABLE `externalLink` ( - `id` serial AUTO_INCREMENT NOT NULL, - `isOfficialWebsite` boolean, - `url` text NOT NULL, - `title` tinytext, - CONSTRAINT `externalLink_id` PRIMARY KEY(`id`) -); ---> statement-breakpoint -CREATE TABLE `externalLink_translation` ( - `id` serial AUTO_INCREMENT NOT NULL, - `externalLink_id` int NOT NULL, - `locale` varchar(10) NOT NULL, - `url` text NOT NULL, - `title` tinytext, - CONSTRAINT `externalLink_translation_id` PRIMARY KEY(`id`) -); diff --git a/drizzle/0024_confused_the_liberteens.sql b/drizzle/0024_confused_the_liberteens.sql deleted file mode 100644 index 54f2985f..00000000 --- a/drizzle/0024_confused_the_liberteens.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `externalLink` ADD `placeId` int;--> statement-breakpoint -ALTER TABLE `externalLink` ADD `routeId` int; \ No newline at end of file diff --git a/drizzle/0025_quiet_stark_industries.sql b/drizzle/0025_quiet_stark_industries.sql deleted file mode 100644 index e2b10ab2..00000000 --- a/drizzle/0025_quiet_stark_industries.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `place` ADD `googleMapsId` text; \ No newline at end of file diff --git a/drizzle/0026_thick_ben_parker.sql b/drizzle/0026_thick_ben_parker.sql deleted file mode 100644 index 1e9ec8a2..00000000 --- a/drizzle/0026_thick_ben_parker.sql +++ /dev/null @@ -1,24 +0,0 @@ -CREATE TABLE `placeCategoryToPlaceCategoryGroup` ( - `categoryGroupId` int NOT NULL, - `categoryId` int NOT NULL, - CONSTRAINT `placeCategoryToPlaceCategoryGroup_categoryGroupId_categoryId_pk` PRIMARY KEY(`categoryGroupId`,`categoryId`) -); ---> statement-breakpoint -CREATE TABLE `placeCategoryGroup` ( - `id` serial AUTO_INCREMENT NOT NULL, - `icon` tinytext NOT NULL, - `color` tinytext NOT NULL, - `order` int, - `name` tinytext NOT NULL, - `nameGender` enum('masculine','feminine'), - CONSTRAINT `placeCategoryGroup_id` PRIMARY KEY(`id`) -); ---> statement-breakpoint -CREATE TABLE `placeCategoryGroup_translation` ( - `id` serial AUTO_INCREMENT NOT NULL, - `placeCategoryGroup_id` int NOT NULL, - `locale` varchar(10) NOT NULL, - `name` tinytext NOT NULL, - `nameGender` enum('masculine','feminine'), - CONSTRAINT `placeCategoryGroup_translation_id` PRIMARY KEY(`id`) -); diff --git a/drizzle/0027_lonely_goliath.sql b/drizzle/0027_lonely_goliath.sql deleted file mode 100644 index dff9c7d3..00000000 --- a/drizzle/0027_lonely_goliath.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `placeCategoryToPlaceCategoryGroup` ADD `highlight` boolean; \ No newline at end of file diff --git a/drizzle/meta/0000_snapshot.json b/drizzle/meta/0000_snapshot.json index 0e6343fa..461b63ad 100644 --- a/drizzle/meta/0000_snapshot.json +++ b/drizzle/meta/0000_snapshot.json @@ -1,125 +1,99 @@ { - "version": "5", - "dialect": "mysql", - "id": "7ed78391-6147-422a-aabe-4142c0e039c0", + "id": "74278d02-12c6-451a-82b2-277c98466d64", "prevId": "00000000-0000-0000-0000-000000000000", + "version": "5", + "dialect": "pg", "tables": { - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, "account": { "name": "account", + "schema": "", "columns": { "userId": { "name": "userId", - "type": "varchar(255)", + "type": "text", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "type": { "name": "type", - "type": "varchar(255)", + "type": "text", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "provider": { "name": "provider", - "type": "varchar(255)", + "type": "text", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "providerAccountId": { "name": "providerAccountId", - "type": "varchar(255)", + "type": "text", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "refresh_token": { "name": "refresh_token", - "type": "varchar(255)", + "type": "text", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false }, "access_token": { "name": "access_token", - "type": "varchar(255)", + "type": "text", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false }, "expires_at": { "name": "expires_at", - "type": "int", + "type": "integer", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false }, "token_type": { "name": "token_type", - "type": "varchar(255)", + "type": "text", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false }, "scope": { "name": "scope", - "type": "varchar(255)", + "type": "text", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false }, "id_token": { "name": "id_token", "type": "text", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false }, "session_state": { "name": "session_state", - "type": "varchar(255)", + "type": "text", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false } }, "indexes": {}, - "foreignKeys": {}, + "foreignKeys": { + "account_userId_user_id_fk": { + "name": "account_userId_user_id_fk", + "tableFrom": "account", + "tableTo": "user", + "columnsFrom": [ + "userId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", + "account_provider_providerAccountId_pk": { + "name": "account_provider_providerAccountId_pk", "columns": [ "provider", "providerAccountId" @@ -130,136 +104,1535 @@ }, "session": { "name": "session", + "schema": "", "columns": { "sessionToken": { "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false + "type": "text", + "primaryKey": true, + "notNull": true }, "userId": { "name": "userId", - "type": "varchar(255)", + "type": "text", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "expires": { "name": "expires", "type": "timestamp", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "session_userId_user_id_fk": { + "name": "session_userId_user_id_fk", + "tableFrom": "session", + "tableTo": "user", + "columnsFrom": [ + "userId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "verificationToken": { + "name": "verificationToken", + "schema": "", + "columns": { + "identifier": { + "name": "identifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires": { + "name": "expires", + "type": "timestamp", + "primaryKey": false, + "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", + "verificationToken_identifier_token_pk": { + "name": "verificationToken_identifier_token_pk", "columns": [ - "sessionToken" + "identifier", + "token" ] } }, "uniqueConstraints": {} }, - "user": { - "name": "user", + "externalLink": { + "name": "externalLink", + "schema": "", "columns": { "id": { "name": "id", - "type": "varchar(255)", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "placeId": { + "name": "placeId", + "type": "integer", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": false }, - "name": { - "name": "name", - "type": "varchar(255)", + "routeId": { + "name": "routeId", + "type": "integer", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false }, - "email": { - "name": "email", - "type": "varchar(255)", + "isOfficialWebsite": { + "name": "isOfficialWebsite", + "type": "boolean", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": false }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", + "url": { + "name": "url", + "type": "text", "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "(now())" + "notNull": true }, - "image": { - "name": "image", - "type": "varchar(255)", + "title": { + "name": "title", + "type": "text", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false } }, "indexes": {}, "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, + "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "verificationToken": { - "name": "verificationToken", + "externalLink_translation": { + "name": "externalLink_translation", + "schema": "", "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "externalLink_id": { + "name": "externalLink_id", + "type": "integer", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, - "token": { - "name": "token", - "type": "varchar(255)", + "locale": { + "name": "locale", + "type": "varchar(10)", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, - "expires": { - "name": "expires", - "type": "timestamp", + "url": { + "name": "url", + "type": "text", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false } }, "indexes": {}, "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "feature": { + "name": "feature", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "amountOfPeople": { + "name": "amountOfPeople", + "type": "amountOfPeople", + "primaryKey": false, + "notNull": false + }, + "difficulty": { + "name": "difficulty", + "type": "difficulty", + "primaryKey": false, + "notNull": false + }, + "groundType": { + "name": "groundType", + "type": "groundType", + "primaryKey": false, + "notNull": false + }, + "hasBus": { + "name": "hasBus", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "hasParking": { + "name": "hasParking", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "parkingSpaces": { + "name": "parkingSpaces", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "hasToilet": { + "name": "hasToilet", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "hasRestaurant": { + "name": "hasRestaurant", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "hasDrinkingWater": { + "name": "hasDrinkingWater", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "hasShower": { + "name": "hasShower", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "hasLifeguard": { + "name": "hasLifeguard", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "hasLeisure": { + "name": "hasLeisure", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "isNudist": { + "name": "isNudist", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "hasUnofficialName": { + "name": "hasUnofficialName", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "hasInacurateLocation": { + "name": "hasInacurateLocation", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "date": { + "name": "date", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "isBoatOnly": { + "name": "isBoatOnly", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "trainingLevel": { + "name": "trainingLevel", + "type": "trainingLevel", + "primaryKey": false, + "notNull": false + }, + "hasMissingInfo": { + "name": "hasMissingInfo", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "depth": { + "name": "depth", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "depthMin": { + "name": "depthMin", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "depthMax": { + "name": "depthMax", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "scubaDivingLevel": { + "name": "scubaDivingLevel", + "type": "scubaDivingLevel", + "primaryKey": false, + "notNull": false + }, + "notThereAnymore": { + "name": "notThereAnymore", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "isOutOfTheMunicipality": { + "name": "isOutOfTheMunicipality", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "hasBench": { + "name": "hasBench", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "allowedAccess": { + "name": "allowedAccess", + "type": "allowedAccess", + "primaryKey": false, + "notNull": false + }, + "dimensions": { + "name": "dimensions", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "price": { + "name": "price", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "priceUnit": { + "name": "priceUnit", + "type": "priceUnit", + "primaryKey": false, + "notNull": false + }, + "isCovered": { + "name": "isCovered", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "duration": { + "name": "duration", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "distance": { + "name": "distance", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slope": { + "name": "slope", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "timeToArrive": { + "name": "timeToArrive", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "placeToArriveFrom": { + "name": "placeToArriveFrom", + "type": "placeToArriveFrom", + "primaryKey": false, + "notNull": false + }, + "isFreeWithLocalStamp": { + "name": "isFreeWithLocalStamp", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "howNarrow": { + "name": "howNarrow", + "type": "howNarrow", + "primaryKey": false, + "notNull": false + }, + "difficultyNotes": { + "name": "difficultyNotes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "priceNotes": { + "name": "priceNotes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "allowedAccessNotes": { + "name": "allowedAccessNotes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "hasInacurateLocationNotes": { + "name": "hasInacurateLocationNotes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "hasMissingInfoNotes": { + "name": "hasMissingInfoNotes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "notThereAnymoreNotes": { + "name": "notThereAnymoreNotes", + "type": "text", + "primaryKey": false, + "notNull": false } }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, "uniqueConstraints": {} + }, + "feature_translation": { + "name": "feature_translation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "feature_id": { + "name": "feature_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "locale": { + "name": "locale", + "type": "varchar(10)", + "primaryKey": false, + "notNull": true + }, + "difficultyNotes": { + "name": "difficultyNotes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "priceNotes": { + "name": "priceNotes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "allowedAccessNotes": { + "name": "allowedAccessNotes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "hasInacurateLocationNotes": { + "name": "hasInacurateLocationNotes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "hasMissingInfoNotes": { + "name": "hasMissingInfoNotes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "notThereAnymoreNotes": { + "name": "notThereAnymoreNotes", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "image": { + "name": "image", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar(1024)", + "primaryKey": false, + "notNull": true + }, + "width": { + "name": "width", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "height": { + "name": "height", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "captureDate": { + "name": "captureDate", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "alt": { + "name": "alt", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "blurDataURL": { + "name": "blurDataURL", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "placeCategory": { + "name": "placeCategory", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "color": { + "name": "color", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "hasVisitMission": { + "name": "hasVisitMission", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "namePlural": { + "name": "namePlural", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "nameGender": { + "name": "nameGender", + "type": "gender", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "placeCategory_translation": { + "name": "placeCategory_translation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "placeCategory_id": { + "name": "placeCategory_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "locale": { + "name": "locale", + "type": "varchar(10)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "namePlural": { + "name": "namePlural", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "nameGender": { + "name": "nameGender", + "type": "gender", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "placeToPlaceCategory": { + "name": "placeToPlaceCategory", + "schema": "", + "columns": { + "placeId": { + "name": "placeId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "categoryId": { + "name": "categoryId", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": { + "placeToPlaceCategory_categoryId_placeId_pk": { + "name": "placeToPlaceCategory_categoryId_placeId_pk", + "columns": [ + "categoryId", + "placeId" + ] + } + }, + "uniqueConstraints": {} + }, + "placeCategoryToPlaceCategoryGroup": { + "name": "placeCategoryToPlaceCategoryGroup", + "schema": "", + "columns": { + "categoryGroupId": { + "name": "categoryGroupId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "categoryId": { + "name": "categoryId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "highlight": { + "name": "highlight", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": { + "placeCategoryToPlaceCategoryGroup_categoryGroupId_categoryId_pk": { + "name": "placeCategoryToPlaceCategoryGroup_categoryGroupId_categoryId_pk", + "columns": [ + "categoryGroupId", + "categoryId" + ] + } + }, + "uniqueConstraints": {} + }, + "placeCategoryGroup": { + "name": "placeCategoryGroup", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "color": { + "name": "color", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "nameGender": { + "name": "nameGender", + "type": "gender", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "placeCategoryGroup_translation": { + "name": "placeCategoryGroup_translation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "placeCategoryGroup_id": { + "name": "placeCategoryGroup_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "locale": { + "name": "locale", + "type": "varchar(10)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "nameGender": { + "name": "nameGender", + "type": "gender", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "placeListToPlace": { + "name": "placeListToPlace", + "schema": "", + "columns": { + "placeListId": { + "name": "placeListId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "placeId": { + "name": "placeId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "addedAt": { + "name": "addedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": { + "placeListToPlace_placeId_placeListId_pk": { + "name": "placeListToPlace_placeId_placeListId_pk", + "columns": [ + "placeId", + "placeListId" + ] + } + }, + "uniqueConstraints": {} + }, + "placeList": { + "name": "placeList", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "place": { + "name": "place", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "mainImageId": { + "name": "mainImageId", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "googleMapsId": { + "name": "googleMapsId", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "location": { + "name": "location", + "type": "Geometry(Point,25831)", + "primaryKey": false, + "notNull": true + }, + "mainCategoryId": { + "name": "mainCategoryId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "featuresId": { + "name": "featuresId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "verificationRequirementsId": { + "name": "verificationRequirementsId", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "importance": { + "name": "importance", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "place_translation": { + "name": "place_translation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "place_id": { + "name": "place_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "locale": { + "name": "locale", + "type": "varchar(10)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "routeCategory": { + "name": "routeCategory", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "color": { + "name": "color", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "hasVisitMission": { + "name": "hasVisitMission", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "namePlural": { + "name": "namePlural", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "nameGender": { + "name": "nameGender", + "type": "gender", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "routeCategory_translation": { + "name": "routeCategory_translation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "routeCategory_id": { + "name": "routeCategory_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "locale": { + "name": "locale", + "type": "varchar(10)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "namePlural": { + "name": "namePlural", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "nameGender": { + "name": "nameGender", + "type": "gender", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "routeToRouteCategory": { + "name": "routeToRouteCategory", + "schema": "", + "columns": { + "routeId": { + "name": "routeId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "categoryId": { + "name": "categoryId", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": { + "routeToRouteCategory_categoryId_routeId_pk": { + "name": "routeToRouteCategory_categoryId_routeId_pk", + "columns": [ + "categoryId", + "routeId" + ] + } + }, + "uniqueConstraints": {} + }, + "route": { + "name": "route", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "mainImageId": { + "name": "mainImageId", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "path": { + "name": "path", + "type": "Geometry(MultiLineString,25831)", + "primaryKey": false, + "notNull": true + }, + "mainCategoryId": { + "name": "mainCategoryId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "featuresId": { + "name": "featuresId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "verificationRequirementsId": { + "name": "verificationRequirementsId", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "importance": { + "name": "importance", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "routeToPlace": { + "name": "routeToPlace", + "schema": "", + "columns": { + "routeId": { + "name": "routeId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "placeId": { + "name": "placeId", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": { + "routeToPlace_placeId_routeId_pk": { + "name": "routeToPlace_placeId_routeId_pk", + "columns": [ + "placeId", + "routeId" + ] + } + }, + "uniqueConstraints": {} + }, + "route_translation": { + "name": "route_translation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "route_id": { + "name": "route_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "locale": { + "name": "locale", + "type": "varchar(10)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "user": { + "name": "user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "hashedPassword": { + "name": "hashedPassword", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "emailVerified": { + "name": "emailVerified", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "image": { + "name": "image", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "visitedPlaceListId": { + "name": "visitedPlaceListId", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "verificationRequirement": { + "name": "verificationRequirement", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "isLocationRequired": { + "name": "isLocationRequired", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "maxLocationDistance": { + "name": "maxLocationDistance", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "verification": { + "name": "verification", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "placeId": { + "name": "placeId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "validatedOn": { + "name": "validatedOn", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "deviceLocation": { + "name": "deviceLocation", + "type": "Geometry(Point,25831)", + "primaryKey": false, + "notNull": false + }, + "deviceLocationAccuracy": { + "name": "deviceLocationAccuracy", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": { + "allowedAccess": { + "name": "allowedAccess", + "values": { + "public": "public", + "permissive": "permissive", + "customers": "customers", + "permit": "permit", + "private": "private", + "mixed": "mixed" + } + }, + "amountOfPeople": { + "name": "amountOfPeople", + "values": { + "none": "none", + "few": "few", + "some": "some", + "many": "many", + "crowded": "crowded" + } + }, + "difficulty": { + "name": "difficulty", + "values": { + "accessible": "accessible", + "normal": "normal", + "smallEffort": "smallEffort", + "hard": "hard", + "dangerous": "dangerous" + } + }, + "groundType": { + "name": "groundType", + "values": { + "sand": "sand", + "pebbles": "pebbles", + "rocks": "rocks", + "concrete": "concrete", + "dirt": "dirt", + "pavimented": "pavimented" + } + }, + "howNarrow": { + "name": "howNarrow", + "values": { + "extremlyNarrow": "extremlyNarrow", + "narrow": "narrow", + "extraSpace": "extraSpace", + "wide": "wide", + "veryWide": "veryWide" + } + }, + "placeToArriveFrom": { + "name": "placeToArriveFrom", + "values": { + "townCenter": "townCenter", + "parking": "parking", + "beach": "beach", + "road": "road" + } + }, + "priceUnit": { + "name": "priceUnit", + "values": { + "eur": "eur", + "eur/minute": "eur/minute", + "eur/hour": "eur/hour", + "eur/day": "eur/day" + } + }, + "scubaDivingLevel": { + "name": "scubaDivingLevel", + "values": { + "discoverScubaDiving": "discoverScubaDiving", + "openWater": "openWater", + "advancedOpenWater": "advancedOpenWater", + "specialtyDiver": "specialtyDiver", + "technicalDiver": "technicalDiver" + } + }, + "trainingLevel": { + "name": "trainingLevel", + "values": { + "noTraining": "noTraining", + "amateur": "amateur", + "entryLevel": "entryLevel", + "advanced": "advanced", + "professional": "professional", + "elite": "elite" + } + }, + "gender": { + "name": "gender", + "values": { + "masculine": "masculine", + "feminine": "feminine" + } } }, "schemas": {}, "_meta": { + "columns": {}, "schemas": {}, - "tables": {}, - "columns": {} + "tables": {} } } \ No newline at end of file diff --git a/drizzle/meta/0001_snapshot.json b/drizzle/meta/0001_snapshot.json deleted file mode 100644 index 2e7f73e6..00000000 --- a/drizzle/meta/0001_snapshot.json +++ /dev/null @@ -1,279 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "60e6bc97-3429-4396-b81c-d597457d90a7", - "prevId": "7ed78391-6147-422a-aabe-4142c0e039c0", - "tables": { - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "(now())" - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0002_snapshot.json b/drizzle/meta/0002_snapshot.json deleted file mode 100644 index 150b9423..00000000 --- a/drizzle/meta/0002_snapshot.json +++ /dev/null @@ -1,278 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "4083d305-aa61-41e2-9e44-89f0efa632c2", - "prevId": "60e6bc97-3429-4396-b81c-d597457d90a7", - "tables": { - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0003_snapshot.json b/drizzle/meta/0003_snapshot.json deleted file mode 100644 index 68bb1250..00000000 --- a/drizzle/meta/0003_snapshot.json +++ /dev/null @@ -1,285 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "aea0cf0a-32d1-453e-b0e7-2419b3070b31", - "prevId": "4083d305-aa61-41e2-9e44-89f0efa632c2", - "tables": { - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainImage": { - "name": "mainImage", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0004_snapshot.json b/drizzle/meta/0004_snapshot.json deleted file mode 100644 index 0775ac2d..00000000 --- a/drizzle/meta/0004_snapshot.json +++ /dev/null @@ -1,329 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "5ab66feb-1129-4822-99c3-4e3bb4ac5de2", - "prevId": "aea0cf0a-32d1-453e-b0e7-2419b3070b31", - "tables": { - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImage": { - "name": "mainImage", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0005_snapshot.json b/drizzle/meta/0005_snapshot.json deleted file mode 100644 index 549bd91c..00000000 --- a/drizzle/meta/0005_snapshot.json +++ /dev/null @@ -1,336 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "063d427f-f792-4617-81f8-b89e2c90fee9", - "prevId": "5ab66feb-1129-4822-99c3-4e3bb4ac5de2", - "tables": { - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImage": { - "name": "mainImage", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0006_snapshot.json b/drizzle/meta/0006_snapshot.json deleted file mode 100644 index 1a5ec1a5..00000000 --- a/drizzle/meta/0006_snapshot.json +++ /dev/null @@ -1,491 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "708b6cff-3965-4295-bf02-c0b01577327a", - "prevId": "063d427f-f792-4617-81f8-b89e2c90fee9", - "tables": { - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImage": { - "name": "mainImage", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 1 - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId": { - "name": "placeToPlaceCategory_categoryId_placeId", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0007_snapshot.json b/drizzle/meta/0007_snapshot.json deleted file mode 100644 index eef28b60..00000000 --- a/drizzle/meta/0007_snapshot.json +++ /dev/null @@ -1,490 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "202754ea-6649-4333-8681-29a63cae8cec", - "prevId": "708b6cff-3965-4295-bf02-c0b01577327a", - "tables": { - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImage": { - "name": "mainImage", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId": { - "name": "placeToPlaceCategory_categoryId_placeId", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0008_snapshot.json b/drizzle/meta/0008_snapshot.json deleted file mode 100644 index e165c7c0..00000000 --- a/drizzle/meta/0008_snapshot.json +++ /dev/null @@ -1,683 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "97577559-4d70-401d-bab6-249c45758f6f", - "prevId": "202754ea-6649-4333-8681-29a63cae8cec", - "tables": { - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImage": { - "name": "mainImage", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId": { - "name": "placeToPlaceCategory_categoryId_placeId", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0009_snapshot.json b/drizzle/meta/0009_snapshot.json deleted file mode 100644 index b12e757e..00000000 --- a/drizzle/meta/0009_snapshot.json +++ /dev/null @@ -1,691 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "732b0209-84d9-4bce-a2b7-12146c3436b4", - "prevId": "97577559-4d70-401d-bab6-249c45758f6f", - "tables": { - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImage": { - "name": "mainImage", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId": { - "name": "placeToPlaceCategory_categoryId_placeId", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0010_snapshot.json b/drizzle/meta/0010_snapshot.json deleted file mode 100644 index 0c689e9f..00000000 --- a/drizzle/meta/0010_snapshot.json +++ /dev/null @@ -1,767 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "af8972c5-02af-44c8-9858-e45177dc6734", - "prevId": "732b0209-84d9-4bce-a2b7-12146c3436b4", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId": { - "name": "placeListToPlace_placeId_placeListId", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImage": { - "name": "mainImage", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId": { - "name": "placeToPlaceCategory_categoryId_placeId", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0011_snapshot.json b/drizzle/meta/0011_snapshot.json deleted file mode 100644 index 0f889a76..00000000 --- a/drizzle/meta/0011_snapshot.json +++ /dev/null @@ -1,871 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "fac06220-5550-41f5-a96a-1a2d15e2215d", - "prevId": "af8972c5-02af-44c8-9858-e45177dc6734", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId": { - "name": "placeListToPlace_placeId_placeListId", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImage": { - "name": "mainImage", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId": { - "name": "placeToPlaceCategory_categoryId_placeId", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationRequirement": { - "name": "verificationRequirement", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isLocationRequired": { - "name": "isLocationRequired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "maxLocationDistance": { - "name": "maxLocationDistance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationRequirement_id": { - "name": "verificationRequirement_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "verification": { - "name": "verification", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "validatedOn": { - "name": "validatedOn", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "deviceLocation": { - "name": "deviceLocation", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deviceLocationAccuracy": { - "name": "deviceLocationAccuracy", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verification_id": { - "name": "verification_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0012_snapshot.json b/drizzle/meta/0012_snapshot.json deleted file mode 100644 index fbbdbbf9..00000000 --- a/drizzle/meta/0012_snapshot.json +++ /dev/null @@ -1,879 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "57b906be-0049-4125-8cfa-aacf3e136db8", - "prevId": "fac06220-5550-41f5-a96a-1a2d15e2215d", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId_pk": { - "name": "account_provider_providerAccountId_pk", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token_pk": { - "name": "verificationToken_identifier_token_pk", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId_pk": { - "name": "placeListToPlace_placeId_placeListId_pk", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImage": { - "name": "mainImage", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId_pk": { - "name": "placeToPlaceCategory_categoryId_placeId_pk", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'user'" - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationRequirement": { - "name": "verificationRequirement", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isLocationRequired": { - "name": "isLocationRequired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "maxLocationDistance": { - "name": "maxLocationDistance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationRequirement_id": { - "name": "verificationRequirement_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "verification": { - "name": "verification", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "validatedOn": { - "name": "validatedOn", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "deviceLocation": { - "name": "deviceLocation", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deviceLocationAccuracy": { - "name": "deviceLocationAccuracy", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verification_id": { - "name": "verification_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0013_snapshot.json b/drizzle/meta/0013_snapshot.json deleted file mode 100644 index 80f011bf..00000000 --- a/drizzle/meta/0013_snapshot.json +++ /dev/null @@ -1,930 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "fd0ff184-5b38-441d-aeaf-b28b57dae163", - "prevId": "57b906be-0049-4125-8cfa-aacf3e136db8", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId_pk": { - "name": "account_provider_providerAccountId_pk", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token_pk": { - "name": "verificationToken_identifier_token_pk", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "image": { - "name": "image", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "key": { - "name": "key", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "width": { - "name": "width", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "alt": { - "name": "alt", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "image_id": { - "name": "image_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId_pk": { - "name": "placeListToPlace_placeId_placeListId_pk", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId_pk": { - "name": "placeToPlaceCategory_categoryId_placeId_pk", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'user'" - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationRequirement": { - "name": "verificationRequirement", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isLocationRequired": { - "name": "isLocationRequired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "maxLocationDistance": { - "name": "maxLocationDistance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationRequirement_id": { - "name": "verificationRequirement_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "verification": { - "name": "verification", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "validatedOn": { - "name": "validatedOn", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "deviceLocation": { - "name": "deviceLocation", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deviceLocationAccuracy": { - "name": "deviceLocationAccuracy", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verification_id": { - "name": "verification_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0014_snapshot.json b/drizzle/meta/0014_snapshot.json deleted file mode 100644 index b4137df0..00000000 --- a/drizzle/meta/0014_snapshot.json +++ /dev/null @@ -1,937 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "b67cbd71-8b17-4ea8-bf3c-b7ce5c1bf293", - "prevId": "fd0ff184-5b38-441d-aeaf-b28b57dae163", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId_pk": { - "name": "account_provider_providerAccountId_pk", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token_pk": { - "name": "verificationToken_identifier_token_pk", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "image": { - "name": "image", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "key": { - "name": "key", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "width": { - "name": "width", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "blurDataURL": { - "name": "blurDataURL", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "alt": { - "name": "alt", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "image_id": { - "name": "image_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId_pk": { - "name": "placeListToPlace_placeId_placeListId_pk", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId_pk": { - "name": "placeToPlaceCategory_categoryId_placeId_pk", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'user'" - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationRequirement": { - "name": "verificationRequirement", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isLocationRequired": { - "name": "isLocationRequired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "maxLocationDistance": { - "name": "maxLocationDistance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationRequirement_id": { - "name": "verificationRequirement_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "verification": { - "name": "verification", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "validatedOn": { - "name": "validatedOn", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "deviceLocation": { - "name": "deviceLocation", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deviceLocationAccuracy": { - "name": "deviceLocationAccuracy", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verification_id": { - "name": "verification_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0015_snapshot.json b/drizzle/meta/0015_snapshot.json deleted file mode 100644 index 6e2acaf7..00000000 --- a/drizzle/meta/0015_snapshot.json +++ /dev/null @@ -1,1000 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "62f2c14d-72cd-479d-b773-ed28fdfc3544", - "prevId": "b67cbd71-8b17-4ea8-bf3c-b7ce5c1bf293", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId_pk": { - "name": "account_provider_providerAccountId_pk", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token_pk": { - "name": "verificationToken_identifier_token_pk", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete','dirt','pavimented')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "parkingSpaces": { - "name": "parkingSpaces", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "price": { - "name": "price", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceUnit": { - "name": "priceUnit", - "type": "enum('eur','eur/minute','eur/hour','eur/day')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isCovered": { - "name": "isCovered", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "timeToArrive": { - "name": "timeToArrive", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "placeToArriveFrom": { - "name": "placeToArriveFrom", - "type": "enum('townCenter','parking','beach','road')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isFreeWithLocalStamp": { - "name": "isFreeWithLocalStamp", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "image": { - "name": "image", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "key": { - "name": "key", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "width": { - "name": "width", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "blurDataURL": { - "name": "blurDataURL", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "alt": { - "name": "alt", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "image_id": { - "name": "image_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId_pk": { - "name": "placeListToPlace_placeId_placeListId_pk", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId_pk": { - "name": "placeToPlaceCategory_categoryId_placeId_pk", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'user'" - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationRequirement": { - "name": "verificationRequirement", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isLocationRequired": { - "name": "isLocationRequired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "maxLocationDistance": { - "name": "maxLocationDistance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationRequirement_id": { - "name": "verificationRequirement_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "verification": { - "name": "verification", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "validatedOn": { - "name": "validatedOn", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "deviceLocation": { - "name": "deviceLocation", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deviceLocationAccuracy": { - "name": "deviceLocationAccuracy", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verification_id": { - "name": "verification_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0016_snapshot.json b/drizzle/meta/0016_snapshot.json deleted file mode 100644 index b607370c..00000000 --- a/drizzle/meta/0016_snapshot.json +++ /dev/null @@ -1,1007 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "01464c8a-c144-4434-a0ca-e946e9bbb4fe", - "prevId": "62f2c14d-72cd-479d-b773-ed28fdfc3544", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId_pk": { - "name": "account_provider_providerAccountId_pk", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token_pk": { - "name": "verificationToken_identifier_token_pk", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete','dirt','pavimented')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "parkingSpaces": { - "name": "parkingSpaces", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "price": { - "name": "price", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceUnit": { - "name": "priceUnit", - "type": "enum('eur','eur/minute','eur/hour','eur/day')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isCovered": { - "name": "isCovered", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "timeToArrive": { - "name": "timeToArrive", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "placeToArriveFrom": { - "name": "placeToArriveFrom", - "type": "enum('townCenter','parking','beach','road')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isFreeWithLocalStamp": { - "name": "isFreeWithLocalStamp", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "image": { - "name": "image", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "key": { - "name": "key", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "width": { - "name": "width", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "alt": { - "name": "alt", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "blurDataURL": { - "name": "blurDataURL", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "image_id": { - "name": "image_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId_pk": { - "name": "placeListToPlace_placeId_placeListId_pk", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId_pk": { - "name": "placeToPlaceCategory_categoryId_placeId_pk", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'user'" - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationRequirement": { - "name": "verificationRequirement", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isLocationRequired": { - "name": "isLocationRequired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "maxLocationDistance": { - "name": "maxLocationDistance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationRequirement_id": { - "name": "verificationRequirement_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "verification": { - "name": "verification", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "validatedOn": { - "name": "validatedOn", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "deviceLocation": { - "name": "deviceLocation", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deviceLocationAccuracy": { - "name": "deviceLocationAccuracy", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verification_id": { - "name": "verification_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0017_snapshot.json b/drizzle/meta/0017_snapshot.json deleted file mode 100644 index 7f5698ed..00000000 --- a/drizzle/meta/0017_snapshot.json +++ /dev/null @@ -1,1014 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "8d05399e-7f45-488d-a39f-74201ee934fc", - "prevId": "01464c8a-c144-4434-a0ca-e946e9bbb4fe", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId_pk": { - "name": "account_provider_providerAccountId_pk", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token_pk": { - "name": "verificationToken_identifier_token_pk", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete','dirt','pavimented')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "parkingSpaces": { - "name": "parkingSpaces", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "price": { - "name": "price", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceUnit": { - "name": "priceUnit", - "type": "enum('eur','eur/minute','eur/hour','eur/day')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isCovered": { - "name": "isCovered", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "timeToArrive": { - "name": "timeToArrive", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "placeToArriveFrom": { - "name": "placeToArriveFrom", - "type": "enum('townCenter','parking','beach','road')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isFreeWithLocalStamp": { - "name": "isFreeWithLocalStamp", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "image": { - "name": "image", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "key": { - "name": "key", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "width": { - "name": "width", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "captureDate": { - "name": "captureDate", - "type": "date", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "alt": { - "name": "alt", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "blurDataURL": { - "name": "blurDataURL", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "image_id": { - "name": "image_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId_pk": { - "name": "placeListToPlace_placeId_placeListId_pk", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId_pk": { - "name": "placeToPlaceCategory_categoryId_placeId_pk", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'user'" - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationRequirement": { - "name": "verificationRequirement", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isLocationRequired": { - "name": "isLocationRequired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "maxLocationDistance": { - "name": "maxLocationDistance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationRequirement_id": { - "name": "verificationRequirement_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "verification": { - "name": "verification", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "validatedOn": { - "name": "validatedOn", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "deviceLocation": { - "name": "deviceLocation", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deviceLocationAccuracy": { - "name": "deviceLocationAccuracy", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verification_id": { - "name": "verification_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0018_snapshot.json b/drizzle/meta/0018_snapshot.json deleted file mode 100644 index 9fe15b7c..00000000 --- a/drizzle/meta/0018_snapshot.json +++ /dev/null @@ -1,1014 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "d3bfad8c-c019-4c9b-a4c7-ac10c6854fc3", - "prevId": "8d05399e-7f45-488d-a39f-74201ee934fc", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId_pk": { - "name": "account_provider_providerAccountId_pk", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token_pk": { - "name": "verificationToken_identifier_token_pk", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete','dirt','pavimented')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "parkingSpaces": { - "name": "parkingSpaces", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "price": { - "name": "price", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceUnit": { - "name": "priceUnit", - "type": "enum('eur','eur/minute','eur/hour','eur/day')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isCovered": { - "name": "isCovered", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "timeToArrive": { - "name": "timeToArrive", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "placeToArriveFrom": { - "name": "placeToArriveFrom", - "type": "enum('townCenter','parking','beach','road')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isFreeWithLocalStamp": { - "name": "isFreeWithLocalStamp", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "image": { - "name": "image", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "key": { - "name": "key", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "width": { - "name": "width", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "captureDate": { - "name": "captureDate", - "type": "date", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "alt": { - "name": "alt", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "blurDataURL": { - "name": "blurDataURL", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "image_id": { - "name": "image_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId_pk": { - "name": "placeListToPlace_placeId_placeListId_pk", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId_pk": { - "name": "placeToPlaceCategory_categoryId_placeId_pk", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'user'" - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationRequirement": { - "name": "verificationRequirement", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isLocationRequired": { - "name": "isLocationRequired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "maxLocationDistance": { - "name": "maxLocationDistance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationRequirement_id": { - "name": "verificationRequirement_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "verification": { - "name": "verification", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "validatedOn": { - "name": "validatedOn", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "deviceLocation": { - "name": "deviceLocation", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deviceLocationAccuracy": { - "name": "deviceLocationAccuracy", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verification_id": { - "name": "verification_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0019_snapshot.json b/drizzle/meta/0019_snapshot.json deleted file mode 100644 index 2fff5ab2..00000000 --- a/drizzle/meta/0019_snapshot.json +++ /dev/null @@ -1,1337 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "d45a3d2f-23a4-4e2c-a24e-5952705e34db", - "prevId": "d3bfad8c-c019-4c9b-a4c7-ac10c6854fc3", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId_pk": { - "name": "account_provider_providerAccountId_pk", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token_pk": { - "name": "verificationToken_identifier_token_pk", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete','dirt','pavimented')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "parkingSpaces": { - "name": "parkingSpaces", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "price": { - "name": "price", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceUnit": { - "name": "priceUnit", - "type": "enum('eur','eur/minute','eur/hour','eur/day')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isCovered": { - "name": "isCovered", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "timeToArrive": { - "name": "timeToArrive", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "placeToArriveFrom": { - "name": "placeToArriveFrom", - "type": "enum('townCenter','parking','beach','road')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isFreeWithLocalStamp": { - "name": "isFreeWithLocalStamp", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "image": { - "name": "image", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "key": { - "name": "key", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "width": { - "name": "width", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "captureDate": { - "name": "captureDate", - "type": "date", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "alt": { - "name": "alt", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "blurDataURL": { - "name": "blurDataURL", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "image_id": { - "name": "image_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId_pk": { - "name": "placeListToPlace_placeId_placeListId_pk", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId_pk": { - "name": "placeToPlaceCategory_categoryId_placeId_pk", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory": { - "name": "routeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_id": { - "name": "routeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory_translation": { - "name": "routeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "routeCategory_id": { - "name": "routeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_translation_id": { - "name": "routeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "route": { - "name": "route", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "path": { - "name": "path", - "type": "MULTILINESTRING SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_id": { - "name": "route_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToPlace": { - "name": "routeToPlace", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToPlace_placeId_routeId_pk": { - "name": "routeToPlace_placeId_routeId_pk", - "columns": [ - "placeId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToRouteCategory": { - "name": "routeToRouteCategory", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToRouteCategory_categoryId_routeId_pk": { - "name": "routeToRouteCategory_categoryId_routeId_pk", - "columns": [ - "categoryId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - }, - "route_translation": { - "name": "route_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "route_id": { - "name": "route_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_translation_id": { - "name": "route_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'user'" - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationRequirement": { - "name": "verificationRequirement", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isLocationRequired": { - "name": "isLocationRequired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "maxLocationDistance": { - "name": "maxLocationDistance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationRequirement_id": { - "name": "verificationRequirement_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "verification": { - "name": "verification", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "validatedOn": { - "name": "validatedOn", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "deviceLocation": { - "name": "deviceLocation", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deviceLocationAccuracy": { - "name": "deviceLocationAccuracy", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verification_id": { - "name": "verification_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0020_snapshot.json b/drizzle/meta/0020_snapshot.json deleted file mode 100644 index f9c1c502..00000000 --- a/drizzle/meta/0020_snapshot.json +++ /dev/null @@ -1,1400 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "681fb2bb-2ee4-4b26-856f-b73c79269db3", - "prevId": "d45a3d2f-23a4-4e2c-a24e-5952705e34db", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId_pk": { - "name": "account_provider_providerAccountId_pk", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token_pk": { - "name": "verificationToken_identifier_token_pk", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete','dirt','pavimented')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "parkingSpaces": { - "name": "parkingSpaces", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isNudist": { - "name": "isNudist", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasUnofficialName": { - "name": "hasUnofficialName", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isOutOfTheMunicipality": { - "name": "isOutOfTheMunicipality", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccess": { - "name": "allowedAccess", - "type": "enum('public','permissive','customers','permit','private','mixed')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "price": { - "name": "price", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceUnit": { - "name": "priceUnit", - "type": "enum('eur','eur/minute','eur/hour','eur/day')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isCovered": { - "name": "isCovered", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "duration": { - "name": "duration", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "distance": { - "name": "distance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "slope": { - "name": "slope", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "timeToArrive": { - "name": "timeToArrive", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "placeToArriveFrom": { - "name": "placeToArriveFrom", - "type": "enum('townCenter','parking','beach','road')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isFreeWithLocalStamp": { - "name": "isFreeWithLocalStamp", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccessNotes": { - "name": "allowedAccessNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccessNotes": { - "name": "allowedAccessNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "image": { - "name": "image", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "key": { - "name": "key", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "width": { - "name": "width", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "captureDate": { - "name": "captureDate", - "type": "date", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "alt": { - "name": "alt", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "blurDataURL": { - "name": "blurDataURL", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "image_id": { - "name": "image_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId_pk": { - "name": "placeListToPlace_placeId_placeListId_pk", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId_pk": { - "name": "placeToPlaceCategory_categoryId_placeId_pk", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory": { - "name": "routeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_id": { - "name": "routeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory_translation": { - "name": "routeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "routeCategory_id": { - "name": "routeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_translation_id": { - "name": "routeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "route": { - "name": "route", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "path": { - "name": "path", - "type": "MULTILINESTRING SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_id": { - "name": "route_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToPlace": { - "name": "routeToPlace", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToPlace_placeId_routeId_pk": { - "name": "routeToPlace_placeId_routeId_pk", - "columns": [ - "placeId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToRouteCategory": { - "name": "routeToRouteCategory", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToRouteCategory_categoryId_routeId_pk": { - "name": "routeToRouteCategory_categoryId_routeId_pk", - "columns": [ - "categoryId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - }, - "route_translation": { - "name": "route_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "route_id": { - "name": "route_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_translation_id": { - "name": "route_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'user'" - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationRequirement": { - "name": "verificationRequirement", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isLocationRequired": { - "name": "isLocationRequired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "maxLocationDistance": { - "name": "maxLocationDistance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationRequirement_id": { - "name": "verificationRequirement_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "verification": { - "name": "verification", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "validatedOn": { - "name": "validatedOn", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "deviceLocation": { - "name": "deviceLocation", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deviceLocationAccuracy": { - "name": "deviceLocationAccuracy", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verification_id": { - "name": "verification_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0021_snapshot.json b/drizzle/meta/0021_snapshot.json deleted file mode 100644 index cff5119c..00000000 --- a/drizzle/meta/0021_snapshot.json +++ /dev/null @@ -1,1421 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "0da09f68-610c-4af4-8c88-b99f601a2f84", - "prevId": "681fb2bb-2ee4-4b26-856f-b73c79269db3", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId_pk": { - "name": "account_provider_providerAccountId_pk", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token_pk": { - "name": "verificationToken_identifier_token_pk", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete','dirt','pavimented')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "parkingSpaces": { - "name": "parkingSpaces", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isNudist": { - "name": "isNudist", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasUnofficialName": { - "name": "hasUnofficialName", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocation": { - "name": "hasInacurateLocation", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isOutOfTheMunicipality": { - "name": "isOutOfTheMunicipality", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccess": { - "name": "allowedAccess", - "type": "enum('public','permissive','customers','permit','private','mixed')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "price": { - "name": "price", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceUnit": { - "name": "priceUnit", - "type": "enum('eur','eur/minute','eur/hour','eur/day')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isCovered": { - "name": "isCovered", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "duration": { - "name": "duration", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "distance": { - "name": "distance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "slope": { - "name": "slope", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "timeToArrive": { - "name": "timeToArrive", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "placeToArriveFrom": { - "name": "placeToArriveFrom", - "type": "enum('townCenter','parking','beach','road')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isFreeWithLocalStamp": { - "name": "isFreeWithLocalStamp", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccessNotes": { - "name": "allowedAccessNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocationNotes": { - "name": "hasInacurateLocationNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccessNotes": { - "name": "allowedAccessNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocationNotes": { - "name": "hasInacurateLocationNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "image": { - "name": "image", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "key": { - "name": "key", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "width": { - "name": "width", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "captureDate": { - "name": "captureDate", - "type": "date", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "alt": { - "name": "alt", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "blurDataURL": { - "name": "blurDataURL", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "image_id": { - "name": "image_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId_pk": { - "name": "placeListToPlace_placeId_placeListId_pk", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId_pk": { - "name": "placeToPlaceCategory_categoryId_placeId_pk", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory": { - "name": "routeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_id": { - "name": "routeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory_translation": { - "name": "routeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "routeCategory_id": { - "name": "routeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_translation_id": { - "name": "routeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "route": { - "name": "route", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "path": { - "name": "path", - "type": "MULTILINESTRING SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_id": { - "name": "route_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToPlace": { - "name": "routeToPlace", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToPlace_placeId_routeId_pk": { - "name": "routeToPlace_placeId_routeId_pk", - "columns": [ - "placeId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToRouteCategory": { - "name": "routeToRouteCategory", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToRouteCategory_categoryId_routeId_pk": { - "name": "routeToRouteCategory_categoryId_routeId_pk", - "columns": [ - "categoryId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - }, - "route_translation": { - "name": "route_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "route_id": { - "name": "route_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_translation_id": { - "name": "route_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'user'" - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationRequirement": { - "name": "verificationRequirement", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isLocationRequired": { - "name": "isLocationRequired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "maxLocationDistance": { - "name": "maxLocationDistance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationRequirement_id": { - "name": "verificationRequirement_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "verification": { - "name": "verification", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "validatedOn": { - "name": "validatedOn", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "deviceLocation": { - "name": "deviceLocation", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deviceLocationAccuracy": { - "name": "deviceLocationAccuracy", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verification_id": { - "name": "verification_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0022_snapshot.json b/drizzle/meta/0022_snapshot.json deleted file mode 100644 index a5ea0acd..00000000 --- a/drizzle/meta/0022_snapshot.json +++ /dev/null @@ -1,1561 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "658f2b7d-8dff-4d29-9020-2905f96fe732", - "prevId": "0da09f68-610c-4af4-8c88-b99f601a2f84", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId_pk": { - "name": "account_provider_providerAccountId_pk", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token_pk": { - "name": "verificationToken_identifier_token_pk", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete','dirt','pavimented')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "parkingSpaces": { - "name": "parkingSpaces", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isNudist": { - "name": "isNudist", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasUnofficialName": { - "name": "hasUnofficialName", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocation": { - "name": "hasInacurateLocation", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "date": { - "name": "date", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isBoatOnly": { - "name": "isBoatOnly", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "trainingLevel": { - "name": "trainingLevel", - "type": "enum('noTraining','amateur','entryLevel','advanced','professional','elite')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfo": { - "name": "hasMissingInfo", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depth": { - "name": "depth", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depthMin": { - "name": "depthMin", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depthMax": { - "name": "depthMax", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scubaDivingLevel": { - "name": "scubaDivingLevel", - "type": "enum('discoverScubaDiving','openWater','advancedOpenWater','specialtyDiver','technicalDiver')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymore": { - "name": "notThereAnymore", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isOutOfTheMunicipality": { - "name": "isOutOfTheMunicipality", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBench": { - "name": "hasBench", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccess": { - "name": "allowedAccess", - "type": "enum('public','permissive','customers','permit','private','mixed')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "price": { - "name": "price", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceUnit": { - "name": "priceUnit", - "type": "enum('eur','eur/minute','eur/hour','eur/day')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isCovered": { - "name": "isCovered", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "duration": { - "name": "duration", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "distance": { - "name": "distance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "slope": { - "name": "slope", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "timeToArrive": { - "name": "timeToArrive", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "placeToArriveFrom": { - "name": "placeToArriveFrom", - "type": "enum('townCenter','parking','beach','road')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isFreeWithLocalStamp": { - "name": "isFreeWithLocalStamp", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "howNarrow": { - "name": "howNarrow", - "type": "enum('extremlyNarrow','narrow','extraSpace','wide','veryWide')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccessNotes": { - "name": "allowedAccessNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocationNotes": { - "name": "hasInacurateLocationNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfoNotes": { - "name": "hasMissingInfoNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymoreNotes": { - "name": "notThereAnymoreNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccessNotes": { - "name": "allowedAccessNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocationNotes": { - "name": "hasInacurateLocationNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfoNotes": { - "name": "hasMissingInfoNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymoreNotes": { - "name": "notThereAnymoreNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "image": { - "name": "image", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "key": { - "name": "key", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "width": { - "name": "width", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "captureDate": { - "name": "captureDate", - "type": "date", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "alt": { - "name": "alt", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "blurDataURL": { - "name": "blurDataURL", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "image_id": { - "name": "image_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId_pk": { - "name": "placeListToPlace_placeId_placeListId_pk", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "order": { - "name": "order", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importance": { - "name": "importance", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId_pk": { - "name": "placeToPlaceCategory_categoryId_placeId_pk", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory": { - "name": "routeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "order": { - "name": "order", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_id": { - "name": "routeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory_translation": { - "name": "routeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "routeCategory_id": { - "name": "routeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_translation_id": { - "name": "routeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "route": { - "name": "route", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "path": { - "name": "path", - "type": "MULTILINESTRING SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importance": { - "name": "importance", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_id": { - "name": "route_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToPlace": { - "name": "routeToPlace", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToPlace_placeId_routeId_pk": { - "name": "routeToPlace_placeId_routeId_pk", - "columns": [ - "placeId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToRouteCategory": { - "name": "routeToRouteCategory", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToRouteCategory_categoryId_routeId_pk": { - "name": "routeToRouteCategory_categoryId_routeId_pk", - "columns": [ - "categoryId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - }, - "route_translation": { - "name": "route_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "route_id": { - "name": "route_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_translation_id": { - "name": "route_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'user'" - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationRequirement": { - "name": "verificationRequirement", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isLocationRequired": { - "name": "isLocationRequired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "maxLocationDistance": { - "name": "maxLocationDistance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationRequirement_id": { - "name": "verificationRequirement_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "verification": { - "name": "verification", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "validatedOn": { - "name": "validatedOn", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "deviceLocation": { - "name": "deviceLocation", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deviceLocationAccuracy": { - "name": "deviceLocationAccuracy", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verification_id": { - "name": "verification_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0023_snapshot.json b/drizzle/meta/0023_snapshot.json deleted file mode 100644 index 9c7bfac4..00000000 --- a/drizzle/meta/0023_snapshot.json +++ /dev/null @@ -1,1656 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "3a3cffa9-5015-4c4a-84f0-8e9597cc1417", - "prevId": "658f2b7d-8dff-4d29-9020-2905f96fe732", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId_pk": { - "name": "account_provider_providerAccountId_pk", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token_pk": { - "name": "verificationToken_identifier_token_pk", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "externalLink": { - "name": "externalLink", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isOfficialWebsite": { - "name": "isOfficialWebsite", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "externalLink_id": { - "name": "externalLink_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "externalLink_translation": { - "name": "externalLink_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "externalLink_id": { - "name": "externalLink_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "externalLink_translation_id": { - "name": "externalLink_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete','dirt','pavimented')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "parkingSpaces": { - "name": "parkingSpaces", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isNudist": { - "name": "isNudist", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasUnofficialName": { - "name": "hasUnofficialName", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocation": { - "name": "hasInacurateLocation", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "date": { - "name": "date", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isBoatOnly": { - "name": "isBoatOnly", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "trainingLevel": { - "name": "trainingLevel", - "type": "enum('noTraining','amateur','entryLevel','advanced','professional','elite')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfo": { - "name": "hasMissingInfo", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depth": { - "name": "depth", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depthMin": { - "name": "depthMin", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depthMax": { - "name": "depthMax", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scubaDivingLevel": { - "name": "scubaDivingLevel", - "type": "enum('discoverScubaDiving','openWater','advancedOpenWater','specialtyDiver','technicalDiver')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymore": { - "name": "notThereAnymore", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isOutOfTheMunicipality": { - "name": "isOutOfTheMunicipality", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBench": { - "name": "hasBench", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccess": { - "name": "allowedAccess", - "type": "enum('public','permissive','customers','permit','private','mixed')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "price": { - "name": "price", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceUnit": { - "name": "priceUnit", - "type": "enum('eur','eur/minute','eur/hour','eur/day')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isCovered": { - "name": "isCovered", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "duration": { - "name": "duration", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "distance": { - "name": "distance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "slope": { - "name": "slope", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "timeToArrive": { - "name": "timeToArrive", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "placeToArriveFrom": { - "name": "placeToArriveFrom", - "type": "enum('townCenter','parking','beach','road')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isFreeWithLocalStamp": { - "name": "isFreeWithLocalStamp", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "howNarrow": { - "name": "howNarrow", - "type": "enum('extremlyNarrow','narrow','extraSpace','wide','veryWide')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccessNotes": { - "name": "allowedAccessNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocationNotes": { - "name": "hasInacurateLocationNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfoNotes": { - "name": "hasMissingInfoNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymoreNotes": { - "name": "notThereAnymoreNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccessNotes": { - "name": "allowedAccessNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocationNotes": { - "name": "hasInacurateLocationNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfoNotes": { - "name": "hasMissingInfoNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymoreNotes": { - "name": "notThereAnymoreNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "image": { - "name": "image", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "key": { - "name": "key", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "width": { - "name": "width", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "captureDate": { - "name": "captureDate", - "type": "date", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "alt": { - "name": "alt", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "blurDataURL": { - "name": "blurDataURL", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "image_id": { - "name": "image_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId_pk": { - "name": "placeListToPlace_placeId_placeListId_pk", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "order": { - "name": "order", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importance": { - "name": "importance", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId_pk": { - "name": "placeToPlaceCategory_categoryId_placeId_pk", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory": { - "name": "routeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "order": { - "name": "order", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_id": { - "name": "routeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory_translation": { - "name": "routeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "routeCategory_id": { - "name": "routeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_translation_id": { - "name": "routeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "route": { - "name": "route", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "path": { - "name": "path", - "type": "MULTILINESTRING SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importance": { - "name": "importance", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_id": { - "name": "route_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToPlace": { - "name": "routeToPlace", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToPlace_placeId_routeId_pk": { - "name": "routeToPlace_placeId_routeId_pk", - "columns": [ - "placeId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToRouteCategory": { - "name": "routeToRouteCategory", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToRouteCategory_categoryId_routeId_pk": { - "name": "routeToRouteCategory_categoryId_routeId_pk", - "columns": [ - "categoryId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - }, - "route_translation": { - "name": "route_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "route_id": { - "name": "route_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_translation_id": { - "name": "route_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'user'" - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationRequirement": { - "name": "verificationRequirement", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isLocationRequired": { - "name": "isLocationRequired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "maxLocationDistance": { - "name": "maxLocationDistance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationRequirement_id": { - "name": "verificationRequirement_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "verification": { - "name": "verification", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "validatedOn": { - "name": "validatedOn", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "deviceLocation": { - "name": "deviceLocation", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deviceLocationAccuracy": { - "name": "deviceLocationAccuracy", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verification_id": { - "name": "verification_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0024_snapshot.json b/drizzle/meta/0024_snapshot.json deleted file mode 100644 index b3b9e2af..00000000 --- a/drizzle/meta/0024_snapshot.json +++ /dev/null @@ -1,1670 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "91ef5a17-3ad9-434e-93d0-64048b84bb7b", - "prevId": "3a3cffa9-5015-4c4a-84f0-8e9597cc1417", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId_pk": { - "name": "account_provider_providerAccountId_pk", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token_pk": { - "name": "verificationToken_identifier_token_pk", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "externalLink": { - "name": "externalLink", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isOfficialWebsite": { - "name": "isOfficialWebsite", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "externalLink_id": { - "name": "externalLink_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "externalLink_translation": { - "name": "externalLink_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "externalLink_id": { - "name": "externalLink_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "externalLink_translation_id": { - "name": "externalLink_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete','dirt','pavimented')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "parkingSpaces": { - "name": "parkingSpaces", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isNudist": { - "name": "isNudist", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasUnofficialName": { - "name": "hasUnofficialName", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocation": { - "name": "hasInacurateLocation", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "date": { - "name": "date", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isBoatOnly": { - "name": "isBoatOnly", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "trainingLevel": { - "name": "trainingLevel", - "type": "enum('noTraining','amateur','entryLevel','advanced','professional','elite')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfo": { - "name": "hasMissingInfo", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depth": { - "name": "depth", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depthMin": { - "name": "depthMin", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depthMax": { - "name": "depthMax", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scubaDivingLevel": { - "name": "scubaDivingLevel", - "type": "enum('discoverScubaDiving','openWater','advancedOpenWater','specialtyDiver','technicalDiver')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymore": { - "name": "notThereAnymore", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isOutOfTheMunicipality": { - "name": "isOutOfTheMunicipality", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBench": { - "name": "hasBench", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccess": { - "name": "allowedAccess", - "type": "enum('public','permissive','customers','permit','private','mixed')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "price": { - "name": "price", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceUnit": { - "name": "priceUnit", - "type": "enum('eur','eur/minute','eur/hour','eur/day')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isCovered": { - "name": "isCovered", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "duration": { - "name": "duration", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "distance": { - "name": "distance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "slope": { - "name": "slope", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "timeToArrive": { - "name": "timeToArrive", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "placeToArriveFrom": { - "name": "placeToArriveFrom", - "type": "enum('townCenter','parking','beach','road')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isFreeWithLocalStamp": { - "name": "isFreeWithLocalStamp", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "howNarrow": { - "name": "howNarrow", - "type": "enum('extremlyNarrow','narrow','extraSpace','wide','veryWide')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccessNotes": { - "name": "allowedAccessNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocationNotes": { - "name": "hasInacurateLocationNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfoNotes": { - "name": "hasMissingInfoNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymoreNotes": { - "name": "notThereAnymoreNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccessNotes": { - "name": "allowedAccessNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocationNotes": { - "name": "hasInacurateLocationNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfoNotes": { - "name": "hasMissingInfoNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymoreNotes": { - "name": "notThereAnymoreNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "image": { - "name": "image", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "key": { - "name": "key", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "width": { - "name": "width", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "captureDate": { - "name": "captureDate", - "type": "date", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "alt": { - "name": "alt", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "blurDataURL": { - "name": "blurDataURL", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "image_id": { - "name": "image_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId_pk": { - "name": "placeListToPlace_placeId_placeListId_pk", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "order": { - "name": "order", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importance": { - "name": "importance", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId_pk": { - "name": "placeToPlaceCategory_categoryId_placeId_pk", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory": { - "name": "routeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "order": { - "name": "order", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_id": { - "name": "routeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory_translation": { - "name": "routeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "routeCategory_id": { - "name": "routeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_translation_id": { - "name": "routeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "route": { - "name": "route", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "path": { - "name": "path", - "type": "MULTILINESTRING SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importance": { - "name": "importance", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_id": { - "name": "route_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToPlace": { - "name": "routeToPlace", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToPlace_placeId_routeId_pk": { - "name": "routeToPlace_placeId_routeId_pk", - "columns": [ - "placeId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToRouteCategory": { - "name": "routeToRouteCategory", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToRouteCategory_categoryId_routeId_pk": { - "name": "routeToRouteCategory_categoryId_routeId_pk", - "columns": [ - "categoryId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - }, - "route_translation": { - "name": "route_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "route_id": { - "name": "route_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_translation_id": { - "name": "route_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'user'" - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationRequirement": { - "name": "verificationRequirement", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isLocationRequired": { - "name": "isLocationRequired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "maxLocationDistance": { - "name": "maxLocationDistance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationRequirement_id": { - "name": "verificationRequirement_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "verification": { - "name": "verification", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "validatedOn": { - "name": "validatedOn", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "deviceLocation": { - "name": "deviceLocation", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deviceLocationAccuracy": { - "name": "deviceLocationAccuracy", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verification_id": { - "name": "verification_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0025_snapshot.json b/drizzle/meta/0025_snapshot.json deleted file mode 100644 index 2bbca014..00000000 --- a/drizzle/meta/0025_snapshot.json +++ /dev/null @@ -1,1677 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "784894cf-a64b-4062-97d4-a432ceaa322c", - "prevId": "91ef5a17-3ad9-434e-93d0-64048b84bb7b", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId_pk": { - "name": "account_provider_providerAccountId_pk", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token_pk": { - "name": "verificationToken_identifier_token_pk", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "externalLink": { - "name": "externalLink", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isOfficialWebsite": { - "name": "isOfficialWebsite", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "externalLink_id": { - "name": "externalLink_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "externalLink_translation": { - "name": "externalLink_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "externalLink_id": { - "name": "externalLink_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "externalLink_translation_id": { - "name": "externalLink_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete','dirt','pavimented')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "parkingSpaces": { - "name": "parkingSpaces", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isNudist": { - "name": "isNudist", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasUnofficialName": { - "name": "hasUnofficialName", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocation": { - "name": "hasInacurateLocation", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "date": { - "name": "date", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isBoatOnly": { - "name": "isBoatOnly", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "trainingLevel": { - "name": "trainingLevel", - "type": "enum('noTraining','amateur','entryLevel','advanced','professional','elite')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfo": { - "name": "hasMissingInfo", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depth": { - "name": "depth", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depthMin": { - "name": "depthMin", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depthMax": { - "name": "depthMax", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scubaDivingLevel": { - "name": "scubaDivingLevel", - "type": "enum('discoverScubaDiving','openWater','advancedOpenWater','specialtyDiver','technicalDiver')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymore": { - "name": "notThereAnymore", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isOutOfTheMunicipality": { - "name": "isOutOfTheMunicipality", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBench": { - "name": "hasBench", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccess": { - "name": "allowedAccess", - "type": "enum('public','permissive','customers','permit','private','mixed')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "price": { - "name": "price", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceUnit": { - "name": "priceUnit", - "type": "enum('eur','eur/minute','eur/hour','eur/day')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isCovered": { - "name": "isCovered", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "duration": { - "name": "duration", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "distance": { - "name": "distance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "slope": { - "name": "slope", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "timeToArrive": { - "name": "timeToArrive", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "placeToArriveFrom": { - "name": "placeToArriveFrom", - "type": "enum('townCenter','parking','beach','road')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isFreeWithLocalStamp": { - "name": "isFreeWithLocalStamp", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "howNarrow": { - "name": "howNarrow", - "type": "enum('extremlyNarrow','narrow','extraSpace','wide','veryWide')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccessNotes": { - "name": "allowedAccessNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocationNotes": { - "name": "hasInacurateLocationNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfoNotes": { - "name": "hasMissingInfoNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymoreNotes": { - "name": "notThereAnymoreNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccessNotes": { - "name": "allowedAccessNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocationNotes": { - "name": "hasInacurateLocationNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfoNotes": { - "name": "hasMissingInfoNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymoreNotes": { - "name": "notThereAnymoreNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "image": { - "name": "image", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "key": { - "name": "key", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "width": { - "name": "width", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "captureDate": { - "name": "captureDate", - "type": "date", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "alt": { - "name": "alt", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "blurDataURL": { - "name": "blurDataURL", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "image_id": { - "name": "image_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId_pk": { - "name": "placeListToPlace_placeId_placeListId_pk", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "order": { - "name": "order", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "googleMapsId": { - "name": "googleMapsId", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importance": { - "name": "importance", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId_pk": { - "name": "placeToPlaceCategory_categoryId_placeId_pk", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory": { - "name": "routeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "order": { - "name": "order", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_id": { - "name": "routeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory_translation": { - "name": "routeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "routeCategory_id": { - "name": "routeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_translation_id": { - "name": "routeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "route": { - "name": "route", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "path": { - "name": "path", - "type": "MULTILINESTRING SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importance": { - "name": "importance", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_id": { - "name": "route_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToPlace": { - "name": "routeToPlace", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToPlace_placeId_routeId_pk": { - "name": "routeToPlace_placeId_routeId_pk", - "columns": [ - "placeId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToRouteCategory": { - "name": "routeToRouteCategory", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToRouteCategory_categoryId_routeId_pk": { - "name": "routeToRouteCategory_categoryId_routeId_pk", - "columns": [ - "categoryId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - }, - "route_translation": { - "name": "route_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "route_id": { - "name": "route_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_translation_id": { - "name": "route_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'user'" - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationRequirement": { - "name": "verificationRequirement", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isLocationRequired": { - "name": "isLocationRequired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "maxLocationDistance": { - "name": "maxLocationDistance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationRequirement_id": { - "name": "verificationRequirement_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "verification": { - "name": "verification", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "validatedOn": { - "name": "validatedOn", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "deviceLocation": { - "name": "deviceLocation", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deviceLocationAccuracy": { - "name": "deviceLocationAccuracy", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verification_id": { - "name": "verification_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0026_snapshot.json b/drizzle/meta/0026_snapshot.json deleted file mode 100644 index 1ef5d37c..00000000 --- a/drizzle/meta/0026_snapshot.json +++ /dev/null @@ -1,1817 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "4c53b12c-2999-408a-92f1-df61177bcdb0", - "prevId": "784894cf-a64b-4062-97d4-a432ceaa322c", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId_pk": { - "name": "account_provider_providerAccountId_pk", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token_pk": { - "name": "verificationToken_identifier_token_pk", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "externalLink": { - "name": "externalLink", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isOfficialWebsite": { - "name": "isOfficialWebsite", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "externalLink_id": { - "name": "externalLink_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "externalLink_translation": { - "name": "externalLink_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "externalLink_id": { - "name": "externalLink_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "externalLink_translation_id": { - "name": "externalLink_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete','dirt','pavimented')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "parkingSpaces": { - "name": "parkingSpaces", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isNudist": { - "name": "isNudist", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasUnofficialName": { - "name": "hasUnofficialName", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocation": { - "name": "hasInacurateLocation", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "date": { - "name": "date", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isBoatOnly": { - "name": "isBoatOnly", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "trainingLevel": { - "name": "trainingLevel", - "type": "enum('noTraining','amateur','entryLevel','advanced','professional','elite')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfo": { - "name": "hasMissingInfo", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depth": { - "name": "depth", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depthMin": { - "name": "depthMin", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depthMax": { - "name": "depthMax", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scubaDivingLevel": { - "name": "scubaDivingLevel", - "type": "enum('discoverScubaDiving','openWater','advancedOpenWater','specialtyDiver','technicalDiver')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymore": { - "name": "notThereAnymore", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isOutOfTheMunicipality": { - "name": "isOutOfTheMunicipality", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBench": { - "name": "hasBench", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccess": { - "name": "allowedAccess", - "type": "enum('public','permissive','customers','permit','private','mixed')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "price": { - "name": "price", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceUnit": { - "name": "priceUnit", - "type": "enum('eur','eur/minute','eur/hour','eur/day')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isCovered": { - "name": "isCovered", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "duration": { - "name": "duration", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "distance": { - "name": "distance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "slope": { - "name": "slope", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "timeToArrive": { - "name": "timeToArrive", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "placeToArriveFrom": { - "name": "placeToArriveFrom", - "type": "enum('townCenter','parking','beach','road')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isFreeWithLocalStamp": { - "name": "isFreeWithLocalStamp", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "howNarrow": { - "name": "howNarrow", - "type": "enum('extremlyNarrow','narrow','extraSpace','wide','veryWide')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccessNotes": { - "name": "allowedAccessNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocationNotes": { - "name": "hasInacurateLocationNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfoNotes": { - "name": "hasMissingInfoNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymoreNotes": { - "name": "notThereAnymoreNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccessNotes": { - "name": "allowedAccessNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocationNotes": { - "name": "hasInacurateLocationNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfoNotes": { - "name": "hasMissingInfoNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymoreNotes": { - "name": "notThereAnymoreNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "image": { - "name": "image", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "key": { - "name": "key", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "width": { - "name": "width", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "captureDate": { - "name": "captureDate", - "type": "date", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "alt": { - "name": "alt", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "blurDataURL": { - "name": "blurDataURL", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "image_id": { - "name": "image_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "order": { - "name": "order", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId_pk": { - "name": "placeToPlaceCategory_categoryId_placeId_pk", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId_pk": { - "name": "placeListToPlace_placeId_placeListId_pk", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "googleMapsId": { - "name": "googleMapsId", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importance": { - "name": "importance", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "route": { - "name": "route", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "path": { - "name": "path", - "type": "MULTILINESTRING SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importance": { - "name": "importance", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_id": { - "name": "route_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToPlace": { - "name": "routeToPlace", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToPlace_placeId_routeId_pk": { - "name": "routeToPlace_placeId_routeId_pk", - "columns": [ - "placeId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - }, - "route_translation": { - "name": "route_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "route_id": { - "name": "route_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_translation_id": { - "name": "route_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'user'" - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationRequirement": { - "name": "verificationRequirement", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isLocationRequired": { - "name": "isLocationRequired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "maxLocationDistance": { - "name": "maxLocationDistance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationRequirement_id": { - "name": "verificationRequirement_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "verification": { - "name": "verification", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "validatedOn": { - "name": "validatedOn", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "deviceLocation": { - "name": "deviceLocation", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deviceLocationAccuracy": { - "name": "deviceLocationAccuracy", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verification_id": { - "name": "verification_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategoryToPlaceCategoryGroup": { - "name": "placeCategoryToPlaceCategoryGroup", - "columns": { - "categoryGroupId": { - "name": "categoryGroupId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategoryToPlaceCategoryGroup_categoryGroupId_categoryId_pk": { - "name": "placeCategoryToPlaceCategoryGroup_categoryGroupId_categoryId_pk", - "columns": [ - "categoryGroupId", - "categoryId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategoryGroup": { - "name": "placeCategoryGroup", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "order": { - "name": "order", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategoryGroup_id": { - "name": "placeCategoryGroup_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategoryGroup_translation": { - "name": "placeCategoryGroup_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategoryGroup_id": { - "name": "placeCategoryGroup_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategoryGroup_translation_id": { - "name": "placeCategoryGroup_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory": { - "name": "routeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "order": { - "name": "order", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_id": { - "name": "routeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory_translation": { - "name": "routeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "routeCategory_id": { - "name": "routeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_translation_id": { - "name": "routeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToRouteCategory": { - "name": "routeToRouteCategory", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToRouteCategory_categoryId_routeId_pk": { - "name": "routeToRouteCategory_categoryId_routeId_pk", - "columns": [ - "categoryId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0027_snapshot.json b/drizzle/meta/0027_snapshot.json deleted file mode 100644 index e6bc9c28..00000000 --- a/drizzle/meta/0027_snapshot.json +++ /dev/null @@ -1,1824 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "8bbc9370-c1e6-44fb-860e-06ce5a870846", - "prevId": "4c53b12c-2999-408a-92f1-df61177bcdb0", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId_pk": { - "name": "account_provider_providerAccountId_pk", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token_pk": { - "name": "verificationToken_identifier_token_pk", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "externalLink": { - "name": "externalLink", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isOfficialWebsite": { - "name": "isOfficialWebsite", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "externalLink_id": { - "name": "externalLink_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "externalLink_translation": { - "name": "externalLink_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "externalLink_id": { - "name": "externalLink_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "externalLink_translation_id": { - "name": "externalLink_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature": { - "name": "feature", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "amountOfPeople": { - "name": "amountOfPeople", - "type": "enum('none','few','some','many','crowded')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficulty": { - "name": "difficulty", - "type": "enum('accessible','normal','smallEffort','hard','dangerous')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "groundType": { - "name": "groundType", - "type": "enum('sand','pebbles','rocks','concrete','dirt','pavimented')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBus": { - "name": "hasBus", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasParking": { - "name": "hasParking", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "parkingSpaces": { - "name": "parkingSpaces", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasToilet": { - "name": "hasToilet", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasRestaurant": { - "name": "hasRestaurant", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasDrinkingWater": { - "name": "hasDrinkingWater", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasShower": { - "name": "hasShower", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLifeguard": { - "name": "hasLifeguard", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasLeisure": { - "name": "hasLeisure", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isNudist": { - "name": "isNudist", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasUnofficialName": { - "name": "hasUnofficialName", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocation": { - "name": "hasInacurateLocation", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "date": { - "name": "date", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isBoatOnly": { - "name": "isBoatOnly", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "trainingLevel": { - "name": "trainingLevel", - "type": "enum('noTraining','amateur','entryLevel','advanced','professional','elite')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfo": { - "name": "hasMissingInfo", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depth": { - "name": "depth", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depthMin": { - "name": "depthMin", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "depthMax": { - "name": "depthMax", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scubaDivingLevel": { - "name": "scubaDivingLevel", - "type": "enum('discoverScubaDiving','openWater','advancedOpenWater','specialtyDiver','technicalDiver')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymore": { - "name": "notThereAnymore", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isOutOfTheMunicipality": { - "name": "isOutOfTheMunicipality", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasBench": { - "name": "hasBench", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccess": { - "name": "allowedAccess", - "type": "enum('public','permissive','customers','permit','private','mixed')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dimensions": { - "name": "dimensions", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "price": { - "name": "price", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceUnit": { - "name": "priceUnit", - "type": "enum('eur','eur/minute','eur/hour','eur/day')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isCovered": { - "name": "isCovered", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "duration": { - "name": "duration", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "distance": { - "name": "distance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "slope": { - "name": "slope", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "timeToArrive": { - "name": "timeToArrive", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "placeToArriveFrom": { - "name": "placeToArriveFrom", - "type": "enum('townCenter','parking','beach','road')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "isFreeWithLocalStamp": { - "name": "isFreeWithLocalStamp", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "howNarrow": { - "name": "howNarrow", - "type": "enum('extremlyNarrow','narrow','extraSpace','wide','veryWide')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccessNotes": { - "name": "allowedAccessNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocationNotes": { - "name": "hasInacurateLocationNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfoNotes": { - "name": "hasMissingInfoNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymoreNotes": { - "name": "notThereAnymoreNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_id": { - "name": "feature_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "feature_translation": { - "name": "feature_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "feature_id": { - "name": "feature_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "difficultyNotes": { - "name": "difficultyNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "priceNotes": { - "name": "priceNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "allowedAccessNotes": { - "name": "allowedAccessNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasInacurateLocationNotes": { - "name": "hasInacurateLocationNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hasMissingInfoNotes": { - "name": "hasMissingInfoNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "notThereAnymoreNotes": { - "name": "notThereAnymoreNotes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "feature_translation_id": { - "name": "feature_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "image": { - "name": "image", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "key": { - "name": "key", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "width": { - "name": "width", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "height": { - "name": "height", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "captureDate": { - "name": "captureDate", - "type": "date", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "alt": { - "name": "alt", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "blurDataURL": { - "name": "blurDataURL", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "image_id": { - "name": "image_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory": { - "name": "placeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "order": { - "name": "order", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_id": { - "name": "placeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategory_translation": { - "name": "placeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategory_id": { - "name": "placeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategory_translation_id": { - "name": "placeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeToPlaceCategory": { - "name": "placeToPlaceCategory", - "columns": { - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeToPlaceCategory_categoryId_placeId_pk": { - "name": "placeToPlaceCategory_categoryId_placeId_pk", - "columns": [ - "categoryId", - "placeId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategoryToPlaceCategoryGroup": { - "name": "placeCategoryToPlaceCategoryGroup", - "columns": { - "categoryGroupId": { - "name": "categoryGroupId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "highlight": { - "name": "highlight", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategoryToPlaceCategoryGroup_categoryGroupId_categoryId_pk": { - "name": "placeCategoryToPlaceCategoryGroup_categoryGroupId_categoryId_pk", - "columns": [ - "categoryGroupId", - "categoryId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategoryGroup": { - "name": "placeCategoryGroup", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "order": { - "name": "order", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategoryGroup_id": { - "name": "placeCategoryGroup_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeCategoryGroup_translation": { - "name": "placeCategoryGroup_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeCategoryGroup_id": { - "name": "placeCategoryGroup_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeCategoryGroup_translation_id": { - "name": "placeCategoryGroup_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "placeListToPlace": { - "name": "placeListToPlace", - "columns": { - "placeListId": { - "name": "placeListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addedAt": { - "name": "addedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeListToPlace_placeId_placeListId_pk": { - "name": "placeListToPlace_placeId_placeListId_pk", - "columns": [ - "placeId", - "placeListId" - ] - } - }, - "uniqueConstraints": {} - }, - "placeList": { - "name": "placeList", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "placeList_id": { - "name": "placeList_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place": { - "name": "place", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "googleMapsId": { - "name": "googleMapsId", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importance": { - "name": "importance", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_id": { - "name": "place_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "place_translation": { - "name": "place_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "place_id": { - "name": "place_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "place_translation_id": { - "name": "place_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory": { - "name": "routeCategory", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "icon": { - "name": "icon", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hasVisitMission": { - "name": "hasVisitMission", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "order": { - "name": "order", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_id": { - "name": "routeCategory_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeCategory_translation": { - "name": "routeCategory_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "routeCategory_id": { - "name": "routeCategory_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namePlural": { - "name": "namePlural", - "type": "tinytext", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "nameGender": { - "name": "nameGender", - "type": "enum('masculine','feminine')", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeCategory_translation_id": { - "name": "routeCategory_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToRouteCategory": { - "name": "routeToRouteCategory", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "categoryId": { - "name": "categoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToRouteCategory_categoryId_routeId_pk": { - "name": "routeToRouteCategory_categoryId_routeId_pk", - "columns": [ - "categoryId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - }, - "route": { - "name": "route", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "mainImageId": { - "name": "mainImageId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "path": { - "name": "path", - "type": "MULTILINESTRING SRID 25831", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mainCategoryId": { - "name": "mainCategoryId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "featuresId": { - "name": "featuresId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "verificationRequirementsId": { - "name": "verificationRequirementsId", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importance": { - "name": "importance", - "type": "double", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_id": { - "name": "route_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "routeToPlace": { - "name": "routeToPlace", - "columns": { - "routeId": { - "name": "routeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "routeToPlace_placeId_routeId_pk": { - "name": "routeToPlace_placeId_routeId_pk", - "columns": [ - "placeId", - "routeId" - ] - } - }, - "uniqueConstraints": {} - }, - "route_translation": { - "name": "route_translation", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "route_id": { - "name": "route_id", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "locale": { - "name": "locale", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "tinytext", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "route_translation_id": { - "name": "route_translation_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashedPassword": { - "name": "hashedPassword", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'user'" - }, - "visitedPlaceListId": { - "name": "visitedPlaceListId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationRequirement": { - "name": "verificationRequirement", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "isLocationRequired": { - "name": "isLocationRequired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "maxLocationDistance": { - "name": "maxLocationDistance", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationRequirement_id": { - "name": "verificationRequirement_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - }, - "verification": { - "name": "verification", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "placeId": { - "name": "placeId", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "validatedOn": { - "name": "validatedOn", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "deviceLocation": { - "name": "deviceLocation", - "type": "POINT SRID 25831", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deviceLocationAccuracy": { - "name": "deviceLocationAccuracy", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verification_id": { - "name": "verification_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index e704c212..9f1a50bb 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -1,201 +1,12 @@ { "version": "5", - "dialect": "mysql", + "dialect": "pg", "entries": [ { "idx": 0, "version": "5", - "when": 1697892204087, - "tag": "0000_mute_harrier", - "breakpoints": true - }, - { - "idx": 1, - "version": "5", - "when": 1697998014565, - "tag": "0001_friendly_yellowjacket", - "breakpoints": true - }, - { - "idx": 2, - "version": "5", - "when": 1697999070080, - "tag": "0002_productive_thunderbolt", - "breakpoints": true - }, - { - "idx": 3, - "version": "5", - "when": 1698187240633, - "tag": "0003_colorful_fat_cobra", - "breakpoints": true - }, - { - "idx": 4, - "version": "5", - "when": 1698286606173, - "tag": "0004_curvy_colleen_wing", - "breakpoints": true - }, - { - "idx": 5, - "version": "5", - "when": 1698442666925, - "tag": "0005_daily_sersi", - "breakpoints": true - }, - { - "idx": 6, - "version": "5", - "when": 1698960353454, - "tag": "0006_orange_morbius", - "breakpoints": true - }, - { - "idx": 7, - "version": "5", - "when": 1698964258438, - "tag": "0007_nifty_shinko_yamashiro", - "breakpoints": true - }, - { - "idx": 8, - "version": "5", - "when": 1699040940236, - "tag": "0008_military_punisher", - "breakpoints": true - }, - { - "idx": 9, - "version": "5", - "when": 1699126270640, - "tag": "0009_blue_selene", - "breakpoints": true - }, - { - "idx": 10, - "version": "5", - "when": 1699292532393, - "tag": "0010_fixed_mongoose", - "breakpoints": true - }, - { - "idx": 11, - "version": "5", - "when": 1699397949355, - "tag": "0011_dapper_la_nuit", - "breakpoints": true - }, - { - "idx": 12, - "version": "5", - "when": 1706045234760, - "tag": "0012_sad_wilson_fisk", - "breakpoints": true - }, - { - "idx": 13, - "version": "5", - "when": 1707051262344, - "tag": "0013_pretty_magma", - "breakpoints": true - }, - { - "idx": 14, - "version": "5", - "when": 1707156826688, - "tag": "0014_white_shatterstar", - "breakpoints": true - }, - { - "idx": 15, - "version": "5", - "when": 1707672827538, - "tag": "0015_even_zuras", - "breakpoints": true - }, - { - "idx": 16, - "version": "5", - "when": 1707768501678, - "tag": "0016_robust_goliath", - "breakpoints": true - }, - { - "idx": 17, - "version": "5", - "when": 1707913502270, - "tag": "0017_tricky_hellfire_club", - "breakpoints": true - }, - { - "idx": 18, - "version": "5", - "when": 1708040528072, - "tag": "0018_blushing_daimon_hellstrom", - "breakpoints": true - }, - { - "idx": 19, - "version": "5", - "when": 1708425618677, - "tag": "0019_warm_zaladane", - "breakpoints": true - }, - { - "idx": 20, - "version": "5", - "when": 1708619014761, - "tag": "0020_lyrical_white_queen", - "breakpoints": true - }, - { - "idx": 21, - "version": "5", - "when": 1708641839574, - "tag": "0021_brainy_tyrannus", - "breakpoints": true - }, - { - "idx": 22, - "version": "5", - "when": 1708969809400, - "tag": "0022_purple_scarlet_witch", - "breakpoints": true - }, - { - "idx": 23, - "version": "5", - "when": 1709578455223, - "tag": "0023_melodic_dragon_man", - "breakpoints": true - }, - { - "idx": 24, - "version": "5", - "when": 1709580341555, - "tag": "0024_confused_the_liberteens", - "breakpoints": true - }, - { - "idx": 25, - "version": "5", - "when": 1709646851287, - "tag": "0025_quiet_stark_industries", - "breakpoints": true - }, - { - "idx": 26, - "version": "5", - "when": 1709681591503, - "tag": "0026_thick_ben_parker", - "breakpoints": true - }, - { - "idx": 27, - "version": "5", - "when": 1710885080731, - "tag": "0027_lonely_goliath", + "when": 1712517007312, + "tag": "0000_previous_ozymandias", "breakpoints": true } ] diff --git a/package.json b/package.json index af69a374..cffe56ae 100644 --- a/package.json +++ b/package.json @@ -11,22 +11,23 @@ "test:integration:dev": "SKIP_ENV_VALIDATION=true jest --watch", "test:e2e": "playwright test", "test:e2e:dev": "playwright test --ui", - "db:generate": "SKIP_ENV_VALIDATION=true drizzle-kit generate:mysql", - "db:push": "drizzle-kit push:mysql", + "db:generate": "SKIP_ENV_VALIDATION=true drizzle-kit generate:pg", + "db:push": "drizzle-kit push:pg", "db:studio": "drizzle-kit studio", "db:local:studio": "USE_LOCAL_DB=true drizzle-kit studio", "db:local:migrate": "USE_LOCAL_DB=true node ./src/server/db/migrate.mjs", "db:local:run-app": "USE_LOCAL_DB=true NEXT_PUBLIC_ENV_LABEL=local next dev", - "db:local:run-db": "docker run --name descobreix-begur-app-database -e MYSQL_ROOT_PASSWORD=unsafePaswordOnlyForLocalhost -e MYSQL_DATABASE=descobreix-begur-app -p 3306:3306 mysql" + "db:local:run-db": "# TODO update from mysql to postgresql # docker run --name descobreix-begur-app-database -e MYSQL_ROOT_PASSWORD=unsafePaswordOnlyForLocalhost -e MYSQL_DATABASE=descobreix-begur-app -p 3306:3306 mysql" }, "dependencies": { "@auth/core": "0.26.3", + "@auth/drizzle-adapter": "0.8.2", "@aws-sdk/client-s3": "3.511.0", "@ducanh2912/next-pwa": "10.2.5", "@hookform/resolvers": "3.3.4", + "@neondatabase/serverless": "0.9.0", "@nextui-org/react": "2.2.9", "@petoc/leaflet-double-touch-drag-zoom": "1.0.3", - "@planetscale/database": "1.16.0", "@tabler/icons-react": "2.47.0", "@tanstack/react-query": "4.36.1", "@trpc/client": "10.45.1", @@ -38,7 +39,7 @@ "autoprefixer": "10.4.17", "bcryptjs": "2.4.3", "clsx": "2.1.0", - "drizzle-orm": "0.29.3", + "drizzle-orm": "0.30.7", "drizzle-zod": "0.5.1", "eslint-plugin-drizzle": "0.2.3", "framer-motion": "11.0.3", @@ -51,6 +52,7 @@ "next-auth": "4.24.5", "next-intl": "3.7.0", "postcss": "8.4.35", + "postgres": "3.4.4", "react": "18.2.0", "react-dom": "18.2.0", "react-hook-form": "7.50.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 870c9bcd..77a0d67a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ dependencies: '@auth/core': specifier: 0.26.3 version: 0.26.3 + '@auth/drizzle-adapter': + specifier: 0.8.2 + version: 0.8.2 '@aws-sdk/client-s3': specifier: 3.511.0 version: 3.511.0 @@ -17,15 +20,15 @@ dependencies: '@hookform/resolvers': specifier: 3.3.4 version: 3.3.4(react-hook-form@7.50.1) + '@neondatabase/serverless': + specifier: 0.9.0 + version: 0.9.0 '@nextui-org/react': specifier: 2.2.9 version: 2.2.9(@types/react@18.2.55)(framer-motion@11.0.3)(react-dom@18.2.0)(react@18.2.0)(tailwind-variants@0.1.20)(tailwindcss@3.4.1) '@petoc/leaflet-double-touch-drag-zoom': specifier: 1.0.3 version: 1.0.3(leaflet@1.9.4) - '@planetscale/database': - specifier: 1.16.0 - version: 1.16.0 '@tabler/icons-react': specifier: 2.47.0 version: 2.47.0(react@18.2.0) @@ -60,11 +63,11 @@ dependencies: specifier: 2.1.0 version: 2.1.0 drizzle-orm: - specifier: 0.29.3 - version: 0.29.3(@planetscale/database@1.16.0)(@types/react@18.2.55)(mysql2@3.9.1)(react@18.2.0) + specifier: 0.30.7 + version: 0.30.7(@neondatabase/serverless@0.9.0)(@types/react@18.2.55)(mysql2@3.9.1)(postgres@3.4.4)(react@18.2.0) drizzle-zod: specifier: 0.5.1 - version: 0.5.1(drizzle-orm@0.29.3)(zod@3.22.4) + version: 0.5.1(drizzle-orm@0.30.7)(zod@3.22.4) eslint-plugin-drizzle: specifier: 0.2.3 version: 0.2.3(eslint@8.56.0) @@ -98,6 +101,9 @@ dependencies: postcss: specifier: 8.4.35 version: 8.4.35 + postgres: + specifier: 3.4.4 + version: 3.4.4 react: specifier: 18.2.0 version: 18.2.0 @@ -304,6 +310,39 @@ packages: preact-render-to-string: 5.2.3(preact@10.11.3) dev: false + /@auth/core@0.28.2: + resolution: {integrity: sha512-Rlvu6yKa4bKbhQESMaEm6jHOY5ncIrsrQkC8tcwVQmf+cBLk7ReI9DIJS2O/WkIDoOwvM9PHiXTi5b+b/eyXxw==} + peerDependencies: + '@simplewebauthn/browser': ^9.0.1 + '@simplewebauthn/server': ^9.0.2 + nodemailer: ^6.8.0 + peerDependenciesMeta: + '@simplewebauthn/browser': + optional: true + '@simplewebauthn/server': + optional: true + nodemailer: + optional: true + dependencies: + '@panva/hkdf': 1.1.1 + '@types/cookie': 0.6.0 + cookie: 0.6.0 + jose: 5.2.1 + oauth4webapi: 2.10.3 + preact: 10.11.3 + preact-render-to-string: 5.2.3(preact@10.11.3) + dev: false + + /@auth/drizzle-adapter@0.8.2: + resolution: {integrity: sha512-IrySrHLr427+J5CjiM5fI6XFDmH5R2G7wd4E26z+J64C3t2aegdZdlfMAUerLjeoxAXnMas7bECtOYRO33EfKA==} + dependencies: + '@auth/core': 0.28.2 + transitivePeerDependencies: + - '@simplewebauthn/browser' + - '@simplewebauthn/server' + - nodemailer + dev: false + /@aws-crypto/crc32@3.0.0: resolution: {integrity: sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==} dependencies: @@ -2967,6 +3006,12 @@ packages: '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 + /@neondatabase/serverless@0.9.0: + resolution: {integrity: sha512-mmJnUAzlzvxNSZuuhI6kgJjH+JgFdBMYUWxihtq/nj0Tjt+Y5UU3W+SvRFoucnd5NObYkuLYQzk+zV5DGFKGJg==} + dependencies: + '@types/pg': 8.6.6 + dev: false + /@next/env@14.1.0: resolution: {integrity: sha512-Py8zIo+02ht82brwwhTg36iogzFqGLPXlRGKQw5s+qP/kMNc4MAyDeEwBKDijk6zTIbegEgu8Qy7C1LboslQAw==} @@ -4374,11 +4419,6 @@ packages: requiresBuild: true optional: true - /@planetscale/database@1.16.0: - resolution: {integrity: sha512-HNUrTqrd8aTRZYMDcsoZ62s36sIWkMMmKZBOehoCWR2WrfNPKq+Q1yQef5okl3pSVlldFnu2h/dbHjOsDTHXug==} - engines: {node: '>=16'} - dev: false - /@playwright/test@1.41.2: resolution: {integrity: sha512-qQB9h7KbibJzrDpkXkYvsmiDJK14FULCCZgEcoe2AvFAS64oCirWTwzTlAYEbKaRxWs5TFesE1Na6izMv3HfGg==} engines: {node: '>=16'} @@ -6184,6 +6224,14 @@ packages: dependencies: undici-types: 5.26.5 + /@types/pg@8.6.6: + resolution: {integrity: sha512-O2xNmXebtwVekJDD+02udOncjVcMZQuTEQEMpKJ0ZRf5E7/9JJX3izhKUcUifBkyKpljyUM6BTgy2trmviKlpw==} + dependencies: + '@types/node': 20.11.17 + pg-protocol: 1.6.1 + pg-types: 2.2.0 + dev: false + /@types/prismjs@1.26.3: resolution: {integrity: sha512-A0D0aTXvjlqJ5ZILMz3rNfDBOx9hHxLZYv2by47Sm/pqW35zzjusrZTryatjN/Rf8Us2gZrJD+KeHbUSTux1Cw==} dev: false @@ -7738,20 +7786,23 @@ packages: - supports-color dev: true - /drizzle-orm@0.29.3(@planetscale/database@1.16.0)(@types/react@18.2.55)(mysql2@3.9.1)(react@18.2.0): - resolution: {integrity: sha512-uSE027csliGSGYD0pqtM+SAQATMREb3eSM/U8s6r+Y0RFwTKwftnwwSkqx3oS65UBgqDOM0gMTl5UGNpt6lW0A==} + /drizzle-orm@0.30.7(@neondatabase/serverless@0.9.0)(@types/react@18.2.55)(mysql2@3.9.1)(postgres@3.4.4)(react@18.2.0): + resolution: {integrity: sha512-9qefSZQlu2fO2qv24piHyWFWcxcOY15//0v4j8qomMqaxzipNoG+fUBrQ7Ftk7PY7APRbRdn/nkEXWxiI4a8mw==} peerDependencies: '@aws-sdk/client-rds-data': '>=3' '@cloudflare/workers-types': '>=3' + '@electric-sql/pglite': '>=0.1.1' '@libsql/client': '*' '@neondatabase/serverless': '>=0.1' + '@op-engineering/op-sqlite': '>=2' '@opentelemetry/api': ^1.4.1 '@planetscale/database': '>=1' '@types/better-sqlite3': '*' '@types/pg': '*' '@types/react': '>=18' '@types/sql.js': '*' - '@vercel/postgres': '*' + '@vercel/postgres': '>=0.8.0' + '@xata.io/client': '*' better-sqlite3: '>=7' bun-types: '*' expo-sqlite: '>=13.2.0' @@ -7768,10 +7819,14 @@ packages: optional: true '@cloudflare/workers-types': optional: true + '@electric-sql/pglite': + optional: true '@libsql/client': optional: true '@neondatabase/serverless': optional: true + '@op-engineering/op-sqlite': + optional: true '@opentelemetry/api': optional: true '@planetscale/database': @@ -7786,6 +7841,8 @@ packages: optional: true '@vercel/postgres': optional: true + '@xata.io/client': + optional: true better-sqlite3: optional: true bun-types: @@ -7809,19 +7866,20 @@ packages: sqlite3: optional: true dependencies: - '@planetscale/database': 1.16.0 + '@neondatabase/serverless': 0.9.0 '@types/react': 18.2.55 mysql2: 3.9.1 + postgres: 3.4.4 react: 18.2.0 dev: false - /drizzle-zod@0.5.1(drizzle-orm@0.29.3)(zod@3.22.4): + /drizzle-zod@0.5.1(drizzle-orm@0.30.7)(zod@3.22.4): resolution: {integrity: sha512-C/8bvzUH/zSnVfwdSibOgFjLhtDtbKYmkbPbUCq46QZyZCH6kODIMSOgZ8R7rVjoI+tCj3k06MRJMDqsIeoS4A==} peerDependencies: drizzle-orm: '>=0.23.13' zod: '*' dependencies: - drizzle-orm: 0.29.3(@planetscale/database@1.16.0)(@types/react@18.2.55)(mysql2@3.9.1)(react@18.2.0) + drizzle-orm: 0.30.7(@neondatabase/serverless@0.9.0)(@types/react@18.2.55)(mysql2@3.9.1)(postgres@3.4.4)(react@18.2.0) zod: 3.22.4 dev: false @@ -11336,6 +11394,26 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} + /pg-int8@1.0.1: + resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==} + engines: {node: '>=4.0.0'} + dev: false + + /pg-protocol@1.6.1: + resolution: {integrity: sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg==} + dev: false + + /pg-types@2.2.0: + resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==} + engines: {node: '>=4'} + dependencies: + pg-int8: 1.0.1 + postgres-array: 2.0.0 + postgres-bytea: 1.0.0 + postgres-date: 1.0.7 + postgres-interval: 1.2.0 + dev: false + /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} @@ -11470,6 +11548,33 @@ packages: picocolors: 1.0.0 source-map-js: 1.0.2 + /postgres-array@2.0.0: + resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==} + engines: {node: '>=4'} + dev: false + + /postgres-bytea@1.0.0: + resolution: {integrity: sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==} + engines: {node: '>=0.10.0'} + dev: false + + /postgres-date@1.0.7: + resolution: {integrity: sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==} + engines: {node: '>=0.10.0'} + dev: false + + /postgres-interval@1.2.0: + resolution: {integrity: sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==} + engines: {node: '>=0.10.0'} + dependencies: + xtend: 4.0.2 + dev: false + + /postgres@3.4.4: + resolution: {integrity: sha512-IbyN+9KslkqcXa8AO9fxpk97PA4pzewvpi2B3Dwy9u4zpV32QicaEdgmF3eSQUzdRk7ttDHQejNgAEr4XoeH4A==} + engines: {node: '>=12'} + dev: false + /preact-render-to-string@5.2.3(preact@10.11.3): resolution: {integrity: sha512-aPDxUn5o3GhWdtJtW0svRC2SS/l8D9MAgo2+AWml+BhDImb27ALf04Q2d+AHqUUOc6RdSXFIBVa2gxzgMKgtZA==} peerDependencies: @@ -13834,6 +13939,11 @@ packages: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} dev: true + /xtend@4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + dev: false + /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} diff --git a/src/app/api/upload/place-image/route.ts b/src/app/api/upload/place-image/route.ts index d1c22a73..98ce9bb5 100644 --- a/src/app/api/upload/place-image/route.ts +++ b/src/app/api/upload/place-image/route.ts @@ -30,20 +30,22 @@ export const POST = withAxiom(async (request) => { }) const rawDate = formData.get('captureDate')?.toString() - const insertImageResult = await db - .insert(images) - .values({ - ...image, - alt: formData.get('alt')?.toString(), - source: formData.get('source')?.toString(), - captureDate: rawDate ? new Date(rawDate) : null, - }) - .execute() - const imageId = Number(insertImageResult.insertId) + const newImage = ( + await db + .insert(images) + .values({ + ...image, + alt: formData.get('alt')?.toString(), + source: formData.get('source')?.toString(), + captureDate: rawDate ? new Date(rawDate) : null, + }) + .returning() + .execute() + )[0] return NextResponse.json({ image: { - id: imageId, + id: newImage.id, ...image, }, } satisfies UploadPlaceImageResponse) diff --git a/src/env.mjs b/src/env.mjs index 1eb9b7d0..c4c754c2 100644 --- a/src/env.mjs +++ b/src/env.mjs @@ -21,10 +21,12 @@ const server = z.object({ .optional(), USE_LOCAL_DB: z.union([z.literal('true'), z.literal('false')]).optional(), - DATABASE_HOST: z.string().min(1), - DATABASE_USERNAME: z.string().min(1), - DATABASE_PASSWORD: z.string().min(1), - DATABASE_NAME: z.string().min(1), + DATABASE_URL: z + .string() + .min(1) + .regex( + /^(?:([^:/?#\s]+):\/{2})?(?:([^@/?#\s]+)@)?([^/?#\s]+)?(?:\/([^?#\s]*))?(?:[?]([^#\s]+))?\S*$/ + ), AWS_ACCESS_KEY_ID: z.string().min(1), AWS_SECRET_ACCESS_KEY: z.string().min(1), }) @@ -84,10 +86,7 @@ const processEnv = { NEXT_PUBLIC_ENV_LABEL: process.env.NEXT_PUBLIC_ENV_LABEL, USE_LOCAL_DB: process.env.USE_LOCAL_DB, - DATABASE_HOST: process.env.DATABASE_HOST, - DATABASE_USERNAME: process.env.DATABASE_USERNAME, - DATABASE_PASSWORD: process.env.DATABASE_PASSWORD, - DATABASE_NAME: process.env.DATABASE_NAME, + DATABASE_URL: process.env.DATABASE_URL, AWS_ACCESS_KEY_ID: process.env.AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY: process.env.AWS_SECRET_ACCESS_KEY, @@ -117,11 +116,11 @@ if (!!process.env.SKIP_ENV_VALIDATION == false) { ) if (parsed.success === false) { - console.error( - '❌ Invalid environment variables:', - parsed.error.flatten().fieldErrors + const errors = parsed.error.flatten().fieldErrors + console.error('❌ Invalid environment variables:', errors) + throw new Error( + `Invalid environment variables: \n${JSON.stringify(errors, null, 2)}` ) - throw new Error('Invalid environment variables') } // eslint-disable-next-line @typescript-eslint/ban-ts-comment diff --git a/src/server/api/router/admin/images.ts b/src/server/api/router/admin/images.ts index 95d75882..b69d3a66 100644 --- a/src/server/api/router/admin/images.ts +++ b/src/server/api/router/admin/images.ts @@ -1,8 +1,8 @@ -import { sql } from 'drizzle-orm' import 'server-only' + +import { sql } from 'drizzle-orm' import { z } from 'zod' import { numericIdSchema } from '~/schemas/shared' - import { db } from '~/server/db/db' import { adminProcedure, router } from '~/server/trpc' @@ -10,12 +10,13 @@ const getByIdSchema = z.object({ id: numericIdSchema.nullable().optional(), }) -const getAllImages = db.query.images.findMany().prepare() +const getAllImages = db.query.images.findMany().prepare('images/getAll') const getById = db.query.images .findFirst({ - where: (image, { eq }) => eq(image.id, sql.placeholder('id')), + where: (image, { eq }) => + eq(image.id, sql`${sql.placeholder('id')}::integer`), }) - .prepare() + .prepare('images/getById') export const imagesAdminRouter = router({ getAll: adminProcedure.query(async () => { diff --git a/src/server/api/router/admin/places.ts b/src/server/api/router/admin/places.ts index d7d76f78..9c3f42df 100644 --- a/src/server/api/router/admin/places.ts +++ b/src/server/api/router/admin/places.ts @@ -81,7 +81,7 @@ const getAllPlaces = ({ }, }) ) - .prepare() + .prepare('admin/places/getAllPlaces') ).execute({ locale }) const getAllPlaceIds = db @@ -94,18 +94,24 @@ const getAllPlaceIds = db .where( and( or( - isNull(sql.placeholder('categoryId')), - eq(places.mainCategoryId, sql.placeholder('categoryId')), - eq(placesToPlaceCategories.categoryId, sql.placeholder('categoryId')) + isNull(sql`${sql.placeholder('categoryId')}::integer`), + eq( + places.mainCategoryId, + sql`${sql.placeholder('categoryId')}::integer` + ), + eq( + placesToPlaceCategories.categoryId, + sql`${sql.placeholder('categoryId')}::integer` + ) ), or( - isNull(sql.placeholder('query')), - like(places.name, sql.placeholder('query')) + isNull(sql`${sql.placeholder('query')}::text`), + like(places.name, sql`${sql.placeholder('query')}::text`) ) ) ) .orderBy(ascNullsEnd(places.importance), asc(places.id)) - .prepare() + .prepare('admin/places/getAllPlaceIds') const listCategories = flattenTranslationsOnExecute( db.query.placeCategories @@ -123,7 +129,7 @@ const listCategories = flattenTranslationsOnExecute( orderBy: [ascNullsEnd(placeCategories.order)], }) ) - .prepare() + .prepare('admin/places/listCategories') ) const getPlace = flattenTranslationsOnExecute( @@ -141,7 +147,8 @@ const getPlace = flattenTranslationsOnExecute( extras: { location: selectPoint('location', places.location), }, - where: (place, { eq }) => eq(place.id, sql.placeholder('id')), + where: (place, { eq }) => + eq(place.id, sql`${sql.placeholder('id')}::integer`), with: { mainImage: true, externalLinks: withTranslations({}), @@ -169,7 +176,7 @@ const getPlace = flattenTranslationsOnExecute( }, }) ) - .prepare() + .prepare('admin/places/getPlace') ) export const placesAdminRouter = router({ @@ -211,30 +218,35 @@ export const placesAdminRouter = router({ .input(createPlaceSchema) .mutation(async ({ input }) => { await db.transaction(async (tx) => { - const insertFeaturesResult = await tx - .insert(features) - .values({ ...input.features }) - - const featuresId = Number(insertFeaturesResult.insertId) + const newFeatures = ( + await tx + .insert(features) + .values({ ...input.features }) + .returning() + )[0] - const insertPlaceResult = await tx.insert(places).values({ - name: input.name, - description: input.description, - googleMapsId: input.googleMapsId, - mainCategoryId: input.mainCategory, - mainImageId: input.mainImageId, - location: pointToString(input.location), - importance: input.importance, - content: input.content, - verificationRequirementsId: 1, - featuresId, - }) - const newPlaceId = Number(insertPlaceResult.insertId) + const newPlace = ( + await tx + .insert(places) + .values({ + name: input.name, + description: input.description, + googleMapsId: input.googleMapsId, + mainCategoryId: input.mainCategory, + mainImageId: input.mainImageId, + location: pointToString(input.location), + importance: input.importance, + content: input.content, + verificationRequirementsId: 1, + featuresId: newFeatures.id, + }) + .returning() + )[0] if (input.categories.length > 0) { await tx.insert(placesToPlaceCategories).values( input.categories.map((categoryId) => ({ - placeId: newPlaceId, + placeId: newPlace.id, categoryId: categoryId, })) ) @@ -243,13 +255,13 @@ export const placesAdminRouter = router({ if (input.externalLinks.length > 0) { await tx.insert(externalLinks).values( input.externalLinks.map((externalLink) => ({ - placeId: newPlaceId, + placeId: newPlace.id, ...externalLink, })) ) } - return newPlaceId + return newPlace.id }) }), editPlace: adminProcedure diff --git a/src/server/api/router/admin/routes.ts b/src/server/api/router/admin/routes.ts index 3075ecb5..6ae3488b 100644 --- a/src/server/api/router/admin/routes.ts +++ b/src/server/api/router/admin/routes.ts @@ -84,7 +84,7 @@ const getAllRoutes = ({ }, }) ) - .prepare() + .prepare('admin/routes/getAllRoutes') ).execute({ locale }) const getAllRouteIds = db @@ -97,18 +97,24 @@ const getAllRouteIds = db .where( and( or( - isNull(sql.placeholder('categoryId')), - eq(routes.mainCategoryId, sql.placeholder('categoryId')), - eq(routesToRouteCategories.categoryId, sql.placeholder('categoryId')) + isNull(sql`${sql.placeholder('categoryId')}::integer`), + eq( + routes.mainCategoryId, + sql`${sql.placeholder('categoryId')}::integer` + ), + eq( + routesToRouteCategories.categoryId, + sql`${sql.placeholder('categoryId')}::integer` + ) ), or( - isNull(sql.placeholder('query')), - like(routes.name, sql.placeholder('query')) + isNull(sql`${sql.placeholder('query')}::text`), + like(routes.name, sql`${sql.placeholder('query')}::text`) ) ) ) .orderBy(ascNullsEnd(routes.importance), asc(routes.id)) - .prepare() + .prepare('admin/routes/getAllRouteIds') const listCategories = flattenTranslationsOnExecute( db.query.routeCategories @@ -126,7 +132,7 @@ const listCategories = flattenTranslationsOnExecute( orderBy: [ascNullsEnd(routeCategories.order)], }) ) - .prepare() + .prepare('admin/routes/listCategories') ) const getRoute = flattenTranslationsOnExecute( @@ -143,7 +149,8 @@ const getRoute = flattenTranslationsOnExecute( extras: { path: selectMultiLine('path', routes.path), }, - where: (route, { eq }) => eq(route.id, sql.placeholder('id')), + where: (route, { eq }) => + eq(route.id, sql`${sql.placeholder('id')}::integer`), with: { mainImage: true, externalLinks: withTranslations({}), @@ -171,7 +178,7 @@ const getRoute = flattenTranslationsOnExecute( }, }) ) - .prepare() + .prepare('admin/routes/getRoute') ) export const routesAdminRouter = router({ @@ -213,28 +220,33 @@ export const routesAdminRouter = router({ .input(createRouteSchema) .mutation(async ({ input }) => { await db.transaction(async (tx) => { - const insertFeaturesResult = await tx - .insert(features) - .values({ ...input.features }) - - const featuresId = Number(insertFeaturesResult.insertId) + const newFeatures = ( + await tx + .insert(features) + .values({ ...input.features }) + .returning() + )[0] - const insertRouteResult = await tx.insert(routes).values({ - name: input.name, - description: input.description, - mainCategoryId: input.mainCategory, - path: multiLineToString(input.path), - importance: input.importance, - content: input.content, - verificationRequirementsId: 1, - featuresId, - }) - const newRouteId = Number(insertRouteResult.insertId) + const newRoute = ( + await tx + .insert(routes) + .values({ + name: input.name, + description: input.description, + mainCategoryId: input.mainCategory, + path: multiLineToString(input.path), + importance: input.importance, + content: input.content, + verificationRequirementsId: 1, + featuresId: newFeatures.id, + }) + .returning() + )[0] if (input.categories.length > 0) { await tx.insert(routesToRouteCategories).values( input.categories.map((categoryId) => ({ - routeId: newRouteId, + routeId: newRoute.id, categoryId: categoryId, })) ) @@ -243,13 +255,13 @@ export const routesAdminRouter = router({ if (input.externalLinks.length > 0) { await tx.insert(externalLinks).values( input.externalLinks.map((externalLink) => ({ - routeId: newRouteId, + routeId: newRoute.id, ...externalLink, })) ) } - return newRouteId + return newRoute.id }) }), editRoute: adminProcedure diff --git a/src/server/api/router/explore.ts b/src/server/api/router/explore.ts index 2b3de468..6d33ff95 100644 --- a/src/server/api/router/explore.ts +++ b/src/server/api/router/explore.ts @@ -39,7 +39,7 @@ const getCategoryGroups = flattenTranslationsOnExecute( orderBy: (group) => [ascNullsEnd(group.order)], }) ) - .prepare() + .prepare('explore/getCategoryGroups') ) const getRouteCategories = flattenTranslationsOnExecute( @@ -56,7 +56,7 @@ const getRouteCategories = flattenTranslationsOnExecute( orderBy: (group) => [ascNullsEnd(group.order)], }) ) - .prepare() + .prepare('explore/getRouteCategories') ) export const exploreRouter = router({ diff --git a/src/server/api/router/map.ts b/src/server/api/router/map.ts index f70765d3..aec7eea5 100644 --- a/src/server/api/router/map.ts +++ b/src/server/api/router/map.ts @@ -28,7 +28,7 @@ const getAllPlacesForMap = db.query.places }, }, }) - .prepare() + .prepare('map/getAllPlacesForMap') const getAllRoutesForMap = db.query.routes .findMany({ @@ -50,7 +50,7 @@ const getAllRoutesForMap = db.query.routes }, }, }) - .prepare() + .prepare('map/getAllRoutesForMap') export const mapRouter = router({ getAllPlaces: publicProcedure.query(async () => { diff --git a/src/server/api/router/metadata.ts b/src/server/api/router/metadata.ts index 91bccbeb..ff65e538 100644 --- a/src/server/api/router/metadata.ts +++ b/src/server/api/router/metadata.ts @@ -19,7 +19,8 @@ const getPlace = flattenTranslationsOnExecute( name: true, description: true, }, - where: (place, { eq }) => eq(place.id, sql.placeholder('id')), + where: (place, { eq }) => + eq(place.id, sql`${sql.placeholder('id')}::integer`), with: { mainImage: { columns: { @@ -47,7 +48,7 @@ const getPlace = flattenTranslationsOnExecute( }, }) ) - .prepare() + .prepare('metadata/getPlace') ) const getRoute = flattenTranslationsOnExecute( @@ -59,7 +60,8 @@ const getRoute = flattenTranslationsOnExecute( name: true, description: true, }, - where: (route, { eq }) => eq(route.id, sql.placeholder('id')), + where: (route, { eq }) => + eq(route.id, sql`${sql.placeholder('id')}::integer`), with: { mainImage: { columns: { @@ -87,7 +89,7 @@ const getRoute = flattenTranslationsOnExecute( }, }) ) - .prepare() + .prepare('metadata/getRoute') ) export const metadataRouter = router({ diff --git a/src/server/api/router/missions.ts b/src/server/api/router/missions.ts index 96194750..c1ce72e1 100644 --- a/src/server/api/router/missions.ts +++ b/src/server/api/router/missions.ts @@ -34,13 +34,15 @@ const getVisitMissions = flattenTranslationsOnExecute( and( eq(placeCategories.hasVisitMission, true), or( - isNull(sql.placeholder('placeId')), + isNull(sql`${sql.placeholder('placeId')}::integer`), eq( placeCategories.id, db .selectDistinct({ data: places.mainCategoryId }) .from(places) - .where(eq(places.id, sql.placeholder('placeId'))) + .where( + eq(places.id, sql`${sql.placeholder('placeId')}::integer`) + ) ), inArray( placeCategories.id, @@ -50,7 +52,7 @@ const getVisitMissions = flattenTranslationsOnExecute( .where( eq( placesToPlaceCategories.placeId, - sql.placeholder('placeId') + sql`${sql.placeholder('placeId')}::integer` ) ) ) @@ -101,8 +103,11 @@ const getVisitMissions = flattenTranslationsOnExecute( ], where: (verification, { or, isNull, eq }) => or( - isNull(sql.placeholder('userId')), - eq(verification.userId, sql.placeholder('userId')) + isNull(sql`${sql.placeholder('userId')}::text`), + eq( + verification.userId, + sql`${sql.placeholder('userId')}::text` + ) ), limit: 1, }, @@ -152,8 +157,11 @@ const getVisitMissions = flattenTranslationsOnExecute( ], where: (verification, { or, isNull, eq }) => or( - isNull(sql.placeholder('userId')), - eq(verification.userId, sql.placeholder('userId')) + isNull(sql`${sql.placeholder('userId')}::text`), + eq( + verification.userId, + sql`${sql.placeholder('userId')}::text` + ) ), limit: 1, }, @@ -163,7 +171,7 @@ const getVisitMissions = flattenTranslationsOnExecute( }, }) ) - .prepare() + .prepare('missions/getVisitMissions') ) export const missionsRouter = router({ diff --git a/src/server/api/router/placeLists.ts b/src/server/api/router/placeLists.ts index 49bac950..f1d1ea71 100644 --- a/src/server/api/router/placeLists.ts +++ b/src/server/api/router/placeLists.ts @@ -20,10 +20,10 @@ import { protectedProcedure, router } from '~/server/trpc' const addToPlaceList = db .insert(placeListToPlace) .values({ - placeListId: sql.placeholder('placeListId'), - placeId: sql.placeholder('placeId'), + placeListId: sql`${sql.placeholder('placeListId')}::integer`, + placeId: sql`${sql.placeholder('placeId')}::integer`, }) - .prepare() + .prepare('placeLists/addToPlaceList') const getPlacesFromPlaceListQuery = flattenTranslationsOnExecute( db.query.placeListToPlace @@ -32,7 +32,10 @@ const getPlacesFromPlaceListQuery = flattenTranslationsOnExecute( addedAt: true, }, where: (placeList, { eq }) => - eq(placeList.placeListId, sql.placeholder('placeListId')), + eq( + placeList.placeListId, + sql`${sql.placeholder('placeListId')}::integer` + ), with: { place: withTranslations({ @@ -71,7 +74,7 @@ const getPlacesFromPlaceListQuery = flattenTranslationsOnExecute( }), }, }) - .prepare() + .prepare('placeLists/getPlacesFromPlaceList') ) const getPlacesFromPlaceListCountQuery = db.query.placeListToPlace @@ -80,9 +83,12 @@ const getPlacesFromPlaceListCountQuery = db.query.placeListToPlace placeId: true, }, where: (placeList, { eq }) => - eq(placeList.placeListId, sql.placeholder('placeListId')), + eq( + placeList.placeListId, + sql`${sql.placeholder('placeListId')}::integer` + ), }) - .prepare() + .prepare('placeLists/getPlacesFromPlaceListCount') export const placeListsRouter = router({ addToVisitedPlacesList: protectedProcedure diff --git a/src/server/api/router/places.ts b/src/server/api/router/places.ts index 480f85d4..6dc1b409 100644 --- a/src/server/api/router/places.ts +++ b/src/server/api/router/places.ts @@ -28,7 +28,8 @@ const getPlace = flattenTranslationsOnExecute( extras: { location: selectPoint('location', places.location), }, - where: (place, { eq }) => eq(place.id, sql.placeholder('id')), + where: (place, { eq }) => + eq(place.id, sql`${sql.placeholder('id')}::integer`), with: { mainImage: true, externalLinks: withTranslations({}), @@ -63,8 +64,8 @@ const getPlace = flattenTranslationsOnExecute( ], where: (verification, { or, isNull, eq }) => or( - isNull(sql.placeholder('userId')), - eq(verification.userId, sql.placeholder('userId')) + isNull(sql`${sql.placeholder('userId')}::text`), + eq(verification.userId, sql`${sql.placeholder('userId')}::text`) ), limit: 1, }, @@ -72,7 +73,7 @@ const getPlace = flattenTranslationsOnExecute( }, }) ) - .prepare() + .prepare('places/getPlace') ) export const placesRouter = router({ diff --git a/src/server/api/router/routes.ts b/src/server/api/router/routes.ts index fcda819a..fe7b2f43 100644 --- a/src/server/api/router/routes.ts +++ b/src/server/api/router/routes.ts @@ -1,6 +1,6 @@ -import { sql } from 'drizzle-orm' import 'server-only' +import { sql } from 'drizzle-orm' import { calculatePath } from '~/helpers/spatial-data/multi-line' import { getRoutesSchema } from '~/schemas/routes' import { db } from '~/server/db/db' @@ -28,7 +28,8 @@ const getRoute = flattenTranslationsOnExecute( path: selectMultiLine('path', routes.path), }, orderBy: [ascNullsEnd(routes.importance)], - where: (route, { eq }) => eq(route.id, sql.placeholder('id')), + where: (route, { eq }) => + eq(route.id, sql`${sql.placeholder('id')}::integer`), with: { mainImage: true, externalLinks: withTranslations({}), @@ -56,7 +57,7 @@ const getRoute = flattenTranslationsOnExecute( }, }) ) - .prepare() + .prepare('routes/getRoute') ) export const routesRouter = router({ diff --git a/src/server/api/router/search.ts b/src/server/api/router/search.ts index c3b33b68..8dc3acb0 100644 --- a/src/server/api/router/search.ts +++ b/src/server/api/router/search.ts @@ -28,7 +28,10 @@ const searchPlacesByMainCategory = flattenTranslationsOnExecute( where: (place, { eq, and, isNotNull }) => and( isNotNull(place.mainCategoryId), - eq(place.mainCategoryId, sql.placeholder('category')) + eq( + place.mainCategoryId, + sql`${sql.placeholder('category')}::integer` + ) ), with: { mainImage: true, @@ -55,7 +58,7 @@ const searchPlacesByMainCategory = flattenTranslationsOnExecute( }, }) ) - .prepare() + .prepare('search/searchPlacesByMainCategory') ) const searchPlacesBySecondaryCategory = doSomethingAfterExecute( @@ -65,7 +68,10 @@ const searchPlacesBySecondaryCategory = doSomethingAfterExecute( where: (placeToCategory, { eq, and, isNotNull }) => and( isNotNull(placeToCategory.categoryId), - eq(placeToCategory.categoryId, sql.placeholder('category')) + eq( + placeToCategory.categoryId, + sql`${sql.placeholder('category')}::integer` + ) ), with: { place: withTranslations({ @@ -101,7 +107,7 @@ const searchPlacesBySecondaryCategory = doSomethingAfterExecute( }), }, }) - .prepare() + .prepare('search/searchPlacesBySecondaryCategory') ), (results) => { return results.map((r) => r.place) @@ -122,7 +128,10 @@ const searchRoutesByMainCategory = flattenTranslationsOnExecute( where: (route, { eq, and, isNotNull }) => and( isNotNull(route.mainCategoryId), - eq(route.mainCategoryId, sql.placeholder('category')) + eq( + route.mainCategoryId, + sql`${sql.placeholder('category')}::integer` + ) ), with: { mainImage: true, @@ -149,7 +158,7 @@ const searchRoutesByMainCategory = flattenTranslationsOnExecute( }, }) ) - .prepare() + .prepare('search/searchRoutesByMainCategory') ) const searchRoutesBySecondaryCategory = doSomethingAfterExecute( flattenTranslationsOnExecute( @@ -158,7 +167,10 @@ const searchRoutesBySecondaryCategory = doSomethingAfterExecute( where: (routeToCategory, { eq, and, isNotNull }) => and( isNotNull(routeToCategory.categoryId), - eq(routeToCategory.categoryId, sql.placeholder('category')) + eq( + routeToCategory.categoryId, + sql`${sql.placeholder('category')}::integer` + ) ), with: { route: withTranslations({ @@ -194,7 +206,7 @@ const searchRoutesBySecondaryCategory = doSomethingAfterExecute( }), }, }) - .prepare() + .prepare('search/searchRoutesBySecondaryCategory') ), (results) => { return results.map((r) => r.route) diff --git a/src/server/db/constants/features-display-data.ts b/src/server/db/constants/features-display-data.ts index 4d8a09cf..81bab1e9 100644 --- a/src/server/db/constants/features-display-data.ts +++ b/src/server/db/constants/features-display-data.ts @@ -60,9 +60,8 @@ import { useMemo } from 'react' import { Join } from 'ts-toolbelt/out/String/Join' import { Leaves } from '~/helpers/types' import { pick } from '~/helpers/utilities' +import { FeaturesInsert, FeaturesSelect } from '~/server/db/constants/features' import { - FeaturesInsert, - FeaturesSelect, PriceUnit, allowedAccess, amountOfPeople, @@ -73,7 +72,7 @@ import { priceUnit, scubaDivingLevel, trainingLevel, -} from '~/server/db/constants/features' +} from '../schema' const typeFeatureDisplay = , K extends FeatureKey>( feature: F diff --git a/src/server/db/constants/features.ts b/src/server/db/constants/features.ts index d5a7c02b..98abfd5f 100644 --- a/src/server/db/constants/features.ts +++ b/src/server/db/constants/features.ts @@ -1,92 +1,6 @@ import { InferInsertModel, InferSelectModel } from 'drizzle-orm' import { features } from '../schema' -// Don't reorder these values, they are used to generate the database enum. -export const amountOfPeople = [ - 'none', - 'few', - 'some', - 'many', - 'crowded', -] as const -export type AmountOfPeople = (typeof amountOfPeople)[number] - -// Don't reorder these values, they are used to generate the database enum. -export const difficulty = [ - 'accessible', - 'normal', - 'smallEffort', - 'hard', - 'dangerous', -] as const -export type Difficulty = (typeof difficulty)[number] - -// Don't reorder these values, they are used to generate the database enum. -export const howNarrow = [ - 'extremlyNarrow', - 'narrow', - 'extraSpace', - 'wide', - 'veryWide', -] as const -export type HowNarrow = (typeof howNarrow)[number] - -// Don't reorder these values, they are used to generate the database enum. -export const groundType = [ - 'sand', - 'pebbles', - 'rocks', - 'concrete', - 'dirt', - 'pavimented', -] as const -export type GroundType = (typeof groundType)[number] - -// Don't reorder these values, they are used to generate the database enum. -export const allowedAccess = [ - 'public', - 'permissive', - 'customers', - 'permit', - 'private', - 'mixed', -] as const -export type AllowedAccess = (typeof allowedAccess)[number] - -// Don't reorder these values, they are used to generate the database enum. -export const trainingLevel = [ - 'noTraining', - 'amateur', - 'entryLevel', - 'advanced', - 'professional', - 'elite', -] as const -export type TrainingLevel = (typeof trainingLevel)[number] - -// Don't reorder these values, they are used to generate the database enum. -export const scubaDivingLevel = [ - 'discoverScubaDiving', - 'openWater', - 'advancedOpenWater', - 'specialtyDiver', - 'technicalDiver', -] as const -export type ScubaDivingLevel = (typeof scubaDivingLevel)[number] - -// Don't reorder these values, they are used to generate the database enum. -export const priceUnit = ['eur', 'eur/minute', 'eur/hour', 'eur/day'] as const -export type PriceUnit = (typeof priceUnit)[number] - -// Don't reorder these values, they are used to generate the database enum. -export const placeToArriveFrom = [ - 'townCenter', - 'parking', - 'beach', - 'road', -] as const -export type PlaceToArriveFrom = (typeof placeToArriveFrom)[number] - export type FeaturesSelect = InferSelectModel export type FeaturesInsert = InferInsertModel export type Features = FeaturesSelect diff --git a/src/server/db/db.ts b/src/server/db/db.ts index bb96714d..424c78e4 100644 --- a/src/server/db/db.ts +++ b/src/server/db/db.ts @@ -1,36 +1,17 @@ import 'server-only' import { env } from '~/env.mjs' -import { connect } from '@planetscale/database' -import { drizzle as drizzleMysql } from 'drizzle-orm/mysql2' -import { - PlanetScaleDatabase, - drizzle as drizzlePlanetscale, -} from 'drizzle-orm/planetscale-serverless' -import { createConnection } from 'mysql2' +import { neon } from '@neondatabase/serverless' +import { drizzle as drizzleNeon, NeonHttpDatabase } from 'drizzle-orm/neon-http' +import { drizzle as drizzlePg } from 'drizzle-orm/postgres-js' +import postgres from 'postgres' import * as schema from './schema' export const db = env.USE_LOCAL_DB === 'true' - ? (drizzleMysql( - createConnection({ - host: '127.0.0.1', - user: 'root', - password: 'unsafePaswordOnlyForLocalhost', - database: 'descobreix-begur-app', - }), - { - schema, - mode: 'planetscale', - } + ? (drizzlePg(postgres(env.DATABASE_URL), { + schema, // TODO: Remove this unsafe type cast when this issue is fixed: // https://github.com/drizzle-team/drizzle-orm/issues/1129 - ) as unknown as PlanetScaleDatabase) - : drizzlePlanetscale( - connect({ - host: env.DATABASE_HOST, - username: env.DATABASE_USERNAME, - password: env.DATABASE_PASSWORD, - }), - { schema } - ) + }) as unknown as NeonHttpDatabase) + : drizzleNeon(neon(env.DATABASE_URL), { schema }) diff --git a/src/server/db/migrate.mjs b/src/server/db/migrate.mjs index 18ca18b2..9a40d632 100644 --- a/src/server/db/migrate.mjs +++ b/src/server/db/migrate.mjs @@ -1,8 +1,8 @@ /* eslint-env node */ // @ts-check -import { drizzle as drizzleMysql } from 'drizzle-orm/mysql2' -import { migrate } from 'drizzle-orm/mysql2/migrator' -import { createConnection } from 'mysql2' +import { drizzle as drizzlePg } from 'drizzle-orm/postgres-js' +import { migrate } from 'drizzle-orm/postgres-js/migrator' +import postgres from 'postgres' if (process.env.USE_LOCAL_DB !== 'true') { throw new Error( @@ -10,14 +10,10 @@ if (process.env.USE_LOCAL_DB !== 'true') { ) } -const db = drizzleMysql( - createConnection({ - host: '127.0.0.1', - user: 'root', - password: 'unsafePaswordOnlyForLocalhost', - database: 'descobreix-begur-app', - }) -) +if (!process.env.DATABASE_URL) + throw new Error('Missing environment variable DATABASE_URL') + +const db = drizzlePg(postgres(process.env.DATABASE_URL)) const main = async () => { await migrate(db, { migrationsFolder: 'drizzle' }) diff --git a/src/server/db/schema/auth.ts b/src/server/db/schema/auth.ts index 71846bbf..57d9b853 100644 --- a/src/server/db/schema/auth.ts +++ b/src/server/db/schema/auth.ts @@ -1,31 +1,30 @@ import type { AdapterAccount } from '@auth/core/adapters' import { relations } from 'drizzle-orm' import { - int, - mysqlTable, + integer, + pgTable, primaryKey, text, timestamp, - varchar, -} from 'drizzle-orm/mysql-core' +} from 'drizzle-orm/pg-core' import { users } from './users' -export const accounts = mysqlTable( +export const accounts = pgTable( 'account', { - userId: varchar('userId', { length: 255 }).notNull(), - type: varchar('type', { length: 255 }) - .$type() - .notNull(), - provider: varchar('provider', { length: 255 }).notNull(), - providerAccountId: varchar('providerAccountId', { length: 255 }).notNull(), + userId: text('userId') + .notNull() + .references(() => users.id, { onDelete: 'cascade' }), + type: text('type').$type().notNull(), + provider: text('provider').notNull(), + providerAccountId: text('providerAccountId').notNull(), refresh_token: text('refresh_token'), access_token: text('access_token'), - expires_at: int('expires_at'), - token_type: varchar('token_type', { length: 255 }), - scope: varchar('scope', { length: 255 }), + expires_at: integer('expires_at'), + token_type: text('token_type'), + scope: text('scope'), id_token: text('id_token'), - session_state: varchar('session_state', { length: 255 }), + session_state: text('session_state'), }, (account) => ({ compoundKey: primaryKey({ @@ -41,9 +40,11 @@ export const accountsRelations = relations(accounts, ({ one }) => ({ }), })) -export const sessions = mysqlTable('session', { - sessionToken: varchar('sessionToken', { length: 255 }).notNull().primaryKey(), - userId: varchar('userId', { length: 255 }).notNull(), +export const sessions = pgTable('session', { + sessionToken: text('sessionToken').notNull().primaryKey(), + userId: text('userId') + .notNull() + .references(() => users.id, { onDelete: 'cascade' }), expires: timestamp('expires', { mode: 'date' }).notNull(), }) @@ -54,16 +55,14 @@ export const sessionsRelations = relations(sessions, ({ one }) => ({ }), })) -export const verificationTokens = mysqlTable( +export const verificationTokens = pgTable( 'verificationToken', { - identifier: varchar('identifier', { length: 255 }).notNull(), - token: varchar('token', { length: 255 }).notNull(), + identifier: text('identifier').notNull(), + token: text('token').notNull(), expires: timestamp('expires', { mode: 'date' }).notNull(), }, (vt) => ({ - compoundKey: primaryKey({ - columns: [vt.identifier, vt.token], - }), + compoundKey: primaryKey({ columns: [vt.identifier, vt.token] }), }) ) diff --git a/src/server/db/schema/externalLinks.ts b/src/server/db/schema/externalLinks.ts index 3defda5f..52ad8eb2 100644 --- a/src/server/db/schema/externalLinks.ts +++ b/src/server/db/schema/externalLinks.ts @@ -1,23 +1,23 @@ import { relations } from 'drizzle-orm' -import { boolean, int, text, tinytext } from 'drizzle-orm/mysql-core' +import { boolean, integer, text } from 'drizzle-orm/pg-core' import { places, routes } from '.' -import { mysqlTableWithTranslations } from '../../helpers/translations/db-tables' +import { pgTableWithTranslations } from '../../helpers/translations/db-tables' export const { normalTable: externalLinks, translationsTable: externalLinksTranslations, makeRelationsWithTranslations: makeExternalLinkRelations, translationsTableRelations: externalLinksTranslationsRelations, -} = mysqlTableWithTranslations({ +} = pgTableWithTranslations({ name: 'externalLink', normalColumns: { - placeId: int('placeId'), - routeId: int('routeId'), + placeId: integer('placeId'), + routeId: integer('routeId'), isOfficialWebsite: boolean('isOfficialWebsite'), }, translatableColumns: { url: text('url').notNull(), - title: tinytext('title'), + title: text('title'), }, }) diff --git a/src/server/db/schema/features.ts b/src/server/db/schema/features.ts index 9dd9fa19..7e308db5 100644 --- a/src/server/db/schema/features.ts +++ b/src/server/db/schema/features.ts @@ -1,40 +1,119 @@ import { relations } from 'drizzle-orm' import { boolean, - double, - int, - mysqlEnum, + doublePrecision, + integer, + pgEnum, text, - tinytext, -} from 'drizzle-orm/mysql-core' -import { mysqlTableWithTranslations } from '../../helpers/translations/db-tables' -import { - allowedAccess, - amountOfPeople, - difficulty, - groundType, - howNarrow, - placeToArriveFrom, - priceUnit, - scubaDivingLevel, - trainingLevel, -} from '../constants/features' +} from 'drizzle-orm/pg-core' +import { pgTableWithTranslations } from '../../helpers/translations/db-tables' + +export const amountOfPeopleEnum = pgEnum('amountOfPeople', [ + 'none', + 'few', + 'some', + 'many', + 'crowded', +]) +export const amountOfPeople = amountOfPeopleEnum.enumValues +export type AmountOfPeople = (typeof amountOfPeople)[number] + +export const difficultyEnum = pgEnum('difficulty', [ + 'accessible', + 'normal', + 'smallEffort', + 'hard', + 'dangerous', +]) +export const difficulty = difficultyEnum.enumValues +export type Difficulty = (typeof difficulty)[number] + +export const howNarrowEnum = pgEnum('howNarrow', [ + 'extremlyNarrow', + 'narrow', + 'extraSpace', + 'wide', + 'veryWide', +]) +export const howNarrow = howNarrowEnum.enumValues +export type HowNarrow = (typeof howNarrow)[number] + +export const groundTypeEnum = pgEnum('groundType', [ + 'sand', + 'pebbles', + 'rocks', + 'concrete', + 'dirt', + 'pavimented', +]) +export const groundType = groundTypeEnum.enumValues +export type GroundType = (typeof groundType)[number] + +export const allowedAccessEnum = pgEnum('allowedAccess', [ + 'public', + 'permissive', + 'customers', + 'permit', + 'private', + 'mixed', +]) +export const allowedAccess = allowedAccessEnum.enumValues +export type AllowedAccess = (typeof allowedAccess)[number] + +export const trainingLevelEnum = pgEnum('trainingLevel', [ + 'noTraining', + 'amateur', + 'entryLevel', + 'advanced', + 'professional', + 'elite', +]) +export const trainingLevel = trainingLevelEnum.enumValues +export type TrainingLevel = (typeof trainingLevel)[number] + +export const scubaDivingLevelEnum = pgEnum('scubaDivingLevel', [ + 'discoverScubaDiving', + 'openWater', + 'advancedOpenWater', + 'specialtyDiver', + 'technicalDiver', +]) +export const scubaDivingLevel = scubaDivingLevelEnum.enumValues +export type ScubaDivingLevel = (typeof scubaDivingLevel)[number] + +export const priceUnitEnum = pgEnum('priceUnit', [ + 'eur', + 'eur/minute', + 'eur/hour', + 'eur/day', +]) +export const priceUnit = priceUnitEnum.enumValues +export type PriceUnit = (typeof priceUnit)[number] + +export const placeToArriveFromEnum = pgEnum('placeToArriveFrom', [ + 'townCenter', + 'parking', + 'beach', + 'road', +]) +export const placeToArriveFrom = placeToArriveFromEnum.enumValues +export type PlaceToArriveFrom = (typeof placeToArriveFrom)[number] export const { normalTable: features, translationsTable: featuresTranslations, makeRelationsWithTranslations: makeFeatureRelations, translationsTableRelations: featuresTranslationsRelations, -} = mysqlTableWithTranslations({ +} = pgTableWithTranslations({ name: 'feature', normalColumns: { - amountOfPeople: mysqlEnum('amountOfPeople', amountOfPeople), - difficulty: mysqlEnum('difficulty', difficulty), - groundType: mysqlEnum('groundType', groundType), + amountOfPeople: amountOfPeopleEnum('amountOfPeople'), + difficulty: difficultyEnum('difficulty'), + groundType: groundTypeEnum('groundType'), hasBus: boolean('hasBus'), hasParking: boolean('hasParking'), - parkingSpaces: int('parkingSpaces'), + parkingSpaces: integer('parkingSpaces'), hasToilet: boolean('hasToilet'), hasRestaurant: boolean('hasRestaurant'), hasDrinkingWater: boolean('hasDrinkingWater'), @@ -44,30 +123,30 @@ export const { isNudist: boolean('isNudist'), hasUnofficialName: boolean('hasUnofficialName'), hasInacurateLocation: boolean('hasInacurateLocation'), - date: tinytext('date'), + date: text('date'), isBoatOnly: boolean('isBoatOnly'), - trainingLevel: mysqlEnum('trainingLevel', trainingLevel), + trainingLevel: trainingLevelEnum('trainingLevel'), hasMissingInfo: boolean('hasMissingInfo'), - height: int('height'), // In meters - depth: int('depth'), // In meters - depthMin: int('depthMin'), // In meters - depthMax: int('depthMax'), // In meters - scubaDivingLevel: mysqlEnum('scubaDivingLevel', scubaDivingLevel), + height: integer('height'), // In meters + depth: integer('depth'), // In meters + depthMin: integer('depthMin'), // In meters + depthMax: integer('depthMax'), // In meters + scubaDivingLevel: scubaDivingLevelEnum('scubaDivingLevel'), notThereAnymore: boolean('notThereAnymore'), isOutOfTheMunicipality: boolean('isOutOfTheMunicipality'), hasBench: boolean('hasBench'), - allowedAccess: mysqlEnum('allowedAccess', allowedAccess), - dimensions: tinytext('dimensions'), - price: double('price'), - priceUnit: mysqlEnum('priceUnit', priceUnit), + allowedAccess: allowedAccessEnum('allowedAccess'), + dimensions: text('dimensions'), + price: doublePrecision('price'), + priceUnit: priceUnitEnum('priceUnit'), isCovered: boolean('isCovered'), - duration: int('duration'), // In minutes - distance: int('distance'), // In meters - slope: int('slope'), // In meters - timeToArrive: int('timeToArrive'), // In minutes - placeToArriveFrom: mysqlEnum('placeToArriveFrom', placeToArriveFrom), + duration: integer('duration'), // In minutes + distance: integer('distance'), // In meters + slope: integer('slope'), // In meters + timeToArrive: integer('timeToArrive'), // In minutes + placeToArriveFrom: placeToArriveFromEnum('placeToArriveFrom'), isFreeWithLocalStamp: boolean('isFreeWithLocalStamp'), - howNarrow: mysqlEnum('howNarrow', howNarrow), + howNarrow: howNarrowEnum('howNarrow'), }, translatableColumns: { difficultyNotes: text('difficultyNotes'), // Markdown diff --git a/src/server/db/schema/images.ts b/src/server/db/schema/images.ts index 306569e6..d6727a86 100644 --- a/src/server/db/schema/images.ts +++ b/src/server/db/schema/images.ts @@ -1,20 +1,13 @@ -import { - date, - int, - mysqlTable, - serial, - text, - tinytext, -} from 'drizzle-orm/mysql-core' +import { integer, pgTable, serial, text, timestamp } from 'drizzle-orm/pg-core' import { dbS3ObjectKey } from '../utilities' -export const images = mysqlTable('image', { +export const images = pgTable('image', { id: serial('id').primaryKey(), key: dbS3ObjectKey('key').notNull(), - width: int('width').notNull(), - height: int('height').notNull(), + width: integer('width').notNull(), + height: integer('height').notNull(), source: text('source'), - captureDate: date('captureDate'), - alt: tinytext('alt'), // In Catalan only + captureDate: timestamp('captureDate'), + alt: text('alt'), // In Catalan only blurDataURL: text('blurDataURL'), // Base64 encoded image }) diff --git a/src/server/db/schema/index.ts b/src/server/db/schema/index.ts index 317d0f59..15d2fa20 100644 --- a/src/server/db/schema/index.ts +++ b/src/server/db/schema/index.ts @@ -9,5 +9,6 @@ export * from './places' export * from './routeCategories' export * from './routes' export * from './users' +export * from './utils' export * from './verificationRequirements' export * from './verifications' diff --git a/src/server/db/schema/placeCategories.ts b/src/server/db/schema/placeCategories.ts index 49b5fb72..7a429247 100644 --- a/src/server/db/schema/placeCategories.ts +++ b/src/server/db/schema/placeCategories.ts @@ -1,12 +1,12 @@ import { relations } from 'drizzle-orm' import { boolean, - int, - mysqlTable, + integer, + pgTable, primaryKey, - tinytext, -} from 'drizzle-orm/mysql-core' -import { mysqlTableWithTranslations } from '../../helpers/translations/db-tables' + text, +} from 'drizzle-orm/pg-core' +import { pgTableWithTranslations } from '../../helpers/translations/db-tables' import { dbColor, dbGender, dbIcon } from '../utilities' import { placeCategoriesToPlaceCategoryGroups } from './placeCategoryGroups' import { places } from './places' @@ -16,17 +16,17 @@ export const { translationsTable: placeCategoriesTranslations, makeRelationsWithTranslations: makePlaceCategoryRelations, translationsTableRelations: placeCategoriesTranslationsRelations, -} = mysqlTableWithTranslations({ +} = pgTableWithTranslations({ name: 'placeCategory', normalColumns: { icon: dbIcon('icon').notNull(), color: dbColor('color').notNull(), hasVisitMission: boolean('hasVisitMission').notNull().default(true), - order: int('order'), + order: integer('order'), }, translatableColumns: { - name: tinytext('name').notNull(), - namePlural: tinytext('namePlural').notNull(), + name: text('name').notNull(), + namePlural: text('namePlural').notNull(), nameGender: dbGender('nameGender'), }, }) @@ -41,11 +41,11 @@ export const placeCategoriesRelations = relations(placeCategories, (r) => ({ categoryGroups: r.many(placeCategoriesToPlaceCategoryGroups), })) -export const placesToPlaceCategories = mysqlTable( +export const placesToPlaceCategories = pgTable( 'placeToPlaceCategory', { - placeId: int('placeId').notNull(), - categoryId: int('categoryId').notNull(), + placeId: integer('placeId').notNull(), + categoryId: integer('categoryId').notNull(), }, (table) => { return { diff --git a/src/server/db/schema/placeCategoryGroups.ts b/src/server/db/schema/placeCategoryGroups.ts index bc8920eb..40146550 100644 --- a/src/server/db/schema/placeCategoryGroups.ts +++ b/src/server/db/schema/placeCategoryGroups.ts @@ -1,12 +1,12 @@ import { relations } from 'drizzle-orm' import { boolean, - int, - mysqlTable, + integer, + pgTable, primaryKey, - tinytext, -} from 'drizzle-orm/mysql-core' -import { mysqlTableWithTranslations } from '../../helpers/translations/db-tables' + text, +} from 'drizzle-orm/pg-core' +import { pgTableWithTranslations } from '../../helpers/translations/db-tables' import { dbColor, dbGender, dbIcon } from '../utilities' import { placeCategories } from './placeCategories' @@ -15,15 +15,15 @@ export const { translationsTable: placeCategoryGroupsTranslations, makeRelationsWithTranslations: makePlaceCategoryGroupRelations, translationsTableRelations: placeCategoryGroupsTranslationsRelations, -} = mysqlTableWithTranslations({ +} = pgTableWithTranslations({ name: 'placeCategoryGroup', normalColumns: { icon: dbIcon('icon').notNull(), color: dbColor('color').notNull(), - order: int('order'), + order: integer('order'), }, translatableColumns: { - name: tinytext('name').notNull(), + name: text('name').notNull(), nameGender: dbGender('nameGender'), }, }) @@ -37,11 +37,11 @@ export const placeCategoryGroupsRelations = relations( }) ) -export const placeCategoriesToPlaceCategoryGroups = mysqlTable( +export const placeCategoriesToPlaceCategoryGroups = pgTable( 'placeCategoryToPlaceCategoryGroup', { - categoryGroupId: int('categoryGroupId').notNull(), - categoryId: int('categoryId').notNull(), + categoryGroupId: integer('categoryGroupId').notNull(), + categoryId: integer('categoryId').notNull(), highlight: boolean('highlight'), }, (table) => { diff --git a/src/server/db/schema/placeLists.ts b/src/server/db/schema/placeLists.ts index 21c29ac7..bc502003 100644 --- a/src/server/db/schema/placeLists.ts +++ b/src/server/db/schema/placeLists.ts @@ -1,25 +1,25 @@ import { relations, sql } from 'drizzle-orm' import { - int, - mysqlTable, + integer, + pgTable, primaryKey, serial, timestamp, -} from 'drizzle-orm/mysql-core' +} from 'drizzle-orm/pg-core' import { dbUserId } from '../utilities' import { places } from './places' import { users } from './users' -export const placeLists = mysqlTable('placeList', { +export const placeLists = pgTable('placeList', { id: serial('id').primaryKey(), userId: dbUserId('userId').notNull(), }) -export const placeListToPlace = mysqlTable( +export const placeListToPlace = pgTable( 'placeListToPlace', { - placeListId: int('placeListId').notNull(), - placeId: int('placeId').notNull(), + placeListId: integer('placeListId').notNull(), + placeId: integer('placeId').notNull(), addedAt: timestamp('addedAt') .notNull() .default(sql`CURRENT_TIMESTAMP`), diff --git a/src/server/db/schema/places.ts b/src/server/db/schema/places.ts index b26e4f36..04e44566 100644 --- a/src/server/db/schema/places.ts +++ b/src/server/db/schema/places.ts @@ -1,7 +1,7 @@ import { relations } from 'drizzle-orm' -import { double, int, text, tinytext } from 'drizzle-orm/mysql-core' +import { doublePrecision, integer, text } from 'drizzle-orm/pg-core' import { pointType } from '../../helpers/spatial-data/point' -import { mysqlTableWithTranslations } from '../../helpers/translations/db-tables' +import { pgTableWithTranslations } from '../../helpers/translations/db-tables' import { externalLinks } from './externalLinks' import { features } from './features' import { images } from './images' @@ -16,20 +16,20 @@ export const { translationsTable: placesTranslations, makeRelationsWithTranslations: makePlaceRelations, translationsTableRelations: placesTranslationsRelations, -} = mysqlTableWithTranslations({ +} = pgTableWithTranslations({ name: 'place', normalColumns: { - mainImageId: int('mainImageId'), + mainImageId: integer('mainImageId'), googleMapsId: text('googleMapsId'), location: pointType('location').notNull(), - mainCategoryId: int('mainCategoryId').notNull(), - featuresId: int('featuresId').notNull(), - verificationRequirementsId: int('verificationRequirementsId'), - importance: double('importance'), + mainCategoryId: integer('mainCategoryId').notNull(), + featuresId: integer('featuresId').notNull(), + verificationRequirementsId: integer('verificationRequirementsId'), + importance: doublePrecision('importance'), }, translatableColumns: { name: text('name').notNull(), - description: tinytext('description'), + description: text('description'), content: text('content'), // Markdown }, }) diff --git a/src/server/db/schema/routeCategories.ts b/src/server/db/schema/routeCategories.ts index 1c8be2b4..2a66bc71 100644 --- a/src/server/db/schema/routeCategories.ts +++ b/src/server/db/schema/routeCategories.ts @@ -1,12 +1,12 @@ import { relations } from 'drizzle-orm' import { boolean, - int, - mysqlTable, + integer, + pgTable, primaryKey, - tinytext, -} from 'drizzle-orm/mysql-core' -import { mysqlTableWithTranslations } from '~/server/helpers/translations/db-tables' + text, +} from 'drizzle-orm/pg-core' +import { pgTableWithTranslations } from '~/server/helpers/translations/db-tables' import { dbColor, dbGender, dbIcon } from '../utilities' import { routes } from './routes' @@ -15,17 +15,17 @@ export const { translationsTable: routeCategoriesTranslations, makeRelationsWithTranslations: makeRouteCategoryRelations, translationsTableRelations: routeCategoriesTranslationsRelations, -} = mysqlTableWithTranslations({ +} = pgTableWithTranslations({ name: 'routeCategory', normalColumns: { icon: dbIcon('icon').notNull(), color: dbColor('color').notNull(), hasVisitMission: boolean('hasVisitMission').notNull().default(true), - order: int('order'), + order: integer('order'), }, translatableColumns: { - name: tinytext('name').notNull(), - namePlural: tinytext('namePlural').notNull(), + name: text('name').notNull(), + namePlural: text('namePlural').notNull(), nameGender: dbGender('nameGender'), }, }) @@ -39,11 +39,11 @@ export const routeCategoriesRelations = relations(routeCategories, (r) => ({ }), })) -export const routesToRouteCategories = mysqlTable( +export const routesToRouteCategories = pgTable( 'routeToRouteCategory', { - routeId: int('routeId').notNull(), - categoryId: int('categoryId').notNull(), + routeId: integer('routeId').notNull(), + categoryId: integer('categoryId').notNull(), }, (table) => { return { diff --git a/src/server/db/schema/routes.ts b/src/server/db/schema/routes.ts index e2a3eb3e..8b9e1f20 100644 --- a/src/server/db/schema/routes.ts +++ b/src/server/db/schema/routes.ts @@ -1,14 +1,13 @@ import { relations } from 'drizzle-orm' import { - double, - int, - mysqlTable, + doublePrecision, + integer, + pgTable, primaryKey, text, - tinytext, -} from 'drizzle-orm/mysql-core' +} from 'drizzle-orm/pg-core' import { multiLineType } from '~/server/helpers/spatial-data/multi-line' -import { mysqlTableWithTranslations } from '../../helpers/translations/db-tables' +import { pgTableWithTranslations } from '../../helpers/translations/db-tables' import { externalLinks } from './externalLinks' import { features } from './features' import { images } from './images' @@ -20,19 +19,19 @@ export const { translationsTable: routesTranslations, makeRelationsWithTranslations: makeRouteRelations, translationsTableRelations: routesTranslationsRelations, -} = mysqlTableWithTranslations({ +} = pgTableWithTranslations({ name: 'route', normalColumns: { - mainImageId: int('mainImageId'), + mainImageId: integer('mainImageId'), path: multiLineType('path').notNull(), - mainCategoryId: int('mainCategoryId').notNull(), - featuresId: int('featuresId').notNull(), - verificationRequirementsId: int('verificationRequirementsId'), - importance: double('importance'), + mainCategoryId: integer('mainCategoryId').notNull(), + featuresId: integer('featuresId').notNull(), + verificationRequirementsId: integer('verificationRequirementsId'), + importance: doublePrecision('importance'), }, translatableColumns: { name: text('name').notNull(), - description: tinytext('description'), + description: text('description'), content: text('content'), // Markdown }, }) @@ -60,11 +59,11 @@ export const routesRelations = relations(routes, (r) => ({ }), })) -export const routesToPlaces = mysqlTable( +export const routesToPlaces = pgTable( 'routeToPlace', { - routeId: int('routeId').notNull(), - placeId: int('placeId').notNull(), + routeId: integer('routeId').notNull(), + placeId: integer('placeId').notNull(), }, (table) => { return { diff --git a/src/server/db/schema/users.ts b/src/server/db/schema/users.ts index 7ca27552..c0d32019 100644 --- a/src/server/db/schema/users.ts +++ b/src/server/db/schema/users.ts @@ -1,28 +1,20 @@ import { relations } from 'drizzle-orm' -import { int, mysqlTable, timestamp, varchar } from 'drizzle-orm/mysql-core' +import { integer, pgTable, text, timestamp, varchar } from 'drizzle-orm/pg-core' import { userRoles } from '../constants/users' import { dbUserId } from '../utilities' import { placeLists } from './placeLists' import { verifications } from './verifications' -export const users = mysqlTable('user', { +export const users = pgTable('user', { id: dbUserId('id').notNull().primaryKey(), - name: varchar('name', { length: 255 }), + name: text('name'), hashedPassword: varchar('hashedPassword', { length: 255 }), - email: varchar('email', { length: 255 }).unique().notNull(), - emailVerified: timestamp('emailVerified', { - mode: 'date', - fsp: 3, - }), - image: varchar('image', { length: 255 }), - role: varchar('role', { - length: 255, - enum: userRoles, - }) - .default('user') - .notNull(), + email: text('email').notNull(), + emailVerified: timestamp('emailVerified', { mode: 'date' }), + image: text('image'), + role: text('role', { enum: userRoles }).default('user').notNull(), - visitedPlaceListId: int('visitedPlaceListId').notNull(), + visitedPlaceListId: integer('visitedPlaceListId').notNull(), }) export const usersRelations = relations(users, ({ one, many }) => ({ diff --git a/src/server/db/schema/utils.ts b/src/server/db/schema/utils.ts new file mode 100644 index 00000000..a626ba4e --- /dev/null +++ b/src/server/db/schema/utils.ts @@ -0,0 +1,3 @@ +import { pgEnum } from 'drizzle-orm/pg-core' + +export const genderEnum = pgEnum('gender', ['masculine', 'feminine']) diff --git a/src/server/db/schema/verificationRequirements.ts b/src/server/db/schema/verificationRequirements.ts index 2c353fdd..44eb202e 100644 --- a/src/server/db/schema/verificationRequirements.ts +++ b/src/server/db/schema/verificationRequirements.ts @@ -1,8 +1,8 @@ -import { boolean, int, mysqlTable, serial } from 'drizzle-orm/mysql-core' +import { boolean, integer, pgTable, serial } from 'drizzle-orm/pg-core' -export const verificationRequirements = mysqlTable('verificationRequirement', { +export const verificationRequirements = pgTable('verificationRequirement', { id: serial('id').primaryKey(), isLocationRequired: boolean('isLocationRequired').notNull().default(true), - maxLocationDistance: int('maxLocationDistance'), + maxLocationDistance: integer('maxLocationDistance'), }) diff --git a/src/server/db/schema/verifications.ts b/src/server/db/schema/verifications.ts index b8261d71..c7fe21e1 100644 --- a/src/server/db/schema/verifications.ts +++ b/src/server/db/schema/verifications.ts @@ -1,13 +1,13 @@ import { relations, sql } from 'drizzle-orm' -import { int, mysqlTable, serial, timestamp } from 'drizzle-orm/mysql-core' +import { integer, pgTable, serial, timestamp } from 'drizzle-orm/pg-core' import { pointType } from '~/server/helpers/spatial-data/point' import { dbUserId } from '../utilities' import { places } from './places' import { users } from './users' -export const verifications = mysqlTable('verification', { +export const verifications = pgTable('verification', { id: serial('id').primaryKey(), - placeId: int('placeId').notNull(), + placeId: integer('placeId').notNull(), userId: dbUserId('userId').notNull(), validatedOn: timestamp('validatedOn') @@ -15,7 +15,7 @@ export const verifications = mysqlTable('verification', { .default(sql`CURRENT_TIMESTAMP`), deviceLocation: pointType('deviceLocation'), - deviceLocationAccuracy: int('deviceLocationAccuracy'), + deviceLocationAccuracy: integer('deviceLocationAccuracy'), }) export const verificationsRelations = relations(verifications, (r) => ({ diff --git a/src/server/db/utilities.ts b/src/server/db/utilities.ts index 691740f7..ae5af1ad 100644 --- a/src/server/db/utilities.ts +++ b/src/server/db/utilities.ts @@ -1,9 +1,7 @@ -import { mysqlEnum, tinytext, varchar } from 'drizzle-orm/mysql-core' +import { text, varchar } from 'drizzle-orm/pg-core' import { translatableLocales } from '~/i18n' import { colorNames, iconNames } from './constants/shared' - -// Don't reorder these values, they are used to generate the database enum. -const genderValues = ['masculine', 'feminine'] as const +import { genderEnum } from './schema/utils' export const dbS3ObjectKey = (name: T) => varchar(name, { length: 1024 }) @@ -11,14 +9,13 @@ export const dbS3ObjectKey = (name: T) => export const dbLocale = (name: T) => varchar(name, { length: 10, enum: translatableLocales }) -export const dbGender = (name: T) => - mysqlEnum(name, genderValues) +export const dbGender = (name: T) => genderEnum(name) export const dbUserId = (name: T) => varchar(name, { length: 255 }) export const dbIcon = (name: T) => - tinytext(name, { enum: iconNames }) + text(name, { enum: iconNames }) export const dbColor = (name: T) => - tinytext(name, { enum: colorNames }) + text(name, { enum: colorNames }) diff --git a/src/server/helpers/auth/custom-adapter.ts b/src/server/helpers/auth/custom-adapter.ts index e422ffee..1e8a87a6 100644 --- a/src/server/helpers/auth/custom-adapter.ts +++ b/src/server/helpers/auth/custom-adapter.ts @@ -1,177 +1,11 @@ import 'server-only' -import { and, eq } from 'drizzle-orm' -import type { Adapter } from 'next-auth/adapters' +import { DrizzleAdapter } from '@auth/drizzle-adapter' +import { Adapter } from 'next-auth/adapters' import { db } from '../../db/db' -import { accounts, sessions, users, verificationTokens } from '../../db/schema' import { initializeUserInDatabase } from './initialize-user' -// This adapter is a modified version of the default MySQL Drizzle adapter. (@auth/drizzle-adapter) -// https://github.com/nextauthjs/next-auth/blob/main/packages/adapter-drizzle/src/lib/mysql.ts export const CustomAdapter = { + ...(DrizzleAdapter(db) as Adapter), createUser: initializeUserInDatabase, - - async getUser(data) { - const thing = - (await db - .select() - .from(users) - .where(eq(users.id, data)) - .then((res) => res[0])) ?? null - - return thing - }, - async getUserByEmail(data) { - const user = - (await db - .select() - .from(users) - .where(eq(users.email, data)) - .then((res) => res[0])) ?? null - - return user - }, - async createSession(data) { - await db.insert(sessions).values(data) - - return await db - .select() - .from(sessions) - .where(eq(sessions.sessionToken, data.sessionToken)) - .then((res) => res[0]) - }, - async getSessionAndUser(data) { - const sessionAndUser = - (await db - .select({ - session: sessions, - user: users, - }) - .from(sessions) - .where(eq(sessions.sessionToken, data)) - .innerJoin(users, eq(users.id, sessions.userId)) - .then((res) => res[0])) ?? null - - return sessionAndUser - }, - async updateUser(data) { - if (!data.id) { - throw new Error('No user id.') - } - - await db.update(users).set(data).where(eq(users.id, data.id)) - - return await db - .select() - .from(users) - .where(eq(users.id, data.id)) - .then((res) => res[0]) - }, - async updateSession(data) { - await db - .update(sessions) - .set(data) - .where(eq(sessions.sessionToken, data.sessionToken)) - - return await db - .select() - .from(sessions) - .where(eq(sessions.sessionToken, data.sessionToken)) - .then((res) => res[0]) - }, - async linkAccount(rawAccount) { - await db.insert(accounts).values(rawAccount) - }, - async getUserByAccount(account) { - const dbAccount = - (await db - .select() - .from(accounts) - .where( - and( - eq(accounts.providerAccountId, account.providerAccountId), - eq(accounts.provider, account.provider) - ) - ) - .leftJoin(users, eq(accounts.userId, users.id)) - .then((res) => res[0])) ?? null - - if (!dbAccount) { - return null - } - - return dbAccount.user - }, - async deleteSession(sessionToken) { - const session = - (await db - .select() - .from(sessions) - .where(eq(sessions.sessionToken, sessionToken)) - .then((res) => res[0])) ?? null - - await db.delete(sessions).where(eq(sessions.sessionToken, sessionToken)) - - return session - }, - async createVerificationToken(token) { - await db.insert(verificationTokens).values(token) - - return await db - .select() - .from(verificationTokens) - .where(eq(verificationTokens.identifier, token.identifier)) - .then((res) => res[0]) - }, - async useVerificationToken(token) { - try { - const deletedToken = - (await db - .select() - .from(verificationTokens) - .where( - and( - eq(verificationTokens.identifier, token.identifier), - eq(verificationTokens.token, token.token) - ) - ) - .then((res) => res[0])) ?? null - - await db - .delete(verificationTokens) - .where( - and( - eq(verificationTokens.identifier, token.identifier), - eq(verificationTokens.token, token.token) - ) - ) - - return deletedToken - } catch (err) { - throw new Error('No verification token found.') - } - }, - async deleteUser(id) { - const user = await db - .select() - .from(users) - .where(eq(users.id, id)) - .then((res) => res[0] ?? null) - - await db.delete(users).where(eq(users.id, id)) - - return user - }, - async unlinkAccount(account) { - await db - .delete(accounts) - .where( - and( - eq(accounts.providerAccountId, account.providerAccountId), - eq(accounts.provider, account.provider) - ) - ) - - return undefined - }, } satisfies Adapter diff --git a/src/server/helpers/auth/initialize-user.ts b/src/server/helpers/auth/initialize-user.ts index 17a986d0..3b315ec4 100644 --- a/src/server/helpers/auth/initialize-user.ts +++ b/src/server/helpers/auth/initialize-user.ts @@ -26,41 +26,43 @@ export async function initializeUserInDatabase(newUser: { const userId = uuidv4() - const visitedPlaceListId = Number( - ( - await tx.insert(placeLists).values({ + const newVisitedPlaceList = ( + await tx + .insert(placeLists) + .values({ userId, }) - ).insertId - ) + .returning() + )[0] if ( !( await tx.query.placeLists.findFirst({ columns: { id: true }, - where: eq(placeLists.id, visitedPlaceListId), + where: eq(placeLists.id, newVisitedPlaceList.id), }) )?.id ) { throw new Error('Error creating visitedPlaceList') } - await tx.insert(users).values({ - id: userId, - email: newUser.email, - emailVerified: newUser.emailVerified, - name: newUser.name, - image: newUser.image, - hashedPassword: newUser.password - ? bcrypt.hashSync(newUser.password, 10) - : null, - visitedPlaceListId: visitedPlaceListId, - }) + const createdUser = ( + await tx + .insert(users) + .values({ + id: userId, + email: newUser.email, + emailVerified: newUser.emailVerified, + name: newUser.name, + image: newUser.image, + hashedPassword: newUser.password + ? bcrypt.hashSync(newUser.password, 10) + : null, + visitedPlaceListId: newVisitedPlaceList.id, + }) + .returning() + )[0] - return await tx - .select() - .from(users) - .where(eq(users.id, userId)) - .then((res) => res[0]) + return createdUser }) } diff --git a/src/server/helpers/db-queries/placeLists.ts b/src/server/helpers/db-queries/placeLists.ts index 52fa82f8..4b046afb 100644 --- a/src/server/helpers/db-queries/placeLists.ts +++ b/src/server/helpers/db-queries/placeLists.ts @@ -17,9 +17,10 @@ const getVisitedPlaceListId = db.query.users columns: { visitedPlaceListId: true, }, - where: (users, { eq }) => eq(users.id, sql.placeholder('userId')), + where: (users, { eq }) => + eq(users.id, sql`${sql.placeholder('userId')}::text`), }) - .prepare() + .prepare('helpers/placeLists/getVisitedPlaceListId') const getPlacesInList = db.query.placeListToPlace .findMany({ @@ -27,9 +28,12 @@ const getPlacesInList = db.query.placeListToPlace placeId: true, }, where: (placeListToPlace, { eq }) => - eq(placeListToPlace.placeListId, sql.placeholder('placeListId')), + eq( + placeListToPlace.placeListId, + sql`${sql.placeholder('placeListId')}::integer` + ), }) - .prepare() + .prepare('helpers/placeLists/getPlacesInList') export async function getVisitedPlacesIdsByUserId(userId?: string) { if (!userId) return new Set() diff --git a/src/server/helpers/order-by.ts b/src/server/helpers/order-by.ts index 403cc77e..238a811c 100644 --- a/src/server/helpers/order-by.ts +++ b/src/server/helpers/order-by.ts @@ -1,17 +1,5 @@ import { sql, type AnyColumn, type SQLWrapper } from 'drizzle-orm' export function ascNullsEnd(column: SQLWrapper | AnyColumn) { - return sql`ISNULL(${column}), ${column} asc` -} - -export function descNullsEnd(column: SQLWrapper | AnyColumn) { - return sql`ISNULL(${column}), ${column} desc` -} - -export function ascNullsStart(column: SQLWrapper | AnyColumn) { - return sql`NOT ISNULL(${column}), ${column} asc` -} - -export function descNullsStart(column: SQLWrapper | AnyColumn) { - return sql`NOT ISNULL(${column}), ${column} desc` + return sql`${column} ASC NULLS LAST` } diff --git a/src/server/helpers/spatial-data/multi-line.ts b/src/server/helpers/spatial-data/multi-line.ts index 2806284e..fce64aca 100644 --- a/src/server/helpers/spatial-data/multi-line.ts +++ b/src/server/helpers/spatial-data/multi-line.ts @@ -1,5 +1,5 @@ import { DriverValueMapper, sql } from 'drizzle-orm' -import { customType } from 'drizzle-orm/mysql-core' +import { customType } from 'drizzle-orm/pg-core' import { MultiLineString, getMultiLine, @@ -15,13 +15,13 @@ export const multiLineType = customType<{ driverData: string }>({ dataType() { - return `MULTILINESTRING SRID ${SRID_CODE}` + return `Geometry(MultiLineString,${SRID_CODE})` }, toDriver(value: WrongMultiLineType | string) { const multiLine = getMultiLine(value) if (!multiLine) throw new Error(`Invalid multiLine value: ${JSON.stringify(value)}`) - return sql`ST_MultiLineStringFromText(${multiLineToString(multiLine)}, ${SRID_CODE})` + return sql`ST_GeomFromText('${multiLineToString(multiLine)}',${SRID_CODE})` }, fromDriver(value: string): WrongMultiLineType { const multiLine = getMultiLine(value) diff --git a/src/server/helpers/spatial-data/point.ts b/src/server/helpers/spatial-data/point.ts index d2549905..403898de 100644 --- a/src/server/helpers/spatial-data/point.ts +++ b/src/server/helpers/spatial-data/point.ts @@ -1,5 +1,5 @@ import { DriverValueMapper, sql } from 'drizzle-orm' -import { customType } from 'drizzle-orm/mysql-core' +import { customType } from 'drizzle-orm/pg-core' import { PointString, getPoint, @@ -16,12 +16,12 @@ export const pointType = customType<{ driverData: string }>({ dataType() { - return `POINT SRID ${SRID_CODE}` + return `Geometry(Point,${SRID_CODE})` }, toDriver(value: WrongPointType | string) { const point = getPoint(value) if (!point) throw new Error(`Invalid point value: ${JSON.stringify(value)}`) - return sql`ST_PointFromText(${pointToString(point)}, ${SRID_CODE})` + return sql`ST_GeomFromText('${pointToString(point)}',${SRID_CODE})` }, fromDriver(value: string): WrongPointType { const point = getPoint(value) diff --git a/src/server/helpers/translations/db-tables.ts b/src/server/helpers/translations/db-tables.ts index 56bee2a0..ed0a011e 100644 --- a/src/server/helpers/translations/db-tables.ts +++ b/src/server/helpers/translations/db-tables.ts @@ -1,10 +1,10 @@ import { relations, TableRelationsHelpers } from 'drizzle-orm' import { - int, - MySqlColumnBuilderBase, - mysqlTable, + integer, + PgColumnBuilderBase, + pgTable, serial, -} from 'drizzle-orm/mysql-core' +} from 'drizzle-orm/pg-core' import { dbLocale } from '../../db/utilities' /** @@ -12,14 +12,13 @@ import { dbLocale } from '../../db/utilities' * The id columns is added automatically. * * The normalTable contains normal and translatable columns - * The translationsTable contains just translatable columns * + * The translationsTable contains just translatable columns */ - -export function mysqlTableWithTranslations< +export function pgTableWithTranslations< Name extends string, - NC extends Record, - TC extends Record, + NC extends Record, + TC extends Record, >({ name, normalColumns, @@ -29,14 +28,14 @@ export function mysqlTableWithTranslations< normalColumns: NC translatableColumns: TC }) { - const normalTable = mysqlTable(name, { + const normalTable = pgTable(name, { id: serial('id').primaryKey(), ...normalColumns, ...translatableColumns, }) - const translationsTable = mysqlTable(`${name}_translation`, { + const translationsTable = pgTable(`${name}_translation`, { id: serial('id').primaryKey(), - ...typeDynamicKey(`${name}Id`, int(`${name}_id`).notNull()), + ...typeDynamicKey(`${name}Id`, integer(`${name}_id`).notNull()), locale: dbLocale('locale').notNull(), ...translatableColumns, }) diff --git a/src/server/helpers/translations/query/with-translations.ts b/src/server/helpers/translations/query/with-translations.ts index 15edd25d..3c6830db 100644 --- a/src/server/helpers/translations/query/with-translations.ts +++ b/src/server/helpers/translations/query/with-translations.ts @@ -27,8 +27,8 @@ export function withTranslations< columns: config.columns, where: (translations: TranslationsTableColumns) => and( - isNotNull(sql.placeholder('locale')), - eq(translations.locale, sql.placeholder('locale')) + isNotNull(sql`${sql.placeholder('locale')}::text`), + eq(translations.locale, sql`${sql.placeholder('locale')}::text`) ), }, diff --git a/src/server/helpers/translations/select.ts b/src/server/helpers/translations/select.ts index cab1f6f5..9321b525 100644 --- a/src/server/helpers/translations/select.ts +++ b/src/server/helpers/translations/select.ts @@ -47,11 +47,11 @@ export function flattenTranslationsFromSelect< * .leftJoin(translationsTable, eq(normalTable.id, translationsTable.normalTableItemId)) * .where( * or( - * eq(translationsTable.locale, sql.placeholder('locale')), + * eq(translationsTable.locale, sql`${sql.placeholder('locale')}::text`), * isNull(translationsTable.locale) * ) * ) - * .prepare() + * .prepare('statement_name') */ export function selectTranslations< K extends Exclude,