簡単な質問があります。CodeIgniterの移行を使い始めたいです。しかし、ドキュメントに記載されているように、configフォルダーにmigrations.phpファイルはありません。また、アプリケーションフォルダーレベルで移行フォルダーを手動で作成する必要がありますか?
1014 次
1 に答える
1
ファイルがダウンロードに含まれていなかったのは奇妙なことapplication/config/migration.php
ですが...構成ファイルが含まれていなくても、移行ライブラリはCodeIgnitersystem/libraries
フォルダーにあります(またはあるはずです)。
migration.php
デフォルトの設定ファイルの一部として、3つの設定変数があります。
/*
|--------------------------------------------------------------------------
| Enable/Disable Migrations
|--------------------------------------------------------------------------
|
| Migrations are disabled by default but should be enabled
| whenever you intend to do a schema migration.
|
*/
$config['migration_enabled'] = FALSE;
/*
|--------------------------------------------------------------------------
| Migrations version
|--------------------------------------------------------------------------
|
| This is used to set migration version that the file system should be on.
| If you run $this->migration->latest() this is the version that schema will
| be upgraded / downgraded to.
|
*/
$config['migration_version'] = 0;
/*
|--------------------------------------------------------------------------
| Migrations Path
|--------------------------------------------------------------------------
|
| Path to your migrations folder.
| Typically, it will be within your application path.
| Also, writing permission is required within the migrations path.
|
*/
$config['migration_path'] = APPPATH . 'migrations/';
于 2012-08-29T20:57:34.860 に答える