You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<?php
use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration;
class CreateBusinessesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('businesses', function (Blueprint $table) { $table->id(); $table->string('name'); $table->string('slug')->unique(); $table->integer('wallet')->default(0); $table->unsignedInteger('files_volume')->default(0); $table->string('color')->nullable(); $table->string('description')->nullable(); $table->json('cache')->nullable(); $table->boolean('has_avatar')->default(false); $table->timestamp('calculated_at')->nullable()->index(); $table->timestamp('created_at')->nullable(); $table->timestamp('updated_at')->nullable(); $table->timestamp('suspended_at')->nullable(); $table->timestamp('deleted_at')->nullable(); });
Schema::create('business_user', function (Blueprint $table) { $table->unsignedBigInteger('business_id'); $table->unsignedBigInteger('user_id'); $table->tinyInteger('level')->default(0); }); }
/** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('businesses'); Schema::dropIfExists('businesses_user'); } }
|