DEV Community

Marcøs
Marcøs

Posted on • Edited on

2 2

Elixir project setup - config.exs

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]
Enter fullscreen mode Exit fullscreen mode
  • 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"
Enter fullscreen mode Exit fullscreen mode

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay