exports.up = function(knex, Promise) { return knex.schema.createTable('campos_pesquisa', t => { t.increments('Id') t.integer('Pesquisa').unsigned().references('Id').inTable('pesquisa').onDelete('CASCADE').index().notNullable() t.string('Descricao').notNullable() t.string('Nome').notNullable() t.string('TipoValor').notNullable() }) }; exports.down = function(knex, Promise) { return knex.schema.dropTable('campos_pesquisa') };