You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the title says, when I call php artisan flox:db twice, it will ask for a admin username and password even though an account already exists. It throws an error as shown below. I haven't used this software for long, but when Flox gets updated I need to call this command again to update the database, correct?
I ask this because I'm creating a docker image and I call php artisan flox:db admin password so the database can be initialized (and updated, if needed), and to create a default login.
> php artisan flox:db admin password
TRYING TO MIGRATE DATABASE
Nothing to migrate.
MIGRATION COMPLETED
In Connection.php line 669:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'admi
n' for key 'users_username_unique' (SQL: insert into `users` (`username`, `
password`, `updated_at`, `created_at`) values (admin, $2y$10$lSOtTRAlNmEvZ2
cbFYXmwOemYbTNi2anhbBzXIabZVkGFmC3C6LuC, 2020-01-23 04:31:11, 2020-01-23 04
:31:11))
In PDOStatement.php line 123:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'admi
n' for key 'users_username_unique'
In PDOStatement.php line 121:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'admi
n' for key 'users_username_unique
The text was updated successfully, but these errors were encountered:
No, as you've noticed the command is not idempotent and should only be used once for initializing the DB.
What you probably want is php artisan migrate for updating.
As the title says, when I call
php artisan flox:db
twice, it will ask for a admin username and password even though an account already exists. It throws an error as shown below. I haven't used this software for long, but when Flox gets updated I need to call this command again to update the database, correct?I ask this because I'm creating a docker image and I call
php artisan flox:db admin password
so the database can be initialized (and updated, if needed), and to create a default login.The text was updated successfully, but these errors were encountered: