Squashed migrations and created seed_roles.py
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
from sqlalchemy import Column, BigInteger, String, ForeignKey
|
||||
from sqlalchemy import Column, String, ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from atst.models import Base
|
||||
from atst.models import Base, types
|
||||
|
||||
|
||||
class RequestInternalComment(Base):
|
||||
__tablename__ = "request_internal_comments"
|
||||
|
||||
id = Column(BigInteger, primary_key=True)
|
||||
id = types.Id()
|
||||
text = Column(String())
|
||||
|
||||
user_id = Column(ForeignKey("users.id"), nullable=False)
|
||||
|
||||
@@ -26,7 +26,7 @@ class RequestStatusEvent(Base):
|
||||
__tablename__ = "request_status_events"
|
||||
|
||||
id = Id()
|
||||
new_status = Column(SQLAEnum(RequestStatus))
|
||||
new_status = Column(SQLAEnum(RequestStatus, native_enum=False))
|
||||
time_created = Column(DateTime(timezone=True), server_default=func.now())
|
||||
request_id = Column(
|
||||
UUID(as_uuid=True), ForeignKey("requests.id", ondelete="CASCADE")
|
||||
|
||||
@@ -23,8 +23,8 @@ class TaskOrder(Base):
|
||||
|
||||
id = Column(Integer, primary_key=True)
|
||||
number = Column(String, unique=True)
|
||||
source = Column(SQLAEnum(Source))
|
||||
funding_type = Column(SQLAEnum(FundingType))
|
||||
source = Column(SQLAEnum(Source, native_enum=False))
|
||||
funding_type = Column(SQLAEnum(FundingType, native_enum=False))
|
||||
funding_type_other = Column(String)
|
||||
clin_0001 = Column(Integer)
|
||||
clin_0003 = Column(Integer)
|
||||
|
||||
Reference in New Issue
Block a user