Fix migrations upgrade and downgrade

+ Add option to disable auto migrate
This commit is contained in:
slawkens
2024-11-08 10:20:44 +01:00
parent 8aff9f36fb
commit c24c93ad79
7 changed files with 22 additions and 7 deletions

View File

@@ -237,7 +237,7 @@ abstract class OTS_Base_DB extends PDO implements IOTS_DB
}
public function addColumn($table, $column, $definition): void {
$this->exec('ALTER TABLE ' . $this->tableName($table) . ' ADD `access` ' . $this->fieldName($column) . ' ' . $definition . ';');
$this->exec('ALTER TABLE ' . $this->tableName($table) . ' ADD ' . $this->fieldName($column) . ' ' . $definition . ';');
}
public function modifyColumn($table, $column, $definition): void {