First Commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Capsule\Manager as Capsule;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateConfigPagesTable
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
if (!Capsule::schema()->hasTable('config_index')) {
|
||||
Capsule::schema()->create('config_index', function (Blueprint $table) {
|
||||
$table->increments('config_index_id');
|
||||
$table->integer('config_index_bus_id')->unsigned()->default(1);
|
||||
$table->string('config_index_key')->index();
|
||||
$table->string('config_index_title');
|
||||
$table->longText('config_index_content')->nullable();
|
||||
$table->string('config_index_meta_title')->nullable();
|
||||
$table->text('config_index_meta_description')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['config_index_bus_id', 'config_index_key'], 'unique_page_per_bus');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Capsule::schema()->dropIfExists('config_index');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user