Skip to content

Commit

Permalink
Merge branch '0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
vtsykun committed Jan 31, 2018
2 parents 9ca6558 + c3a323e commit fad325a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/Migrations/Schema/OkvpnMQInsightBundleInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ public function up(Schema $schema, QueryBag $queries)
$table->addColumn('added', Type::INTEGER);
$table->addColumn('removed', Type::INTEGER);
$table->addColumn('channel', Type::STRING, ['notnull' => false, 'length' => 32]);
$table->setPrimaryKey(['id']);

$table = $schema->createTable('okvpn_mq_error_stat');
$table->addColumn('id', Type::INTEGER, ['autoincrement' => true]);
$table->addColumn('created', Type::DATETIME);
$table->addColumn('processor_name', Type::STRING, ['notnull' => false, 'length' => 255]);
$table->addColumn('message_id', Type::STRING, ['notnull' => false, 'length' => 255]);
$table->addColumn('log', Type::TEXT, ['notnull' => false, 'length' => 255]);
$table->setPrimaryKey(['id']);
}
}
38 changes: 34 additions & 4 deletions src/Migrations/Schema/v1_0/OkvpnMQInsightBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,49 @@
namespace Okvpn\Bundle\MQInsightBundle\Migrations\Schema;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Type;
use Oro\Bundle\MigrationBundle\Migration\Migration;
use Oro\Bundle\MigrationBundle\Migration\QueryBag;

/**
* @SuppressWarnings(PHPMD.TooManyMethods)
* @SuppressWarnings(PHPMD.ExcessiveClassLength)
*/
class OkvpnMQInsightBundle implements Migration
{
/**
* {@inheritdoc}
*/
public function up(Schema $schema, QueryBag $queries)
{
$table = $schema->createTable('okvpn_mq_state_stat');
$table->addColumn('id', Type::INTEGER, ['autoincrement' => true]);
$table->addColumn('created', Type::DATETIME);
$table->addColumn('queue', Type::INTEGER);
$table->setPrimaryKey(['id']);

$table = $schema->createTable('okvpn_mq_processor_stat');
$table->addColumn('id', Type::INTEGER, ['autoincrement' => true]);
$table->addColumn('created', Type::DATETIME);
$table->addColumn('name', Type::STRING, ['length' => 255]);
$table->addColumn('avg_time', Type::DECIMAL, ['scale' => 3, 'precision' => 7, 'notnull' => false]);
$table->addColumn('max_time', Type::DECIMAL, ['scale' => 3, 'precision' => 7, 'notnull' => false]);
$table->addColumn('min_time', Type::DECIMAL, ['scale' => 3, 'precision' => 7, 'notnull' => false]);
$table->addColumn('ack', Type::INTEGER);
$table->addColumn('reject', Type::INTEGER);
$table->addColumn('requeue', Type::INTEGER);
$table->setPrimaryKey(['id']);

$table = $schema->createTable('okvpn_mq_change_stat');
$table->addColumn('id', Type::INTEGER, ['autoincrement' => true]);
$table->addColumn('created', Type::DATETIME);
$table->addColumn('added', Type::INTEGER);
$table->addColumn('removed', Type::INTEGER);
$table->addColumn('channel', Type::STRING, ['notnull' => false, 'length' => 32]);
$table->setPrimaryKey(['id']);

$table = $schema->createTable('okvpn_mq_error_stat');
$table->addColumn('id', Type::INTEGER, ['autoincrement' => true]);
$table->addColumn('created', Type::DATETIME);
$table->addColumn('processor_name', Type::STRING, ['notnull' => false, 'length' => 255]);
$table->addColumn('message_id', Type::STRING, ['notnull' => false, 'length' => 255]);
$table->addColumn('log', Type::TEXT, ['notnull' => false, 'length' => 255]);
$table->setPrimaryKey(['id']);
}
}

0 comments on commit fad325a

Please sign in to comment.