From e4a6d362007db109c53d126e457e657f20230cd2 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Sun, 5 Sep 2021 23:09:29 +0200 Subject: [PATCH] Fix event unsigned having default empty map in db --- lib/architex/schema/event.ex | 1 - priv/repo/migrations/20210830160818_create_initial_tables.exs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/architex/schema/event.ex b/lib/architex/schema/event.ex index 6a6bccf..5825e77 100644 --- a/lib/architex/schema/event.ex +++ b/lib/architex/schema/event.ex @@ -6,7 +6,6 @@ defmodule Architex.Event do alias Architex.{Repo, Room, Event, Account, EncodableMap, KeyServer} alias Architex.Types.UserId - # TODO: It seems unsigned is always set in DB, even though it is not specified? @type t :: %__MODULE__{ nid: integer(), id: String.t(), diff --git a/priv/repo/migrations/20210830160818_create_initial_tables.exs b/priv/repo/migrations/20210830160818_create_initial_tables.exs index f9848dd..21b7fb2 100644 --- a/priv/repo/migrations/20210830160818_create_initial_tables.exs +++ b/priv/repo/migrations/20210830160818_create_initial_tables.exs @@ -43,7 +43,7 @@ defmodule Architex.Repo.Migrations.CreateInitialTables do add :signatures, :map, null: false add :state_key, :string, null: true add :type, :string, null: false - add :unsigned, :map, default: %{}, null: true + add :unsigned, :map, null: true end create index(:events, [:id], unique: true)