diff --git a/src/Mpociot/Teamwork/TeamworkServiceProvider.php b/src/Mpociot/Teamwork/TeamworkServiceProvider.php index de9fcae..2bf8f60 100644 --- a/src/Mpociot/Teamwork/TeamworkServiceProvider.php +++ b/src/Mpociot/Teamwork/TeamworkServiceProvider.php @@ -46,7 +46,13 @@ protected function publishConfig() */ protected function publishMigration() { - $this->loadMigrationsFrom(__DIR__.'/../../database'); + if (! class_exists('TeamworkSetupTables')) { + // Publish the migration + $timestamp = date('Y_m_d_His', time()); + $this->publishes([ + __DIR__.'/../../database/migrations/2016_05_18_000000_teamwork_setup_tables.php' => database_path('migrations/'.$timestamp.'_teamwork_setup_tables.php'), + ], 'migrations'); + } } /**