KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am using Jruby and rails 2.2.2. My problem is I have a migration that is not being correctly written to the database schema. Here is my migration: class CreateNotes < ActiveRecord::Migration def self.up create_table(:notes, :options => 'ENGINE=MyISAM') do |t| t.string :title t.text :body t.timestamps end execute "alter table notes ADD FULLTEXT(title, body)" end Here is what it produces on in schema.rb create_table "notes", :force => true do |t| t.string "title" t.text "body" t.datetime "created_at" t.datetime "updated_at" end add_index "notes", ["title", "body"], :name => "title" I have two question: How do I get 'ENGINE=MyISAM' into the schema? Why did my execute statement become add_index "notes", ["title", "body"], :name => "title" ? and how do I force migrations to leave it as an execute statement? Thanks to Christian Lescuyer for the answer. However, when I tried this nothing changed. I uncommented the config.active_record... line but, my schema has not changed. I have tried this in jruby and on ruby 1.8.6 with rails 2.2.2 and edge rails and there is not changes in the schema. Can anybody tell me what I am doing wrong?
Tags (comma-separated)
Save Edits
Cancel