diff --git a/Mite/Mite.Console.csproj b/Mite/Mite.Console.csproj index f24d43c..dbcf6e0 100644 --- a/Mite/Mite.Console.csproj +++ b/Mite/Mite.Console.csproj @@ -35,7 +35,7 @@ true full false - bin\Debug\ + bin\ DEBUG;TRACE prompt 4 diff --git a/Mite/Program.cs b/Mite/Program.cs index a16a55c..8039424 100644 --- a/Mite/Program.cs +++ b/Mite/Program.cs @@ -106,12 +106,12 @@ static void Main(string[] args) JObject obj = new JObject(); obj["repositoryName"] = repositoryName; obj["connectionString"] = connectionString; - File.WriteAllText(currentDirectory, obj.ToString(Formatting.Indented)); - + File.WriteAllText(Path.Combine(currentDirectory , "mite.config"), obj.ToString(Formatting.Indented)); } try { - MigratorFactory.GetMigrator(currentDirectory); + var tmpMigrator = MigratorFactory.GetMigrator(currentDirectory); + repo = tmpMigrator.DatabaseRepository; }catch(Exception ex) { Console.WriteLine(ex.Message); @@ -124,11 +124,7 @@ static void Main(string[] args) Console.WriteLine("Working directory is not clean.\nPlease ensure no existing scripts or project files exist when performing init."); return; } - if(repo.MigrationTableExists()) - { - Console.WriteLine("A _migration table already exists.\n'init' should only be used for new setups.\nSee 'mite /?' for help."); - return; - } + var baseFileName = ""; try