Closed baur closed 3 years ago
OS: Windows Server 2016 DB: Posgres v12 PHP: 7.4.16 PostgreSQL(libpq) Version | 11.4
D:\WEB\xampp\htdocs\tasktracker>yii migrate Yii Migration Tool (based on Yii v2.0.15.1) Creating migration history table "migration"...Done. Total 5 new migrations to be applied: m180901_230238_task_status m180901_230305_users m180901_230314_tasks m191123_061607_email_for_users m210214_120909_settings Apply the above migrations? (yes|no) [no]:yes *** applying m180901_230238_task_status > create table task_status ... done (time: 0.088s) > insert into task_status ... done (time: 0.163s) > insert into task_status ... done (time: 0.273s) > insert into task_status ... done (time: 0.042s) > insert into task_status ... done (time: 0.041s) > insert into task_status ... done (time: 0.042s) > insert into task_status ... done (time: 0.041s) > insert into task_status ... done (time: 0.042s) *** applied m180901_230238_task_status (time: 0.909s) *** applying m180901_230305_users > execute SQL: ALTER TABLE "auth_assignment" ALTER COLUMN "user_id" TYPE bigint USING ("user_id"::numeric::bigint) ...Exception: SQLSTATE[42P01]: Undefined table: 7 ОШИБКА: отношение "auth_assignment" не существует The SQL being executed was: ALTER TABLE "auth_assignment" ALTER COLUMN "user_id" TYPE bigint USING ("user_id"::numeric::bigint) (D:\WEB\xampp\htdocs\tasktracker\vendor\yiisoft\yii2\db\Schema.php:664) #0 D:\WEB\xampp\htdocs\tasktracker\vendor\yiisoft\yii2\db\Command.php(1263): yii\db\Schema->convertException(Object(PDOException), 'ALTER TABLE "au...') #1 D:\WEB\xampp\htdocs\tasktracker\vendor\yiisoft\yii2\db\Command.php(1075): yii\db\Command->internalExecute('ALTER TABLE "au...') #2 D:\WEB\xampp\htdocs\tasktracker\vendor\yiisoft\yii2\db\Migration.php(219): yii\db\Command->execute() #3 D:\WEB\xampp\htdocs\tasktracker\migrations\m180901_230305_users.php(21): yii\db\Migration->execute('ALTER TABLE "au...') #4 D:\WEB\xampp\htdocs\tasktracker\vendor\yiisoft\yii2\db\Migration.php(114): m180901_230305_users->safeUp() #5 D:\WEB\xampp\htdocs\tasktracker\vendor\yiisoft\yii2\console\controllers\BaseMigrateController.php(725): yii\db\Migration->up() #6 D:\WEB\xampp\htdocs\tasktracker\vendor\yiisoft\yii2\console\controllers\BaseMigrateController.php(199): yii\console\controllers\BaseMigrateController->migrateUp('m180901_230305_...') #7 [internal function]: yii\console\controllers\BaseMigrateController->actionUp(0) #8 D:\WEB\xampp\htdocs\tasktracker\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array(Array, Array) #9 D:\WEB\xampp\htdocs\tasktracker\vendor\yiisoft\yii2\base\Controller.php(157): yii\base\InlineAction->runWithParams(Array) #10 D:\WEB\xampp\htdocs\tasktracker\vendor\yiisoft\yii2\console\Controller.php(148): yii\base\Controller->runAction('', Array) #11 D:\WEB\xampp\htdocs\tasktracker\vendor\yiisoft\yii2\base\Module.php(528): yii\console\Controller->runAction('', Array) #12 D:\WEB\xampp\htdocs\tasktracker\vendor\yiisoft\yii2\console\Application.php(180): yii\base\Module->runAction('migrate', Array) #13 D:\WEB\xampp\htdocs\tasktracker\vendor\yiisoft\yii2\console\Application.php(147): yii\console\Application->runAction('migrate', Array) #14 D:\WEB\xampp\htdocs\tasktracker\vendor\yiisoft\yii2\base\Application.php(386): yii\console\Application->handleRequest(Object(yii\console\Request)) #15 D:\WEB\xampp\htdocs\tasktracker\yii(20): yii\base\Application->run() #16 {main} *** failed to apply m180901_230305_users (time: 0.125s) 1 from 5 migration was applied. Migration failed. The rest of the migrations are canceled. D:\WEB\xampp\htdocs\tasktracker>
Отбой, оказывается я по старой инструкции, по новой yii migrate --migrationPath=@yii/rbac/migrations/ идет первым
yii migrate --migrationPath=@yii/rbac/migrations/
OS: Windows Server 2016 DB: Posgres v12 PHP: 7.4.16 PostgreSQL(libpq) Version | 11.4