From bc6fbfa84ab6e1e9639e00cc23b3c41ab1d30dc1 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 14 Jul 2006 20:06:09 +0000 Subject: overhaul to schema, addition of ForeignKeyConstraint/ PrimaryKeyConstraint objects (also UniqueConstraint not completed yet). table creation and reflection modified to be more oriented towards these new table-level objects. reflection for sqlite/postgres/mysql supports composite foreign keys; oracle/mssql/firebird not converted yet. --- lib/sqlalchemy/databases/firebird.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib/sqlalchemy/databases/firebird.py') diff --git a/lib/sqlalchemy/databases/firebird.py b/lib/sqlalchemy/databases/firebird.py index 0039333d5..085d8cf44 100644 --- a/lib/sqlalchemy/databases/firebird.py +++ b/lib/sqlalchemy/databases/firebird.py @@ -293,7 +293,7 @@ class FBCompiler(ansisql.ANSICompiler): return "" class FBSchemaGenerator(ansisql.ANSISchemaGenerator): - def get_column_specification(self, column, override_pk=False, **kwargs): + def get_column_specification(self, column, **kwargs): colspec = column.name colspec += " " + column.type.engine_impl(self.engine).get_col_spec() default = self.get_column_default_string(column) @@ -302,10 +302,6 @@ class FBSchemaGenerator(ansisql.ANSISchemaGenerator): if not column.nullable: colspec += " NOT NULL" - if column.primary_key and not override_pk: - colspec += " PRIMARY KEY" - if column.foreign_key: - colspec += " REFERENCES %s(%s)" % (column.foreign_key.column.table.name, column.foreign_key.column.name) return colspec def visit_sequence(self, sequence): -- cgit v1.2.1