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

Migrate:refresh and migrate:rollback error #209

Closed
ObaidParacha opened this issue Jun 20, 2016 · 7 comments

Comments

Projects
None yet
4 participants
@ObaidParacha
Copy link

commented Jun 20, 2016

I create a scaffold through generator builder with datatables. It creates everything Model, Views, Datatables, Migration etc. But when I run migrate:refresh or migrate:rollback, it gives me error that

"[Symfony\Component\Debug\Exception\FatalThrowableError]
class 'CreateStudentTable' not found"

Any solutions?'

edit: it gives error against latest migration, if CreateResultTable is last then it will give error on that.

@mitulgolakiya

This comment has been minimized.

Copy link
Member

commented Jun 25, 2016

@mastermind23 Have you checked if original migration file is there ?

@laurensclaessen

This comment has been minimized.

Copy link

commented Jul 6, 2016

The migration template uses the lowercase table name Create$TABLE_NAME$Table to create the Class, but it should use the PascalCase Model name.

Changing it to Create$MODEL_NAME_PLURAL$Table will do the trick.

@ObaidParacha

This comment has been minimized.

Copy link
Author

commented Jul 9, 2016

@mitulgolakiya Yes the original migration files exists. I have tested it multiple times and always it gives error with the name of the last migration.

@ObaidParacha

This comment has been minimized.

Copy link
Author

commented Jul 9, 2016

vendor/infyomlabs/laravel-generator/templates/migration.stub
Changed Create$MODEL_NAME_PLURAL$Table.
worked fine issue resolved thus far, one of my migrations is giving same error, most probably some syntax error or something, i'll create new migration but my main issue have been resolved.

Thanx @laurensclaessen

@ObaidParacha

This comment has been minimized.

Copy link
Author

commented Jul 21, 2016

again something went wrong with update of infyom.

previous all migrations are working fine and can rollback, but creating new model with generator-builder. it fails to migrate, also if i manually migrate that, the same issue returns where i can't rollback the latest migration

@mitulgolakiya

This comment has been minimized.

Copy link
Member

commented Jul 21, 2016

@mastermind23, I was on a vacation. just came today. will review it and will fix it by this weekend.

@ptsilva

This comment has been minimized.

Copy link
Contributor

commented Jul 21, 2016

@mitulgolakiya
see #222, this PR fix this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.