Ghost version update in k8s

Hi team, I’m getting this error when i’m updating my ghost image from 5.2.4 to 5.34.0 -

ERROR alter table subscriptions modify tier_id varchar(24) not null - Cannot change column ‘tier_id’: used in a foreign key constraint ‘subscriptions_tier_id_foreign’

alter table subscriptions modify tier_id varchar(24) not null - Cannot change column ‘tier_id’: used in a foreign key constraint ‘subscriptions_tier_id_foreign’

{“config”:{“transaction”:true},“name”:“2022-10-18-05-39-drop-nullable-tier-id.js”}
“Error occurred while executing the following migration: 2022-10-18-05-39-drop-nullable-tier-id.js”

Steps to reproduce:

  1. went to running ghost pod (5.2.4) via kubectl exec
  2. su node
  3. ghost update v5 (This will update the ghost code to 5.34.0, which is latest at the time of writing)
  4. update the ghost image in deployment file to ghost:5.34.0 and then kubectl apply

After this my pod went to error mode and that is the error im getting in the logs

What database and database version were you using with the old and new versions?

@markstos im using mysql 8 in AWS RDS. So for the clarification ghost is running in AWS EKS with a database running in AWS RDS. i just did a ghost update in EKS ghost deployment and then update the ghost image in the deployment file.

I searched in the Ghost Forum here for “‘subscriptions_tier_id_foreign” and found this related post from someone else who ran into this RDS and found a solution. Is it helpful to you?

@markstos thanks. it works !!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.