-
Notifications
You must be signed in to change notification settings - Fork 0
Deleting a stream
Shawn McCool edited this page Mar 14, 2016
·
4 revisions
use EventStore\EventStore;
use EventStore\StreamDeletion;
$es = new EventStore('http://127.0.0.1:2113');
// soft delete
$es->deleteStream('StreamName', StreamDeletion::SOFT());
// hard delete
$es->deleteStream('StreamName', StreamDeletion::HARD());After a soft delete you will be allowed to recreate the stream by posting new events (version number will be counted like if the stream wasn't deleted but old events are lost).
After an hard delete instead any attempt to access the stream (either read or write) will result in a 410 gone response
This project is not endorsed by EventStore LLC
but they sent us Ouro plushes 😄 and we thank them