tyggerjai: (cracklandia)tyggerjai ([personal profile] tyggerjai) wrote in [site community profile] dw_dev_training,
@ 2010-10-15 11:07 pm UTC
  • Previous Entry
  • Add to Memories
  • Tell someone about this!
  • Next Entry
Entry tags:database, sql
One of the fields in the db user table is set to only accept certain values. I need to add an acceptable value, preferably without dropping the entire table and rebuilding it. Any hints? There's probably an alter command....


(4 comments) - (Post a new comment)
(Flat) (Top-level comments only)

tyggerjai: (cracklandia)


[personal profile] tyggerjai
2010-10-15 09:26 pm UTC (link)
For people's future reference - "ALTER TABLE [tablename] MODIFY [column] [new column definition]".

There's an update-db and update-db-general script in bin/upgrading where you can add commands to the "register_alter" sub to alter an existing database, which will be run as part of $LJHOME/bin/upgrading/update-db.pl -r -p --inno

(Reply to this)  (Thread


tyggerjai: (cracklandia)


[personal profile] tyggerjai
2010-10-16 09:10 am UTC (link)
Thank you, yes! And in fact, had I read http://wiki.dwscoalition.org/notes/Beginning_dev_checklist more carefully, I might have noticed http://wiki.dwscoalition.org/notes/Dev_Finding_Things , and specifically http://wiki.dwscoalition.org/notes/Dev_Finding_Things#Managing_the_database_schema , which does mention the register_alter script I need.

(Reply to this)  (Thread from start)  (Parent)  (Thread


pauamma: Cartooney crab holding drink ("Cartooney crab holding drink")


[personal profile] pauamma
2010-10-16 02:58 pm UTC (link)
The more links to things, the easier they are to find. :-)

(Reply to this)  (Thread from start)  (Parent



(4 comments) - (Post a new comment)
(Flat) (Top-level comments only)