问题描述
有什么方法使用Joomla的数据库迁移吗?我正在寻找一个机制像在Rails或Symfony中找到的机制。
Is there any way of using database migrations with Joomla? I'm looking for a mechanism like the one found in Rails or Symfony.
我想要更改数据库时,我的模型更改,例如。添加列,创建新关系,删除一些表...
I would like to apply changes to the database whenever my model changes, e.g. adding a column, creating a new relationship, dropping some tables,...
在,接受的答案似乎是一个很酷的选择,但我不知道是否有特定的Joomla。
In this question, the accepted answer seems like a very cool option, but I don't know if there is something specific to Joomla.
谢谢!
推荐答案
如果要更新自己的组件的数据库模式,可以参考以下线程:
If you want to update your own component's DB schema you can refer to the following thread: http://forum.joomla.org/viewtopic.php?p=1607199
如果您只需要没有组件的迁移,请检查这些独立的解决方案:
If you need just migrations without components, check these standalone solutions:
- https://github.com/davejkiger/mysql-php-migrations
- https://github.com/Billiam/MySQL-PHP-AutoMigrations
这篇关于Joomla中的数据库迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!