You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: 011_add_invites.rb
    path of file: ./repos/moebooru/db/migrate
    
    the code of the file until where you have to start completion: class AddInvites < ActiveRecord::Migration[5.1]
  def self.up
    execute "ALTER TABLE users ADD COLUMN invite_count INTEGER NOT NULL DEFAULT 0"
    execute <<-EOS
      CREATE TABLE invites (
        id SERIAL PRIMARY KEY,
        user_id INTEGER NOT NULL REFERENCES users ON DELETE
    
  def self.up
    execute "ALTER TABLE users ADD COLUMN invite_count INTEGER NOT NULL DEFAULT 0"
    execute <<-EOS
      CREATE TABLE invites (
        id SERIAL PRIMARY KEY,
        user_id INTEGER NOT NULL REFERENCES users ON DELETE CASCADE,
        activation_key TEXT NOT NULL,
        invite_email TEXT NOT NULL
      )
    EOS
  end