Skip to content

Commit e5b0ccd

Browse files
authored
Fix Github Action (cebe#170)
Fix cebe#167 (comment) Newer version of Mysql in Docker is causing this. Most likely this is it. https://dev.mysql.com/doc/relnotes/mysql/8.4/en/news-8-4-0.html At this moment I am using 8.0.37 to fix this issue temporarily
2 parents e96fa50 + c5cc268 commit e5b0ccd

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ up:
4646
cli:
4747
docker-compose exec --user=$(UID) php bash
4848

49+
cli_mysql:
50+
docker-compose exec --user=$(UID) mysql bash
51+
4952
migrate:
5053
docker-compose run --user=$(UID) --rm php sh -c 'mkdir -p "tests/tmp/app"'
5154
docker-compose run --user=$(UID) --rm php sh -c 'mkdir -p "tests/tmp/docker_app"'

docker-compose.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ services:
2727
- maria
2828
tty: true
2929
mysql:
30-
image: mysql:8
30+
image: mysql:8.4
3131
ports:
3232
- '13306:3306'
33+
command: mysqld --mysql-native-password=ON
3334
volumes:
3435
- ./tests/tmp/mysql:/var/lib/mysql:rw
3536
environment:

tests/.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/tmp
1+
/tmp

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)