Skip to content

Commit 79c299f

Browse files
committed
added the publishing of attributes for production imports
1 parent 2a0e4b1 commit 79c299f

File tree

3 files changed

+33
-10
lines changed

3 files changed

+33
-10
lines changed

composer.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{
22
"name": "toramanlis/implicit-migrations",
33
"description": "Adds a command to create migrations by Eloquent models",
4+
"keywords": [
5+
"model",
6+
"migration",
7+
"dev"
8+
],
49
"type": "library",
510
"require": {
611
"laravel/framework": "~12"
@@ -30,10 +35,11 @@
3035
]
3136
}
3237
},
33-
"minimum-stability": "stable",
3438
"require-dev": {
35-
"orchestra/testbench": "*",
36-
"laravel/sail": "*",
37-
"squizlabs/php_codesniffer": "*"
38-
}
39+
"orchestra/testbench": "^10.1",
40+
"laravel/sail": "^1.41",
41+
"squizlabs/php_codesniffer": "^3.12"
42+
},
43+
"prefer-stable": true,
44+
"minimum-stability": "dev"
3945
}

src/Attributes/composer.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "toramanlis/migration-attributes",
3+
"description": "",
4+
"authors": [
5+
{
6+
"name": "Timucin Bahsi",
7+
"email": "[email protected]"
8+
}
9+
],
10+
"autoload": {
11+
"psr-4": {
12+
"Toramanlis\\ImplicitMigrations\\Attributes\\": ""
13+
}
14+
}
15+
}

src/Providers/ImplicitMigrationsServiceProvider.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ class ImplicitMigrationsServiceProvider extends ServiceProvider
1414

1515
public function boot()
1616
{
17-
if (!$this->app->runningInConsole()) {
18-
return; // @codeCoverageIgnore
17+
if ($this->app->runningInConsole()) {
18+
$this->commands([
19+
GenerateMigrationCommand::class,
20+
]);
1921
}
2022

21-
$this->commands([
22-
GenerateMigrationCommand::class,
23-
]);
23+
$this->publishes([
24+
implode(DIRECTORY_SEPARATOR, [__DIR__, '..', 'Attributes']) => database_path('attributes'),
25+
], 'attributes');
2426
}
2527

2628
public function register(): void

0 commit comments

Comments
 (0)