Open jakubgs opened 2 years ago
did you tried seeding the settings first? the missing country field comes from the settings model
Yes, I tried both, as you can see from my issue description.
It appears seeding the database is necessary, but it is not doable multiple times, so I have to do an SQL query first - in my case SELECT name FROM users;
- in order to check if the database was already seeded, and then I call php artisan db:seed --force --no-interaction
, because otherwise it would fail during multiple Ansible runs.
It would be much better if there was an php artisan user:add
command.
Hi @jakubgs You are right for the production you have to set up by hand. a command to do it would be cool. And I'll gladly accept a PR for it. But for now, it's either by hand DB insert or tinker. Or use db:seed and create and change the user that is created by default.
I understand from the docs that it is recommended to create the database schema by calling:
https://github.com/Bottelet/DaybydayCRM/wiki/Install https://github.com/Bottelet/DaybydayCRM/wiki/Install-using-Docker
But is the
--seed
part necessary? I tried using it without--seed
and then creating an admin user with:But when I try to login using that user I get:
But if I try to create the same user after using
migrate
with--seed
I get:So how am I supposed to do this? Should this even work without
--seed
? And if not, how should I create the first user?I was thinking of updating the seeded admin this way:
Does this make sense?