diff --git a/CHANGELOG.md b/CHANGELOG.md index a20c220..21f8dc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Release Notes for Entry Meta +## 1.0.1 - 2021-12-04 +### Fixed +- Ensure install migration runs on new environment [#2](https://github.com/matfish2/craft-entry-meta/issues/2) + ## 1.0.0 - 2021-12-03 ### Added - Publish stable release [#1](https://github.com/matfish2/craft-entry-meta/issues/1) diff --git a/src/migrations/Install.php b/src/migrations/Install.php index e221099..5da2522 100644 --- a/src/migrations/Install.php +++ b/src/migrations/Install.php @@ -10,7 +10,7 @@ class Install extends Migration { public function safeUp() { - if (!$this->_pluginExistsInProjectConfig() && !$this->_columnExists()) { + if (!$this->_columnExists()) { echo "> Adding column " . EntryMeta::COLUMN_NAME . " to entries table..." . PHP_EOL; $columnType = Craft::$app->db->driverName==='pgsql' ? 'jsonb' : 'text'; Craft::$app->db->createCommand()->addColumn("{{%entries}}", EntryMeta::COLUMN_NAME, $columnType)->execute(); @@ -19,7 +19,7 @@ public function safeUp() public function safeDown() { - if ($this->_pluginExistsInProjectConfig() && $this->_columnExists()) { + if ($this->_columnExists()) { echo "> Removing column " . EntryMeta::COLUMN_NAME . " from entries table..." . PHP_EOL; Craft::$app->db->createCommand()->dropColumn("{{%entries}}", EntryMeta::COLUMN_NAME)->execute(); }