[Cl-perec-devel] Schema evolution: handling of initforms

Levente Mészáros levente.meszaros at gmail.com
Wed Aug 27 07:53:19 UTC 2008

On Tue, Aug 26, 2008 at 9:10 PM, Leslie P. Polzer <leslie.polzer at gmx.net> wrote:
> I just noticed that existing instances don't get updated
> with a specified initform when a slot addition takes place.
> Deliberate or a bug?
It is a missing feature and unfortunately it can even make impossible
to load an instance from the database after the slot addition. For
example, if you define a new slot with integer-16 and do not allow
nils, then the database will be incorrect, because the alter table
will add the column with NULL default value which is certainly not an

If the initform is a constant it could go down to the ALTER TABLE sql
command, probably with some cl-rdbms support its not that difficult to
implement. We don't have tests for this and when occasionally we need
to do such things we workaround by issuing an SQL update.

Sorry for your inconvenience,
There's no perfectoin

More information about the cl-perec-devel mailing list