mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: bank rules for uncategorized transactions
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
exports.up = function (knex) {
|
||||
return knex.schema
|
||||
.createTable('bank_rules', (table) => {
|
||||
table.increments('id').primary();
|
||||
table.string('name');
|
||||
table.integer('order').unsigned();
|
||||
|
||||
table.integer('apply_if_account_id').unsigned();
|
||||
table.string('apply_if_transaction_type');
|
||||
|
||||
table.string('assign_category');
|
||||
table.integer('assign_account_id').unsigned();
|
||||
table.string('assign_payee');
|
||||
table.string('assign_memo');
|
||||
|
||||
table.string('conditions_type');
|
||||
|
||||
table.timestamps();
|
||||
})
|
||||
.createTable('bank_rule_conditions', (table) => {
|
||||
table.increments('id').primary();
|
||||
table.integer('rule_id').unsigned();
|
||||
table.string('field');
|
||||
table.string('comparator');
|
||||
table.string('value');
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = function (knex) {
|
||||
return knex.schema
|
||||
.dropTableIfExists('bank_rules')
|
||||
.dropTableIfExists('bank_rule_conditions');
|
||||
};
|
||||
Reference in New Issue
Block a user