Skip to content
Snippets Groups Projects
Commit e365502c authored by Martin Mareš's avatar Martin Mareš
Browse files

DB: Sloupeček pro poznámku k paperu

parent 7f80a7a4
No related branches found
No related tags found
1 merge request!9WIP: Zárodek uživatelské části webu a submitování
...@@ -157,7 +157,8 @@ CREATE TABLE papers ( ...@@ -157,7 +157,8 @@ CREATE TABLE papers (
uploaded_at timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, uploaded_at timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
pages int DEFAULT NULL, -- počet stránek pages int DEFAULT NULL, -- počet stránek
bytes int DEFAULT NULL, -- velikost souboru bytes int DEFAULT NULL, -- velikost souboru
file_name varchar(255) NOT NULL -- relativní cesta k souboru file_name varchar(255) NOT NULL, -- relativní cesta k souboru
note text NOT NULL DEFAULT "" -- komentář uploadujícího
); );
-- Odevzdané řešení -- Odevzdané řešení
......
...@@ -383,6 +383,7 @@ class Paper(Base): ...@@ -383,6 +383,7 @@ class Paper(Base):
pages = Column(Integer) pages = Column(Integer)
bytes = Column(Integer) bytes = Column(Integer)
file_name = Column(String(255), nullable=False) file_name = Column(String(255), nullable=False)
note = Column(Text, nullable=False, server_default=text("''::text"))
task = relationship('Task') task = relationship('Task')
for_user_obj = relationship('User', primaryjoin='Paper.for_user == User.user_id') for_user_obj = relationship('User', primaryjoin='Paper.for_user == User.user_id')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment