0
我有一个简单的问题。我想开始使用CodeIgniter迁移。但是我的配置文件夹中没有migrations.php文件,就像它在文档中所说的那样。另外,是否需要在应用程序文件夹级别手动创建迁移文件夹?迁移和CodeIgniter
我有一个简单的问题。我想开始使用CodeIgniter迁移。但是我的配置文件夹中没有migrations.php文件,就像它在文档中所说的那样。另外,是否需要在应用程序文件夹级别手动创建迁移文件夹?迁移和CodeIgniter
奇怪的是,您的application/config/migration.php
文件未包含在下载中,但是...即使配置文件不存在,迁移库将(或应该)仍在您的CodeIgniter system/libraries
文件夹中。
有三种配置变量作为默认migration.php
配置文件的一部分:
/*
|--------------------------------------------------------------------------
| 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/';
我甚至下载最新版本2.1.2,但它不存在。 – sehummel
这是文档:http://codeigniter.com/user_guide/libraries/migration.html – sehummel
奇怪的是,该文件位于GitHub稳定分支上,但不在下载中。 – sehummel