i am running the following in Rails4:
$ bundle exec rake db:migrate
== 201405270646 AddAttachmentImageToPins: migrating =========================== -- change_table(:pins) rake aborted! StandardError: An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: no such table: pins: ALTER TABLE "pins" ADD "image_file_n ame" varchar(255)c:/Sites/pinteresting/db/migrate/201405270646_add_attachment_im age_to_pins.rb:4:in
block in up' c:/Sites/pinteresting/db/migrate/201405270646_add_attachment_image_to_pins.rb:3: in
up' c:in `migrate' Tasks: TOP => db:migrate (See full trace by running task with --trace)
I can't undestand why i am getting this error.
Here is my github: https://github.com/frankzk/pinteresting
Thanks for the help
Migration file:
class AddAttachmentImageToPins < ActiveRecord::Migration
def self.up
change_table :pins do |t|
t.attachment :image
end
end
def self.down
drop_attached_file :pins, :image
end
end