timeoff-management / timeoff-management-application

Simple yet powerful absence management software for small and medium size business (community edition)
https://TimeOff.Management
MIT License
958 stars 589 forks source link

Restore database in JSON format #436

Open C0ldF0x opened 4 years ago

C0ldF0x commented 4 years ago

I was trying to upgrade the current version I'm using but it was throwing some errors and I decided then to download the current information from the platform and then try to import it.

The problem that I found was that the version that I'm using export in JSON and the latest ones accepts .csv

Is there any process to convert the file or any option to import the JSON into the latest version?

vpp commented 4 years ago

Hi @C0ldF0x, looks like the version you have is quite out of date. The feature of data migration between instances was retired and it did not get the track from customers.

For upgrade process I would suggest (given you use default DB option of SQLite):

That should be enough to upgrade.

C0ldF0x commented 4 years ago

Thanks for the help @vpp . I finally got time to put some work into this and I got this far:

/home/ubuntu/timeoff/test/node_modules/.bin/sequelize:2 basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')") ^^^^^^^

SyntaxError: missing ) after argument list at Module._compile (internal/modules/cjs/loader.js:743:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10) at Module.load (internal/modules/cjs/loader.js:666:32) at tryModuleLoad (internal/modules/cjs/loader.js:606:12) at Function.Module._load (internal/modules/cjs/loader.js:598:3) at Function.Module.runMain (internal/modules/cjs/loader.js:862:12) at internal/main/run_main_module.js:21:11 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! TimeOff.Management@1.0.0 db-update: node node_modules/.bin/sequelize db:migrate --config=config/db.json --models-path=lib/model/db/ npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the TimeOff.Management@1.0.0 db-update script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.



If someone's able to help it would be great, but I'll comeback to this problem as soon as I'm able to get some time.