Commits

Fayaz Khan committed 82c371e

typo: refactoring mistake

Comments (0)

Files changed (1)

     @staticmethod
     def _add_columns(constraint, table):
 	referenced_table = table.metadata.tables[
-		    self.elements[0].target_fullname.split('.')[0]]
+		    constraint.elements[0].target_fullname.split('.')[0]]
 	for column, element in zip(constraint.columns, constraint.elements):
 	    new_column = getattr(
 		    referenced_table.c,
             'c', Base.metadata,
             #Column('id', Integer, primary_key=True, autoincrement=False),
             ImplicitForeignKeyConstraint(['id'], ['a.id'], primary_key=False)))
+
     Base.metadata.create_all()
 
 if __name__ == "__main__":