4
0
mirror of https://github.com/AzuraCast/AzuraCast.git synced 2024-06-15 05:36:37 +00:00

#666 -- Convert length from smallint to int for songs longer than...9 hours

This commit is contained in:
Buster "Silver Eagle" Neece 2018-07-16 13:59:08 -05:00
parent 8d719184b2
commit c4e89b4f6d
2 changed files with 30 additions and 2 deletions

View File

@ -0,0 +1,28 @@
<?php declare(strict_types=1);
namespace Entity\Migration;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20180716185805 extends AbstractMigration
{
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE station_media CHANGE length length INT NOT NULL');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE station_media CHANGE length length SMALLINT NOT NULL');
}
}

View File

@ -93,7 +93,7 @@ class StationMedia
protected $isrc;
/**
* @Column(name="length", type="smallint")
* @Column(name="length", type="integer")
* @var int
*/
protected $length;
@ -733,4 +733,4 @@ class StationMedia
return $response;
}
}
}