Created Migrating from old Wekan manually (markdown)

Lauri Ojansivu 2018-09-24 12:38:26 +03:00
parent 41b0465496
commit 1f7cd1312c

@ -0,0 +1,48 @@
Migrations from every possible old Wekan version are not implemented yet.
Here are some starting points.
## 1) Required: Backups
https://github.com/wekan/wekan/wiki/Backup
Yes, it is very easy to lose data when trying to upgrade. Your server harddrive can go broken very easily. And [random script kiddies are deleting all MongoDB data](https://github.com/wekan/wekan/issues/1908).
Do backups to multiple places. And test does restore work, with restore script already made.
## 2) You can save all data from MongoDB to .json files and compare them
That way you can also edit files to fix something, and also save back to MongoDB:
- https://forums.rocket.chat/t/big-issue-with-custom-javascript/261/3
## 3) Change text in all files in current directory in-place
Take backup before runnning this.
Using sed on Linux or Mac.
```
sed -i 's|FindThisText|ReplaceWithThisText|g' *
```
## 4) Example: From v0.77 to newest
### v0.77
- Schema https://github.com/wekan/wekan/tree/v0.77/models
- Migrations https://github.com/wekan/wekan/blob/v0.77/server/migrations.js
### Newest
- Schema https://github.com/wekan/wekan/tree/devel/models
- Migrations https://github.com/wekan/wekan/blob/devel/server/migrations.js
## 5) Some migrations could be missing
Some of the database schema can be different. If you see difference in these files, you could fix it for everybody by adding new code to migrations, so old schema is converted to new one automatically when Wekan starts.
## 6) Inform Wekan about what is missing
### a) Add issue
- [Add issue](https://github.com/wekan/wekan/issues)
### b) Pull request
- [Build from source or build on VirtualBox image](https://github.com/wekan/wekan/wiki/Platforms)
- [Please try to fix lint error before creating pull request](https://github.com/wekan/wekan/wiki/Developer-Documentation#preventing-travis-ci-lint-errors-before-submitting-pull-requests)
- [Making Pull Request](https://help.github.com/articles/creating-a-pull-request/)