Verified Commit 382cbdab authored by Nicolas's avatar Nicolas 🌴

Add not null constraint

parent 8862a8cf
...@@ -3,8 +3,7 @@ defmodule PlasmaRepo.Repo.Migrations.CreateUserTable do ...@@ -3,8 +3,7 @@ defmodule PlasmaRepo.Repo.Migrations.CreateUserTable do
def change do def change do
create table(:users) do create table(:users) do
#add :id, :uuid, primary_key: true add :mx_user_id, :string, null: false
add :mx_user_id, :string
add :password_hash, :string add :password_hash, :string
add :kind, :string add :kind, :string
timestamps() timestamps()
......
...@@ -4,7 +4,7 @@ defmodule PlasmaRepo.Repo.Migrations.CreateDeviceTable do ...@@ -4,7 +4,7 @@ defmodule PlasmaRepo.Repo.Migrations.CreateDeviceTable do
def change do def change do
create table(:devices) do create table(:devices) do
#add :id, :uuid, primary_key: true #add :id, :uuid, primary_key: true
add :mx_device_id, :string add :mx_device_id, :string, null: false
add :initial_device_display_name, :string add :initial_device_display_name, :string
add :user_id, references(:users) add :user_id, references(:users)
timestamps() timestamps()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment