checkColumnExists('photos', 'filename'); } /** Add filename column into photos table */ public function upgrade_PhotosFilenameColumn() { sqlQuery('ALTER TABLE photos ADD COLUMN filename VARCHAR(100) DEFAULT NULL AFTER id'); $this->upgradeOK(); } public function check_PhotosDateUpdate() { return $this->checkColumnExists('photos', 'date_update'); } /** Add date_update column into photos table */ public function upgrade_PhotosDateUpdate() { sqlQuery('ALTER TABLE photos ADD date_update DATETIME DEFAULT NOW() NULL;'); $this->upgradeOK(); } public function check_ResponsivePhotoFields(): bool { return $this->checkColumnExists('photos', 'image_tablet'); } /** Add image_tablet and image_mobile fields to photos table */ public function upgrade_ResponsivePhotoFields(): void { sqlQuery('ALTER TABLE photos ADD COLUMN image_tablet VARCHAR(100) DEFAULT NULL AFTER image_2;'); sqlQuery('ALTER TABLE photos ADD COLUMN image_mobile VARCHAR(100) DEFAULT NULL AFTER image_tablet;'); $this->upgradeOK(); } public function check_CustomDataField(): bool { return $this->checkColumnExists('photos', 'data'); } /** Add custom_data field to photos table **/ public function upgrade_CustomDataField(): void { sqlQuery('alter table photos add data longtext null;'); $this->upgradeOK(); } }