Skip to content

Commit 23107f8

Browse files
committed
feat: add referred_by_id to talents table
- Introduced a new migration to add the referred_by_id field to the talents table, establishing a reference to the users table with a nilify_all delete strategy. - Created an index on the referred_by_id field for improved query performance.
1 parent a2be77c commit 23107f8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
defmodule Algora.Repo.Migrations.AddReferredByToTalents do
2+
use Ecto.Migration
3+
4+
def change do
5+
alter table(:talents) do
6+
add :referred_by_id, references(:users, on_delete: :nilify_all)
7+
end
8+
9+
create index(:talents, [:referred_by_id])
10+
end
11+
end

0 commit comments

Comments
 (0)