feat: added type for project and validation check for secret manager specific endpoints

This commit is contained in:
=
2024-12-06 14:58:48 +05:30
parent dc715cc238
commit 695c499448
23 changed files with 211 additions and 78 deletions

View File

@@ -0,0 +1,21 @@
import { Knex } from "knex";
import { TableName } from "../schemas";
export async function up(knex: Knex): Promise<void> {
const hasTypeColumn = await knex.schema.hasColumn(TableName.Project, "type");
if (!hasTypeColumn) {
await knex.schema.alterTable(TableName.Project, (t) => {
t.string("type");
});
}
}
export async function down(knex: Knex): Promise<void> {
const hasTypeColumn = await knex.schema.hasColumn(TableName.Project, "type");
if (hasTypeColumn) {
await knex.schema.alterTable(TableName.Project, (t) => {
t.dropColumn("type");
});
}
}