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

            return(result);
        }
示例#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);
        }
示例#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();
        }