Sets that the migration was reverted.

@return bool
978932
public function unsetDone() {
        $migration = $this->getMigration();
        if (!$migration['state']) {
            return true; //alredy undone
        }
        $this->db()->update($this->table, array('state' => false), array('id' => $migration['id']));
    }
53011
public function rollback()
    {
        $this->models = $this->original;
        $this->added = [];
        $this->removed = [];
        return $this;
    }
1002784
public function apply()
    {

        $files = $this->getMigrationsFiles();
        $lastMigration = null;

        asort($files);

        foreach ($files as $key => $value) {
            if ($key <= $this->getVersion()) continue;
            include $this->migrateManager->storagePath . '/' . $value;
            $className = "Migration_$key";
            $class = new $className();
            $class->up();
            $lastMigration = $key;
            unset($class);
        }

        if (!is_null($lastMigration)) {
            $this->setVersion($lastMigration);
            echo Utils::colorize("Done!", "SUCCESS");
        } else {
            echo Utils::colorize("The latest version is already installed.", "NOTE");
        }

    }
919493
public function reset(){
    	$originalSettings = $this->settings;
    	$this->settings = array();
    	if(file_put_contents($this->cacheFileName, "{}") === FALSE){
    		$this->settings = $originalSettings;
    		return FALSE;
    	}
    	return TRUE;
    }
1045421
public function down()
    {
        $record = new MigrationRecord();
        if ($this->connection !== null) {
            $record->setConnection($this->connection);
        }
        $record->where('migration', $this->name)->delete();
    }
893729
public function restore()
	{
		$timestamp_end_name = static::temporal_property('end_column');
		$max_timestamp = static::temporal_property('max_timestamp');

		// check to see if there is a currently active row, if so then don't
		// restore anything.
		$activeRow = static::find('first', array(
				'where' => array(
					array('id', $this->id),
					array($timestamp_end_name, $max_timestamp),
				),
			));

		if(is_null($activeRow))
		{
			// No active row was found so we are ok to go and restore the this
			// revision
			$timestamp_start_name = static::temporal_property('start_column');
			$mysql_timestamp = static::temporal_property('mysql_timestamp');

			$max_timestamp = static::temporal_property('max_timestamp');
			$current_timestamp = $mysql_timestamp ?
				\Date::forge()->format('mysql') :
				\Date::forge()->get_timestamp();

			// Make sure this is saved as a new entry
			$this->_is_new = true;

			// Update timestamps
			static::disable_primary_key_check();
			$this->{$timestamp_start_name} = $current_timestamp;
			$this->{$timestamp_end_name} = $max_timestamp;

			// Save
			$result = parent::save();
			static::enable_primary_key_check();

			return $result;
		}

		return false;
	}
120314
protected function setSoftDelete()
    {
        $softDelete = $this->config["database.softDelete"];
        $this->softDelete = $softDelete["enabled"] ?? false;
        $this->delCol = $softDelete["column"] ?? "";
        $this->delValType = $softDelete["value"] ?? 0;
    }
94044
public static function _rollBack ()
	{
		
		if (self::$_lastID)
		{
			
			if (!static::_delete (self::$_lastID))
			{
				return FALSE;
			}
			
			self::$_lastID	= FALSE;
			
		}
		
		return TRUE;
		
	}
714091
protected function checkLessonsMigrationState()
    {
        $this->output->info('# Checkin lessons migration state... #');

        switch ($this->checkLessonMigrationStats()) {
            case 0:
                return true;
            case 1:
                $this->output->error(' Migration stats does not match!');
                if ($this->output->confirm('Do you wish to continue (lesson_migration and scool lesson tables will be truncated)?')) {
                    DB::connection('ebre_escool')->statement('DELETE FROM lesson_migration');
                    DB::connection('ebre_escool')->statement('ALTER TABLE lesson_migration AUTO_INCREMENT = 1');
                    DB::statement('DELETE FROM lessons');
                    DB::statement('ALTER TABLE lessons AUTO_INCREMENT = 1');
                    DB::statement('DELETE FROM lesson_user');
                    DB::statement('ALTER TABLE lesson_user AUTO_INCREMENT = 1');
                    DB::statement('DELETE FROM lesson_submodule');
                    DB::statement('ALTER TABLE lesson_submodule AUTO_INCREMENT = 1');
                    DB::statement('DELETE FROM classroom_submodule');
                    DB::statement('ALTER TABLE classroom_submodule AUTO_INCREMENT = 1');
                } else {
                    die();
                }
                return true;
            case 2:
                $this->output->info(' Lesson data seems already migrated. Skipping lessons migration...');
                return false;
        }
    }
1259792
public function rollback()
    {
        if ($this->readOnly) {
            return false;
        }
        $this->readOnly = true;

        fclose($this->fp);
        unlink($this->tmp);
    }
1175692
public function rollback()
    {
        $migrations = $this->getLast($this->getMigrations(true));

        $this->requireFiles($migrations->toArray());

        $migrated = [];

        foreach ($migrations as $migration) {
            $data = $this->find($migration);

            if ($data->count()) {
                $migrated[] = $migration;

                $this->down($migration);

                $data->delete();
            }
        }

        return $migrated;
    }
1026423
def set_current_migration(self, migration_number=None):
        
        self.migration_data.version = migration_number or self.latest_migration
        self.session.commit()
789015
public function rollback($version)
    {
        $files = $this->getMigrationsFiles();
        $lastMigration = null;

        arsort($files);

        foreach ($files as $key => $value) {
            if ($key < $version) continue;
            include $this->migrateManager->storagePath . '/' . $value;
            $className = "Migration_$key";
            $class = new $className();
            $class->down();
            $lastMigration = $key;
            unset($class);
        }

        if (!is_null($lastMigration)) {
            $this->setVersion($lastMigration - 1);
            echo Utils::colorize("Done!", "SUCCESS");
        } else {
            echo Utils::colorize("The latest version is already installed.", "NOTE");
        }
    }
962109
protected function createMigration()
    {
        $migrationFile = base_path("/database/migrations") . "/" . date('Y_m_d_His')
            . "_create_settings_table.php";

        $output = $this->laravel->view->make('settings::generators.migration')->render();

        if (!file_exists($migrationFile) && $fs = fopen($migrationFile, 'x')) {
            fwrite($fs, $output);
            fclose($fs);

            return true;
        }

        return false;
    }
958887
public function revert()
    {
        $model = $this->getModel();
        unset( $model->{$model->getCreatedAtColumn()} );
        unset( $model->{$model->getUpdatedAtColumn()} );
        if (method_exists($model, 'getDeletedAtColumn')) {
            unset( $model->{$model->getDeletedAtColumn()} );
        }
        $model->save();
        return $model;
    }
279776
public static function rollback()
    {
        foreach (array_reverse(self::$migrationClasses) as $migrationClass) {
            /** @var Migration $instance */
            $instance = new $migrationClass;
            $instance->rollback();
        }
    }
118066
private function isMigrated($migration, OutputInterface $output = null)
    {
        if ($this->_db->schema()->hasTable('migrations')) {
            $table = $this->_cap->table('migrations');
            $m = $table->where('migration', '=', $migration);
            if ($m->count() > 0) {
                $item = $m->first();
                if ($item->migrated == 1) {
                    return true;
                }
            }
        } else {
            $this->createMigrationsTable($output);

            return $this->isMigrated($migration);
        }

        return false;
    }