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

Problem with migrate #2

Closed
anhtuank7c opened this issue Sep 16, 2015 · 1 comment
Closed

Problem with migrate #2

anhtuank7c opened this issue Sep 16, 2015 · 1 comment

Comments

@anhtuank7c
Copy link
Contributor

Hi Author.
I get error when do migrate.

These tables was created:

Please help check!

@anhtuank7c
Copy link
Contributor Author

I found your problem.
The primary cannot be nullable.
So please remove ->nullable(); in permission_role and role_user:

So, well done.
But when you rollback migration, we met an error :D (not yet perfect ha).

Well, let fix it.
At the end of migrate file, you call #dropTable# function, but this function doest not exists in laravel 5.1 any more. Change to #drop# like this:
(You also forget to delete role_user table too.)
Schema::drop('role_user');
Schema::drop('permission_role');
Schema::drop('roles');
Schema::drop('permissions');


Retest migrate:reset. Wao. it's work like a boss.

fahmiardi added a commit to fahmiardi/laravel-permission that referenced this issue Dec 18, 2016
idoadiv pushed a commit to idoadiv/laravel-permission that referenced this issue Sep 9, 2017
freekmurze pushed a commit that referenced this issue Sep 10, 2017
* Added permission scope to HasRoles trait

* Fix CI notes

* Fix CI notes

* Fix CI notes

* Fix CI notes

* CR Fix

* Fix CI Notes

* Fix CI Notes

* CR fix #2

* Add documentation
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

1 participant