<commit_before>defmodule CoursePlanner.Repo.Migrations.CreateNotifications do
  use Ecto.Migration

  def up do
    create table(:notifications) do
      add :type, :string
      add :resource_path, :string
      add :user_id, references(:users)

      timestamps()
    end

    create index(:notifications, [:user_id])
  end

  def down do
    drop table(:notifications)
  end
end<commit_msg>Fix database schema.<commit_after>defmodule CoursePlanner.Repo.Migrations.CreateNotifications do
  use Ecto.Migration

  def up do
    create table(:notifications) do
      add :type, :string, null: false
      add :resource_path, :string
      add :user_id, references(:users, on_delete: :delete_all), null: false

      timestamps()
    end

    create index(:notifications, [:user_id])
  end

  def down do
    drop table(:notifications)
  end
end
{'fraction_non_alphanumeric': 0.08778173190984578, 'fraction_numerical': 0.0, 'mean_word_length': 3.442105263157895, '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': '6438209', 'n_tokens_mistral': 267, 'n_tokens_neox': 262, 'n_words': 73}