I'm developing an application with EF4.0. Between the releases the database schema can change (e.g. column added, table added...).
我正在使用EF4.0开发一个应用程序。在版本之间,数据库架构可以更改(例如,添加了列,添加了表...)。
Is there a way to commit these changes to the customers database when they run the new release? I'm thinking of an function similar to CreateDatabase().
有没有办法在运行新版本时将这些更改提交给客户数据库?我正在考虑一个类似于CreateDatabase()的函数。
1 个解决方案
#1
1
Your install procedure must do two things:
您的安装过程必须做两件事:
- Run a script to update the database
- Install the new program files
运行脚本以更新数据库
安装新程序文件
To generate the database script use the tools in visual studio, see http://www.sqlskills.com/BLOGS/KIMBERLY/post/Data-Dude-moving-into-lower-priced-VS-Editions-in-VS-2010-excellent!.aspx
要生成数据库脚本,请使用visual studio中的工具,请参阅http://www.sqlskills.com/BLOGS/KIMBERLY/post/Data-Dude-moving-into-lower-priced-VS-Editions-in-VS-2010 - 优秀的!的.aspx
#1
1
Your install procedure must do two things:
您的安装过程必须做两件事:
- Run a script to update the database
- Install the new program files
运行脚本以更新数据库
安装新程序文件
To generate the database script use the tools in visual studio, see http://www.sqlskills.com/BLOGS/KIMBERLY/post/Data-Dude-moving-into-lower-priced-VS-Editions-in-VS-2010-excellent!.aspx
要生成数据库脚本,请使用visual studio中的工具,请参阅http://www.sqlskills.com/BLOGS/KIMBERLY/post/Data-Dude-moving-into-lower-priced-VS-Editions-in-VS-2010 - 优秀的!的.aspx