Skip to content

Commit 22f3d2c

Browse files
committed
feat: add location fields to user schema and migration
- Introduced `location_meta` and `location_iso_lvl4` fields to the user schema. - Created a migration to add these fields to the users table in the database.
1 parent 447c926 commit 22f3d2c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

lib/algora/accounts/schemas/user.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ defmodule Algora.Accounts.User do
9797
field :system_bio, :string
9898
field :system_bio_meta, :map, default: %{}
9999

100+
field :location_meta, :map
101+
field :location_iso_lvl4, :string
102+
100103
has_many :identities, Identity
101104
has_many :memberships, Member, foreign_key: :user_id
102105
has_many :members, Member, foreign_key: :org_id
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
defmodule Algora.Repo.Migrations.AddLocationFieldsToUsers do
2+
use Ecto.Migration
3+
4+
def change do
5+
alter table(:users) do
6+
add :location_meta, :map
7+
add :location_iso_lvl4, :string
8+
end
9+
end
10+
end

0 commit comments

Comments
 (0)