Changeset View
Changeset View
Standalone View
Standalone View
src/database/migrations/2020_12_28_140000_create_groups_table.php
Show All 22 Lines | public function up() | ||||
$table->smallInteger('status'); | $table->smallInteger('status'); | ||||
$table->timestamps(); | $table->timestamps(); | ||||
$table->softDeletes(); | $table->softDeletes(); | ||||
$table->primary('id'); | $table->primary('id'); | ||||
} | } | ||||
); | ); | ||||
if (!\App\Sku::where('title', 'group')->first()) { | |||||
\App\Sku::create([ | |||||
'title' => 'group', | |||||
'name' => 'Group', | |||||
'description' => 'Distribution list', | |||||
'cost' => 0, | |||||
'units_free' => 0, | |||||
'period' => 'monthly', | |||||
'handler_class' => 'App\Handlers\Group', | |||||
'active' => true, | |||||
]); | |||||
} | |||||
} | } | ||||
/** | /** | ||||
* Reverse the migrations. | * Reverse the migrations. | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function down() | public function down() | ||||
{ | { | ||||
Schema::dropIfExists('groups'); | Schema::dropIfExists('groups'); | ||||
} | } | ||||
} | } |