-
Notifications
You must be signed in to change notification settings - Fork 308
third step of 835 for payment_instructions #4062
Conversation
Blocking on #4061. |
Here's the diff between this PR and #4046, showing scant differences between the result of the one-shot version and the zero-downtime version of the migration, apart from the fixes in #4060 (which are included on the latter but not the former): https://gist.github.com/whit537/b80dc73755d155d6f1784b65adf955a2 |
0bd4c14
to
cfbdaf1
Compare
cfbdaf1
to
a015fa5
Compare
Rebased on master (@9afc3319d9fa53d0841a6476bfc279037c89bdd4), previous head - @cfbdaf1e586385d1efbf7ad0dc614b1f914cbf68 |
@@ -0,0 +1,17 @@ | |||
BEGIN; | |||
|
|||
DROP VIEW current_payment_instructions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, why do we have to rebuild the view here? (It made sense in the second step (#4061))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The view includes the participant
and team
columns (SELECT [...] *
), so if we don't drop those columns here then the next steps will fail.
[gratipay] $ psql gratipay-test
Null display is "¤".
Line style is unicode.
Border style is 2.
psql (9.4.5, server 9.3.2)
Type "help" for help.
gratipay-test=# alter table payment_instructions drop column participant;
ERROR: cannot drop table payment_instructions column participant because other objects depend on it
DETAIL: view current_payment_instructions depends on table payment_instructions column participant
HINT: Use DROP ... CASCADE to drop the dependent objects too.
gratipay-test=#
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha! Cool.
Note to deploy: Run |
I can't deploy right now - I'll do it in 2 hours if no one else gets to it first |
Okay, I can deploy ... |
Drops the old non-id columns.
#835