View Source EctoAnon.Migration (ecto_anon v0.4.0)

Link to this section Summary

Functions

Adds anonymized column (boolean) to a table. This column can be used to track if the resource has be anonymized or not.

Link to this section Functions

Adds anonymized column (boolean) to a table. This column can be used to track if the resource has be anonymized or not.

defmodule MyApp.Repo.Migrations.CreateUser do
  use Ecto.Migration
  import EctoAnon.Migration

  def change do
    create table(:users) do
      add :firstname, :string
      add :lastname, :string
      timestamps()
      anonymized()
    end
  end
end