furlong 1.0.0-dev+4

  • README.md
  • Installing
  • Versions
  • 1

furlong

SQLJocky migration tool. Will eventually work with SQLJocky2.

Todo

  • Alterations
  • Model generators
  • Command-line executable
  • Grinder examples
  • More examples
  • Use inflection package for pluralization

Examples

class SongMigration extends Migration {
  @override
  String get name => "Songs table";

  @override
  Future create(Migrator migrator) async {
    await migrator.create("songs", (TableSchema table) {
      table.primaryKey = table.integer("id", autoIncrement: true);
      
      table.string("artist_id");
      table.string("title");
      table.string("desc").nullable = true;
      table.timeStamp("created_at");
      table.timeStamp("updated_at");
    });
  }

  @override
  Future destroy(Migrator migrator) async {
    await migrator.drop(["songs"]);
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  furlong: ^1.0.0-dev+4

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:furlong/furlong.dart';
  
Version Uploaded Documentation Archive
1.0.0-dev+4 Sep 21, 2016 Go to the documentation of furlong 1.0.0-dev+4 Download furlong 1.0.0-dev+4 archive
1.0.0-dev+3 Sep 21, 2016 Go to the documentation of furlong 1.0.0-dev+3 Download furlong 1.0.0-dev+3 archive
1.0.0-dev+2 Sep 21, 2016 Go to the documentation of furlong 1.0.0-dev+2 Download furlong 1.0.0-dev+2 archive
1.0.0-dev+1 Sep 20, 2016 Go to the documentation of furlong 1.0.0-dev+1 Download furlong 1.0.0-dev+1 archive
1.0.0-dev Sep 18, 2016 Go to the documentation of furlong 1.0.0-dev Download furlong 1.0.0-dev archive
Popularity:
Describes how popular the package is relative to other packages. [more]
3
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
1
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

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.0.0.
 
 Because furlong depends on sqljocky >=0.1.3 which requires SDK version <2.0.0, version solving failed.

Health suggestions

Format lib/furlong.dart.

Run dartfmt to format lib/furlong.dart.

Format lib/src/furlong.dart.

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

Format lib/src/migration.dart.

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

Fix additional 7 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/migrator.dart (Run dartfmt to format lib/src/migrator.dart.)
  • lib/src/mysql/date.dart (Run dartfmt to format lib/src/mysql/date.dart.)
  • lib/src/mysql/enumerator.dart (Run dartfmt to format lib/src/mysql/enumerator.dart.)
  • lib/src/mysql/int.dart (Run dartfmt to format lib/src/mysql/int.dart.)
  • lib/src/mysql/mysql_table_schema.dart (Run dartfmt to format lib/src/mysql/mysql_table_schema.dart.)
  • lib/src/mysql/string.dart (Run dartfmt to format lib/src/mysql/string.dart.)
  • lib/src/mysql/text.dart (Run dartfmt to format lib/src/mysql/text.dart.)

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Package is too old. (-100 points)

The package was released more than two years ago.

Maintain CHANGELOG.md. (-20 points)

Changelog entries help clients to follow the progress in your code.

Add SDK constraint in pubspec.yaml. (-5 points)

For information about setting SDK constraint, please see https://www.dartlang.org/tools/pub/pubspec#sdk-constraints.

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Package is pre-release. (-5 points)

Pre-release versions should be used with caution, their API may change in breaking ways.

Maintain an example.

None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use furlong.dart.