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

Migrations generated from resources file cause name collisions #44

Open
ShaunaGordon opened this issue Aug 10, 2017 · 0 comments
Open

Comments

@ShaunaGordon
Copy link

It seems wn:resources doesn't check to see if a create file for the resource's table already exists. When combined with the automatic migration attempt, this results in a cannot redeclare class error, which kills the migration.

Steps to reproduce:

  1. Create a resource using the single wn:resource command.
  2. Create resources (including the previously-created resource) with a file and the wn:resources command.

Expected actions would probably be to look for that class name and one of:

  1. Adjust the name of the incoming generated class so as to not collide
  2. Overwrite the found class file (probably not recommended in most cases, but may be useful with the --force switch)
  3. Not create a migration file for that resource (or better yet, create an update migration with the changes from the existing schema)
davidporos92 added a commit to davidporos92/lumen-generators that referenced this issue Oct 20, 2017
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