Database migrations in Joomla(Joomla 中的数据库迁移)
问题描述
有没有办法在 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.
谢谢!
推荐答案
如果你想更新你自己组件的数据库架构,你可以参考以下线程:http://forum.joomla.org/viewtopic.php?p=1607199
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 中的数据库迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Joomla 中的数据库迁移
基础教程推荐
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- 如何替换eregi() 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
