17 lines
325 B
Elixir
17 lines
325 B
Elixir
defmodule Bcit.Repo.Migrations.CreateStudents do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create table(:students) do
|
|
add :sid, :string
|
|
add :firstname, :string
|
|
add :lastname, :string
|
|
add :gpa, :float
|
|
|
|
timestamps(type: :utc_datetime)
|
|
end
|
|
|
|
create unique_index(:students, [:sid])
|
|
end
|
|
end
|