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

DEV: Scope topic voting tables to avoid confusion with post voting #196

Merged
merged 8 commits into from
Jul 17, 2024

Conversation

nattsw
Copy link
Contributor

@nattsw nattsw commented Jul 11, 2024

Renaming discourse_voting to topic_voting since there are two forms of voting in Discourse - posts and topics.

This PR also moves a OnceOff into a post migration. The post migration will be executed, but should ideally be a no-op. This allows us to not have to maintain the OnceOff as it had to be modified before with a previous migration. I considered removing this file altogether, but I don't think there is anything negative from just converting it into a migration, and it might be useful in the unlikely scenario that a forum from the past has never ran the OnceOff before.

@nattsw nattsw force-pushed the migrate-table branch 2 times, most recently from d23608e to ab8df50 Compare July 15, 2024 02:45
nattsw added 7 commits July 17, 2024 16:44
We're not using OnceOffs any more, so to avoid having to maintain this, we're moving it to a migration. This post migration should ideally be a no-op, so it is fine to run anyway
CREATE TABLE LIKE INCLUDING ALL actually creates an index as well, so
there is no need to create an index again.

It is probably also better to set the nextval of a seq than to change
ownership from one table to another.
Copy link
Contributor

@tyb-talks tyb-talks left a comment

Choose a reason for hiding this comment

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

Good pt on setting nextval based off that seq rather than changing ownership

@nattsw nattsw merged commit 3d30377 into main Jul 17, 2024
5 checks passed
@nattsw nattsw deleted the migrate-table branch July 17, 2024 12:26
nlalonde added a commit to discourse/discourse that referenced this pull request Jul 29, 2024
discourse/discourse-topic-voting#196

Some tables in that plugin are read-only, so the script fails when
trying to update rows in those tables. Add them to the ignore list.
nlalonde added a commit to discourse/discourse that referenced this pull request Jul 29, 2024
discourse/discourse-topic-voting#196

Some tables in that plugin are read-only, so the script fails when
trying to update rows in those tables. Add them to the ignore list.
gschlager pushed a commit to discourse/discourse that referenced this pull request Aug 1, 2024
discourse/discourse-topic-voting#196

Some tables in that plugin are read-only, so the script fails when
trying to update rows in those tables. Add them to the ignore list.
nattsw added a commit that referenced this pull request Aug 7, 2024
There was a typo here - #196 - that unfortunately went through.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants