-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5411 from manuelmeister/feature/add-user-color-an…
…d-abbreviation Add UserAvatar fallback color and abbreviation on profile
- Loading branch information
Showing
42 changed files
with
925 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DataMigrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
require_once __DIR__.'/helpers.php'; | ||
|
||
final class Version202406211251 extends AbstractMigration { | ||
public function getDescription(): string { | ||
return 'Set color & abbreviation to some profiles'; | ||
} | ||
|
||
public function up(Schema $schema): void { | ||
// START PHP CODE | ||
$this->addSql(createTruncateDatabaseCommand()); | ||
|
||
$statements = getStatementsForMigrationFile(); | ||
foreach ($statements as $statement) { | ||
if (trim($statement)) { | ||
$this->addSql($statement); | ||
} | ||
} | ||
// END PHP CODE | ||
} | ||
|
||
public function down(Schema $schema): void {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DoctrineMigrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
final class Version20240621060047 extends AbstractMigration { | ||
public function getDescription(): string { | ||
return 'Add color and abbreviation to profile'; | ||
} | ||
|
||
public function up(Schema $schema): void { | ||
$this->addSql('ALTER TABLE profile ADD color VARCHAR(8) DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE profile ADD abbreviation TEXT DEFAULT NULL'); | ||
} | ||
|
||
public function down(Schema $schema): void { | ||
$this->addSql('ALTER TABLE profile DROP color'); | ||
$this->addSql('ALTER TABLE profile DROP abbreviation'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.