我正在運行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