loading...

Elixir project setup - config.exs

ideamarcos profile image Marcøs Updated on ・1 min read

I'll be writing about typical changes I make to the default phoenix project

See file on GitHub

NOTE: This article assumes you will using Ecto, and the database tables use UUID as the primary key.

  • If you plan on running mix phoenix.gen.model to generate Ecto models, set the generators key to use binary_id for schema’s primary key.
config :portishead,
  generators: [binary_id: true]
  • For mix ecto.migrate with create table syntax, set the migration_primary_key to use uuid. migration_default_prefix is the schema name of the table in postgresql.
config :portishead, Portishead.Repo,
  migration_primary_key: [name: :uuid, type: :uuid],
  migration_default_prefix: "portishead",
  migration_source: "portishead_schema_migrations"

Posted on by:

ideamarcos profile

Marcøs

@ideamarcos

Elm/Elixir Developer

Discussion

markdown guide