mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: licenses administration basic authentication.
feat: accounts slug. feat: duplicate accounts_balance table and merge balance with accounts table. feat: refactoring customers and vendors. feat: system user soft deleting. feat: preventing build tenant database without any subscription. feat: remove 'password' property from 'req.user' object. feat: refactoring JournalPoster class. feat: delete duplicated directories and files.
This commit is contained in:
@@ -3,6 +3,7 @@ exports.up = function (knex) {
|
||||
return knex.schema.createTable('accounts', (table) => {
|
||||
table.bigIncrements('id').comment('Auto-generated id');;
|
||||
table.string('name');
|
||||
table.string('slug');
|
||||
table.integer('account_type_id').unsigned();
|
||||
table.integer('parent_account_id').unsigned();
|
||||
table.string('code', 10);
|
||||
@@ -10,6 +11,8 @@ exports.up = function (knex) {
|
||||
table.boolean('active').defaultTo(true);
|
||||
table.integer('index').unsigned();
|
||||
table.boolean('predefined').defaultTo(false);
|
||||
table.decimal('amount', 15, 5);
|
||||
table.string('currency_code', 3);
|
||||
table.timestamps();
|
||||
}).raw('ALTER TABLE `ACCOUNTS` AUTO_INCREMENT = 1000').then(() => {
|
||||
return knex.seed.run({
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
|
||||
exports.up = function (knex) {
|
||||
return knex.schema.createTable('account_balances', (table) => {
|
||||
table.increments();
|
||||
table.integer('account_id');
|
||||
table.decimal('amount', 15, 5);
|
||||
table.string('currency_code', 3);
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = (knex) => knex.schema.dropTableIfExists('account_balances');
|
||||
@@ -13,6 +13,7 @@ exports.up = function(knex) {
|
||||
table.string('note');
|
||||
table.boolean('draft').defaultTo(false);
|
||||
table.integer('user_id').unsigned();
|
||||
table.integer('index').unsigned();
|
||||
table.date('date');
|
||||
table.timestamps();
|
||||
}).raw('ALTER TABLE `ACCOUNTS_TRANSACTIONS` AUTO_INCREMENT = 1000');
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
|
||||
exports.up = function(knex) {
|
||||
return knex.schema.createTable('contacts', table => {
|
||||
table.increments();
|
||||
|
||||
table.string('contact_service');
|
||||
table.string('contact_type');
|
||||
|
||||
table.decimal('balance', 13, 3).defaultTo(0);
|
||||
table.decimal('opening_balance', 13, 3).defaultTo(0);
|
||||
|
||||
table.string('first_name').nullable();
|
||||
table.string('last_name').nullable();
|
||||
table.string('company_name').nullable();
|
||||
|
||||
table.string('display_name');
|
||||
|
||||
table.string('email').nullable();
|
||||
table.string('work_phone').nullable();
|
||||
table.string('personal_phone').nullable();
|
||||
|
||||
table.string('billing_address_1').nullable();
|
||||
table.string('billing_address_2').nullable();
|
||||
table.string('billing_address_city').nullable();
|
||||
table.string('billing_address_country').nullable();
|
||||
table.string('billing_address_email').nullable();
|
||||
table.string('billing_address_zipcode').nullable();
|
||||
table.string('billing_address_phone').nullable();
|
||||
table.string('billing_address_state').nullable(),
|
||||
|
||||
table.string('shipping_address_1').nullable();
|
||||
table.string('shipping_address_2').nullable();
|
||||
table.string('shipping_address_city').nullable();
|
||||
table.string('shipping_address_country').nullable();
|
||||
table.string('shipping_address_email').nullable();
|
||||
table.string('shipping_address_zipcode').nullable();
|
||||
table.string('shipping_address_phone').nullable();
|
||||
table.string('shipping_address_state').nullable();
|
||||
|
||||
table.text('note');
|
||||
table.boolean('active').defaultTo(true);
|
||||
|
||||
table.timestamps();
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = function(knex) {
|
||||
return knex.schema.dropTableIfExists('contacts');
|
||||
};
|
||||
Reference in New Issue
Block a user