Fixes for schema

This commit is contained in:
David Bomba 2023-01-23 08:15:40 +11:00
parent fe2ad3edd8
commit 526a26868a
3 changed files with 40 additions and 40 deletions

View File

@ -476,10 +476,10 @@ return new class extends Migration {
$t->string('custom_value4')->nullable(); $t->string('custom_value4')->nullable();
$t->datetime('next_send_date')->nullable(); $t->datetime('next_send_date')->nullable();
$t->string('custom_surcharge1')->nullable(); $t->decimal('custom_surcharge1', 20, 6)->nullable();
$t->string('custom_surcharge2')->nullable(); $t->decimal('custom_surcharge2', 20, 6)->nullable();
$t->string('custom_surcharge3')->nullable(); $t->decimal('custom_surcharge3', 20, 6)->nullable();
$t->string('custom_surcharge4')->nullable(); $t->decimal('custom_surcharge4', 20, 6)->nullable();
$t->boolean('custom_surcharge_tax1')->default(false); $t->boolean('custom_surcharge_tax1')->default(false);
$t->boolean('custom_surcharge_tax2')->default(false); $t->boolean('custom_surcharge_tax2')->default(false);
$t->boolean('custom_surcharge_tax3')->default(false); $t->boolean('custom_surcharge_tax3')->default(false);
@ -554,10 +554,10 @@ return new class extends Migration {
$t->string('custom_value4')->nullable(); $t->string('custom_value4')->nullable();
$t->datetime('next_send_date')->nullable(); $t->datetime('next_send_date')->nullable();
$t->string('custom_surcharge1')->nullable(); $t->decimal('custom_surcharge1', 20, 6)->nullable();
$t->string('custom_surcharge2')->nullable(); $t->decimal('custom_surcharge2', 20, 6)->nullable();
$t->string('custom_surcharge3')->nullable(); $t->decimal('custom_surcharge3', 20, 6)->nullable();
$t->string('custom_surcharge4')->nullable(); $t->decimal('custom_surcharge4', 20, 6)->nullable();
$t->boolean('custom_surcharge_tax1')->default(false); $t->boolean('custom_surcharge_tax1')->default(false);
$t->boolean('custom_surcharge_tax2')->default(false); $t->boolean('custom_surcharge_tax2')->default(false);
$t->boolean('custom_surcharge_tax3')->default(false); $t->boolean('custom_surcharge_tax3')->default(false);
@ -791,10 +791,10 @@ return new class extends Migration {
$t->string('custom_value3')->nullable(); $t->string('custom_value3')->nullable();
$t->string('custom_value4')->nullable(); $t->string('custom_value4')->nullable();
$t->string('custom_surcharge1')->nullable(); $t->decimal('custom_surcharge1', 20, 6)->nullable();
$t->string('custom_surcharge2')->nullable(); $t->decimal('custom_surcharge2', 20, 6)->nullable();
$t->string('custom_surcharge3')->nullable(); $t->decimal('custom_surcharge3', 20, 6)->nullable();
$t->string('custom_surcharge4')->nullable(); $t->decimal('custom_surcharge4', 20, 6)->nullable();
$t->boolean('custom_surcharge_tax1')->default(false); $t->boolean('custom_surcharge_tax1')->default(false);
$t->boolean('custom_surcharge_tax2')->default(false); $t->boolean('custom_surcharge_tax2')->default(false);
$t->boolean('custom_surcharge_tax3')->default(false); $t->boolean('custom_surcharge_tax3')->default(false);

View File

@ -59,10 +59,10 @@ return new class extends Migration {
$table->boolean('auto_bill_enabled')->default(0); $table->boolean('auto_bill_enabled')->default(0);
$table->unsignedInteger('design_id')->nullable(); $table->unsignedInteger('design_id')->nullable();
$table->boolean('uses_inclusive_taxes')->default(0); $table->boolean('uses_inclusive_taxes')->default(0);
$table->string('custom_surcharge1')->nullable(); $table->decimal('custom_surcharge1', 20, 6)->nullable();
$table->string('custom_surcharge2')->nullable(); $table->decimal('custom_surcharge2', 20, 6)->nullable();
$table->string('custom_surcharge3')->nullable(); $table->decimal('custom_surcharge3', 20, 6)->nullable();
$table->string('custom_surcharge4')->nullable(); $table->decimal('custom_surcharge4', 20, 6)->nullable();
$table->boolean('custom_surcharge_tax1')->default(false); $table->boolean('custom_surcharge_tax1')->default(false);
$table->boolean('custom_surcharge_tax2')->default(false); $table->boolean('custom_surcharge_tax2')->default(false);
$table->boolean('custom_surcharge_tax3')->default(false); $table->boolean('custom_surcharge_tax3')->default(false);

View File

@ -12,33 +12,33 @@ return new class extends Migration {
*/ */
public function up() public function up()
{ {
Schema::table('invoices', function (Blueprint $table) { // Schema::table('invoices', function (Blueprint $table) {
$table->decimal('custom_surcharge1', 20, 6)->change(); // $table->decimal('custom_surcharge1', 20, 6)->change();
$table->decimal('custom_surcharge2', 20, 6)->change(); // $table->decimal('custom_surcharge2', 20, 6)->change();
$table->decimal('custom_surcharge3', 20, 6)->change(); // $table->decimal('custom_surcharge3', 20, 6)->change();
$table->decimal('custom_surcharge4', 20, 6)->change(); // $table->decimal('custom_surcharge4', 20, 6)->change();
}); // });
Schema::table('recurring_invoices', function (Blueprint $table) { // Schema::table('recurring_invoices', function (Blueprint $table) {
$table->decimal('custom_surcharge1', 20, 6)->change(); // $table->decimal('custom_surcharge1', 20, 6)->change();
$table->decimal('custom_surcharge2', 20, 6)->change(); // $table->decimal('custom_surcharge2', 20, 6)->change();
$table->decimal('custom_surcharge3', 20, 6)->change(); // $table->decimal('custom_surcharge3', 20, 6)->change();
$table->decimal('custom_surcharge4', 20, 6)->change(); // $table->decimal('custom_surcharge4', 20, 6)->change();
}); // });
Schema::table('quotes', function (Blueprint $table) { // Schema::table('quotes', function (Blueprint $table) {
$table->decimal('custom_surcharge1', 20, 6)->change(); // $table->decimal('custom_surcharge1', 20, 6)->change();
$table->decimal('custom_surcharge2', 20, 6)->change(); // $table->decimal('custom_surcharge2', 20, 6)->change();
$table->decimal('custom_surcharge3', 20, 6)->change(); // $table->decimal('custom_surcharge3', 20, 6)->change();
$table->decimal('custom_surcharge4', 20, 6)->change(); // $table->decimal('custom_surcharge4', 20, 6)->change();
}); // });
Schema::table('credits', function (Blueprint $table) { // Schema::table('credits', function (Blueprint $table) {
$table->decimal('custom_surcharge1', 20, 6)->change(); // $table->decimal('custom_surcharge1', 20, 6)->change();
$table->decimal('custom_surcharge2', 20, 6)->change(); // $table->decimal('custom_surcharge2', 20, 6)->change();
$table->decimal('custom_surcharge3', 20, 6)->change(); // $table->decimal('custom_surcharge3', 20, 6)->change();
$table->decimal('custom_surcharge4', 20, 6)->change(); // $table->decimal('custom_surcharge4', 20, 6)->change();
}); // });
} }
/** /**