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 you
Solution:
You can do as you described, but then do mix ecto.gen.migration and add the ecto code there to drop the migration
Jump to solution
4 Replies
ZachDaniel
ZachDaniel2mo ago
The migration generator won't delete resources currently
Solution
ZachDaniel
ZachDaniel2mo ago
You can do as you described, but then do mix ecto.gen.migration and add the ecto code there to drop the migration
Yahya Oxley
Yahya OxleyOP2mo ago
Thank 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)
ZachDaniel
ZachDaniel2mo ago
nah, just delete the snapshots

Did you find this page helpful?