-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v5.0.0-beta-7-GM] Database migration (creation) fails during install #8513
Comments
Looks like it's caused by one of the migrations, specifically... It appears this migration is to get ready for the next Laravel upgrade. But it does not appear to be complete, and appears to be included in this release in error. Deleting that migration file is a temporary work around to get up and running. |
@adagioajanes First off, thanks so much for testing - it's a big help, and we really appreciate it.
Yes and no. Passport migrations should be happening automatically through regular migrations.
That effectively means that even if the migration isn't in the I had thought we manually published those migrations (just to be thorough), but I don't see them. My guess is that something may have changed between Laravel versions where those migrations fire after our own, which obviously would cause an issue, since the table we're trying to alter doesn't exist yet. In the before times, it ran before ours. I'm about to push out the manual migrations, but I have to do a table check beforehand. I'd expect the built-in, service-provider provided migrations to exist already in the database, but then again, this issue shouldn't have come up if everything was working correctly. I don't think this is an issue with us, exactly? Or if it is, it's something that changed in Laravel where we needed to add a line that we didn't add because didn't know we needed to do it. Either way, I'll have a fix out shortly (hour or less) on develop. Commenting out or deleting a migration is something no one should ever do under any circumstances. If we had a migration that was intended to alter a table for future-proofing, you just create a footgun and in six months when you try to upgrade and you can't figure out why it's failing, we won't know why either. |
…ation_fsckery Fixed #8513 - Manually created oauth tables
This is now merged to develop - let me know if this resolves your issue. |
👍 Absolutely makes sense. This was a test instance, so I knew there could be, and was willing to accept the consequences for having done it. I used to dabble in Laravel myself, so I was able to determine that this was just making a change to a column. Since the column didn't exist in the first place (at least in a fresh v5b7 build), I knew it wasn't going to be much worse to just delete the migration for now, so I can test unrelated things. I will whip up a fresh instance with the latest development build and see how far I get.
:( |
What if I ran composer install before configuring the environment? Just realized that I may have done that. |
Unsure if I should post this here, or create a new issue, but... So, I am unable to test the fix until this is also fixed in the develop branch ;) EDIT: I'll create a new issue for this and link it here once I do. |
This should be fixed on develop |
Please confirm you have done the following before posting your bug report:
Describe the bug
When installing fresh with v5.0.0 beta 7, it encounters an error when creating the database. Specifically, "There is no column with name 'secret' on table 'oauth_clients'."
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Tables should create successfully.
Screenshots
Server (please complete the following information):
Desktop (please complete the following information):
Error Messages
[2020-10-13 13:56:55] production.ERROR: There is no column with name 'secret' on table 'oauth_clients'. {"exception":"[object] (Doctrine\DBAL\Schema\SchemaException(code: 30): There is no column with name 'secret' on table 'oauth_clients'. at D:\home\site\wwwroot\vendor\doctrine\dbal\lib\Doctrine\DBAL\Schema\SchemaException.php:85)
[stacktrace]
#0 D:\home\site\wwwroot\vendor\doctrine\dbal\lib\Doctrine\DBAL\Schema\Table.php(662): Doctrine\DBAL\Schema\SchemaException::columnDoesNotExist('secret', 'oauth_clients')
#1 D:\home\site\wwwroot\vendor\doctrine\dbal\lib\Doctrine\DBAL\Schema\Table.php(324): Doctrine\DBAL\Schema\Table->getColumn('secret')
#2 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Database\Schema\Grammars\ChangeColumn.php(106): Doctrine\DBAL\Schema\Table->changeColumn('secret', Array)
#3 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Database\Schema\Grammars\ChangeColumn.php(76): Illuminate\Database\Schema\Grammars\ChangeColumn::getDoctrineColumn(Object(Doctrine\DBAL\Schema\Table), Object(Illuminate\Database\Schema\ColumnDefinition))
#4 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Database\Schema\Grammars\ChangeColumn.php(60): Illuminate\Database\Schema\Grammars\ChangeColumn::getTableWithColumnChanges(Object(Illuminate\Database\Schema\Blueprint), Object(Doctrine\DBAL\Schema\Table))
#5 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Database\Schema\Grammars\ChangeColumn.php(37): Illuminate\Database\Schema\Grammars\ChangeColumn::getChangedDiff(Object(Illuminate\Database\Schema\Grammars\MySqlGrammar), Object(Illuminate\Database\Schema\Blueprint), Object(Doctrine\DBAL\Schema\MySqlSchemaManager))
#6 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Database\Schema\Grammars\Grammar.php(55): Illuminate\Database\Schema\Grammars\ChangeColumn::compile(Object(Illuminate\Database\Schema\Grammars\MySqlGrammar), Object(Illuminate\Database\Schema\Blueprint), Object(Illuminate\Support\Fluent), Object(Illuminate\Database\MySqlConnection))
#7 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Database\Schema\Blueprint.php(123): Illuminate\Database\Schema\Grammars\Grammar->compileChange(Object(Illuminate\Database\Schema\Blueprint), Object(Illuminate\Support\Fluent), Object(Illuminate\Database\MySqlConnection))
#8 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Database\Schema\Blueprint.php(96): Illuminate\Database\Schema\Blueprint->toSql(Object(Illuminate\Database\MySqlConnection), Object(Illuminate\Database\Schema\Grammars\MySqlGrammar))
#9 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Database\Schema\Builder.php(290): Illuminate\Database\Schema\Blueprint->build(Object(Illuminate\Database\MySqlConnection), Object(Illuminate\Database\Schema\Grammars\MySqlGrammar))
#10 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Database\Schema\Builder.php(151): Illuminate\Database\Schema\Builder->build(Object(Illuminate\Database\Schema\Blueprint))
#11 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php(261): Illuminate\Database\Schema\Builder->table('oauth_clients', Object(Closure))
#12 D:\home\site\wwwroot\database\migrations\2019_12_04_223111_passport_upgrade.php(18): Illuminate\Support\Facades\Facade::__callStatic('table', Array)
#13 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php(392): PassportUpgrade->up()
#14 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php(401): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#15 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php(200): Illuminate\Database\Migrations\Migrator->runMigration(Object(PassportUpgrade), 'up')
#16 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php(165): Illuminate\Database\Migrations\Migrator->runUp('D:\\home\\site\\ww...', 1, false)
#17 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php(110): Illuminate\Database\Migrations\Migrator->runPending(Array, Array)
#18 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Database\Console\Migrations\MigrateCommand.php(71): Illuminate\Database\Migrations\Migrator->run(Array, Array)
#19 [internal function]: Illuminate\Database\Console\Migrations\MigrateCommand->handle()
#20 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(32): call_user_func_array(Array, Array)
#21 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Container\Util.php(36): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#22 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(90): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#23 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(34): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#24 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Container\Container.php(590): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#25 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Console\Command.php(134): Illuminate\Container\Container->call(Array)
#26 D:\home\site\wwwroot\vendor\symfony\console\Command\Command.php(255): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
#27 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Console\Command.php(121): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
#28 D:\home\site\wwwroot\vendor\symfony\console\Application.php(1001): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
#29 D:\home\site\wwwroot\vendor\symfony\console\Application.php(271): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Database\Console\Migrations\MigrateCommand), Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
#30 D:\home\site\wwwroot\vendor\symfony\console\Application.php(147): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
#31 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Console\Application.php(93): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
#32 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Console\Application.php(185): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
#33 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(273): Illuminate\Console\Application->call('migrate', Array, NULL)
#34 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php(261): Illuminate\Foundation\Console\Kernel->call('migrate', Array)
#35 D:\home\site\wwwroot\app\Http\Controllers\SettingsController.php(247): Illuminate\Support\Facades\Facade::__callStatic('call', Array)
#36 [internal function]: App\Http\Controllers\SettingsController->getSetupMigrate()
#37 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Routing\Controller.php(54): call_user_func_array(Array, Array)
#38 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('getSetupMigrate', Array)
#39 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Routing\Route.php(219): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(App\Http\Controllers\SettingsController), 'getSetupMigrate')
#40 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Routing\Route.php(176): Illuminate\Routing\Route->runController()
#41 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Routing\Router.php(681): Illuminate\Routing\Route->run()
#42 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(130): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#43 D:\home\site\wwwroot\vendor\laravel\passport\src\Http\Middleware\CreateFreshApiToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#44 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#45 D:\home\site\wwwroot\app\Http\Middleware\CheckForTwoFactor.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#46 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckForTwoFactor->handle(Object(Illuminate\Http\Request), Object(Closure))
#47 D:\home\site\wwwroot\app\Http\Middleware\CheckLocale.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#48 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckLocale->handle(Object(Illuminate\Http\Request), Object(Closure))
#49 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php(76): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#50 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#51 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#52 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#53 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php(66): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#54 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#55 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#56 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Routing\Router.php(683): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#57 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Routing\Router.php(658): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#58 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Routing\Router.php(624): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#59 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Routing\Router.php(613): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#60 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(170): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#61 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(130): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#62 D:\home\site\wwwroot\vendor\barryvdh\laravel-debugbar\src\Middleware\InjectDebugbar.php(65): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#63 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle(Object(Illuminate\Http\Request), Object(Closure))
#64 D:\home\site\wwwroot\app\Http\Middleware\SecurityHeaders.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#65 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\SecurityHeaders->handle(Object(Illuminate\Http\Request), Object(Closure))
#66 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#67 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#68 D:\home\site\wwwroot\app\Http\Middleware\CheckForDebug.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#69 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckForDebug->handle(Object(Illuminate\Http\Request), Object(Closure))
#70 D:\home\site\wwwroot\app\Http\Middleware\CheckForSetup.php(34): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#71 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckForSetup->handle(Object(Illuminate\Http\Request), Object(Closure))
#72 D:\home\site\wwwroot\vendor\fideloper\proxy\src\TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#73 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#74 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#75 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#76 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(56): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#77 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#78 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#79 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#80 D:\home\site\wwwroot\vendor\barryvdh\laravel-cors\src\HandlePreflight.php(29): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#81 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Barryvdh\Cors\HandlePreflight->handle(Object(Illuminate\Http\Request), Object(Closure))
#82 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#83 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(145): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#84 D:\home\site\wwwroot\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#85 D:\home\site\wwwroot\public\index.php(58): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#86 {main}
"}
Additional context
The text was updated successfully, but these errors were encountered: