diff options
author | iElectric <unknown> | 2009-06-27 14:13:27 +0000 |
---|---|---|
committer | iElectric <unknown> | 2009-06-27 14:13:27 +0000 |
commit | 9f7ab96881415ec6bd7fc7729f5196d75d01b8ab (patch) | |
tree | 3eef10782c578b10b1e2186fcec0d07aa43d15ba /migrate/changeset/databases/firebird.py | |
parent | a8c31eb25f89542c9be72d0a8f90b4d984b6aead (diff) | |
download | sqlalchemy-migrate-9f7ab96881415ec6bd7fc7729f5196d75d01b8ab.tar.gz |
- completely refactored ColumnDelta to extract differences between columns/parameters (also fixes issue #23)
- fixed some bugs (passing server_default) on column.alter
- updated tests, specially ColumnDelta and column.alter
- introduced alter_metadata which can preserve altering existing objects if False (defaults to True)
- updated documentation
Diffstat (limited to 'migrate/changeset/databases/firebird.py')
-rw-r--r-- | migrate/changeset/databases/firebird.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/migrate/changeset/databases/firebird.py b/migrate/changeset/databases/firebird.py index 215762c..d60cf00 100644 --- a/migrate/changeset/databases/firebird.py +++ b/migrate/changeset/databases/firebird.py @@ -30,12 +30,13 @@ class FBSchemaChanger(ansisql.ANSISchemaChanger): raise exceptions.NotSupportedError( "Firebird does not support renaming tables.") - def _visit_column_name(self, table, col_name, delta): - new_name = delta['name'] + def _visit_column_name(self, table, column, delta): self.start_alter_table(table) - self.append('ALTER COLUMN %s TO %s' % ((col_name), (new_name))) + col_name = self.preparer.quote(delta.current_name, table.quote) + new_name = self.preparer.format_column(delta.result_column) + self.append('ALTER COLUMN %s TO %s' % (col_name, new_name)) - def _visit_column_nullable(self, table, col_name, delta): + def _visit_column_nullable(self, table, column, delta): """Changing NULL is not supported""" # TODO: http://www.firebirdfaq.org/faq103/ raise exceptions.NotSupportedError( @@ -50,6 +51,7 @@ class FBConstraintDropper(ansisql.ANSIConstraintDropper): """Firebird constaint dropper implementation.""" def cascade_constraint(self, constraint): + """Cascading constraints is not supported""" raise exceptions.NotSupportedError( "Firebird does not support cascading constraints") |