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:
parent
8d719184b2
commit
c4e89b4f6d
28
app/src/Entity/Migration/Version20180716185805.php
Normal file
28
app/src/Entity/Migration/Version20180716185805.php
Normal 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');
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user