Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Fix: Improve create migration script
Daniel Hougaard1edebdf8a5f5
diff --git a/backend/scripts/create-migration.ts b/backend/scripts/create-migration.tsindex f4017b12b1..59040a37ac 100644--- a/backend/scripts/create-migration.ts+++ b/backend/scripts/create-migration.ts@@ -7,10 +7,10 @@ const prompt = promptSync({ sigint: true });const migrationName = prompt("Enter name for migration: ");+// Remove spaces from migration name and replace with hyphens+const formattedMigrationName = migrationName.replace(/\s+/g, "-");+execSync(- `npx knex migrate:make --knexfile ${path.join(- __dirname,- "../src/db/knexfile.ts"- )} -x ts ${migrationName}`,+ `npx knex migrate:make --knexfile ${path.join(__dirname, "../src/db/knexfile.ts")} -x ts ${formattedMigrationName}`,{ stdio: "inherit" });