Migrations: Added namespace
This commit is contained in:
parent
5f46fd2f15
commit
d985d493a3
|
@ -25,7 +25,7 @@
|
||||||
"erusev/parsedown": "^1.6",
|
"erusev/parsedown": "^1.6",
|
||||||
"illuminate/container": "5.5.*",
|
"illuminate/container": "5.5.*",
|
||||||
"illuminate/database": "5.5.*",
|
"illuminate/database": "5.5.*",
|
||||||
"illuminate/support": "^5.5",
|
"illuminate/support": "5.5.*",
|
||||||
"nikic/fast-route": "^1.3",
|
"nikic/fast-route": "^1.3",
|
||||||
"psr/container": "^1.0",
|
"psr/container": "^1.0",
|
||||||
"psr/http-server-middleware": "^1.0",
|
"psr/http-server-middleware": "^1.0",
|
||||||
|
@ -44,7 +44,8 @@
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Engelsystem\\": "src/"
|
"Engelsystem\\": "src/",
|
||||||
|
"Engelsystem\\Migrations\\": "db/migrations"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"src/helpers.php"
|
"src/helpers.php"
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace Engelsystem\Migrations;
|
||||||
|
|
||||||
use Engelsystem\Database\Migration\Migration;
|
use Engelsystem\Database\Migration\Migration;
|
||||||
|
|
||||||
class ImportInstallSql extends Migration
|
class ImportInstallSql extends Migration
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace Engelsystem\Migrations;
|
||||||
|
|
||||||
use Engelsystem\Database\Migration\Migration;
|
use Engelsystem\Database\Migration\Migration;
|
||||||
|
|
||||||
class ImportUpdateSql extends Migration
|
class ImportUpdateSql extends Migration
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace Engelsystem\Migrations;
|
||||||
|
|
||||||
use Engelsystem\Database\Migration\Migration;
|
use Engelsystem\Database\Migration\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace Engelsystem\Migrations;
|
||||||
|
|
||||||
use Engelsystem\Database\Migration\Migration;
|
use Engelsystem\Database\Migration\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace Engelsystem\Migrations;
|
||||||
|
|
||||||
use Engelsystem\Database\Migration\Migration;
|
use Engelsystem\Database\Migration\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ class Migrate
|
||||||
|
|
||||||
$className = Str::studly(preg_replace('/\d+_/', '', $migration));
|
$className = Str::studly(preg_replace('/\d+_/', '', $migration));
|
||||||
/** @var Migration $class */
|
/** @var Migration $class */
|
||||||
$class = $this->app->make($className);
|
$class = $this->app->make('Engelsystem\\Migrations\\' . $className);
|
||||||
|
|
||||||
if (method_exists($class, $type)) {
|
if (method_exists($class, $type)) {
|
||||||
$class->{$type}();
|
$class->{$type}();
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace Engelsystem\Test\Unit\Database;
|
namespace Engelsystem\Test\Unit\Database;
|
||||||
|
|
||||||
use AnotherStuff;
|
use Engelsystem\Migrations\AnotherStuff;
|
||||||
use Illuminate\Database\Schema\Builder as SchemaBuilder;
|
use Illuminate\Database\Schema\Builder as SchemaBuilder;
|
||||||
use PHPUnit\Framework\MockObject\MockBuilder;
|
use PHPUnit\Framework\MockObject\MockBuilder;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace Engelsystem\Migrations;
|
||||||
|
|
||||||
use Engelsystem\Database\Migration\Migration;
|
use Engelsystem\Database\Migration\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace Engelsystem\Migrations;
|
||||||
|
|
||||||
use Engelsystem\Database\Migration\Migration;
|
use Engelsystem\Database\Migration\Migration;
|
||||||
|
|
||||||
class AnotherStuff extends Migration
|
class AnotherStuff extends Migration
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace Engelsystem\Migrations;
|
||||||
|
|
||||||
use Engelsystem\Database\Migration\Migration;
|
use Engelsystem\Database\Migration\Migration;
|
||||||
|
|
||||||
class AddSomeFeature extends Migration
|
class AddSomeFeature extends Migration
|
||||||
|
|
Loading…
Reference in New Issue