mirror of
https://github.com/zoldar/jenot.git
synced 2026-01-03 14:32:54 +00:00
23 lines
587 B
Elixir
23 lines
587 B
Elixir
defmodule Jenot.Repo.Migrations.UpdateRemindersSchema do
|
|
use Ecto.Migration
|
|
|
|
def up do
|
|
drop_if_exists table(:reminders)
|
|
|
|
create table(:reminders, primary_key: false) do
|
|
add :date, :date, null: false
|
|
add :time, :time, null: false
|
|
add :repeat, :integer, null: true
|
|
add :unit, :text, null: true
|
|
add :enabled, :boolean, null: false
|
|
|
|
add :note_id, references(:notes, on_delete: :delete_all, type: :binary_id), primary_key: true
|
|
|
|
timestamps(type: :datetime_usec)
|
|
end
|
|
end
|
|
|
|
def down do
|
|
drop_if_exists table(:reminders)
|
|
end
|
|
end
|