人妻无码中文字幕永久在线,99RE6这里有精品热视频,国产成人综合色就色综合 ,蜜臀av在线观看

新聞建站cms系統、政府cms系統定制開發(fā)

廣州網站建設公司-閱速公司

asp.net新聞發(fā)布系統、報紙數字報系統方案
/
http://www.jdki.com.cn/
廣州網站建設公司
您當前位置:首頁>網站技術

網站技術

Automatic migration was not applied because it would result in data loss

發(fā)布時間:2013/7/17 9:19:40  作者:Admin  閱讀:715  

廣告:

PM> update-database -Verbose

Using StartUp project 'TopWin.Etone.Web'.

Using NuGet project 'TopWin.Etone.Domain'.

Specify the '-Verbose' flag to view the SQL statements being applied to the target database.

Target database is: 'Yunyou' (DataSource: .\sql2008, Provider: System.Data.SqlClient, Origin: Configuration).

No pending code-based migrations.

Applying automatic migration: 201307170115022_AutomaticMigration.

Automatic migration was not applied because it would result in data loss.

解決方法:提示“Automatic migration was not applied because it would result in data loss”(不能自動遷移,會導致數據丟失) ,則在Update-Database 后面加 -Force參數即可。注意,這樣并不會引起數據丟失。

成功后提示:

PM> update-database -Force -Verbose

Using StartUp project 'TopWin.Etone.Web'.

Using NuGet project 'TopWin.Etone.Domain'.

Specify the '-Verbose' flag to view the SQL statements being applied to the target database.

Target database is: 'Yunyou' (DataSource: .\sql2008, Provider: System.Data.SqlClient, Origin: Configuration).

No pending code-based migrations.

Applying automatic migration: 201307170118213_AutomaticMigration.

ALTER TABLE [dbo].[Customer] ADD [CustomerName2] [nvarchar](max)

DECLARE @var0 nvarchar(128)

SELECT @var0 = name

FROM sys.default_constraints

WHERE parent_object_id = object_id(N'dbo.Customer')

AND col_name(parent_object_id, parent_column_id) = 'CustomerName1';

IF @var0 IS NOT NULL

EXECUTE('ALTER TABLE [dbo].[Customer] DROP CONSTRAINT ' + @var0)

ALTER TABLE [dbo].[Customer] DROP COLUMN [CustomerName1]

[Inserting migration history record]

Running Seed method.

PM>

廣告:

相關文章
migration
code first
cms新聞系統購買咨詢
掃描關注 廣州閱速軟件科技有限公司
掃描關注 廣州閱速科技