Merge pull request #2327 from automatisch/folder-id-for-flows
feat: Add folderId column to the flow model
This commit is contained in:
@@ -0,0 +1,12 @@
|
|||||||
|
export async function up(knex) {
|
||||||
|
await knex.schema.table('flows', (table) => {
|
||||||
|
table.uuid('folder_id').references('id').inTable('folders').index();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function down(knex) {
|
||||||
|
await knex.schema.table('flows', (table) => {
|
||||||
|
table.dropIndex('folder_id');
|
||||||
|
table.dropColumn('folder_id');
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -12,6 +12,13 @@ exports[`Flow model > jsonSchema should have correct validations 1`] = `
|
|||||||
"deletedAt": {
|
"deletedAt": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
},
|
},
|
||||||
|
"folderId": {
|
||||||
|
"format": "uuid",
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null",
|
||||||
|
],
|
||||||
|
},
|
||||||
"id": {
|
"id": {
|
||||||
"format": "uuid",
|
"format": "uuid",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ class Flow extends Base {
|
|||||||
id: { type: 'string', format: 'uuid' },
|
id: { type: 'string', format: 'uuid' },
|
||||||
name: { type: 'string', minLength: 1 },
|
name: { type: 'string', minLength: 1 },
|
||||||
userId: { type: 'string', format: 'uuid' },
|
userId: { type: 'string', format: 'uuid' },
|
||||||
|
folderId: { type: ['string', 'null'], format: 'uuid' },
|
||||||
remoteWebhookId: { type: 'string' },
|
remoteWebhookId: { type: 'string' },
|
||||||
active: { type: 'boolean' },
|
active: { type: 'boolean' },
|
||||||
publishedAt: { type: 'string' },
|
publishedAt: { type: 'string' },
|
||||||
|
|||||||
Reference in New Issue
Block a user