fix migration
This commit is contained in:
parent
ade8725c1e
commit
7c27a329e5
3 changed files with 11 additions and 11 deletions
|
@ -101,8 +101,7 @@ class ModelCommand extends Command {
|
||||||
..reset();
|
..reset();
|
||||||
|
|
||||||
if (argResults['migration']) {
|
if (argResults['migration']) {
|
||||||
deps.add(
|
deps.add(const MakerDependency('angel_migration', '^1.0.0-alpha'));
|
||||||
const MakerDependency('angel_migration', '^1.0.0-alpha'));
|
|
||||||
|
|
||||||
var migrationLib = new LibraryBuilder()
|
var migrationLib = new LibraryBuilder()
|
||||||
..addDirective(
|
..addDirective(
|
||||||
|
@ -129,7 +128,8 @@ class ModelCommand extends Command {
|
||||||
]);
|
]);
|
||||||
callback.addStatement(cascade);
|
callback.addStatement(cascade);
|
||||||
|
|
||||||
up.addStatement(reference('schema').invoke('create', [callback]));
|
up.addStatement(
|
||||||
|
reference('schema').invoke('create', [literal(tableName), callback]));
|
||||||
|
|
||||||
// down()
|
// down()
|
||||||
var down = new MethodBuilder('down', returnType: lib$core.$void);
|
var down = new MethodBuilder('down', returnType: lib$core.$void);
|
||||||
|
|
|
@ -3,7 +3,7 @@ import 'dart:convert';
|
||||||
import 'package:http/src/base_client.dart' as http;
|
import 'package:http/src/base_client.dart' as http;
|
||||||
import 'package:pub_semver/pub_semver.dart';
|
import 'package:pub_semver/pub_semver.dart';
|
||||||
|
|
||||||
final Version PACKAGE_VERSION = new Version(1, 1, 5, build: '1');
|
final Version PACKAGE_VERSION = new Version(1, 1, 5, build: '2');
|
||||||
Future<Version> fetchCurrentVersion(http.BaseClient client) async {
|
Future<Version> fetchCurrentVersion(http.BaseClient client) async {
|
||||||
var response =
|
var response =
|
||||||
await client.get('https://pub.dartlang.org/api/packages/angel_cli');
|
await client.get('https://pub.dartlang.org/api/packages/angel_cli');
|
||||||
|
|
|
@ -2,7 +2,7 @@ author: "Tobe O <thosakwe@gmail.com>"
|
||||||
description: "Command-line tools for the Angel framework."
|
description: "Command-line tools for the Angel framework."
|
||||||
homepage: "https://github.com/angel-dart/angel_cli"
|
homepage: "https://github.com/angel-dart/angel_cli"
|
||||||
name: "angel_cli"
|
name: "angel_cli"
|
||||||
version: 1.1.5+1
|
version: 1.1.5+2
|
||||||
dependencies:
|
dependencies:
|
||||||
# analyzer: "^0.29.0"
|
# analyzer: "^0.29.0"
|
||||||
args: ^0.13.4
|
args: ^0.13.4
|
||||||
|
|
Loading…
Reference in a new issue