You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
770 B

import * as Knex from "knex";
export async function up(knex: Knex): Promise<void> {
// 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<void> {
await knex.schema.dropTable('integrations');
}