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 error [ErrorException] Undefined variable: table #61

Open
MrDinsdale opened this issue Apr 10, 2014 · 8 comments
Open

Migrate error [ErrorException] Undefined variable: table #61

MrDinsdale opened this issue Apr 10, 2014 · 8 comments

Comments

@MrDinsdale
Copy link

Hey,

Getting an error when running php artisan migrate:

[ErrorException]
Undefined variable: table

migrate [--bench[="..."]] [--database[="..."]] [--path[="..."]] [--package[="..."]] [--pretend] [--seed]

Not sure if its something i've done wrong but any suggestions would be appreciated!

Joe

@bryannielsen
Copy link
Owner

Hey Joe,

This sounds like an error in your Laravel migrations. I could take a quick look at them if you want to make a gist of your migration files (should be in app/database/migrations/) and send it over.

Thanks!
-Bryan

@andreas-bergstrom
Copy link

You probably forgot to wrap you column generators in Schema::create('users', function($table) {});

@ghost
Copy link

ghost commented Oct 19, 2014

Look in your migrations files..
Maybe you use the variable $table but need to use $Table (T uppercase?)

@cveranoa
Copy link

Look
table function does not exist
Use
Schema::create('users', function($table)

@droidchef
Copy link

@MrDinsdale It can even happen if you've added dropForiegn() or dropColumn() methods unnecessarily in your down() method for a Create Table Migration.

@rhezav95
Copy link

rhezav95 commented May 9, 2016

@MrDinsdale maybe the foreign key that you wrote is outside the schema{}

@dib90
Copy link

dib90 commented May 10, 2017

@YvesBoah
Copy link

Mercii cette Astuce m'a bien aidé dib90

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

8 participants