exports.up = async (knex) => { await knex.schema.createTable('actors_revisions', (table) => { table.increments('id'); table.integer('actor_id') .references('id') .inTable('actors') .onDelete('set null'); table.integer('profile_id') .references('id') .inTable('actors_profiles') .onDelete('set null'); table.integer('user_id') .references('id') .inTable('users') .onDelete('set null'); table.json('base') .notNullable(); table.json('deltas') .notNullable(); table.text('hash') .notNullable(); table.text('comment'); table.boolean('approved'); table.integer('reviewed_by') .references('id') .inTable('users') .onDelete('set null'); table.datetime('reviewed_at'); table.text('feedback'); table.datetime('applied_at'); table.datetime('created_at') .notNullable() .defaultTo(knex.fn.now()); }); await knex.schema.alterTable('actors', (table) => { table.integer('boobs_volume'); table.integer('butt_volume'); table.integer('lips_volume'); table.boolean('natural_butt'); }); await knex.schema.alterTable('actors_profiles', (table) => { table.integer('boobs_volume'); table.integer('butt_volume'); table.integer('lips_volume'); table.boolean('natural_butt'); }); }; exports.down = async (knex) => { await knex.schema.dropTable('actors_revisions'); await knex.schema.alterTable('actors', (table) => { table.dropColumn('boobs_volume'); table.dropColumn('butt_volume'); table.dropColumn('lips_volume'); table.dropColumn('natural_butt'); }); await knex.schema.alterTable('actors_profiles', (table) => { table.dropColumn('boobs_volume'); table.dropColumn('butt_volume'); table.dropColumn('lips_volume'); table.dropColumn('natural_butt'); }); };