Migrations
Migrations are versioned schema changes. ide99 doesn't replace your migration framework (flyway, migrate, sqlx, prisma, alembic), but provides UI for viewing, applying, and rolling back if you keep migrations as .sql files in a repo.
Open
In the tab header: + New tab → Migrations. The panel opens with two sections: Files (files from the migrations directory) and Applied (what's already in the current database).
Connect a migrations directory
On first open, ide99 asks for the path to the directory with .sql files:
~/projects/my-app/db/migrations/
Conventions are detected automatically:
- Sequential:
001_init.sql, 002_add_orders.sql, ...
- Timestamp:
20260301120000_init.sql, 20260315090000_add_orders.sql, ...
- Up/Down pairs:
001_init.up.sql + 001_init.down.sql
Convention is determined by the first file.
Comparing with the database
ide99 compares files in the directory to the table where your framework keeps applied migrations:
| Framework |
Table |
flyway |
flyway_schema_history |
migrate (golang-migrate) |
schema_migrations |
sqlx (Rust) |
_sqlx_migrations |
prisma |
_prisma_migrations |
alembic |
alembic_version |
node-pg-migrate |
pgmigrations |
If yours isn't on the list — set the table name manually in Settings → Migrations table name.
After comparison, each file gets a status:
- ✓ Applied — in the DB and in the directory
- ↓ Pending — in the directory, not in the DB
- ⚠ Missing — in the DB, not in the directory (dangerous — did someone delete a file?)
- ✕ Mismatch — checksum in the DB doesn't match the file (file was edited after applying)
Apply pending
The Apply pending button runs all ↓-migrations in order. Before each one:
- Shows the SQL preview
- Runs in a transaction (unless the file has
CREATE INDEX CONCURRENTLY or similar — those aren't transactional)
- On error stops, rolls back the transaction, shows the error
On prod: each migration requires confirmation by typing the file name.
Rollback
If a .down.sql exists — the Rollback button on an applied migration runs the down script.
Rolling back on prod is dangerous. ide99 requires triple confirmation: type the migration name, check "I understand the consequences", a button with a 3-second delay.
History
The Applied tab shows a table:
| When |
Migration |
Checksum |
Duration |
Applied by |
| 2026-05-22 12:13 |
001_init.sql |
a1b2c3 |
142 ms |
migrate |
| ... |
... |
... |
... |
... |
If applied_by exists in your framework's table — it's shown. Useful for audit.
Create a new migration
The + New migration button:
- Name — short description (
add_users_email_index)
- Type — Up / Up+Down pairs
- ide99 generates the file name per directory convention, opens an empty file in the editor
The file is saved to the migrations directory. From there — write SQL and Apply.
What it doesn't do
- Doesn't run migrations in CI — that's your framework's job. ide99 is just UI on top of the same table.
- Doesn't handle branching — migrations are linear. Merge conflicts are resolved as usual: rename a file or write a new migration on top.
Next
- Object Editor — create an object via form, then copy DDL into a migration.
- Backup —
pg_dump --schema-only for a snapshot before migrating.