<commit_before>class DropLegacyTables < ActiveRecord::Migration
  def up
    drop_table :dataset_artworks
    drop_table :dataset_literatures
    drop_table :dataset_images
    drop_table :dataset_textuals

    drop_table :properties
    drop_table :searches
    drop_table :settings

    drop_table :engagements
    drop_table :ratings
    drop_table :synonyms

    Grant.where(:policy => "admin_rating").delete_all
  end

  def down
    raise ActiveRecord::IrreversibleMigration
  end
end
<commit_msg>fixes migration<commit_after>class DropLegacyTables < ActiveRecord::Migration
  def up
    tables = [
      :dataset_literatures,
      :dataset_images,
      :dataset_textuals,
      :dataset_artworks,
      :properties,
      :searches,
      :settings,
      :engagements,
      :ratings,
      :synonyms
    ]

    tables.each do |table|
      if ActiveRecord::Base.connection.table_exists?(table)
        drop_table table
      end
    end

    Grant.where(:policy => "admin_rating").delete_all
  end

  def down
    raise ActiveRecord::IrreversibleMigration
  end
end

{'fraction_non_alphanumeric': 0.07056638811513463, 'fraction_numerical': 0.0, 'mean_word_length': 3.1621621621621623, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3010074', 'n_tokens_mistral': 334, 'n_tokens_neox': 331, 'n_words': 69}