Skip to content

Commit

Permalink
Merge pull request #39 from lsst-epo/EPO-7944
Browse files Browse the repository at this point in the history
Added migration query to install "migration"
  • Loading branch information
ericdrosas87 authored Apr 25, 2023
2 parents 2646ffa + 0f56291 commit 29b49f9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.1] - 04-25-2023

### Added

- Added migration query update to the Install migration for rosas->lsst namespace

## [0.4] - 04-12-2023

### Changed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "craft-plugin",
"keywords": ["dam", "digital", "asset", "manager"],
"license": "MIT",
"version": "v0.4",
"version": "v0.4.1",
"authors": [
{
"name": "Eric Rosas",
Expand Down
2 changes: 1 addition & 1 deletion src/DamPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class DamPlugin extends Plugin
public static Plugin $plugin;

public bool $hasCpSettings = true;
public string $schemaVersion = "2.0.0";
public string $schemaVersion = "2.0.1";

/**
* @param $id
Expand Down
9 changes: 9 additions & 0 deletions src/migrations/Install.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ public function safeUp(): bool
Craft::$app->db->schema->refresh();
}

// Perform migration as if this is a new plugin due to namespace changes
echo "Performing install-migration for Canto Integration Plugin";
$this->update('{{%fields}}', [
"type" => 'lsst\dam\fields\DAMAsset'
],[
"type" => 'rosas\dam\fields\DAMAsset'
]
);

return true;
}

Expand Down

0 comments on commit 29b49f9

Please sign in to comment.