mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
feat: redesign accounts types.
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
|
||||
exports.up = (knex) => {
|
||||
return knex.schema.createTable('account_types', (table) => {
|
||||
table.increments();
|
||||
table.string('key').index();
|
||||
table.string('normal').index();
|
||||
table.string('root_type').index();
|
||||
table.string('child_type');
|
||||
table.boolean('balance_sheet');
|
||||
table.boolean('income_sheet');
|
||||
}).raw('ALTER TABLE `ACCOUNT_TYPES` AUTO_INCREMENT = 1000');
|
||||
};
|
||||
|
||||
exports.down = (knex) => knex.schema.dropTableIfExists('account_types');
|
||||
@@ -3,7 +3,7 @@ exports.up = function (knex) {
|
||||
table.increments('id').comment('Auto-generated id');
|
||||
table.string('name').index();
|
||||
table.string('slug');
|
||||
table.integer('account_type_id').unsigned().references('id').inTable('account_types');
|
||||
table.string('account_type').index();
|
||||
table.integer('parent_account_id').unsigned().references('id').inTable('accounts');
|
||||
table.string('code', 10).index();
|
||||
table.text('description');
|
||||
|
||||
Reference in New Issue
Block a user