diff --git a/corepos/db/model.py b/corepos/db/model.py index eded94a309351c64406531e738cf47ec26882cd8..819f78d9e0d47c87fbfb459d5cd67e4985b7a69c 100644 --- a/corepos/db/model.py +++ b/corepos/db/model.py @@ -84,11 +84,11 @@ class Subdepartment(Base): sa.ForeignKeyConstraint(['dept_ID'], ['departments.dept_no']), ) - subdept_no = sa.Column(sa.SmallInteger(), primary_key=True, autoincrement=False, nullable=False) + number = sa.Column('subdept_no', sa.SmallInteger(), primary_key=True, autoincrement=False, nullable=False) - subdept_name = sa.Column(sa.String(length=30), nullable=True) + name = sa.Column('subdept_name', sa.String(length=30), nullable=True) - dept_ID = sa.Column(sa.SmallInteger(), nullable=True) + department_number = sa.Column('dept_ID', sa.SmallInteger(), nullable=True) department = orm.relationship( Department, doc=""" @@ -96,7 +96,7 @@ class Subdepartment(Base): """) def __str__(self): - return self.subdept_name or '' + return self.name or '' @six.python_2_unicode_compatible