mirror of
https://github.com/AzuraCast/AzuraCast.git
synced 2024-06-14 21:26:37 +00:00
Fixed incorrect decimal, should've been 7,2 from the start (#3116)
* Fixed incorrect decimal, should've been 7,2 from the start * Change return type of getLength() to float to support decimals
This commit is contained in:
parent
1b7bd02d54
commit
d0ab57a4f1
31
src/Entity/Migration/Version20200826084718.php
Normal file
31
src/Entity/Migration/Version20200826084718.php
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Entity\Migration;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20200826084718 extends AbstractMigration
|
||||
{
|
||||
public function getDescription() : string
|
||||
{
|
||||
return 'Fix an oopsie with incorrect decimals.';
|
||||
}
|
||||
|
||||
public function up(Schema $schema) : void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE station_media MODIFY `length` NUMERIC(7, 2)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema) : void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE station_media MODIFY `length` NUMERIC(7, 2)');
|
||||
}
|
||||
}
|
|
@ -332,7 +332,7 @@ class StationMedia
|
|||
$this->isrc = $isrc;
|
||||
}
|
||||
|
||||
public function getLength(): int
|
||||
public function getLength(): float
|
||||
{
|
||||
return $this->length;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user