Declare composite primary keys as such in the DDL, currently ther are only declared as unique
squeryl can specify composite keys, but can't make a composite key the table's primary key.
It would be nice to be able to generate e.g. this sql to make a composite primary key.
alter table samples add primary key(time, kind);
in mysql innodb, identifying primary keys are important for the storage layout of indices. See: http://dev.mysql.com/doc/refman/5.1/en/innodb-index-types.html
As long as there's only one unique non-null index, mysql will pick it as the primary key. But eventually someone will want more indexes and the ability to specify a composite as the primary.
It would be nice to be able to generate e.g. this sql to make a composite primary key.
alter table samples add primary key(time, kind);
in mysql innodb, identifying primary keys are important for the storage layout of indices. See: http://dev.mysql.com/doc/refman/5.1/en/innodb-index-types.html
As long as there's only one unique non-null index, mysql will pick it as the primary key. But eventually someone will want more indexes and the ability to specify a composite as the primary.
Leave a comment