diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2021-03-16 16:54:28 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2021-03-16 16:54:28 +0100 |
| commit | 1cfe96ca6ef5c54eadd986c951dade0f56d72440 (patch) | |
| tree | 02d34b15a24afa43c6edf7b0011d56bc2c2c49c4 /cli/app/sql/models/upload.py | |
| parent | a9d86650f40a82a64d1fd8e0525c26422d314d3a (diff) | |
migrating to mysql
Diffstat (limited to 'cli/app/sql/models/upload.py')
| -rw-r--r-- | cli/app/sql/models/upload.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/app/sql/models/upload.py b/cli/app/sql/models/upload.py index 87f758a..30e53dc 100644 --- a/cli/app/sql/models/upload.py +++ b/cli/app/sql/models/upload.py @@ -1,4 +1,4 @@ -from sqlalchemy import create_engine, Table, Column, String, Integer, DateTime +from sqlalchemy import create_engine, Table, Column, ForeignKey, String, Integer, DateTime import sqlalchemy.sql.functions as func from sqlalchemy_utc import UtcDateTime, utcnow from wtforms_alchemy import ModelForm @@ -14,7 +14,7 @@ class Upload(Base): """Table for storing references to various media""" __tablename__ = 'upload' id = Column(Integer, primary_key=True) - graph_id = Column(Integer) + graph_id = Column(Integer, ForeignKey('graph.id'), nullable=True) sha256 = Column(String(256), nullable=False) fn = Column(String(256), nullable=False) ext = Column(String(4, convert_unicode=True), nullable=False) |
