Skip to content

Commit

Permalink
Add missing migration commands
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Dec 5, 2023
1 parent 9d4e765 commit 4fb65aa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Extension { #name : 'ClassReferencingClassInInstanceVariable' }

{ #category : '*GS64-Migration-Scripts' }
ClassReferencingClassInInstanceVariable >> migrateFrom: theOldInstance instVarMap: map [

super migrateFrom: theOldInstance instVarMap: map.
( theOldInstance instVarAtName: #classReference ) name = #ClassToBeRenamed ifTrue: [
self instVarAtName: #classReference put: RenamedClass ].
( theOldInstance instVarAtName: #classWithNewVersion ) name = #ClassWithInstanceVariableToBeAdded
ifTrue: [ self instVarAtName: #classWithNewVersion put: RenamedClassWithAddedInstanceVariable ]
]
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ Class {

{ #category : 'accessing' }
ExampleGS64MigrationScript2 >> classNamesToMigrateToLatestVersion [
"This class hasn't changed its shape but references
changed classes in its instance variables, so we
need to fix up this during migration. This cases are
detected by the unpublished classes check."

^ #( )
^ #( ClassReferencingClassInInstanceVariable )
]

{ #category : 'accessing' }
Expand Down

0 comments on commit 4fb65aa

Please sign in to comment.