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

Initial user creation - Unknown column 'username' #145

Open
TaylorS opened this issue Nov 22, 2022 · 3 comments
Open

Initial user creation - Unknown column 'username' #145

TaylorS opened this issue Nov 22, 2022 · 3 comments

Comments

@TaylorS
Copy link

TaylorS commented Nov 22, 2022

Followed the quickstart and everything seems to be setup correct with the exception of the users table.

When I attempt to run bin/artisan p:user:make I get the following error:

In Connection.php line 712:

  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'username' in 'where clause' (SQL: select count(*) as aggregate from `users` where `username` = tobes)


In Exception.php line 18:

  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'username' in 'where clause'


In PDOConnection.php line 82:

  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'username' in 'where clause'

Looking at the database I see the users table has uuid but no username column :

+----------------+---------------------+------+-----+---------+----------------+
| Field          | Type                | Null | Key | Default | Extra          |
+----------------+---------------------+------+-----+---------+----------------+
| id             | int(10) unsigned    | NO   | PRI | NULL    | auto_increment |
| uuid           | char(36)            | NO   | UNI | NULL    |                |
| email          | varchar(191)        | NO   | UNI | NULL    |                |
| password       | text                | NO   |     | NULL    |                |
| remember_token | varchar(191)        | YES  |     | NULL    |                |
| language       | char(5)             | NO   |     | en      |                |
| root_admin     | tinyint(3) unsigned | NO   |     | 0       |                |
| use_totp       | tinyint(3) unsigned | NO   |     | NULL    |                |
| totp_secret    | char(16)            | YES  |     | NULL    |                |
| created_at     | timestamp           | YES  |     | NULL    |                |
| updated_at     | timestamp           | YES  |     | NULL    |                |
+----------------+---------------------+------+-----+---------+----------------+
11 rows in set (0.001 sec)

I am unsure where the failure is happening in terms of users table creation or of the p:users:make command is the issue?

@ccarney16
Copy link
Owner

It sounds like deployment was not completely successful, is this a new installation? If its new, check laravel logs in data/panel/storage/logs if your using my deployment solution.

@TaylorS
Copy link
Author

TaylorS commented Nov 25, 2022

You're correct, it looks like my containers are hitting [2002] Connection refused errors on setup. I am running Docker Desktop on Windows with WSL2 so I am guessing it is something to do with my docker configuration. I'll keep digging, thanks!

@TheUntraceable
Copy link

What was the fix to this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants