Пример #1
0
        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);
            }
        }
Пример #2
0
        public override void Perform(SchemaChanges changes, IOutput output)
        {
            foreach (var desired in FulltextIndexType.AllFrom(changes.Desired))
            {
                if (changes.Current.Contains(desired))
                {
                    continue;
                }

                changes.PutWithoutTransaction(changes.SchemaDriver.GetCreateFulltextIndexSql(desired.Name, desired.ParentName, desired.State.KeyName, desired.State.Columns),
                                              desired);
            }
        }