wandel 2.0.2

wandel #

The wandel lib is a migration lib for dart. The tool itself is not specifically related to databases but basically provides a clean API for running and rolling back tasks. It brings out of the box an MySqlConnector based on sqljocky5.

Installation #

Add it to your dependencies

  wandel: "^2.0.0"

and install the package

$ pub get

Usage #

Take a look into the example folder.

pub run example/basic/basic.dart

import 'package:wandel/wandel.dart';

import 'migrations/2018-01-18-task1.dart';
import 'migrations/2018-01-18-task2.dart';
import 'migrations/2018-01-18-task3.dart';

main() async {

    List<WandelMigration> migrations = [
        new MyWandelMigration1(),
        new MyWandelMigration2(),
        new MyWandelMigration3()

    Wandel wandel = new Wandel(
        migrations: migrations,
        connector: new WandelMySQLConnector(
            tableName       : '__migration',
            user            : 'username',
            password        : 'password',
            database        : 'databasename',
            host            : 'localhost',
            port            : 3306,
            maxConnections  : 5

    wandel.execute(mode: WANDEL_MODE.UP).then((List<WandelMigration> touchedList) {

Contributing #

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Credits #

Robert Beyer 4sternrb@googlemail.com

License #


Changelog #

All notable changes to this project will be documented in this file.

[2.0.2] - 2019-02-05

Bugfix #

  • using unix_timestamp() instead of now() for adding the creation-time value to new entries

[2.0.1] - 2019-01-05

Bugfix #

  • bugfix missing changes with the increased version of sqljocky

[2.0.0] - 2019-01-05

Change #

  • change to dart 2.1.0

[1.0.1] - 2018-01-26

Added #

  • analysis_option.yaml to enable better codestyle :)

Change #

  • reduce linter warnings up to zero

[1.0.0] - 2018-01-26

Added #

  • initial import of feature complete package
  • add changelog file

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  wandel: ^2.0.2

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:wandel/wandel.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Aug 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19


Detected platforms:

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running pub upgrade failed with the following output:

ERR: The current Dart SDK version is 2.4.0.
 Because wandel requires SDK version 2.1.0, version solving failed.

Health suggestions

Format lib/src/Connectors/WandelMySQLConnector.dart.

Run dartfmt to format lib/src/Connectors/WandelMySQLConnector.dart.

Format lib/src/WandelConnector.dart.

Run dartfmt to format lib/src/WandelConnector.dart.

Format lib/src/WandelMigration.dart.

Run dartfmt to format lib/src/WandelMigration.dart.

Format lib/wandel.dart.

Run dartfmt to format lib/wandel.dart.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Support the latest stable Dart SDK in pubspec.yaml. (-20 points)

The SDK constraint in pubspec.yaml doesn't allow the latest stable Dart SDK release.

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and wandel.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK 2.1.0