Skip to content

Commit

Permalink
migration - create legacy.yml for upgrades to SS4 (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirish authored Dec 24, 2018
1 parent ed0d00f commit 0e3430d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions _config/legacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: locatorlegacy
---
SilverStripe\ORM\DatabaseAdmin:
classname_value_remapping:
Location: Dynamic\Locator\Location
Locator: Dynamic\Locator\Locator
LocationCategory: Dynamic\Locator\LocationCategory
2 changes: 2 additions & 0 deletions src/objects/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ public function getCMSFields()

$fields->removeByName(array(
'Import_ID',
'LinkTracking',
'FileTracking',
));

$fields->dataFieldByName('Website')
Expand Down
2 changes: 2 additions & 0 deletions src/objects/LocationCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ public function getCMSFields()
$fields->removeByName([
'Locations',
'LocationSet',
'LinkTracking',
'FileTracking',
]);

if ($this->ID) {
Expand Down

0 comments on commit 0e3430d

Please sign in to comment.