mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +00:00
feat: add migration to is_syncing_owner column in accounts table
This commit is contained in:
@@ -1,6 +1,16 @@
|
|||||||
exports.up = function (knex) {
|
exports.up = function (knex) {
|
||||||
return knex.schema.table('accounts', (table) => {
|
return knex.schema
|
||||||
table.boolean('is_syncing_owner').defaultTo(false).after('is_feeds_active');
|
.table('accounts', (table) => {
|
||||||
|
table
|
||||||
|
.boolean('is_syncing_owner')
|
||||||
|
.defaultTo(false)
|
||||||
|
.after('is_feeds_active');
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
return knex('accounts')
|
||||||
|
.whereNotNull('plaid_item_id')
|
||||||
|
.orWhereNotNull('plaid_account_id')
|
||||||
|
.update('is_syncing_owner', true);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,9 @@ export function useDisconnectBankAccount(
|
|||||||
apiRequest.post(`/banking/bank_accounts/${bankAccountId}/disconnect`),
|
apiRequest.post(`/banking/bank_accounts/${bankAccountId}/disconnect`),
|
||||||
{
|
{
|
||||||
...options,
|
...options,
|
||||||
onSuccess: () => {},
|
onSuccess: (res, values) => {
|
||||||
|
queryClient.invalidateQueries([t.ACCOUNT, values.bankAccountId]);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user