diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 575cb081..9a47eb3e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,7 +52,7 @@ jobs: run: | sudo /etc/init.d/mysql start mysql -uroot -proot -e 'CREATE DATABASE `yiitest`;' - mysql -D yiitest -uroot -proot < tests/data/source.sql + mysql --default-character-set=utf8 -D yiitest -uroot -proot < tests/data/source.sql - name: Install sphinx run: cd tests/data/actions && sh sphinx-setup.sh diff --git a/tests/data/source.sql b/tests/data/source.sql index a2ec7f00..74650476 100644 --- a/tests/data/source.sql +++ b/tests/data/source.sql @@ -14,7 +14,7 @@ CREATE TABLE IF NOT EXISTS `yii2_test_article` ( `author_id` int(11) NOT NULL, `create_date` datetime NOT NULL, PRIMARY KEY (`id`) -) CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3; +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; CREATE TABLE IF NOT EXISTS `yii2_test_item` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -23,19 +23,19 @@ CREATE TABLE IF NOT EXISTS `yii2_test_item` ( `category_id` int(11) NOT NULL, `price` float NOT NULL, PRIMARY KEY (`id`) -) CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3; +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3; CREATE TABLE IF NOT EXISTS `yii2_test_tag` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, PRIMARY KEY (`id`) -) CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=5; +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=5; CREATE TABLE IF NOT EXISTS `yii2_test_article_tag` ( `article_id` int(11) NOT NULL, `tag_id` int(11) NOT NULL, PRIMARY KEY (`article_id`,`tag_id`) -) CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; INSERT INTO `yii2_test_article` (`id`, `title`, `content`, `author_id`, `create_date`) VALUES (1, 'About cats', 'This article is about cats. Repeated.', 1, '2013-10-23 00:00:00'),