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
MO-P
Odevzdávací Systém MO
Commits
1c322479
Commit
1c322479
authored
Sep 29, 2021
by
Martin Mareš
Committed by
Jan Prachař
Jan 4, 2022
Browse files
Options
Downloads
Patches
Plain Diff
DB: U uživatelů si pamatujeme, zda mají dostávat mailové notifikace
parent
71fa1729
No related branches found
No related tags found
No related merge requests found
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 @
1c322479
...
...
@@ -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 @
1c322479
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 @
1c322479
...
...
@@ -330,6 +330,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
sign in
to comment