Skip to main content

Module evolution

Module evolution 

Source
Expand description

Changing a table that already holds rows — what this engine keeps through such a change, and the statement it takes to make one.

A first deploy writes CREATE. Every deploy after it has rows to keep, and the two questions a dialect is the only one able to answer are:

  • does the engine keep every value through this change? A column declared to hold ten characters and now declared to hold forty holds everything it held on one engine and is rebuilt by a cast on another. EvolutionAnswers is where a dialect says which it is.
  • what statement does the engine take? Most write ALTER TABLE … ADD COLUMN …, some write ALTER TABLE … ADD …, and a change some engines make with a statement is not a statement other engines have at all. ColumnEvolution is the change, handed over to be spelled.

§Both default to the careful answer

An engine nobody has measured keeps nothing it has not been said to keep, and is given no statement Razeri cannot show it accepts. A dialect that answers nothing here still gets ADD COLUMN, which is the one spelling every engine Razeri targets takes, and gets no other statement at all.

Structs§

EvolutionAnswers
What this engine keeps through a change to a table that already holds rows.

Enums§

ColumnEvolution
One change to a table that already holds rows, handed to the dialect to spell.