Index: db/migrate/002_add_photos_table.rb =================================================================== --- db/migrate/002_add_photos_table.rb (revision 36) +++ db/migrate/002_add_photos_table.rb (working copy) @@ -1,38 +0,0 @@ -class AddPhotosTable < ActiveRecord::Migration - def self.up - create_table :photos do |t| - t.column :news_item_id, :integer - t.column :image, :string - t.column :description, :string - t.column :created_at, :datetime - t.column :updated_at, :datetime - t.column :created_by_id, :integer - t.column :updated_by_id, :integer - end - - create_table :tags do |t| - t.column :name, :string - end - - create_table :tags_news_items, :id => false do |t| - t.column :tag_id, :integer - t.column :news_item_id, :integer - end - - create_table :tags_photos, :id => false do |t| - t.column :tag_id, :integer - t.column :photo_id, :integer - end - - add_column :news_items, :updated_at, :datetime - end - - def self.down - remove_column :news_items, :updated_at - - drop_table :tags_photos - drop_table :tags_news_items - drop_table :tags - drop_table :photos - end -end