Fulib v0.1.11 Fulib.Ecto.SoftDelete.Migration View Source
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
defmodule MyApp.Repo.Migrations.CreateUser do
use Ecto.Migration
import Fulib.Ecto.SoftDelete.Migration
Link to this section Functions
Link to this function
soft_delete_columns() View Source
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 Fulib.Ecto.SoftDelete.Migration
def change do
create table(:users) do
add :email, :string
add :password, :string
timestamps()
soft_delete_columns()
end
end
end