Skip to content

Commit

Permalink
KOJO-149 | Modify some class references
Browse files Browse the repository at this point in the history
  • Loading branch information
mucha55 committed Oct 1, 2019
1 parent 403c785 commit 77963e1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/Db/Setup/Schema/Version_3_0_0.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@
use Neighborhoods\Kojo\Db\Schema\VersionAbstract;
use Neighborhoods\Kojo\Db\Schema\VersionInterface;
use Neighborhoods\Kojo\Doctrine\Connection\DecoratorInterface;
use Neighborhoods\Kojo\StateTransitionChangeInterface;
use Neighborhoods\Kojo\StateTransitionChange;
use Neighborhoods\Kojo\JobStateChangeInterface;
use Neighborhoods\Kojo\JobStateChange;

class Version_3_0_0 extends VersionAbstract
{
protected function _assembleSchemaChanges(): VersionInterface
{
$connectionDecoratorRepository = $this->_getDoctrineConnectionDecoratorRepository();
$createSchema = $connectionDecoratorRepository->createSchema(DecoratorInterface::ID_SCHEMA);
$createTable = $createSchema->createTable(StateTransitionChange\RepositoryInterface::TABLE_NAME);
$createTable->addColumn(StateTransitionChangeInterface::PROP_ID, Type::BIGINT,
$createTable = $createSchema->createTable(JobStateChange\RepositoryInterface::TABLE_NAME);
$createTable->addColumn(JobStateChangeInterface::PROP_ID, Type::BIGINT,
[
'autoincrement' => true,
'unsigned' => true
]
);
$createTable->setPrimaryKey([StateTransitionChangeInterface::PROP_ID]);
$createTable->addColumn(StateTransitionChangeInterface::PROP_DATA, Type::TEXT);
$createTable->setPrimaryKey([JobStateChangeInterface::PROP_ID]);
$createTable->addColumn(JobStateChangeInterface::PROP_DATA, Type::JSON);
$this->_setCreateTable($createTable);

return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/Db/Setup/Schema/Version_3_0_0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ services:
class: Neighborhoods\Kojo\Db\Setup\Schema\Version_3_0_0
calls:
- [setDoctrineConnectionDecoratorRepository, ["@doctrine.connection.decorator.repository"]]
- [setTableName, ["@=constant(\"\\\\Neighborhoods\\\\Kojo\\\\StateTransitionChange\\\\RepositoryInterface::TABLE_NAME\")"]]
- [setTableName, ["@=constant(\"\\\\Neighborhoods\\\\Kojo\\\\JobStateChange\\\\RepositoryInterface::TABLE_NAME\")"]]
db.setup.schema.version.3_0_0:
alias: neighborhoods.kojo.db.setup.schema.version.3_0_0
4 changes: 2 additions & 2 deletions src/Db/TearDown/Schema/Version_6_0_0.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

use Neighborhoods\Kojo\Db\Schema\VersionAbstract;
use Neighborhoods\Kojo\Db\Schema\VersionInterface;
use Neighborhoods\Kojo\StateTransitionChange;
use Neighborhoods\Kojo\JobStateChange;

class Version_6_0_0 extends VersionAbstract
{
protected function _assembleSchemaChanges(): VersionInterface
{
$this->setTableName(StateTransitionChange\RepositoryInterface::TABLE_NAME);
$this->setTableName(JobStateChange\RepositoryInterface::TABLE_NAME);

return $this;
}
Expand Down

0 comments on commit 77963e1

Please sign in to comment.