diff --git a/deploy/music-collector/README.md b/deploy/music-collector/README.md index 9d9defd..4793ede 100644 --- a/deploy/music-collector/README.md +++ b/deploy/music-collector/README.md @@ -19,7 +19,7 @@ schema in the `personal` database: URIs `https://stanrunge.dev/api/spotify/callback` and `https://dev.stanrunge.dev/api/spotify/callback`. 2. Logged in as the owner, open once. Scopes: - `user-read-currently-playing user-read-recently-played user-read-playback-state user-top-read`. + `user-read-currently-playing user-read-recently-played user-read-playback-state user-top-read user-library-read playlist-read-private`. 3. That's it: the **app itself** polls every minute (`src/lib/server/music/poller.ts`, started from `hooks.server.ts` `init`) with its own role and Spotify credentials. Status (last poll, last error) is shown to the owner on `/trackers/music`. diff --git a/drizzle/20261024160937_osu_match_cache/migration.sql b/drizzle/20261024160937_osu_match_cache/migration.sql new file mode 100644 index 0000000..50aa2e8 --- /dev/null +++ b/drizzle/20261024160937_osu_match_cache/migration.sql @@ -0,0 +1,7 @@ +CREATE TABLE "music"."osu_match_cache" ( + "key" text PRIMARY KEY, + "result" jsonb NOT NULL, + "searched_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +DO $$ BEGIN IF current_user = 'personal' THEN GRANT SELECT, INSERT, UPDATE, DELETE ON music.osu_match_cache TO personal_app; END IF; END $$; diff --git a/drizzle/20261024160937_osu_match_cache/snapshot.json b/drizzle/20261024160937_osu_match_cache/snapshot.json new file mode 100644 index 0000000..f154b55 --- /dev/null +++ b/drizzle/20261024160937_osu_match_cache/snapshot.json @@ -0,0 +1,19888 @@ +{ + "version": "8", + "dialect": "postgres", + "id": "b6f2af12-725b-4fe3-9de9-163e0edd767e", + "prevIds": [ + "66124b95-95d0-4692-9097-1414366799f8" + ], + "ddl": [ + { + "name": "animaldex", + "entityType": "schemas" + }, + { + "name": "auth", + "entityType": "schemas" + }, + { + "name": "books", + "entityType": "schemas" + }, + { + "name": "cars", + "entityType": "schemas" + }, + { + "name": "cs", + "entityType": "schemas" + }, + { + "name": "games", + "entityType": "schemas" + }, + { + "name": "groceries", + "entityType": "schemas" + }, + { + "name": "health", + "entityType": "schemas" + }, + { + "name": "home", + "entityType": "schemas" + }, + { + "name": "house", + "entityType": "schemas" + }, + { + "name": "meta", + "entityType": "schemas" + }, + { + "name": "money", + "entityType": "schemas" + }, + { + "name": "music", + "entityType": "schemas" + }, + { + "name": "ref", + "entityType": "schemas" + }, + { + "name": "site", + "entityType": "schemas" + }, + { + "name": "tasks", + "entityType": "schemas" + }, + { + "values": [ + "draft", + "published" + ], + "name": "blog_article_status", + "entityType": "enums", + "schema": "site" + }, + { + "values": [ + "catchable", + "trade_only", + "transfer_only", + "event_only", + "unknown", + "evolve", + "breed" + ], + "name": "availability", + "entityType": "enums", + "schema": "ref" + }, + { + "values": [ + "pending", + "matched", + "low_confidence", + "not_found", + "manual" + ], + "name": "metadata_status", + "entityType": "enums", + "schema": "books" + }, + { + "values": [ + "want_to_read", + "reading", + "finished", + "abandoned" + ], + "name": "reading_status", + "entityType": "enums", + "schema": "books" + }, + { + "isRlsEnabled": false, + "name": "account", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": false, + "name": "session", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": false, + "name": "user", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": false, + "name": "verification", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": false, + "name": "blog_articles", + "entityType": "tables", + "schema": "site" + }, + { + "isRlsEnabled": false, + "name": "tasks", + "entityType": "tables", + "schema": "site" + }, + { + "isRlsEnabled": false, + "name": "task_topics", + "entityType": "tables", + "schema": "site" + }, + { + "isRlsEnabled": false, + "name": "topics", + "entityType": "tables", + "schema": "site" + }, + { + "isRlsEnabled": false, + "name": "catch_em_all_settings", + "entityType": "tables", + "schema": "games" + }, + { + "isRlsEnabled": false, + "name": "pokemon_games", + "entityType": "tables", + "schema": "ref" + }, + { + "isRlsEnabled": false, + "name": "pokemon", + "entityType": "tables", + "schema": "ref" + }, + { + "isRlsEnabled": false, + "name": "pokemon_encounters", + "entityType": "tables", + "schema": "ref" + }, + { + "isRlsEnabled": false, + "name": "pokemon_evolutions", + "entityType": "tables", + "schema": "ref" + }, + { + "isRlsEnabled": false, + "name": "pokemon_game_entries", + "entityType": "tables", + "schema": "ref" + }, + { + "isRlsEnabled": false, + "name": "pokemon_locations", + "entityType": "tables", + "schema": "ref" + }, + { + "isRlsEnabled": false, + "name": "catch_em_all_entries", + "entityType": "tables", + "schema": "games" + }, + { + "isRlsEnabled": false, + "name": "catch_em_all_games", + "entityType": "tables", + "schema": "games" + }, + { + "isRlsEnabled": false, + "name": "tracker_games", + "entityType": "tables", + "schema": "ref" + }, + { + "isRlsEnabled": false, + "name": "tracker_items", + "entityType": "tables", + "schema": "ref" + }, + { + "isRlsEnabled": false, + "name": "tracker_progress", + "entityType": "tables", + "schema": "games" + }, + { + "isRlsEnabled": false, + "name": "osu_entries", + "entityType": "tables", + "schema": "games" + }, + { + "isRlsEnabled": false, + "name": "pokemon_catches", + "entityType": "tables", + "schema": "games" + }, + { + "isRlsEnabled": false, + "name": "pokemon_dex_numbers", + "entityType": "tables", + "schema": "ref" + }, + { + "isRlsEnabled": false, + "name": "pokemon_game_research", + "entityType": "tables", + "schema": "ref" + }, + { + "isRlsEnabled": false, + "name": "pokemon_journeys", + "entityType": "tables", + "schema": "games" + }, + { + "isRlsEnabled": false, + "name": "pokemon_learnsets", + "entityType": "tables", + "schema": "ref" + }, + { + "isRlsEnabled": false, + "name": "pokemon_milestones", + "entityType": "tables", + "schema": "games" + }, + { + "isRlsEnabled": false, + "name": "pokemon_moves", + "entityType": "tables", + "schema": "ref" + }, + { + "isRlsEnabled": false, + "name": "pokemon_research", + "entityType": "tables", + "schema": "ref" + }, + { + "isRlsEnabled": false, + "name": "pokemon_seen", + "entityType": "tables", + "schema": "games" + }, + { + "isRlsEnabled": false, + "name": "tracker_challenge_progress", + "entityType": "tables", + "schema": "games" + }, + { + "isRlsEnabled": false, + "name": "tracker_challenges", + "entityType": "tables", + "schema": "ref" + }, + { + "isRlsEnabled": false, + "name": "tracker_ranks", + "entityType": "tables", + "schema": "games" + }, + { + "isRlsEnabled": false, + "name": "tracker_weapon_ranks", + "entityType": "tables", + "schema": "games" + }, + { + "isRlsEnabled": false, + "name": "animals", + "entityType": "tables", + "schema": "animaldex" + }, + { + "isRlsEnabled": false, + "name": "sighting_photos", + "entityType": "tables", + "schema": "animaldex" + }, + { + "isRlsEnabled": false, + "name": "sightings", + "entityType": "tables", + "schema": "animaldex" + }, + { + "isRlsEnabled": false, + "name": "columns", + "entityType": "tables", + "schema": "meta" + }, + { + "isRlsEnabled": false, + "name": "edit_log", + "entityType": "tables", + "schema": "meta" + }, + { + "isRlsEnabled": false, + "name": "tables", + "entityType": "tables", + "schema": "meta" + }, + { + "isRlsEnabled": false, + "name": "accounts", + "entityType": "tables", + "schema": "money" + }, + { + "isRlsEnabled": false, + "name": "bank_sessions", + "entityType": "tables", + "schema": "money" + }, + { + "isRlsEnabled": false, + "name": "forecasts", + "entityType": "tables", + "schema": "money" + }, + { + "isRlsEnabled": false, + "name": "insurances", + "entityType": "tables", + "schema": "money" + }, + { + "isRlsEnabled": false, + "name": "projection_settings", + "entityType": "tables", + "schema": "money" + }, + { + "isRlsEnabled": false, + "name": "recurring", + "entityType": "tables", + "schema": "money" + }, + { + "isRlsEnabled": false, + "name": "transactions", + "entityType": "tables", + "schema": "money" + }, + { + "isRlsEnabled": false, + "name": "utility_readings", + "entityType": "tables", + "schema": "money" + }, + { + "isRlsEnabled": false, + "name": "utility_settings", + "entityType": "tables", + "schema": "money" + }, + { + "isRlsEnabled": false, + "name": "wishlist", + "entityType": "tables", + "schema": "money" + }, + { + "isRlsEnabled": false, + "name": "item_dimensions", + "entityType": "tables", + "schema": "cs" + }, + { + "isRlsEnabled": false, + "name": "items", + "entityType": "tables", + "schema": "cs" + }, + { + "isRlsEnabled": false, + "name": "price_observations", + "entityType": "tables", + "schema": "cs" + }, + { + "isRlsEnabled": false, + "name": "price_streams", + "entityType": "tables", + "schema": "cs" + }, + { + "isRlsEnabled": false, + "name": "alert_rules", + "entityType": "tables", + "schema": "house" + }, + { + "isRlsEnabled": false, + "name": "listings", + "entityType": "tables", + "schema": "house" + }, + { + "isRlsEnabled": false, + "name": "price_history", + "entityType": "tables", + "schema": "house" + }, + { + "isRlsEnabled": false, + "name": "searches", + "entityType": "tables", + "schema": "house" + }, + { + "isRlsEnabled": false, + "name": "worker_runs", + "entityType": "tables", + "schema": "house" + }, + { + "isRlsEnabled": false, + "name": "appointments", + "entityType": "tables", + "schema": "health" + }, + { + "isRlsEnabled": false, + "name": "body_measurements", + "entityType": "tables", + "schema": "health" + }, + { + "isRlsEnabled": false, + "name": "medications", + "entityType": "tables", + "schema": "health" + }, + { + "isRlsEnabled": false, + "name": "nutrition_daily", + "entityType": "tables", + "schema": "health" + }, + { + "isRlsEnabled": false, + "name": "sleep", + "entityType": "tables", + "schema": "health" + }, + { + "isRlsEnabled": false, + "name": "vaccinations", + "entityType": "tables", + "schema": "health" + }, + { + "isRlsEnabled": false, + "name": "workouts", + "entityType": "tables", + "schema": "health" + }, + { + "isRlsEnabled": false, + "name": "files", + "entityType": "tables", + "schema": "books" + }, + { + "isRlsEnabled": false, + "name": "notes", + "entityType": "tables", + "schema": "books" + }, + { + "isRlsEnabled": false, + "name": "progress", + "entityType": "tables", + "schema": "books" + }, + { + "isRlsEnabled": false, + "name": "sessions", + "entityType": "tables", + "schema": "books" + }, + { + "isRlsEnabled": false, + "name": "shelf_works", + "entityType": "tables", + "schema": "books" + }, + { + "isRlsEnabled": false, + "name": "shelves", + "entityType": "tables", + "schema": "books" + }, + { + "isRlsEnabled": false, + "name": "works", + "entityType": "tables", + "schema": "books" + }, + { + "isRlsEnabled": false, + "name": "activity", + "entityType": "tables", + "schema": "tasks" + }, + { + "isRlsEnabled": false, + "name": "areas", + "entityType": "tables", + "schema": "tasks" + }, + { + "isRlsEnabled": false, + "name": "goals", + "entityType": "tables", + "schema": "tasks" + }, + { + "isRlsEnabled": false, + "name": "tasks", + "entityType": "tables", + "schema": "tasks" + }, + { + "isRlsEnabled": false, + "name": "groups", + "entityType": "tables", + "schema": "groceries" + }, + { + "isRlsEnabled": false, + "name": "import_runs", + "entityType": "tables", + "schema": "groceries" + }, + { + "isRlsEnabled": false, + "name": "item_prices", + "entityType": "tables", + "schema": "groceries" + }, + { + "isRlsEnabled": false, + "name": "items", + "entityType": "tables", + "schema": "groceries" + }, + { + "isRlsEnabled": false, + "name": "stores", + "entityType": "tables", + "schema": "groceries" + }, + { + "isRlsEnabled": false, + "name": "links", + "entityType": "tables", + "schema": "home" + }, + { + "isRlsEnabled": false, + "name": "snapshots", + "entityType": "tables", + "schema": "home" + }, + { + "isRlsEnabled": false, + "name": "brands", + "entityType": "tables", + "schema": "cars" + }, + { + "isRlsEnabled": false, + "name": "models", + "entityType": "tables", + "schema": "cars" + }, + { + "isRlsEnabled": false, + "name": "variants", + "entityType": "tables", + "schema": "cars" + }, + { + "isRlsEnabled": false, + "name": "albums", + "entityType": "tables", + "schema": "music" + }, + { + "isRlsEnabled": false, + "name": "artists", + "entityType": "tables", + "schema": "music" + }, + { + "isRlsEnabled": false, + "name": "import_state", + "entityType": "tables", + "schema": "music" + }, + { + "isRlsEnabled": false, + "name": "now_playing", + "entityType": "tables", + "schema": "music" + }, + { + "isRlsEnabled": false, + "name": "osu_match_cache", + "entityType": "tables", + "schema": "music" + }, + { + "isRlsEnabled": false, + "name": "plays", + "entityType": "tables", + "schema": "music" + }, + { + "isRlsEnabled": false, + "name": "spotify_auth", + "entityType": "tables", + "schema": "music" + }, + { + "isRlsEnabled": false, + "name": "track_artists", + "entityType": "tables", + "schema": "music" + }, + { + "isRlsEnabled": false, + "name": "tracks", + "entityType": "tables", + "schema": "music" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "issuer", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider_id", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "access_token", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refresh_token", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id_token", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "access_token_expires_at", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refresh_token_expires_at", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "password", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_at", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ip_address", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_agent", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'user'", + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "email_verified", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "identifier", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_at", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "site", + "table": "blog_articles" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "site", + "table": "blog_articles" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slug", + "entityType": "columns", + "schema": "site", + "table": "blog_articles" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns", + "schema": "site", + "table": "blog_articles" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "tags", + "entityType": "columns", + "schema": "site", + "table": "blog_articles" + }, + { + "type": "blog_article_status", + "typeSchema": "site", + "notNull": true, + "dimensions": 0, + "default": "'draft'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "site", + "table": "blog_articles" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "site", + "table": "blog_articles" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "site", + "table": "blog_articles" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "site", + "table": "tasks" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "site", + "table": "tasks" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "current_points", + "entityType": "columns", + "schema": "site", + "table": "tasks" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "total_points", + "entityType": "columns", + "schema": "site", + "table": "tasks" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "site", + "table": "tasks" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "site", + "table": "tasks" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "site", + "table": "tasks" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "site", + "table": "task_topics" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "task_id", + "entityType": "columns", + "schema": "site", + "table": "task_topics" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "topic_id", + "entityType": "columns", + "schema": "site", + "table": "task_topics" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "site", + "table": "task_topics" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "site", + "table": "task_topics" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "site", + "table": "topics" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "site", + "table": "topics" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "emoji", + "entityType": "columns", + "schema": "site", + "table": "topics" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "site", + "table": "topics" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "site", + "table": "topics" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "games", + "table": "catch_em_all_settings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "games", + "table": "catch_em_all_settings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "games", + "table": "catch_em_all_settings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "games", + "table": "catch_em_all_settings" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_games" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source_id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_games" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slug", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_games" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_games" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "generation", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_games" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sort_order", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_games" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "breeding", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_games" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_games" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_games" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "number", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "generation", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type1", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type2", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "hp", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attack", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "defense", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "special_attack", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "special_defense", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "speed", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "evolves_from", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "evolution_chain", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "is_baby", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "is_legendary", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "is_mythical", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "ref", + "table": "pokemon" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pokemon_id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "game_id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "location_id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "area", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "method", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "min_level", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "max_level", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rarity", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "form", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "conditions", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "note", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pokeapi'", + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_evolutions" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "from_pokemon_id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_evolutions" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "to_pokemon_id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_evolutions" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "game_id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_evolutions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "method", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_evolutions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pokeapi'", + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_evolutions" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_evolutions" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_evolutions" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_game_entries" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pokemon_id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_game_entries" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "game_id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_game_entries" + }, + { + "type": "availability", + "typeSchema": "ref", + "notNull": true, + "dimensions": 0, + "default": "'catchable'", + "generated": null, + "identity": null, + "name": "availability", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_game_entries" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "note", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_game_entries" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pokeapi'", + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_game_entries" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_game_entries" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_game_entries" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_locations" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source_id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_locations" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slug", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_locations" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_locations" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "region", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_locations" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_locations" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image_key", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_locations" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image_credit", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_locations" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pokeapi'", + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_locations" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_locations" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_locations" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "games", + "table": "catch_em_all_entries" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pokemon_game_entry_id", + "entityType": "columns", + "schema": "games", + "table": "catch_em_all_entries" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "games", + "table": "catch_em_all_entries" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "games", + "table": "catch_em_all_entries" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "games", + "table": "catch_em_all_entries" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "games", + "table": "catch_em_all_games" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "games", + "table": "catch_em_all_games" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "game_id", + "entityType": "columns", + "schema": "games", + "table": "catch_em_all_games" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "games", + "table": "catch_em_all_games" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "games", + "table": "catch_em_all_games" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "ref", + "table": "tracker_games" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slug", + "entityType": "columns", + "schema": "ref", + "table": "tracker_games" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "franchise", + "entityType": "columns", + "schema": "ref", + "table": "tracker_games" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "ref", + "table": "tracker_games" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "short_name", + "entityType": "columns", + "schema": "ref", + "table": "tracker_games" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "release_year", + "entityType": "columns", + "schema": "ref", + "table": "tracker_games" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sort_order", + "entityType": "columns", + "schema": "ref", + "table": "tracker_games" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rules", + "entityType": "columns", + "schema": "ref", + "table": "tracker_games" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "ref", + "table": "tracker_games" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "ref", + "table": "tracker_games" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "ref", + "table": "tracker_items" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "game_id", + "entityType": "columns", + "schema": "ref", + "table": "tracker_items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key", + "entityType": "columns", + "schema": "ref", + "table": "tracker_items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "ref", + "table": "tracker_items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "ref", + "table": "tracker_items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "ref", + "table": "tracker_items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "ref", + "table": "tracker_items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "icon", + "entityType": "columns", + "schema": "ref", + "table": "tracker_items" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "post_launch", + "entityType": "columns", + "schema": "ref", + "table": "tracker_items" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sort_order", + "entityType": "columns", + "schema": "ref", + "table": "tracker_items" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "ref", + "table": "tracker_items" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "ref", + "table": "tracker_items" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "games", + "table": "tracker_progress" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "games", + "table": "tracker_progress" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "item_id", + "entityType": "columns", + "schema": "games", + "table": "tracker_progress" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'done'", + "generated": null, + "identity": null, + "name": "milestone", + "entityType": "columns", + "schema": "games", + "table": "tracker_progress" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "games", + "table": "tracker_progress" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "games", + "table": "tracker_progress" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'osu'", + "generated": null, + "identity": null, + "name": "mode", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "beatmap_url", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "score_url", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pass'", + "generated": null, + "identity": null, + "name": "goal", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'stamina'", + "generated": null, + "identity": null, + "name": "skill", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bpm", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "duration", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accuracy", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "combo", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "misses", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pp", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'NM'", + "generated": null, + "identity": null, + "name": "mods", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "numeric(4,2)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1.00", + "generated": null, + "identity": null, + "name": "rate", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "achieved", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "date", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "played_on", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "games", + "table": "osu_entries" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "game_id", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pokemon_id", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "nickname", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "level", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "moves", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "party_slot", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "shiny", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nature", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ability", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ball", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "location", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'caught'", + "generated": null, + "identity": null, + "name": "obtained", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'story'", + "generated": null, + "identity": null, + "name": "stage", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "date", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "caught_on", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "games", + "table": "pokemon_catches" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_dex_numbers" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pokemon_id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_dex_numbers" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "game_id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_dex_numbers" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dex", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_dex_numbers" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dex_name", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_dex_numbers" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "number", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_dex_numbers" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "game_id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_game_research" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "version_group", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_game_research" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "regions", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_game_research" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "games", + "table": "pokemon_journeys" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "games", + "table": "pokemon_journeys" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "game_id", + "entityType": "columns", + "schema": "games", + "table": "pokemon_journeys" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'story'", + "generated": null, + "identity": null, + "name": "stage", + "entityType": "columns", + "schema": "games", + "table": "pokemon_journeys" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "location", + "entityType": "columns", + "schema": "games", + "table": "pokemon_journeys" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "completed", + "entityType": "columns", + "schema": "games", + "table": "pokemon_journeys" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "games", + "table": "pokemon_journeys" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "games", + "table": "pokemon_journeys" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_learnsets" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pokemon_id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_learnsets" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "version_group", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_learnsets" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "moves", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_learnsets" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "games", + "table": "pokemon_milestones" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "games", + "table": "pokemon_milestones" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "game_id", + "entityType": "columns", + "schema": "games", + "table": "pokemon_milestones" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key", + "entityType": "columns", + "schema": "games", + "table": "pokemon_milestones" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "games", + "table": "pokemon_milestones" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "games", + "table": "pokemon_milestones" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'story'", + "generated": null, + "identity": null, + "name": "stage", + "entityType": "columns", + "schema": "games", + "table": "pokemon_milestones" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "done", + "entityType": "columns", + "schema": "games", + "table": "pokemon_milestones" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "games", + "table": "pokemon_milestones" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "games", + "table": "pokemon_milestones" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "games", + "table": "pokemon_milestones" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_moves" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_moves" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_moves" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_moves" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "power", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_moves" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accuracy", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_moves" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pp", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_moves" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "priority", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_moves" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "target", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_moves" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pokemon_id", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_research" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "facts", + "entityType": "columns", + "schema": "ref", + "table": "pokemon_research" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "games", + "table": "pokemon_seen" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "games", + "table": "pokemon_seen" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "game_id", + "entityType": "columns", + "schema": "games", + "table": "pokemon_seen" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pokemon_id", + "entityType": "columns", + "schema": "games", + "table": "pokemon_seen" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "games", + "table": "pokemon_seen" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "games", + "table": "pokemon_seen" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "games", + "table": "tracker_challenge_progress" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "games", + "table": "tracker_challenge_progress" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "challenge_id", + "entityType": "columns", + "schema": "games", + "table": "tracker_challenge_progress" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "current", + "entityType": "columns", + "schema": "games", + "table": "tracker_challenge_progress" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "done", + "entityType": "columns", + "schema": "games", + "table": "tracker_challenge_progress" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "games", + "table": "tracker_challenge_progress" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "games", + "table": "tracker_challenge_progress" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "ref", + "table": "tracker_challenges" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "game_id", + "entityType": "columns", + "schema": "ref", + "table": "tracker_challenges" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key", + "entityType": "columns", + "schema": "ref", + "table": "tracker_challenges" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "ref", + "table": "tracker_challenges" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "ref", + "table": "tracker_challenges" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requirement", + "entityType": "columns", + "schema": "ref", + "table": "tracker_challenges" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reward", + "entityType": "columns", + "schema": "ref", + "table": "tracker_challenges" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "icon", + "entityType": "columns", + "schema": "ref", + "table": "tracker_challenges" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "target", + "entityType": "columns", + "schema": "ref", + "table": "tracker_challenges" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source_url", + "entityType": "columns", + "schema": "ref", + "table": "tracker_challenges" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "games", + "table": "tracker_ranks" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "games", + "table": "tracker_ranks" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "game_id", + "entityType": "columns", + "schema": "games", + "table": "tracker_ranks" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "level", + "entityType": "columns", + "schema": "games", + "table": "tracker_ranks" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "prestige", + "entityType": "columns", + "schema": "games", + "table": "tracker_ranks" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "games", + "table": "tracker_ranks" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "games", + "table": "tracker_ranks" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "games", + "table": "tracker_weapon_ranks" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "games", + "table": "tracker_weapon_ranks" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "item_id", + "entityType": "columns", + "schema": "games", + "table": "tracker_weapon_ranks" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "level", + "entityType": "columns", + "schema": "games", + "table": "tracker_weapon_ranks" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "prestige", + "entityType": "columns", + "schema": "games", + "table": "tracker_weapon_ranks" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "games", + "table": "tracker_weapon_ranks" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "games", + "table": "tracker_weapon_ranks" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "animaldex", + "table": "animals" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "species", + "entityType": "columns", + "schema": "animaldex", + "table": "animals" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "breed", + "entityType": "columns", + "schema": "animaldex", + "table": "animals" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "animal_name", + "entityType": "columns", + "schema": "animaldex", + "table": "animals" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "animaldex", + "table": "animals" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ai_breed_suggestion", + "entityType": "columns", + "schema": "animaldex", + "table": "animals" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ai_breed_confidence", + "entityType": "columns", + "schema": "animaldex", + "table": "animals" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "submitted_at", + "entityType": "columns", + "schema": "animaldex", + "table": "animals" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accepted_at", + "entityType": "columns", + "schema": "animaldex", + "table": "animals" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "denied_at", + "entityType": "columns", + "schema": "animaldex", + "table": "animals" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "animaldex", + "table": "animals" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "animaldex", + "table": "animals" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "animaldex", + "table": "sighting_photos" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sighting_id", + "entityType": "columns", + "schema": "animaldex", + "table": "sighting_photos" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "r2_key", + "entityType": "columns", + "schema": "animaldex", + "table": "sighting_photos" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "animaldex", + "table": "sighting_photos" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sort_order", + "entityType": "columns", + "schema": "animaldex", + "table": "sighting_photos" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "uploaded_at", + "entityType": "columns", + "schema": "animaldex", + "table": "sighting_photos" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "animaldex", + "table": "sighting_photos" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "animaldex", + "table": "sighting_photos" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "animaldex", + "table": "sightings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "animal_id", + "entityType": "columns", + "schema": "animaldex", + "table": "sightings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reporter_name", + "entityType": "columns", + "schema": "animaldex", + "table": "sightings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seen_at", + "entityType": "columns", + "schema": "animaldex", + "table": "sightings" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lat", + "entityType": "columns", + "schema": "animaldex", + "table": "sightings" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lng", + "entityType": "columns", + "schema": "animaldex", + "table": "sightings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "submitted_at", + "entityType": "columns", + "schema": "animaldex", + "table": "sightings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accepted_at", + "entityType": "columns", + "schema": "animaldex", + "table": "sightings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "denied_at", + "entityType": "columns", + "schema": "animaldex", + "table": "sightings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "animaldex", + "table": "sightings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "animaldex", + "table": "sightings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": { + "type": "byDefault", + "name": "columns_id_seq", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": 1, + "cycle": false + }, + "name": "id", + "entityType": "columns", + "schema": "meta", + "table": "columns" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "table_id", + "entityType": "columns", + "schema": "meta", + "table": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "column_name", + "entityType": "columns", + "schema": "meta", + "table": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "label", + "entityType": "columns", + "schema": "meta", + "table": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ui_type", + "entityType": "columns", + "schema": "meta", + "table": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "options", + "entityType": "columns", + "schema": "meta", + "table": "columns" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "meta", + "table": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hidden", + "entityType": "columns", + "schema": "meta", + "table": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "help_text", + "entityType": "columns", + "schema": "meta", + "table": "columns" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "meta", + "table": "columns" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "meta", + "table": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": { + "type": "always", + "name": "edit_log_id_seq", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "9223372036854775807", + "cache": 1, + "cycle": false + }, + "name": "id", + "entityType": "columns", + "schema": "meta", + "table": "edit_log" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "at", + "entityType": "columns", + "schema": "meta", + "table": "edit_log" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "meta", + "table": "edit_log" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_email", + "entityType": "columns", + "schema": "meta", + "table": "edit_log" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "schema_name", + "entityType": "columns", + "schema": "meta", + "table": "edit_log" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "table_name", + "entityType": "columns", + "schema": "meta", + "table": "edit_log" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns", + "schema": "meta", + "table": "edit_log" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pk", + "entityType": "columns", + "schema": "meta", + "table": "edit_log" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "before", + "entityType": "columns", + "schema": "meta", + "table": "edit_log" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "after", + "entityType": "columns", + "schema": "meta", + "table": "edit_log" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": { + "type": "byDefault", + "name": "tables_id_seq", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": 1, + "cycle": false + }, + "name": "id", + "entityType": "columns", + "schema": "meta", + "table": "tables" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "schema_name", + "entityType": "columns", + "schema": "meta", + "table": "tables" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "table_name", + "entityType": "columns", + "schema": "meta", + "table": "tables" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slug", + "entityType": "columns", + "schema": "meta", + "table": "tables" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "display_name", + "entityType": "columns", + "schema": "meta", + "table": "tables" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "meta", + "table": "tables" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "icon", + "entityType": "columns", + "schema": "meta", + "table": "tables" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "picture_url", + "entityType": "columns", + "schema": "meta", + "table": "tables" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "meta", + "table": "tables" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "editable", + "entityType": "columns", + "schema": "meta", + "table": "tables" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "has_done", + "entityType": "columns", + "schema": "meta", + "table": "tables" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "default_sort", + "entityType": "columns", + "schema": "meta", + "table": "tables" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sort_order", + "entityType": "columns", + "schema": "meta", + "table": "tables" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "archived_at", + "entityType": "columns", + "schema": "meta", + "table": "tables" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "meta", + "table": "tables" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "meta", + "table": "tables" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "money", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "money", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "money", + "table": "accounts" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "opening_balance_cents", + "entityType": "columns", + "schema": "money", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'spendable'", + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "money", + "table": "accounts" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "include_in_total", + "entityType": "columns", + "schema": "money", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "color", + "entityType": "columns", + "schema": "money", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'personal'", + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns", + "schema": "money", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "owner", + "entityType": "columns", + "schema": "money", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "iban", + "entityType": "columns", + "schema": "money", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "external_uid", + "entityType": "columns", + "schema": "money", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'manual'", + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns", + "schema": "money", + "table": "accounts" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bank_balance_cents", + "entityType": "columns", + "schema": "money", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bank_balance_type", + "entityType": "columns", + "schema": "money", + "table": "accounts" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bank_balance_at", + "entityType": "columns", + "schema": "money", + "table": "accounts" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "money", + "table": "accounts" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "money", + "table": "accounts" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "money", + "table": "bank_sessions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "money", + "table": "bank_sessions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'enablebanking'", + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns", + "schema": "money", + "table": "bank_sessions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "session_id", + "entityType": "columns", + "schema": "money", + "table": "bank_sessions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aspsp_name", + "entityType": "columns", + "schema": "money", + "table": "bank_sessions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aspsp_country", + "entityType": "columns", + "schema": "money", + "table": "bank_sessions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "psu_type", + "entityType": "columns", + "schema": "money", + "table": "bank_sessions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'authorized'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "money", + "table": "bank_sessions" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "valid_until", + "entityType": "columns", + "schema": "money", + "table": "bank_sessions" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "accounts", + "entityType": "columns", + "schema": "money", + "table": "bank_sessions" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_synced_at", + "entityType": "columns", + "schema": "money", + "table": "bank_sessions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_error", + "entityType": "columns", + "schema": "money", + "table": "bank_sessions" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "money", + "table": "bank_sessions" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "money", + "table": "bank_sessions" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "money", + "table": "forecasts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "money", + "table": "forecasts" + }, + { + "type": "date", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns", + "schema": "money", + "table": "forecasts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "money", + "table": "forecasts" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "amount_cents", + "entityType": "columns", + "schema": "money", + "table": "forecasts" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "money", + "table": "forecasts" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "money", + "table": "forecasts" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "money", + "table": "forecasts" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "money", + "table": "insurances" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "money", + "table": "insurances" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "money", + "table": "insurances" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns", + "schema": "money", + "table": "insurances" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "coverage", + "entityType": "columns", + "schema": "money", + "table": "insurances" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "premium_cents", + "entityType": "columns", + "schema": "money", + "table": "insurances" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'monthly'", + "generated": null, + "identity": null, + "name": "cadence", + "entityType": "columns", + "schema": "money", + "table": "insurances" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "money", + "table": "insurances" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "money", + "table": "insurances" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "money", + "table": "projection_settings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "money", + "table": "projection_settings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "investment_account_id", + "entityType": "columns", + "schema": "money", + "table": "projection_settings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "100000", + "generated": null, + "identity": null, + "name": "reserve_cents", + "entityType": "columns", + "schema": "money", + "table": "projection_settings" + }, + { + "type": "numeric(5,2)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'5.00'", + "generated": null, + "identity": null, + "name": "annual_return_percent", + "entityType": "columns", + "schema": "money", + "table": "projection_settings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'excess'", + "generated": null, + "identity": null, + "name": "contribution_mode", + "entityType": "columns", + "schema": "money", + "table": "projection_settings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "include_recurring", + "entityType": "columns", + "schema": "money", + "table": "projection_settings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "fixed_monthly_cents", + "entityType": "columns", + "schema": "money", + "table": "projection_settings" + }, + { + "type": "date", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "end_date", + "entityType": "columns", + "schema": "money", + "table": "projection_settings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "money", + "table": "projection_settings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "money", + "table": "projection_settings" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "money", + "table": "recurring" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "money", + "table": "recurring" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "money", + "table": "recurring" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "amount_cents", + "entityType": "columns", + "schema": "money", + "table": "recurring" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cadence", + "entityType": "columns", + "schema": "money", + "table": "recurring" + }, + { + "type": "date", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "starts_on", + "entityType": "columns", + "schema": "money", + "table": "recurring" + }, + { + "type": "date", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ends_on", + "entityType": "columns", + "schema": "money", + "table": "recurring" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "money", + "table": "recurring" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "money", + "table": "recurring" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "money", + "table": "recurring" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "money", + "table": "transactions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "money", + "table": "transactions" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "money", + "table": "transactions" + }, + { + "type": "date", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns", + "schema": "money", + "table": "transactions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "money", + "table": "transactions" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "amount_cents", + "entityType": "columns", + "schema": "money", + "table": "transactions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "external_id", + "entityType": "columns", + "schema": "money", + "table": "transactions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'manual'", + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "money", + "table": "transactions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "booking_status", + "entityType": "columns", + "schema": "money", + "table": "transactions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "counterparty", + "entityType": "columns", + "schema": "money", + "table": "transactions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "money", + "table": "transactions" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "raw", + "entityType": "columns", + "schema": "money", + "table": "transactions" + }, + { + "type": "date", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value_date", + "entityType": "columns", + "schema": "money", + "table": "transactions" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "money", + "table": "transactions" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "money", + "table": "transactions" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "money", + "table": "utility_readings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "money", + "table": "utility_readings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "money", + "table": "utility_readings" + }, + { + "type": "date", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns", + "schema": "money", + "table": "utility_readings" + }, + { + "type": "numeric(12,3)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reading", + "entityType": "columns", + "schema": "money", + "table": "utility_readings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "money", + "table": "utility_readings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "money", + "table": "utility_readings" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "money", + "table": "utility_settings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "money", + "table": "utility_settings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "money", + "table": "utility_settings" + }, + { + "type": "numeric(12,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "rate_per_unit", + "entityType": "columns", + "schema": "money", + "table": "utility_settings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "monthly_advance_cents", + "entityType": "columns", + "schema": "money", + "table": "utility_settings" + }, + { + "type": "date", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "billing_start", + "entityType": "columns", + "schema": "money", + "table": "utility_settings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "money", + "table": "utility_settings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "money", + "table": "utility_settings" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "money", + "table": "wishlist" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "money", + "table": "wishlist" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "money", + "table": "wishlist" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "estimated_cents", + "entityType": "columns", + "schema": "money", + "table": "wishlist" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "3", + "generated": null, + "identity": null, + "name": "priority", + "entityType": "columns", + "schema": "money", + "table": "wishlist" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "money", + "table": "wishlist" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "money", + "table": "wishlist" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "money", + "table": "wishlist" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "item_id", + "entityType": "columns", + "schema": "cs", + "table": "item_dimensions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key", + "entityType": "columns", + "schema": "cs", + "table": "item_dimensions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "cs", + "table": "item_dimensions" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "cs", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "market_hash_name", + "entityType": "columns", + "schema": "cs", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "cs", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "icon_url", + "entityType": "columns", + "schema": "cs", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "item_type", + "entityType": "columns", + "schema": "cs", + "table": "items" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "first_seen_at", + "entityType": "columns", + "schema": "cs", + "table": "items" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "last_seen_at", + "entityType": "columns", + "schema": "cs", + "table": "items" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": { + "type": "always", + "name": "price_observations_id_seq", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "9223372036854775807", + "cache": 1, + "cycle": false + }, + "name": "id", + "entityType": "columns", + "schema": "cs", + "table": "price_observations" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "item_id", + "entityType": "columns", + "schema": "cs", + "table": "price_observations" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "cs", + "table": "price_observations" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "cs", + "table": "price_observations" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "observed_at", + "entityType": "columns", + "schema": "cs", + "table": "price_observations" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "price_cents", + "entityType": "columns", + "schema": "cs", + "table": "price_observations" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "volume", + "entityType": "columns", + "schema": "cs", + "table": "price_observations" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "cs", + "table": "price_observations" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "imported_at", + "entityType": "columns", + "schema": "cs", + "table": "price_observations" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "cs", + "table": "price_streams" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "cs", + "table": "price_streams" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "cs", + "table": "price_streams" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "house", + "table": "alert_rules" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "house", + "table": "alert_rules" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "house", + "table": "alert_rules" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'rent'", + "generated": null, + "identity": null, + "name": "offer", + "entityType": "columns", + "schema": "house", + "table": "alert_rules" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "min_price", + "entityType": "columns", + "schema": "house", + "table": "alert_rules" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "max_price", + "entityType": "columns", + "schema": "house", + "table": "alert_rules" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "min_area", + "entityType": "columns", + "schema": "house", + "table": "alert_rules" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "min_bedrooms", + "entityType": "columns", + "schema": "house", + "table": "alert_rules" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "cities", + "entityType": "columns", + "schema": "house", + "table": "alert_rules" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "property_types", + "entityType": "columns", + "schema": "house", + "table": "alert_rules" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "house", + "table": "alert_rules" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "house", + "table": "alert_rules" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source_id", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "external_id", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "offer", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "property_type", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "street", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postal_code", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "city", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "city_slug", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "neighbourhood", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "price_eur", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "area_m2", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rooms", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bedrooms", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bathrooms", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "construction_year", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "energy_label", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "interior", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deposit_eur", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "available_from", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contract_type", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "agent", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image_url", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "features", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lat", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lng", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "offered_at", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "first_seen_at", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'slow'", + "generated": null, + "identity": null, + "name": "first_seen_lane", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "last_seen_at", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "detail_fetched_at", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "removed_at", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "alerted_at", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "address_key", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "duplicate_of", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "total_price_eur", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lbm_score", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lbm_class", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lbm_onv_class", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lbm_level", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lbm_precision", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lbm_buurt_code", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lbm_buurt_name", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lbm_year", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lbm_detail", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lbm_query", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lbm_scored_at", + "entityType": "columns", + "schema": "house", + "table": "listings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "listing_id", + "entityType": "columns", + "schema": "house", + "table": "price_history" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "observed_at", + "entityType": "columns", + "schema": "house", + "table": "price_history" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "price_eur", + "entityType": "columns", + "schema": "house", + "table": "price_history" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "search_url", + "entityType": "columns", + "schema": "house", + "table": "searches" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "house", + "table": "searches" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lane", + "entityType": "columns", + "schema": "house", + "table": "searches" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "first_synced_at", + "entityType": "columns", + "schema": "house", + "table": "searches" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "last_synced_at", + "entityType": "columns", + "schema": "house", + "table": "searches" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "last_found", + "entityType": "columns", + "schema": "house", + "table": "searches" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": { + "type": "always", + "name": "worker_runs_id_seq", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "9223372036854775807", + "cache": 1, + "cycle": false + }, + "name": "id", + "entityType": "columns", + "schema": "house", + "table": "worker_runs" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "house", + "table": "worker_runs" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lane", + "entityType": "columns", + "schema": "house", + "table": "worker_runs" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "house", + "table": "worker_runs" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "house", + "table": "worker_runs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "http_status", + "entityType": "columns", + "schema": "house", + "table": "worker_runs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "found", + "entityType": "columns", + "schema": "house", + "table": "worker_runs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "duration_ms", + "entityType": "columns", + "schema": "house", + "table": "worker_runs" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "message", + "entityType": "columns", + "schema": "house", + "table": "worker_runs" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "house", + "table": "worker_runs" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "gen_random_uuid()", + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "health", + "table": "appointments" + }, + { + "type": "date", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns", + "schema": "health", + "table": "appointments" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'appointment'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "health", + "table": "appointments" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns", + "schema": "health", + "table": "appointments" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "health", + "table": "appointments" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "health", + "table": "appointments" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "health", + "table": "appointments" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "gen_random_uuid()", + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "date", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "numeric(5,2)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "weight_kg", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "numeric(5,1)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "waist_cm", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "numeric(4,1)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "body_fat_pct", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "numeric(5,2)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "muscle_mass_kg", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "numeric(5,2)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "skeletal_muscle_kg", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "numeric(4,2)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bone_mass_kg", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "numeric(4,1)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "visceral_fat", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "numeric(4,1)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "body_water_pct", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "numeric(4,1)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "protein_pct", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bmr_kcal", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "numeric(4,1)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bmi", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "measured_at", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "health", + "table": "body_measurements" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "gen_random_uuid()", + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "health", + "table": "medications" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "health", + "table": "medications" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'medication'", + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "health", + "table": "medications" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dose", + "entityType": "columns", + "schema": "health", + "table": "medications" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "frequency", + "entityType": "columns", + "schema": "health", + "table": "medications" + }, + { + "type": "date", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "start_date", + "entityType": "columns", + "schema": "health", + "table": "medications" + }, + { + "type": "date", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stop_date", + "entityType": "columns", + "schema": "health", + "table": "medications" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "health", + "table": "medications" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "health", + "table": "medications" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "health", + "table": "medications" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "gen_random_uuid()", + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "health", + "table": "nutrition_daily" + }, + { + "type": "date", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns", + "schema": "health", + "table": "nutrition_daily" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kcal", + "entityType": "columns", + "schema": "health", + "table": "nutrition_daily" + }, + { + "type": "numeric(5,1)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "protein_g", + "entityType": "columns", + "schema": "health", + "table": "nutrition_daily" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "health", + "table": "nutrition_daily" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "health", + "table": "nutrition_daily" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "health", + "table": "nutrition_daily" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "gen_random_uuid()", + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "health", + "table": "sleep" + }, + { + "type": "date", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns", + "schema": "health", + "table": "sleep" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bedtime", + "entityType": "columns", + "schema": "health", + "table": "sleep" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wake_time", + "entityType": "columns", + "schema": "health", + "table": "sleep" + }, + { + "type": "numeric(4,2)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "round((extract(epoch from (wake_time - bedtime)) / 3600)::numeric, 2)", + "type": "stored" + }, + "identity": null, + "name": "hours", + "entityType": "columns", + "schema": "health", + "table": "sleep" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "health", + "table": "sleep" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "health", + "table": "sleep" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "health", + "table": "sleep" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "gen_random_uuid()", + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "health", + "table": "vaccinations" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "vaccine", + "entityType": "columns", + "schema": "health", + "table": "vaccinations" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "target", + "entityType": "columns", + "schema": "health", + "table": "vaccinations" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dose_no", + "entityType": "columns", + "schema": "health", + "table": "vaccinations" + }, + { + "type": "date", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns", + "schema": "health", + "table": "vaccinations" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "batch_lot", + "entityType": "columns", + "schema": "health", + "table": "vaccinations" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns", + "schema": "health", + "table": "vaccinations" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "country", + "entityType": "columns", + "schema": "health", + "table": "vaccinations" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "health", + "table": "vaccinations" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "health", + "table": "vaccinations" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "health", + "table": "vaccinations" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "gen_random_uuid()", + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "health", + "table": "workouts" + }, + { + "type": "date", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns", + "schema": "health", + "table": "workouts" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "session_id", + "entityType": "columns", + "schema": "health", + "table": "workouts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "exercise", + "entityType": "columns", + "schema": "health", + "table": "workouts" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sets", + "entityType": "columns", + "schema": "health", + "table": "workouts" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reps", + "entityType": "columns", + "schema": "health", + "table": "workouts" + }, + { + "type": "numeric(6,2)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "load_kg", + "entityType": "columns", + "schema": "health", + "table": "workouts" + }, + { + "type": "numeric(3,1)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rpe", + "entityType": "columns", + "schema": "health", + "table": "workouts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "health", + "table": "workouts" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "health", + "table": "workouts" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "health", + "table": "workouts" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "books", + "table": "files" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "work_id", + "entityType": "columns", + "schema": "books", + "table": "files" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns", + "schema": "books", + "table": "files" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "format", + "entityType": "columns", + "schema": "books", + "table": "files" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size_bytes", + "entityType": "columns", + "schema": "books", + "table": "files" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sha256", + "entityType": "columns", + "schema": "books", + "table": "files" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "md5", + "entityType": "columns", + "schema": "books", + "table": "files" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "books", + "table": "files" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "books", + "table": "files" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "books", + "table": "files" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "books", + "table": "notes" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "work_id", + "entityType": "columns", + "schema": "books", + "table": "notes" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "file_id", + "entityType": "columns", + "schema": "books", + "table": "notes" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locator", + "entityType": "columns", + "schema": "books", + "table": "notes" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "page", + "entityType": "columns", + "schema": "books", + "table": "notes" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "highlight", + "entityType": "columns", + "schema": "books", + "table": "notes" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "note", + "entityType": "columns", + "schema": "books", + "table": "notes" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "color", + "entityType": "columns", + "schema": "books", + "table": "notes" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "books", + "table": "notes" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "books", + "table": "notes" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "books", + "table": "progress" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "work_id", + "entityType": "columns", + "schema": "books", + "table": "progress" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "file_id", + "entityType": "columns", + "schema": "books", + "table": "progress" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locator", + "entityType": "columns", + "schema": "books", + "table": "progress" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "page", + "entityType": "columns", + "schema": "books", + "table": "progress" + }, + { + "type": "real", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "percent", + "entityType": "columns", + "schema": "books", + "table": "progress" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "started_at", + "entityType": "columns", + "schema": "books", + "table": "progress" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finished_at", + "entityType": "columns", + "schema": "books", + "table": "progress" + }, + { + "type": "reading_status", + "typeSchema": "books", + "notNull": true, + "dimensions": 0, + "default": "'want_to_read'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "books", + "table": "progress" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rating", + "entityType": "columns", + "schema": "books", + "table": "progress" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_read_at", + "entityType": "columns", + "schema": "books", + "table": "progress" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "books", + "table": "progress" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "books", + "table": "progress" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "books", + "table": "sessions" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "work_id", + "entityType": "columns", + "schema": "books", + "table": "sessions" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "file_id", + "entityType": "columns", + "schema": "books", + "table": "sessions" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "started_at", + "entityType": "columns", + "schema": "books", + "table": "sessions" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ended_at", + "entityType": "columns", + "schema": "books", + "table": "sessions" + }, + { + "type": "real", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "start_percent", + "entityType": "columns", + "schema": "books", + "table": "sessions" + }, + { + "type": "real", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "end_percent", + "entityType": "columns", + "schema": "books", + "table": "sessions" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "start_page", + "entityType": "columns", + "schema": "books", + "table": "sessions" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "end_page", + "entityType": "columns", + "schema": "books", + "table": "sessions" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pages_read", + "entityType": "columns", + "schema": "books", + "table": "sessions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'reader'", + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "books", + "table": "sessions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "note", + "entityType": "columns", + "schema": "books", + "table": "sessions" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "books", + "table": "sessions" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "books", + "table": "sessions" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shelf_id", + "entityType": "columns", + "schema": "books", + "table": "shelf_works" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "work_id", + "entityType": "columns", + "schema": "books", + "table": "shelf_works" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sort_order", + "entityType": "columns", + "schema": "books", + "table": "shelf_works" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "added_at", + "entityType": "columns", + "schema": "books", + "table": "shelf_works" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "books", + "table": "shelves" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slug", + "entityType": "columns", + "schema": "books", + "table": "shelves" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "books", + "table": "shelves" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sort_order", + "entityType": "columns", + "schema": "books", + "table": "shelves" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "books", + "table": "shelves" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "books", + "table": "shelves" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subtitle", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "authors", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "isbn10", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "isbn13", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publisher", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "year", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "page_count", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "tags", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cover_url", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cover_path", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openlibrary_work_id", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openlibrary_edition_id", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "google_books_id", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "annas_md5", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "source_refs", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "metadata_status", + "typeSchema": "books", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "metadata_status", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata_source", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata_fetched_at", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "books", + "table": "works" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "tasks", + "table": "activity" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "task_id", + "entityType": "columns", + "schema": "tasks", + "table": "activity" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "goal_id", + "entityType": "columns", + "schema": "tasks", + "table": "activity" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "tasks", + "table": "activity" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "from_status", + "entityType": "columns", + "schema": "tasks", + "table": "activity" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "to_status", + "entityType": "columns", + "schema": "tasks", + "table": "activity" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "note", + "entityType": "columns", + "schema": "tasks", + "table": "activity" + }, + { + "type": "numeric(14,2)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "tasks", + "table": "activity" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "tasks", + "table": "activity" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "tasks", + "table": "areas" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slug", + "entityType": "columns", + "schema": "tasks", + "table": "areas" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "tasks", + "table": "areas" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "tasks", + "table": "areas" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "color", + "entityType": "columns", + "schema": "tasks", + "table": "areas" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sort_order", + "entityType": "columns", + "schema": "tasks", + "table": "areas" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "archived_at", + "entityType": "columns", + "schema": "tasks", + "table": "areas" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "tasks", + "table": "areas" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "tasks", + "table": "areas" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "tasks", + "table": "goals" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "tasks", + "table": "goals" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "tasks", + "table": "goals" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "tasks", + "table": "goals" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "area_id", + "entityType": "columns", + "schema": "tasks", + "table": "goals" + }, + { + "type": "date", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "target_date", + "entityType": "columns", + "schema": "tasks", + "table": "goals" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metric", + "entityType": "columns", + "schema": "tasks", + "table": "goals" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metric_unit", + "entityType": "columns", + "schema": "tasks", + "table": "goals" + }, + { + "type": "numeric(14,2)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metric_target", + "entityType": "columns", + "schema": "tasks", + "table": "goals" + }, + { + "type": "numeric(14,2)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metric_current", + "entityType": "columns", + "schema": "tasks", + "table": "goals" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "flagged", + "entityType": "columns", + "schema": "tasks", + "table": "goals" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sort_order", + "entityType": "columns", + "schema": "tasks", + "table": "goals" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "tasks", + "table": "goals" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "achieved_at", + "entityType": "columns", + "schema": "tasks", + "table": "goals" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "tasks", + "table": "goals" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "tasks", + "table": "goals" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'todo'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "priority", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "flagged", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "date", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "due_date", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "time", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "due_time", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reminder_at", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recurrence", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "area_id", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "goal_id", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parent_id", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "tags", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sort_order", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "external_id", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "start_at", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "time_zone", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "started_at", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completed_at", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "tasks", + "table": "tasks" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "brand", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "unit", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "family_key", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "favorite", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "manual", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "merged_into_id", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "item_count", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "store_count", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "store_ids", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "min_unit_price_cents", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "min_price_cents", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "promo_count", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image_url", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "search_text", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "groceries", + "table": "groups" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "groceries", + "table": "import_runs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "store_id", + "entityType": "columns", + "schema": "groceries", + "table": "import_runs" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "started_at", + "entityType": "columns", + "schema": "groceries", + "table": "import_runs" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finished_at", + "entityType": "columns", + "schema": "groceries", + "table": "import_runs" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'running'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "groceries", + "table": "import_runs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "requests", + "entityType": "columns", + "schema": "groceries", + "table": "import_runs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "fetched", + "entityType": "columns", + "schema": "groceries", + "table": "import_runs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "inserted", + "entityType": "columns", + "schema": "groceries", + "table": "import_runs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "price_changes", + "entityType": "columns", + "schema": "groceries", + "table": "import_runs" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "error", + "entityType": "columns", + "schema": "groceries", + "table": "import_runs" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "groceries", + "table": "item_prices" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "item_id", + "entityType": "columns", + "schema": "groceries", + "table": "item_prices" + }, + { + "type": "date", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "observed_on", + "entityType": "columns", + "schema": "groceries", + "table": "item_prices" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "price_cents", + "entityType": "columns", + "schema": "groceries", + "table": "item_prices" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "promo_price_cents", + "entityType": "columns", + "schema": "groceries", + "table": "item_prices" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "promo_label", + "entityType": "columns", + "schema": "groceries", + "table": "item_prices" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "groceries", + "table": "item_prices" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "store_id", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "store_product_id", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "brand", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size_text", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "unit", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "numeric(12,4)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "unit_amount", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "unit_source", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "price_cents", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "promo_price_cents", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "promo_label", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "unit_price_cents", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "promo_unit_price_cents", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category_path", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "gtin", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "gtin_checked_at", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image_url", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "available", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "first_seen_at", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "last_seen_at", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "group_id", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "match_key", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "match_method", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "real", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "match_confidence", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "match_locked", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "groceries", + "table": "items" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "groceries", + "table": "stores" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slug", + "entityType": "columns", + "schema": "groceries", + "table": "stores" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "groceries", + "table": "stores" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "website", + "entityType": "columns", + "schema": "groceries", + "table": "stores" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "color", + "entityType": "columns", + "schema": "groceries", + "table": "stores" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sort_order", + "entityType": "columns", + "schema": "groceries", + "table": "stores" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "archived_at", + "entityType": "columns", + "schema": "groceries", + "table": "stores" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "groceries", + "table": "stores" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "groceries", + "table": "stores" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "home", + "table": "links" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "home", + "table": "links" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "home", + "table": "links" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'links'", + "generated": null, + "identity": null, + "name": "section", + "entityType": "columns", + "schema": "home", + "table": "links" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sort_order", + "entityType": "columns", + "schema": "home", + "table": "links" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "home", + "table": "links" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "home", + "table": "links" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key", + "entityType": "columns", + "schema": "home", + "table": "snapshots" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "data", + "entityType": "columns", + "schema": "home", + "table": "snapshots" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "collected_at", + "entityType": "columns", + "schema": "home", + "table": "snapshots" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "cars", + "table": "brands" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slug", + "entityType": "columns", + "schema": "cars", + "table": "brands" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "cars", + "table": "brands" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "country", + "entityType": "columns", + "schema": "cars", + "table": "brands" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "model_count", + "entityType": "columns", + "schema": "cars", + "table": "brands" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "nl_count", + "entityType": "columns", + "schema": "cars", + "table": "brands" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "first_year", + "entityType": "columns", + "schema": "cars", + "table": "brands" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_year", + "entityType": "columns", + "schema": "cars", + "table": "brands" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "sources", + "entityType": "columns", + "schema": "cars", + "table": "brands" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "cars", + "table": "brands" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "cars", + "table": "brands" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dex", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "brand_id", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slug", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "search", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "first_year", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_year", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "bodies", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "size_classes", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "fuels", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "drives", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "transmissions", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "real", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "engine_l_min", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "real", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "engine_l_max", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cylinders_min", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cylinders_max", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "turbo", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "real", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "power_kw_min", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "real", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "power_kw_max", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "real", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "l100_min", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "real", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "l100_max", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "co2_min", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "co2_max", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "real", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mpg_min", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "real", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mpg_max", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "range_km_max", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seats", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "doors", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mass_kg", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "nl_count", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nl_rank", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nl_first_year", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nl_last_year", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nl_price", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nl_price_latest", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nl_price_latest_year", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "nl_years", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "nl_names", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "us_years", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "variant_count", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "sources", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "cars", + "table": "models" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model_id", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'fueleconomy.gov'", + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source_id", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "year", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "real", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "engine_l", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cylinders", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "transmission", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "drive", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fuel", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size_class", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "real", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mpg_city", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "real", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mpg_hwy", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "real", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mpg_comb", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "co2_gpm", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "range_mi", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ev_motor", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "turbo", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "supercharged", + "entityType": "columns", + "schema": "cars", + "table": "variants" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "music", + "table": "albums" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "spotify_id", + "entityType": "columns", + "schema": "music", + "table": "albums" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "music", + "table": "albums" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "artist_id", + "entityType": "columns", + "schema": "music", + "table": "albums" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image_url", + "entityType": "columns", + "schema": "music", + "table": "albums" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image_url_small", + "entityType": "columns", + "schema": "music", + "table": "albums" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "release_date", + "entityType": "columns", + "schema": "music", + "table": "albums" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "music", + "table": "albums" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "music", + "table": "artists" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "spotify_id", + "entityType": "columns", + "schema": "music", + "table": "artists" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "music", + "table": "artists" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image_url", + "entityType": "columns", + "schema": "music", + "table": "artists" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "music", + "table": "artists" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key", + "entityType": "columns", + "schema": "music", + "table": "import_state" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "data", + "entityType": "columns", + "schema": "music", + "table": "import_state" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "music", + "table": "import_state" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "music", + "table": "now_playing" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "track_id", + "entityType": "columns", + "schema": "music", + "table": "now_playing" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "is_playing", + "entityType": "columns", + "schema": "music", + "table": "now_playing" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "progress_ms", + "entityType": "columns", + "schema": "music", + "table": "now_playing" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "device_name", + "entityType": "columns", + "schema": "music", + "table": "now_playing" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "device_type", + "entityType": "columns", + "schema": "music", + "table": "now_playing" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "context_uri", + "entityType": "columns", + "schema": "music", + "table": "now_playing" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "music", + "table": "now_playing" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key", + "entityType": "columns", + "schema": "music", + "table": "osu_match_cache" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "result", + "entityType": "columns", + "schema": "music", + "table": "osu_match_cache" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "searched_at", + "entityType": "columns", + "schema": "music", + "table": "osu_match_cache" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "music", + "table": "plays" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "track_id", + "entityType": "columns", + "schema": "music", + "table": "plays" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "played_at", + "entityType": "columns", + "schema": "music", + "table": "plays" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'spotify'", + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "music", + "table": "plays" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'api'", + "generated": null, + "identity": null, + "name": "origin", + "entityType": "columns", + "schema": "music", + "table": "plays" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ms_played", + "entityType": "columns", + "schema": "music", + "table": "plays" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "context_type", + "entityType": "columns", + "schema": "music", + "table": "plays" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "context_uri", + "entityType": "columns", + "schema": "music", + "table": "plays" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "platform", + "entityType": "columns", + "schema": "music", + "table": "plays" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "music", + "table": "plays" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "music", + "table": "spotify_auth" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "spotify_user_id", + "entityType": "columns", + "schema": "music", + "table": "spotify_auth" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "display_name", + "entityType": "columns", + "schema": "music", + "table": "spotify_auth" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refresh_token", + "entityType": "columns", + "schema": "music", + "table": "spotify_auth" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "access_token", + "entityType": "columns", + "schema": "music", + "table": "spotify_auth" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "access_expires_at", + "entityType": "columns", + "schema": "music", + "table": "spotify_auth" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns", + "schema": "music", + "table": "spotify_auth" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recent_cursor", + "entityType": "columns", + "schema": "music", + "table": "spotify_auth" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "needs_reauth", + "entityType": "columns", + "schema": "music", + "table": "spotify_auth" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lease_until", + "entityType": "columns", + "schema": "music", + "table": "spotify_auth" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_poll_at", + "entityType": "columns", + "schema": "music", + "table": "spotify_auth" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_error", + "entityType": "columns", + "schema": "music", + "table": "spotify_auth" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "connected_at", + "entityType": "columns", + "schema": "music", + "table": "spotify_auth" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "music", + "table": "spotify_auth" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "track_id", + "entityType": "columns", + "schema": "music", + "table": "track_artists" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "artist_id", + "entityType": "columns", + "schema": "music", + "table": "track_artists" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "music", + "table": "track_artists" + }, + { + "type": "serial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "music", + "table": "tracks" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "spotify_id", + "entityType": "columns", + "schema": "music", + "table": "tracks" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "music", + "table": "tracks" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "album_id", + "entityType": "columns", + "schema": "music", + "table": "tracks" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "artist_id", + "entityType": "columns", + "schema": "music", + "table": "tracks" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "duration_ms", + "entityType": "columns", + "schema": "music", + "table": "tracks" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "explicit", + "entityType": "columns", + "schema": "music", + "table": "tracks" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "match_key", + "entityType": "columns", + "schema": "music", + "table": "tracks" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "music", + "table": "tracks" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "account_userId_idx", + "entityType": "indexes", + "schema": "auth", + "table": "account" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "issuer", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "account_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "account_issuer_account_id_unique", + "entityType": "indexes", + "schema": "auth", + "table": "account" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "session_userId_idx", + "entityType": "indexes", + "schema": "auth", + "table": "session" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "identifier", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "verification_identifier_idx", + "entityType": "indexes", + "schema": "auth", + "table": "verification" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "pokemon_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "game_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "pokemon_encounters_pokemon_id_game_id_index", + "entityType": "indexes", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "location_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "pokemon_encounters_location_id_index", + "entityType": "indexes", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "game_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "pokemon_evolutions_game_id_index", + "entityType": "indexes", + "schema": "ref", + "table": "pokemon_evolutions" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "game_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "pokemon_game_entries_game_id_index", + "entityType": "indexes", + "schema": "ref", + "table": "pokemon_game_entries" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "catch_em_all_entries_user_id_index", + "entityType": "indexes", + "schema": "games", + "table": "catch_em_all_entries" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "catch_em_all_games_user_id_index", + "entityType": "indexes", + "schema": "games", + "table": "catch_em_all_games" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "game_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "tracker_items_game_id_index", + "entityType": "indexes", + "schema": "ref", + "table": "tracker_items" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "tracker_progress_user_id_index", + "entityType": "indexes", + "schema": "games", + "table": "tracker_progress" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "kind", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "osu_entries_user_id_kind_index", + "entityType": "indexes", + "schema": "games", + "table": "osu_entries" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "game_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "pokemon_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "pokemon_catches_user_id_game_id_pokemon_id_index", + "entityType": "indexes", + "schema": "games", + "table": "pokemon_catches" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "game_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "pokemon_dex_numbers_game_id_index", + "entityType": "indexes", + "schema": "ref", + "table": "pokemon_dex_numbers" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "pokemon_seen_user_id_index", + "entityType": "indexes", + "schema": "games", + "table": "pokemon_seen" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "table_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "columns_table_id_index", + "entityType": "indexes", + "schema": "meta", + "table": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "schema_name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "table_name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "edit_log_table_at_index", + "entityType": "indexes", + "schema": "meta", + "table": "edit_log" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "accounts_user_id_index", + "entityType": "indexes", + "schema": "money", + "table": "accounts" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "bank_sessions_user_id_index", + "entityType": "indexes", + "schema": "money", + "table": "bank_sessions" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "forecasts_user_id_date_index", + "entityType": "indexes", + "schema": "money", + "table": "forecasts" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "insurances_user_id_index", + "entityType": "indexes", + "schema": "money", + "table": "insurances" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "recurring_user_id_index", + "entityType": "indexes", + "schema": "money", + "table": "recurring" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "transactions_user_id_date_id_index", + "entityType": "indexes", + "schema": "money", + "table": "transactions" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "account_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "transactions_account_id_index", + "entityType": "indexes", + "schema": "money", + "table": "transactions" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "kind", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "utility_readings_user_id_kind_date_index", + "entityType": "indexes", + "schema": "money", + "table": "utility_readings" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "wishlist_user_id_index", + "entityType": "indexes", + "schema": "money", + "table": "wishlist" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "key", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "value", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "item_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "item_dimensions_filter_idx", + "entityType": "indexes", + "schema": "cs", + "table": "item_dimensions" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "market_hash_name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "items_hash_idx", + "entityType": "indexes", + "schema": "cs", + "table": "items" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "items_name_idx", + "entityType": "indexes", + "schema": "cs", + "table": "items" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "item_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "currency", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "observed_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "kind", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "price_observations_unique_idx", + "entityType": "indexes", + "schema": "cs", + "table": "price_observations" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "item_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "currency", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "observed_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "price_observations_lookup_idx", + "entityType": "indexes", + "schema": "cs", + "table": "price_observations" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "observed_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "price_observations_time_idx", + "entityType": "indexes", + "schema": "cs", + "table": "price_observations" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "listings_source_idx", + "entityType": "indexes", + "schema": "house", + "table": "listings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "offer", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "first_seen_at", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": "removed_at IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "listings_active_idx", + "entityType": "indexes", + "schema": "house", + "table": "listings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "offer", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "city_slug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "listings_city_idx", + "entityType": "indexes", + "schema": "house", + "table": "listings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "first_seen_at", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": "detail_fetched_at IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "listings_details_idx", + "entityType": "indexes", + "schema": "house", + "table": "listings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "address_key", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "address_key IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "listings_address_idx", + "entityType": "indexes", + "schema": "house", + "table": "listings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "created_at", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "worker_runs_created_idx", + "entityType": "indexes", + "schema": "house", + "table": "worker_runs" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "appointments_date_idx", + "entityType": "indexes", + "schema": "health", + "table": "appointments" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "body_measurements_date_idx", + "entityType": "indexes", + "schema": "health", + "table": "body_measurements" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "weight_kg", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "body_measurements_date_weight_key", + "entityType": "indexes", + "schema": "health", + "table": "body_measurements" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "measured_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "body_measurements_measured_at_key", + "entityType": "indexes", + "schema": "health", + "table": "body_measurements" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "start_date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "medications_start_date_idx", + "entityType": "indexes", + "schema": "health", + "table": "medications" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "stop_date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "medications_stop_date_idx", + "entityType": "indexes", + "schema": "health", + "table": "medications" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "vaccinations_date_idx", + "entityType": "indexes", + "schema": "health", + "table": "vaccinations" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "workouts_date_idx", + "entityType": "indexes", + "schema": "health", + "table": "workouts" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "session_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "workouts_session_idx", + "entityType": "indexes", + "schema": "health", + "table": "workouts" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "path", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "files_path_key", + "entityType": "indexes", + "schema": "books", + "table": "files" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sha256", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "files_sha256_key", + "entityType": "indexes", + "schema": "books", + "table": "files" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "work_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "files_work_id_idx", + "entityType": "indexes", + "schema": "books", + "table": "files" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "work_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "notes_work_id_idx", + "entityType": "indexes", + "schema": "books", + "table": "notes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "work_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "progress_work_id_key", + "entityType": "indexes", + "schema": "books", + "table": "progress" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "progress_status_idx", + "entityType": "indexes", + "schema": "books", + "table": "progress" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "work_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "sessions_work_id_idx", + "entityType": "indexes", + "schema": "books", + "table": "sessions" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "started_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "sessions_started_at_idx", + "entityType": "indexes", + "schema": "books", + "table": "sessions" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "work_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "shelf_works_work_id_idx", + "entityType": "indexes", + "schema": "books", + "table": "shelf_works" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "slug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "shelves_slug_key", + "entityType": "indexes", + "schema": "books", + "table": "shelves" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "isbn13", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"isbn13\" is not null", + "with": "", + "method": "btree", + "concurrently": false, + "name": "works_isbn13_key", + "entityType": "indexes", + "schema": "books", + "table": "works" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "lower(\"title\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "works_title_idx", + "entityType": "indexes", + "schema": "books", + "table": "works" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "task_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "created_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "activity_task_idx", + "entityType": "indexes", + "schema": "tasks", + "table": "activity" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "goal_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "created_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "activity_goal_idx", + "entityType": "indexes", + "schema": "tasks", + "table": "activity" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "slug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "areas_slug_key", + "entityType": "indexes", + "schema": "tasks", + "table": "areas" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "lower(\"title\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "goals_title_key", + "entityType": "indexes", + "schema": "tasks", + "table": "goals" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "area_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "tasks_area_idx", + "entityType": "indexes", + "schema": "tasks", + "table": "tasks" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "goal_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "tasks_goal_idx", + "entityType": "indexes", + "schema": "tasks", + "table": "tasks" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "parent_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "tasks_parent_idx", + "entityType": "indexes", + "schema": "tasks", + "table": "tasks" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "due_date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "tasks_status_due_idx", + "entityType": "indexes", + "schema": "tasks", + "table": "tasks" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tags", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "tasks_tags_idx", + "entityType": "indexes", + "schema": "tasks", + "table": "tasks" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "external_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"external_id\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "tasks_source_external_key", + "entityType": "indexes", + "schema": "tasks", + "table": "tasks" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "key", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "groups_key_key", + "entityType": "indexes", + "schema": "groceries", + "table": "groups" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "family_key", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "groups_family_idx", + "entityType": "indexes", + "schema": "groceries", + "table": "groups" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "category", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "groups_category_idx", + "entityType": "indexes", + "schema": "groceries", + "table": "groups" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "store_ids", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "groups_store_ids_idx", + "entityType": "indexes", + "schema": "groceries", + "table": "groups" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "\"search_text\" gin_trgm_ops", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "groups_search_trgm_idx", + "entityType": "indexes", + "schema": "groceries", + "table": "groups" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "store_count", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "groups_list_idx", + "entityType": "indexes", + "schema": "groceries", + "table": "groups" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "store_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "started_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "import_runs_store_idx", + "entityType": "indexes", + "schema": "groceries", + "table": "import_runs" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "item_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "observed_on", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "item_prices_item_day_key", + "entityType": "indexes", + "schema": "groceries", + "table": "item_prices" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "store_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "store_product_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "items_store_product_key", + "entityType": "indexes", + "schema": "groceries", + "table": "items" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "group_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "items_group_idx", + "entityType": "indexes", + "schema": "groceries", + "table": "items" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "gtin", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "items_gtin_idx", + "entityType": "indexes", + "schema": "groceries", + "table": "items" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "\"name\" gin_trgm_ops", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "items_name_trgm_idx", + "entityType": "indexes", + "schema": "groceries", + "table": "items" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "slug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "stores_slug_key", + "entityType": "indexes", + "schema": "groceries", + "table": "stores" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "section", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sort_order", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "links_sort_idx", + "entityType": "indexes", + "schema": "home", + "table": "links" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "slug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "brands_slug_key", + "entityType": "indexes", + "schema": "cars", + "table": "brands" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "dex", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "models_dex_key", + "entityType": "indexes", + "schema": "cars", + "table": "models" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "brand_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "slug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "models_brand_slug_key", + "entityType": "indexes", + "schema": "cars", + "table": "models" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "nl_count", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "models_nl_count_idx", + "entityType": "indexes", + "schema": "cars", + "table": "models" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "\"search\" public.gin_trgm_ops", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "models_search_trgm_idx", + "entityType": "indexes", + "schema": "cars", + "table": "models" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "model_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "year", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "variants_model_year_idx", + "entityType": "indexes", + "schema": "cars", + "table": "variants" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "spotify_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"spotify_id\" is not null", + "with": "", + "method": "btree", + "concurrently": false, + "name": "albums_spotify_id_key", + "entityType": "indexes", + "schema": "music", + "table": "albums" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "lower(\"name\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "albums_name_idx", + "entityType": "indexes", + "schema": "music", + "table": "albums" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "spotify_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"spotify_id\" is not null", + "with": "", + "method": "btree", + "concurrently": false, + "name": "artists_spotify_id_key", + "entityType": "indexes", + "schema": "music", + "table": "artists" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "lower(\"name\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "artists_name_idx", + "entityType": "indexes", + "schema": "music", + "table": "artists" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "track_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "played_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "plays_dedupe_key", + "entityType": "indexes", + "schema": "music", + "table": "plays" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "played_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "plays_played_at_idx", + "entityType": "indexes", + "schema": "music", + "table": "plays" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "played_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "plays_source_played_idx", + "entityType": "indexes", + "schema": "music", + "table": "plays" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "track_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "played_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "plays_track_played_idx", + "entityType": "indexes", + "schema": "music", + "table": "plays" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "artist_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "track_artists_artist_idx", + "entityType": "indexes", + "schema": "music", + "table": "track_artists" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "spotify_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"spotify_id\" is not null", + "with": "", + "method": "btree", + "concurrently": false, + "name": "tracks_spotify_id_key", + "entityType": "indexes", + "schema": "music", + "table": "tracks" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "lower(\"name\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "tracks_name_idx", + "entityType": "indexes", + "schema": "music", + "table": "tracks" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "match_key", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "tracks_match_key_idx", + "entityType": "indexes", + "schema": "music", + "table": "tracks" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "account_user_id_user_id_fkey", + "entityType": "fks", + "schema": "auth", + "table": "account" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "session_user_id_user_id_fkey", + "entityType": "fks", + "schema": "auth", + "table": "session" + }, + { + "nameExplicit": false, + "columns": [ + "task_id" + ], + "schemaTo": "site", + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "task_topics_task_id_tasks_id_fkey", + "entityType": "fks", + "schema": "site", + "table": "task_topics" + }, + { + "nameExplicit": false, + "columns": [ + "topic_id" + ], + "schemaTo": "site", + "tableTo": "topics", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "task_topics_topic_id_topics_id_fkey", + "entityType": "fks", + "schema": "site", + "table": "task_topics" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "catch_em_all_settings_user_id_user_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "catch_em_all_settings" + }, + { + "nameExplicit": false, + "columns": [ + "pokemon_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_encounters_pokemon_id_pokemon_id_fkey", + "entityType": "fks", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "nameExplicit": false, + "columns": [ + "game_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon_games", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_encounters_game_id_pokemon_games_id_fkey", + "entityType": "fks", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "nameExplicit": false, + "columns": [ + "location_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon_locations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_encounters_location_id_pokemon_locations_id_fkey", + "entityType": "fks", + "schema": "ref", + "table": "pokemon_encounters" + }, + { + "nameExplicit": false, + "columns": [ + "from_pokemon_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_evolutions_from_pokemon_id_pokemon_id_fkey", + "entityType": "fks", + "schema": "ref", + "table": "pokemon_evolutions" + }, + { + "nameExplicit": false, + "columns": [ + "to_pokemon_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_evolutions_to_pokemon_id_pokemon_id_fkey", + "entityType": "fks", + "schema": "ref", + "table": "pokemon_evolutions" + }, + { + "nameExplicit": false, + "columns": [ + "game_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon_games", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_evolutions_game_id_pokemon_games_id_fkey", + "entityType": "fks", + "schema": "ref", + "table": "pokemon_evolutions" + }, + { + "nameExplicit": false, + "columns": [ + "pokemon_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_game_entries_pokemon_id_pokemon_id_fkey", + "entityType": "fks", + "schema": "ref", + "table": "pokemon_game_entries" + }, + { + "nameExplicit": false, + "columns": [ + "game_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon_games", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_game_entries_game_id_pokemon_games_id_fkey", + "entityType": "fks", + "schema": "ref", + "table": "pokemon_game_entries" + }, + { + "nameExplicit": false, + "columns": [ + "pokemon_game_entry_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon_game_entries", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "catch_em_all_entries_HeABXvGNiB6D_fkey", + "entityType": "fks", + "schema": "games", + "table": "catch_em_all_entries" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "catch_em_all_entries_user_id_user_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "catch_em_all_entries" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "catch_em_all_games_user_id_user_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "catch_em_all_games" + }, + { + "nameExplicit": false, + "columns": [ + "game_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon_games", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "catch_em_all_games_game_id_pokemon_games_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "catch_em_all_games" + }, + { + "nameExplicit": false, + "columns": [ + "game_id" + ], + "schemaTo": "ref", + "tableTo": "tracker_games", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tracker_items_game_id_tracker_games_id_fkey", + "entityType": "fks", + "schema": "ref", + "table": "tracker_items" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tracker_progress_user_id_user_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "tracker_progress" + }, + { + "nameExplicit": false, + "columns": [ + "item_id" + ], + "schemaTo": "ref", + "tableTo": "tracker_items", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tracker_progress_item_id_tracker_items_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "tracker_progress" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "osu_entries_user_id_user_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "osu_entries" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_catches_user_id_user_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "pokemon_catches" + }, + { + "nameExplicit": false, + "columns": [ + "game_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon_games", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_catches_game_id_pokemon_games_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "pokemon_catches" + }, + { + "nameExplicit": false, + "columns": [ + "pokemon_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_catches_pokemon_id_pokemon_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "pokemon_catches" + }, + { + "nameExplicit": false, + "columns": [ + "pokemon_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_dex_numbers_pokemon_id_pokemon_id_fkey", + "entityType": "fks", + "schema": "ref", + "table": "pokemon_dex_numbers" + }, + { + "nameExplicit": false, + "columns": [ + "game_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon_games", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_dex_numbers_game_id_pokemon_games_id_fkey", + "entityType": "fks", + "schema": "ref", + "table": "pokemon_dex_numbers" + }, + { + "nameExplicit": false, + "columns": [ + "game_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon_games", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_game_research_game_id_pokemon_games_id_fkey", + "entityType": "fks", + "schema": "ref", + "table": "pokemon_game_research" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_journeys_user_id_user_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "pokemon_journeys" + }, + { + "nameExplicit": false, + "columns": [ + "game_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon_games", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_journeys_game_id_pokemon_games_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "pokemon_journeys" + }, + { + "nameExplicit": false, + "columns": [ + "pokemon_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_learnsets_pokemon_id_pokemon_id_fkey", + "entityType": "fks", + "schema": "ref", + "table": "pokemon_learnsets" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_milestones_user_id_user_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "pokemon_milestones" + }, + { + "nameExplicit": false, + "columns": [ + "game_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon_games", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_milestones_game_id_pokemon_games_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "pokemon_milestones" + }, + { + "nameExplicit": false, + "columns": [ + "pokemon_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_research_pokemon_id_pokemon_id_fkey", + "entityType": "fks", + "schema": "ref", + "table": "pokemon_research" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_seen_user_id_user_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "pokemon_seen" + }, + { + "nameExplicit": false, + "columns": [ + "game_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon_games", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_seen_game_id_pokemon_games_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "pokemon_seen" + }, + { + "nameExplicit": false, + "columns": [ + "pokemon_id" + ], + "schemaTo": "ref", + "tableTo": "pokemon", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pokemon_seen_pokemon_id_pokemon_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "pokemon_seen" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tracker_challenge_progress_user_id_user_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "tracker_challenge_progress" + }, + { + "nameExplicit": false, + "columns": [ + "challenge_id" + ], + "schemaTo": "ref", + "tableTo": "tracker_challenges", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tracker_challenge_progress_HtzyFtOyUAhk_fkey", + "entityType": "fks", + "schema": "games", + "table": "tracker_challenge_progress" + }, + { + "nameExplicit": false, + "columns": [ + "game_id" + ], + "schemaTo": "ref", + "tableTo": "tracker_games", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tracker_challenges_game_id_tracker_games_id_fkey", + "entityType": "fks", + "schema": "ref", + "table": "tracker_challenges" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tracker_ranks_user_id_user_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "tracker_ranks" + }, + { + "nameExplicit": false, + "columns": [ + "game_id" + ], + "schemaTo": "ref", + "tableTo": "tracker_games", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tracker_ranks_game_id_tracker_games_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "tracker_ranks" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tracker_weapon_ranks_user_id_user_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "tracker_weapon_ranks" + }, + { + "nameExplicit": false, + "columns": [ + "item_id" + ], + "schemaTo": "ref", + "tableTo": "tracker_items", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tracker_weapon_ranks_item_id_tracker_items_id_fkey", + "entityType": "fks", + "schema": "games", + "table": "tracker_weapon_ranks" + }, + { + "nameExplicit": false, + "columns": [ + "sighting_id" + ], + "schemaTo": "animaldex", + "tableTo": "sightings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "sighting_photos_sighting_id_sightings_id_fkey", + "entityType": "fks", + "schema": "animaldex", + "table": "sighting_photos" + }, + { + "nameExplicit": false, + "columns": [ + "animal_id" + ], + "schemaTo": "animaldex", + "tableTo": "animals", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "sightings_animal_id_animals_id_fkey", + "entityType": "fks", + "schema": "animaldex", + "table": "sightings" + }, + { + "nameExplicit": false, + "columns": [ + "table_id" + ], + "schemaTo": "meta", + "tableTo": "tables", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "columns_table_id_tables_id_fkey", + "entityType": "fks", + "schema": "meta", + "table": "columns" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "accounts_user_id_user_id_fkey", + "entityType": "fks", + "schema": "money", + "table": "accounts" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "bank_sessions_user_id_user_id_fkey", + "entityType": "fks", + "schema": "money", + "table": "bank_sessions" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "forecasts_user_id_user_id_fkey", + "entityType": "fks", + "schema": "money", + "table": "forecasts" + }, + { + "nameExplicit": false, + "columns": [ + "account_id" + ], + "schemaTo": "money", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "forecasts_account_id_accounts_id_fkey", + "entityType": "fks", + "schema": "money", + "table": "forecasts" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "insurances_user_id_user_id_fkey", + "entityType": "fks", + "schema": "money", + "table": "insurances" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "projection_settings_user_id_user_id_fkey", + "entityType": "fks", + "schema": "money", + "table": "projection_settings" + }, + { + "nameExplicit": false, + "columns": [ + "investment_account_id" + ], + "schemaTo": "money", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "projection_settings_investment_account_id_accounts_id_fkey", + "entityType": "fks", + "schema": "money", + "table": "projection_settings" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "recurring_user_id_user_id_fkey", + "entityType": "fks", + "schema": "money", + "table": "recurring" + }, + { + "nameExplicit": false, + "columns": [ + "account_id" + ], + "schemaTo": "money", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "recurring_account_id_accounts_id_fkey", + "entityType": "fks", + "schema": "money", + "table": "recurring" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "transactions_user_id_user_id_fkey", + "entityType": "fks", + "schema": "money", + "table": "transactions" + }, + { + "nameExplicit": false, + "columns": [ + "account_id" + ], + "schemaTo": "money", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "transactions_account_id_accounts_id_fkey", + "entityType": "fks", + "schema": "money", + "table": "transactions" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "utility_readings_user_id_user_id_fkey", + "entityType": "fks", + "schema": "money", + "table": "utility_readings" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "utility_settings_user_id_user_id_fkey", + "entityType": "fks", + "schema": "money", + "table": "utility_settings" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "wishlist_user_id_user_id_fkey", + "entityType": "fks", + "schema": "money", + "table": "wishlist" + }, + { + "nameExplicit": false, + "columns": [ + "item_id" + ], + "schemaTo": "cs", + "tableTo": "items", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "item_dimensions_item_id_items_id_fkey", + "entityType": "fks", + "schema": "cs", + "table": "item_dimensions" + }, + { + "nameExplicit": false, + "columns": [ + "item_id" + ], + "schemaTo": "cs", + "tableTo": "items", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "price_observations_item_id_items_id_fkey", + "entityType": "fks", + "schema": "cs", + "table": "price_observations" + }, + { + "nameExplicit": false, + "columns": [ + "duplicate_of" + ], + "schemaTo": "house", + "tableTo": "listings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "listings_duplicate_of_listings_id_fkey", + "entityType": "fks", + "schema": "house", + "table": "listings" + }, + { + "nameExplicit": false, + "columns": [ + "listing_id" + ], + "schemaTo": "house", + "tableTo": "listings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "price_history_listing_id_listings_id_fkey", + "entityType": "fks", + "schema": "house", + "table": "price_history" + }, + { + "nameExplicit": false, + "columns": [ + "work_id" + ], + "schemaTo": "books", + "tableTo": "works", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "files_work_id_works_id_fkey", + "entityType": "fks", + "schema": "books", + "table": "files" + }, + { + "nameExplicit": false, + "columns": [ + "work_id" + ], + "schemaTo": "books", + "tableTo": "works", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "notes_work_id_works_id_fkey", + "entityType": "fks", + "schema": "books", + "table": "notes" + }, + { + "nameExplicit": false, + "columns": [ + "file_id" + ], + "schemaTo": "books", + "tableTo": "files", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "notes_file_id_files_id_fkey", + "entityType": "fks", + "schema": "books", + "table": "notes" + }, + { + "nameExplicit": false, + "columns": [ + "work_id" + ], + "schemaTo": "books", + "tableTo": "works", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "progress_work_id_works_id_fkey", + "entityType": "fks", + "schema": "books", + "table": "progress" + }, + { + "nameExplicit": false, + "columns": [ + "file_id" + ], + "schemaTo": "books", + "tableTo": "files", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "progress_file_id_files_id_fkey", + "entityType": "fks", + "schema": "books", + "table": "progress" + }, + { + "nameExplicit": false, + "columns": [ + "work_id" + ], + "schemaTo": "books", + "tableTo": "works", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "sessions_work_id_works_id_fkey", + "entityType": "fks", + "schema": "books", + "table": "sessions" + }, + { + "nameExplicit": false, + "columns": [ + "file_id" + ], + "schemaTo": "books", + "tableTo": "files", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "sessions_file_id_files_id_fkey", + "entityType": "fks", + "schema": "books", + "table": "sessions" + }, + { + "nameExplicit": false, + "columns": [ + "shelf_id" + ], + "schemaTo": "books", + "tableTo": "shelves", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "shelf_works_shelf_id_shelves_id_fkey", + "entityType": "fks", + "schema": "books", + "table": "shelf_works" + }, + { + "nameExplicit": false, + "columns": [ + "work_id" + ], + "schemaTo": "books", + "tableTo": "works", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "shelf_works_work_id_works_id_fkey", + "entityType": "fks", + "schema": "books", + "table": "shelf_works" + }, + { + "nameExplicit": false, + "columns": [ + "task_id" + ], + "schemaTo": "tasks", + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "activity_task_id_tasks_id_fkey", + "entityType": "fks", + "schema": "tasks", + "table": "activity" + }, + { + "nameExplicit": false, + "columns": [ + "goal_id" + ], + "schemaTo": "tasks", + "tableTo": "goals", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "activity_goal_id_goals_id_fkey", + "entityType": "fks", + "schema": "tasks", + "table": "activity" + }, + { + "nameExplicit": false, + "columns": [ + "area_id" + ], + "schemaTo": "tasks", + "tableTo": "areas", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "goals_area_id_areas_id_fkey", + "entityType": "fks", + "schema": "tasks", + "table": "goals" + }, + { + "nameExplicit": false, + "columns": [ + "area_id" + ], + "schemaTo": "tasks", + "tableTo": "areas", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "tasks_area_id_areas_id_fkey", + "entityType": "fks", + "schema": "tasks", + "table": "tasks" + }, + { + "nameExplicit": false, + "columns": [ + "goal_id" + ], + "schemaTo": "tasks", + "tableTo": "goals", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "tasks_goal_id_goals_id_fkey", + "entityType": "fks", + "schema": "tasks", + "table": "tasks" + }, + { + "nameExplicit": false, + "columns": [ + "parent_id" + ], + "schemaTo": "tasks", + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tasks_parent_id_tasks_id_fkey", + "entityType": "fks", + "schema": "tasks", + "table": "tasks" + }, + { + "nameExplicit": false, + "columns": [ + "merged_into_id" + ], + "schemaTo": "groceries", + "tableTo": "groups", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "groups_merged_into_id_groups_id_fkey", + "entityType": "fks", + "schema": "groceries", + "table": "groups" + }, + { + "nameExplicit": false, + "columns": [ + "store_id" + ], + "schemaTo": "groceries", + "tableTo": "stores", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "import_runs_store_id_stores_id_fkey", + "entityType": "fks", + "schema": "groceries", + "table": "import_runs" + }, + { + "nameExplicit": false, + "columns": [ + "item_id" + ], + "schemaTo": "groceries", + "tableTo": "items", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "item_prices_item_id_items_id_fkey", + "entityType": "fks", + "schema": "groceries", + "table": "item_prices" + }, + { + "nameExplicit": false, + "columns": [ + "store_id" + ], + "schemaTo": "groceries", + "tableTo": "stores", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "items_store_id_stores_id_fkey", + "entityType": "fks", + "schema": "groceries", + "table": "items" + }, + { + "nameExplicit": false, + "columns": [ + "group_id" + ], + "schemaTo": "groceries", + "tableTo": "groups", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "items_group_id_groups_id_fkey", + "entityType": "fks", + "schema": "groceries", + "table": "items" + }, + { + "nameExplicit": false, + "columns": [ + "brand_id" + ], + "schemaTo": "cars", + "tableTo": "brands", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "models_brand_id_brands_id_fkey", + "entityType": "fks", + "schema": "cars", + "table": "models" + }, + { + "nameExplicit": false, + "columns": [ + "model_id" + ], + "schemaTo": "cars", + "tableTo": "models", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "variants_model_id_models_id_fkey", + "entityType": "fks", + "schema": "cars", + "table": "variants" + }, + { + "nameExplicit": false, + "columns": [ + "artist_id" + ], + "schemaTo": "music", + "tableTo": "artists", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "albums_artist_id_artists_id_fkey", + "entityType": "fks", + "schema": "music", + "table": "albums" + }, + { + "nameExplicit": false, + "columns": [ + "track_id" + ], + "schemaTo": "music", + "tableTo": "tracks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "now_playing_track_id_tracks_id_fkey", + "entityType": "fks", + "schema": "music", + "table": "now_playing" + }, + { + "nameExplicit": false, + "columns": [ + "track_id" + ], + "schemaTo": "music", + "tableTo": "tracks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "plays_track_id_tracks_id_fkey", + "entityType": "fks", + "schema": "music", + "table": "plays" + }, + { + "nameExplicit": false, + "columns": [ + "track_id" + ], + "schemaTo": "music", + "tableTo": "tracks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "track_artists_track_id_tracks_id_fkey", + "entityType": "fks", + "schema": "music", + "table": "track_artists" + }, + { + "nameExplicit": false, + "columns": [ + "artist_id" + ], + "schemaTo": "music", + "tableTo": "artists", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "track_artists_artist_id_artists_id_fkey", + "entityType": "fks", + "schema": "music", + "table": "track_artists" + }, + { + "nameExplicit": false, + "columns": [ + "album_id" + ], + "schemaTo": "music", + "tableTo": "albums", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "tracks_album_id_albums_id_fkey", + "entityType": "fks", + "schema": "music", + "table": "tracks" + }, + { + "nameExplicit": false, + "columns": [ + "artist_id" + ], + "schemaTo": "music", + "tableTo": "artists", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "tracks_artist_id_artists_id_fkey", + "entityType": "fks", + "schema": "music", + "table": "tracks" + }, + { + "columns": [ + "item_id", + "key" + ], + "nameExplicit": true, + "name": "item_dimensions_pkey", + "entityType": "pks", + "schema": "cs", + "table": "item_dimensions" + }, + { + "columns": [ + "source", + "currency", + "kind" + ], + "nameExplicit": true, + "name": "price_streams_pkey", + "entityType": "pks", + "schema": "cs", + "table": "price_streams" + }, + { + "columns": [ + "listing_id", + "observed_at" + ], + "nameExplicit": true, + "name": "price_history_pkey", + "entityType": "pks", + "schema": "house", + "table": "price_history" + }, + { + "columns": [ + "shelf_id", + "work_id" + ], + "nameExplicit": false, + "name": "shelf_works_pkey", + "entityType": "pks", + "schema": "books", + "table": "shelf_works" + }, + { + "columns": [ + "track_id", + "artist_id" + ], + "nameExplicit": false, + "name": "track_artists_pkey", + "entityType": "pks", + "schema": "music", + "table": "track_artists" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "account_pkey", + "schema": "auth", + "table": "account", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "session_pkey", + "schema": "auth", + "table": "session", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "user_pkey", + "schema": "auth", + "table": "user", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "verification_pkey", + "schema": "auth", + "table": "verification", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "blog_articles_pkey", + "schema": "site", + "table": "blog_articles", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "tasks_pkey", + "schema": "site", + "table": "tasks", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "task_topics_pkey", + "schema": "site", + "table": "task_topics", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "topics_pkey", + "schema": "site", + "table": "topics", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "catch_em_all_settings_pkey", + "schema": "games", + "table": "catch_em_all_settings", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "pokemon_games_pkey", + "schema": "ref", + "table": "pokemon_games", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "pokemon_pkey", + "schema": "ref", + "table": "pokemon", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "pokemon_encounters_pkey", + "schema": "ref", + "table": "pokemon_encounters", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "pokemon_evolutions_pkey", + "schema": "ref", + "table": "pokemon_evolutions", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "pokemon_game_entries_pkey", + "schema": "ref", + "table": "pokemon_game_entries", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "pokemon_locations_pkey", + "schema": "ref", + "table": "pokemon_locations", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "catch_em_all_entries_pkey", + "schema": "games", + "table": "catch_em_all_entries", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "catch_em_all_games_pkey", + "schema": "games", + "table": "catch_em_all_games", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "tracker_games_pkey", + "schema": "ref", + "table": "tracker_games", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "tracker_items_pkey", + "schema": "ref", + "table": "tracker_items", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "tracker_progress_pkey", + "schema": "games", + "table": "tracker_progress", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "osu_entries_pkey", + "schema": "games", + "table": "osu_entries", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "pokemon_catches_pkey", + "schema": "games", + "table": "pokemon_catches", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "pokemon_dex_numbers_pkey", + "schema": "ref", + "table": "pokemon_dex_numbers", + "entityType": "pks" + }, + { + "columns": [ + "game_id" + ], + "nameExplicit": false, + "name": "pokemon_game_research_pkey", + "schema": "ref", + "table": "pokemon_game_research", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "pokemon_journeys_pkey", + "schema": "games", + "table": "pokemon_journeys", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "pokemon_learnsets_pkey", + "schema": "ref", + "table": "pokemon_learnsets", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "pokemon_milestones_pkey", + "schema": "games", + "table": "pokemon_milestones", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "pokemon_moves_pkey", + "schema": "ref", + "table": "pokemon_moves", + "entityType": "pks" + }, + { + "columns": [ + "pokemon_id" + ], + "nameExplicit": false, + "name": "pokemon_research_pkey", + "schema": "ref", + "table": "pokemon_research", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "pokemon_seen_pkey", + "schema": "games", + "table": "pokemon_seen", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "tracker_challenge_progress_pkey", + "schema": "games", + "table": "tracker_challenge_progress", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "tracker_challenges_pkey", + "schema": "ref", + "table": "tracker_challenges", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "tracker_ranks_pkey", + "schema": "games", + "table": "tracker_ranks", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "tracker_weapon_ranks_pkey", + "schema": "games", + "table": "tracker_weapon_ranks", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "animals_pkey", + "schema": "animaldex", + "table": "animals", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "sighting_photos_pkey", + "schema": "animaldex", + "table": "sighting_photos", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "sightings_pkey", + "schema": "animaldex", + "table": "sightings", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "columns_pkey", + "schema": "meta", + "table": "columns", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "edit_log_pkey", + "schema": "meta", + "table": "edit_log", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "tables_pkey", + "schema": "meta", + "table": "tables", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "accounts_pkey", + "schema": "money", + "table": "accounts", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "bank_sessions_pkey", + "schema": "money", + "table": "bank_sessions", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "forecasts_pkey", + "schema": "money", + "table": "forecasts", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "insurances_pkey", + "schema": "money", + "table": "insurances", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "projection_settings_pkey", + "schema": "money", + "table": "projection_settings", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "recurring_pkey", + "schema": "money", + "table": "recurring", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "transactions_pkey", + "schema": "money", + "table": "transactions", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "utility_readings_pkey", + "schema": "money", + "table": "utility_readings", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "utility_settings_pkey", + "schema": "money", + "table": "utility_settings", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "wishlist_pkey", + "schema": "money", + "table": "wishlist", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "items_pkey", + "schema": "cs", + "table": "items", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "price_observations_pkey", + "schema": "cs", + "table": "price_observations", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "alert_rules_pkey", + "schema": "house", + "table": "alert_rules", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "listings_pkey", + "schema": "house", + "table": "listings", + "entityType": "pks" + }, + { + "columns": [ + "search_url" + ], + "nameExplicit": false, + "name": "searches_pkey", + "schema": "house", + "table": "searches", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "worker_runs_pkey", + "schema": "house", + "table": "worker_runs", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "appointments_pkey", + "schema": "health", + "table": "appointments", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "body_measurements_pkey", + "schema": "health", + "table": "body_measurements", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "medications_pkey", + "schema": "health", + "table": "medications", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "nutrition_daily_pkey", + "schema": "health", + "table": "nutrition_daily", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "sleep_pkey", + "schema": "health", + "table": "sleep", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "vaccinations_pkey", + "schema": "health", + "table": "vaccinations", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "workouts_pkey", + "schema": "health", + "table": "workouts", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "files_pkey", + "schema": "books", + "table": "files", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "notes_pkey", + "schema": "books", + "table": "notes", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "progress_pkey", + "schema": "books", + "table": "progress", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "sessions_pkey", + "schema": "books", + "table": "sessions", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "shelves_pkey", + "schema": "books", + "table": "shelves", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "works_pkey", + "schema": "books", + "table": "works", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "activity_pkey", + "schema": "tasks", + "table": "activity", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "areas_pkey", + "schema": "tasks", + "table": "areas", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "goals_pkey", + "schema": "tasks", + "table": "goals", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "tasks_pkey", + "schema": "tasks", + "table": "tasks", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "groups_pkey", + "schema": "groceries", + "table": "groups", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "import_runs_pkey", + "schema": "groceries", + "table": "import_runs", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "item_prices_pkey", + "schema": "groceries", + "table": "item_prices", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "items_pkey", + "schema": "groceries", + "table": "items", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "stores_pkey", + "schema": "groceries", + "table": "stores", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "links_pkey", + "schema": "home", + "table": "links", + "entityType": "pks" + }, + { + "columns": [ + "key" + ], + "nameExplicit": false, + "name": "snapshots_pkey", + "schema": "home", + "table": "snapshots", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "brands_pkey", + "schema": "cars", + "table": "brands", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "models_pkey", + "schema": "cars", + "table": "models", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "variants_pkey", + "schema": "cars", + "table": "variants", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "albums_pkey", + "schema": "music", + "table": "albums", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "artists_pkey", + "schema": "music", + "table": "artists", + "entityType": "pks" + }, + { + "columns": [ + "key" + ], + "nameExplicit": false, + "name": "import_state_pkey", + "schema": "music", + "table": "import_state", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "now_playing_pkey", + "schema": "music", + "table": "now_playing", + "entityType": "pks" + }, + { + "columns": [ + "key" + ], + "nameExplicit": false, + "name": "osu_match_cache_pkey", + "schema": "music", + "table": "osu_match_cache", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "plays_pkey", + "schema": "music", + "table": "plays", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "spotify_auth_pkey", + "schema": "music", + "table": "spotify_auth", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "tracks_pkey", + "schema": "music", + "table": "tracks", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "slug" + ], + "nullsNotDistinct": false, + "name": "blog_articles_slug_unique", + "entityType": "uniques", + "schema": "site", + "table": "blog_articles" + }, + { + "nameExplicit": false, + "columns": [ + "task_id", + "topic_id" + ], + "nullsNotDistinct": false, + "name": "task_topics_task_id_topic_id_unique", + "entityType": "uniques", + "schema": "site", + "table": "task_topics" + }, + { + "nameExplicit": false, + "columns": [ + "from_pokemon_id", + "to_pokemon_id", + "game_id", + "method" + ], + "nullsNotDistinct": false, + "name": "pokemon_evolutions_from_pokemon_id_to_pokemon_id_game_id_method_unique", + "entityType": "uniques", + "schema": "ref", + "table": "pokemon_evolutions" + }, + { + "nameExplicit": false, + "columns": [ + "pokemon_id", + "game_id" + ], + "nullsNotDistinct": false, + "name": "pokemon_game_entries_pokemon_id_game_id_unique", + "entityType": "uniques", + "schema": "ref", + "table": "pokemon_game_entries" + }, + { + "nameExplicit": false, + "columns": [ + "pokemon_game_entry_id", + "user_id" + ], + "nullsNotDistinct": false, + "name": "catch_em_all_entries_pokemon_game_entry_id_user_id_unique", + "entityType": "uniques", + "schema": "games", + "table": "catch_em_all_entries" + }, + { + "nameExplicit": false, + "columns": [ + "user_id", + "game_id" + ], + "nullsNotDistinct": false, + "name": "catch_em_all_games_user_id_game_id_unique", + "entityType": "uniques", + "schema": "games", + "table": "catch_em_all_games" + }, + { + "nameExplicit": false, + "columns": [ + "game_id", + "key" + ], + "nullsNotDistinct": false, + "name": "tracker_items_game_id_key_unique", + "entityType": "uniques", + "schema": "ref", + "table": "tracker_items" + }, + { + "nameExplicit": false, + "columns": [ + "user_id", + "item_id", + "milestone" + ], + "nullsNotDistinct": false, + "name": "tracker_progress_user_id_item_id_milestone_unique", + "entityType": "uniques", + "schema": "games", + "table": "tracker_progress" + }, + { + "nameExplicit": false, + "columns": [ + "user_id", + "game_id", + "party_slot" + ], + "nullsNotDistinct": false, + "name": "pokemon_catches_user_id_game_id_party_slot_unique", + "entityType": "uniques", + "schema": "games", + "table": "pokemon_catches" + }, + { + "nameExplicit": false, + "columns": [ + "pokemon_id", + "game_id", + "dex" + ], + "nullsNotDistinct": false, + "name": "pokemon_dex_numbers_pokemon_id_game_id_dex_unique", + "entityType": "uniques", + "schema": "ref", + "table": "pokemon_dex_numbers" + }, + { + "nameExplicit": false, + "columns": [ + "user_id", + "game_id" + ], + "nullsNotDistinct": false, + "name": "pokemon_journeys_user_id_game_id_unique", + "entityType": "uniques", + "schema": "games", + "table": "pokemon_journeys" + }, + { + "nameExplicit": false, + "columns": [ + "pokemon_id", + "version_group" + ], + "nullsNotDistinct": false, + "name": "pokemon_learnsets_pokemon_id_version_group_unique", + "entityType": "uniques", + "schema": "ref", + "table": "pokemon_learnsets" + }, + { + "nameExplicit": false, + "columns": [ + "user_id", + "game_id", + "key" + ], + "nullsNotDistinct": false, + "name": "pokemon_milestones_user_id_game_id_key_unique", + "entityType": "uniques", + "schema": "games", + "table": "pokemon_milestones" + }, + { + "nameExplicit": false, + "columns": [ + "user_id", + "game_id", + "pokemon_id" + ], + "nullsNotDistinct": false, + "name": "pokemon_seen_user_id_game_id_pokemon_id_unique", + "entityType": "uniques", + "schema": "games", + "table": "pokemon_seen" + }, + { + "nameExplicit": false, + "columns": [ + "user_id", + "challenge_id" + ], + "nullsNotDistinct": false, + "name": "tracker_challenge_progress_user_id_challenge_id_unique", + "entityType": "uniques", + "schema": "games", + "table": "tracker_challenge_progress" + }, + { + "nameExplicit": false, + "columns": [ + "game_id", + "key" + ], + "nullsNotDistinct": false, + "name": "tracker_challenges_game_id_key_unique", + "entityType": "uniques", + "schema": "ref", + "table": "tracker_challenges" + }, + { + "nameExplicit": false, + "columns": [ + "user_id", + "game_id" + ], + "nullsNotDistinct": false, + "name": "tracker_ranks_user_id_game_id_unique", + "entityType": "uniques", + "schema": "games", + "table": "tracker_ranks" + }, + { + "nameExplicit": false, + "columns": [ + "user_id", + "item_id" + ], + "nullsNotDistinct": false, + "name": "tracker_weapon_ranks_user_id_item_id_unique", + "entityType": "uniques", + "schema": "games", + "table": "tracker_weapon_ranks" + }, + { + "nameExplicit": true, + "columns": [ + "table_id", + "column_name" + ], + "nullsNotDistinct": false, + "name": "columns_table_id_column_name_key", + "entityType": "uniques", + "schema": "meta", + "table": "columns" + }, + { + "nameExplicit": true, + "columns": [ + "schema_name", + "table_name" + ], + "nullsNotDistinct": false, + "name": "tables_schema_name_table_name_key", + "entityType": "uniques", + "schema": "meta", + "table": "tables" + }, + { + "nameExplicit": false, + "columns": [ + "user_id", + "name" + ], + "nullsNotDistinct": false, + "name": "accounts_user_id_name_unique", + "entityType": "uniques", + "schema": "money", + "table": "accounts" + }, + { + "nameExplicit": true, + "columns": [ + "external_uid" + ], + "nullsNotDistinct": false, + "name": "accounts_external_uid_key", + "entityType": "uniques", + "schema": "money", + "table": "accounts" + }, + { + "nameExplicit": true, + "columns": [ + "session_id" + ], + "nullsNotDistinct": false, + "name": "bank_sessions_session_id_key", + "entityType": "uniques", + "schema": "money", + "table": "bank_sessions" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "nullsNotDistinct": false, + "name": "projection_settings_user_id_unique", + "entityType": "uniques", + "schema": "money", + "table": "projection_settings" + }, + { + "nameExplicit": true, + "columns": [ + "account_id", + "external_id" + ], + "nullsNotDistinct": false, + "name": "transactions_account_external_id_key", + "entityType": "uniques", + "schema": "money", + "table": "transactions" + }, + { + "nameExplicit": false, + "columns": [ + "user_id", + "kind" + ], + "nullsNotDistinct": false, + "name": "utility_settings_user_id_kind_unique", + "entityType": "uniques", + "schema": "money", + "table": "utility_settings" + }, + { + "nameExplicit": false, + "columns": [ + "token" + ], + "nullsNotDistinct": false, + "name": "session_token_key", + "schema": "auth", + "table": "session", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "email" + ], + "nullsNotDistinct": false, + "name": "user_email_key", + "schema": "auth", + "table": "user", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "nullsNotDistinct": false, + "name": "catch_em_all_settings_user_id_key", + "schema": "games", + "table": "catch_em_all_settings", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "source_id" + ], + "nullsNotDistinct": false, + "name": "pokemon_games_source_id_key", + "schema": "ref", + "table": "pokemon_games", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "slug" + ], + "nullsNotDistinct": false, + "name": "pokemon_games_slug_key", + "schema": "ref", + "table": "pokemon_games", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "number" + ], + "nullsNotDistinct": false, + "name": "pokemon_number_key", + "schema": "ref", + "table": "pokemon", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "source_id" + ], + "nullsNotDistinct": false, + "name": "pokemon_locations_source_id_key", + "schema": "ref", + "table": "pokemon_locations", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "slug" + ], + "nullsNotDistinct": false, + "name": "tracker_games_slug_key", + "schema": "ref", + "table": "tracker_games", + "entityType": "uniques" + }, + { + "nameExplicit": true, + "columns": [ + "slug" + ], + "nullsNotDistinct": false, + "name": "tables_slug_key", + "schema": "meta", + "table": "tables", + "entityType": "uniques" + }, + { + "nameExplicit": true, + "columns": [ + "date" + ], + "nullsNotDistinct": false, + "name": "nutrition_daily_date_key", + "schema": "health", + "table": "nutrition_daily", + "entityType": "uniques" + }, + { + "nameExplicit": true, + "columns": [ + "date" + ], + "nullsNotDistinct": false, + "name": "sleep_date_key", + "schema": "health", + "table": "sleep", + "entityType": "uniques" + }, + { + "value": "\"kind\" IN ('score','goal','training')", + "name": "osu_entries_kind_check", + "entityType": "checks", + "schema": "games", + "table": "osu_entries" + }, + { + "value": "\"level\" between 1 and 100", + "name": "pokemon_catches_level_check", + "entityType": "checks", + "schema": "games", + "table": "pokemon_catches" + }, + { + "value": "\"party_slot\" between 1 and 6", + "name": "pokemon_catches_party_slot_check", + "entityType": "checks", + "schema": "games", + "table": "pokemon_catches" + }, + { + "value": "cardinality(\"moves\") <= 4", + "name": "pokemon_catches_moves_check", + "entityType": "checks", + "schema": "games", + "table": "pokemon_catches" + }, + { + "value": "\"stage\" IN ('story','postgame','collection')", + "name": "pokemon_catches_stage_check", + "entityType": "checks", + "schema": "games", + "table": "pokemon_catches" + }, + { + "value": "\"stage\" IN ('story','postgame','collection')", + "name": "pokemon_journeys_stage_check", + "entityType": "checks", + "schema": "games", + "table": "pokemon_journeys" + }, + { + "value": "\"current\" >= 0", + "name": "tracker_challenge_progress_current_check", + "entityType": "checks", + "schema": "games", + "table": "tracker_challenge_progress" + }, + { + "value": "\"level\" between 1 and 10000", + "name": "tracker_ranks_level_check", + "entityType": "checks", + "schema": "games", + "table": "tracker_ranks" + }, + { + "value": "\"prestige\" between 0 and 1000", + "name": "tracker_ranks_prestige_check", + "entityType": "checks", + "schema": "games", + "table": "tracker_ranks" + }, + { + "value": "\"level\" between 1 and 10000", + "name": "tracker_weapon_ranks_level_check", + "entityType": "checks", + "schema": "games", + "table": "tracker_weapon_ranks" + }, + { + "value": "\"prestige\" between 0 and 1000", + "name": "tracker_weapon_ranks_prestige_check", + "entityType": "checks", + "schema": "games", + "table": "tracker_weapon_ranks" + }, + { + "value": "ui_type IN ('text','longtext','url','image','number','cents','date','datetime','bool','select','multiselect','fk','json')", + "name": "columns_ui_type_check", + "entityType": "checks", + "schema": "meta", + "table": "columns" + }, + { + "value": "action IN ('insert','update','delete','import','add_column')", + "name": "edit_log_action_check", + "entityType": "checks", + "schema": "meta", + "table": "edit_log" + }, + { + "value": "slug ~ '^[a-z0-9][a-z0-9-]{0,62}$'", + "name": "tables_slug_check", + "entityType": "checks", + "schema": "meta", + "table": "tables" + }, + { + "value": "kind IN ('list','core','ref')", + "name": "tables_kind_check", + "entityType": "checks", + "schema": "meta", + "table": "tables" + }, + { + "value": "kind IN ('spendable','investment')", + "name": "accounts_kind_check", + "entityType": "checks", + "schema": "money", + "table": "accounts" + }, + { + "value": "scope IN ('personal','joint')", + "name": "accounts_scope_check", + "entityType": "checks", + "schema": "money", + "table": "accounts" + }, + { + "value": "provider IN ('manual','enablebanking')", + "name": "accounts_provider_check", + "entityType": "checks", + "schema": "money", + "table": "accounts" + }, + { + "value": "status IN ('authorized','expired','revoked','error')", + "name": "bank_sessions_status_check", + "entityType": "checks", + "schema": "money", + "table": "bank_sessions" + }, + { + "value": "cadence IN ('weekly','monthly','yearly')", + "name": "insurances_cadence_check", + "entityType": "checks", + "schema": "money", + "table": "insurances" + }, + { + "value": "contribution_mode IN ('excess','fixed')", + "name": "projection_settings_contribution_mode_check", + "entityType": "checks", + "schema": "money", + "table": "projection_settings" + }, + { + "value": "cadence IN ('weekly','monthly','yearly')", + "name": "recurring_cadence_check", + "entityType": "checks", + "schema": "money", + "table": "recurring" + }, + { + "value": "source IN ('manual','csv','enablebanking')", + "name": "transactions_source_check", + "entityType": "checks", + "schema": "money", + "table": "transactions" + }, + { + "value": "kind IN ('electricity','gas','water')", + "name": "utility_readings_kind_check", + "entityType": "checks", + "schema": "money", + "table": "utility_readings" + }, + { + "value": "kind IN ('electricity','gas','water')", + "name": "utility_settings_kind_check", + "entityType": "checks", + "schema": "money", + "table": "utility_settings" + }, + { + "value": "offer IN ('rent', 'buy')", + "name": "alert_rules_offer_check", + "entityType": "checks", + "schema": "house", + "table": "alert_rules" + }, + { + "value": "offer IN ('rent', 'buy')", + "name": "listings_offer_check", + "entityType": "checks", + "schema": "house", + "table": "listings" + }, + { + "value": "price_eur IS NULL OR price_eur >= 0", + "name": "listings_price_eur_check", + "entityType": "checks", + "schema": "house", + "table": "listings" + }, + { + "value": "\"type\" IN ('appointment','checkup','condition','test','procedure','other')", + "name": "appointments_type_check", + "entityType": "checks", + "schema": "health", + "table": "appointments" + }, + { + "value": "\"date\" >= DATE '1900-01-01'", + "name": "appointments_date_check", + "entityType": "checks", + "schema": "health", + "table": "appointments" + }, + { + "value": "\"weight_kg\" IS NOT NULL OR \"waist_cm\" IS NOT NULL OR \"body_fat_pct\" IS NOT NULL", + "name": "body_measurements_any_check", + "entityType": "checks", + "schema": "health", + "table": "body_measurements" + }, + { + "value": "\"weight_kg\" IS NULL OR \"weight_kg\" BETWEEN 20 AND 400", + "name": "body_measurements_weight_check", + "entityType": "checks", + "schema": "health", + "table": "body_measurements" + }, + { + "value": "\"waist_cm\" IS NULL OR \"waist_cm\" BETWEEN 30 AND 250", + "name": "body_measurements_waist_check", + "entityType": "checks", + "schema": "health", + "table": "body_measurements" + }, + { + "value": "\"body_fat_pct\" IS NULL OR \"body_fat_pct\" BETWEEN 1 AND 75", + "name": "body_measurements_fat_check", + "entityType": "checks", + "schema": "health", + "table": "body_measurements" + }, + { + "value": "(\"muscle_mass_kg\" IS NULL OR \"muscle_mass_kg\" BETWEEN 5 AND 250)\n\t\t\tAND (\"skeletal_muscle_kg\" IS NULL OR \"skeletal_muscle_kg\" BETWEEN 5 AND 200)\n\t\t\tAND (\"bone_mass_kg\" IS NULL OR \"bone_mass_kg\" BETWEEN 0.5 AND 20)\n\t\t\tAND (\"visceral_fat\" IS NULL OR \"visceral_fat\" BETWEEN 1 AND 60)\n\t\t\tAND (\"body_water_pct\" IS NULL OR \"body_water_pct\" BETWEEN 20 AND 85)\n\t\t\tAND (\"protein_pct\" IS NULL OR \"protein_pct\" BETWEEN 5 AND 40)\n\t\t\tAND (\"bmr_kcal\" IS NULL OR \"bmr_kcal\" BETWEEN 500 AND 6000)\n\t\t\tAND (\"bmi\" IS NULL OR \"bmi\" BETWEEN 10 AND 80)", + "name": "body_measurements_scale_check", + "entityType": "checks", + "schema": "health", + "table": "body_measurements" + }, + { + "value": "\"date\" >= DATE '1900-01-01'", + "name": "body_measurements_date_check", + "entityType": "checks", + "schema": "health", + "table": "body_measurements" + }, + { + "value": "length(btrim(\"name\")) > 0", + "name": "medications_name_check", + "entityType": "checks", + "schema": "health", + "table": "medications" + }, + { + "value": "\"kind\" IN ('medication','supplement')", + "name": "medications_kind_check", + "entityType": "checks", + "schema": "health", + "table": "medications" + }, + { + "value": "\"stop_date\" IS NULL OR \"start_date\" IS NULL OR \"stop_date\" >= \"start_date\"", + "name": "medications_dates_check", + "entityType": "checks", + "schema": "health", + "table": "medications" + }, + { + "value": "\"kcal\" IS NULL OR \"kcal\" BETWEEN 0 AND 20000", + "name": "nutrition_daily_kcal_check", + "entityType": "checks", + "schema": "health", + "table": "nutrition_daily" + }, + { + "value": "\"protein_g\" IS NULL OR \"protein_g\" BETWEEN 0 AND 1000", + "name": "nutrition_daily_protein_check", + "entityType": "checks", + "schema": "health", + "table": "nutrition_daily" + }, + { + "value": "\"date\" >= DATE '1900-01-01'", + "name": "nutrition_daily_date_check", + "entityType": "checks", + "schema": "health", + "table": "nutrition_daily" + }, + { + "value": "\"wake_time\" > \"bedtime\"", + "name": "sleep_order_check", + "entityType": "checks", + "schema": "health", + "table": "sleep" + }, + { + "value": "\"wake_time\" - \"bedtime\" <= interval '24 hours'", + "name": "sleep_length_check", + "entityType": "checks", + "schema": "health", + "table": "sleep" + }, + { + "value": "\"date\" >= DATE '1900-01-01'", + "name": "sleep_date_check", + "entityType": "checks", + "schema": "health", + "table": "sleep" + }, + { + "value": "length(btrim(\"vaccine\")) > 0", + "name": "vaccinations_vaccine_check", + "entityType": "checks", + "schema": "health", + "table": "vaccinations" + }, + { + "value": "\"dose_no\" IS NULL OR \"dose_no\" BETWEEN 1 AND 20", + "name": "vaccinations_dose_no_check", + "entityType": "checks", + "schema": "health", + "table": "vaccinations" + }, + { + "value": "\"country\" IS NULL OR \"country\" ~ '^[A-Z]{2}$'", + "name": "vaccinations_country_check", + "entityType": "checks", + "schema": "health", + "table": "vaccinations" + }, + { + "value": "\"date\" >= DATE '1900-01-01'", + "name": "vaccinations_date_check", + "entityType": "checks", + "schema": "health", + "table": "vaccinations" + }, + { + "value": "length(btrim(\"exercise\")) > 0", + "name": "workouts_exercise_check", + "entityType": "checks", + "schema": "health", + "table": "workouts" + }, + { + "value": "\"sets\" IS NULL OR \"sets\" BETWEEN 1 AND 100", + "name": "workouts_sets_check", + "entityType": "checks", + "schema": "health", + "table": "workouts" + }, + { + "value": "\"reps\" IS NULL OR \"reps\" BETWEEN 0 AND 1000", + "name": "workouts_reps_check", + "entityType": "checks", + "schema": "health", + "table": "workouts" + }, + { + "value": "\"load_kg\" IS NULL OR \"load_kg\" BETWEEN 0 AND 1000", + "name": "workouts_load_check", + "entityType": "checks", + "schema": "health", + "table": "workouts" + }, + { + "value": "\"rpe\" IS NULL OR \"rpe\" BETWEEN 1 AND 10", + "name": "workouts_rpe_check", + "entityType": "checks", + "schema": "health", + "table": "workouts" + }, + { + "value": "\"date\" >= DATE '1900-01-01'", + "name": "workouts_date_check", + "entityType": "checks", + "schema": "health", + "table": "workouts" + }, + { + "value": "\"percent\" between 0 and 100", + "name": "progress_percent_check", + "entityType": "checks", + "schema": "books", + "table": "progress" + }, + { + "value": "\"rating\" is null or \"rating\" between 1 and 5", + "name": "progress_rating_check", + "entityType": "checks", + "schema": "books", + "table": "progress" + }, + { + "value": "(\"start_percent\" is null or \"start_percent\" between 0 and 100) and (\"end_percent\" is null or \"end_percent\" between 0 and 100)", + "name": "sessions_percent_check", + "entityType": "checks", + "schema": "books", + "table": "sessions" + }, + { + "value": "\"ended_at\" is null or \"ended_at\" >= \"started_at\"", + "name": "sessions_end_check", + "entityType": "checks", + "schema": "books", + "table": "sessions" + }, + { + "value": "\"year\" is null or \"year\" between 0 and 2100", + "name": "works_year_check", + "entityType": "checks", + "schema": "books", + "table": "works" + }, + { + "value": "\"task_id\" IS NOT NULL OR \"goal_id\" IS NOT NULL", + "name": "activity_target_check", + "entityType": "checks", + "schema": "tasks", + "table": "activity" + }, + { + "value": "\"kind\" IN ('created','status','edit','note','progress')", + "name": "activity_kind_check", + "entityType": "checks", + "schema": "tasks", + "table": "activity" + }, + { + "value": "\"slug\" ~ '^[a-z0-9][a-z0-9-]{0,62}$'", + "name": "areas_slug_check", + "entityType": "checks", + "schema": "tasks", + "table": "areas" + }, + { + "value": "length(btrim(\"name\")) > 0", + "name": "areas_name_check", + "entityType": "checks", + "schema": "tasks", + "table": "areas" + }, + { + "value": "length(btrim(\"title\")) > 0", + "name": "goals_title_check", + "entityType": "checks", + "schema": "tasks", + "table": "goals" + }, + { + "value": "\"status\" IN ('active','achieved','dropped')", + "name": "goals_status_check", + "entityType": "checks", + "schema": "tasks", + "table": "goals" + }, + { + "value": "length(btrim(\"title\")) > 0", + "name": "tasks_title_check", + "entityType": "checks", + "schema": "tasks", + "table": "tasks" + }, + { + "value": "\"status\" IN ('todo','in_progress','done','dropped')", + "name": "tasks_status_check", + "entityType": "checks", + "schema": "tasks", + "table": "tasks" + }, + { + "value": "\"priority\" BETWEEN 0 AND 3", + "name": "tasks_priority_check", + "entityType": "checks", + "schema": "tasks", + "table": "tasks" + }, + { + "value": "\"parent_id\" IS NULL OR \"parent_id\" <> \"id\"", + "name": "tasks_parent_check", + "entityType": "checks", + "schema": "tasks", + "table": "tasks" + }, + { + "value": "\"due_time\" IS NULL OR \"due_date\" IS NOT NULL", + "name": "tasks_time_check", + "entityType": "checks", + "schema": "tasks", + "table": "tasks" + }, + { + "value": "length(btrim(\"name\")) > 0", + "name": "groups_name_check", + "entityType": "checks", + "schema": "groceries", + "table": "groups" + }, + { + "value": "\"unit\" IS NULL OR \"unit\" IN ('piece','kg','l')", + "name": "groups_unit_check", + "entityType": "checks", + "schema": "groceries", + "table": "groups" + }, + { + "value": "\"merged_into_id\" IS NULL OR \"merged_into_id\" <> \"id\"", + "name": "groups_not_self_merged", + "entityType": "checks", + "schema": "groceries", + "table": "groups" + }, + { + "value": "\"unit\" IS NULL OR \"unit\" IN ('piece','kg','l')", + "name": "items_unit_check", + "entityType": "checks", + "schema": "groceries", + "table": "items" + }, + { + "value": "\"price_cents\" IS NULL OR \"price_cents\" >= 0", + "name": "items_price_check", + "entityType": "checks", + "schema": "groceries", + "table": "items" + }, + { + "value": "\"slug\" ~ '^[a-z0-9][a-z0-9-]{0,62}$'", + "name": "stores_slug_check", + "entityType": "checks", + "schema": "groceries", + "table": "stores" + }, + { + "value": "length(btrim(\"name\")) > 0", + "name": "stores_name_check", + "entityType": "checks", + "schema": "groceries", + "table": "stores" + }, + { + "value": "length(btrim(\"title\")) between 1 and 80", + "name": "links_title_check", + "entityType": "checks", + "schema": "home", + "table": "links" + }, + { + "value": "\"url\" ~ '^https?://' and length(\"url\") <= 2000", + "name": "links_url_check", + "entityType": "checks", + "schema": "home", + "table": "links" + }, + { + "value": "\"id\" = 1", + "name": "now_playing_single_row", + "entityType": "checks", + "schema": "music", + "table": "now_playing" + }, + { + "value": "\"source\" in ('spotify', 'lastfm', 'youtube', 'local')", + "name": "plays_source_check", + "entityType": "checks", + "schema": "music", + "table": "plays" + }, + { + "value": "\"origin\" in ('api', 'export', 'import', 'manual')", + "name": "plays_origin_check", + "entityType": "checks", + "schema": "music", + "table": "plays" + }, + { + "value": "\"id\" = 1", + "name": "spotify_auth_single_row", + "entityType": "checks", + "schema": "music", + "table": "spotify_auth" + } + ], + "renames": [] +} \ No newline at end of file diff --git a/src/lib/map-finder/MapCard.svelte b/src/lib/map-finder/MapCard.svelte index bf02b79..ce86cf5 100644 --- a/src/lib/map-finder/MapCard.svelte +++ b/src/lib/map-finder/MapCard.svelte @@ -1,26 +1,147 @@ + + - - -
-

- {map.artist_unicode || map.artist} – {map.title_unicode || map.title} -

-

{map.score}/100 · {map.confidence} confidence

-

{map.reasons.join(' · ')}

- {#if map.status || map.beatmaps}

- {map.status ?? ''}{map.status && map.beatmaps ? ' · ' : ''}{map.beatmaps - ? `${map.beatmaps.length} difficulties` - : ''} -

{/if} +
+ + {#if map.status}{map.status}{/if} + {#if map.preview_url}{/if}
-
+
+

+ {map.title_unicode || map.title} +

+

+ {map.artist_unicode || map.artist}{#if map.creator} + · mapped by + {map.creator}{/if} +

+

+ {[ + bpm ? `${Math.round(bpm)} BPM` : '', + length ? formatLength(length) : '', + range + ? range[0] === range[1] + ? `${range[0].toFixed(2)}★` + : `${range[0].toFixed(1)}–${range[1].toFixed(1)}★` + : '', + modes.length ? modes.map((m) => MODE_LABEL[m]).join('/') : '', + map.play_count !== undefined ? `${compact(map.play_count)} plays` : '', + map.favourite_count !== undefined ? `♥ ${compact(map.favourite_count)}` : '' + ] + .filter(Boolean) + .join(' · ')} +

+ {#if diffs.length} +
    + {#each diffs.slice(0, 10) as diff (diff.id)} +
  • + {diff.stars.toFixed(1)} +
  • + {/each} + {#if diffs.length > 10}
  • + +{diffs.length - 10} +
  • {/if} +
+ {#if total !== undefined && total > diffs.length}

+ {diffs.length} of {total} difficulties match the filters +

{/if} + {/if} +

+ match {map.score}/100 · {map.confidence} +

+ +
+ diff --git a/src/lib/map-finder/filters.test.ts b/src/lib/map-finder/filters.test.ts new file mode 100644 index 0000000..1e87cff --- /dev/null +++ b/src/lib/map-finder/filters.test.ts @@ -0,0 +1,68 @@ +import { describe, expect, it } from 'vitest'; +import { DEFAULT_FILTERS, filterMatches, formatLength, starRange } from './filters'; +import { parseArtistTitle } from './input'; +import type { ScoredBeatmapset } from './types'; + +const set = (id: number, status: string, diffs: [string, number][]): ScoredBeatmapset => ({ + id, + title: 'Song', + artist: 'Artist', + status, + score: 90, + confidence: 'high', + reasons: [], + beatmaps: diffs.map(([mode, stars], i) => ({ + id: id * 10 + i, + version: `d${i}`, + mode: mode as 'osu', + stars, + length: 120 + })) +}); +const maps = [ + set(1, 'ranked', [ + ['osu', 2.1], + ['osu', 5.4], + ['mania', 3] + ]), + set(2, 'graveyard', [['osu', 6.2]]), + set(3, 'loved', [['taiko', 4]]) +]; + +describe('filterMatches', () => { + it('passes everything with default filters', () => { + expect(filterMatches(maps, DEFAULT_FILTERS)).toBe(maps); + }); + it('filters by status, mode and star range and narrows difficulties', () => { + const out = filterMatches(maps, { + mode: 'osu', + status: 'leaderboard', + minStars: 4, + maxStars: 6 + }); + expect(out.map((m) => m.id)).toEqual([1]); + expect(out[0].beatmaps?.map((d) => d.stars)).toEqual([5.4]); + expect(filterMatches(maps, { ...DEFAULT_FILTERS, status: 'loved' }).map((m) => m.id)).toEqual([ + 3 + ]); + expect(filterMatches(maps, { ...DEFAULT_FILTERS, minStars: 6 }).map((m) => m.id)).toEqual([2]); + }); + it('formats helpers', () => { + expect(starRange(maps[0])).toEqual([2.1, 5.4]); + expect(formatLength(125)).toBe('2:05'); + }); +}); + +describe('parseArtistTitle', () => { + it('splits Artist - Title and Title by Artist', () => { + expect(parseArtistTitle('Camellia - Ghost')).toMatchObject({ + name: 'Ghost', + artists: [{ name: 'Camellia' }] + }); + expect(parseArtistTitle('Ghost by Camellia')).toMatchObject({ + name: 'Ghost', + artists: [{ name: 'Camellia' }] + }); + expect(parseArtistTitle('just a title')).toBeNull(); + }); +}); diff --git a/src/lib/map-finder/filters.ts b/src/lib/map-finder/filters.ts new file mode 100644 index 0000000..c8578cd --- /dev/null +++ b/src/lib/map-finder/filters.ts @@ -0,0 +1,102 @@ +import type { OsuMode, ScoredBeatmapset } from './types'; + +// Client-side filters for map finder results: the server returns every candidate with all +// difficulties, so changing a filter never needs another osu! search. +export type StatusFilter = 'any' | 'ranked' | 'loved' | 'leaderboard'; +export type Filters = { + mode: OsuMode | 'any'; + status: StatusFilter; + minStars: number | null; + maxStars: number | null; +}; +export const DEFAULT_FILTERS: Filters = { + mode: 'any', + status: 'any', + minStars: null, + maxStars: null +}; + +export const MODES: { key: Filters['mode']; label: string }[] = [ + { key: 'any', label: 'any mode' }, + { key: 'osu', label: 'osu!' }, + { key: 'taiko', label: 'taiko' }, + { key: 'fruits', label: 'catch' }, + { key: 'mania', label: 'mania' } +]; +export const STATUSES: { key: StatusFilter; label: string }[] = [ + { key: 'any', label: 'any status' }, + { key: 'leaderboard', label: 'has leaderboard' }, + { key: 'ranked', label: 'ranked only' }, + { key: 'loved', label: 'loved only' } +]; + +const STATUS_SETS: Record, string[]> = { + ranked: ['ranked', 'approved'], + loved: ['loved'], + leaderboard: ['ranked', 'approved', 'loved', 'qualified'] +}; + +export function isDefault(filters: Filters) { + return ( + filters.mode === 'any' && + filters.status === 'any' && + filters.minStars === null && + filters.maxStars === null + ); +} + +/** + * Keep the sets that have at least one difficulty passing the filters, with their + * difficulties narrowed to the passing ones. Sets without difficulty data only pass when no + * difficulty filter is active. + */ +export function filterMatches(matches: ScoredBeatmapset[], filters: Filters): ScoredBeatmapset[] { + if (isDefault(filters)) return matches; + const statuses = filters.status === 'any' ? null : STATUS_SETS[filters.status]; + const result: ScoredBeatmapset[] = []; + for (const map of matches) { + if (statuses && !statuses.includes(map.status ?? '')) continue; + const diffFilter = + filters.mode !== 'any' || filters.minStars !== null || filters.maxStars !== null; + if (!diffFilter) { + result.push(map); + continue; + } + const beatmaps = (map.beatmaps ?? []).filter( + (d) => + (filters.mode === 'any' || d.mode === filters.mode) && + (filters.minStars === null || d.stars >= filters.minStars) && + (filters.maxStars === null || d.stars <= filters.maxStars) + ); + if (beatmaps.length) result.push({ ...map, beatmaps }); + } + return result; +} + +export function starRange(map: ScoredBeatmapset): [number, number] | null { + const stars = (map.beatmaps ?? []).map((d) => d.stars); + return stars.length ? [Math.min(...stars), Math.max(...stars)] : null; +} + +export function formatLength(seconds: number) { + const s = Math.round(seconds); + return `${Math.floor(s / 60)}:${String(s % 60).padStart(2, '0')}`; +} + +/** osu!-site difficulty colours, coarsened to the familiar bands. */ +export function starColor(stars: number) { + if (stars < 2) return '#4fc0ff'; + if (stars < 2.7) return '#4fffd5'; + if (stars < 4) return '#7cff4f'; + if (stars < 5.3) return '#f6f05c'; + if (stars < 6.5) return '#ff4e6f'; + if (stars < 8) return '#c645b8'; + return '#6563de'; +} + +export const MODE_LABEL: Record = { + osu: 'osu!', + taiko: 'taiko', + fruits: 'catch', + mania: 'mania' +}; diff --git a/src/lib/map-finder/input.ts b/src/lib/map-finder/input.ts index 7beef9b..860583d 100644 --- a/src/lib/map-finder/input.ts +++ b/src/lib/map-finder/input.ts @@ -1,3 +1,4 @@ +import type { SpotifyTrack } from './types'; export type SpotifyInput = | { kind: 'track'; id: string } | { kind: 'playlist'; id: string } @@ -42,3 +43,26 @@ export function parseSpotifyInput(value: string): SpotifyInput { ); return { kind: resource, id }; } + +/** + * "Artist - Title" (or "Title by Artist") typed by hand, so a search works without Spotify. + * Returns null when the text has no clear artist/title split. + */ +export function parseArtistTitle(value: string): SpotifyTrack | null { + const text = value.trim().replace(/\s+/g, ' '); + let artist: string | undefined, title: string | undefined; + const dash = /^(.+?)\s+[-–—]\s+(.+)$/.exec(text); + if (dash) [, artist, title] = dash; + else { + const by = /^(.+?)\s+by\s+(.+)$/i.exec(text); + if (by) [, title, artist] = by; + } + if (!artist?.trim() || !title?.trim()) return null; + return { + id: `text:${artist.toLowerCase()}|${title.toLowerCase()}`, + name: title.trim(), + artists: [{ name: artist.trim() }], + album: { name: '', images: [] }, + url: null + }; +} diff --git a/src/lib/map-finder/matching.ts b/src/lib/map-finder/matching.ts index 2d2d924..b8bc833 100644 --- a/src/lib/map-finder/matching.ts +++ b/src/lib/map-finder/matching.ts @@ -74,14 +74,31 @@ export function scoreBeatmapset(track: SpotifyTrack, map: OsuBeatmapset): Scored reasons }; } +const statusRank = (status?: string) => + status === 'ranked' || status === 'approved' + ? 3 + : status === 'loved' + ? 2 + : status === 'qualified' + ? 1 + : 0; export function rankCandidates(track: SpotifyTrack, maps: OsuBeatmapset[]): ScoredBeatmapset[] { const merged = new Map(); for (const map of maps) { const scored = scoreBeatmapset(track, map); if (scored.score > (merged.get(map.id)?.score ?? -1)) merged.set(map.id, scored); } - return [...merged.values()] - .filter((m) => m.score >= MIN_CANDIDATE_SCORE) - .sort((a, b) => b.score - a.score || a.id - b.id) - .slice(0, MAX_CANDIDATES); + return ( + [...merged.values()] + .filter((m) => m.score >= MIN_CANDIDATE_SCORE) + // Equal scores (many maps of one song): prefer maps with a leaderboard, then popular ones. + .sort( + (a, b) => + b.score - a.score || + statusRank(b.status) - statusRank(a.status) || + (b.play_count ?? 0) - (a.play_count ?? 0) || + a.id - b.id + ) + .slice(0, MAX_CANDIDATES) + ); } diff --git a/src/lib/map-finder/types.ts b/src/lib/map-finder/types.ts index 7299190..229b068 100644 --- a/src/lib/map-finder/types.ts +++ b/src/lib/map-finder/types.ts @@ -1,15 +1,32 @@ export type SpotifyTrack = { + /** Spotify track id, or `db:` for a track from the listening history without one. */ id: string; name: string; artists: { name: string }[]; album: { name: string; images: { url: string }[] }; + /** Link to the track on Spotify, when known. */ + url?: string | null; + /** Extra context shown with the track, e.g. "12 plays" or "listening now". */ + note?: string; }; export type SpotifyCollection = { - kind: 'playlist' | 'album'; + kind: 'playlist' | 'album' | 'library'; id: string; name: string; owner: string; image?: string; + url?: string; +}; +export type OsuMode = 'osu' | 'taiko' | 'fruits' | 'mania'; +export type OsuDifficulty = { + id: number; + version: string; + mode: OsuMode; + stars: number; + /** Drain-inclusive length in seconds. */ + length: number; + bpm?: number; + status?: string; }; export type OsuBeatmapset = { id: number; @@ -17,9 +34,17 @@ export type OsuBeatmapset = { title: string; artist_unicode?: string; title_unicode?: string; - covers?: { card?: string; 'card@2x'?: string }; + covers?: { card?: string; 'card@2x'?: string; list?: string }; status?: string; - beatmaps?: { id: number }[]; + creator?: string; + bpm?: number; + play_count?: number; + favourite_count?: number; + preview_url?: string; + ranked_date?: string | null; + video?: boolean; + nsfw?: boolean; + beatmaps?: OsuDifficulty[]; }; export type ScoredBeatmapset = OsuBeatmapset & { score: number; diff --git a/src/lib/music/collector.server.ts b/src/lib/music/collector.server.ts index a7bdf7b..0b802b5 100644 --- a/src/lib/music/collector.server.ts +++ b/src/lib/music/collector.server.ts @@ -15,7 +15,10 @@ export const SPOTIFY_SCOPES = [ 'user-read-currently-playing', 'user-read-recently-played', 'user-read-playback-state', - 'user-top-read' + 'user-top-read', + // Map finder: liked songs and Stan's own playlists. + 'user-library-read', + 'playlist-read-private' ] as const; export class SpotifyError extends Error { diff --git a/src/lib/server/db/schema/music.ts b/src/lib/server/db/schema/music.ts index 37c4592..f0c433f 100644 --- a/src/lib/server/db/schema/music.ts +++ b/src/lib/server/db/schema/music.ts @@ -172,6 +172,13 @@ export const musicSpotifyAuth = musicSchema.table( (t) => [check('spotify_auth_single_row', sql`${t.id} = 1`)] ); +/** Map finder (/projects/spotify-beatmap-finder): osu! search results per normalised track. */ +export const musicOsuMatchCache = musicSchema.table('osu_match_cache', { + key: text('key').primaryKey(), + result: jsonb('result').notNull(), + searchedAt: timestamptz('searched_at').notNull().defaultNow() +}); + /** Resumable backfill state, e.g. key 'lastfm:stanrunge' (see scripts/music-import-lastfm.ts). */ export const musicImportState = musicSchema.table('import_state', { key: text('key').primaryKey(), diff --git a/src/lib/server/map-finder/cache.ts b/src/lib/server/map-finder/cache.ts new file mode 100644 index 0000000..c6fd2c7 --- /dev/null +++ b/src/lib/server/map-finder/cache.ts @@ -0,0 +1,28 @@ +import { client as sql } from '#lib/server/db/index.js'; +import type { MatchStore } from '#lib/server/osu.js'; +import type { ScoredBeatmapset } from '#lib/map-finder/types.js'; + +// osu! search results per normalised track, kept for a few days so repeat lookups (your +// top tracks, a playlist you check again) are instant and cost no osu! API calls. +const TTL_DAYS = 3; + +export const matchStore: MatchStore = { + async get(key) { + const [row] = await sql` + select result from music.osu_match_cache + where key = ${key} and searched_at > now() - make_interval(days => ${TTL_DAYS})`; + if (!row) return null; + return ( + typeof row.result === 'string' ? JSON.parse(row.result) : row.result + ) as ScoredBeatmapset[]; + }, + async set(key, result) { + await sql` + insert into music.osu_match_cache (key, result, searched_at) + values (${key}, ${JSON.stringify(result)}::jsonb, now()) + on conflict (key) do update set result = excluded.result, searched_at = now()`; + // Keep the table small: drop entries well past their TTL now and then. + if (Math.random() < 0.02) + await sql`delete from music.osu_match_cache where searched_at < now() - interval '30 days'`; + } +}; diff --git a/src/lib/server/map-finder/sources.ts b/src/lib/server/map-finder/sources.ts new file mode 100644 index 0000000..8d3a814 --- /dev/null +++ b/src/lib/server/map-finder/sources.ts @@ -0,0 +1,146 @@ +import { client as sql } from '#lib/server/db/index.js'; +import type { SpotifyCollection, SpotifyTrack } from '#lib/map-finder/types.js'; +import { usableTrack } from '#lib/server/spotify.js'; +import { ApiError } from '#lib/server/finder-http.js'; +import { spotifyUserGet } from '#lib/server/music/user-token.js'; +import { SpotifyError } from '#lib/music/collector.server.js'; + +// "Find maps for what I listen to": track lists from the listening tracker (music.* in the +// database, filled by the Spotify poller and the Last.fm import) and from Stan's Spotify +// account. History sources need no Spotify API call at all, only osu!. +export const SOURCES = { + top: { label: 'top tracks · 30 days', cost: 6, owner: false }, + recent: { label: 'recently played', cost: 6, owner: false }, + now: { label: 'now playing', cost: 1, owner: false }, + 'spotify-top': { label: 'all-time top (Spotify)', cost: 6, owner: false }, + liked: { label: 'liked songs', cost: 6, owner: true } +} as const; +export type Source = keyof typeof SOURCES; +export const isSource = (value: unknown): value is Source => + typeof value === 'string' && Object.hasOwn(SOURCES, value); +export const SOURCE_TRACKS = 30; + +type Row = { + id: number; + spotify_id: string | null; + name: string; + artists: string[] | null; + album: string | null; + image: string | null; + note: string | null; +}; +const artistsOf = () => sql`coalesce((select array_agg(ar.name order by ta.position) + from music.track_artists ta join music.artists ar on ar.id = ta.artist_id + where ta.track_id = t.id), array_remove(array[a.name], null))`; + +function fromRow(row: Row): SpotifyTrack | null { + const artists = (row.artists ?? []).filter(Boolean).map((name) => ({ name })); + if (!artists.length || !row.name) return null; + return { + id: row.spotify_id ?? `db:${row.id}`, + name: row.name, + artists, + album: { name: row.album ?? '', images: row.image ? [{ url: row.image }] : [] }, + url: row.spotify_id ? `https://open.spotify.com/track/${row.spotify_id}` : null, + note: row.note ?? undefined + }; +} + +async function history(source: 'top' | 'recent' | 'now'): Promise { + let rows: Row[]; + if (source === 'top') + rows = await sql` + select t.id, t.spotify_id, t.name, ${artistsOf()} as artists, al.name as album, + coalesce(al.image_url_small, al.image_url) as image, + count(*)::text || case when count(*) = 1 then ' play' else ' plays' end as note + from music.plays_deduped p + join music.tracks t on t.id = p.track_id + left join music.artists a on a.id = t.artist_id + left join music.albums al on al.id = t.album_id + where p.played_at >= now() - interval '30 days' + group by t.id, a.name, al.id + order by count(*) desc, max(p.played_at) desc limit ${SOURCE_TRACKS}`; + else if (source === 'recent') + rows = await sql` + select t.id, t.spotify_id, t.name, ${artistsOf()} as artists, al.name as album, + coalesce(al.image_url_small, al.image_url) as image, null as note + from (select track_id, max(played_at) as at from music.plays_deduped + group by track_id order by at desc limit ${SOURCE_TRACKS}) p + join music.tracks t on t.id = p.track_id + left join music.artists a on a.id = t.artist_id + left join music.albums al on al.id = t.album_id + order by p.at desc`; + else + rows = await sql` + select * from ( + select t.id, t.spotify_id, t.name, ${artistsOf()} as artists, al.name as album, + coalesce(al.image_url_small, al.image_url) as image, 'listening now' as note, 0 as rank + from music.now_playing n + join music.tracks t on t.id = n.track_id + left join music.artists a on a.id = t.artist_id + left join music.albums al on al.id = t.album_id + where n.is_playing and n.updated_at > now() - interval '3 minutes' + union all + (select t.id, t.spotify_id, t.name, ${artistsOf()}, al.name, + coalesce(al.image_url_small, al.image_url), 'last played', 1 + from music.plays_deduped p + join music.tracks t on t.id = p.track_id + left join music.artists a on a.id = t.artist_id + left join music.albums al on al.id = t.album_id + order by p.played_at desc limit 1) + ) x order by rank limit 1`; + return rows.map(fromRow).filter((t): t is SpotifyTrack => t !== null); +} + +async function spotifyUser(source: 'spotify-top' | 'liked'): Promise { + let response: Record | null; + try { + response = await spotifyUserGet( + source === 'liked' + ? `me/tracks?limit=${SOURCE_TRACKS}` + : `me/top/tracks?time_range=long_term&limit=${SOURCE_TRACKS}` + ); + } catch (e) { + if (e instanceof SpotifyError && (e.status === 401 || e.status === 403)) + throw new ApiError( + 'Spotify', + 403, + source === 'liked' + ? 'Liked songs need Spotify reconnected with library access (/api/spotify/connect).' + : 'Spotify refused the request. Reconnect Spotify at /api/spotify/connect.' + ); + throw new ApiError('Spotify', 502, 'Spotify request failed. Please try again later.'); + } + if (!response) + throw new ApiError( + 'Spotify', + 503, + 'Spotify is not connected yet, so this list is unavailable.' + ); + const items = Array.isArray(response.items) ? response.items : []; + const seen = new Set(); + const tracks: SpotifyTrack[] = []; + for (const item of items) { + const track = usableTrack( + source === 'liked' ? (item as Record | null)?.track : item + ); + if (track && !seen.has(track.id)) { + seen.add(track.id); + tracks.push({ ...track, url: `https://open.spotify.com/track/${track.id}` }); + } + } + return tracks; +} + +export async function getSourceTracks( + source: Source +): Promise<{ tracks: SpotifyTrack[]; collection: SpotifyCollection }> { + const tracks = + source === 'spotify-top' || source === 'liked' + ? await spotifyUser(source) + : await history(source); + return { + tracks, + collection: { kind: 'library', id: source, name: `Stan's ${SOURCES[source].label}`, owner: '' } + }; +} diff --git a/src/lib/server/music/user-token.ts b/src/lib/server/music/user-token.ts new file mode 100644 index 0000000..0a629c8 --- /dev/null +++ b/src/lib/server/music/user-token.ts @@ -0,0 +1,45 @@ +import { client as sql } from '#lib/server/db/index.js'; +import { refreshAccessToken, spotifyGet } from '#lib/music/collector.server.js'; +import { spotifyCredentials } from './poller'; + +// Spotify calls on Stan's behalf (his own playlists, liked songs, top tracks), using the +// authorization stored by /api/spotify/connect. Shares the access token with the poller. +let pending: Promise | null = null; + +async function fresh(): Promise { + const creds = spotifyCredentials(); + if (!creds.clientId || !creds.clientSecret) return null; + const [auth] = await sql` + select refresh_token, access_token, access_expires_at, needs_reauth + from music.spotify_auth where id = 1`.catch(() => []); + if (!auth || auth.needs_reauth) return null; + const expires = auth.access_expires_at ? new Date(auth.access_expires_at).getTime() : 0; + if (auth.access_token && expires > Date.now() + 60_000) return auth.access_token as string; + const token = await refreshAccessToken(fetch, creds, auth.refresh_token); + await sql` + update music.spotify_auth set access_token = ${token.access_token}, + access_expires_at = now() + make_interval(secs => ${token.expires_in}), + refresh_token = coalesce(${token.refresh_token ?? null}, refresh_token), + scope = coalesce(${token.scope ?? null}, scope), updated_at = now() + where id = 1`; + return token.access_token; +} + +/** A user access token, or null when Spotify is not connected (or needs reconnecting). */ +export function spotifyUserToken(): Promise { + pending ??= fresh().finally(() => (pending = null)); + return pending; +} + +/** GET an API path with the user token; null when not connected. */ +export async function spotifyUserGet(path: string): Promise | null> { + const token = await spotifyUserToken(); + if (!token) return null; + return ((await spotifyGet(fetch, token, path)) ?? {}) as Record; +} + +/** Scopes granted at connect time (to tell the owner to reconnect for new features). */ +export async function grantedScopes(): Promise { + const [row] = await sql`select scope from music.spotify_auth where id = 1`.catch(() => []); + return typeof row?.scope === 'string' ? row.scope.split(' ') : []; +} diff --git a/src/lib/server/osu.test.ts b/src/lib/server/osu.test.ts index 20c360c..6e93865 100644 --- a/src/lib/server/osu.test.ts +++ b/src/lib/server/osu.test.ts @@ -1,4 +1,4 @@ -import { expect, it, vi } from 'vitest'; +import { describe, expect, it, vi } from 'vitest'; vi.mock('$app/env/private', () => ({ OSU_CLIENT_ID: '1', OSU_CLIENT_SECRET: 'test' })); import { getOsuMaps } from './osu'; it('falls back deliberately, merges IDs, reuses OAuth and caches matching results', async () => { @@ -32,3 +32,31 @@ it('falls back deliberately, merges IDs, reuses OAuth and caches matching result 1 ); }); + +describe('parseBeatmapset', () => { + it('keeps the shown fields, fixes preview URLs and sorts difficulties', async () => { + const { parseBeatmapset } = await import('./osu'); + const set = parseBeatmapset({ + id: 7, + title: 'T', + artist: 'A', + creator: 'mapper', + status: 'ranked', + preview_url: '//b.ppy.sh/preview/7.mp3', + covers: { card: 'https://assets.ppy.sh/c.jpg', list: 'javascript:alert(1)' }, + beatmaps: [ + { id: 2, mode: 'osu', difficulty_rating: 5.123, total_length: 90, version: 'Hard' }, + { id: 1, mode: 'osu', difficulty_rating: 2, total_length: 90, version: 'Easy' }, + { id: 3, mode: 'bogus' } + ] + }); + expect(set).toMatchObject({ + id: 7, + creator: 'mapper', + preview_url: 'https://b.ppy.sh/preview/7.mp3' + }); + expect(set?.covers?.list).toBeUndefined(); + expect(set?.beatmaps?.map((d) => d.stars)).toEqual([2, 5.12]); + expect(parseBeatmapset({ id: 'x' })).toBeNull(); + }); +}); diff --git a/src/lib/server/osu.ts b/src/lib/server/osu.ts index f9eb9ca..564d76f 100644 --- a/src/lib/server/osu.ts +++ b/src/lib/server/osu.ts @@ -1,5 +1,11 @@ import { OSU_CLIENT_ID, OSU_CLIENT_SECRET } from '$app/env/private'; -import type { OsuBeatmapset, ScoredBeatmapset, SpotifyTrack } from '#lib/map-finder/types.js'; +import type { + OsuBeatmapset, + OsuDifficulty, + OsuMode, + ScoredBeatmapset, + SpotifyTrack +} from '#lib/map-finder/types.js'; import { cleanTitle, normalize, @@ -11,6 +17,12 @@ const token = createTokenCache(); const cache = new Map(); const pending = new Map>(); export const MATCH_CONCURRENCY = 3; +/** Optional persistent cache (music.osu_match_cache) behind the in-memory one. */ +export type MatchStore = { + get(key: string): Promise; + set(key: string, result: ScoredBeatmapset[]): Promise; +}; +export const osuConfigured = () => !!(OSU_CLIENT_ID && OSU_CLIENT_SECRET); // Global permits also bound outbound work across simultaneous visitors. let active = 0; const queue: (() => void)[] = []; @@ -25,10 +37,72 @@ async function limited(work: () => Promise): Promise { else active--; } } +const MODES = new Set(['osu', 'taiko', 'fruits', 'mania']); +const str = (value: unknown) => (typeof value === 'string' ? value : undefined); +const num = (value: unknown) => + typeof value === 'number' && Number.isFinite(value) ? value : undefined; +const https = (value: unknown) => { + const url = str(value); + // The API sends previews protocol-relative (//b.ppy.sh/preview/1.mp3). + if (url?.startsWith('//')) return `https:${url}`; + return url?.startsWith('https://') ? url : undefined; +}; +function difficulty(value: unknown): OsuDifficulty | null { + if (!value || typeof value !== 'object') return null; + const d = value as Record; + const mode = str(d.mode) as OsuMode | undefined; + if (!Number.isInteger(d.id) || !mode || !MODES.has(mode)) return null; + return { + id: d.id as number, + version: str(d.version) ?? '', + mode, + stars: Math.round((num(d.difficulty_rating) ?? 0) * 100) / 100, + length: num(d.total_length) ?? 0, + bpm: num(d.bpm), + status: str(d.status) + }; +} +/** Keep only the fields the finder shows (the search response is large). */ +export function parseBeatmapset(item: unknown): OsuBeatmapset | null { + if (!item || typeof item !== 'object') return null; + const b = item as Record; + if (!Number.isInteger(b.id) || typeof b.title !== 'string' || typeof b.artist !== 'string') + return null; + const covers = (b.covers && typeof b.covers === 'object' ? b.covers : {}) as Record< + string, + unknown + >; + return { + id: b.id as number, + title: b.title, + artist: b.artist, + title_unicode: str(b.title_unicode), + artist_unicode: str(b.artist_unicode), + status: str(b.status), + creator: str(b.creator), + bpm: num(b.bpm), + play_count: num(b.play_count), + favourite_count: num(b.favourite_count), + preview_url: https(b.preview_url), + ranked_date: str(b.ranked_date) ?? null, + video: b.video === true, + nsfw: b.nsfw === true, + covers: { + card: https(covers.card), + 'card@2x': https(covers['card@2x']), + list: https(covers.list) + }, + beatmaps: Array.isArray(b.beatmaps) + ? b.beatmaps + .map(difficulty) + .filter((d): d is OsuDifficulty => d !== null) + .sort((x, y) => x.mode.localeCompare(y.mode) || x.stars - y.stars) + : undefined + }; +} async function search(fetchFn: Fetch, query: string): Promise { const access = await token(() => { - if (!OSU_CLIENT_ID || !OSU_CLIENT_SECRET) - throw new ApiError('osu!', 503, 'osu! is not configured on this server.'); + if (!osuConfigured()) throw new ApiError('osu!', 503, 'osu! is not configured on this server.'); return requestJson(fetchFn, 'osu!', 'https://osu.ppy.sh/oauth/token', { method: 'POST', headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, @@ -49,44 +123,45 @@ async function search(fetchFn: Fetch, query: string): Promise { if (!Array.isArray(response?.beatmapsets)) throw new ApiError('osu!', 502, 'osu! returned an invalid search response.'); return response.beatmapsets - .filter( - (item): item is OsuBeatmapset => - !!item && - typeof item === 'object' && - Number.isInteger((item as OsuBeatmapset).id) && - typeof (item as OsuBeatmapset).title === 'string' && - typeof (item as OsuBeatmapset).artist === 'string' - ) - .map((item) => ({ - id: item.id, - title: item.title, - artist: item.artist, - title_unicode: typeof item.title_unicode === 'string' ? item.title_unicode : undefined, - artist_unicode: typeof item.artist_unicode === 'string' ? item.artist_unicode : undefined, - status: typeof item.status === 'string' ? item.status : undefined, - covers: { card: typeof item.covers?.card === 'string' ? item.covers.card : undefined }, - beatmaps: Array.isArray(item.beatmaps) ? item.beatmaps.map(() => ({ id: 0 })) : undefined - })); + .map(parseBeatmapset) + .filter((item): item is OsuBeatmapset => item !== null); } -export async function getOsuMaps(fetchFn: Fetch, track: SpotifyTrack): Promise { - const key = JSON.stringify([normalize(track.name), track.artists.map((a) => normalize(a.name))]); +const cacheError = (error: unknown) => { + console.warn('osu! match cache unavailable:', (error as Error)?.message); + return null; +}; +export const matchCacheKey = (track: SpotifyTrack) => + JSON.stringify([normalize(track.name), track.artists.map((a) => normalize(a.name))]); +export async function getOsuMaps( + fetchFn: Fetch, + track: SpotifyTrack, + store?: MatchStore +): Promise { + const key = matchCacheKey(track); for (const [key, entry] of cache) if (entry.expires <= Date.now()) cache.delete(key); const hit = cache.get(key); if (hit) return hit.result; const existing = pending.get(key); if (existing) return existing; - const work = limited(async () => { - const maps = await search(fetchFn, `${track.artists[0].name} ${track.name}`); - let ranked = rankCandidates(track, maps); - if (!ranked.some((m) => m.score >= MEDIUM_CONFIDENCE)) - ranked = rankCandidates(track, [ - ...maps, - ...(await search(fetchFn, cleanTitle(track.name) || track.name)) - ]); + const remember = (result: ScoredBeatmapset[]) => { if (cache.size >= 500) cache.delete(cache.keys().next().value!); - cache.set(key, { expires: Date.now() + 5 * 60_000, result: ranked }); - return ranked; - }).finally(() => pending.delete(key)); + cache.set(key, { expires: Date.now() + 5 * 60_000, result }); + return result; + }; + const work = (async () => { + const stored = await store?.get(key).catch(cacheError); + if (stored) return remember(stored); + const ranked = await limited(async () => { + const title = cleanTitle(track.name) || track.name; + const maps = await search(fetchFn, `${track.artists[0].name} ${title}`); + let ranked = rankCandidates(track, maps); + if (!ranked.some((m) => m.score >= MEDIUM_CONFIDENCE)) + ranked = rankCandidates(track, [...maps, ...(await search(fetchFn, title))]); + return ranked; + }); + await store?.set(key, ranked).catch(cacheError); + return remember(ranked); + })().finally(() => pending.delete(key)); pending.set(key, work); return work; } diff --git a/src/lib/server/spotify.ts b/src/lib/server/spotify.ts index 217bd57..915b095 100644 --- a/src/lib/server/spotify.ts +++ b/src/lib/server/spotify.ts @@ -39,7 +39,8 @@ export function usableTrack(value: unknown): SpotifyTrack | null { id: track.id, name: track.name, artists, - album: { name: typeof album.name === 'string' ? album.name : '', images } + album: { name: typeof album.name === 'string' ? album.name : '', images }, + url: `https://open.spotify.com/track/${track.id}` }; } export function playlistTracks(items: unknown[], seen = new Set()): SpotifyTrack[] { @@ -55,19 +56,31 @@ export function playlistTracks(items: unknown[], seen = new Set()): Spot } return result; } -async function spotify(fetchFn: Fetch, path: string) { - const access = await token(() => { - if (!SPOTIFY_CLIENT_ID || !SPOTIFY_CLIENT_SECRET) - throw new ApiError('Spotify', 503, 'Spotify is not configured on this server.'); - return requestJson(fetchFn, 'Spotify', 'https://accounts.spotify.com/api/token', { - method: 'POST', - headers: { - Authorization: `Basic ${btoa(`${SPOTIFY_CLIENT_ID}:${SPOTIFY_CLIENT_SECRET}`)}`, - 'Content-Type': 'application/x-www-form-urlencoded' - }, - body: new URLSearchParams({ grant_type: 'client_credentials' }) - }); - }); +// Development-mode Spotify apps (2026) only return playlist contents to a user token, and +// only for playlists that user owns or collaborates on: use Stan's connected account. +async function userToken(): Promise { + try { + const { spotifyUserToken } = await import('./music/user-token'); + return await spotifyUserToken(); + } catch { + return null; + } +} +async function spotify(fetchFn: Fetch, path: string, user: string | null = null) { + const access = + user ?? + (await token(() => { + if (!SPOTIFY_CLIENT_ID || !SPOTIFY_CLIENT_SECRET) + throw new ApiError('Spotify', 503, 'Spotify is not configured on this server.'); + return requestJson(fetchFn, 'Spotify', 'https://accounts.spotify.com/api/token', { + method: 'POST', + headers: { + Authorization: `Basic ${btoa(`${SPOTIFY_CLIENT_ID}:${SPOTIFY_CLIENT_SECRET}`)}`, + 'Content-Type': 'application/x-www-form-urlencoded' + }, + body: new URLSearchParams({ grant_type: 'client_credentials' }) + }); + })); return record( await requestJson(fetchFn, 'Spotify', `https://api.spotify.com/v1/${path}`, { headers: { Authorization: `Bearer ${access}` } @@ -78,7 +91,8 @@ export async function getSpotifyMetadata( fetchFn: Fetch, input: | Extract - | Extract + | Extract, + options: { owner?: boolean } = {} ): Promise<{ tracks: SpotifyTrack[]; collection?: SpotifyCollection; truncated: boolean }> { if (input.kind === 'track' || input.kind === 'search') { let response: RecordValue; @@ -137,7 +151,14 @@ export async function getSpotifyMetadata( : undefined }; // Extended-quota responses use tracks/track; newer development-mode responses use items/item. - const modern = metadata.items !== undefined; + let user: string | null = null; + if (!isAlbum && metadata.items === undefined && metadata.tracks === undefined) { + if (metadata.public === false && !options.owner) + throw new ApiError('Spotify', 403, 'Private playlist.'); + user = await userToken(); + if (!user) throw new ApiError('Spotify', 403, 'Playlist contents need a user token.'); + } + const modern = metadata.items !== undefined || user !== null; let page = record(modern ? metadata.items : metadata.tracks); let offset = 0; const tracks: SpotifyTrack[] = []; @@ -146,7 +167,8 @@ export async function getSpotifyMetadata( if (!Array.isArray(page.items)) page = await spotify( fetchFn, - `${resource}/${input.id}/${modern ? 'items' : 'tracks'}?limit=50&offset=${offset}` + `${resource}/${input.id}/${modern ? 'items' : 'tracks'}?limit=50&offset=${offset}`, + user ); if (!Array.isArray(page.items)) throw new ApiError( @@ -181,7 +203,7 @@ export async function getSpotifyMetadata( error.status, input.kind === 'album' ? 'Spotify album unavailable or not found. Try an individual track.' - : 'Spotify playlist unavailable or private, or this application does not have playlist access. Try a public playlist or an individual track.' + : "Spotify only lets this site read playlists that Stan owns (Spotify's 2026 API limits for small apps). Try a track or album link, or one of the quick lists below." ); throw error; } diff --git a/src/routes/projects/spotify-beatmap-finder/+page.server.ts b/src/routes/projects/spotify-beatmap-finder/+page.server.ts index 93b7d2b..5dcfdbe 100644 --- a/src/routes/projects/spotify-beatmap-finder/+page.server.ts +++ b/src/routes/projects/spotify-beatmap-finder/+page.server.ts @@ -1,37 +1,64 @@ -import type { Actions } from './$types'; +import type { Actions, PageServerLoad } from './$types'; import { fail } from '@sveltejs/kit'; -import { parseSpotifyInput } from '#lib/map-finder/input.js'; -import type { TrackMatchResult } from '#lib/map-finder/types.js'; +import { parseSpotifyInput, parseArtistTitle } from '#lib/map-finder/input.js'; +import type { SpotifyCollection, SpotifyTrack, TrackMatchResult } from '#lib/map-finder/types.js'; import { getSpotifyMetadata } from '#lib/server/spotify.js'; -import { getOsuMaps, MATCH_CONCURRENCY } from '#lib/server/osu.js'; +import { getOsuMaps, MATCH_CONCURRENCY, osuConfigured, type MatchStore } from '#lib/server/osu.js'; import { ApiError, publicError, logApiError, mapConcurrent } from '#lib/server/finder-http.js'; import { acquireSearch } from '#lib/server/finder-limit.js'; +import { isOwner } from '#lib/server/owner.js'; +import type { Source } from '#lib/server/map-finder/sources.js'; + +// Loaded lazily so the action stays testable without a database. +const server = () => import('./finder.server'); + +export const load: PageServerLoad = async ({ locals }) => { + const owner = isOwner({ locals }); + const { availability } = await server(); + return { ...(await availability(owner)), owner }; +}; + +type Found = { tracks: SpotifyTrack[]; collection?: SpotifyCollection; truncated: boolean }; + export const actions: Actions = { - default: async ({ request, fetch, getClientAddress }) => { + default: async ({ request, fetch, getClientAddress, locals }) => { const data = await request.formData(); const value = data.get('query'); + const sourceValue = data.get('source'); const query = typeof value === 'string' ? value.trim().slice(0, 501) : ''; - let input; - try { - input = parseSpotifyInput(query); - } catch (error) { - return fail(400, { query, error: (error as Error).message }); - } - if (input.kind === 'unsupported') - return fail(400, { - query, - error: `Unsupported Spotify resource: ${input.resource}. Use a track, playlist, or album.` - }); + const owner = isOwner({ locals }); + // Database-backed helpers (quick lists, the osu! result cache); optional for plain searches. + const srv = await server().catch(() => null); + const source: Source | null = srv && srv.isSource(sourceValue) ? sourceValue : null; + if (sourceValue && !source) return fail(400, { query, error: 'Unknown list.' }); + let input: ReturnType | null = null; + if (!source) { + try { + input = parseSpotifyInput(query); + } catch (error) { + return fail(400, { query, error: (error as Error).message }); + } + if (input.kind === 'unsupported') + return fail(400, { + query, + error: `Unsupported Spotify resource: ${input.resource}. Use a track, playlist, or album.` + }); + } else if (srv!.SOURCES[source].owner && !owner) + return fail(404, { query, error: 'Not found.' }); + if (!osuConfigured()) + return fail(503, { query, error: 'osu! is not configured on this server.' }); let address: string; try { address = getClientAddress(); } catch { address = 'shared-unknown'; } - const release = acquireSearch( - address, - input.kind === 'playlist' || input.kind === 'album' ? 6 : 1 - ); + const cost = source + ? srv!.SOURCES[source].cost + : input!.kind === 'playlist' || input!.kind === 'album' + ? 6 + : 1; + const release = acquireSearch(address, cost); if (!release) return fail(429, { query, @@ -39,13 +66,30 @@ export const actions: Actions = { 'Site search limit reached. Wait up to 10 minutes, and finish any pending search before trying again.' }); try { - const metadata = await getSpotifyMetadata(fetch, input); + let found: Found; + if (source) found = { ...(await srv!.getSourceTracks(source)), truncated: false }; + else if (input!.kind === 'search') { + // Spotify search gives canonical names and artwork; "Artist - Title" works without it. + const typed = parseArtistTitle(query); + try { + found = await getSpotifyMetadata(fetch, input!, { owner }); + } catch (error) { + if (!typed || !(error instanceof ApiError)) throw error; + found = { tracks: [typed], truncated: false }; + } + } else + found = await getSpotifyMetadata( + fetch, + input as Exclude, + { owner } + ); + const store: MatchStore | undefined = srv?.matchStore; const results = await mapConcurrent( - metadata.tracks, + found.tracks, MATCH_CONCURRENCY, async (track): Promise => { try { - const matches = await getOsuMaps(fetch, track); + const matches = await getOsuMaps(fetch, track, store); return { track, matches, @@ -57,16 +101,40 @@ export const actions: Actions = { } } ); - return { query, results, collection: metadata.collection, truncated: metadata.truncated }; + if (source && !results.length) + return fail(404, { + query, + source, + error: + source === 'now' + ? 'Nothing is playing and no plays are recorded yet.' + : 'No tracks in this list yet. The listening history fills up once Spotify is connected.' + }); + return { + query, + source, + results, + collection: found.collection, + truncated: found.truncated + }; } catch (error) { logApiError(error); + const spotifyMissing = + error instanceof ApiError && error.provider === 'Spotify' && error.status === 503; return fail( error instanceof ApiError && error.status === 429 ? 429 : error instanceof ApiError && [403, 404].includes(error.status) ? 404 : 502, - { query, error: publicError(error) } + { + query, + source, + error: + spotifyMissing && input?.kind === 'search' + ? 'Spotify search is unavailable right now. Type it as "Artist - Title" to search osu! directly.' + : publicError(error) + } ); } finally { release(); diff --git a/src/routes/projects/spotify-beatmap-finder/+page.svelte b/src/routes/projects/spotify-beatmap-finder/+page.svelte index b90531c..0f3dc5b 100644 --- a/src/routes/projects/spotify-beatmap-finder/+page.svelte +++ b/src/routes/projects/spotify-beatmap-finder/+page.svelte @@ -1,102 +1,237 @@
-

Spotify Map Finder

+

osu! map finder

+

+ Find osu! beatmaps for a song, a Spotify link, or the music I have been listening to. +

+ {#if !data.configured.osu} + + {:else if !data.configured.spotify} +

+ Spotify links are unavailable right now. Type a song as Artist - Title instead. +

+ {/if}
{ - pending = true; + aria-busy={!!pending} + use:enhance={({ submitter }) => { + pending = submitter?.getAttribute('value') || 'search'; return async ({ update }) => { try { - filter = 'all'; + show = 'all'; await update({ reset: false }); } finally { - pending = false; + pending = null; } }; }} > - +
+ + +

- Search a song, or enter a Spotify track, playlist or album URL/URI. Up to 50 tracks. + A song (Artist - Title works best), or a Spotify track, album or playlist (up to 50 tracks). + Spotify only shares the contents of my own playlists with this site.

- +
+ or maps for my + {#each data.sources as source (source.key)} + + {/each} +
{#if pending}

- Searching for maps. Playlists and albums may take a few minutes. + Searching osu! for maps. Lists and playlists can take a minute the first time; results are + cached after that.

{/if}
{#if form?.error}{/if} - {#if form?.results} -
- {#if form.collection} +
+ Filter maps + + + + + {#if !isDefault(filters)}{/if} +
+ + {#if form && 'results' in form && form.results} +
+ {#if collection}
- + {#if collection.image}{/if}
-

{form.collection.name}

- {#if form.collection.owner}

- {form.collection.owner} +

{collection.name}

+ {#if collection.owner}

+ {collection.owner}

{/if} -

{results.length} tracks processed · {matched} matched

- Open in Spotify +

{results.length} tracks · {matched} with a match

+ {#if spotifyLink(collection.id, collection.kind)}Open in Spotify{/if}
{#if form.truncated}

Showing the first {results.length} usable tracks. The collection reached the processing limit.

{/if} + {/if} + {#if results.length > 1} @@ -108,6 +243,8 @@

{/if}
    {#each visible as result (result.track.id)} + {@const good = result.shown.filter((map) => map.confidence !== 'low')} + {@const low = result.shown.filter((map) => map.confidence === 'low')}
  • @@ -116,36 +253,36 @@ {result.track.artists.map((artist) => artist.name).join(', ')} – {result.track .name} -

    {result.track.album.name}

    - Open in Spotify +

    + {[result.track.album.name, result.track.note].filter(Boolean).join(' · ')} +

    + {#if result.track.url}Open in Spotify{/if}
{#if result.status === 'error'}

{result.error}

{:else} - {#if result.status === 'no_match'}

- No confident match found. + {#if !good.length}

+ {result.matches.some((m) => m.confidence !== 'low') + ? 'Matches exist, but none pass the filters.' + : 'No confident match found.'}

{/if}
    - {#each result.matches.filter((map) => map.confidence !== 'low') as map (map.id)}
  • - + {#each good as map (map.id)}
  • +
  • {/each}
- {#if result.matches.some((map) => map.confidence === 'low')} + {#if low.length}
Low-confidence candidates ({result.matches.filter( - (map) => map.confidence === 'low' - ).length})Low-confidence candidates ({low.length})
    - {#each result.matches.filter((map) => map.confidence === 'low') as map (map.id)}
  • - + {#each low as map (map.id)}
  • +
  • {/each}
diff --git a/src/routes/projects/spotify-beatmap-finder/action.test.ts b/src/routes/projects/spotify-beatmap-finder/action.test.ts index 1b17f6b..1de35c4 100644 --- a/src/routes/projects/spotify-beatmap-finder/action.test.ts +++ b/src/routes/projects/spotify-beatmap-finder/action.test.ts @@ -1,17 +1,29 @@ import { expect, it, vi } from 'vitest'; vi.mock('#lib/server/spotify.js', () => ({ getSpotifyMetadata: vi.fn() })); -vi.mock('#lib/server/osu.js', () => ({ getOsuMaps: vi.fn(), MATCH_CONCURRENCY: 3 })); +vi.mock('#lib/server/osu.js', () => ({ + getOsuMaps: vi.fn(), + osuConfigured: () => true, + MATCH_CONCURRENCY: 3 +})); +vi.mock('./finder.server', () => ({ + isSource: (value: unknown) => value === 'top', + SOURCES: { top: { label: 'top tracks', cost: 6, owner: false } }, + getSourceTracks: vi.fn(async () => ({ tracks: [], collection: undefined })), + matchStore: undefined +})); import { actions } from './+page.server'; import { getSpotifyMetadata } from '#lib/server/spotify.js'; import { getOsuMaps } from '#lib/server/osu.js'; import type { RequestEvent } from './$types'; -const event = (query: string, address = 'validation-test') => { +const event = (query: string, address = 'validation-test', source?: string) => { const data = new FormData(); data.set('query', query); + if (source) data.set('source', source); return { request: new Request('https://site.test', { method: 'POST', body: data }), fetch: vi.fn(), - getClientAddress: () => address + getClientAddress: () => address, + locals: { user: null } } as unknown as RequestEvent; }; it.each(['', 'spotify:track:bad', 'https://open.spotify.com/artist/6PUzxtIHkv346yP89NzP9X'])( @@ -59,3 +71,20 @@ it('returns site-level 429 after the per-client budget is exhausted', async () = data: { query: 'Song', error: expect.stringContaining('Site search limit') } }); }); + +it('falls back to a typed "Artist - Title" when Spotify is unavailable', async () => { + const { ApiError } = await import('#lib/server/finder-http.js'); + vi.mocked(getSpotifyMetadata).mockRejectedValueOnce( + new ApiError('Spotify', 503, 'Spotify is not configured on this server.') + ); + vi.mocked(getOsuMaps).mockResolvedValueOnce([]); + const result = await actions.default(event('Camellia - Ghost', 'typed-test')); + expect(result).toMatchObject({ + results: [{ track: { name: 'Ghost', artists: [{ name: 'Camellia' }] }, status: 'no_match' }] + }); +}); + +it('rejects unknown quick lists and reports empty ones', async () => { + expect(await actions.default(event('', 'source-test', 'nope'))).toMatchObject({ status: 400 }); + expect(await actions.default(event('', 'source-test', 'top'))).toMatchObject({ status: 404 }); +}); diff --git a/src/routes/projects/spotify-beatmap-finder/finder.server.ts b/src/routes/projects/spotify-beatmap-finder/finder.server.ts new file mode 100644 index 0000000..f930216 --- /dev/null +++ b/src/routes/projects/spotify-beatmap-finder/finder.server.ts @@ -0,0 +1,32 @@ +import { client as sql } from '#lib/server/db/index.js'; +import { osuConfigured } from '#lib/server/osu.js'; +import { SPOTIFY_CLIENT_ID, SPOTIFY_CLIENT_SECRET } from '$app/env/private'; +import { SOURCES, type Source } from '#lib/server/map-finder/sources.js'; +export { isSource, SOURCES, getSourceTracks } from '#lib/server/map-finder/sources.js'; +export { matchStore } from '#lib/server/map-finder/cache.js'; + +/** Which quick lists can work right now (the page greys out the others). */ +export async function availability(owner: boolean) { + const [row] = await sql` + select exists (select 1 from music.plays) as history, + exists (select 1 from music.spotify_auth where not needs_reauth) as connected, + (select scope from music.spotify_auth where id = 1) as scope`.catch(() => [ + { history: false, connected: false, scope: null } + ]); + const spotify = !!(SPOTIFY_CLIENT_ID && SPOTIFY_CLIENT_SECRET); + const connected = spotify && !!row.connected; + const scopes = typeof row.scope === 'string' ? row.scope.split(' ') : []; + const sources = (Object.entries(SOURCES) as [Source, (typeof SOURCES)[Source]][]) + .filter(([, s]) => !s.owner || owner) + .map(([key, s]) => ({ + key, + label: s.label, + available: + key === 'spotify-top' + ? connected + : key === 'liked' + ? connected && scopes.includes('user-library-read') + : !!row.history + })); + return { sources, configured: { spotify, osu: osuConfigured(), connected } }; +}