Open
Description
The current implementation of CompositeType.Operation
will create the type as it is when the migration is run, not as the type was when the migration was created. This can lead to problems when changing the type later, and making a migration for it. Consider the following scenario:
- A type is created with two fields.
- A migration is made that creates this type
- The migrations are run
- A new field is added to the type
- A new migration is created to add this new field to the type
- The migrations are run
This will work. However, for someone making a new database from scratch, this will fail. The type will be created with all three fields in the first migration, and the second migration will fail to add the duplicate field.
The creation migration should save the state of the type at the time the migration is created, rather than the time the migration is run.