From 56f9ce4348e3b57a35f3af70ef594b9b1f1d3e4f Mon Sep 17 00:00:00 2001 From: Edmond Teh Date: Mon, 14 Sep 2020 13:43:54 +0800 Subject: [PATCH] add ei and edo field to invoices --- ...09_14_130855_add_ei_edo_epo_to_invoice.php | 6 ++-- ...dd_default_null_to_edo_ei_and_nullable.php | 33 +++++++++++++++++++ .../2020_09_14_133932_remove_edo_ei.php | 32 ++++++++++++++++++ .../2020_09_14_134204_create_edo_ei.php | 33 +++++++++++++++++++ 4 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 database/migrations/2020_09_14_132221_add_default_null_to_edo_ei_and_nullable.php create mode 100644 database/migrations/2020_09_14_133932_remove_edo_ei.php create mode 100644 database/migrations/2020_09_14_134204_create_edo_ei.php diff --git a/database/migrations/2020_09_14_130855_add_ei_edo_epo_to_invoice.php b/database/migrations/2020_09_14_130855_add_ei_edo_epo_to_invoice.php index 5030f0d1..06804003 100644 --- a/database/migrations/2020_09_14_130855_add_ei_edo_epo_to_invoice.php +++ b/database/migrations/2020_09_14_130855_add_ei_edo_epo_to_invoice.php @@ -14,8 +14,8 @@ class AddEiEdoEpoToInvoice extends Migration public function up() { Schema::table('invoices', function (Blueprint $table) { - $table->string('edo')->unique(); - $table->string('ei')->unique(); + $table->string('edo'); + $table->string('ei'); }); } @@ -27,7 +27,7 @@ class AddEiEdoEpoToInvoice extends Migration public function down() { Schema::table('invoices', function (Blueprint $table) { - // + $table->dropColumn(['edo', 'ei']); }); } } diff --git a/database/migrations/2020_09_14_132221_add_default_null_to_edo_ei_and_nullable.php b/database/migrations/2020_09_14_132221_add_default_null_to_edo_ei_and_nullable.php new file mode 100644 index 00000000..b1e4367e --- /dev/null +++ b/database/migrations/2020_09_14_132221_add_default_null_to_edo_ei_and_nullable.php @@ -0,0 +1,33 @@ +string('edo')->default(null)->nullable()->change(); + $table->string('ei')->default(null)->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('invoices', function (Blueprint $table) { + // + }); + } +} diff --git a/database/migrations/2020_09_14_133932_remove_edo_ei.php b/database/migrations/2020_09_14_133932_remove_edo_ei.php new file mode 100644 index 00000000..b2d70fe3 --- /dev/null +++ b/database/migrations/2020_09_14_133932_remove_edo_ei.php @@ -0,0 +1,32 @@ +dropColumn(['edo', 'ei']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('invoices', function (Blueprint $table) { + // + }); + } +} diff --git a/database/migrations/2020_09_14_134204_create_edo_ei.php b/database/migrations/2020_09_14_134204_create_edo_ei.php new file mode 100644 index 00000000..81ee1127 --- /dev/null +++ b/database/migrations/2020_09_14_134204_create_edo_ei.php @@ -0,0 +1,33 @@ +string('ei')->default(null)->nullable()->unique(); + $table->string('edo')->default(null)->nullable()->unique(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('invoices', function (Blueprint $table) { + // + }); + } +}