migration fails due to missing default value for teams.owner_id
Lord-Ptolemy opened this issue · 1 comments
Lord-Ptolemy commented
PHP Version:
ptolemy@s99860:~$ php -v
PHP 7.2.4-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Apr 5 2018 08:53:57) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.4-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
MariaDB Version:
ptolemy@s99860:~$ mysql -V
mysql Ver 15.1 Distrib 10.2.14-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
Terminal Output:
ptolemy@s99860:/var/www/solder.uskarian.net$ php artisan solder:install
>> Welcome to the Solder installation process! <<
App URL [http://localhost]:
> https://solder.uskarian.net
Database name [solder]:
> technic_solder
Database host [localhost]:
>
Database port [3306]:
>
Database user:
> technic_solder
Database password ("null" for no password):
>
Do you want to migrate the database? (yes/no) [yes]:
> yes
Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table
Migrated: 2014_10_12_000000_create_users_table
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated: 2014_10_12_100000_create_password_resets_table
Migrating: 2016_06_01_000001_create_oauth_auth_codes_table
Migrated: 2016_06_01_000001_create_oauth_auth_codes_table
Migrating: 2016_06_01_000002_create_oauth_access_tokens_table
Migrated: 2016_06_01_000002_create_oauth_access_tokens_table
Migrating: 2016_06_01_000003_create_oauth_refresh_tokens_table
Migrated: 2016_06_01_000003_create_oauth_refresh_tokens_table
Migrating: 2016_06_01_000004_create_oauth_clients_table
Migrated: 2016_06_01_000004_create_oauth_clients_table
Migrating: 2016_06_01_000005_create_oauth_personal_access_clients_table
Migrated: 2016_06_01_000005_create_oauth_personal_access_clients_table
Migrating: 2017_09_04_014947_create_modpacks_table
Migrated: 2017_09_04_014947_create_modpacks_table
Migrating: 2017_09_04_040655_create_builds_table
Migrated: 2017_09_04_040655_create_builds_table
Migrating: 2017_09_05_054554_create_releases_table
Migrated: 2017_09_05_054554_create_releases_table
Migrating: 2017_09_05_054822_create_build_release_table
Migrated: 2017_09_05_054822_create_build_release_table
Migrating: 2017_09_06_032546_create_packages_table
Migrated: 2017_09_06_032546_create_packages_table
Migrating: 2017_09_06_154609_create_keys_table
Migrated: 2017_09_06_154609_create_keys_table
Migrating: 2017_09_09_154654_create_clients_table
Migrated: 2017_09_09_154654_create_clients_table
Migrating: 2017_10_14_172600_create_roles_table
Migrated: 2017_10_14_172600_create_roles_table
Migrating: 2017_10_14_172837_create_permissions_table
Migrated: 2017_10_14_172837_create_permissions_table
Migrating: 2017_11_08_182018_create_collaborators_table
Migrated: 2017_11_08_182018_create_collaborators_table
Migrating: 2018_03_14_100000_create_client_exposes_table
Migrated: 2018_03_14_100000_create_client_exposes_table
Migrating: 2018_04_02_054318_create_teams_table
Migrated: 2018_04_02_054318_create_teams_table
Migrating: 2018_04_02_054428_create_team_user_table
Migrated: 2018_04_02_054428_create_team_user_table
In Connection.php line 664:
SQLSTATE[HY000]: General error: 1364 Field 'owner_id' doesn't have a default value (SQL: insert into `teams` (`name`, `slug`, `updated_at`, `created_at`) values (Default Team, default, 2018-
04-07 23:41:52, 2018-04-07 23:41:52))
In Connection.php line 458:
SQLSTATE[HY000]: General error: 1364 Field 'owner_id' doesn't have a default value
laravel.log Snippet:
[2018-04-07 23:41:52] local.ERROR: SQLSTATE[HY000]: General error: 1364 Field 'owner_id' doesn't have a default value (SQL: insert into `teams` (`name`, `slug`, `updated_at`, `created_at`) values (Default Team, default, 2018-04-07 23:41:52, 2018-04-07 23:41:52)) {"exception":"[object] (Illuminate\\Database\\QueryException(code: HY000): SQLSTATE[HY000]: General error: 1364 Field 'owner_id' doesn't have a default value (SQL: insert into `teams` (`name`, `slug`, `updated_at`, `created_at`) values (Default Team, default, 2018-04-07 23:41:52, 2018-04-07 23:41:52)) at /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664, PDOException(code: HY000): SQLSTATE[HY000]: General error: 1364 Field 'owner_id' doesn't have a default value at /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Connection.php:458)
[stacktrace]
#0 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Connection.php(624): Illuminate\\Database\\Connection->runQueryCallback('insert into `te...', Array, Object(Closure))
#1 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Connection.php(459): Illuminate\\Database\\Connection->run('insert into `te...', Array, Object(Closure))
#2 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Connection.php(411): Illuminate\\Database\\Connection->statement('insert into `te...', Array)
#3 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\\Database\\Connection->insert('insert into `te...', Array)
#4 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2294): Illuminate\\Database\\Query\\Processors\\Processor->processInsertGetId(Object(Illuminate\\Database\\Query\\Builder), 'insert into `te...', Array, 'id')
#5 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1285): Illuminate\\Database\\Query\\Builder->insertGetId(Array, 'id')
#6 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(726): Illuminate\\Database\\Eloquent\\Builder->__call('insertGetId', Array)
#7 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(691): Illuminate\\Database\\Eloquent\\Model->insertAndSetId(Object(Illuminate\\Database\\Eloquent\\Builder), Array)
#8 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(554): Illuminate\\Database\\Eloquent\\Model->performInsert(Object(Illuminate\\Database\\Eloquent\\Builder))
#9 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(757): Illuminate\\Database\\Eloquent\\Model->save()
#10 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Support/helpers.php(1043): Illuminate\\Database\\Eloquent\\Builder->Illuminate\\Database\\Eloquent\\{closure}(Object(App\\Team))
#11 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(758): tap(Object(App\\Team), Object(Closure))
#12 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1504): Illuminate\\Database\\Eloquent\\Builder->create(Array)
#13 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1516): Illuminate\\Database\\Eloquent\\Model->__call('create', Array)
#14 /var/www/solder.uskarian.net/database/seeds/DatabaseSeeder.php(32): Illuminate\\Database\\Eloquent\\Model::__callStatic('create', Array)
#15 [internal function]: DatabaseSeeder->run()
#16 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#17 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#18 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#19 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Container/Container.php(564): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#20 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Seeder.php(122): Illuminate\\Container\\Container->call(Array)
#21 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php(63): Illuminate\\Database\\Seeder->__invoke()
#22 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php(122): Illuminate\\Database\\Console\\Seeds\\SeedCommand->Illuminate\\Database\\Console\\Seeds\\{closure}()
#23 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php(64): Illuminate\\Database\\Eloquent\\Model::unguarded(Object(Closure))
#24 [internal function]: Illuminate\\Database\\Console\\Seeds\\SeedCommand->handle()
#25 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#26 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#27 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#28 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Container/Container.php(564): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#29 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\\Container\\Container->call(Array)
#30 /var/www/solder.uskarian.net/vendor/symfony/console/Command/Command.php(252): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
#31 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Console/Command.php(170): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
#32 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Console/Command.php(198): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
#33 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(84): Illuminate\\Console\\Command->call('db:seed', Array)
#34 [internal function]: Illuminate\\Database\\Console\\Migrations\\MigrateCommand->handle()
#35 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#36 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#37 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#38 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Container/Container.php(564): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#39 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\\Container\\Container->call(Array)
#40 /var/www/solder.uskarian.net/vendor/symfony/console/Command/Command.php(252): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
#41 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Console/Command.php(170): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
#42 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Console/Command.php(198): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
#43 /var/www/solder.uskarian.net/app/Console/Commands/InstallCommand.php(100): Illuminate\\Console\\Command->call('migrate', Array)
#44 /var/www/solder.uskarian.net/app/Console/Commands/InstallCommand.php(43): App\\Console\\Commands\\InstallCommand->migrateDatabase()
#45 [internal function]: App\\Console\\Commands\\InstallCommand->handle()
#46 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#47 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#48 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#49 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Container/Container.php(564): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#50 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\\Container\\Container->call(Array)
#51 /var/www/solder.uskarian.net/vendor/symfony/console/Command/Command.php(252): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#52 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Console/Command.php(170): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#53 /var/www/solder.uskarian.net/vendor/symfony/console/Application.php(865): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#54 /var/www/solder.uskarian.net/vendor/symfony/console/Application.php(241): Symfony\\Component\\Console\\Application->doRunCommand(Object(App\\Console\\Commands\\InstallCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#55 /var/www/solder.uskarian.net/vendor/symfony/console/Application.php(143): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#56 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Console/Application.php(88): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#57 /var/www/solder.uskarian.net/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#58 /var/www/solder.uskarian.net/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#59 {main}
"}
Indemnity83 commented
Thanks for the detailed bug report!