Skip to content

Commit c5cc268

Browse files
committed
Fix failing tests
1 parent 430e7de commit c5cc268

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: tests/specs/blog_v2/migrations_mysql_db/m200000_000005_change_table_v2_comments.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ class m200000_000005_change_table_v2_comments extends \yii\db\Migration
77
{
88
public function up()
99
{
10-
$this->dropForeignKey('fk_v2_comments_author_id_v2_users_id', '{{%v2_comments}}');
1110
$this->dropForeignKey('fk_v2_comments_post_id_v2_posts_uid', '{{%v2_comments}}');
11+
$this->dropForeignKey('fk_v2_comments_author_id_v2_users_id', '{{%v2_comments}}');
1212
$this->addColumn('{{%v2_comments}}', 'user_id', $this->bigInteger()->null()->defaultValue(null)->after('post_id'));
1313
$this->dropColumn('{{%v2_comments}}', 'author_id');
1414
$this->alterColumn('{{%v2_comments}}', 'message', $this->text()->notNull());
@@ -27,7 +27,7 @@ public function down()
2727
$this->alterColumn('{{%v2_comments}}', 'message', 'json NOT NULL');
2828
$this->addColumn('{{%v2_comments}}', 'author_id', $this->integer()->notNull());
2929
$this->dropColumn('{{%v2_comments}}', 'user_id');
30-
$this->addForeignKey('fk_v2_comments_post_id_v2_posts_uid', '{{%v2_comments}}', 'uid', 'v2_posts', 'post_id');
3130
$this->addForeignKey('fk_v2_comments_author_id_v2_users_id', '{{%v2_comments}}', 'id', 'v2_users', 'author_id');
31+
$this->addForeignKey('fk_v2_comments_post_id_v2_posts_uid', '{{%v2_comments}}', 'uid', 'v2_posts', 'post_id');
3232
}
3333
}

0 commit comments

Comments
 (0)