Rake clone bug?

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.

I fixed this by uncommenting the line in environment.rb and changing it
to:

config.active_record.schema_format = :sql

Still not sure why it wasn’t working before though!

Robert

Robert J. wrote:

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 |

±----------------------±-----------------------±-----±----±--------±---------------+

| setlink_end_date | int(11) | YES | | NULL |
|
| setlink_start_date | int(11) | | | 0 |
|

±----------------------±-----------------------±-----±----±--------±---------------+