how to avoid some post-migration actions

Posts   
 
    
Expert-IT
User
Posts: 5
Joined: 09-Apr-2013
# Posted on: 18-Jul-2013 16:18:09   

Hello,

I would like to avoid a deletion during a post-migration action, specially for the migration of relationships and unique constraints.

Some details: simple_smile

The project contains 2 schemas, a first named dbo and a second named wepng. dbo is referencing the old tables imported from an existing database. webng contains the new entities (so, new tables) that we have created in the project.

Some relations exist between table from webng and dbo.

Until now we have build our model around these tables (old and new)

Now I would like to import other tables in the schema dbo but this affect the webng entities. we receive the following message: Some relationships have been removed because its underlying foreign key constraint wasn't found in the refreshed relational model data.

How can i avoid the deletion of these relationships?

I'm doing the import of the tables through the relational model data retrieval wizard. The only think I do in this wizard is to select the missing tables that I need to import.

we use the version 4.0 Final (x86 4.0.12.0621) database SQL server 10.50.2550 .NET 4.5

Hope it's clear confused

Thanks for your help

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 18-Jul-2013 20:28:10   

we receive the following message: Some relationships have been removed because its underlying foreign key constraint wasn't found in the refreshed relational model data.

How can i avoid the deletion of these relationships?

The following is copied from the docs, "Project Properties" section.

Relationships follow db foreign key constraints When set to true (Default), all normal relationships which are not marked as 'model-only' have to have a foreign key constraint in the new relational model data after refresh, or they'll be removed. When set to true, new relationships are created from newly found foreign key constraints. When set to false, relationships without a foreign key constraint in the new relational model data are left as-is and there aren't any new relationships created from foreign key constraints found in the new relational model data. The value Default means the value in the preferences is used.

Also from docs:

To mark the relationship as a model-only relationship, you can check the checkbox 'Is Model Only'. This will mark the relationship as a model-only relationship so it doesn't require a backing Foreign Key constraint in the relational