我想将数据从Odoo 9社区迁移到Odoo 11社区。所以我想写一些迁移脚本。但是,目前我不知道如何编写像OpenUpgrade这样的迁移脚本。
如果有人知道从哪里开始,那么请分享你的想法。
发布于 2018-08-18 01:03:45
您可以通过多种方式迁移数据。但是你需要很好地了解Odoo,才能进行这样的迁移。
1. Update the instance of Odoo 9.0 al to the latest commit
2. Migrate your custom modules (source code) to the version 10.0, and then to the 11.0 version
3. Analise the database changes of these modules to make the migration scripts (to store it in the `migrations` folder) to update the database structure from the version 9.0 to the 10.0 and to the version and 11.0. You can check examples of these kind of scripts in the [Openupgrade project](https://github.com/OCA/OpenUpgrade/tree/10.0/addons/account/migrations/10.0.1.1), they execute SQL code very often.
4. Migrate the database with Openupgrade to the 10.0 version solving all the conflicts
5. Migrate the database with Openupgrade to the 11.0 version但是,我从未使用这些方法进行过完整的迁移,因为它们非常昂贵。因此,我的建议是部分迁移数据库,只迁移必要的数据(如果您想要一个稳定的安装)。您甚至可以使用csv文件,导出这些表并将它们重新输入新的数据库。
https://stackoverflow.com/questions/51902464
复制相似问题