Question

I've got working currently with , but the problem I'm running into is scripting my database schema (and test data) and having it deployed along with the rest of my project.

Have any of you done this before? How might I achieve this?

AppHarbor is already stripping out my dev connection string and replacing it with their own, but I'm not sure how to get my SQL DB to deploy automagically.

Was it helpful?

Solution

At AppHarbor, we use NHibernate SchemaUpdate. You can see it in action on this PostgreSQL-compatible sample and it should work just as well with SQL Server. The trick is to do it in Application_Start (and not during a build, which may fail).

If you're using Entity Framework, you should be able to achieve the same effect with the new Migrations feature.

OTHER TIPS

Have a look at Manatee by Rob Conery:

https://github.com/robconery/manatee

This handles db migrations.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top