Reverse the migrations.

@return void
974411
public function down()
    {
        // Check if the table exists
        if (Schema::hasTable('translations')) {
            if (Schema::hasColumn('translations', 'translatable_type')) {
                $items = DB::select('select * from translations');
                foreach ($items as $item) {
                    // Points to old namespace Redooor\\Redminportal\\
                    $old_type_array = explode('\\', $item->translatable_type);
                    $last_model = array_pop($new_type_array);
                    $old_type = 'Redooor\\Redminportal\\' . $last_model;
                    DB::table('translations')->where('id', $item->id)
                        ->update([
                        'translatable_type' => $old_type
                    ]);
                }
            }
        }
    }
201080
public function down()
    {
        Schema::connection(config('eyewitness.eyewitness_database_connection'))->table('eyewitness_io_schedulers', function (Blueprint $table) {
            $table->dropColumn('last_run');
        });
        Schema::connection(config('eyewitness.eyewitness_database_connection'))->table('eyewitness_io_schedulers', function (Blueprint $table) {
            $table->dropColumn('alert_last_run_greater_than');
        });
    }
779644
public function down()
    {
        Schema::table('activity_log', function (Blueprint $table) {
            $table->dropColumn('log_name');
            $table->dropColumn('description');
            $table->dropColumn('subject_id');
            $table->dropColumn('subject_type');
            $table->dropColumn('causer_type');
            $table->dropColumn('causer_id');
            $table->dropColumn('causer_type');
            $table->dropColumn('properties');

            $table->integer('user_id')->nullable();
            $table->string('text');
            $table->string('ip_address', 64);            
        });
    }
646368
public function down()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn('auth_type');
        });

        // Uncomment the section below if the users table was created above.
//        // Drop the users table.
//        Schema::drop('users');

        Schema::table('groups', function (Blueprint $table) {
            $table->dropColumn('resync_on_login');
        });

        // Uncomment the section below if the groups table was created above.
//        // Drop the groups table.
//        Schema::drop('groups');
//        // Drop the group user link table.
//        Schema::drop('group_user');
    }
473603
public function down()
    {
        Schema::create('component_tag', function (Blueprint $table) {
            $table->engine = 'InnoDB';

            $table->increments('id');
            $table->integer('component_id');
            $table->integer('tag_id');

            $table->index('component_id');
            $table->index('tag_id');
        });
    }
491213
public function down()
    {
        Schema::table('hc_resource_grab_property', function (Blueprint $table) {
            $table->dropColumn(['width', 'height']);
            $table->integer('x')->change();
            $table->integer('y')->change();
        });
    }
1224706
public function down()
    {
        DB::transaction(function() {
            DB::table('tbl_logs')->delete();
            DB::table('tbl_log_priorities')->delete();
            DB::table('tbl_log_types')->delete();
        });
    }
774650
public function down()
    {
        Schema::table('forum_threads', function (Blueprint $table)
        {
            $table->boolean('pinned')->nullable(false)->default(null)->change();
            $table->boolean('locked')->nullable(false)->default(null)->change();
        });
    }
29695
public function down()
    {
        Schema::drop('sites');
        Schema::drop('asset_site');
        Schema::drop('person_site');

        Schema::table('pages', function (Blueprint $table) {
            $table->dropColumn(Page::ATTR_SITE);
        });

        Schema::table('groups', function (Blueprint $table) {
            $table->dropColumn(Group::ATTR_SITE);
        });

        Schema::table('tags', function (Blueprint $table) {
            $table->dropColumn(Group::ATTR_SITE);
        });

        Schema::table('page_urls', function (Blueprint $table) {
            $table->dropColumn(Page::ATTR_SITE);
            $table->dropUnique('page_urls_site_id_location');
        });
    }
1196698
public function down()
    {
        if (Schema::hasTable('service_type')) {
            Schema::table('service', function (Blueprint $t){
                $t->foreign('type')->references('name')->on('service_type')->onDelete('cascade');
            });
        }
        if (Schema::hasTable('script_type')) {
            Schema::table('script_config', function (Blueprint $t){
                $t->foreign('type')->references('name')->on('script_type')->onDelete('cascade');
            });
            Schema::table('event_script', function (Blueprint $t){
                $t->foreign('type')->references('name')->on('script_type')->onDelete('cascade');
            });
        }
    }
