Commit 87b30872 authored by abkrim's avatar abkrim 😀
Browse files

Changes publish migrations

parent ae555fb9
Pipeline #254 passed with stages
in 1 minute and 17 seconds
......@@ -34,10 +34,12 @@ class DbSchemaServiceProvider extends ServiceProvider
__DIR__.'/../config/db-schema.php' => config_path('db-schema.php'),
], 'db-schema-config');
$this->publishes([
__DIR__.'/../database/migrations' => database_path('migrations'),
], 'db-schema-migrations');
if (! class_exists('CreateDbSchemasTable')) {
$this->publishes([
__DIR__.'/../database/migrations/create_db_schemas_table.php.stub'
=> database_path('migrations/' . date('Y-m-d-His', time()) . '_create_db_schemas_table.php')
], 'db-schema-migrations');
}
$this->commands([
HelpSchema::class,
......
......@@ -29,7 +29,7 @@ class DbSchemaTest extends TestCase
protected function getEnvironmentSetUp($app)
{
include_once __DIR__ . '/../database/migrations_test/create_users_table.php.stub';
include_once __DIR__ . '/../database/migrations/2019_09_09_000000_create_db_schemas_table.php';
include_once __DIR__ . '/../database/migrations/create_db_schemas_table.php.stub';
(new \CreateUsersTable)->up();
(new \CreateDbSchemasTable)->up();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment