aboutsummaryrefslogtreecommitdiffstats
path: root/db/normalized/bank_accounts.js
blob: 5d8ea0dc136a3377a9512c89fcd5fec44eb21ac2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
export const up = function(knex) {
  return knex.schema.createTable('bank_accounts', function(t) {
    t.increments('id').unsigned().primary();
    t.int('user_id').notNull();
    t.foreign('user_id').references('users.id');

    t.int('transit_number');
    t.int('institution_number');
    t.int('account_number');

    t.string('swift');
    t.string('iban');
    
    t.timestamps();
  })
};

export const down = function(knex) {
  return knex.schema.dropTable('user_security');
};

// Changes:
//
// bank info -> bank_account records