2016-03-25 01:18:05 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
|
|
|
class CreateModelsTable extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
2021-06-10 13:15:52 -07:00
|
|
|
Schema::create('models', function ($table) {
|
2016-03-25 01:18:05 -07:00
|
|
|
$table->increments('id');
|
|
|
|
$table->string('name');
|
|
|
|
$table->string('modelno')->nullable();
|
|
|
|
$table->integer('manufacturer_id')->nullable();
|
|
|
|
$table->integer('category_id')->nullable();
|
|
|
|
$table->timestamps();
|
|
|
|
$table->engine = 'InnoDB';
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::drop('models');
|
|
|
|
}
|
|
|
|
}
|