<commit_before>require 'migration_helpers'

class CreateSubmissionFiles < ActiveRecord::Migration
  extend MigrationHelpers
  
  def self.up
    create_table :submission_files do |t|
      t.column  :user_id,               :int
      t.column  :submission_id,         :int
      
      # submission file attributes
      t.column  :filename,              :string
      t.column  :submitted_at,          :timestamp
      t.column  :status,                :string
    end
    
    foreign_key_no_delete :submission_files, :user_id, :users
    foreign_key_no_delete :submission_files, :submission_id, :submissions
    
    add_index :submission_files, :submission_id<commit_msg>Changed type of submitted_at attribute from timestamp to datetime<commit_after>require 'migration_helpers'

class CreateSubmissionFiles < ActiveRecord::Migration
  extend MigrationHelpers
  
  def self.up
    create_table :submission_files do |t|
      t.column  :user_id,               :int
      t.column  :submission_id,         :int
      
      # submission file attributes
      t.column  :filename,              :string
      t.column  :submitted_at,          :datetime
      t.column  :status,                :string
    end
    
    foreign_key_no_delete :submission_files, :user_id, :users
    foreign_key_no_delete :submission_files, :submission_id, :submissions
    
    add_index :submission_files, :submission_id
{'fraction_non_alphanumeric': 0.06566738044254104, 'fraction_numerical': 0.0, 'mean_word_length': 2.5137844611528823, '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': '14281', 'n_tokens_mistral': 415, 'n_tokens_neox': 414, 'n_words': 93}