2.0.0
🛑 BACKUP BEFORE UPGRADING TO THIS VERSION 🛑
This version contains database refactors that make the data incompatible with 1.x
if you try to downgrade.
If you encounter errors, you WILL need to have a backup of all the polls tables available to go back to 1.4.2
. Permission names have also changed, so a backup of group_permissions
would also be helpful.
Massive thanks to @Wlork for their help testing all these changes!
Upgrading
Save a backup of your database -- mostly the polls
, poll_votes
, poll_options
, and group_permissions
tables -- before continuing. If you don't have any polls in your forum and haven't configured polls permissions, you can skip this step.
The migration process will delete polls in discussions that don't have associated first posts (discussion's first_post_id = null
and no post exists with number = 1
). These polls would not have been visible in v1, and so removing them should (theoretically) not cause any visible data loss - check the Flarum log after migrating to see if any polls were deleted.
composer remove reflar/polls # only if you have it installed - otherwise it won't upgrade to v2
composer require fof/polls
php flarum migrate
php flarum cache:clear
Changelog
- Drop flatpickr (FriendsOfFlarum/polls72)
- Create posts with polls (FriendsOfFlarum/polls73)
- Move voters button next to heading
- Add polls to existing posts
- Separate edit permission into own created polls & polls in own posts
- To be able to edit a poll, one of the following conditions must be true:
- User has poll moderating permission (edit & remove polls)
- User can edit post, created poll, poll hasn't ended, and user has edit own polls permission
- User can edit post, created post, poll hasn't ended, and user has edit polls in own posts permission
- If post editing permission is set to
reply
, and user cannot edit their post (because a reply was posted) and doesn't have the poll moderate permission, they won't be able to edit the polls in said post
Full Changelog: FriendsOfFlarum/polls1.4.2 → 2.0.0