Skip to content
Permalink
Browse files

Database Migrations

  • Loading branch information...
dnsbty committed Aug 18, 2019
1 parent 89be4e2 commit b0e9b350e5ceecf752e80bf629fea744ca74a47a
@@ -0,0 +1,9 @@
defmodule UserAdmin.Repo.Migrations.CreateRoles do
use Ecto.Migration

def change do
create table(:roles) do
add :name, :string
end
end
end
@@ -0,0 +1,10 @@
defmodule UserAdmin.Repo.Migrations.CreateUsers do
use Ecto.Migration

def change do
create table(:users) do
add :name, :string
add :role_id, references("roles")
end
end
end

0 comments on commit b0e9b35

Please sign in to comment.
You can’t perform that action at this time.