import * as Knex from "knex"; export async function up(knex: Knex): Promise { // Integrations table. await knex.schema.createTable( 'integrations', (table: any) => { table.increments('id'); table.integer('user').unsigned().notNullable().defaultTo(1); table.string('name').notNullable(); // Uniquely identifies this integration configuration for the user. table.string('type').notNullable(); // Enumerates different supported integration types (e.g. Spotify) table.json('details'); // Stores anything that might be needed for the integration to work. } ) } export async function down(knex: Knex): Promise { await knex.schema.dropTable('integrations'); }