This commit is contained in:
1 parent
1c98a634c3
commit
dae8f3d999
35 files changed
+1510
-82
No files matched your search
@@ -19,16 +19,24 @@ final class Version20251127191813 extends AbstractMigration
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
if ($this->isSqlite()) {
|
||||
return;
|
||||
}
|
||||
$this->addSql('ALTER TABLE albums ALTER source DROP DEFAULT');
|
||||
$this->addSql('ALTER INDEX uniq_album_local_id RENAME TO UNIQ_F4E2474F5D5A2101');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE SCHEMA public');
|
||||
if ($this->isSqlite()) {
|
||||
return;
|
||||
}
|
||||
$this->addSql('ALTER TABLE albums ALTER source SET DEFAULT \'spotify\'');
|
||||
$this->addSql('ALTER INDEX uniq_f4e2474f5d5a2101 RENAME TO uniq_album_local_id');
|
||||
}
|
||||
|
||||
private function isSqlite(): bool
|
||||
{
|
||||
return $this->connection->getDatabasePlatform()->getName() === 'sqlite';
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user