mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-16 15:29:54 +03:00
Move migrations to module/Core
This commit is contained in:
parent
62b54ceaaf
commit
377861c5f1
42 changed files with 11 additions and 25 deletions
|
@ -1,14 +1,6 @@
|
||||||
bin/rr
|
bin/rr
|
||||||
config/autoload/*local*
|
config/autoload/*local*
|
||||||
data/infra
|
data/*
|
||||||
data/cache/*
|
|
||||||
data/log/*
|
|
||||||
data/locks/*
|
|
||||||
data/proxies/*
|
|
||||||
data/migrations_template.txt
|
|
||||||
data/GeoLite2-City*
|
|
||||||
data/database.sqlite
|
|
||||||
data/shlink-tests.db
|
|
||||||
CHANGELOG.md
|
CHANGELOG.md
|
||||||
CONTRIBUTING.md
|
CONTRIBUTING.md
|
||||||
UPGRADE.md
|
UPGRADE.md
|
||||||
|
|
|
@ -53,11 +53,6 @@ shlink
|
||||||
│ ├── config.php
|
│ ├── config.php
|
||||||
│ └── container.php
|
│ └── container.php
|
||||||
├── data
|
├── data
|
||||||
│ ├── cache
|
|
||||||
│ ├── locks
|
|
||||||
│ ├── log
|
|
||||||
│ ├── migrations
|
|
||||||
│ └── proxies
|
|
||||||
├── docs
|
├── docs
|
||||||
│ ├── adr
|
│ ├── adr
|
||||||
│ ├── async-api
|
│ ├── async-api
|
||||||
|
|
|
@ -116,7 +116,7 @@
|
||||||
],
|
],
|
||||||
"cs": "phpcs -s",
|
"cs": "phpcs -s",
|
||||||
"cs:fix": "phpcbf",
|
"cs:fix": "phpcbf",
|
||||||
"stan": "APP_ENV=test php vendor/bin/phpstan analyse module/*/src module/*/test* module/*/config config docker/config data/migrations --level=8",
|
"stan": "APP_ENV=test php vendor/bin/phpstan analyse module/*/src module/*/test* module/*/config module/*/migrations config docker/config --level=8",
|
||||||
"test": [
|
"test": [
|
||||||
"@parallel test:unit test:db",
|
"@parallel test:unit test:db",
|
||||||
"@parallel test:api test:cli"
|
"@parallel test:api test:cli"
|
||||||
|
|
|
@ -11,7 +11,7 @@ use Doctrine\Migrations\DependencyFactory;
|
||||||
return (static function () {
|
return (static function () {
|
||||||
$migrationsConfig = [
|
$migrationsConfig = [
|
||||||
'migrations_paths' => [
|
'migrations_paths' => [
|
||||||
'ShlinkMigrations' => 'data/migrations',
|
'ShlinkMigrations' => 'module/Core/migrations',
|
||||||
],
|
],
|
||||||
'table_storage' => [
|
'table_storage' => [
|
||||||
'table_name' => 'migrations',
|
'table_name' => 'migrations',
|
||||||
|
|
|
@ -29,10 +29,10 @@ register_shutdown_function(function () use ($httpClient): void {
|
||||||
});
|
});
|
||||||
|
|
||||||
$testHelper->createTestDb(
|
$testHelper->createTestDb(
|
||||||
['bin/cli', 'db:create'],
|
createDbCommand: ['bin/cli', 'db:create'],
|
||||||
['bin/cli', 'db:migrate'],
|
migrateDbCommand: ['bin/cli', 'db:migrate'],
|
||||||
['bin/doctrine', 'orm:schema-tool:drop'],
|
dropSchemaCommand: ['bin/doctrine', 'orm:schema-tool:drop'],
|
||||||
['bin/doctrine', 'dbal:run-sql'],
|
runSqlCommand: ['bin/doctrine', 'dbal:run-sql'],
|
||||||
);
|
);
|
||||||
ApiTest\ApiTestCase::setApiClient($httpClient);
|
ApiTest\ApiTestCase::setApiClient($httpClient);
|
||||||
ApiTest\ApiTestCase::setSeedFixturesCallback(fn () => $testHelper->seedFixtures($em, $config['data_fixtures'] ?? []));
|
ApiTest\ApiTestCase::setSeedFixturesCallback(fn () => $testHelper->seedFixtures($em, $config['data_fixtures'] ?? []));
|
||||||
|
|
|
@ -9,9 +9,9 @@ use Psr\Container\ContainerInterface;
|
||||||
/** @var ContainerInterface $container */
|
/** @var ContainerInterface $container */
|
||||||
$container = require __DIR__ . '/../container.php';
|
$container = require __DIR__ . '/../container.php';
|
||||||
$container->get(Helper\TestHelper::class)->createTestDb(
|
$container->get(Helper\TestHelper::class)->createTestDb(
|
||||||
['bin/cli', 'db:create'],
|
createDbCommand: ['bin/cli', 'db:create'],
|
||||||
['bin/cli', 'db:migrate'],
|
migrateDbCommand: ['bin/cli', 'db:migrate'],
|
||||||
['bin/doctrine', 'orm:schema-tool:drop'],
|
dropSchemaCommand: ['bin/doctrine', 'orm:schema-tool:drop'],
|
||||||
['bin/doctrine', 'dbal:run-sql'],
|
runSqlCommand: ['bin/doctrine', 'dbal:run-sql'],
|
||||||
);
|
);
|
||||||
DbTest\DatabaseTestCase::setEntityManager($container->get('em'));
|
DbTest\DatabaseTestCase::setEntityManager($container->get('em'));
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
<!-- Paths to check -->
|
<!-- Paths to check -->
|
||||||
<file>bin</file>
|
<file>bin</file>
|
||||||
<file>module</file>
|
<file>module</file>
|
||||||
<file>data/migrations</file>
|
|
||||||
<file>config</file>
|
<file>config</file>
|
||||||
<file>docker/config</file>
|
<file>docker/config</file>
|
||||||
<file>public/index.php</file>
|
<file>public/index.php</file>
|
||||||
|
|
Loading…
Add table
Reference in a new issue