From d6f90a4c447a30ef8347fde83dab2b84b9342d80 Mon Sep 17 00:00:00 2001 From: nelsonic Date: Fri, 2 Oct 2020 08:51:00 +0100 Subject: [PATCH] simplify people migration (retrospectively) to eliminate all PII #65 --- .../migrations/20191113100920_create_people.exs | 8 -------- .../20191126144556_create_session_table.exs | 15 --------------- test/app/person_test.exs | 2 +- 3 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 priv/repo/migrations/20191126144556_create_session_table.exs diff --git a/priv/repo/migrations/20191113100920_create_people.exs b/priv/repo/migrations/20191113100920_create_people.exs index 1992fc6c..a66e4f7f 100644 --- a/priv/repo/migrations/20191113100920_create_people.exs +++ b/priv/repo/migrations/20191113100920_create_people.exs @@ -3,14 +3,6 @@ defmodule App.Repo.Migrations.CreatePeople do def change do create table(:people) do - add :username, :binary - add :username_hash, :binary - add :email, :binary - add :email_hash, :binary - add :givenName, :binary - add :familyName, :binary - add :password_hash, :binary - add :key_id, :integer add :status, references(:status, on_delete: :nothing) add :tag, references(:tags, on_delete: :nothing) diff --git a/priv/repo/migrations/20191126144556_create_session_table.exs b/priv/repo/migrations/20191126144556_create_session_table.exs deleted file mode 100644 index 7705c9d3..00000000 --- a/priv/repo/migrations/20191126144556_create_session_table.exs +++ /dev/null @@ -1,15 +0,0 @@ -defmodule App.Repo.Migrations.CreateSessionTable do - use Ecto.Migration - - def change do - create table(:sessions) do - add :auth_token, :binary - add :refresh_token, :binary - add :key_id, :integer - - # keep sessions when user is deleted - add :person_id, references(:people, on_delete: :nothing) - timestamps() - end - end -end diff --git a/test/app/person_test.exs b/test/app/person_test.exs index a6e31174..898c6271 100644 --- a/test/app/person_test.exs +++ b/test/app/person_test.exs @@ -36,4 +36,4 @@ defmodule App.PersonTest do assert updated_person.status == @update_attrs.status end end -end \ No newline at end of file +end