{ "version": "6", "dialect": "sqlite", "id": "e977fded-def0-45ae-92e8-0aca8a9f29e0", "prevId": "00000000-0000-0000-0000-000000000000", "tables": { "battery_groups": { "name": "battery_groups", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "brand_id": { "name": "brand_id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "type_id": { "name": "type_id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "available_count": { "name": "available_count", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": 0 }, "charging_count": { "name": "charging_count", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": 0 }, "notes": { "name": "notes", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(datetime('now'))" }, "updated_at": { "name": "updated_at", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(datetime('now'))" } }, "indexes": { "brand_type_idx": { "name": "brand_type_idx", "columns": [ "brand_id", "type_id" ], "isUnique": true } }, "foreignKeys": { "battery_groups_brand_id_brands_id_fk": { "name": "battery_groups_brand_id_brands_id_fk", "tableFrom": "battery_groups", "tableTo": "brands", "columnsFrom": [ "brand_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "battery_groups_type_id_battery_types_id_fk": { "name": "battery_groups_type_id_battery_types_id_fk", "tableFrom": "battery_groups", "tableTo": "battery_types", "columnsFrom": [ "type_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "battery_types": { "name": "battery_types", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "is_custom": { "name": "is_custom", "type": "integer", "primaryKey": false, "notNull": false, "autoincrement": false, "default": false }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(datetime('now'))" } }, "indexes": { "battery_types_name_unique": { "name": "battery_types_name_unique", "columns": [ "name" ], "isUnique": true } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "brands": { "name": "brands", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(datetime('now'))" } }, "indexes": { "brands_name_unique": { "name": "brands_name_unique", "columns": [ "name" ], "isUnique": true } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "device_batteries": { "name": "device_batteries", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "device_id": { "name": "device_id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "battery_group_id": { "name": "battery_group_id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "quantity": { "name": "quantity", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": 1 }, "assigned_at": { "name": "assigned_at", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(datetime('now'))" } }, "indexes": { "device_battery_idx": { "name": "device_battery_idx", "columns": [ "device_id", "battery_group_id" ], "isUnique": true } }, "foreignKeys": { "device_batteries_device_id_devices_id_fk": { "name": "device_batteries_device_id_devices_id_fk", "tableFrom": "device_batteries", "tableTo": "devices", "columnsFrom": [ "device_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "device_batteries_battery_group_id_battery_groups_id_fk": { "name": "device_batteries_battery_group_id_battery_groups_id_fk", "tableFrom": "device_batteries", "tableTo": "battery_groups", "columnsFrom": [ "battery_group_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "devices": { "name": "devices", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(datetime('now'))" }, "updated_at": { "name": "updated_at", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false, "default": "(datetime('now'))" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} } }, "views": {}, "enums": {}, "_meta": { "schemas": {}, "tables": {}, "columns": {} }, "internal": { "indexes": {} } }