Hello, I have a schema like this
use Ecto.Schema
schema "goodname" do
..
end
the name of the schema need to be the same than the table in DB ?
Hello, I have a schema like this
use Ecto.Schema
schema "goodname" do
..
end
the name of the schema need to be the same than the table in DB ?
That’s not the name of the schema, but source. And yes, goodname
must be a table in the DB.
Ok ! thank you
That’s not correct. It can be anything, but if it’s not a valid table name the schema needs to be combined with a valid db table at runtime to be useful.
For examples of that see e.g. Ecto.Schema — Ecto v3.10.3