dox_migration 1.0.4 copy "dox_migration: ^1.0.4" to clipboard
dox_migration: ^1.0.4 copied to clipboard

Database migration package for Postgres SQL

Dox Migration #

Database migration package for Postgres SQL.

Usage #

Create migration file #

.sql file #

dox_migration create CreateUserTable --sql 

.dart file #

dox_migration create CreateUserTable --dart 

.dart file required dox query builder

Run migration and rollback #

.env sample #

DB_HOST=localhost
DB_PORT=5432
DB_NAME=dox_example_app
DB_USERNAME=admin
DB_PASSWORD=password

Migrate #

await Migration().migrate();

Rollback #

await Migration().rollback();

Without using .env #

PgEndpoint endPoint = PgEndpoint(
    host: 'localhost',
    port: 5432,
    database: 'postgres',
    username: 'postgres',
    password: 'postgres',
);
await Migration().migrate(endPoint: endPoint);
1
likes
140
points
101
downloads

Publisher

verified publisherdartondox.dev

Weekly Downloads

Database migration package for Postgres SQL

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

postgres_pool

More

Packages that depend on dox_migration