Laravel: Creating DB Table definition (make:migration)

C:\wamp\www\blog2>php artisan make:migration create_meetings_table –create=meetings
Created Migration: 2017_03_26_062354_create_meetings_table

C:\wamp\www\blog2>

It will create the following file:

C:\wamp\www\blog2\database\migrations\2017_03_26_062354_create_meetings_table.php

<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMeetingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create(‘meetings’, function (Blueprint $table) {
$table->increments(‘id’);
$table->timestamps();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists(‘meetings’);
}
}

 

 

 
C:\wamp\www>cd blog2

C:\wamp\www\blog2>php artisan make:migration create_mtgdelegates_table -create=mtgdelegates
[Symfony\Component\Console\Exception\RuntimeException]
Too many arguments, expected arguments “command” “name”.

C:\wamp\www\blog2>php artisan make:migration create_mtgdelegates_table -create=mtgdelegates

C:\wamp\www\blog2>php artisan make:migration create_mtgdelegates_table -create=mtgdelegates
[Symfony\Component\Console\Exception\RuntimeException]
The “-c” option does not exist.

C:\wamp\www\blog2>php artisan make:migration create_mtgdelegates_table –create=mtgdelegates
Created Migration: 2017_03_30_095555_create_mtgdelegates_table

C:\wamp\www\blog2>composer dump-autoload
Generating autoload files

C:\wamp\www\blog2>composer dumpautoload
Generating autoload files

C:\wamp\www\blog2>

Leave a Reply

Your email address will not be published. Required fields are marked *