ui, server handling improvements

This commit is contained in:
2024-12-23 18:47:22 -08:00
parent 32927dfd55
commit 03fb89dc8b
12 changed files with 106 additions and 115 deletions

View File

@@ -26,7 +26,7 @@ export const ipAllocations = sqliteTable('ip_allocations', {
// unique for now, only allowing one allocation per client
clientId: integer('client_id')
.unique()
.references(() => wgClients.id),
.references(() => wgClients.id, { onDelete: 'set null' }),
});
export const wgClients = sqliteTable('wg_clients', {