exports.up = function(knex, Promise) { return knex.schema.createTable('avaliacao_completa', t => { t.increments('Id') t.integer('Pesquisa').unsigned().references('Id').inTable('pesquisa').onDelete('CASCADE').index().notNullable() t.string('Cliente').notNullable() t.timestamp('DataCadastro').notNullable().defaultTo(knex.raw('CURRENT_TIMESTAMP')) t.integer('Dados').notNullable() }) }; exports.down = function(knex, Promise) { return knex.schema.dropTable('avaliacao_completa') };