1
0
Fork 0
mirror of synced 2024-10-03 19:53:33 +13:00

Fix binding

This commit is contained in:
Jake Barnby 2023-04-11 22:27:29 +12:00
parent f6bd9d4150
commit 28a9a373b1
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

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