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: 20180323195100_foreign_keys.rb
    path of file: ./repos/linuxfr.org/db/migrate
    
    the code of the file until where you have to start completion: class ForeignKeys < ActiveRecord::Migration
  def up
    execute "ALTER TABLE accounts ADD CONSTRAINT fk_accounts_on_user_id FOREIGN KEY index_accounts_on_user_id (user_id) REFERENCES users (id);"
    execute "ALTER TABLE bookmarks ADD CONSTRAINT fk_bookmarks_on_owner_id FOREIGN KEY index_bookmarks_on_owner_id (owner_id) REFERENCES users (id);"
    execute "ALTER TABLE comments MODIFY COLUMN node_id int(11) NOT NULL;"
    execute "ALTER TABLE comments ADD CONSTRAINT fk_comments_on_node_id FOREIGN KEY index_comments_on_node_id (node_id) REFERENCES nodes (id);"
    execute "ALTER TABLE comments ADD CONSTRAINT fk_comments_on_user_id FOREIGN KEY index_comments_on_user_id (user_id) REFERENCES users (id);"
    execute "ALTER TABLE diaries ADD CONSTRAINT fk_diaries_on_owner_id FOREIGN KEY index_diaries_on_owner_id (owner_id) REFERENCES users (id);"
    execute "ALTER TABLE diaries ADD CONSTRAINT fk_diaries_on_converted_news_id FOREIGN KEY index_diaries_on_converted_news_id (converted_news_id) REFERENCES news (id);"
    execute "ALTER TABLE links ADD CONSTRAINT fk_links_on_news_id FOREIGN KEY index_links_on_news_id (news_id) REFERENCES news (id);"
    execute "ALTER TABLE logs 
    
  def up
    execute "ALTER TABLE accounts ADD CONSTRAINT fk_accounts_on_user_id FOREIGN KEY index_accounts_on_user_id (user_id) REFERENCES users (id);"
    execute "ALTER TABLE bookmarks ADD CONSTRAINT fk_bookmarks_on_owner_id FOREIGN KEY index_bookmarks_on_owner_id (owner_id) REFERENCES users (id);"
    execute "ALTER TABLE comments MODIFY COLUMN node_id int(11) NOT NULL;"
    execute "ALTER TABLE comments ADD CONSTRAINT fk_comments_on_node_id FOREIGN KEY index_comments_on_node_id (node_id) REFERENCES nodes (id);"
    execute "ALTER TABLE comments ADD CONSTRAINT fk_comments_on_user_id FOREIGN KEY index_comments_on_user_id (user_id) REFERENCES users (id);"
    execute "ALTER TABLE diaries ADD CONSTRAINT fk_diaries_on_owner_id FOREIGN KEY index_diaries_on_owner_id (owner_id) REFERENCES users (id);"
    execute "ALTER TABLE diaries ADD CONSTRAINT fk_diaries_on_converted_news_id FOREIGN KEY index_diaries_on_converted_news_id (converted_news_id) REFERENCES news (id);"
    execute "ALTER TABLE links ADD CONSTRAINT fk_links_on_news_id FOREIGN KEY index_links_on_news_id (news_id) REFERENCES news (id);"
    execute "ALTER TABLE logs MODIFY COLUMN account_id int(11) NOT NULL;"
    execute "ALTER TABLE logs ADD CONSTRAINT fk_logs_on_account_id FOREIGN KEY index_logs_on_account_id (account_id) REFERENCES accounts (id);"
    execute "ALTER TABLE logs ADD CONSTRAINT fk_logs_on_user_id FOREIGN KEY index_logs_on_user_id (user_id) REFERENCES users (id);"
    execute "ALTER TABLE news MODIFY COLUMN section_id int(11) NOT NULL;"
    execute "ALTER TABLE news ADD CONSTRAINT fk_news_on_moderator_id FOREIGN KEY index_news_on_moderator_id (moderator_id) REFERENCES users (id);"
    execute "ALTER TABLE news ADD CONSTRAINT fk_news_on_section_id FOREIGN KEY index_news_on_section_id (section_id) REFERENCES sections (id);"
    execute "ALTER TABLE news_versions MODIFY COLUMN news_id int(11) NOT NULL;"
    execute "ALTER TABLE news_versions ADD CONSTRAINT fk_news_versions_on_news_id FOREIGN KEY index_news_versions_on_news_id (news_id) REFERENCES news (id);"
    execute "ALTER TABLE news_versions ADD CONSTRAINT fk_news_versions_on_user_id FOREIGN KEY index_news_versions_on_user_id (user_id) REFERENCES users (id);"
    execute "ALTER TABLE nodes ADD CONSTRAINT fk_nodes_on_user_id FOREIGN KEY index_nodes_on_user_id (user_id) REFERENCES users (id);"
    execute "ALTER TABLE oauth_access_grants MODIFY COLUMN application_id int(11) NOT NULL;"
    execute "ALTER TABLE oauth_access_grants ADD CONSTRAINT fk_oauth_access_grants_on_resource_owner_id FOREIGN KEY index_oauth_access_grants_on_resource_owner_id (resource_owner_id) REFERENCES accounts (id);"
    execute "ALTER TABLE oauth_access_grants ADD CONSTRAINT fk_oauth_access_grants_on_application_id FOREIGN KEY index_oauth_access_grants_on_application_id (application_id) REFERENCES oauth_applications (id);"
    execute "ALTER TABLE oauth_access_tokens MODIFY COLUMN application_id int(11) NOT NULL;"
    execute "ALTER TABLE oauth_access_tokens ADD CONSTRAINT fk_oauth_access_tokens_on_resource_owner_id FOREIGN KEY index_oauth_access_tokens_on_resource_owner_id (resource_owner_id) REFERENCES accounts (id);"
    execute "ALTER TABLE oauth_access_tokens ADD CONSTRAINT fk_oauth_access_tokens_on_application_id FOREIGN KEY index_oauth_access_tokens_on_application_id (application_id) REFERENCES oauth_applications (id);"
    execute "ALTER TABLE oauth_applications MODIFY COLUMN owner_id int(11) NOT NULL;"
    execute "ALTER TABLE oauth_applications ADD CONSTRAINT fk_oauth_applications_on_owner_id FOREIGN KEY index_oauth_applications_on_owner_id (owner_id) REFERENCES accounts (id);"
    execute "ALTER TABLE paragraphs ADD CONSTRAINT fk_paragraphs_on_news_id FOREIGN KEY index_paragraphs_on_news_id (news_id) REFERENCES news (id);"
    execute "ALTER TABLE poll_answers MODIFY COLUMN poll_id int(11) NOT NULL;"
    execute "ALTER TABLE poll_answers ADD CONSTRAINT fk_poll_answers_on_poll_id FOREIGN KEY index_poll_answers_on_poll_id (poll_id) REFERENCES polls (id);"
    execute "ALTER TABLE posts MODIFY COLUMN forum_id int(11) NOT NULL;"
    execute "ALTER TABLE posts ADD CONSTRAINT fk_posts_on_forum_id FOREIGN KEY index_posts_on_forum_id (forum_id) REFERENCES forums (id);"
    execute "ALTER TABLE taggings MODIFY COLUMN tag_id int(11) NOT NULL;"
    execute "ALTER TABLE taggings MODIFY COLUMN node_id int(11) NOT NULL;"
    execute "ALTER TABLE taggings ADD CONSTRAINT fk_taggings_on_tag_id FOREIGN KEY index_taggings_on_tag_id (tag_id) REFERENCES tags (id);"
    execute "ALTER TABLE taggings ADD CONSTRAINT fk_taggings_on_node_id FOREIGN KEY index_taggings_on_node_id (node_id) REFERENCES nodes (id);"
    execute "ALTER TABLE taggings ADD CONSTRAINT fk_taggings_on_user_id FOREIGN KEY index_taggings_on_user_id (user_id) REFERENCES users (id);"
    execute "ALTER TABLE trackers MODIFY COLUMN category_id int(11) NOT NULL;"
    execute "ALTER TABLE trackers ADD CONSTRAINT fk_trackers_on_category_id FOREIGN KEY index_trackers_on_category_id (category_id) REFERENCES categories (id);"
    execute "ALTER TABLE trackers ADD CONSTRAINT fk_trackers_on_assigned_to_user_id FOREIGN KEY index_trackers_on_assigned_to_user_id (assigned_to_user_id) REFERENCES users (id);"
    execute "ALTER TABLE wiki_versions MODIFY COLUMN wiki_page_id int(11) NOT NULL;"
    execute "ALTER TABLE wiki_versions ADD CONSTRAINT fk_wiki_versions_on_wiki_page_id FOREIGN KEY index_wiki_versions_on_wiki_page_id (wiki_page_id) REFERENCES wiki_pages (id);"
    execute "ALTER TABLE wiki_versions ADD CONSTRAINT fk_wiki_versions_on_user_id FOREIGN KEY index_wiki_versions_on_user_id (user_id) REFERENCES users (id);"
  end