For most cases changing the field type isn't an issue. db4o keeps the old values around and you can access the old values without issues. See "Field Type Change"
However there's one limitation to this mechanism. You cannot change the type of a field to its array-type and vice versa. This only applies if it's the same array-type. For example:
When you change the type of a field to its array-type equivalent, you can do this only by copying the old data to a new class. In this example we have a Person-class which has its name in a string field. Now we want to change that to a string array to support multiple names.
IList<PersonOld> oldPersons = container.Query<PersonOld>(); foreach (PersonOld old in oldPersons) { PersonNew newPerson = new PersonNew(); newPerson.Name = new string[] {old.Name}; container.Store(newPerson); container.Delete(old); }
Dim oldPersons As IList(Of PersonOld) = container.Query(Of PersonOld)() For Each old As PersonOld In oldPersons Dim newPerson As New PersonNew() newPerson.Name = New String() {old.Name} container.Store(newPerson) container.Delete(old) Next
Note that this example doesn't change existing references from the old instances to the new ones. You need to do this manually as well.