简体   繁体   English

Visual Studio 2010数据库项目!

[英]Visual Studio 2010 Database projects!

I am looking to use a database project in visual studio 2010 so that we can version control a database. 我希望在Visual Studio 2010中使用数据库项目,以便我们可以对数据库进行版本控制。

I have used a database project before but we had a batch file that we had to add to any scripts we wanted to be run. 我以前使用过一个数据库项目,但是我们有一个批处理文件,必须将其添加到要运行的任何脚本中。 I didn't set this up and I am not sure if this is the best way to go about it. 我没有进行设置,也不确定这是否是最好的解决方法。

We have just started using VS 2010 and would like to use that. 我们刚刚开始使用VS 2010,并且想使用它。

I am basically looking for any hints, tips, tutorials and general best practices for setting up and using a database project in VS 2010. 我基本上是在寻找有关在VS 2010中设置和使用数据库项目的任何提示,技巧,教程和一般最佳实践。

Thanks 谢谢

On the scripts issues, the database project will have folders called pre-deployment and post-deployment under the scripts folder. 关于脚本问题,数据库项目将在scripts文件夹下有一个名为pre-deployment和post-deployment的文件夹。 Any custom scripts you need should be put there. 您需要的所有自定义脚本都应放在此处。 The database project can be used to create a database from scratch. 数据库项目可用于从头开始创建数据库。 It can also be used, via a schema comparison, to generate change scripts to move from an older version of the schema to the current version. 也可以通过模式比较将其用于生成更改脚本,以将模式的较旧版本迁移到当前版本。

You should start with Microsoft's info on how to work with database projects in VS2010. 您应该从Microsoft的有关如何在VS2010中使用数据库项目的信息开始。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM