Skip to content
Snippets Groups Projects
Commit 1c322479 authored by Martin Mareš's avatar Martin Mareš Committed by Jan Prachař
Browse files

DB: U uživatelů si pamatujeme, zda mají dostávat mailové notifikace

parent 71fa1729
Branches
No related tags found
No related merge requests found
...@@ -27,7 +27,8 @@ CREATE TABLE users ( ...@@ -27,7 +27,8 @@ CREATE TABLE users (
last_login_at timestamp with time zone DEFAULT NULL, last_login_at timestamp with time zone DEFAULT NULL,
reset_at timestamp with time zone DEFAULT NULL, -- poslední reset/aktivace nebo žádost o ně reset_at timestamp with time zone DEFAULT NULL, -- poslední reset/aktivace nebo žádost o ně
password_hash varchar(255) DEFAULT NULL, -- heš hesla (je-li nastaveno) password_hash varchar(255) DEFAULT NULL, -- heš hesla (je-li nastaveno)
note text NOT NULL DEFAULT '' -- poznámka viditelná pro orgy note text NOT NULL DEFAULT '', -- poznámka viditelná pro orgy
email_notify boolean NOT NULL DEFAULT true -- přeje si dostávat mailové notifikace
); );
-- Hierarchie regionů a organizací -- Hierarchie regionů a organizací
... ...
......
SET ROLE mo_osmo;
ALTER TABLE users ADD COLUMN
email_notify boolean NOT NULL DEFAULT true;
...@@ -330,6 +330,7 @@ class User(Base): ...@@ -330,6 +330,7 @@ class User(Base):
reset_at = Column(DateTime(True)) reset_at = Column(DateTime(True))
password_hash = Column(String(255), server_default=text("NULL::character varying")) password_hash = Column(String(255), server_default=text("NULL::character varying"))
note = Column(Text, nullable=False, server_default=text("''::text")) note = Column(Text, nullable=False, server_default=text("''::text"))
email_notify = Column(Boolean, nullable=False, server_default=text("true"))
roles = relationship('UserRole', primaryjoin='UserRole.user_id == User.user_id') roles = relationship('UserRole', primaryjoin='UserRole.user_id == User.user_id')
participants = relationship('Participant', primaryjoin='Participant.user_id == User.user_id') participants = relationship('Participant', primaryjoin='Participant.user_id == User.user_id')
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment