mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
21 lines
606 B
JavaScript
21 lines
606 B
JavaScript
|
|
exports.up = function(knex) {
|
|
return knex.schema.createTable('items_entries', (table) => {
|
|
table.increments();
|
|
table.string('reference_type').index();
|
|
table.string('reference_id').index();
|
|
|
|
table.integer('index').unsigned();
|
|
table.integer('item_id').unsigned().index().references('id').inTable('items');
|
|
table.text('description');
|
|
table.integer('discount').unsigned();
|
|
table.integer('quantity').unsigned();
|
|
table.integer('rate').unsigned();
|
|
table.timestamps();
|
|
});
|
|
};
|
|
|
|
exports.down = function(knex) {
|
|
return knex.schema.dropTableIfExists('items_entries');
|
|
};
|