Esempio n. 1
0
        public DesignSchemaMigrations GetCurrentMigrations()
        {
            StoreSchemaMigrations package = _migrationAggregator.GenerateMigrations(Schema, SchemaMigrations, _designRecords);
            var result = DesignSchemaMigrations.FromStoreMigrations(package);

            return(result);
        }
Esempio n. 2
0
        public void LoadMigrations(string path)
        {
            var fileName = Path.Combine(path, GenerateMigrationFileName(path));
            var package  = _schemaStorage.LoadMigrations(new StorageParameters {
                FileName = fileName
            });

            SchemaMigrations = DesignSchemaMigrations.FromStoreMigrations(package);
        }
Esempio n. 3
0
        public void SaveMigrations(string path)
        {
            StoreSchemaMigrations package = _migrationAggregator.GenerateMigrations(Schema, SchemaMigrations, _designRecords);
            var fileName   = Path.Combine(path, GenerateMigrationFileName(path));
            var parameters = new StorageParameters {
                FileName = fileName
            };
            var schema = DesignSchemaConvert.ToStoreSchema(Schema);

            _schemaStorage.SaveMigration(package, parameters);
            SchemaMigrations = DesignSchemaMigrations.FromStoreMigrations(package);
            ClearLog();
        }