Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
644db78c
Commit
644db78c
authored
3 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
DB: U uživatelů si pamatujeme, zda mají dostávat mailové notifikace
parent
aa6161e2
Branches
Branches containing commit
No related tags found
1 merge request
!100
Registrace: Notifikovat pouze uživatele, kteří si to přejí
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
db/db.ddl
+2
-1
2 additions, 1 deletion
db/db.ddl
db/upgrade-20210930.sql
+4
-0
4 additions, 0 deletions
db/upgrade-20210930.sql
mo/db.py
+1
-0
1 addition, 0 deletions
mo/db.py
with
7 additions
and
1 deletion
db/db.ddl
+
2
−
1
View file @
644db78c
...
...
@@ -27,7 +27,8 @@ CREATE TABLE users (
last_login_at timestamp with time zone DEFAULT NULL,
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)
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í
...
...
This diff is collapsed.
Click to expand it.
db/upgrade-20210930.sql
0 → 100644
+
4
−
0
View file @
644db78c
SET
ROLE
mo_osmo
;
ALTER
TABLE
users
ADD
COLUMN
email_notify
boolean
NOT
NULL
DEFAULT
true
;
This diff is collapsed.
Click to expand it.
mo/db.py
+
1
−
0
View file @
644db78c
...
...
@@ -331,6 +331,7 @@ class User(Base):
reset_at
=
Column
(
DateTime
(
True
))
password_hash
=
Column
(
String
(
255
),
server_default
=
text
(
"
NULL::character varying
"
))
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
'
)
participants
=
relationship
(
'
Participant
'
,
primaryjoin
=
'
Participant.user_id == User.user_id
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment