public CreateTableCommand CreateIndex(string indexName, Action <CreateIndexCommand> index)
        {
            var command = new CreateIndexCommand(Name, indexName);

            index(command);
            IndexCommands.Add(indexName, command);
            return(this);
        }
 public void NeedIndex(CreateColumnCommand command)
 {
     if (command.IsIndex)
     {
         bool hasIndex = true;
         CreateIndexCommand indexCommand = null;
         if (!IndexCommands.TryGetValue(command.IndexName, out indexCommand))
         {
             indexCommand = new CreateIndexCommand(Name, command.IndexName);
             hasIndex     = false;
         }
         indexCommand.AddField(command.Name);
         if (command.IsUnique)
         {
             indexCommand.Unique();
         }
         if (!hasIndex)
         {
             IndexCommands.Add(indexCommand.IndexName, indexCommand);
         }
     }
 }