dbmigrator_psql 0.1.2 copy "dbmigrator_psql: ^0.1.2" to clipboard
dbmigrator_psql: ^0.1.2 copied to clipboard

PostgreSQL database migration library with file-based, versioned schema management supporting both upgrades and downgrades.

example/dbmigrator_psql_example.dart

import 'package:dbmigrator_psql/dbmigrator_psql.dart';
import 'package:postgres/postgres.dart';

void main() async {
  final conn = await Connection.open(
    Endpoint(host: 'localhost', database: 'test_db'),
    settings: ConnectionSettings(sslMode: SslMode.disable),
  );

  final res = await conn.migrator(options: PsqlMigrationOptions(path: './migrations')).migrate(version: '2.0.0');

  print(res.message); // "Migrated from 1.0.0 ➡ 2.0.0 in 3 seconds."
}
0
likes
160
points
136
downloads

Documentation

API reference

Publisher

verified publisherenfinity.dev

Weekly Downloads

PostgreSQL database migration library with file-based, versioned schema management supporting both upgrades and downgrades.

Repository (GitHub)
View/report issues

Topics

#database #migration #versioning #postgresql

License

BSD-3-Clause (license)

Dependencies

crypto, dbmigrator, postgres

More

Packages that depend on dbmigrator_psql