42 lines
1013 B
PHP
42 lines
1013 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
class CreateTheCaseTable extends Migration {
|
|
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('TheCase', function(Blueprint $table)
|
|
{
|
|
$table->string('TCID', 50)->comment('案件編號');
|
|
$table->string('CBID', 50)->index('CBID')->comment('品牌/代理商帳號');
|
|
$table->string('name', 50)->comment('案件名稱');
|
|
$table->string('class', 30)->comment('案件類別');
|
|
$table->text('description', 65535)->nullable()->comment('商品描述');
|
|
$table->integer('specialPrice')->comment('商品優惠價');
|
|
$table->integer('price')->comment('商品市售價');
|
|
$table->text('howToBuy', 65535)->comment('如何購買');
|
|
$table->date('releaseDate')->comment('發佈日期');
|
|
$table->primary(['TCID','CBID']);
|
|
});
|
|
}
|
|
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::drop('TheCase');
|
|
}
|
|
|
|
}
|