Database migration and seeding package for GoSafe applications (v1.0.146). Provides CLI and programmatic API for running migrations, rollbacks, seeding, and resetting databases. Designed specifically for the GoSafe ecosystem with a shared database connection via Sequelize. Ships TypeScript types. Active development with frequent releases (146+ versions). Key differentiators: tightly integrated with GoSafe apps, simple CLI, and shared connection management.
npm install gs-migrationsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to programmatically run migrations and seeds using the package's main exports with a Sequelize connection.
Use ES module imports (import { ... } from 'gs-migrations') or set 'type':'module' in package.json if using Node.js < 16.Always call initializeDatabase() first and await its completion before using getSequelize().
Pass a Sequelize instance as first argument and optionally an options object as second.
Use import statement or set type: 'module' in your package.json and rename .js to .mjs if needed.
Use the sequelize instance you pass to runMigrations, or import initializeDatabase and getSequelize if they exist.
Set DB_USER, DB_PASS, DB_NAME, DB_HOST, DB_PORT environment variables correctly.