Hi. I’m having a problem with my testing. The following table in my
development database (MySQL 4.1.12, InnoDB):
±----------------------±-----------------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default |
Extra |
±----------------------±-----------------------±-----±----±--------±---------------+
| pupil_set_id | mediumint(10) unsigned | | MUL | 0 |
|
| pupil_id | mediumint(10) unsigned | | MUL | 0 |
|
| link_id | bigint(20) unsigned | | PRI | NULL |
auto_increment |
| external_pupil_id | int(11) | YES | | NULL |
|
| external_pupil_set_id | int(11) | YES | | NULL |
| |
| setlink_end_date | int(11) | YES | | NULL |
|
| setlink_start_date | int(11) | | | 0 |
|
±----------------------±-----------------------±-----±----±--------±---------------+
gets cloned by rake to:
±----------------------±--------±-----±----±--------±------+
| Field | Type | Null | Key | Default | Extra |
±----------------------±--------±-----±----±--------±------+
| pupil_set_id | int(10) | | MUL | 0 | |
| pupil_id | int(10) | | MUL | 0 | |
| link_id | int(20) | | | 0 | |
| external_pupil_id | int(11) | YES | | NULL | |
| external_pupil_set_id | int(11) | YES | | NULL | |
| setlink_end_date | int(11) | YES | | NULL | |
| setlink_start_date | int(11) | | | 0 | |
±----------------------±--------±-----±----±--------±------+
which is missing the primary key and autoincrement for link_id, and has
link_id as int(20) which doesn’t make sense!
Still the same problem when I pare down my setlinks.yml to
link1:
link_id: 1
pupil_id: 1
pupil_set_id: 1
setlink_end_date: NULL
setlink_start_date: 1
Is it me, or is there a bug here in the way rake clones the db?
Robert J.