diff --git a/angel_orm/lib/src/migration.dart b/angel_orm/lib/src/migration.dart index cf75c6c8..80620fdb 100644 --- a/angel_orm/lib/src/migration.dart +++ b/angel_orm/lib/src/migration.dart @@ -83,6 +83,7 @@ class ColumnType { static const ColumnType DATE = const ColumnType('date'); static const ColumnType TIME = const ColumnType('time'); static const ColumnType TIME_STAMP = const ColumnType('timestamp'); + static const ColumnType TIME_STAMP_WITH_TIME_ZONE = const ColumnType('timestamp with time zone'); // Strings static const ColumnType CHAR = const ColumnType('char'); diff --git a/angel_orm/pubspec.yaml b/angel_orm/pubspec.yaml index aa61b2ce..62df779c 100644 --- a/angel_orm/pubspec.yaml +++ b/angel_orm/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_orm -version: 1.0.0-alpha+8 +version: 1.0.0-alpha+9 description: Runtime support for Angel's ORM. author: Tobe O homepage: https://github.com/angel-dart/orm diff --git a/angel_orm_generator/lib/src/builder/orm/migration.dart b/angel_orm_generator/lib/src/builder/orm/migration.dart index b92f0692..b1407a49 100644 --- a/angel_orm_generator/lib/src/builder/orm/migration.dart +++ b/angel_orm_generator/lib/src/builder/orm/migration.dart @@ -177,6 +177,7 @@ class MigrationGenerator extends GeneratorForAnnotation { literal(relationship.foreignTable), literal(relationship.foreignKey), ]); + if (relationship.cascadeOnDelete != false && relationship.isSingular) ref = ref.invoke('onDeleteCascade', []); return closure.addStatement(ref);