When migrating add_index error: invalid date

ROR 3, Ruby 1.9.2
Every time I use migration with add_index included, I get an “Invalid
date” error
I’m using windows 7 and Mysql2
Can anyone help?
Here’s my code:

class CreatePages < ActiveRecord::Migration
def self.up
create_table :pages do |t|
t.integer “subject_id”
# can also use: t.references :subject
t.string “name”
t.string “permalink”
t.integer “position”
t.boolean “visible”, :default => false
t.timestamps
end
add_index(“pages”, “subject_id”)
add-index(“pages”, “permalink”)
end

def self.down
drop_table :pages
end
end

tonyaraujo wrote in post #957977:

add_index("pages", "subject_id")
add-index("pages", "permalink")

Have you tried this?
add_index :pages, :subject_id
add_index :pages, :permalink

Thanks for the reply, after trying your suggestion I still get the
same "invalid date " error. I can only migrate if I comment the
add_index part.

Replace mysql2 gem with mysql (at least for development mode under
windows).
Solved here
:
https://groups.google.com/d/msg/rubyonrails-talk/a-wyECimZ5g/1F0sgAcje0cJ