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

DB: papers.broken

parent 45e7c4c8
No related branches found
No related tags found
1 merge request!27Tolerování nekorektních PDF
...@@ -163,7 +163,8 @@ CREATE TABLE papers ( ...@@ -163,7 +163,8 @@ CREATE TABLE papers (
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 note text NOT NULL DEFAULT '', -- komentář uploadujícího
broken bool NOT NULL DEFAULT false -- poničené PDF přijaté s varováním
); );
CREATE INDEX papers_for_task_index ON papers (for_task); CREATE INDEX papers_for_task_index ON papers (for_task);
... ...
......
SET ROLE 'mo_osmo';
ALTER TABLE papers
ADD COLUMN broken bool NOT NULL DEFAULT false; -- poničené PDF přijaté s varováním
...@@ -419,6 +419,7 @@ class Paper(Base): ...@@ -419,6 +419,7 @@ class Paper(Base):
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")) note = Column(Text, nullable=False, server_default=text("''::text"))
broken = Column(Boolean, nullable=False, server_default=text("false"))
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 to comment