Skip to content

Instantly share code, notes, and snippets.

@avesus
Created September 26, 2014 11:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avesus/7d66e837c1cf52c68f49 to your computer and use it in GitHub Desktop.
Save avesus/7d66e837c1cf52c68f49 to your computer and use it in GitHub Desktop.
Yii migration cache disable
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