Exemplo n.º 1
0
        public async Task Create(string name)
        {
            uSyncBackOfficeContext.Instance.Init();

            if (string.IsNullOrEmpty(name))
                name = DateTime.Now.ToString("ddMMyyyy_HHmmss");

            await Out.WriteLineAsync("Creating new migration: " + name);

            var migrationManager = new MigrationManager("~/usync/migrations/");
            var actions = migrationManager.CreateMigration(name);

            if (actions.FileCount > 0)
            {
                await Out.WriteLineAsync("Migration Created with " + actions.FileCount + " files");
            }
            else
            {
                await Out.WriteLineAsync("Migration contained no changes and has not being saved");
            }
        }
Exemplo n.º 2
0
        public async Task Create(string name)
        {
            uSyncBackOfficeContext.Instance.Init();

            if (string.IsNullOrEmpty(name))
            {
                name = DateTime.Now.ToString("ddMMyyyy_HHmmss");
            }

            await Out.WriteLineAsync("Creating new migration: " + name);

            var migrationManager = new MigrationManager("~/usync/migrations/");
            var actions          = migrationManager.CreateMigration(name);

            if (actions.FileCount > 0)
            {
                await Out.WriteLineAsync("Migration Created with " + actions.FileCount + " files");
            }
            else
            {
                await Out.WriteLineAsync("Migration contained no changes and has not being saved");
            }
        }