chore: Add active column to flows
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
430f0d07e8
commit
02cfb979bc
@@ -0,0 +1,13 @@
|
||||
import { Knex } from "knex";
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
return knex.schema.table('flows', (table) => {
|
||||
table.boolean('active').defaultTo(false)
|
||||
});
|
||||
}
|
||||
|
||||
export async function down(knex: Knex): Promise<void> {
|
||||
return knex.schema.table('flows', (table) => {
|
||||
table.dropColumn('active');
|
||||
});
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
import { GraphQLList, GraphQLObjectType, GraphQLString, GraphQLInt } from 'graphql';
|
||||
import { GraphQLList, GraphQLObjectType, GraphQLString, GraphQLInt, GraphQLBoolean } from 'graphql';
|
||||
import StepType from './step';
|
||||
|
||||
const flowType = new GraphQLObjectType({
|
||||
@@ -6,6 +6,7 @@ const flowType = new GraphQLObjectType({
|
||||
fields: {
|
||||
id: { type: GraphQLInt },
|
||||
name: { type: GraphQLString },
|
||||
active: { type: GraphQLBoolean },
|
||||
steps: {
|
||||
type: GraphQLList(StepType),
|
||||
}
|
||||
|
@@ -4,6 +4,7 @@ import Step from './step'
|
||||
class Flow extends Base {
|
||||
id!: number
|
||||
userId!: number
|
||||
active: boolean
|
||||
|
||||
static tableName = 'flows';
|
||||
|
||||
@@ -12,7 +13,8 @@ class Flow extends Base {
|
||||
|
||||
properties: {
|
||||
id: { type: 'integer' },
|
||||
userId: { type: 'integer' }
|
||||
userId: { type: 'integer' },
|
||||
active: { type: 'boolean' }
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user