import * as Knex from 'knex' ; const funding = 'funding' ; export async function up ( knex ) { await knex . schema . createTable ( funding , function ( table ) { table . string ( 'channel_id' ) . notNullable ( ) ; table . string ( 'amount' ) . notNullable ( ) ; table . string ( 'asset' ) . notNullable ( ) ; table . primary ( [ 'channel_id' , 'asset' ] ) ; table . foreign ( 'channel_id' ) . references ( 'channels.channel_id' ) ; } ) ; } export async function down ( knex ) { await knex . schema . dropTable ( funding ) ; }