746425
public function down()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn('firstname');
            $table->dropColumn('lastname');
            $table->dropColumn('email');
            $table->dropColumn('cellphone');
            $table->dropColumn('telephone');
            $table->dropColumn('image');
            $table->dropColumn('gender');
            $table->dropColumn('born_at');
            $table->dropColumn('password');
            $table->dropColumn('remember_token');
            $table->dropColumn('confirmation_token');
            $table->dropColumn('logged_in_at');
            $table->dropColumn('confirmed_at');
            $table->dropColumn('password_updated_at');
            $table->dropColumn('created_at');
            $table->dropColumn('updated_at');
            $table->dropColumn('deleted_by');
            $table->dropColumn('deleted_at');
        });

        Schema::table('users', function (Blueprint $table) {
            $table->string('name');
            $table->string('email')->unique();
            $table->timestamp('email_verified_at')->nullable();
            $table->string('password');
            $table->rememberToken();
            $table->timestamps();
        });
    }
1065135
public function down()
    {
        // Disable foreign key constraints or these DROPs will not work
        DB::statement('SET FOREIGN_KEY_CHECKS = 0');


        Schema::table('user_group', function($table){
            $table->dropIndex('user_group_user_id_index');
            $table->dropIndex('user_group_group_id_index');
        });
        Schema::dropIfExists('user_group');


        Schema::table('groups', function($table){
            $table->dropIndex('groups_title_unique');
            $table->dropForeign('groups_created_by_foreign');
            $table->dropForeign('groups_updated_by_foreign');
            $table->dropForeign('groups_locked_by_foreign');
        });
        Schema::dropIfExists('groups');


        Schema::drop('password_resets');


        Schema::table('users', function($table){
            $table->dropIndex('users_email_unique');
        });
        Schema::dropIfExists('users');


        // Enable foreign key constraints
        DB::statement('SET FOREIGN_KEY_CHECKS = 1');
	}
612174
public function down()
	{
		Schema::table('social_profiles', function($table) {
			$table->dropColumn('profile_url');
			$table->dropColumn('website_url');
			$table->dropColumn('photo_url');
			$table->dropColumn('display_name');
			$table->dropColumn('description');
			$table->dropColumn('first_name');
			$table->dropColumn('last_name');
			$table->dropColumn('gender');
			$table->dropColumn('language');
			$table->dropColumn('age');
			$table->dropColumn('birth_day');
			$table->dropColumn('birth_month');
			$table->dropColumn('birth_year');
			$table->dropColumn('email');
			$table->dropColumn('verified_email');
			$table->dropColumn('phone');
			$table->dropColumn('address');
			$table->dropColumn('country');
			$table->dropColumn('region');
			$table->dropColumn('city');
			$table->dropColumn('zip');
		});
	}
771334
public function down()
    {
        Schema::drop('postal_codes');
        Schema::drop('neighborhoods');
        Schema::drop('districts');
        Schema::drop('counties');
        Schema::drop('provinces');
    }
596414
public function down()
    {
        Schema::dropIfExists(config('admin.database.users_table'));
        Schema::dropIfExists(config('admin.database.roles_table'));
        Schema::dropIfExists(config('admin.database.permissions_table'));
        Schema::dropIfExists(config('admin.database.menu_table'));
        Schema::dropIfExists(config('admin.database.user_permissions_table'));
        Schema::dropIfExists(config('admin.database.role_users_table'));
        Schema::dropIfExists(config('admin.database.role_permissions_table'));
        Schema::dropIfExists(config('admin.database.role_menu_table'));
        Schema::dropIfExists(config('admin.database.operation_log_table'));
    }
1196137
public function down()
	{
        if(Schema::hasTable('hlogeon_scms_types')){
            if(Schema::hasColumns('hlogeon_scms_types', ['list_layout_id', 'enable_own_sidebar'])){
                Schema::table('hlogeon_scms_types', function(Blueprint $table){
                    $table->dropColumn('list_layout_id');
                    $table->dropColumn('type_layout_id');
                    $table->dropColumn('enable_own_sidebar');
                    $table->string('type_layout');
                });
            }
        }
    }
765467
public function down()
    {
        $tableNames = config('permission.table_names');

        Schema::drop($tableNames['role_has_permissions']);
        Schema::drop($tableNames['model_has_roles']);
        Schema::drop($tableNames['model_has_permissions']);
        Schema::drop($tableNames['roles']);
        Schema::drop($tableNames['permissions']);
    }