Skip to content

Commit

Permalink
logic is handled in CreateCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-roepnack-zocdoc committed May 19, 2016
1 parent a1dff4c commit aec5c07
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions console/Create.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,6 @@ public Create()
public override int Run(string[] remainingArguments) {
_logger = new Logger(Verbose);

if (!Directory.Exists(ScriptDir))
{
_logger.Log(TraceLevel.Error, string.Format("Snapshot dir {0} does not exist.", ScriptDir));
return 1;
}

if (!Overwrite)
{
_logger.Log(TraceLevel.Verbose, "Checking if database already exists...");
if (DBHelper.DbExists(ConnectionString))
{
var question = string.Format("{0} {1} already exists - do you want to drop it",
Server, DbName);
if (!ConsoleQuestion.AskYN(question))
{
Console.WriteLine("Create command cancelled.");
return 1;
}
Overwrite = true;
}
}

var createCommand = new CreateCommand
{
ConnectionString = ConnectionString,
Expand Down

0 comments on commit aec5c07

Please sign in to comment.