我正在运行Kohana 3.3并希望将数据库迁移添加到我的项目中。如何使用Minion任务迁移进行数据库迁移
我添加了以下模具https://github.com/kohana-minion/tasks-migrations,但不知道如何让它工作。
我可以看到运行./minion migrations:new --help
的帮助文件,但我不明白需要什么group
值。从文档它说:
--group=group_name
This is a required config option, use it specify in which group the
migration should be stored. Migrations are stored in a `migrations`
directory followed by the group name specified. By default, the `migrations`
directory is created in `APPPATH` but that can be changed with `--location`
--location=modules/auth
Specified the path of the migration (without the `migrations` directory).
This value is defaulted to `APPPATH`
# The migration will be created in `modules/myapp/migrations/myapp/`
--group=myapp --location=modules/myapp
--description="Description of migration here"
This is an arbitrary description of the migration, used to build the
filename. It is required but can be changed manually later on without
affecting the integrity of the migration.
我一直在寻找的例子,但还没有找到一个。我有一个现有的数据库,所以我想从该基础中获取该模式,然后再运行进一步的迁移。这是如何tasks-migrations
模块的作品?
感谢,顺便说一句,它在运行时创建的迁移表第一次迁移。 – xylar
顺便说一句,当它创建表时,当你使用innodb时,你也可以将它改为innodb。如果使用快速复制方法,混合表类型会导致数据库备份问题。 – RJD22