hasTable('wfda_workflows')) { $table = $schema->createTable('wfda_workflows'); $table->addColumn('id', Types::INTEGER, [ 'autoincrement' => true, 'notnull' => true, ]); $table->addColumn('user_id', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); $table->addColumn('title', Types::STRING, [ 'notnull' => true, 'length' => 255, ]); $table->addColumn('board_id', Types::INTEGER, [ 'notnull' => true, ]); $table->addColumn('source_stack_id', Types::INTEGER, [ 'notnull' => true, ]); $table->addColumn('target_stack_id', Types::INTEGER, [ 'notnull' => true, ]); $table->addColumn('filter_user_ids', Types::TEXT, [ 'notnull' => false, ]); $table->addColumn('filter_label_ids', Types::TEXT, [ 'notnull' => false, ]); $table->addColumn('notify_email', Types::BOOLEAN, [ 'notnull' => true, 'default' => false, ]); $table->addColumn('enabled', Types::BOOLEAN, [ 'notnull' => true, 'default' => true, ]); $table->addColumn('last_run', Types::DATETIME, [ 'notnull' => false, ]); $table->setPrimaryKey(['id']); $table->addIndex(['user_id'], 'wfda_workflows_uid_idx'); $table->addIndex(['enabled'], 'wfda_workflows_enabled_idx'); } return $schema; } }