{ "version": "6", "dialect": "sqlite", "id": "29e6fd88-fa47-4f79-ad83-c52538bc36a6", "prevId": "00000000-0000-0000-0000-000000000000", "tables": { "ip_allocations": { "name": "ip_allocations", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "client_id": { "name": "client_id", "type": "integer", "primaryKey": false, "notNull": false, "autoincrement": false } }, "indexes": { "ip_allocations_client_id_unique": { "name": "ip_allocations_client_id_unique", "columns": [ "client_id" ], "isUnique": true } }, "foreignKeys": { "ip_allocations_client_id_wg_clients_id_fk": { "name": "ip_allocations_client_id_wg_clients_id_fk", "tableFrom": "ip_allocations", "tableTo": "wg_clients", "columnsFrom": [ "client_id" ], "columnsTo": [ "id" ], "onDelete": "set null", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "sessions": { "name": "sessions", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "expires_at": { "name": "expires_at", "type": "integer", "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": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "users": { "name": "users", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "username": { "name": "username", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "wg_clients": { "name": "wg_clients", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "opnsense_id": { "name": "opnsense_id", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "public_key": { "name": "public_key", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "private_key": { "name": "private_key", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "pre_shared_key": { "name": "pre_shared_key", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false } }, "indexes": { "wg_clients_public_key_unique": { "name": "wg_clients_public_key_unique", "columns": [ "public_key" ], "isUnique": true } }, "foreignKeys": { "wg_clients_user_id_users_id_fk": { "name": "wg_clients_user_id_users_id_fk", "tableFrom": "wg_clients", "tableTo": "users", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} } }, "views": {}, "enums": {}, "_meta": { "schemas": {}, "tables": {}, "columns": {} }, "internal": { "indexes": {} } }