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

Can't create user #251

Closed
d8vjork opened this issue May 25, 2017 · 10 comments
Closed

Can't create user #251

d8vjork opened this issue May 25, 2017 · 10 comments

Comments

@d8vjork
Copy link

d8vjork commented May 25, 2017

Hi, Yesterday I discover that fantastic project (congrats for your progress with it).

I'm trying to create a user with artisan command:
php artisan make:admin nickname email@email.com secretpassword

And on installation, but it says User already exists! (artisan command), and the installation doesn't create any user.

I'm working local on Windows 10 with PHP-FPM, IIS (but I try with php serve command). So I will contribute with this project.

@tabuna
Copy link
Member

tabuna commented May 25, 2017

Hi, can you say more information
What software do you use? And what version? (PHP, Laravel, MySQL or PostgreSQL)

@d8vjork
Copy link
Author

d8vjork commented May 25, 2017

Yes, Laravel 5.4 (last version, fresh installation), PHP 7.1.2, MariaDB 10.1.21

@tabuna
Copy link
Member

tabuna commented May 25, 2017

JSON format support MariaDB 10.2

@d8vjork
Copy link
Author

d8vjork commented May 25, 2017

Ok, so you have json in migrations.

Thanks, I try upgrading MariaDB 👍

@d8vjork d8vjork closed this as completed May 25, 2017
@d8vjork
Copy link
Author

d8vjork commented May 25, 2017

Ok, sorry, but still can't because migrations of Orchid doesn't migrate (the user schema that I can see in my database is the user from Laravel fresh installation).

So the make:admin command return the query exception

@d8vjork d8vjork reopened this May 25, 2017
@tabuna
Copy link
Member

tabuna commented May 25, 2017

You made
php artisan vendor:publish &
php artisan migrate ?
At these stages there were no problems?

@d8vjork
Copy link
Author

d8vjork commented May 25, 2017

Yes, I change the query exception for make:admin command and this is the result:

https://gist.github.com/d8vjork/71264a2f0b909ac17c16ec0379662602

The solution: I change the json/jsonb to text from some migration files and run php artisan migrate (and yes, I upgrade MariaDB to 10.2 but it continues having problems with JSON from Laravel).

Edit: And having no issues from Roles editor, maybe I recommend change JSON/JSONB to TEXT datatype for MySQL/MariaDB compatibility.

@tabuna
Copy link
Member

tabuna commented May 25, 2017

But he also clearly says that not all migrations have passed.
I need some time to reproduce the problem on MariaDB

@tabuna
Copy link
Member

tabuna commented May 25, 2017

I was able to reproduce the problem and get an error.
But, as it turned out the JSON type is still not supported in MariaDB.

  [Illuminate\Database\QueryException]                                                                                                                                                                                                                              
  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json not null, `created_at` timestamp null, `updated_at` timest  
  amp null) default' at line 1 (SQL: create table `roles` (`id` int unsigned not null auto_increment primary key, `slug` varchar(255) not null, `name` varchar(255) not null, `permissions` json not null, `created_at` timestamp null, `updated_at` timestamp nul  
  l) default character set utf8 collate utf8_unicode_ci)                                                                                                                                                                                                            

Link 1
Link 2
Link 3

I can not change the values from json to text or blob, since I suppose to use select and updates in the json

@tabuna tabuna closed this as completed May 25, 2017
@d8vjork
Copy link
Author

d8vjork commented May 25, 2017

So, this only support MariaDB 10.3 (alpha) / MySQL 5.7 and future versions of both.

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

No branches or pull requests

2 participants