29 lines
884 B
PHP
Executable File
29 lines
884 B
PHP
Executable File
<?php
|
|
|
|
use Illuminate\Database\Capsule\Manager as Capsule;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
class CreateModelosTable
|
|
{
|
|
public function up()
|
|
{
|
|
if (!Capsule::schema()->hasTable('modelos')) {
|
|
Capsule::schema()->create('modelos', function (Blueprint $table) {
|
|
$table->increments('modelos_id');
|
|
$table->integer('modelos_bus_id')->default(0)->index();
|
|
$table->string('modelos_title', 255);
|
|
$table->text('modelos_content');
|
|
$table->integer('modelos_order')->default(0);
|
|
$table->boolean('modelos_active')->default(true);
|
|
$table->string('modelos_visibility')->default('public');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
Capsule::schema()->dropIfExists('modelos');
|
|
}
|
|
}
|