diff --git a/database/migrations/2021_01_05_013203_improve_decimal_resolution.php b/database/migrations/2021_01_05_013203_improve_decimal_resolution.php new file mode 100644 index 000000000000..8bf01ff58e0c --- /dev/null +++ b/database/migrations/2021_01_05_013203_improve_decimal_resolution.php @@ -0,0 +1,119 @@ +decimal('balance', 20, 6)->change(); + $table->decimal('adjustment', 20, 6)->change(); + }); + + Schema::table('credits', function (Blueprint $table) { + $table->decimal('tax_rate1', 20, 6)->change(); + $table->decimal('tax_rate2', 20, 6)->change(); + $table->decimal('tax_rate3', 20, 6)->change(); + $table->decimal('total_taxes', 20, 6)->change(); + $table->decimal('exchange_rate', 20, 6)->change(); + $table->decimal('balance', 20, 6)->change(); + $table->decimal('partial', 20, 6)->change(); + $table->decimal('amount', 20, 6)->change(); + }); + + Schema::table('invoices', function (Blueprint $table) { + $table->decimal('tax_rate1', 20, 6)->change(); + $table->decimal('tax_rate2', 20, 6)->change(); + $table->decimal('tax_rate3', 20, 6)->change(); + $table->decimal('total_taxes', 20, 6)->change(); + $table->decimal('exchange_rate', 20, 6)->change(); + $table->decimal('balance', 20, 6)->change(); + $table->decimal('partial', 20, 6)->change(); + $table->decimal('amount', 20, 6)->change(); + }); + + Schema::table('quotes', function (Blueprint $table) { + $table->decimal('tax_rate1', 20, 6)->change(); + $table->decimal('tax_rate2', 20, 6)->change(); + $table->decimal('tax_rate3', 20, 6)->change(); + $table->decimal('total_taxes', 20, 6)->change(); + $table->decimal('exchange_rate', 20, 6)->change(); + $table->decimal('balance', 20, 6)->change(); + $table->decimal('partial', 20, 6)->change(); + $table->decimal('amount', 20, 6)->change(); + }); + + Schema::table('expenses', function (Blueprint $table) { + $table->decimal('tax_rate1', 20, 6)->change(); + $table->decimal('tax_rate2', 20, 6)->change(); + $table->decimal('tax_rate3', 20, 6)->change(); + $table->decimal('amount', 20, 6)->change(); + $table->decimal('foreign_amount', 20, 6)->change(); + $table->decimal('exchange_rate', 20, 6)->change(); + }); + + Schema::table('payments', function (Blueprint $table) { + $table->decimal('amount', 20, 6)->change(); + $table->decimal('refunded', 20, 6)->change(); + $table->decimal('applied', 20, 6)->change(); + $table->decimal('exchange_rate', 20, 6)->change(); + }); + + Schema::table('products', function (Blueprint $table) { + $table->decimal('tax_rate1', 20, 6)->change(); + $table->decimal('tax_rate2', 20, 6)->change(); + $table->decimal('tax_rate3', 20, 6)->change(); + }); + + Schema::table('projects', function (Blueprint $table) { + $table->decimal('task_rate', 20, 6)->change(); + $table->decimal('budgeted_hours', 20, 6)->change(); + }); + + Schema::table('recurring_invoices', function (Blueprint $table) { + $table->decimal('tax_rate1', 20, 6)->change(); + $table->decimal('tax_rate2', 20, 6)->change(); + $table->decimal('tax_rate3', 20, 6)->change(); + $table->decimal('total_taxes', 20, 6)->change(); + $table->decimal('balance', 20, 6)->change(); + $table->decimal('amount', 20, 6)->change(); + }); + + Schema::table('recurring_quotes', function (Blueprint $table) { + $table->decimal('tax_rate1', 20, 6)->change(); + $table->decimal('tax_rate2', 20, 6)->change(); + $table->decimal('tax_rate3', 20, 6)->change(); + $table->decimal('total_taxes', 20, 6)->change(); + $table->decimal('balance', 20, 6)->change(); + $table->decimal('amount', 20, 6)->change(); + }); + + + Schema::table('tasks', function (Blueprint $table) { + $table->decimal('rate', 20, 6)->change(); + }); + + Schema::table('tax_rates', function (Blueprint $table) { + $table->decimal('rate', 20, 6)->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +}