Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create record for all watched topics and boards during upgrade #6683

Merged
merged 2 commits into from Apr 23, 2021

Conversation

BrickOzp
Copy link
Contributor

@BrickOzp BrickOzp commented Apr 9, 2021

The notification mode for watched topics and boards
are stored in the user_alert_prefs table. These needs to be
created when upgrading from 2.0 to 2.1

Fixes #6665

Signed-off-by: Oscar Rydhé oscar.rydhe@gmail.com

other/upgrade_2-1_postgresql.sql Outdated Show resolved Hide resolved
other/upgrade_2-1_postgresql.sql Outdated Show resolved Hide resolved
@albertlast
Copy link
Collaborator

albertlast commented Apr 12, 2021 via email

@albertlast
Copy link
Collaborator

albertlast commented Apr 12, 2021 via email

@BrickOzp BrickOzp force-pushed the upgrader branch 2 times, most recently from 56140d9 to 111ff80 Compare April 19, 2021 08:01
$inserts = array();

$request = $smcFunc['db_query']('', '
SELECT id_member, CONCAT(\'topic_notify_\', id_topic), 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't recommand to use concat, since it limit you to only two strings ->

\'topic_notify_\' || id_topic

or to make it clearer

(\'topic_notify_\' || id_topic)

also maybe a good idea to add an alias to make refer

(\'topic_notify_\' || id_topic) as alert_pref

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that a psql thing? When I tried it on mysql it only returned 1 so I went for concat instead.
If it works for psql is there a point in using different methods for psql/mysql?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i didn't know that this is in mysql default disable: #6708
but than stay on concat, but still i would like to see that you provide an alias for this column.

@BrickOzp
Copy link
Contributor Author

This now requires #6708 to work

The notification mode for watched topics and boards
are stored in the user_alert_prefs table. These needs to be
created when upgrading from 2.0 to 2.1

Fixes SimpleMachines#6665

Signed-off-by: Oscar Rydhé <oscar.rydhe@gmail.com>
This will remove the red color for these columns.

Signed-off-by: Oscar Rydhé <oscar.rydhe@gmail.com>
@MissAllSunday MissAllSunday merged commit 9b124d4 into SimpleMachines:release-2.1 Apr 23, 2021
@pr-triage pr-triage bot added the PR: merged label Apr 23, 2021
BrickOzp added a commit to BrickOzp/SMF2.1 that referenced this pull request May 7, 2021
This is needed for fix SimpleMachines#6683

Signed-off-by: Oscar Rydhé <oscar.rydhe@gmail.com>
live627 pushed a commit that referenced this pull request May 7, 2021
This is needed for fix #6683

Signed-off-by: Oscar Rydhé <oscar.rydhe@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Erroneous 'No alerts or emails' messages after upgrade
4 participants