Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

booleans are not stored in an agnostic format, so migrating from postgres to MySQL makes all your trues silently change to false (i.e. corrupts a bunch of your records) #6

Open
nruth opened this Issue · 1 comment

1 participant

Nicholas Rutherford
Nicholas Rutherford
Collaborator

for example:

fixture dumped from postgres:


position:
created_at: 2010-06-17 04:27:57.9236
answer_set_id: "8"
updated_at: 2010-06-17 04:31:48.801354
text: What is the average percentage of marks obtained by all the students in Maths?
enabled: t
id: "9"
solution: (89+92+76+62+75+95)/6 = 81.5
correct_answer_id: "32"
question_set_id: "4"

fixture dumped from mysql:


position:
created_at: 2010-06-17 04:27:57
answer_set_id: "8"
updated_at: 2010-06-17 04:31:48
text: What is the average percentage of marks obtained by all the students in Maths?
enabled: "0"
id: "9"

The guilty column in this case uses the NOT NULL constraint (:null => false in rails migration).

This is an issue with using rails fixtures outside of their intended use, not sure if it's fixable or worth fixing, but worth being aware of.

Nicholas Rutherford
Collaborator

the use case being migrating like this:

with the postgres database hooked up in database.yml:
rake db:data:dump

with the mysql database hooked up in database.yml
rake db:schema:load
rake db:data:load

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.