12 lines
228 B
Elixir
12 lines
228 B
Elixir
|
|
defmodule MyFirstElixirVibeCode.Repo.Migrations.AddUsernameToUsers do
|
||
|
|
use Ecto.Migration
|
||
|
|
|
||
|
|
def change do
|
||
|
|
alter table(:users) do
|
||
|
|
add :username, :string
|
||
|
|
end
|
||
|
|
|
||
|
|
create unique_index(:users, [:username])
|
||
|
|
end
|
||
|
|
end
|