-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
invoke Item.update_all_items_cid/0 from seeds.exs #410
- Loading branch information
Showing
3 changed files
with
35 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
defmodule App.Repo.Migrations.AddCidToItem do | ||
defmodule App.Repo.Migrations.AddCid do | ||
use Ecto.Migration | ||
|
||
def change do | ||
|
||
|
||
def up do | ||
alter table(:items) do | ||
add(:cid, :string) | ||
end | ||
# https://stackoverflow.com/questions/36723407/how-to-run-updating-in-migration-for-ecto | ||
flush() | ||
|
||
end | ||
end |
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