Ejemplo n.º 1
0
        public override void Perform(SchemaChanges changes, IOutput output)
        {
            foreach (var current in FkeyType.AllFrom(changes.Current))
            {
                if (!FkeyType.FkeyHasChanged(changes, current))
                {
                    continue;
                }

                changes.Remove(changes.SchemaDriver.GetDropFkeySql(current.ParentName, current.Name), current);
            }
        }
Ejemplo n.º 2
0
        public override void Perform(SchemaChanges changes, IOutput output)
        {
            foreach (var desired in FkeyType.AllFrom(changes.Desired))
            {
                if (changes.Current.Contains(desired))
                {
                    continue;
                }

                changes.Put(changes.SchemaDriver.GetAddFkeySql(desired.ParentName, desired.State.ToTableName, desired.Name, desired.State.IsCascadeDelete,
                                                               desired.State.Joins), desired);
            }
        }