1

Is anybody have problems with creating database in Laravel 4.1? Previous version was normal, but in 4.1 i create new database with

php artisan migrate:make create_users_table --create --table=users

and laravel don't put timestamps and increments automatically in migration.

3
  • Same issue. If you go into the Users model and put public $timestamps = true; that may auto add the timestamps Commented Dec 16, 2013 at 3:24
  • Well, it didn't create anything for me, and i find out that i was writing wrong syntax. The right way is to write --create=tablename and that worked for me Commented Dec 16, 2013 at 6:36
  • So the better way to create tables is using Way/Generator tools. Commented May 9, 2014 at 8:53

1 Answer 1

6

The syntax for creating a migration file has slightly changed in Laravel 4.1.

Laravel 4.1

php artisan migrate:make create_users_table --create=users

Laravel 4.0

php artisan migrate:make create_users_table --table=users --create

See the Creating Migrations section in the Laravel documentation and make sure to select 4.1 in the top.

Sign up to request clarification or add additional context in comments.

1 Comment

I just created a Laravel 4.1 project, and I used the command you show as 4.0 sytnax (ie. --table=users --create) and it worked just fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.