Files
bigcapital/server/src/database/migrations/20200105195823_create_manual_journals_table.js
Ahmed Bouhuolia 0114ed9f8b fix: database migrations FK relations.
fix: database columns indexing.
2020-10-03 12:08:11 +02:00

21 lines
673 B
JavaScript

exports.up = function(knex) {
return knex.schema.createTable('manual_journals', (table) => {
table.increments();
table.string('journal_number').index();
table.string('reference').index();
table.string('journal_type').index();
table.decimal('amount', 13, 3);
table.date('date').index();
table.boolean('status').defaultTo(false).index();
table.string('description');
table.string('attachment_file');
table.integer('user_id').unsigned().index();
table.timestamps();
}).raw('ALTER TABLE `MANUAL_JOURNALS` AUTO_INCREMENT = 1000');
};
exports.down = function(knex) {
return knex.schema.dropTableIfExists('manual_journals');
};