How to delete a stream
kiltedup - 10 months ago
Is there a documented correct or recommended way to delete a stream that is no longer required in a module.
I have deleted one and ended up with a slew of class not found and migration not found errors.
Managed to clean it up but curious for next time the correct way to do it.
ryanthompson - 10 months ago
Usually you would use a migration for this: https://pyrocms.com/documentation/streams-platform/latest#database/migrations/generating-migrations/default-migrations
And it will clean things up. Sounds like you just deleted the migration / namespace? You can do that but definitely wanna run the migration to remove it first.
$this->streams() in the example provided is just the
StreamRepositoryInterface so you can do it programmatically that way too if it's not something you have a migration for.
Hope this helps!