| Total Complexity | 2 | 
| Total Lines | 34 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 6 | class CreateCategoriesTableMigration extends Migration  | 
            ||
| 7 | { | 
            ||
| 8 | /**  | 
            ||
| 9 | * Do the migration  | 
            ||
| 10 | */  | 
            ||
| 11 | public function up()  | 
            ||
| 12 |     { | 
            ||
| 13 |         Capsule::schema()->create('categories', function ($table) { | 
            ||
| 14 |             $table->increments('id'); | 
            ||
| 15 |             $table->string('title')->nullable(); | 
            ||
| 16 |             $table->string('slug')->unique(); | 
            ||
| 17 |             $table->text('body')->nullable(); | 
            ||
| 18 |             $table->integer('item_cnt')->unsigned()->default(0); | 
            ||
| 19 |             $table->enum('is_active',['yes','no'])->default('yes'); | 
            ||
| 20 |             $table->enum('has_pic',['yes','no'])->default('no'); | 
            ||
| 21 | |||
| 22 |             $table->string('meta_title',128)->nullable(); | 
            ||
| 23 |             $table->string('meta_description',256)->nullable(); | 
            ||
| 24 |             $table->string('meta_keywords',64)->nullable(); | 
            ||
| 25 | |||
| 26 | /*Add Soft Delete To Articles*/  | 
            ||
| 27 | $table->softDeletes();  | 
            ||
| 28 | $table->timestamps();  | 
            ||
| 29 | });  | 
            ||
| 30 | |||
| 31 | |||
| 32 | }  | 
            ||
| 33 | |||
| 34 | /**  | 
            ||
| 35 | * Undo the migration  | 
            ||
| 36 | */  | 
            ||
| 37 | public function down()  | 
            ||
| 40 | }  | 
            ||
| 41 | }  |