-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
love:recount error following custom migration #137
Comments
Alternatively, I could generate those two tables by iterating over the old likes table and running the If you could add the possibility of passing an optional 4th parameter to pass the date to the |
Hi @vesper8! If reactions are working I suppose that it's just typo here, but re-check that column in User model called I've refreshed implementation of counters in terms of #119 in my mind today morning, and saw that there are issues in it. It definitely need to be refactored. Related to this issue - the problem in recounting command that it doesn't create missing counters. So if they are not exists - it wouldn't work. All we need to do - add counter creation command if we've got |
This bug has been fixed in PR #148 |
@vesper8 You could try fix in the master branch: composer require cybercog/laravel-love:dev-master It will be released as v8.3 on the next week. |
Looking forward to 8.3 @antonkomarev : ) is it due any day now? |
@vesper8 working on it right now ;) |
Great @antonkomarev ! I've tested it and it works very well, much better and seemingly faster than before. I was still unable to run I worked around it by creating a custom command that executes the following:
The two Happy to report I was also able to get the same results by running this from the command line:
|
Thanks for sharing it, @vesper8! I've added this hint to the documentation: |
I am performing a migration from cybercog/laravel-likeable v3 straight to laravel-love v8
I found it much easier to do a custom migration then to perform each step of the Upgrade guide manually.
I have a rather simple scenario where my only reacters/reactants are my User model. Users can like other users and that's it.. pretty simple.
I added
love_reactant_id
andlove_reactor_id
to my user model, I populated thelove_reacters
andlove_reacants
tables, I populated thelove_reaction_types
model and finally I converted the oldlikes
table to thelove_reactions
table, making sure to use the correct reacter/reactant idAll this is working great.
My problem is that now both the love_reactant_reaction_totals and love_reactant_reaction_counters tables are empty
I thought this wouldn't be a problem since I figured the
love:recount
command would recalculate/repopulate both of those tables.. but it seems maybe I was wrong to assume this.It seems like the
love:recount
command actually depends on thelove_reactant_reaction_totals
data in order to recalculate thelove_reactant_reaction_counters
tableBut then isn't there a way to recalculate the
love_reactant_reaction_totals
table?Right now I am getting this error when trying to run
love:recount
:Symfony\Component\Debug\Exception\FatalThrowableError : Call to undefined method Cog\Laravel\Love\Reactant\ReactionTotal\Models\NullReactionTotal::update()
I thought this might be the same problem described in #80 but it seems not, I have tried using the
sync
queue as well as making sure my queues are active.. and I think the problem is that mylove_reactant_reaction_totals
is emptyCan you confirm? Is there a way to recalculate that table?
Thank you
The text was updated successfully, but these errors were encountered: