ecto_soft_delete v2.0.2 Ecto.SoftDelete.Migration
Contains functions to add soft delete columns to a table during migrations
Link to this section Summary
Functions
Adds deleted_at column to a table. This column is used to track if an item is deleted or not and when
Link to this section Functions
Link to this function
soft_delete_columns()
Adds deleted_at column to a table. This column is used to track if an item is deleted or not and when
defmodule MyApp.Repo.Migrations.CreateUser do
use Ecto.Migration
import Ecto.SoftDelete.Migration
def change do
create table(:users) do
add :email, :string
add :password, :string
timestamps()
soft_delete_columns()
end
end
end