id(); $table->unsignedBigInteger('business_id'); $table->string('name'); $table->string('slug'); $table->boolean('private')->default(false); $table->unsignedBigInteger('budget')->default(0); $table->string('color')->nullable(); $table->boolean('active')->nullable(); $table->text('description')->nullable(); $table->boolean('has_avatar')->default(false); $table->timestamp('start')->nullable(); $table->timestamp('finish')->nullable(); $table->timestamp('created_at')->nullable(); $table->timestamp('updated_at')->useCurrent(); $table->timestamp('deleted_at')->nullable(); }); // Only those users that added directly to the project are stored here. // Users who are members of the business have access to the projects of that business // without being stored here. Schema::create('project_user', function (Blueprint $table) { $table->unsignedBigInteger('project_id'); $table->unsignedBigInteger('user_id'); $table->tinyInteger('level')->default(0); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('projects'); Schema::dropIfExists('project_user'); } }