<commit_before>require 'migration_helpers'

class CreateAssignmentFiles < ActiveRecord::Migration
  extend MigrationHelpers
  
  def self.up
    create_table :assignment_files do |t|
      t.column  :assignment_id,   :int
      t.column  :filename,        :string,  :null => false
      
      t.timestamps
    end
    
    # only unique filenames allowed for each assignment
    add_index :assignments, [:assignment_id, :filename], :unique => true
    foreign_key(:assignment_files, :assignment_id, :assignments)
  end

  def self.down
    drop_table :assignment_files
  end
end<commit_msg>Fixed bug on schema creating the wrong index table<commit_after>require 'migration_helpers'

class CreateAssignmentFiles < ActiveRecord::Migration
  extend MigrationHelpers
  
  def self.up
    create_table :assignment_files do |t|
      t.column  :assignment_id,   :int
      t.column  :filename,        :string,  :null => false
      
      t.timestamps
    end
    
    # only unique filenames allowed for each assignment
    add_index :assignment_files, [:assignment_id, :filename], :unique => true
    foreign_key(:assignment_files, :assignment_id, :assignments)
  end

  def self.down
    drop_table :assignment_files
  end
end
{'fraction_non_alphanumeric': 0.07516339869281045, 'fraction_numerical': 0.0, 'mean_word_length': 3.390681003584229, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '5526140', 'n_tokens_mistral': 375, 'n_tokens_neox': 378, 'n_words': 99}