migrating-ravens / RavenMigrations

A small migrations framework to help you manage your RavenDB Instance.
MIT License
53 stars 24 forks source link

Support multiple profiles per Migration #21

Closed daniel-chambers closed 9 years ago

daniel-chambers commented 9 years ago

We have the need to support multiple profiles per migration. Our use case is that we want certain migrations to only run in certain environments (Dev, Demo, Production, etc). A particular migration should only run on Demo and Production.

Profiles are built for this purpose, but migrations are currently only allowed to participate in a single profile. This pull request changes that by renaming the Profile property on MigrationAttribute to Profiles and allowing you to specify multiple profiles by comma-separating them. That Migration would be participate in all the profiles; for example a migration with this attribute:

[Migration("1", "Demo, Production")]

would run in both the Demo and Production profiles.

daniel-chambers commented 9 years ago

Okay, I've modified that attribute and merged with master, so it should be all good now. :)

dportzline83 commented 9 years ago

Awesome, thanks!