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

CreateUsersTable Migration Conflicts With Laravel's Default #198

Open
fulopattila122 opened this issue Jan 27, 2017 · 3 comments
Open

CreateUsersTable Migration Conflicts With Laravel's Default #198

fulopattila122 opened this issue Jan 27, 2017 · 3 comments

Comments

@fulopattila122
Copy link

The following migration file within this package: 2016_02_06_172606_create_users_table.php conflicts with Laravel's default CreateUsersTable migration.

When you publish Acl's migrations, run them and you try to rollback (any other) migration at a later time, artisan throws a duplicate class name CreateUsersTable exception.

I guess Acl's own create users table migration should have a different, compatible class name. Like CreateUsersTableIfNotExists. Laravel's own migration is definitely present in the vast majority of Laravel applications.

@LordZardeck
Copy link

Over 2 years on this, any chance of this getting resolved? Seems like an easy enough fix.

@LordZardeck
Copy link

Okay, so I see why this isn't an easy fix. Attempting to fix this myself, I see a couple issues:

  1. Class names for migrations are the same
  2. Can't execute migration for setting up user roles as the default users table created by Laravel uses big int primary key, which the migrations use
  3. Supposing you just modify the primary key type, you'll then run into the error when it tries to change the foreign key reference to big int

Seems like the only way to fix this is to have a destructive migration process. There should at least be documentation around this for users using the default users migration from laravel

@LordZardeck
Copy link

Apparently I'm not the first to encounter this: #145

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

2 participants