jenot/priv/repo/migrations/20241215203400_update_reminders_schema.exs
2024-12-15 21:37:34 +01:00

19 lines
534 B
Elixir

defmodule Jenot.Repo.Migrations.UpdateRemindersSchema do
use Ecto.Migration
def change do
drop table(:reminders)
create table(:reminders, primary_key: false) do
add :date, :date, null: false
add :time, :time, null: false
add :repeat_period, :text, null: false
add :repeat_count, :integer, null: false
add :enabled, :boolean, null: false
add :note_id, references(:note, on_delete: :delete_all), null: false, primary_key: true
timestamps(type: :datetime_usec)
end
end
end