Add user_id column to kudos table

Description

Migration: add a user_id column to the kudos table, indexed but not (yet) unique, unused:

  • Add a migration as usual, to be used in dev and CI environments.

  • Add a pt-online-schema-change command in the PR description to be run on staging and beta.

No need to use a foreign key constraint because the kudos should stick around as guest kudos when users are deleted.

No downtime needed because the column is unused.

To test this, a database admin should run the migration (up, down, and back up) and then testers should confirm kudos still work as expected.

Activity

Show:
james_
January 24, 2020, 9:27 PM

 

 

 

 

 

james_
January 24, 2020, 9:28 PM

 

So we the migration is set to done on staging.

james_
January 24, 2020, 9:32 PM

Back up

 

 

Sarken
January 24, 2020, 9:43 PM

james_ 16:28
Done the migration down
16:28
then I should put it back up when you wish

sarken 16:29
Oh, good idea, let's check

james_ 16:30
Left guest kudos on https://test.archiveofourown.org/works/151?view_adult=true

sarken 16:30
guest and logged in kudos work for me while migrated down
16:30
I did https://test.archiveofourown.org/works/152

james_ 16:30
say when to go back up

sarken 16:30
So I think we can migrate up and mumble can test that and we'll be all done

mumble 16:31
i also kudosed something without problems (as guest and logged in) (edited)

16:31
so yes, bring it

james_ 16:32
done

mumble 16:33
i just went to this work, which i have never seen before: https://test.archiveofourown.org/works/144 and tried to leave a guest kudo and it says "You have already left kudos here. :)"
16:34
i could kudos it logged in

james_ 16:34
Checking something

tl;dr staging is set up a bit funky so guest kudos were recording the IP of the front ends. Nothing deploy blocking and it won't happen on production, so we're all set!

Sarken
January 24, 2020, 10:39 PM

james is starting the migration on production now, so setting this to Deployed

DeployedToBeta

Assignee

cyrilcee

Reporter

cyrilcee

Roadmap

Misc

Priority

High

Affects versions

Fix versions

Components

BackEnd

Difficulty

Medium

Milestone

Internal 0.9
Configure