Skip to content

Commit 5cd5f8c

Browse files
committed
Schema changes for Apps
refs #2465 - Add active field to app_fields - Adjust data generator for app fields
1 parent d386f66 commit 5cd5f8c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

core/server/data/schema.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ var db = {
148148
app_id: {type: 'integer', nullable: false, unsigned: true, references: 'apps.id'},
149149
relatable_id: {type: 'integer', nullable: false, unsigned: true},
150150
relatable_type: {type: 'string', maxlength: 150, nullable: false, defaultTo: 'posts'},
151+
active: {type: 'bool', nullable: false, defaultTo: true, validations: {'isIn': [[false, true]]}},
151152
created_at: {type: 'dateTime', nullable: false},
152153
created_by: {type: 'integer', nullable: false},
153154
updated_at: {type: 'dateTime', nullable: true},

core/test/utils/fixtures/data-generator.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,14 @@ DataGenerator.Content = {
128128
{
129129
key: 'count',
130130
value: '120',
131-
type: 'number'
131+
type: 'number',
132+
active: true
132133
},
133134
{
134135
key: 'words',
135136
value: '512',
136-
type: 'number'
137+
type: 'number',
138+
active: true
137139
}
138140
],
139141

@@ -246,6 +248,7 @@ DataGenerator.forKnex = (function () {
246248
uuid: uuid.v4(),
247249
created_by: 1,
248250
created_at: new Date(),
251+
active: true,
249252
app_id: 1,
250253
relatable_id: 1,
251254
relatable_type: 'posts'

0 commit comments

Comments
 (0)