Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
a7c924c3
Commit
a7c924c3
authored
9 years ago
by
Alex ORLUC
Browse files
Options
Downloads
Patches
Plain Diff
FEAT #2386 add data migration in 150
parent
1af06fef
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/trunk/sql/150.sql
+26
-0
26 additions, 0 deletions
core/trunk/sql/150.sql
with
26 additions
and
0 deletions
core/trunk/sql/150.sql
+
26
−
0
View file @
a7c924c3
...
@@ -726,3 +726,29 @@ CREATE VIEW res_view_attachments AS
...
@@ -726,3 +726,29 @@ CREATE VIEW res_view_attachments AS
UPDATE
parameters
SET
param_value_int
=
150
where
id
=
'database_version'
;
UPDATE
parameters
SET
param_value_int
=
150
where
id
=
'database_version'
;
-- ************************************************************************* --
-- DATA MIGRATION --
-- ************************************************************************* --
-- confidentiality
UPDATE
res_letterbox
SET
confidentiality
=
'N'
;
-- contacts_v2
INSERT
INTO
contacts_v2
(
contact_id
,
contact_type
,
is_corporate_person
,
society
,
society_short
,
firstname
,
lastname
,
title
,
function
,
other_data
,
user_id
,
entity_id
,
creation_date
,
update_date
,
enabled
)
SELECT
contact_id
,
'1'
,
is_corporate_person
,
society
,
''
,
firstname
,
lastname
,
title
,
function
,
other_data
,
'superadmin'
,
''
,
CURRENT_DATE
,
CURRENT_DATE
,
enabled
FROM
contacts
;
INSERT
INTO
contact_addresses
(
contact_id
,
contact_purpose_id
,
departement
,
firstname
,
lastname
,
title
,
function
,
occupancy
,
address_num
,
address_street
,
address_complement
,
address_town
,
address_postal_code
,
address_country
,
phone
,
email
,
website
,
salutation_header
,
salutation_footer
,
other_data
,
user_id
,
entity_id
,
is_private
,
enabled
)
SELECT
contact_id
,
'1'
,
''
,
''
,
''
,
''
,
''
,
''
,
address_num
,
address_street
,
address_complement
,
address_town
,
address_postal_code
,
address_country
,
phone
,
email
,
''
,
''
,
''
,
''
,
'superadmin'
,
''
,
is_private
,
enabled
from
contacts
;
INSERT
INTO
contact_purposes
(
id
,
label
)
VALUES
(
'1'
,
'Adresse Principale'
);
INSERT
INTO
contact_types
(
id
,
label
)
VALUES
(
'1'
,
'Courriers'
);
UPDATE
mlb_coll_ext
m
SET
address_id
=
adr
.
id
FROM
contact_addresses
adr
WHERE
m
.
exp_contact_id
=
adr
.
contact_id
OR
m
.
dest_contact_id
=
adr
.
contact_id
;
-- attachments
UPDATE
res_attachments
SET
relation
=
1
,
attachment_type
=
'response_project'
;
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