feat(backend): add enforcementLevel into access_approval_policies

This commit is contained in:
Alfonso Hernandez
2024-07-17 22:30:55 +02:00
parent a538e37a62
commit d4dd684f32
5 changed files with 37 additions and 9 deletions
@@ -0,0 +1,15 @@
import { Knex } from "knex";
import { EnforcementLevel } from "@app/lib/types";
export async function up(knex: Knex): Promise<void> {
await knex.schema.table("access_approval_policies", (table) => {
table.specificType("enforcementLevel", "VARCHAR(10)").notNullable().defaultTo(EnforcementLevel.Hard);
});
}
export async function down(knex: Knex): Promise<void> {
await knex.schema.table("access_approval_policies", (table) => {
table.dropColumn("enforcementLevel");
});
}