title: How can I solve ruby-on-rails migration problem?
body: <p>I have a problem with migration. When I put rake db:migrate into terminal I got an error :</p>
  <blockquote>
  <p>rake aborted!
  StandardError: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Active Record release the migration was written for:
  class AddAttachmentImageToPins &lt; ActiveRecord::Migration[7.0]</p>
  </blockquote>
  <p>And When I'm changing into migration file</p>
  <blockquote>
  <p>class AddAttachmentImageToPins &lt; ActiveRecord::Migration</p>
  </blockquote>
  <p>to</p>
  <blockquote>
  <p>class AddAttachmentImageToPins &lt; ActiveRecord::Migration[7.0]</p>
  </blockquote>
  <p>I'm getting an error:</p>
  <blockquote>
  <p>rake aborted!
  StandardError: An error has occurred, this and all later migrations canceled:
  wrong number of arguments (given 3, expected 2)</p>
  </blockquote>
  <p>How can I solve that ?</p>
  <pre><code>class AddAttachmentImageToPins &lt; ActiveRecord::Migration[7.0]
    def self.up 
      change_table :pins do |t|
        t.attachment :image
      end
    end
  
    def self.down 
      remove_attachment :pins, :image
    end
  end
  </code></pre>