Skip to content

Commit

Permalink
Switch Loggable string columns to 191
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenyeargin committed Oct 23, 2020
1 parent 0fdbacf commit 10195c8
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions migrations/Version20201023030317.php
@@ -0,0 +1,30 @@
<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

final class Version20201023030317 extends AbstractMigration
{
public function getDescription() : string
{
return 'Updates for Gedmo Loggable';
}

public function up(Schema $schema) : void
{
$extLogEntriesTable = $schema->getTable('ext_log_entries');
$extLogEntriesTable->changeColumn('object_class', ['length' => 191, 'nullable' => false]);
$extLogEntriesTable->changeColumn('username', ['length' => 191, 'nullable' => true]);
}

public function down(Schema $schema) : void
{
$extLogEntriesTable = $schema->getTable('ext_log_entries');
$extLogEntriesTable->changeColumn('object_class', ['length' => 255, 'nullable' => false]);
$extLogEntriesTable->changeColumn('username', ['length' => 255, 'nullable' => true]);
}
}

0 comments on commit 10195c8

Please sign in to comment.