That went well…

Just did my first big update (even though it’s just a small thing like adding a boolean field to the model) that caused a wee bit of disruption for a couple of minutes.

So backing up a bit, I look after the Coding Grace website (which is public and if you want to help, ping me).

It’s a Django (version 1.7) and is hosted on Heroku.

It’s all fine until I realised I needed to add something small like a boolean field in the model for a news post so I can filter out published news posts to be rendered whenever news is loaded.

So after looking at the wrong help page on Heroku, because I was looking into CLI but should have just looked up the beginners tutorial and all I had to do was

And I’m in, around this period is when the website should be down…

django.db.utils.ProgrammingError: column news_newspost.is_published does not exist

… which is expected. Even Sentry that was set up to monitor the site emailed me. So I migrated, and site is back up, but no news posts (as all the news posts’ is_published are False.

A quick log into the Django Python shell, a for loop to set the is_published flag and “Bob’s your uncle”, it’s all done. News posts are all back.

Thanks to Mick for reminding me how to log into the shell on Heroku.

I’m very impressed with Heroku, how quick everything was, and once I knew where everything was, it’s command line all the way. :-)

 
0
Kudos
 
0
Kudos

Now read this

May conjures so many images… all good, silly and fun

From obligatory playing of JoCo’s First of May (here’s a SFW version and it rings in the summer (not spring) sun for me each year. :-D Then it’s the cheesy May the Fourth be with you, that’s Star Wars Day. Not really a big thing for me,... Continue →