misc: addressed comments

This commit is contained in:
Sheen Capadngan
2025-09-09 03:42:52 +08:00
parent b7dcc10731
commit 18398457e0
14 changed files with 99 additions and 110 deletions
@@ -98,8 +98,10 @@ export async function up(knex: Knex): Promise<void> {
t.uuid("identityId");
t.foreign("identityId").references("id").inTable(TableName.Identity).onDelete("CASCADE");
t.string("name").notNullable().unique();
t.string("ip").notNullable();
t.string("name").notNullable();
t.string("host").notNullable();
t.unique(["orgId", "name"]);
});
await createOnUpdateTrigger(knex, TableName.Relay);
@@ -119,7 +121,9 @@ export async function up(knex: Knex): Promise<void> {
t.uuid("relayId");
t.foreign("relayId").references("id").inTable(TableName.Relay).onDelete("SET NULL");
t.string("name").notNullable().unique();
t.string("name").notNullable();
t.unique(["orgId", "name"]);
t.dateTime("heartbeat");
});
+1 -1
View File
@@ -14,7 +14,7 @@ export const RelaysSchema = z.object({
orgId: z.string().uuid().nullable().optional(),
identityId: z.string().uuid().nullable().optional(),
name: z.string(),
ip: z.string()
host: z.string()
});
export type TRelays = z.infer<typeof RelaysSchema>;