首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何将数据库从Odoo 9迁移到Odoo 11?

如何将数据库从Odoo 9迁移到Odoo 11?
EN

Stack Overflow用户
提问于 2018-08-17 20:29:16
回答 1查看 2.8K关注 0票数 1

我想将数据从Odoo 9社区迁移到Odoo 11社区。所以我想写一些迁移脚本。但是,目前我不知道如何编写像OpenUpgrade这样的迁移脚本。

  • 如何使用PostreSQL将数据从Odoo 9迁移到Odoo 11.
  • 我可以通过连接两个版本的OdooRPC来迁移数据吗?

如果有人知道从哪里开始,那么请分享你的想法。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-08-18 01:03:45

您可以通过多种方式迁移数据。但是你需要很好地了解Odoo,才能进行这样的迁移。

  • 原始SQL脚本。如果您是SQL专家,这可能是映射字段的好方法。考虑到根据您安装的模块,Odoo可能需要多达500个表,甚至更多。
  • ETL工具,如宾得凯特尔。这也是一个昂贵的方法,但它有一个GUI。
  • Openupgrade.它为主Odoo模块提供了迁移脚本(python)。您必须为自定义模块和第三方模块编写自己的迁移脚本(如果它们没有)。您需要遵循以下步骤:
代码语言:javascript
复制
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文件,导出这些表并将它们重新输入新的数据库。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51902464

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档