Skip to content

Commit

Permalink
fix: migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
ruilopesm committed Feb 5, 2024
1 parent 90cc058 commit 20e122a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion priv/repo/migrations/20210218152530_create_spotlights.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Safira.Repo.Migrations.CreateSpotlights do

def change do
create table(:spotlights) do
add :end, :utc_datetime
add :active, :boolean, default: false, null: false
add :badge_id, references(:badges, on_delete: :nothing)

add :lock_version, :integer, default: 1
Expand Down
10 changes: 10 additions & 0 deletions priv/repo/migrations/20240205133722_change_spotlight_column.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
defmodule Safira.Repo.Migrations.ChangeSpotlightColumn do
use Ecto.Migration

def change do
alter table(:spotlights) do
remove :active
add :end, :utc_datetime
end
end
end

0 comments on commit 20e122a

Please sign in to comment.