mirror of
https://github.com/mokuappio/serverless-invoices.git
synced 2025-10-31 18:01:07 -04:00
Migration script.
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import localForage from 'localforage';
|
||||
import MigrationService from '@/services/migration.service';
|
||||
import { download } from '../utils/helpers';
|
||||
|
||||
export default {
|
||||
@ -12,6 +13,9 @@ export default {
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
async migrate() {
|
||||
return MigrationService.migrate();
|
||||
},
|
||||
async exportJson() {
|
||||
let results = [];
|
||||
const keys = await localForage.keys();
|
||||
|
||||
@ -13,6 +13,8 @@ export default {
|
||||
},
|
||||
actions: {
|
||||
async init({ dispatch }) {
|
||||
await dispatch('data/migrate', null, { root: true });
|
||||
|
||||
await Promise.all([
|
||||
dispatch('clients/terminate', null, { root: true }),
|
||||
dispatch('bankAccounts/terminate', null, { root: true }),
|
||||
|
||||
Reference in New Issue
Block a user