Skip to content

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

fix migrations

x032205064f3ff8f2cb
diff --git a/backend/src/db/migrations/20260219070359_pam-discovery.ts b/backend/src/db/migrations/20260219070359_pam-discovery.ts
index 207fc2fa38..8c9b178fb0 100644
--- a/backend/src/db/migrations/20260219070359_pam-discovery.ts
+++ b/backend/src/db/migrations/20260219070359_pam-discovery.ts
@@ -86,7 +86,7 @@ export async function up(knex: Knex): Promise<void> {
t.jsonb("data").notNullable();
t.string("source").notNullable(); // "discovery" or "manual"
- t.boolean("isRotationSyncEnabled").defaultTo(false);
+ t.boolean("isEnabled").defaultTo(false);
t.unique(["accountId", "resourceId", "dependencyType", "name"], {
indexName: "uidx_pam_account_dependency"
diff --git a/backend/src/db/migrations/20260317191255_rename-pam-dependency-is-enabled.ts b/backend/src/db/migrations/20260317191255_rename-pam-dependency-is-enabled.ts
new file mode 100644
index 0000000000..ea1c88aeae
--- /dev/null
+++ b/backend/src/db/migrations/20260317191255_rename-pam-dependency-is-enabled.ts
@@ -0,0 +1,21 @@
+import { Knex } from "knex";
+
+import { TableName } from "../schemas";
+
+export async function up(knex: Knex): Promise<void> {
+ const hasColumn = await knex.schema.hasColumn(TableName.PamAccountDependency, "isEnabled");
+ if (hasColumn) {
+ await knex.schema.alterTable(TableName.PamAccountDependency, (t) => {
+ t.renameColumn("isEnabled", "isRotationSyncEnabled");
+ });
+ }
+}
+
+export async function down(knex: Knex): Promise<void> {
+ const hasColumn = await knex.schema.hasColumn(TableName.PamAccountDependency, "isRotationSyncEnabled");
+ if (hasColumn) {
+ await knex.schema.alterTable(TableName.PamAccountDependency, (t) => {
+ t.renameColumn("isRotationSyncEnabled", "isEnabled");
+ });
+ }
+}