<commit_before>class AddUserRefToStudents < ActiveRecord::Migration[6.0]
  def up
    remove_index :professors, name: "index_professors_on_user_id" if index_exists?(:professors, name: "index_professors_on_user_id")
    remove_index :users, name: "index_users_on_invited_by_id" if index_exists?(:users, name: "index_users_on_invited_by_id")
    remove_index :users, name: "index_users_on_invited_by_type_and_invited_by_id" if index_exists?(:users, name: "index_users_on_invited_by_type_and_invited_by_id")

    change_column :users, :id, :integer, limit: 8, unique: true, null: false, auto_increment: true
    change_column :professors, :user_id, :integer, limit: 8, unique: true, null: false, auto_increment: true
    add_index :professors, :user_id, name: "index_professors_on_user_id" unless index_exists?(:professors, :user_id)
    change_column :users, :invited_by_id, :integer, limit: 8, unique: true, null: false, auto_increment: true<commit_msg>#361: fix old migration<commit_after>class AddUserRefToStudents < ActiveRecord::Migration[6.0]
  def up
    remove_index :professors, name: "index_professors_on_user_id" if index_exists?(:professors, name: "index_professors_on_user_id")
    remove_index :users, name: "index_users_on_invited_by_id" if index_exists?(:users, name: "index_users_on_invited_by_id")
    remove_index :users, name: "index_users_on_invited_by_type_and_invited_by_id" if index_exists?(:users, name: "index_users_on_invited_by_type_and_invited_by_id")

    change_column :users, :id, :integer, limit: 8, unique: true, null: false, auto_increment: true
    change_column :professors, :user_id, :integer, limit: 8
    add_index :professors, :user_id, name: "index_professors_on_user_id" unless index_exists?(:professors, :user_id)
    change_column :users, :invited_by_id, :integer, limit: 8
{'fraction_non_alphanumeric': 0.10462555066079295, 'fraction_numerical': 0.007158590308370044, 'mean_word_length': 7.9950495049504955, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2976174', 'n_tokens_mistral': 672, 'n_tokens_neox': 661, 'n_words': 136}