-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace TODO model with TODO projection
- Loading branch information
1 parent
14a2814
commit c188df2
Showing
5 changed files
with
28 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
priv/repo/migrations/20220508025205_migrate_todo_to_uuid.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
defmodule TodoBackend.Repo.Migrations.MigrateTodoToUuid do | ||
use Ecto.Migration | ||
|
||
def change do | ||
drop table(:todos) | ||
|
||
create table(:todos, primary_key: false) do | ||
add :uuid, :uuid, primary_key: true | ||
add :title, :string | ||
add :completed, :boolean, default: false, null: false | ||
add :order, :integer, default: 0 | ||
|
||
timestamps() | ||
end | ||
end | ||
end |