<commit_before>DEMO_HEROKU_APP_NAME=somerville-teacher-tool-demo

# Deploy to demo app and migrate
echo "🚨 ☠️ 🚨 DANGER: About to destroy and rebuild the ⬢ $DEMO_HEROKU_APP_NAME database."
read -p "  This will cause downtime.  Continue? [y/N] " -n 1 -r
echo

if [[ $REPLY =~ ^[Yy]$ ]]; then
  # Reset database through Heroku Postgres CLI
  echo "⚙  💻  ⚙  heroku pg:reset..."
  heroku pg:reset DATABASE_URL -a somerville-teacher-tool-demo --confirm somerville-teacher-tool-demo

  # Deploy to Somerville production app and migrate
  echo "⚙  💻  ⚙  rake db:schema:load..."
  heroku run DISABLE_DATABASE_ENVIRONMENT_CHECK=1 rake db:schema:load --app $DEMO_HEROKU_APP_NAME

  echo "⚙  💻  ⚙  rake db:seed..."
  heroku run rake db:seed --app $DEMO_HEROKU_APP_NAME
  echo

  # Deploy to demo app and migrate
  echo "Done.  Rebuilt ⬢ $DEMO_HEROKU_APP_NAME database."
else 
  echo "Aborted."
fi<commit_msg>Run the migrations rather than reloading schema when rebuilding demo site<commit_after>DEMO_HEROKU_APP_NAME=somerville-teacher-tool-demo

# Deploy to demo app and migrate
echo "🚨 ☠️ 🚨 DANGER: About to destroy and rebuild the ⬢ $DEMO_HEROKU_APP_NAME database."
read -p "  This will cause downtime.  Continue? [y/N] " -n 1 -r
echo

if [[ $REPLY =~ ^[Yy]$ ]]; then
  # Reset database through Heroku Postgres CLI
  echo "⚙  💻  ⚙  heroku pg:reset..."
  heroku pg:reset DATABASE_URL -a somerville-teacher-tool-demo --confirm somerville-teacher-tool-demo

  # Deploy to Somerville production app and migrate
  echo "⚙  💻  ⚙  rake db:schema:load..."
  heroku run DISABLE_DATABASE_ENVIRONMENT_CHECK=1 rake db:migrate --app $DEMO_HEROKU_APP_NAME

  echo "⚙  💻  ⚙  rake db:seed..."
  heroku run rake db:seed --app $DEMO_HEROKU_APP_NAME
  echo

  # Deploy to demo app and migrate
  echo "Done.  Rebuilt ⬢ $DEMO_HEROKU_APP_NAME database."
else
  echo "Aborted."
fi
{'fraction_non_alphanumeric': 0.10774228478613969, 'fraction_numerical': 0.002165674066053059, 'mean_word_length': 3.7628865979381443, 'pattern_counts': {'":': 0, '<': 3, '<?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': '902439', 'n_tokens_mistral': 777, 'n_tokens_neox': 732, 'n_words': 219}