Fixed ORM analyzer error

This commit is contained in:
thomashii 2022-01-08 13:41:02 +08:00
parent 8adb18662d
commit f7b8d93a23
3 changed files with 2 additions and 25 deletions

View file

@ -1,6 +1,6 @@
import 'dart:async';
import 'package:angel3_migration/angel3_migration.dart';
//import 'package:angel3_migration/angel3_migration.dart';
import 'package:angel3_orm/angel3_orm.dart';
import 'package:angel3_serialize/angel3_serialize.dart';
import 'package:optional/optional.dart';

View file

@ -2,30 +2,6 @@
part of 'main.dart';
// **************************************************************************
// MigrationGenerator
// **************************************************************************
class EmployeeMigration extends Migration {
@override
void up(Schema schema) {
schema.create('employees', (table) {
table.serial('id').primaryKey();
table.timeStamp('created_at');
table.timeStamp('updated_at');
table.varChar('first_name', length: 255);
table.varChar('last_name', length: 255);
table.declareColumn(
'salary', Column(type: ColumnType('decimal'), length: 255));
});
}
@override
void down(Schema schema) {
schema.drop('employees');
}
}
// **************************************************************************
// OrmGenerator
// **************************************************************************

View file

@ -16,6 +16,7 @@ dev_dependencies:
angel3_model: ^3.0.0
angel3_serialize: ^4.1.0
angel3_serialize_generator: ^4.1.0
angel3_framework: ^4.2.0
build_runner: ^2.1.1
test: ^1.17.4
lints: ^1.0.0