Load migrations directly from vendor (appstract).

This commit is contained in:
Ryan Scherler
2020-04-15 12:56:23 -07:00
parent 5bf0851b48
commit e80326a528
2 changed files with 1 additions and 37 deletions
@@ -1,37 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateMetaTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('metas', function (Blueprint $table) {
$table->increments('id');
$table->integer('metable_id')->unsigned();
$table->string('metable_type');
$table->string('key');
$table->text('value');
$table->index('metable_id');
$table->index('key');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('metas');
}
}
+1
View File
@@ -226,6 +226,7 @@ class FilamentServiceProvider extends ServiceProvider
{
if ($this->app->runningInConsole()) {
$this->loadMigrationsFrom($this->packagePath.'database/migrations');
$this->loadMigrationsFrom(base_path('vendor/appstract/laravel-meta/database/migrations'));
}
}