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": {
|
||||
"type": "string",
|
||||
},
|
||||
"folderId": {
|
||||
"format": "uuid",
|
||||
"type": [
|
||||
"string",
|
||||
"null",
|
||||
],
|
||||
},
|
||||
"id": {
|
||||
"format": "uuid",
|
||||
"type": "string",
|
||||
|
||||
@@ -28,6 +28,7 @@ class Flow extends Base {
|
||||
id: { type: 'string', format: 'uuid' },
|
||||
name: { type: 'string', minLength: 1 },
|
||||
userId: { type: 'string', format: 'uuid' },
|
||||
folderId: { type: ['string', 'null'], format: 'uuid' },
|
||||
remoteWebhookId: { type: 'string' },
|
||||
active: { type: 'boolean' },
|
||||
publishedAt: { type: 'string' },
|
||||
|
||||
Reference in New Issue
Block a user