-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCompareFullTextIndex.cs
More file actions
28 lines (26 loc) · 1.13 KB
/
CompareFullTextIndex.cs
File metadata and controls
28 lines (26 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using DBDiff.Schema.Model;
using DBDiff.Schema.SQLServer.Generates.Model;
namespace DBDiff.Schema.SQLServer.Generates.Compare
{
internal class CompareFullTextIndex : CompareBase<FullTextIndex>
{
protected override void DoNew<Root>(SchemaList<FullTextIndex, Root> originFields, FullTextIndex node)
{
FullTextIndex newNode = (FullTextIndex)node.Clone(originFields.Parent);
newNode.Status = Enums.ObjectStatusType.CreateStatus;
originFields.Add(newNode);
}
protected override void DoUpdate<Root>(SchemaList<FullTextIndex, Root> originFields, FullTextIndex node)
{
if (!node.Compare(originFields[node.FullName]))
{
FullTextIndex newNode = (FullTextIndex)node.Clone(originFields.Parent);
if (node.IsDisabled != originFields[node.FullName].IsDisabled)
newNode.Status += (int)Enums.ObjectStatusType.DisabledStatus;
else
newNode.Status += (int)Enums.ObjectStatusType.AlterStatus;
originFields[node.FullName] = newNode;
}
}
}
}