Ecto.SoftDelete.Migration (ecto_soft_delete v2.1.0)
Contains functions to add soft delete columns to a table during migrations
Summary
Functions
Adds deleted_at column to a table. This column is used to track if an item is deleted or not and when
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