Saturday, January 26, 2008

MySQL 5.1 Partitioning Example for Ruby on Rails Migration



  1. Creating table on mysql prompt : (separating partitions by 6 months each)


  2. In the migration file 001_create_stats.rb:




  3. After running rake db:migrate. On MySQL prompt, single partition being used in this example




  4. On MySQL prompt, two partitions being used in this example:




  5. On MySQL prompt, the default storage engine type is shown as InnoDB:



1 comments:

Jackson said...

How are you handling partitions when running tests in Rails? I am getting errors when account creation is attempting to create partitions during a test.