From 8fa2c4b0fcd4e6821c5793d98334452d6515d98d Mon Sep 17 00:00:00 2001 From: Siebe Vanden Eynden Date: Fri, 7 Feb 2020 17:02:18 +0100 Subject: [PATCH] Publish new snapshots table --- src/EventSourcingServiceProvider.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/EventSourcingServiceProvider.php b/src/EventSourcingServiceProvider.php index ea725d2f..f05e39a1 100644 --- a/src/EventSourcingServiceProvider.php +++ b/src/EventSourcingServiceProvider.php @@ -30,6 +30,12 @@ public function boot(): void ], 'migrations'); } + if (! class_exists('CreateSnapshotsTable')) { + $this->publishes([ + __DIR__.'/../stubs/create_snapshots_table.php.stub' => database_path('migrations/'.date('Y_m_d_His', time()).'_create_snapshots_table.php'), + ], 'migrations'); + } + Event::subscribe(EventSubscriber::class); $this->discoverEventHandlers();