ecto-essentials

Installation
SKILL.md

Ecto Essentials

Use this skill before modifying ANY schema, query, or migration.

RULES — Follow these with no exceptions

  1. Add database constraints (unique_index, foreign_key, check_constraint) AND changeset validations — both layers are required
  2. Add indexes on foreign keys and frequently queried fields — never omit indexes on foreign keys
  3. Parameterize all user input in queries — never interpolate values into SQL fragments, always use ^
  4. Never combine schema changes and data backfill in the same migration

Schema Definition

Define schemas with proper types and associations. The example below shows a child schema with belongs_to; a parent schema uses has_many in the same pattern (see Folder in the migration section for reference).

Installs
3
First Seen
2 days ago
ecto-essentials — igmarin/elixir-phoenix-skills