Skip to content

Commit 2cfb4b2

Browse files
committed
Make user_id on asciicasts not-nullable
1 parent 2c31c9b commit 2cfb4b2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
defmodule Asciinema.Repo.Migrations.MakeAsciiastUserIdNonNull do
2+
use Ecto.Migration
3+
4+
def change do
5+
alter table(:asciicasts) do
6+
modify :user_id, references(:users), null: false
7+
end
8+
9+
drop constraint(:asciicasts, "asciicasts_user_id_fk")
10+
end
11+
end

0 commit comments

Comments
 (0)