Changeset View
Changeset View
Standalone View
Standalone View
src/database/migrations/2020_03_30_100000_create_discounts.php
Show All 13 Lines | class CreateDiscounts extends Migration | ||||
*/ | */ | ||||
public function up() | public function up() | ||||
{ | { | ||||
Schema::create( | Schema::create( | ||||
'discounts', | 'discounts', | ||||
function (Blueprint $table) { | function (Blueprint $table) { | ||||
$table->string('id', 36); | $table->string('id', 36); | ||||
$table->tinyInteger('discount')->unsigned(); | $table->tinyInteger('discount')->unsigned(); | ||||
$table->json('description'); | // was json, but mariadb | ||||
$table->text('description'); | |||||
// end of | |||||
$table->string('code', 32)->nullable(); | $table->string('code', 32)->nullable(); | ||||
$table->boolean('active')->default(false); | $table->boolean('active')->default(false); | ||||
$table->timestamp('created_at')->useCurrent(); | $table->timestamp('created_at')->useCurrent(); | ||||
$table->timestamp('updated_at')->useCurrent(); | $table->timestamp('updated_at')->useCurrent(); | ||||
$table->primary('id'); | $table->primary('id'); | ||||
} | } | ||||
); | ); | ||||
Show All 30 Lines |