Changeset - 2ad0e992c4a4
[Not reviewed]
default
0 1 0
timeless@gmail.com - 10 years ago 2016-05-03 14:12:13
timeless@gmail.com
spelling: references
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/dbmigrate/migrate/changeset/databases/firebird.py
Show inline comments
 
@@ -35,25 +35,25 @@ class FBColumnDropper(ansisql.ANSIColumn
 
        for cons in column.table.constraints:
 
            if isinstance(cons,PrimaryKeyConstraint):
 
                # will be deleted only when the column its on
 
                # is deleted!
 
                continue
 

	
 
            should_drop = column.name in cons.columns
 
            if should_drop:
 
                self.start_alter_table(column)
 
                self.append("DROP CONSTRAINT ")
 
                self.append(self.preparer.format_constraint(cons))
 
                self.execute()
 
            # TODO: recreate unique constraint if it refenrences more than this column
 
            # TODO: recreate unique constraint if it references more than this column
 

	
 
        self.start_alter_table(column)
 
        self.append('DROP %s' % self.preparer.format_column(column))
 
        self.execute()
 

	
 

	
 
class FBSchemaChanger(ansisql.ANSISchemaChanger):
 
    """Firebird schema changer implementation."""
 

	
 
    def visit_table(self, table):
 
        """Rename table not supported"""
 
        raise exceptions.NotSupportedError(
0 comments (0 inline, 0 general)