Laravel-4-Generators icon indicating copy to clipboard operation
Laravel-4-Generators copied to clipboard

DB Migration not generated correctly.

Open gh4dp opened this issue 10 years ago • 1 comments

The following code is generated on the latest code of generators - i.e: "way/generators": "*" in my composer.json.

php artisan generate:scaffold --fields="sermon_id:integer,author_id:integer,album_id:integer,scheduleddate:date,description:string[80]" sermonmediae

As you can see the up() function really is not correct table generation script. I tried to fix this for last few tables but am tired of manually fixing this.

What causes this? How to fix this?

increments('id'); $table->integer,author_id('sermon_id')->integer,album_id()->integer,scheduleddate()->date,description()->string[80](); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('sermonmediaes'); } ``` }

gh4dp avatar May 14 '14 19:05 gh4dp

Duplicate #326

foxted avatar May 15 '14 06:05 foxted