Ability to apply migrations through multiple assemblies #187

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
@SetekhZ
Contributor

SetekhZ commented Nov 14, 2011

This will ensure version order while proccessing multiple assemblies.

@abusby

This comment has been minimized.

Show comment Hide comment
@abusby

abusby Nov 30, 2011

Contributor

How would you use this? I can see the usecase something like rails plugs update method that scans plugin dlls for migrations but I cannot see how you could use it with the FM console or MSBuild scripts etc.

Is this just a progamatic API at the moment, that needs to be further integrated into the FM tools? How are you using it?

Contributor

abusby commented Nov 30, 2011

How would you use this? I can see the usecase something like rails plugs update method that scans plugin dlls for migrations but I cannot see how you could use it with the FM console or MSBuild scripts etc.

Is this just a progamatic API at the moment, that needs to be further integrated into the FM tools? How are you using it?

@SetekhZ

This comment has been minimized.

Show comment Hide comment
@SetekhZ

SetekhZ Nov 30, 2011

Contributor

I can use this, when running migrations from my own code.

Contributor

SetekhZ commented Nov 30, 2011

I can use this, when running migrations from my own code.

@naasir

This comment has been minimized.

Show comment Hide comment
@naasir

naasir Dec 9, 2011

+1.

I definitely have a need for this as well (via the programmatic API). I have a version of the old migrator.NET which supported this, but am looking to move to FM. It'd be great if we could get this feature merged in.

In case you're wondering, my use case is as follows:

  • I have one assembly that simply contains migrations for DB schema creation/updates.
  • I have another assembly for populating the DB. I'm basically persisting some default objects whose object graphs are pretty complicated, so instead of hand-writing the SQL insert statements, I create the objects in code and persist it via a repository backed by an ORM. So in a sample 'population' migration, for the Up() I would create the object and the repository and call repository.Save() and in the down(), I would delete the object again via the repository. Since these 'population' migrations have more dependencies (i.e. repositories and an ORM), I've opted to place them in a separate assembly.

So yeah, supporting multiple assemblies would be great.

naasir commented Dec 9, 2011

+1.

I definitely have a need for this as well (via the programmatic API). I have a version of the old migrator.NET which supported this, but am looking to move to FM. It'd be great if we could get this feature merged in.

In case you're wondering, my use case is as follows:

  • I have one assembly that simply contains migrations for DB schema creation/updates.
  • I have another assembly for populating the DB. I'm basically persisting some default objects whose object graphs are pretty complicated, so instead of hand-writing the SQL insert statements, I create the objects in code and persist it via a repository backed by an ORM. So in a sample 'population' migration, for the Up() I would create the object and the repository and call repository.Save() and in the down(), I would delete the object again via the repository. Since these 'population' migrations have more dependencies (i.e. repositories and an ORM), I've opted to place them in a separate assembly.

So yeah, supporting multiple assemblies would be great.

@abusby

This comment has been minimized.

Show comment Hide comment
@abusby

abusby Dec 19, 2011

What happens when multiple assemblies have a VersionTableMetaDataType

What happens when multiple assemblies have a VersionTableMetaDataType

@abusby

This comment has been minimized.

Show comment Hide comment
@abusby

abusby Dec 19, 2011

You have commented out a check in the test to ensure that the assembly is requested but not replaced it with anything. Why?

You have commented out a check in the test to ensure that the assembly is requested but not replaced it with anything. Why?

@abusby

This comment has been minimized.

Show comment Hide comment
@abusby

abusby Dec 19, 2011

There do not appear to be any test that verify that multiple assembles can be used. Please add some, the this can be merged in

abusby commented on ca104cc Dec 19, 2011

There do not appear to be any test that verify that multiple assembles can be used. Please add some, the this can be merged in

@daniellee

This comment has been minimized.

Show comment Hide comment
@daniellee

daniellee May 17, 2013

Contributor

This is very similar to #302 and does not have enough tests. As there is some complicated logic around the order in which migrations are run, no tests means I can't merge this in.

Contributor

daniellee commented May 17, 2013

This is very similar to #302 and does not have enough tests. As there is some complicated logic around the order in which migrations are run, no tests means I can't merge this in.

@daniellee daniellee closed this May 17, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment