Update
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateBannerDescriptionTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('banner_description', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('banner_id')->index('banner_id_index');
|
||||
$table->char('iso', 3)->index('iso_index');
|
||||
$table->string('headline')->nullable();
|
||||
$table->text('content', 65535)->nullable();
|
||||
$table->string('link')->nullable();
|
||||
$table->string('picture')->nullable();
|
||||
$table->index(['banner_id','iso'], 'duplex_index');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('banner_description');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateBannerTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('banner', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('banner_id', true);
|
||||
$table->integer('created_at');
|
||||
$table->integer('updated_at')->nullable();
|
||||
$table->enum('active', ['Y', 'N'])->default('Y')->index('active');
|
||||
$table->integer('root')->default(0)->index('root');
|
||||
$table->integer('order_num')->default(9999)->index('zs');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('banner');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user