开发者

Code Generation Templates of Migration Classes in FluentMigrator

Are there any code generation templates available开发者_StackOverflow中文版 for use with FluentMigrator to generate migration classes from SQL (T-SQL) statements?

Ideally I would like to take text that contains statements for creating tables, indexes, etc and generate a migration class with the Up and Down methods containing the equivalent of the original SQL statements.

I'm only concerned with solutions based on open source or free code generation tools.


I wrote an application that will read an existing database and then generate a FluentMigrator Migration Class with both Up and Down methods.

http://pfsolutions-mi.com/Product/FluentMigratorClassGenerator


No, nothing like this exists as far as I know. The closest thing is the ability to write your own schema dump code. That could be used to take an existing database and generate FluentMigrator syntax from it. Here is a sample of how one might do that.


Have a look at Guru Kathiresan's T4 Template for creating FM initial schemas. This link came from the FluentMigrator Google Group.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