Skip to content

Commit fab914b

Browse files
author
Alex Meadows
committed
process_tracker_python-139 Add high level dates to process
🐛 forgot to remove milliseconds for mysql Closes #139
1 parent bd79086 commit fab914b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

process_tracker/models/source.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ class Source(Base):
119119
ForeignKey("process_tracker.character_set_lkup.character_set_id"),
120120
nullable=True,
121121
)
122+
source_type_id = Column(
123+
Integer,
124+
ForeignKey("process_tracker.source_type_lkup.source_type_id"),
125+
nullable=True,
126+
default=1,
127+
)
122128

123129
def __repr__(self):
124130

@@ -362,3 +368,19 @@ def __repr__(self):
362368
self.source_object_id,
363369
self.dataset_type_id,
364370
)
371+
372+
373+
class SourceType(Base):
374+
375+
__tablename__ = "source_type_lkup"
376+
__table_args__ = {"schema": "process_tracker"}
377+
378+
source_type_id = Column(Integer, primary_key=True, nullable=False)
379+
source_type_name = Column(String(75), nullable=False, unique=True)
380+
381+
def __repr__(self):
382+
383+
return "<SourceType id=%s, name=%s>" % (
384+
self.source_type_id,
385+
self.source_type_name,
386+
)

0 commit comments

Comments
 (0)