- 2.0.11Latest
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 2.0.0-rc5
- 2.0.0-rc4
- 2.0.0-rc3
- 2.0.0-rc2
- 2.0.0-rc1
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.3
- 1.1.2
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.4
- v1.0.2
- v1.0.1
- v1.0.0
- v1.0.0-rc3
- v1.0.0-rc2
- v1.0.0-rc1
- v0.6.0
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.3
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.0
- v0.1.0
- v0.0.3
- v.0.0.3
- v0.0.2
- v0.0.1
- 0.4.0
Nessie
A db migration tool for deno.
Status / Roadmap
Currently the cli can be used to create a migration file and to perform simple migrations and rollbacks
By using
Schema
you can generate a sql string which you can use to modify your databaseCLI communicates with db and tracks migrations using a table
CLI can rollback a migration
CLI can migrate and rollback multiple files (currently only migrate multiple files)
Add support for seed files
Rework the codebase to have a cleaner interface and chained opperations
Add support for soft deletes
Add support for env or settings file
Add tests
Supported databases
- PostgreSQL - in development
- MySQL - not started
- SQLite - not started
If you have a database system you would like to see in this list, feel free to make an issue or create a pr with your implementation.
Usage
- Create migration
deno run --allow-write --allow-read https://deno.land/x/nessie/cli.ts make create_users -p migrations
- Run migration (under construction, feel free to file any bugs you encounter)
deno run --allow-read --allow-net https://deno.land/x/nessie/cli.ts migrate -p migrations -c postgres://root:pwd@localhost:5000/nessie
- Rollback (under construction, feel free to file any bugs you encounter)
deno run --allow-net --allow-read https://deno.land/x/nessie/cli.ts migrate -p migrations -c postgres://root:pwd@localhost:5000/nessie
Contributing
I am looking for someone to help me out with this project, so feel free to make pr’s or create an issue!
Uses
Examples
Minimal example for a migration file
import { Schema } from "../mod.ts";
export const up = (scema: Schema): void => {
scema.create('users', table => {
table.id()
table.string('name', 100).nullable()
table.boolean('isTrue').default('false')
table.custom('custom_column int default 1')
table.timestamps()
})
};
export const down = (schema: Schema): void => {
schema.drop('users')
};
See example folder for more (under development)