Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMASCH
scheduling-system
Merge requests
!130
Resolve "notification list changes"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "notification list changes"
202-notification-list-changes
into
master
Overview
0
Commits
7
Pipelines
2
Changes
1
Merged
Piotr Gawron
requested to merge
202-notification-list-changes
into
master
7 years ago
Overview
0
Commits
7
Pipelines
2
Changes
1
Expand
Closes
#202 (closed)
Edited
7 years ago
by
Piotr Gawron
0
0
Merge request reports
Viewing commit
8cae7996
Prev
Next
Show latest version
1 file
+
85
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
8cae7996
default set of columns for post mail for approaching visit
· 8cae7996
Piotr Gawron
authored
7 years ago
smash/web/migrations/0106_approaching_post_mail_list_update.py
0 → 100644
+
85
−
0
Options
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2018-02-14 10:26
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
def
create_default_columns_for_VISIT_LIST_APPROACHING_FOR_MAIL_CONTACT
(
apps
,
schema_editor
):
# We can't import the Study model directly as it may be a newer
# version than this migration expects. We use the historical version.
SubjectColumns
=
apps
.
get_model
(
"
web
"
,
"
SubjectColumns
"
)
subject_columns
=
SubjectColumns
.
objects
.
create
()
subject_columns
.
sex
=
False
subject_columns
.
first_name
=
True
subject_columns
.
last_name
=
True
subject_columns
.
languages
=
False
subject_columns
.
default_written_communication_language
=
False
subject_columns
.
phone_number
=
False
subject_columns
.
phone_number_2
=
False
subject_columns
.
phone_number_3
=
False
subject_columns
.
email
=
False
subject_columns
.
date_born
=
False
subject_columns
.
address
=
False
subject_columns
.
postal_code
=
False
subject_columns
.
city
=
False
subject_columns
.
country
=
False
subject_columns
.
dead
=
False
subject_columns
.
save
()
StudyColumns
=
apps
.
get_model
(
"
web
"
,
"
StudyColumns
"
)
study_columns
=
StudyColumns
.
objects
.
create
()
study_columns
.
postponed
=
False
study_columns
.
datetime_contact_reminder
=
False
study_columns
.
type
=
False
study_columns
.
default_location
=
True
study_columns
.
flying_team
=
True
study_columns
.
screening_number
=
False
study_columns
.
nd_number
=
True
study_columns
.
mpower_id
=
False
study_columns
.
comments
=
False
study_columns
.
referral
=
False
study_columns
.
diagnosis
=
False
study_columns
.
year_of_diagnosis
=
False
study_columns
.
information_sent
=
False
study_columns
.
pd_in_family
=
False
study_columns
.
resigned
=
False
study_columns
.
resign_reason
=
False
study_columns
.
save
()
VisitColumns
=
apps
.
get_model
(
"
web
"
,
"
VisitColumns
"
)
visit_columns
=
VisitColumns
.
objects
.
create
()
visit_columns
.
datetime_begin
=
True
visit_columns
.
datetime_end
=
False
visit_columns
.
is_finished
=
False
visit_columns
.
post_mail_sent
=
False
visit_columns
.
visit_number
=
True
visit_columns
.
visible_appointment_types
=
False
visit_columns
.
save
()
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'
web
'
,
'
0105_unfinished_appointments_list_update
'
),
]
operations
=
[
migrations
.
RunPython
(
create_default_columns_for_VISIT_LIST_APPROACHING_FOR_MAIL_CONTACT
),
migrations
.
RunSQL
(
'
INSERT INTO web_studyvisitlist (
'
+
'
study_id,
'
+
'
visible_visit_columns_id,
'
+
'
visible_subject_columns_id,
'
+
'
visible_study_subject_columns_id,
'
+
'
visible_appointment_types_done,
'
'
visible_appointment_types_in_progress,
'
'
visible_appointment_types_missing,
'
'
type)
'
+
"
SELECT
"
+
"
1,
"
+
"
max(web_visitcolumns.id),
"
+
"
max(web_subjectcolumns.id),
"
+
"
max(web_studycolumns.id),
"
+
"
FALSE,
"
+
"
FALSE,
"
+
"
FALSE,
"
+
"'
APPROACHING_FOR_MAIL_CONTACT
'
FROM web_visitcolumns, web_studycolumns, web_subjectcolumns;
"
),
]
Loading