<commit_before>class CreateMatches < ActiveRecord::Migration
  def change
    create_table :matches do |t|
      t.references :project,       null: false, index: true
      t.references :user,                       index: true
      t.date       :starts_at,     null: false
      t.date       :finishes_at,   null: false
      t.decimal    :value_unit,    null: false
      t.decimal    :value

      t.string     :state
      t.string     :payment_id,                       foreign_key: false
      t.text       :payment_choice
      t.text       :payment_method
      t.text       :payment_token
      t.decimal    :payment_service_fee,              default: 0.0
      t.boolean    :payment_service_fee_paid_by_user

      t.timestamps
    end
  end
end<commit_msg>Generate new db table to relate contributions with matches<commit_after>class CreateMatches < ActiveRecord::Migration
  def change
    create_table :matches do |t|
      t.references :project,       null: false, index: true
      t.references :user,                       index: true
      t.date       :starts_at,     null: false
      t.date       :finishes_at,   null: false
      t.decimal    :value_unit,    null: false
      t.decimal    :value

      t.string     :state
      t.string     :payment_id,                       foreign_key: false
      t.text       :payment_choice
      t.text       :payment_method
      t.text       :payment_token
      t.decimal    :payment_service_fee,              default: 0.0
      t.boolean    :payment_service_fee_paid_by_user, default: true

      t.timestamps
    end

    create_table :matchings do |t|
      t.references :match,        index: true
      t.references :contribution, index: true

      t.timestamps
    end

    add_column :contributions, :matching_id, :integer, index: true
  end
end
{'fraction_non_alphanumeric': 0.06985698569856985, 'fraction_numerical': 0.0022002200220022, 'mean_word_length': 1.7813455657492354, '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': '5990394', 'n_tokens_mistral': 551, 'n_tokens_neox': 536, 'n_words': 139}