Skip to content

Commit

Permalink
DEV: skip telescope migrations in production
Browse files Browse the repository at this point in the history
  • Loading branch information
vinothkannans committed Nov 19, 2024
1 parent 57ccd94 commit d3ea189
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<p align="center">
<a href="https://hub.docker.com/r/vinkas/lauth"><img src="https://img.shields.io/docker/pulls/vinkas/lauth?logo=docker&logoColor=1D63ED&label=Pulls&labelColor=E5F2FC&color=1D63ED" alt="Docker Pulls" /></a>
<a href="https://packagist.org/packages/vinkas/lauth"><img src="https://img.shields.io/packagist/v/vinkas/lauth?logo=packagist&logoColor=000000&label=version&labelColor=d9e0f3&color=f28d1a" alt="Packagist Version" /></a>
<a href="https://packagist.org/packages/vinkas/lauth"><img alt="Packagist License" src="https://img.shields.io/packagist/l/vinkas/lauth"></a>
</p>

# Vinkas Lauth
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/providers.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Vinkas\Discourse\ServiceProvider::class,
];

if (app()->environment('local')) {
if (app()->isLocal()) {
$providers[] = Laravel\Telescope\TelescopeServiceProvider::class;
$providers[] = App\Providers\TelescopeServiceProvider::class;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ public function getConnection(): ?string
*/
public function up(): void
{
if (app()->isProduction()) {
return;
}

$schema = Schema::connection($this->getConnection());

$schema->create('telescope_entries', function (Blueprint $table) {
Expand Down Expand Up @@ -60,6 +64,10 @@ public function up(): void
*/
public function down(): void
{
if (app()->isProduction()) {
return;
}

$schema = Schema::connection($this->getConnection());

$schema->dropIfExists('telescope_entries_tags');
Expand Down

0 comments on commit d3ea189

Please sign in to comment.