mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-17 04:33:01 +00:00
20 lines
568 B
TypeScript
20 lines
568 B
TypeScript
import { Knex } from "knex";
|
|
|
|
import { TableName } from "../schemas";
|
|
|
|
export async function up(knex: Knex): Promise<void> {
|
|
if (!(await knex.schema.hasColumn(TableName.AppConnection, "gatewayId"))) {
|
|
await knex.schema.alterTable(TableName.AppConnection, (t) => {
|
|
t.uuid("gatewayId").nullable();
|
|
});
|
|
}
|
|
}
|
|
|
|
export async function down(knex: Knex): Promise<void> {
|
|
if (await knex.schema.hasColumn(TableName.AppConnection, "gatewayId")) {
|
|
await knex.schema.alterTable(TableName.AppConnection, (t) => {
|
|
t.dropColumn("gatewayId");
|
|
});
|
|
}
|
|
}
|