diff --git a/app/Console/Commands/GenerateProducts.php b/app/Console/Commands/GenerateProducts.php index f8676c051..f72681fb1 100644 --- a/app/Console/Commands/GenerateProducts.php +++ b/app/Console/Commands/GenerateProducts.php @@ -50,7 +50,7 @@ class GenerateProducts extends Command * @return mixed */ public function handle() - { + { if (! is_string($this->argument('value')) || ! is_numeric($this->argument('quantity'))) { $this->info('Illegal parameters or value of parameters are passed'); } else { @@ -63,10 +63,10 @@ class GenerateProducts extends Command } catch (\Exception $e) { continue; } - + $quantity--; - } - + } + if ($result) $this->info('Product(s) created successfully.'); else diff --git a/packages/Webkul/Core/src/Database/Migrations/2019_10_03_105451_change_rate_column_in_currency_exchange_rates_table.php b/packages/Webkul/Core/src/Database/Migrations/2019_10_03_105451_change_rate_column_in_currency_exchange_rates_table.php new file mode 100644 index 000000000..861e630b6 --- /dev/null +++ b/packages/Webkul/Core/src/Database/Migrations/2019_10_03_105451_change_rate_column_in_currency_exchange_rates_table.php @@ -0,0 +1,32 @@ +decimal('rate', 24, 12)->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('currency_exchange_rates', function (Blueprint $table) { + $table->decimal('rate', 10, 5)->change(); + }); + } +}