Fixes #10 - Don't use defaults for json fields in migration

This commit is contained in:
Jamie Curnow committed 2018-09-03 09:50:18 +10:00
1 parent 02b4def04a
commit bbe02bc70a
12 files changed
+105 -11

No files matched your search

+5
View File
@@ -14,6 +14,11 @@ class AccessList extends Model {
$beforeInsert () {
this.created_on = Model.raw('NOW()');
this.modified_on = Model.raw('NOW()');
// Default for meta
if (typeof this.meta === 'undefined') {
this.meta = {};
}
}
$beforeUpdate () {