By accident, I mispelled the schema name

The console says ‘Relation “acronym” does not exist’.
Turns out I had a typo in the schema name in the Migration struct. It should’ve been ‘acronym’, not ‘acronyms’. I corrected the typo and ran the app again. But, still the issue lasts.

I suspect it’s because

Migrations only run once; once they have run in a database, they are never executed again. It’s important to remember this as Fluent won’t attempt to recreate a table if you change the migration.

If it really is this case, what to do now?

You have a couple of options

  • Just use the acronym schema name in your model
  • Create a new migration to rename the table, this will probably need to be a raw SQL migration
  • If you don’t care about the existing data, you can just delete the whole database and start again. If running in Docker, just delete the container and recreate it
1 Like