wandel 2.0.3

  • Readme
  • Changelog
  • Installing
  • 66

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.3] - 2019-09-26

  • change sdk to bigger range

[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.3

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter 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 Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health issues and suggestions

Document public APIs. (-0.44 points)

52 out of 53 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/src/Connectors/WandelMySQLConnector.dart. (-2.48 points)

Analysis of lib/src/Connectors/WandelMySQLConnector.dart reported 5 hints:

line 16 col 23: Use = to separate a named parameter from its default value.

line 17 col 28: Use = to separate a named parameter from its default value.

line 18 col 18: Use = to separate a named parameter from its default value.

line 42 col 31: Use = to separate a named parameter from its default value.

line 59 col 29: Unnecessary new keyword.

Fix lib/wandel.dart. (-1.99 points)

Analysis of lib/wandel.dart reported 4 hints:

line 35 col 60: Use = to separate a named parameter from its default value.

line 49 col 70: Use = to separate a named parameter from its default value.

line 64 col 45: Unnecessary new keyword.

line 77 col 45: Unnecessary new keyword.

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.

Maintenance suggestions

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 <3.0.0
sqljocky5 ^2.0.0 2.2.1
Transitive dependencies
charcode 1.1.2
collection 1.14.12
convert 2.1.1
crypto 2.1.4
synchronized 1.5.3+2 2.1.1
typed_buffer 2.2.1
typed_data 1.1.6