Explicitly set the column names to "user" and "privilege"
This commit is contained in:
parent
c56a88b43e
commit
987a63514f
@ -741,10 +741,12 @@ def add_metadata_column(db):
|
||||
class PrivilegeUserAssociation_R1(declarative_base()):
|
||||
__tablename__ = 'rename__privileges_users'
|
||||
user = Column(
|
||||
"user",
|
||||
Integer,
|
||||
ForeignKey(User.id),
|
||||
primary_key=True)
|
||||
privilege = Column(
|
||||
"privilege",
|
||||
Integer,
|
||||
ForeignKey(Privilege.id),
|
||||
primary_key=True)
|
||||
@ -781,7 +783,7 @@ def fix_privilege_user_association_table(db):
|
||||
new_privilege_user_assoc.rename('core__privileges_users')
|
||||
|
||||
else:
|
||||
privilege_user_assoc.c.user_id.alter(name="privilege")
|
||||
privilege_user_assoc.c.privilege_id.alter(name="user")
|
||||
privilege_user_assoc.c.core__user_id.alter(name="privilege")
|
||||
privilege_user_assoc.c.core__privilege_id.alter(name="user")
|
||||
|
||||
db.commit()
|
||||
|
@ -878,10 +878,12 @@ class PrivilegeUserAssociation(Base):
|
||||
__tablename__ = 'core__privileges_users'
|
||||
|
||||
user = Column(
|
||||
"user",
|
||||
Integer,
|
||||
ForeignKey(User.id),
|
||||
primary_key=True)
|
||||
privilege = Column(
|
||||
"privilege",
|
||||
Integer,
|
||||
ForeignKey(Privilege.id),
|
||||
primary_key=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user