Closed howells closed 3 years ago
I just tried upgrading to 1.12.0 but I get a migration error; using Craft 3.7.20
Checking for pending Craft and plugin migrations ... Total 1 new GraphQL Authentication migration to be applied: - m211014_234909_schema_id_to_schema_name *** applying m211014_234909_schema_id_to_schema_name Exception: count(): Parameter must be an array or an object that implements Countable (/Users/****/Sites/****/vendor/jamesedmonston/graphql-authentication/src/migrations/m211014_234909_schema_id_to_schema_name.php:40) #0 [internal function]: yii\base\ErrorHandler->handleError(2, 'count(): Parame...', '/Users/****...', 40, Array) #1 /Users/****/Sites/****/vendor/jamesedmonston/graphql-authentication/src/migrations/m211014_234909_schema_id_to_schema_name.php(40): count(NULL) #2 /Users/****/Sites/****/vendor/craftcms/cms/src/db/Migration.php(52): jamesedmonston\graphqlauthentication\migrations\m211014_234909_schema_id_to_schema_name->safeUp() #3 /Users/****/Sites/****/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(758): craft\db\Migration->up() #4 /Users/****/Sites/****/vendor/craftcms/cms/src/console/controllers/MigrateController.php(385): yii\console\controllers\BaseMigrateController->migrateUp('m211014_234909_...') #5 [internal function]: craft\console\controllers\MigrateController->actionAll() #6 /Users/****/Sites/****/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array) #7 /Users/****/Sites/****/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array) #8 /Users/****/Sites/****/vendor/yiisoft/yii2/console/Controller.php(184): yii\base\Controller->runAction('all', Array) #9 /Users/****/Sites/****/vendor/yiisoft/yii2/base/Module.php(534): yii\console\Controller->runAction('all', Array) #10 /Users/****/Sites/****/vendor/yiisoft/yii2/console/Application.php(181): yii\base\Module->runAction('migrate/all', Array) #11 /Users/****/Sites/****/vendor/craftcms/cms/src/console/Application.php(89): yii\console\Application->runAction('migrate/all', Array) #12 /Users/****/Sites/****/vendor/yiisoft/yii2/console/Application.php(148): craft\console\Application->runAction('migrate/all', Array) #13 /Users/****/Sites/****/vendor/yiisoft/yii2/base/Application.php(392): yii\console\Application->handleRequest(Object(craft\console\Request)) #14 /Users/****/Sites/****/craft(22): yii\base\Application->run() #15 {main} *** failed to apply m211014_234909_schema_id_to_schema_name (time: 0.274s) 0 from 1 migrations were applied. Migration failed. The rest of the migrations are canceled.
Fixed in https://github.com/jamesedmonston/graphql-authentication/commit/8b72cfdf03790f40a9eed2890c91a0292b32da46. Sorry! 1.12.1 should fix your issue.
1.12.1
I just tried upgrading to 1.12.0 but I get a migration error; using Craft 3.7.20