forked from s_ranjbar/city_retrofit
Correct error in db table creation (user_applications)
This commit is contained in:
parent
ae55205ad9
commit
2c2fc025eb
@ -7,7 +7,7 @@ Project Coder Guille Gutierrez Guillermo.GutierrezMorote@concordia.ca
|
|||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from sqlalchemy import Column, Integer, ForeignKey
|
from sqlalchemy import Column, Integer, ForeignKey, PrimaryKeyConstraint
|
||||||
from sqlalchemy import DateTime
|
from sqlalchemy import DateTime
|
||||||
|
|
||||||
from hub.persistence.db_config import Base
|
from hub.persistence.db_config import Base
|
||||||
@ -23,6 +23,7 @@ class UserApplications(Base):
|
|||||||
|
|
||||||
created = Column(DateTime, default=datetime.datetime.utcnow)
|
created = Column(DateTime, default=datetime.datetime.utcnow)
|
||||||
updated = Column(DateTime, default=datetime.datetime.utcnow)
|
updated = Column(DateTime, default=datetime.datetime.utcnow)
|
||||||
|
__table_args__ = (PrimaryKeyConstraint(user_id, application_id),)
|
||||||
|
|
||||||
def __init__(self, user_id, application_id):
|
def __init__(self, user_id, application_id):
|
||||||
self.user_id = user_id
|
self.user_id = user_id
|
||||||
|
Loading…
Reference in New Issue
Block a user