mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] dw_dev2012-06-14 10:38 pm
Entry tags:

update-db and the -r flag

Hi all,

This is important. Please note!

If you are going to be touching bin/upgrading/update-db-general.pl (and related scripts) -- you must respect the way this script works -- i.e., this script should never make any changes unless the -r flag is provided or it prompts the user running it.

This script is designed to be run by admins before code pushes, and it's supposed to spit out the "this is what I'm going to do" information. That way the admin can run it to see what might happen before it happens. It's not safe to just have it execute SQL without that flag.

This is a safety issue. I just ran it on production and it made some changes (regarding fixing certain edges) without warning me or requiring me to use the run flag. That's scary. :)

Thanks!
exor674: Computer Science is my girlfriend (Default)

[personal profile] exor674 2012-06-15 03:46 am (UTC)(link)
Is there a way to see if we are in run mode v.s. not from -general.pl? especially with actions that need to go through the API not SQL? ( [or should these cleanups be put in differente scripts] )
Edited 2012-06-15 03:46 (UTC)
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)

[personal profile] sophie 2012-06-15 11:31 am (UTC)(link)
I did not know this! Thankfully I think the only changes I've made are such that it would respect the flag anyway (using the *_register() functions, etc).

We should put this information on the wiki somewhere, if it's not already there.
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2012-06-15 03:05 pm (UTC)(link)
It's amazing that after, what, three years? we're still coming across old conventions that Everybody Knew at Danga that aren't documented anywhere...