Skip to content

Commit 1865b45

Browse files
committed
Publish migrations
1 parent 6f95567 commit 1865b45

25 files changed

+393
-144
lines changed

src/ServiceProvider.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public function boot() {
4545

4646
//load the modules
4747
$modules = Modules::enabled();
48+
$publishesMigrations = [];
4849
/** @var Module[]|array $modules */
4950
foreach ($modules as $module) {
5051
$routesPath = $module->routesPath();
@@ -64,8 +65,12 @@ public function boot() {
6465
}
6566
if (($moduleMigrationsPath = $module->migrationsPath())) {
6667
// $this->thisLoadMigrationsFrom($moduleMigrationsPath);
68+
$publishesMigrations[$moduleMigrationsPath] = database_path('migrations');
6769
}
6870
}
71+
72+
//publishes migration
73+
$this->publishes($publishesMigrations, 'migrations');
6974
}
7075

7176
protected function thisLoadMigrationsFrom($paths) {
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
namespace ItvisionSy\Laravel\Modules\StoreHandlers;
4+
5+
/**
6+
* Description of MySqlSimpleDbStoreHandler
7+
*
8+
* @author muhannad
9+
*/
10+
class MySqlSimpleDbStoreHandler extends SimpleDbStoreHandler {
11+
12+
public function set($key, $value = null)
13+
{
14+
return $this->statement("REPLACE INTO `" . static::$tableName . "` (`key`,`value`) VALUES ('" . addslashes($key) . "','" . addslashes($value) . "')");
15+
}
16+
17+
}

tests/codeCoverage/Commands/InitiateDatabaseTable.php.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ <h4>Legend</h4>
199199
<span class="warning"><strong>Dead Code</strong></span>
200200
</p>
201201
<p>
202-
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 13:23:59 UTC 2017.</small>
202+
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 15:39:35 UTC 2017.</small>
203203
</p>
204204
<a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a>
205205
</footer>

tests/codeCoverage/Commands/MakeModule.php.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ <h4>Legend</h4>
312312
<span class="warning"><strong>Dead Code</strong></span>
313313
</p>
314314
<p>
315-
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 13:23:59 UTC 2017.</small>
315+
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 15:39:35 UTC 2017.</small>
316316
</p>
317317
<a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a>
318318
</footer>

tests/codeCoverage/Commands/dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ <h3>Project Risks</h3>
141141
<footer>
142142
<hr/>
143143
<p>
144-
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 13:23:59 UTC 2017.</small>
144+
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 15:39:35 UTC 2017.</small>
145145
</p>
146146
</footer>
147147
</div>

tests/codeCoverage/Commands/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ <h4>Legend</h4>
137137
<span class="success"><strong>High</strong>: 90% to 100%</span>
138138
</p>
139139
<p>
140-
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 13:23:59 UTC 2017.</small>
140+
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 15:39:35 UTC 2017.</small>
141141
</p>
142142
</footer>
143143
</div>

tests/codeCoverage/Controller.php.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ <h4>Legend</h4>
210210
<span class="warning"><strong>Dead Code</strong></span>
211211
</p>
212212
<p>
213-
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 13:23:59 UTC 2017.</small>
213+
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 15:39:35 UTC 2017.</small>
214214
</p>
215215
<a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a>
216216
</footer>

tests/codeCoverage/Interfaces/KeyValueStoreInterface.php.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ <h4>Legend</h4>
9090
<span class="warning"><strong>Dead Code</strong></span>
9191
</p>
9292
<p>
93-
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 13:23:59 UTC 2017.</small>
93+
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 15:39:35 UTC 2017.</small>
9494
</p>
9595
<a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a>
9696
</footer>

tests/codeCoverage/Interfaces/StaticAndInstanceAccessInterface.php.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ <h4>Legend</h4>
9393
<span class="warning"><strong>Dead Code</strong></span>
9494
</p>
9595
<p>
96-
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 13:23:59 UTC 2017.</small>
96+
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 15:39:35 UTC 2017.</small>
9797
</p>
9898
<a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a>
9999
</footer>

tests/codeCoverage/Interfaces/dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ <h3>Project Risks</h3>
137137
<footer>
138138
<hr/>
139139
<p>
140-
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 13:23:59 UTC 2017.</small>
140+
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 15:39:35 UTC 2017.</small>
141141
</p>
142142
</footer>
143143
</div>

0 commit comments

Comments
 (0)