Created
September 26, 2014 11:52
-
-
Save avesus/7d66e837c1cf52c68f49 to your computer and use it in GitHub Desktop.
Yii migration cache disable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function up() | |
{ | |
$this->addColumn('post', 'alias', 'varchar(255) NOT NULL'); | |
Yii::app()->cache->flush(); | |
Yii::app()->db->schema->getTables(); | |
Yii::app()->db->schema->refresh(); | |
foreach (Post::model()->findAll() as $post) { | |
$post->save(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment