List:General Discussion« Previous MessageNext Message »
From:Richard Antecki Date:August 5 1999 6:57am
Subject:altering ENUM columns
View as plain text  
Hi,

I know one can add items to an ENUM safely, but is it safe to completely
change the elements in an ENUM.

For example, if I have an ENUM defined as:

enum('ACTIVE','EXPIRED','OVER_LIMIT','OVER_BALANCE','FROZEN','CLOSED','INVALID','ONHOLD')

I now realise that I don't really need OVER_LIMIT or OVER_BALANCE, so if I
alter the enum to be:

enum('ACTIVE','EXPIRED','FROZEN','CLOSED','INVALID','ONHOLD')

What happens to the columns set as FROZEN, CLOSED ... and what happens to
columns already set as OVER_LIMIT, OVER_BALANCE?

I guess this depends on the internal representation.  If they are stored
internally as integers then any alterations like this will cause values to
change, am I correct?

Thanks,

Richard

Thread
Colum NamesTom Bell5 Aug
  • Re: Colum NamesPaul DuBois5 Aug
  • Re: Colum NamesRalph Graulich5 Aug
    • altering ENUM columnsRichard Antecki5 Aug
      • altering ENUM columnsMichael Widenius5 Aug