From c7f1c72a561ec5c57167635748b5ae8232c96dc3 Mon Sep 17 00:00:00 2001 From: Ransom Date: Sat, 17 Nov 2018 14:46:32 -0500 Subject: [PATCH] Changed column type from varchar to text for historical field values --- CHANGELOG.md | 6 +++- composer.json | 2 +- src/BulkEdit.php | 31 +------------------ ...81117_192854_increase_data_column_size.php | 31 +++++++++++++++++++ 4 files changed, 38 insertions(+), 32 deletions(-) create mode 100644 src/migrations/m181117_192854_increase_data_column_size.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c0a06e..bbd9ef3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Bulk Edit Changelog - +## 1.0.3 - 2018-11-17 +### Fixed +- Potential error from field values that are too long to store in history +### Changed +- Set element saving scenario to SCENARIO_ESSENTIALS ## 1.0.2 - 2018-10-08 ### Fixed - Added scrollbar to modal to allow for larger field layouts diff --git a/composer.json b/composer.json index 9890583..0a04b52 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "venveo/craft-bulkedit", "description": "Bulk edit entries", "type": "craft-plugin", - "version": "1.0.2", + "version": "1.0.3", "keywords": [ "craft", "cms", diff --git a/src/BulkEdit.php b/src/BulkEdit.php index b9a6e4d..9b665ca 100644 --- a/src/BulkEdit.php +++ b/src/BulkEdit.php @@ -47,7 +47,7 @@ class BulkEdit extends Plugin * * @var string */ - public $schemaVersion = '1.0.0'; + public $schemaVersion = '1.0.1'; // Public Methods // ========================================================================= @@ -57,9 +57,6 @@ public function init() parent::init(); self::$plugin = $this; - // Register CP routes - Event::on(UrlManager::class, UrlManager::EVENT_REGISTER_CP_URL_RULES, [$this, 'registerCpUrlRules']); - // Register element action to assets for clearing transforms Event::on(Entry::class, Element::EVENT_REGISTER_ACTIONS, function(RegisterElementActionsEvent $event) { @@ -67,30 +64,4 @@ function(RegisterElementActionsEvent $event) { } ); } - - public function registerCpUrlRules(RegisterUrlRulesEvent $event) - { - $rules = [ - ]; - - $event->rules = array_merge($event->rules, $rules); - } - - /** - * Performs actions before the plugin’s settings are saved. - * - * @return bool Whether the plugin’s settings should be saved. - */ - public function beforeSaveSettings(): bool - { - // TODO: Implement beforeSaveSettings() method. - } - - /** - * Performs actions after the plugin’s settings are saved. - */ - public function afterSaveSettings() - { - // TODO: Implement afterSaveSettings() method. - } } diff --git a/src/migrations/m181117_192854_increase_data_column_size.php b/src/migrations/m181117_192854_increase_data_column_size.php new file mode 100644 index 0000000..cd122c8 --- /dev/null +++ b/src/migrations/m181117_192854_increase_data_column_size.php @@ -0,0 +1,31 @@ +alterColumn('{{%bulkedit_history}}', 'originalValue', $this->text()); + $this->alterColumn('{{%bulkedit_history}}', 'newValue', $this->text()); + } + + /** + * @inheritdoc + */ + public function safeDown() + { + echo "m181117_192854_increase_data_column_size cannot be reverted.\n"; + return false; + } +}