function migrate(direction) {
    let client = new pg.Client({
        host: process.env.PGSQL_HOST || 'localhost',
        user: process.env.PGSQL_USER || 'postgres',
        password: process.env.PGSQL_PASSWORD || 'postgres',
        database: process.env.PGSQL_DATABASE || 'sekure_archive_development',
    });
    client.connect((error) => {
        if (error) throw error;
        (direction == 'up' ? up(client) : down(client)).then(() => client.end());
    });
}
// Migrate the database up or down
Migrate the database up or down
Migrate the database up or down
function migrate(direction) {
    let client = new pg.Client({
        host: process.env.PGSQL_HOST || 'localhost',
        user: process.env.PGSQL_USER || 'postgres',
        password: process.env.PGSQL_PASSWORD || 'postgres',
        database: process.env.PGSQL_DATABASE || 'sekure_archive_development',
    });
    client.connect((error) => {
        if (error) throw error;
        (direction == 'up' ? up(client) : down(client)).then(() => client.end());
    });
}
function migrate ( direction ) { let client = new pg . Client ( { host : process . env . PGSQL_HOST || 'localhost' , user : process . env . PGSQL_USER || 'postgres' , password : process . env . PGSQL_PASSWORD || 'postgres' , database : process . env . PGSQL_DATABASE || 'sekure_archive_development' , } ) ; client . connect ( ( error ) => { if ( error ) throw error ; ( direction == 'up' ? up ( client ) : down ( client ) ) . then ( ( ) => client . end ( ) ) ; } ) ; }
Migrate the database up or down
Migrate the database up or down