diff --git a/db/migrate/20111023230730_fix_photo_share_visibilities.rb b/db/migrate/20111023230730_fix_photo_share_visibilities.rb new file mode 100644 index 000000000..d4c673f49 --- /dev/null +++ b/db/migrate/20111023230730_fix_photo_share_visibilities.rb @@ -0,0 +1,24 @@ +class FixPhotoShareVisibilities < ActiveRecord::Migration + class Photo < ActiveRecord::Base; end + + def self.up + raise 'migration currently only compatable with mysql' if postgres? + + if Photo.first.respond_to?(:tmp_old_id) + ['aspect_visibilities', 'share_visibilities'].each do + ActiveRecord::Base.connection.execute < 20111021184041) do +ActiveRecord::Schema.define(:version => 20111023230730) do create_table "aspect_memberships", :force => true do |t| t.integer "aspect_id", :null => false