Exemplo n.º 1
0
        public void DropTenantDatabaseTables() {
            var tableNames = GetTenantDatabaseTableNames();
            var schemaBuilder = new SchemaBuilder(_dataMigrationInterpreter);

            foreach (var tableName in tableNames) {
                try {
                    schemaBuilder.DropTable(schemaBuilder.RemoveDataTablePrefix(tableName));
                }
                catch (Exception ex) {
                    Logger.Warning(ex, "Failed to drop table '{0}'.", tableName);
                }
            }
        }
Exemplo n.º 2
0
        private void DropTenantDatabaseTables(IWorkContextScope environment) {
            var tableNames = GetTenantDatabaseTableNames(environment);
            var schemaBuilder = new SchemaBuilder(environment.Resolve<IDataMigrationInterpreter>());

            foreach (var tableName in tableNames) {
                try {
                    schemaBuilder.DropTable(schemaBuilder.RemoveDataTablePrefix(tableName));
                }
                catch (Exception ex) {
                    Logger.Warning(ex, "Failed to drop table '{0}'.", tableName);
                }
            }
        }