views:

115

answers:

1

Because of some non standard table creation options I am forced to use the sql dump instead of the standard schema.rb (i.e. I have uncommented this line in the environment.rb config.active_record.schema_format = :sql). I have noticed that when I use the sql dump that my fixtures do not seem to be loaded into the database. Some data is loaded into it but, I am not sure where it is coming from. Is this normal? and if it is normal can anybody tell me where this other data is coming from?

A: 

If you are loading the DB from the script you dumped, that should be all that is in there. If you see anything else I would try dropping the db and recreating it from the script to make sure.

Also, if you just want to load the fixtures, you can run:

rake db:fixtures:load

Update:

You may want to look for a way to include your options in the migrations. In my experiance it nearly always pays off to do things the rails way. If it helps, I would add custom options for using mysql cluster by using the :options option on create table:

class CreateYourTable < ActiveRecord::Migration
  def self.up
    create_table :your_table, :options => "ENGINE=NDBCLUSTER" do |t|
    #...
  end 
end
csexton