예제 #1
0
 /**
  * Install the database tables used by the migration system.
  *
  * @return void
  */
 public function install()
 {
     Schema::table('laravel_migrations', function ($table) {
         $table->create();
         // Migrations can be run for a specific bundle, so we'll use
         // the bundle name and string migration name as an unique ID
         // for the migrations, allowing us to easily identify which
         // migrations have been run for each bundle.
         $table->string('bundle', 50);
         $table->string('name', 200);
         // When running a migration command, we will store a batch
         // ID with each of the rows on the table. This will allow
         // us to grab all of the migrations that were run for the
         // last command when performing rollbacks.
         $table->integer('batch');
         $table->primary(array('bundle', 'name'));
     });
     echo "Migration table created successfully.";
 }