mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
fix: writing journal entries of manual journal.
This commit is contained in:
@@ -7,8 +7,8 @@ exports.up = function(knex) {
|
||||
table.string('journal_type').index();
|
||||
table.decimal('amount', 13, 3);
|
||||
table.date('date').index();
|
||||
table.boolean('status').defaultTo(false).index();
|
||||
table.string('description');
|
||||
table.date('published_at').index();
|
||||
table.string('attachment_file');
|
||||
table.integer('user_id').unsigned().index();
|
||||
table.timestamps();
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
exports.up = function(knex) {
|
||||
return knex.schema.createTable('manual_journals_entries', (table) => {
|
||||
table.increments();
|
||||
table.decimal('credit', 13, 3);
|
||||
table.decimal('debit', 13, 3);
|
||||
table.integer('index').unsigned();
|
||||
table.integer('account_id').unsigned().index().references('id').inTable('accounts');
|
||||
table.string('contact_type').nullable().index();
|
||||
table.integer('contact_id').unsigned().nullable().index();
|
||||
table.string('note');
|
||||
table.integer('manual_journal_id').unsigned().index().references('id').inTable('manual_journals');
|
||||
}).raw('ALTER TABLE `MANUAL_JOURNALS_ENTRIES` AUTO_INCREMENT = 1000');
|
||||
};
|
||||
|
||||
exports.down = function(knex) {
|
||||
return knex.schema.dropTableIfExists('manual_journals_entries');
|
||||
};
|
||||
Reference in New Issue
Block a user