{ "version": "6", "dialect": "sqlite", "id": "dc4861e0-d4dd-4c49-bcb1-fd4d5c4da8d4", "prevId": "00000000-0000-0000-0000-000000000000", "tables": { "daily_prices": { "name": "daily_prices", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "item_id": { "name": "item_id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "date": { "name": "date", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "open_value": { "name": "open_value", "type": "real", "primaryKey": false, "notNull": false, "autoincrement": false }, "close_value": { "name": "close_value", "type": "real", "primaryKey": false, "notNull": false, "autoincrement": false }, "high_value": { "name": "high_value", "type": "real", "primaryKey": false, "notNull": false, "autoincrement": false }, "low_value": { "name": "low_value", "type": "real", "primaryKey": false, "notNull": false, "autoincrement": false }, "avg_volume": { "name": "avg_volume", "type": "real", "primaryKey": false, "notNull": false, "autoincrement": false }, "chaos_rate": { "name": "chaos_rate", "type": "real", "primaryKey": false, "notNull": false, "autoincrement": false } }, "indexes": { "idx_daily_prices_item_date": { "name": "idx_daily_prices_item_date", "columns": [ "item_id", "date" ], "isUnique": true } }, "foreignKeys": { "daily_prices_item_id_items_id_fk": { "name": "daily_prices_item_id_items_id_fk", "tableFrom": "daily_prices", "tableTo": "items", "columnsFrom": [ "item_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "items": { "name": "items", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "external_id": { "name": "external_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "details_id": { "name": "details_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "league_id": { "name": "league_id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "category": { "name": "category", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "icon_url": { "name": "icon_url", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "created_at": { "name": "created_at", "type": "integer", "primaryKey": false, "notNull": false, "autoincrement": false } }, "indexes": { "idx_items_league_category": { "name": "idx_items_league_category", "columns": [ "league_id", "category" ], "isUnique": false }, "idx_items_external_league": { "name": "idx_items_external_league", "columns": [ "external_id", "league_id" ], "isUnique": true } }, "foreignKeys": { "items_league_id_leagues_id_fk": { "name": "items_league_id_leagues_id_fk", "tableFrom": "items", "tableTo": "leagues", "columnsFrom": [ "league_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "leagues": { "name": "leagues", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "display_name": { "name": "display_name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "start_date": { "name": "start_date", "type": "integer", "primaryKey": false, "notNull": false, "autoincrement": false }, "end_date": { "name": "end_date", "type": "integer", "primaryKey": false, "notNull": false, "autoincrement": false }, "is_active": { "name": "is_active", "type": "integer", "primaryKey": false, "notNull": false, "autoincrement": false, "default": true }, "created_at": { "name": "created_at", "type": "integer", "primaryKey": false, "notNull": false, "autoincrement": false } }, "indexes": { "leagues_name_unique": { "name": "leagues_name_unique", "columns": [ "name" ], "isUnique": true } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "price_history": { "name": "price_history", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "item_id": { "name": "item_id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "snapshot_id": { "name": "snapshot_id", "type": "integer", "primaryKey": false, "notNull": false, "autoincrement": false }, "divine_value": { "name": "divine_value", "type": "real", "primaryKey": false, "notNull": false, "autoincrement": false }, "volume": { "name": "volume", "type": "real", "primaryKey": false, "notNull": false, "autoincrement": false }, "change_7d": { "name": "change_7d", "type": "real", "primaryKey": false, "notNull": false, "autoincrement": false }, "sparkline_data": { "name": "sparkline_data", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "exalted_rate": { "name": "exalted_rate", "type": "real", "primaryKey": false, "notNull": false, "autoincrement": false }, "chaos_rate": { "name": "chaos_rate", "type": "real", "primaryKey": false, "notNull": false, "autoincrement": false }, "recorded_at": { "name": "recorded_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": { "idx_price_history_item_recorded": { "name": "idx_price_history_item_recorded", "columns": [ "item_id", "recorded_at" ], "isUnique": false }, "idx_price_history_snapshot": { "name": "idx_price_history_snapshot", "columns": [ "snapshot_id" ], "isUnique": false } }, "foreignKeys": { "price_history_item_id_items_id_fk": { "name": "price_history_item_id_items_id_fk", "tableFrom": "price_history", "tableTo": "items", "columnsFrom": [ "item_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "price_history_snapshot_id_snapshots_id_fk": { "name": "price_history_snapshot_id_snapshots_id_fk", "tableFrom": "price_history", "tableTo": "snapshots", "columnsFrom": [ "snapshot_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "snapshots": { "name": "snapshots", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "league_id": { "name": "league_id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "category": { "name": "category", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "scraped_at": { "name": "scraped_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "'pending'" }, "item_count": { "name": "item_count", "type": "integer", "primaryKey": false, "notNull": false, "autoincrement": false, "default": 0 }, "error_message": { "name": "error_message", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false } }, "indexes": {}, "foreignKeys": { "snapshots_league_id_leagues_id_fk": { "name": "snapshots_league_id_leagues_id_fk", "tableFrom": "snapshots", "tableTo": "leagues", "columnsFrom": [ "league_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} } }, "views": {}, "enums": {}, "_meta": { "schemas": {}, "tables": {}, "columns": {} }, "internal": { "indexes": {} } }