Create Table-less Schemas
Explore how to create table-less schemas in Ecto with embedded_schema. Understand writing changeset functions for data validation and converting user input into database records. This lesson guides you through handling data flexibly without relying on direct tables.
We'll cover the following...
We'll cover the following...
Create two schemas
We’ll create two new table-less schemas to solve our problem—one for SoloArtist and another for Band. We’ll use these schemas to collect user input and then translate them into Artist records when it’s time to store them.
First, let’s set up our new schemas.
For the most part, these look quite a lot like ...