221 lines
5.2 KiB
JSON
221 lines
5.2 KiB
JSON
{
|
|
"version": "6",
|
|
"dialect": "sqlite",
|
|
"id": "48b7ce55-58f1-4b97-a144-ca733576dba6",
|
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
"tables": {
|
|
"devices": {
|
|
"name": "devices",
|
|
"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": {
|
|
"devices_public_key_unique": {
|
|
"name": "devices_public_key_unique",
|
|
"columns": [
|
|
"public_key"
|
|
],
|
|
"isUnique": true
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"devices_user_id_users_id_fk": {
|
|
"name": "devices_user_id_users_id_fk",
|
|
"tableFrom": "devices",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"checkConstraints": {}
|
|
},
|
|
"ip_allocations": {
|
|
"name": "ip_allocations",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"device_id": {
|
|
"name": "device_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"ip_allocations_device_id_unique": {
|
|
"name": "ip_allocations_device_id_unique",
|
|
"columns": [
|
|
"device_id"
|
|
],
|
|
"isUnique": true
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"ip_allocations_device_id_devices_id_fk": {
|
|
"name": "ip_allocations_device_id_devices_id_fk",
|
|
"tableFrom": "ip_allocations",
|
|
"tableTo": "devices",
|
|
"columnsFrom": [
|
|
"device_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": {}
|
|
}
|
|
},
|
|
"views": {},
|
|
"enums": {},
|
|
"_meta": {
|
|
"schemas": {},
|
|
"tables": {},
|
|
"columns": {}
|
|
},
|
|
"internal": {
|
|
"indexes": {}
|
|
}
|
|
} |