Files
bigcapital/server/src/database/migrations/20200104232647_create_accounts_transactions_table.js
Ahmed Bouhuolia 282da55d08 - feat: Filter expense and payment accounts on expense form.
- feat: Make journal errors with receivable and payable accounts.
- fix: Handle database big numbers.
- fix: Indexing lines when add a new line on make journal form.
- fix: Abstruct accounts type component.
2020-07-06 21:22:27 +02:00

24 lines
785 B
JavaScript

exports.up = function(knex) {
return knex.schema.createTable('accounts_transactions', (table) => {
table.increments();
table.decimal('credit', 13, 3);
table.decimal('debit', 13, 3);
table.string('transaction_type');
table.string('reference_type');
table.integer('reference_id');
table.integer('account_id').unsigned();
table.string('contact_type').nullable();
table.integer('contact_id').unsigned().nullable();
table.string('note');
table.boolean('draft').defaultTo(false);
table.integer('user_id').unsigned();
table.date('date');
table.timestamps();
}).raw('ALTER TABLE `ACCOUNTS_TRANSACTIONS` AUTO_INCREMENT = 1000');
};
exports.down = function(knex) {
return knex.schema.dropTableIfExists('accounts_transactions');
};