首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 支持更新数据库模式和数据

支持更新数据库模式和数据

  • 资源大小:13.04 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: 数据库 更新 数据 支持 模式

资 源 简 介

Making changes to a database schema or its data requires careful planning and execution, to avoid mistakes. This library provides support for this task, allowing the user to write update scripts once, save them in a common location, with logical naming, and apply them easily. Support for storing migration scripts in a .NET assembly and applying them to an SQL Server database is built in. The architecture caters for those wishing to add support for other forms of migration storage or database provider. ``` var db = new SqlVersionedDb(connection); decimal version = db.Version(); if (version == Constants.Unversioned) log.WriteLine("Creating database."); else log.WriteLine(string.Format("Initial database version: {0}", version); db.beginningUpdate += index => log.Write(string.Format("Updating to version: {0} ... ", index)); db.updateComplete += (index, successful, message) => { if (successful) {

文 件 列 表

hs-migration-1.0.0
HS.Migration.sln
HS.Migration.Tests
HS.Migration
VIP VIP
0.191761s