Skip to content

Commit

Permalink
process_tracker_python-139 Add high level dates to process
Browse files Browse the repository at this point in the history
🐛 forgot to remove milliseconds for mysql

Closes #139
  • Loading branch information
Alex Meadows committed Nov 22, 2019
1 parent bd79086 commit fab914b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions process_tracker/models/source.py
Expand Up @@ -119,6 +119,12 @@ class Source(Base):
ForeignKey("process_tracker.character_set_lkup.character_set_id"),
nullable=True,
)
source_type_id = Column(
Integer,
ForeignKey("process_tracker.source_type_lkup.source_type_id"),
nullable=True,
default=1,
)

def __repr__(self):

Expand Down Expand Up @@ -362,3 +368,19 @@ def __repr__(self):
self.source_object_id,
self.dataset_type_id,
)


class SourceType(Base):

__tablename__ = "source_type_lkup"
__table_args__ = {"schema": "process_tracker"}

source_type_id = Column(Integer, primary_key=True, nullable=False)
source_type_name = Column(String(75), nullable=False, unique=True)

def __repr__(self):

return "<SourceType id=%s, name=%s>" % (
self.source_type_id,
self.source_type_name,
)

0 comments on commit fab914b

Please sign in to comment.