3 ms·
I prefer our approach: > Case #1: I want to add a new column Issue an ALTER TABLE ADD COLUMN on the production database. Try not to make it NOT NULL. > Case
by wikwocket 12y ago
I prefer our approach:
> Case #1: I want to add a new column
Issue an ALTER TABLE ADD COLUMN on the production database. Try not to make it NOT NULL.
> Case #2: I want to change a column type
Add another column (see Case #1) of the same name, with a suffix like "_2" or "_NUM" so you can tell them apart.
> Case #3: I want to rename a column
Don't risk it. Keep using the original column name. Very few of the column names reflect the reality of that they contain anyway. It's little bits of insider knowledge like this ("Product name is actually stored in ITEMNAME_LONG, ITEMNAME is only a CHAR(15) so we keep UPC in there") that contribute to our fast-paced, agile work environment.