Skip to content

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

merge two migrations into one

x8a15a5a9d409
diff --git a/backend/src/db/migrations/20260701000000_pam-discovery.ts b/backend/src/db/migrations/20260701000000_pam-discovery.ts
index 79ebba4558..3e36ce895d 100644
--- a/backend/src/db/migrations/20260701000000_pam-discovery.ts
+++ b/backend/src/db/migrations/20260701000000_pam-discovery.ts
@@ -51,6 +51,7 @@ export async function up(knex: Knex): Promise<void> {
t.integer("discoveredCount").notNullable().defaultTo(0);
t.integer("newCount").notNullable().defaultTo(0);
t.text("errorMessage");
+ t.jsonb("machineErrors");
t.timestamp("startedAt");
t.timestamp("completedAt");
t.timestamps(true, true, true);
diff --git a/backend/src/db/migrations/20260703120000_pam-discovery-run-machine-errors.ts b/backend/src/db/migrations/20260703120000_pam-discovery-run-machine-errors.ts
deleted file mode 100644
index c754aac14d..0000000000
--- a/backend/src/db/migrations/20260703120000_pam-discovery-run-machine-errors.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Knex } from "knex";
-
-import { TableName } from "../schemas";
-
-export async function up(knex: Knex): Promise<void> {
- if (!(await knex.schema.hasColumn(TableName.PamDiscoverySourceRun, "machineErrors"))) {
- await knex.schema.alterTable(TableName.PamDiscoverySourceRun, (t) => {
- t.jsonb("machineErrors");
- });
- }
-}
-
-export async function down(knex: Knex): Promise<void> {
- if (await knex.schema.hasColumn(TableName.PamDiscoverySourceRun, "machineErrors")) {
- await knex.schema.alterTable(TableName.PamDiscoverySourceRun, (t) => {
- t.dropColumn("machineErrors");
- });
- }
-}