<commit_before>require 'shred/commands/base'

module Shred
  module Commands
    class Db < Base
      desc 'init', 'Set up the database in development and test environments'
      long_desc <<-LONGDESC
        Recreate the database from the structure.sql file.
      LONGDESC
      def init
        run_shell_command(ShellCommand.new(
          command_lines: 'bin/rake db:create db:structure:load',
          success_msg: 'Database initialized',
          error_msg: 'Database could not be initialized'
        ))
      end

      desc 'migrate', 'Apply pending migrations to the database'
      def migrate
        run_shell_command(ShellCommand.new(
          command_lines: 'bin/rake db:migrate',
          success_msg: 'Migrations applied',
          error_msg: 'Migrations could not be applied'
        ))
      end
    end
  end
end<commit_msg>create all dbs with db init<commit_after>require 'shred/commands/base'

module Shred
  module Commands
    class Db < Base
      desc 'init', 'Set up the database in development and test environments'
      long_desc <<-LONGDESC
        Recreate the database from the structure.sql file.
      LONGDESC
      def init
        run_shell_command(ShellCommand.new(
          command_lines: 'bin/rake db:create:all db:structure:load',
          success_msg: 'Database initialized',
          error_msg: 'Database could not be initialized'
        ))
      end

      desc 'migrate', 'Apply pending migrations to the database'
      def migrate
        run_shell_command(ShellCommand.new(
          command_lines: 'bin/rake db:migrate',
          success_msg: 'Migrations applied',
          error_msg: 'Migrations could not be applied'
        ))
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.07142857142857142, 'fraction_numerical': 0.0, 'mean_word_length': 2.446, 'pattern_counts': {'":': 0, '<': 9, '<?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': '779440', 'n_tokens_mistral': 475, 'n_tokens_neox': 472, 'n_words': 152}