Example #1
0
 public virtual void Write(DroppedSchemaItem item)
 {
     _item = item;
     item.Options.Use(Engine);
     Builder.AppendFormat("drop index ");
     WriteBeforeNameOptions();
     Builder.Append(item.Name);
     WriteOnTable();
     WriteEndOptions();
     Builder.Append(";");
 }
 public virtual void Write(DroppedSchemaItem item)
 {
     _item = item;
     Item.Options.Use(Engine);
     if (Item.Name.IsNullOrEmpty())
     {
         Item.Name = _tools.GetPrimaryKeyName(Item.TableName);
     }
     if (!Item.Name.IsNullOrEmpty())
     {
         Builder.AppendFormat("alter table {0} drop ", EscapeName(item.TableName));
         WriteConstraint();
         WriteEndOptions();
         Builder.Append(";");
     }
 }
Example #3
0
 public ISupportOptionsForDrop <IModifyIndexes> Drop(string idxName)
 {
     _current = Schema.Dropped.Add(idxName);
     return(this);
 }
Example #4
0
 public IModifyTable WithoutOptions()
 {
     _current = null;
     return(_parent);
 }
Example #5
0
 public ISupportOptionsForDrop <IModifyConstraints> DropPrimaryKey()
 {
     _current = Schema.Dropped.AddPrimaryKey();
     return(this);
 }
Example #6
0
 public ISupportOptionsForDrop <IModifyConstraints> Drop(string name)
 {
     _current = Schema.Dropped.Add(name);
     return(this);
 }