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

Generate:Migration Accepts "int" field type #399

Open
redknitin opened this issue Sep 29, 2014 · 0 comments
Open

Generate:Migration Accepts "int" field type #399

redknitin opened this issue Sep 29, 2014 · 0 comments

Comments

@redknitin
Copy link

When creating a migration using the Laravel 4 Generators, no validation error is displayed when using "int" instead of "integer".

Example
This should cause a validation error:

php artisan generate:migration create_emp_table --fields="name:string, dept_no:int"

This should pass validation:

php artisan generate:migration create_emp_table --fields="name:string, dept_no:integer"

Currently, because the "int" is accepted, the migration file is generated but on executing the migration with the command php artisan migrate, the migration fails with a:

{"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","me
ssage":"Call to undefined method Illuminate\Database\Schema\Blueprint::int()"
,"file":"C:\xampp\htdocs\darkangelofdemos\app\database\migrations\2014_09_29_090
445_create_emp_table.php","line":19}}

I've seen the issue reported in the title of #225, but the original message seems to have been blanked out and the issue closed.

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