Пример #1
0
        protected static DatabaseDefinitions Column_Change_NotNullableToNullable_WithFk_Dds(SqlEngineVersion version)
        {
            var ddOriginal = new TestDatabaseFk();

            ddOriginal.SetVersions(version.GetTypeMapper());

            var ddFkChanged = new TestDatabaseFk();

            ddFkChanged.SetVersions(version.GetTypeMapper());
            ddFkChanged.GetTable("Foreign")["PrimaryId"].Type.IsNullable = true;

            return(new DatabaseDefinitions(ddOriginal, ddFkChanged, "ForeignKeyComposite", "ForeignKeyComposite2_Column_Change_NotNullableToNullable_WithFk"));
        }
Пример #2
0
        protected static DatabaseDefinitions Fk_Add_Dds(SqlEngineVersion version)
        {
            var ddOriginal = new TestDatabaseFk();

            ddOriginal.GetTable("Foreign").Properties.Remove(
                ddOriginal.GetTable("Foreign").Properties.OfType <ForeignKey>().First()
                );
            ddOriginal.SetVersions(version.GetTypeMapper());

            var ddWithFK = new TestDatabaseFk();

            ddWithFK.SetVersions(version.GetTypeMapper());

            return(new DatabaseDefinitions(ddOriginal, ddWithFK, "TestDatabaseFk", "TestDatabaseFk_Fk_Add"));
        }