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
958b40d1
Commit
958b40d1
authored
Jan 30, 2018
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix upgrade query with Wordpress integration
parent
f72accde
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
install.php
qa-include/db/install.php
+2
-0
No files found.
qa-include/db/install.php
View file @
958b40d1
...
...
@@ -1587,6 +1587,7 @@ function qa_db_upgrade_tables()
case
67
:
// ensure we don't have old userids lying around
if
(
!
QA_FINAL_EXTERNAL_USERS
)
{
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)'
);
...
...
@@ -1594,6 +1595,7 @@ function qa_db_upgrade_tables()
// set up foreign key on messages table
qa_db_upgrade_query
(
'ALTER TABLE ^messages ADD CONSTRAINT ^messages_ibfk_1 FOREIGN KEY (fromuserid) REFERENCES ^users(userid) ON DELETE SET NULL'
);
qa_db_upgrade_query
(
'ALTER TABLE ^messages ADD CONSTRAINT ^messages_ibfk_2 FOREIGN KEY (touserid) REFERENCES ^users(userid) ON DELETE SET NULL'
);
}
qa_db_upgrade_query
(
$locktablesquery
);
break
;
...
...
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