diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-06-27 13:48:55 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-06-27 13:48:55 +0200 |
| commit | 2114d5cedf9e24e8aad91f02e419eb9175289126 (patch) | |
| tree | 33f67f53199fc49340f8159a6cef5aec82c73b51 /animism-align/cli/app/sql/models/timestamp.py | |
| parent | 3cf70771cb45cc16ec33ffe44e7a1a4799d8f395 (diff) | |
update db, add paragraph table
Diffstat (limited to 'animism-align/cli/app/sql/models/timestamp.py')
| -rw-r--r-- | animism-align/cli/app/sql/models/timestamp.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/animism-align/cli/app/sql/models/timestamp.py b/animism-align/cli/app/sql/models/timestamp.py index 60e9007..c2bf410 100644 --- a/animism-align/cli/app/sql/models/timestamp.py +++ b/animism-align/cli/app/sql/models/timestamp.py @@ -11,9 +11,10 @@ from app.settings import app_cfg class Timestamp(Base): """Table for storing references to graphs""" - __tablename__ = 'graph' + __tablename__ = 'timestamp' id = Column(Integer, primary_key=True) type = Column(String(16, convert_unicode=True), nullable=False) + paragraph_id = Column(Integer, ForeignKey('paragraph.id'), nullable=True) start_ts = Column(Float, nullable=False) end_ts = Column(Float, nullable=True) sentence = Column(Text(convert_unicode=True), nullable=True) @@ -23,6 +24,7 @@ class Timestamp(Base): return { 'id': self.id, 'type': self.type, + 'paragraph_id': self.paragraph_id, 'start_ts': self.start_ts, 'end_ts': self.end_ts, 'sentence': self.description, |
