Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- 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"
- # Use SQL instead of Active Record's schema dumper when creating the test database.
- # This is necessary if your schema can't be completely dumped by the schema dumper,
- # like if you have constraints or database-specific column types
- config.active_record.schema_format = :sql
- config.active_record.schema_format = :sql
- rake db:structure:dump
Add Comment
Please, Sign In to add comment