title: Rails and MySQL syntax error with multiple SQL statements in an execute block
body: <p>I have the following code in a Rails migration for an app that uses MySQL:</p>
  
  <pre><code>execute &lt;&lt;-SQL
    ALTER TABLE properties
      ADD name VARCHAR(255) NOT NULL;
  
    ALTER TABLE properties
      ADD CONSTRAINT fk_properties_name
      FOREIGN KEY (name)
      REFERENCES valid_property_names (property_name);
  SQL
  </code></pre>
  
  <p>When I run the migration, I get the following error:</p>
  
  <pre><code>Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE properties
  </code></pre>
  
  <p>Why am I getting this error and how do I fix it?</p>