Ejemplo n.º 1
0
        public void Process(string[] args)
        {
            string databaseName = args[0];

            string connectionString = MigrationConfiguration.ConnectionStringFor(databaseName);

            if (args.Length == 3)
            {

                string version = args[2];

                string result = new MigrationCommands().ProcessMigrateTo(connectionString, version);
                Console.WriteLine(result);

            }
            else if (args.Length == 2)
            {

                string result = new MigrationCommands().ProcessVersionCommand(connectionString);
                Console.WriteLine(result);
            }
            else
            {
                Console.WriteLine(SetupCommand.CommandSyntax);
            }
        }
Ejemplo n.º 2
0
        public void Process(string[] args)
        {
            string databaseName = args[0];

            // MigrationFactory.GetMigrationFilePaths(MigrationConfiguration.migrationClassPath);
            string result = new MigrationCommands().ProcessScriptAllCommand(databaseName);

            Console.WriteLine("generated all migration scripts in directory " + MigrationConfiguration.migrationScriptPath + "\\" + databaseName);
            Console.WriteLine("From migration Source files at " + MigrationConfiguration.migrationClassPath);
        }
Ejemplo n.º 3
0
        public void Process(string[] args)
        {
            if (args.Length > 1)
            {

                string databaseName = args[0];

                string connectionString = MigrationConfiguration.ConnectionStringFor(databaseName);

                string result = new MigrationCommands().ProcessCreateDatabaseAndSchemaCommand(databaseName, connectionString, MigrationConfiguration.MasterConnectionString);

            }
            else
            {
                Console.WriteLine("invalid arguments to setup command");
                Console.WriteLine("Command syntax is:");
                Console.WriteLine(CommandSyntax);

            }
        }