diff --git a/database/migrations/2019_08_12_054915_temp_append_role_name_en_column.php b/database/migrations/2019_08_12_054915_temp_append_role_name_en_column.php new file mode 100644 index 0000000..e602f5c --- /dev/null +++ b/database/migrations/2019_08_12_054915_temp_append_role_name_en_column.php @@ -0,0 +1,34 @@ +string('name_en'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + if (Schema::hasColumn('tbl_roles', 'name_en')) { + Schema::table('tbl_roles', function (Blueprint $table) { + $table->dropColumn('name_en'); + }); + } + } +} diff --git a/database/migrations/2019_08_12_055107_temp_append_permission_name_en_module_id_column.php b/database/migrations/2019_08_12_055107_temp_append_permission_name_en_module_id_column.php new file mode 100644 index 0000000..2c65786 --- /dev/null +++ b/database/migrations/2019_08_12_055107_temp_append_permission_name_en_module_id_column.php @@ -0,0 +1,36 @@ +string('name_en'); + $table->unsignedInteger('module_id')->nullable(); + $table->index('module_id'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + if (Schema::hasColumn('tbl_permissions', 'name_en')) { + Schema::table('tbl_roles', function (Blueprint $table) { + $table->dropColumn('name_en'); + }); + } + } +} diff --git a/database/migrations/2019_08_17_133716_temp_module_virtual_activity_column_expires_at.php b/database/migrations/2019_08_17_133716_temp_module_virtual_activity_column_expires_at.php new file mode 100644 index 0000000..6f22ff8 --- /dev/null +++ b/database/migrations/2019_08_17_133716_temp_module_virtual_activity_column_expires_at.php @@ -0,0 +1,37 @@ +timestamp('expires_at')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + $dbName = config('core.db_name'); + if (Schema::hasColumn($dbName . '.module_virtual_activity', 'expires_at')) { + Schema::table($dbName . '.module_virtual_activity', function (Blueprint $table) { + $table->dropColumn('expires_at'); + }); + } + } +}