From bc0cd4ee52fb63dd778cca9a2da755997f34f83c Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 17 May 2016 10:47:24 +0300 Subject: [PATCH] Added fields for expense taxes --- ...5_add_swap_currency_symbol_to_currency.php | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/database/migrations/2016_05_16_102925_add_swap_currency_symbol_to_currency.php b/database/migrations/2016_05_16_102925_add_swap_currency_symbol_to_currency.php index 31eafbaf9615..d331b54cf74f 100644 --- a/database/migrations/2016_05_16_102925_add_swap_currency_symbol_to_currency.php +++ b/database/migrations/2016_05_16_102925_add_swap_currency_symbol_to_currency.php @@ -5,7 +5,6 @@ use Illuminate\Database\Migrations\Migration; class AddSwapCurrencySymbolToCurrency extends Migration { - const TABLE_NAME = 'currencies'; /** * Run the migrations. * @@ -13,9 +12,20 @@ class AddSwapCurrencySymbolToCurrency extends Migration */ public function up() { - Schema::table(self::TABLE_NAME,function(Blueprint $table){ + Schema::table('currencies', function(Blueprint $table) { $table->boolean('swap_currency_symbol')->default(false); }); + + Schema::table('expenses', function(Blueprint $table) { + $table->string('tax_name1')->nullable(); + $table->decimal('tax_rate1', 13, 3); + $table->string('tax_name2')->nullable(); + $table->decimal('tax_rate2', 13, 3); + }); + + Schema::table('account_gateways', function(Blueprint $table) { + $table->boolean('require_cvv')->default(true)->nullable(); + }); } /** @@ -25,8 +35,19 @@ class AddSwapCurrencySymbolToCurrency extends Migration */ public function down() { - Schema::table(self::TABLE_NAME,function(Blueprint $table){ - $table->dropColumn('swap_currency_symbol'); + Schema::table('currencies', function(Blueprint $table) { + $table->dropColumn('swap_currency_symbol'); + }); + + Schema::table('expenses', function(Blueprint $table) { + $table->dropColumn('tax_name1'); + $table->dropColumn('tax_rate1'); + $table->dropColumn('tax_name2'); + $table->dropColumn('tax_rate2'); + }); + + Schema::table('account_gateways', function(Blueprint $table) { + $table->dropColumn('require_cvv'); }); } }