Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
e62344be
Commit
e62344be
authored
Aug 14, 2020
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove favorites of deleted users
parent
d9f19b6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
install.php
qa-include/db/install.php
+9
-2
No files found.
qa-include/db/install.php
View file @
e62344be
...
...
@@ -24,7 +24,7 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
exit
;
}
define
(
'QA_DB_VERSION_CURRENT'
,
6
7
);
define
(
'QA_DB_VERSION_CURRENT'
,
6
8
);
/**
...
...
@@ -1589,8 +1589,8 @@ function qa_db_upgrade_tables()
break
;
case
67
:
// ensure we don't have old userids lying around
if
(
!
QA_FINAL_EXTERNAL_USERS
)
{
// ensure we don't have old userids lying around
qa_db_upgrade_query
(
'ALTER TABLE ^messages MODIFY fromuserid '
.
$definitions
[
'messages'
][
'fromuserid'
]);
qa_db_upgrade_query
(
'ALTER TABLE ^messages MODIFY touserid '
.
$definitions
[
'messages'
][
'touserid'
]);
qa_db_upgrade_query
(
'UPDATE ^messages SET fromuserid=NULL WHERE fromuserid NOT IN (SELECT userid FROM ^users)'
);
...
...
@@ -1604,6 +1604,13 @@ function qa_db_upgrade_tables()
break
;
// Up to here: Version 1.8
case
68
:
// remove favorites of deleted users
qa_db_upgrade_query
(
'DELETE FROM ^userfavorites WHERE entitytype="U" AND entityid NOT IN (SELECT userid FROM ^users)'
);
break
;
// Up to here: Version 1.9
}
qa_db_set_db_version
(
$newversion
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment