{ "version": "5", "dialect": "mysql", "id": "d90c2144-2349-4a3f-b4f3-87b5ab209936", "prevId": "00000000-0000-0000-0000-000000000000", "tables": { "artists": { "name": "artists", "columns": { "id": { "name": "id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "slug": { "name": "slug", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "external_id": { "name": "external_id", "type": "int", "primaryKey": false, "notNull": false, "autoincrement": false }, "created_at": { "name": "created_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" }, "updated_at": { "name": "updated_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "artists_id": { "name": "artists_id", "columns": [ "id" ] } }, "uniqueConstraints": {} }, "artists_to_games": { "name": "artists_to_games", "columns": { "artist_id": { "name": "artist_id", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "game_id": { "name": "game_id", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, "categories": { "name": "categories", "columns": { "id": { "name": "id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "slug": { "name": "slug", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "external_id": { "name": "external_id", "type": "int", "primaryKey": false, "notNull": false, "autoincrement": false }, "created_at": { "name": "created_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" }, "updated_at": { "name": "updated_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "categories_id": { "name": "categories_id", "columns": [ "id" ] } }, "uniqueConstraints": {} }, "categories_to_games": { "name": "categories_to_games", "columns": { "category_id": { "name": "category_id", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "game_id": { "name": "game_id", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, "collection_items": { "name": "collection_items", "columns": { "id": { "name": "id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "collection_id": { "name": "collection_id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "game_id": { "name": "game_id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "created_at": { "name": "created_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" }, "updated_at": { "name": "updated_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" } }, "indexes": {}, "foreignKeys": { "collection_items_collection_id_collections_id_fk": { "name": "collection_items_collection_id_collections_id_fk", "tableFrom": "collection_items", "tableTo": "collections", "columnsFrom": [ "collection_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "collection_items_game_id_games_id_fk": { "name": "collection_items_game_id_games_id_fk", "tableFrom": "collection_items", "tableTo": "games", "columnsFrom": [ "game_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": { "collection_items_id": { "name": "collection_items_id", "columns": [ "id" ] } }, "uniqueConstraints": {} }, "collections": { "name": "collections", "columns": { "id": { "name": "id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "user_id": { "name": "user_id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "created_at": { "name": "created_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" }, "updated_at": { "name": "updated_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" } }, "indexes": {}, "foreignKeys": { "collections_user_id_users_id_fk": { "name": "collections_user_id_users_id_fk", "tableFrom": "collections", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": { "collections_id": { "name": "collections_id", "columns": [ "id" ] } }, "uniqueConstraints": {} }, "designers": { "name": "designers", "columns": { "id": { "name": "id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "slug": { "name": "slug", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "external_id": { "name": "external_id", "type": "int", "primaryKey": false, "notNull": false, "autoincrement": false }, "created_at": { "name": "created_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" }, "updated_at": { "name": "updated_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "designers_id": { "name": "designers_id", "columns": [ "id" ] } }, "uniqueConstraints": {} }, "designers_to_games": { "name": "designers_to_games", "columns": { "designer_id": { "name": "designer_id", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "game_id": { "name": "game_id", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, "expansions": { "name": "expansions", "columns": { "id": { "name": "id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "base_game_id": { "name": "base_game_id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "game_id": { "name": "game_id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "created_at": { "name": "created_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" }, "updated_at": { "name": "updated_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" } }, "indexes": {}, "foreignKeys": { "expansions_base_game_id_games_id_fk": { "name": "expansions_base_game_id_games_id_fk", "tableFrom": "expansions", "tableTo": "games", "columnsFrom": [ "base_game_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "expansions_game_id_games_id_fk": { "name": "expansions_game_id_games_id_fk", "tableFrom": "expansions", "tableTo": "games", "columnsFrom": [ "game_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": { "expansions_id": { "name": "expansions_id", "columns": [ "id" ] } }, "uniqueConstraints": {} }, "games": { "name": "games", "columns": { "id": { "name": "id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "slug": { "name": "slug", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "year_published": { "name": "year_published", "type": "year", "primaryKey": false, "notNull": false, "autoincrement": false }, "min_players": { "name": "min_players", "type": "int", "primaryKey": false, "notNull": false, "autoincrement": false }, "max_players": { "name": "max_players", "type": "int", "primaryKey": false, "notNull": false, "autoincrement": false }, "playtime": { "name": "playtime", "type": "int", "primaryKey": false, "notNull": false, "autoincrement": false }, "min_playtime": { "name": "min_playtime", "type": "int", "primaryKey": false, "notNull": false, "autoincrement": false }, "max_playtime": { "name": "max_playtime", "type": "int", "primaryKey": false, "notNull": false, "autoincrement": false }, "min_age": { "name": "min_age", "type": "int", "primaryKey": false, "notNull": false, "autoincrement": false }, "image_url": { "name": "image_url", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "thumb_url": { "name": "thumb_url", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "url": { "name": "url", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "external_id": { "name": "external_id", "type": "int", "primaryKey": false, "notNull": false, "autoincrement": false }, "last_sync_at": { "name": "last_sync_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false }, "created_at": { "name": "created_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" }, "updated_at": { "name": "updated_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "games_id": { "name": "games_id", "columns": [ "id" ] } }, "uniqueConstraints": { "games_external_id_unique": { "name": "games_external_id_unique", "columns": [ "external_id" ] } } }, "mechanics": { "name": "mechanics", "columns": { "id": { "name": "id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "slug": { "name": "slug", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "external_id": { "name": "external_id", "type": "int", "primaryKey": false, "notNull": false, "autoincrement": false }, "created_at": { "name": "created_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" }, "updated_at": { "name": "updated_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "mechanics_id": { "name": "mechanics_id", "columns": [ "id" ] } }, "uniqueConstraints": {} }, "mechanics_to_games": { "name": "mechanics_to_games", "columns": { "mechanic_id": { "name": "mechanic_id", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "game_id": { "name": "game_id", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, "publishers": { "name": "publishers", "columns": { "id": { "name": "id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "slug": { "name": "slug", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "external_id": { "name": "external_id", "type": "int", "primaryKey": false, "notNull": false, "autoincrement": false }, "created_at": { "name": "created_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" }, "updated_at": { "name": "updated_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "publishers_id": { "name": "publishers_id", "columns": [ "id" ] } }, "uniqueConstraints": {} }, "publishers_to_games": { "name": "publishers_to_games", "columns": { "publisher_id": { "name": "publisher_id", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "game_id": { "name": "game_id", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, "roles": { "name": "roles", "columns": { "id": { "name": "id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "roles_id": { "name": "roles_id", "columns": [ "id" ] } }, "uniqueConstraints": { "roles_name_unique": { "name": "roles_name_unique", "columns": [ "name" ] } } }, "sessions": { "name": "sessions", "columns": { "id": { "name": "id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "user_id": { "name": "user_id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "expires_at": { "name": "expires_at", "type": "datetime", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": {}, "foreignKeys": { "sessions_user_id_users_id_fk": { "name": "sessions_user_id_users_id_fk", "tableFrom": "sessions", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": { "sessions_id": { "name": "sessions_id", "columns": [ "id" ] } }, "uniqueConstraints": {} }, "user_roles": { "name": "user_roles", "columns": { "id": { "name": "id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "user_id": { "name": "user_id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "role_id": { "name": "role_id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "created_at": { "name": "created_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" }, "updated_at": { "name": "updated_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" } }, "indexes": {}, "foreignKeys": { "user_roles_user_id_users_id_fk": { "name": "user_roles_user_id_users_id_fk", "tableFrom": "user_roles", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "user_roles_role_id_roles_id_fk": { "name": "user_roles_role_id_roles_id_fk", "tableFrom": "user_roles", "tableTo": "roles", "columnsFrom": [ "role_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": { "user_roles_id": { "name": "user_roles_id", "columns": [ "id" ] } }, "uniqueConstraints": {} }, "users": { "name": "users", "columns": { "id": { "name": "id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "username": { "name": "username", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "hashed_password": { "name": "hashed_password", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "email": { "name": "email", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "first_name": { "name": "first_name", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "last_name": { "name": "last_name", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "verified": { "name": "verified", "type": "boolean", "primaryKey": false, "notNull": false, "autoincrement": false, "default": false }, "receive_email": { "name": "receive_email", "type": "boolean", "primaryKey": false, "notNull": false, "autoincrement": false, "default": false }, "theme": { "name": "theme", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "'system'" }, "created_at": { "name": "created_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" }, "updated_at": { "name": "updated_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "users_id": { "name": "users_id", "columns": [ "id" ] } }, "uniqueConstraints": { "users_username_unique": { "name": "users_username_unique", "columns": [ "username" ] }, "users_email_unique": { "name": "users_email_unique", "columns": [ "email" ] } } }, "wishlist_items": { "name": "wishlist_items", "columns": { "id": { "name": "id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "wishlist_id": { "name": "wishlist_id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "game_id": { "name": "game_id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "created_at": { "name": "created_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" }, "updated_at": { "name": "updated_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" } }, "indexes": {}, "foreignKeys": { "wishlist_items_wishlist_id_wishlists_id_fk": { "name": "wishlist_items_wishlist_id_wishlists_id_fk", "tableFrom": "wishlist_items", "tableTo": "wishlists", "columnsFrom": [ "wishlist_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "wishlist_items_game_id_games_id_fk": { "name": "wishlist_items_game_id_games_id_fk", "tableFrom": "wishlist_items", "tableTo": "games", "columnsFrom": [ "game_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": { "wishlist_items_id": { "name": "wishlist_items_id", "columns": [ "id" ] } }, "uniqueConstraints": {} }, "wishlists": { "name": "wishlists", "columns": { "id": { "name": "id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "user_id": { "name": "user_id", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "created_at": { "name": "created_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" }, "updated_at": { "name": "updated_at", "type": "datetime", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(now(6))" } }, "indexes": {}, "foreignKeys": { "wishlists_user_id_users_id_fk": { "name": "wishlists_user_id_users_id_fk", "tableFrom": "wishlists", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": { "wishlists_id": { "name": "wishlists_id", "columns": [ "id" ] } }, "uniqueConstraints": {} } }, "schemas": {}, "_meta": { "schemas": {}, "tables": {}, "columns": {} } }