Quote attribute name

This commit is contained in:
Jake Barnby 2023-04-11 22:30:45 +12:00
parent c60d7764e4
commit 0f1c1fda9e
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -351,7 +351,7 @@ abstract class Migration
*/
protected function changeAttributeInternalType(string $collection, string $attribute, string $type): void
{
$stmt = $this->pdo->prepare("ALTER TABLE `{$this->projectDB->getDefaultDatabase()}`.`_{$this->project->getInternalId()}_{$collection}` MODIFY $attribute $type;");
$stmt = $this->pdo->prepare("ALTER TABLE `{$this->projectDB->getDefaultDatabase()}`.`_{$this->project->getInternalId()}_{$collection}` MODIFY `$attribute` $type;");
try {
$stmt->execute();