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
05655dde
Commit
05655dde
authored
4 years ago
by
Guillaume Heurtier
Browse files
Options
Downloads
Patches
Plain Diff
FEAT #15370 TIME 0:45 fix dest_user reset migration
parent
8ff297de
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
migration/20.10/2010.sql
+1
-7
1 addition, 7 deletions
migration/20.10/2010.sql
migration/20.10/migrateSavedQueries.php
+2
-2
2 additions, 2 deletions
migration/20.10/migrateSavedQueries.php
with
3 additions
and
9 deletions
migration/20.10/2010.sql
+
1
−
7
View file @
05655dde
...
...
@@ -345,17 +345,11 @@ ALTER TABLE custom_fields ADD COLUMN mode custom_fields_modes NOT NULL DEFAULT '
ALTER
TABLE
listinstance
DROP
COLUMN
IF
EXISTS
delegate
;
ALTER
TABLE
listinstance
ADD
COLUMN
delegate
INTEGER
;
/* Replace dest_user with the dest in listinstance
, if the dests are differents
*/
/* Replace dest_user with the dest in listinstance */
UPDATE
res_letterbox
SET
dest_user
=
(
SELECT
item_id
FROM
listinstance
WHERE
item_mode
=
'dest'
AND
item_type
=
'user_id'
AND
listinstance
.
res_id
=
res_letterbox
.
res_id
)
WHERE
res_id
IN
(
SELECT
res_letterbox
.
res_id
FROM
res_letterbox
JOIN
listinstance
l
ON
res_letterbox
.
res_id
=
l
.
res_id
WHERE
dest_user
!=
item_id
AND
item_type
=
'user_id'
AND
item_mode
=
'dest'
);
...
...
This diff is collapsed.
Click to expand it.
migration/20.10/migrateSavedQueries.php
+
2
−
2
View file @
05655dde
...
...
@@ -156,9 +156,9 @@ foreach ($customs as $custom) {
$query
[]
=
[
'identifier'
=>
'groupSign'
,
'values'
=>
[
'id'
=>
$group
[
'id'
],
'label'
=>
$group
[
'group_desc'
],
'group'
=>
''
]];
}
}
elseif
(
$key
==
'closing_date'
)
{
$query
[]
=
[
'identifier'
=>
'closingDate'
,
'values'
=>
[
'start'
=>
getFormattedDate
(
$value
[
'fields'
][
'closing_date_from'
][
0
]),
'end'
=>
getFormattedDate
(
$value
[
'fields'
][
'closing_date_to'
][
0
])]];
$query
[]
=
[
'identifier'
=>
'closingDate'
,
'values'
=>
[
'start'
=>
getFormattedDate
(
[
'date'
=>
$value
[
'fields'
][
'closing_date_from'
][
0
]
]
),
'end'
=>
getFormattedDate
(
[
'date'
=>
$value
[
'fields'
][
'closing_date_to'
][
0
]
]
)]];
}
elseif
(
$key
==
'creation_date_pj'
)
{
$query
[]
=
[
'identifier'
=>
'attachment_creationDate'
,
'values'
=>
[
'start'
=>
getFormattedDate
(
$value
[
'fields'
][
'creation_date_pj_from'
][
0
]),
'end'
=>
getFormattedDate
(
$value
[
'fields'
][
'creation_date_pj_to'
][
0
])]];
$query
[]
=
[
'identifier'
=>
'attachment_creationDate'
,
'values'
=>
[
'start'
=>
getFormattedDate
(
[
'date'
=>
$value
[
'fields'
][
'creation_date_pj_from'
][
0
]
]
),
'end'
=>
getFormattedDate
(
[
'date'
=>
$value
[
'fields'
][
'creation_date_pj_to'
][
0
]
]
)]];
}
elseif
(
$key
==
'attachment_types'
)
{
$types
=
\Attachment\models\AttachmentModel
::
getAttachmentsTypesByXML
();
if
(
in_array
(
$value
[
'fields'
][
'attachment_types'
][
0
],
array_keys
(
$types
)))
{
...
...
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