Completely delete a resource
Hi everyone. If I fully want to delete a resource (tables and everything). What do I need to do? Do I just delete every mention of it in my code (it's resource module, code interfaces etc) and run
codegen
? Or is there a different way? Thank youSolution:Jump to solution
You can do as you described, but then do
mix ecto.gen.migration
and add the ecto code there to drop the migration4 Replies
The migration generator won't delete resources currently
Solution
You can do as you described, but then do
mix ecto.gen.migration
and add the ecto code there to drop the migrationThank you. So delete all mention of the resource in my code, then run
mix ecto.gen.migration
to drop the table in question? Are there any concerns regarding Ash resource snapshots if I decide to add this resource again in a few weeks? (this is actually what we are doing)nah, just delete the snapshots