我遇到了Entity Framework的问题并进行了迁移(数据库更新)和外键注释。
我收到的错误消息是:smart wait
driver.execute_script('document.getElementById("demo").innerHTML')
[...]
update-database –verbose
我想要一个0:0 ...... 1的关系。那就是它。
我试图像在这个例子EF Code-First One-to-one relationship: Multiplicity is not valid in Role * in relationship
中那样做Applying automatic migration: 201604060846578_AutomaticMigration.
IF EXISTS (SELECT name FROM sys.indexes WHERE name = N'IX_OutreachSet_TargetContact' AND object_id = object_id(N'[dbo].[DiagnosticsSets]', N'U'))
DROP INDEX [IX_OutreachSet_TargetContact] ON [dbo].[DiagnosticsSets]
IF EXISTS (SELECT name FROM sys.indexes WHERE name = N'IX_OutreachSet_TargetContact' AND object_id = object_id(N'[dbo].[MotivationSets]', N'U'))
DROP INDEX [IX_OutreachSet_TargetContact] ON [dbo].[MotivationSets]
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.MotivationSets')
AND col_name(parent_object_id, parent_column_id) = 'TargetContact';
IF @var0 IS NOT NULL
EXECUTE('ALTER TABLE [dbo].[MotivationSets] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[MotivationSets] DROP COLUMN [TargetContact]
答案 0 :(得分:0)