Skip to content
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

Error seeding database #77

Closed
pacoorozco opened this issue Mar 22, 2020 · 0 comments · Fixed by #78
Closed

Error seeding database #77

pacoorozco opened this issue Mar 22, 2020 · 0 comments · Fixed by #78
Assignees
Labels
bug Something isn't working

Comments

@pacoorozco
Copy link
Owner

Describe the bug
After a fresh install, there is an error when i'm seeding the database:

$ docker-compose exec app php artisan migrate --seed

Nothing to migrate.
Seeding: UserTableSeeder

   Illuminate\Database\QueryException  : SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'user' for key 'users_username_unique' (SQL: insert into `users` (`name`, `username`, `email`, `password`, `role`, `updated_at`, `created_at`) values (User, user, user@example.com, $2y$10$arlg73tzxYgtawP6kSX46.lKEcesfZjz67sKoNSIQmfo1zuEbqcPu, user, 2020-03-22 13:31:53, 2020-03-22 13:31:53))

  at /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669
    665|         // If an exception occurs when attempting to run a query, we'll format the error
    666|         // message to include the bindings with SQL, which will make this exception a
    667|         // lot more helpful to the developer instead of just the database's errors.
    668|         catch (Exception $e) {
  > 669|             throw new QueryException(
    670|                 $query, $this->prepareBindings($bindings), $e
    671|             );
    672|         }
    673| 

  Exception trace:

  1   PDOException::("SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'user' for key 'users_username_unique'")
      /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:463

  2   PDOStatement::execute()
      /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:463

  Please use the argument -v to see more details.

@pacoorozco pacoorozco added the bug Something isn't working label Mar 22, 2020
@pacoorozco pacoorozco self-assigned this Mar 22, 2020
@pacoorozco pacoorozco mentioned this issue Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant