uuid_helper v0.0.1 UuidHelper.UUIDMigration
Contains functions to add uuid_helper columns to a table during migrations
Link to this section Summary
Functions
Adds an index on uuid_helper column of the given table
Adds uuid_helper column to a table.
Link to this section Functions
Link to this function
create_index_on_uuid_helper(table_name)
Adds an index on uuid_helper column of the given table
Parameters
- table_name: the table for which the index has to be created
Link to this function
uuid_helper_column()
Adds uuid_helper column to a table.
defmodule MyApp.Repo.Migrations.CreateUser do
use Ecto.Migration
import Trafi.ModelHelpers.UUID.Migration
def change do
create table(:users) do
add :email, :string
add :password, :string
timestamps()
uuid_helper_column()
end
end
end