I released verion .21, which should solve your first two problems. Haven't quite decided on the syntax for foreign keys, maybe :create-table can look like defclass too:
(:create-table 'my-table ((slot-a :type integer :foreign-key (my-other-table id) :default 55) (slot-b :type (or null (string 24))) (:primary-key slot-a) (:foreign-key (slot-a slot-b) (yet-another-table a b) (:unique-index slot-b)) ;; Not really part of CREATE TABLE, but hey, why not?
Then deftable doesn't have to do as much transforming on the definition and can remain simple.
Also, I'm not sure how to handle the creation of a set of tables that contain foreign keys -- since they have to be created in the right order. Altering them is even more tricky. Maybe I'll default to deferrable foreign keys, and turn on deferring when messing with the table scheme.
Let me know what you think.
Marijn