Skip to content

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

Move migration to latest

Daniel Hougaard5b1f07a66125
diff --git a/backend/src/db/migrations/20240202093209_ghost_user.ts b/backend/src/db/migrations/20240202093209_ghost_user.ts
deleted file mode 100644
index ddfdbe8124..0000000000
--- a/backend/src/db/migrations/20240202093209_ghost_user.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { Knex } from "knex";
-
-import { ProjectVersion, TableName } from "../schemas";
-
-export async function up(knex: Knex): Promise<void> {
- const hasGhostUserColumn = await knex.schema.hasColumn(TableName.Users, "ghost");
- const hasProjectVersionColumn = await knex.schema.hasColumn(TableName.Project, "version");
-
- if (!hasGhostUserColumn) {
- await knex.schema.alterTable(TableName.Users, (t) => {
- t.boolean("ghost").defaultTo(false).notNullable();
- });
- }
-
- if (!hasProjectVersionColumn) {
- await knex.schema.alterTable(TableName.Project, (t) => {
- t.string("version").defaultTo(ProjectVersion.V1).notNullable();
- t.text("upgradeStatus").nullable();
- });
- }
-}
-
-export async function down(knex: Knex): Promise<void> {
- const hasGhostUserColumn = await knex.schema.hasColumn(TableName.Users, "ghost");
- const hasProjectVersionColumn = await knex.schema.hasColumn(TableName.Project, "version");
-
- if (hasGhostUserColumn) {
- await knex.schema.alterTable(TableName.Users, (t) => {
- t.dropColumn("ghost");
- });
- }
-
- if (hasProjectVersionColumn) {
- await knex.schema.alterTable(TableName.Project, (t) => {
- t.dropColumn("version");
- t.dropColumn("upgradeStatus");
- });
- }
-}