fix: database migrations FK relations.

fix: database columns indexing.
This commit is contained in:
Ahmed Bouhuolia
2020-10-03 12:08:11 +02:00
parent 1250eccc0d
commit 0114ed9f8b
86 changed files with 788 additions and 801 deletions

View File

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