T4 Template to generate from VS Db Project #300

Closed
vdesmedt opened this Issue Sep 10, 2012 · 2 comments

3 participants

@vdesmedt

I like the idea of creating initial script from the database itself but in my case, it's too late cause I use fm since a couple of weeks already. Wouldn't be great if we could generate the initial version from a db project in visual studio. This project is versioned most of the time which would help us find the key of the delorian.

@daniellee
Collaborator

At the moment, there are two Contrib options for generating an initial migration from a database schema. One of these is a pull request (#293) at the moment that will be merged into the Contrib section of FluentMigrator fairly soon. The other one (SchemaDump) is already committed. See the wiki (https://github.com/schambers/fluentmigrator/wiki) for more details.

It's quite complex to build one of these, especially if it is going to support all the different databases. So your best bet at this time is to script out the database and run that sql script as your baseline migration. But if you're up for writing a converter for db projects, then that would be really cool and I would definitely include it in FluentMigrator's contrib section!

BTW there is a third option but I haven't got round to testing it yet. A FluentMigrator generator for Sql Server: http://pfsolutions-mi.com/Product/FluentMigratorClassGenerator

@tommarien
Collaborator

@vdesmedt Valery i am closing this issue as generation a baseline script seems like the best option here, if you ever find time to whip up a pull request for this, we will tackle it then ;)

@tommarien tommarien closed this May 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment