Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

678 B
Raw Blame
import { Knex } from "knex";

import { TableName } from "@app/db/schemas";

export async function up(knex: Knex): Promise<void> {
  const hasProjectDescription = await knex.schema.hasColumn(TableName.SecretFolder, "description");

  if (!hasProjectDescription) {
    await knex.schema.alterTable(TableName.SecretFolder, (t) => {
      t.string("description");
    });
  }
}

export async function down(knex: Knex): Promise<void> {
  const hasProjectDescription = await knex.schema.hasColumn(TableName.SecretFolder, "description");

  if (hasProjectDescription) {
    await knex.schema.alterTable(TableName.SecretFolder, (t) => {
      t.dropColumn("description");
    });
  }
}