Skip to content

Commit

Permalink
Changed migration name to update with current timestamp when published.
Browse files Browse the repository at this point in the history
  • Loading branch information
codebyray committed Oct 26, 2018
1 parent d98e89b commit 735d2a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ReviewRateableServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ class ReviewRateableServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->publishes([
__DIR__.'/../database/migrations/' => database_path('migrations')
], 'migrations');
$timestamp = date('Y_m_d_His', time());
$this->publishes([
__DIR__.'/../database/migrations/create_reviews_table.php.stub' => $this->app->databasePath()."/migrations/{$timestamp}_create_reviews_table.php",
], 'migrations');
}

/**
Expand Down

0 comments on commit 735d2a1

Please sign in to comment.