Removeds a migration entry from the file given the table name.

@param string $tableName

@return array
164378
public function forget($tableName)
    {
        $capsules = $this->all();
        $keep = [];

        foreach ($capsules as $capsule) {
            if ($capsule->tableName == $tableName) {
                $capsule->forgetAllMigrations();

                continue;
            }

            $keep[] = $capsule;
        }

        $this->write($keep);

        return $keep;
    }
470204
public function remove($migrationName) {
		$list = $this->getList(false);
		unset($list[$migrationName]);
		$this->writeMigrations($list);
	}
308553
public function getKeyUses($tablename, $keyname) {

        $uses = array();

        // Check if some foreign key in the whole structure is using it
        // (by comparing the reftable and reffields with the fields in the key)
        $mytable = $this->getTable($tablename);
        $mykey = $mytable->getKey($keyname);
        if ($this->tables && $mykey) {
            foreach ($this->tables as $table) {
                $allkeys = $table->getKeys();
                if ($allkeys) {
                    foreach ($allkeys as $key) {
                        if ($key->getType() != XMLDB_KEY_FOREIGN) {
                            continue;
                        }
                        if ($key->getRefTable() == $tablename &&
                            implode(',', $key->getRefFields()) == implode(',', $mykey->getFields())) {
                                $uses[] = 'table ' . $table->getName() . ' key ' . $key->getName();
                        }
                    }
                }
            }
        }

        // Return result
        if (!empty($uses)) {
            return $uses;
        } else {
            return false;
        }
    }
1359594
protected function _getPortableTableIndexesList($tableIndexes, $tableName = null)
    {
        $indexBuffer = [];
        foreach ($tableIndexes as $tableIndex) {
            $tableIndex = array_change_key_case($tableIndex, CASE_LOWER);

            $keyName = strtolower($tableIndex['name']);
            $buffer  = [];

            if (strtolower($tableIndex['is_primary']) === 'p') {
                $keyName              = 'primary';
                $buffer['primary']    = true;
                $buffer['non_unique'] = false;
            } else {
                $buffer['primary']    = false;
                $buffer['non_unique'] = ! $tableIndex['is_unique'];
            }
            $buffer['key_name']    = $keyName;
            $buffer['column_name'] = $this->getQuotedIdentifierName($tableIndex['column_name']);
            $indexBuffer[]         = $buffer;
        }

        return parent::_getPortableTableIndexesList($indexBuffer, $tableName);
    }
101525
public function remove($migrationData, array $fields)
    {
        $migrationData['method'] = 'table';

        $compiled = $this->compiler->compile($this->getTemplate(), $migrationData);

        return $this->replaceFieldsWith($this->dropColumns($fields), $compiled);
    }
104153
public function getTableColumns($tableName)
    {
        $sql = "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = :database AND TABLE_NAME = :tableName;";
        $columns = $this->raw($sql, [':database' => $this->getDatabaseName(), ':tableName' => $tableName], 'fetchAll');
        $return_array = [];
        foreach ($columns as $c) {
            $return_array[] = $c->COLUMN_NAME;
        }
        return $return_array;
    }
955289
protected function getColumnRemove($table, $columnName)
    {
        $output = [];
        $output[] = sprintf("%sif(\$this->table('%s')->hasColumn('%s')) {", $this->ind2, $table, $columnName);
        $output[] = $result = sprintf("%s\$this->table(\"%s\")->removeColumn('%s')->update();", $this->ind3, $table,
            $columnName);
        $output[] = sprintf("%s}", $this->ind2);
        $result = implode($this->nl, $output);

        return $result;
    }
489885
public function GetTableColumnNames($tableName) {
        $this->setDbConfigList(array());
        $dbConfig = new \Puzzlout\Framework\Dal\DbStatementConfig(null, \Puzzlout\Framework\Dal\DbExecutionType::COLUMNNAMES, new \Puzzlout\Framework\Dal\DbQueryFilters());
        $dbConfig->setQuery("DESCRIBE `$tableName`;");
        $this->addDbConfigItem($dbConfig);
        return $this->BindParametersAndExecute();
    }
788526
public function findTableInArray($tablename) {
        foreach ($this->tables as $i => $table) {
            if ($tablename == $table->getName()) {
                return $i;
            }
        }
        return null;
    }
1231329
protected function skipTable($tableName)
    {
        // Check if select options is set and table name is not selected
        if (count($this->option('select')) > 0 && !in_array($tableName, $this->option('select'), true)) {
            return true;
        }

        // Check if table name is ignored
        if (in_array($tableName, $this->option('ignore'), true)) {
            return true;
        }

        return false;
    }
260483
public function getTableForeignKeys($tableName = null, $connectionName = null)
    {
        $tableName = $this->validateTableName($tableName);

        return $this->getSchema($connectionName)->listTableForeignKeys($tableName);
    }
741740
public function deleteMigrationContext($migrationName)
    {
        $this->createTableIfNeeded();
        $conn = $this->getConnection();
        $conn->delete($this->tableName, array('migration' => $migrationName));
    }
301840
public function getTableColumnList($tableName) {

        if (!array_key_exists($tableName, $this->tableList)) {

            $this->addColumnMap($tableName, $this->getColumnMappingsFromConfig($tableName));
        }

        return $this->tableList[$tableName];
    }
784675
public function removeField(String $fieldName)
    {
        $query = 
            "ALTER TABLE " . 
            '`' . $this->m_name . '` ' . 
            "DROP COLUMN `" . $field . "`";
        
        $result = $this->m_mysqliConn->query($query);
        return $result;
    }
31271
private function getRemovedForeignKeys($tableName, TableDiff $diff)
    {
        foreach ($diff->removedForeignKeys as $index) {
            $this->addMessage($tableName, sprintf('removed foreign key from `%s`', implode(', ', $index->getUnquotedLocalColumns())));
        }
    }
185671
protected function getTableDefaults($tableName)
  {
    if (!isset($this->tableDefaults[$tableName]))
    {
      $this->loadTable($tableName);
    }
    return $this->tableDefaults[$tableName];
  }
772348
protected function _getColumns($tableName)
    {

        $params = [
            ':schemaName' => $this->_adapter->getSchemaName(),
            ':tableName' => $tableName
        ];
        return $this->_adapter->query($this->_getColumnsSql, $params);
    }