Table name change not being picked up by Ash migrations

Following ash_postgres tutorial, originally had this in representative.ex:

postgres do
    table "representative"
    repo Helpdesk.Repo
end

Pluralized table name to representatives and ran mix ash.migrate

% mix ash.migrate
Compiling 1 file (.ex)
Getting extensions in current project...
Running migration for AshPostgres.DataLayer...

10:55:35.317 [info] Migrations already up

Then ran mix ash.setup
The table name is still representative in postgres

How do I force an update to table name?
Thanks in advance

ash.migrate just runs the existing migrations, you’re looking for mix ash_postgres.generate_migrations

1 Like

Yup! That works. Then I remembered I had to use mix ash.codegen which works similarly. Thanks

1 Like