feat: permission changes

This commit is contained in:
=
2025-02-26 20:45:38 +05:30
parent 55b1fbdf52
commit afd444cad6
11 changed files with 105 additions and 59 deletions
@@ -72,7 +72,10 @@ export async function up(knex: Knex): Promise<void> {
const doesGatewayColExist = await knex.schema.hasColumn(TableName.DynamicSecret, "gatewayId");
await knex.schema.alterTable(TableName.DynamicSecret, (t) => {
// not setting a foreign constraint so that cascade effects are not triggered
if (!doesGatewayColExist) t.uuid("gatewayId");
if (!doesGatewayColExist) {
t.uuid("gatewayId");
t.foreign("gatewayId").references("id").inTable(TableName.Identity);
}
});
}
}