increments('id'); $table->string('name'); $table->timestamps(); $table->softDeletes(); }); // Category Schema::create('payments_dict_category', function (Blueprint $table) { $table->increments('id'); $table->string('name'); $table->timestamps(); $table->softDeletes(); }); //Payment method Schema::create('payments_dict_payment_method', function (Blueprint $table) { $table->increments('id'); $table->string('name'); $table->timestamps(); $table->softDeletes(); }); // Payments table Schema::create('payments', function (Blueprint $table) { $table->increments('id'); $table->string('name'); $table->text('notes')->nullable(false)->default(''); $table->date('payment_date'); $table->float('amount')->nullable(false)->default(0); $table->boolean('income')->nullable(true)->default(0); $table->integer('payment_status_id')->nullable(false)->default(1); $table->integer('payment_category_id')->nullable(false)->default(1); $table->integer('payment_currency_id')->nullable(false)->default(1); $table->integer('payment_payment_method_id')->nullable(false)->default(1); $table->nullableMorphs('owned_by'); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('payments_dict_status'); Schema::dropIfExists('payments_dict_category'); Schema::dropIfExists('payments_dict_payment_method'); Schema::dropIfExists('payments'); } }