mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 06:35:21 +00:00
21 lines
601 B
TypeScript
21 lines
601 B
TypeScript
import { Knex } from "knex";
|
|
|
|
import { TableName } from "../schemas";
|
|
|
|
export async function up(knex: Knex): Promise<void> {
|
|
const isTablePresent = await knex.schema.hasTable(TableName.SuperAdmin);
|
|
if (isTablePresent) {
|
|
await knex.schema.alterTable(TableName.SuperAdmin, (t) => {
|
|
t.string("allowedSignUpDomain");
|
|
});
|
|
}
|
|
}
|
|
|
|
export async function down(knex: Knex): Promise<void> {
|
|
if (await knex.schema.hasColumn(TableName.SuperAdmin, "allowedSignUpDomain")) {
|
|
await knex.schema.alterTable(TableName.SuperAdmin, (t) => {
|
|
t.dropColumn("allowedSignUpDomain");
|
|
});
|
|
}
|
|
}
|