public override void Perform(SchemaChanges changes, IOutput output) { foreach (var current in FulltextCatalogType.AllFrom(changes.Current)) { if (changes.Desired.Contains(current)) { continue; } changes.RemoveWithoutTransaction(changes.SchemaDriver.GetDropFulltextCatalogSql(current.Name), current); } }
public override void Perform(SchemaChanges changes, IOutput output) { foreach (var desired in FulltextCatalogType.AllFrom(changes.Desired)) { if (changes.Current.Contains(desired)) { continue; } // No particular need to track whether this has been done, it can be done every time // In theory it's also silly to do it for every catalog but in practice there won't actually be more than one catalog var enableFulltext = changes.SchemaDriver.GetEnableFulltextSql(changes.Connection); if (enableFulltext != null) { changes.PutWithoutTransaction(enableFulltext); } changes.PutWithoutTransaction(changes.SchemaDriver.GetCreateFulltextCatalogSql(desired.Name), desired); } }