-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
89c9bf6
commit 2104dc9
Showing
90 changed files
with
2,266 additions
and
827 deletions.
There are no files selected for viewing
File renamed without changes.
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,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping | ||
https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> | ||
|
||
<entity name="App\Mods\Entity\ModList\AbstractModList" table="mod_lists" repository-class="App\Mods\Repository\ModList\ModListRepository" inheritance-type="SINGLE_TABLE"> | ||
<field name="name" type="string" length="255"/> | ||
<field name="description" type="string" length="255" nullable="true"/> | ||
|
||
<field name="active" type="boolean"/> | ||
|
||
<unique-constraints> | ||
<unique-constraint columns="name"/> | ||
</unique-constraints> | ||
|
||
<discriminator-column name="type" type="string" length="255"/> | ||
<discriminator-map> | ||
<discriminator-mapping value="standard" class="App\Mods\Entity\ModList\StandardModList"/> | ||
<discriminator-mapping value="external" class="App\Mods\Entity\ModList\ExternalModList"/> | ||
</discriminator-map> | ||
|
||
<indexes> | ||
<!-- This is needed because child index mappings override parent index mappings --> | ||
<index columns="created_at"/> | ||
<index columns="last_updated_at"/> | ||
|
||
<index columns="approved"/> | ||
</indexes> | ||
</entity> | ||
|
||
</doctrine-mapping> |
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,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping | ||
https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> | ||
|
||
<entity name="App\Mods\Entity\ModList\ExternalModList" repository-class="App\Mods\Repository\ModList\ExternalModListRepository"> | ||
<field name="url" type="string" length="255"/> | ||
</entity> | ||
|
||
</doctrine-mapping> |
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,66 @@ | ||
<?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 Version20241117133108 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return 'Add support for external mod lists'; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
// this up() migration is auto-generated, please modify it to your needs | ||
$this->addSql('ALTER TABLE mod_lists ADD type VARCHAR(255)'); | ||
$this->addSql("UPDATE mod_lists SET type = 'standard'"); | ||
$this->addSql('ALTER TABLE mod_lists ALTER type SET NOT NULL'); | ||
|
||
$this->addSql('ALTER TABLE mod_lists ADD url VARCHAR(255) DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE mod_lists ALTER approved DROP NOT NULL'); | ||
|
||
$this->addSql('ALTER TABLE permissions RENAME COLUMN mod_list_create TO standard_mod_list_create'); | ||
$this->addSql('ALTER TABLE permissions RENAME COLUMN mod_list_update TO standard_mod_list_update'); | ||
$this->addSql('ALTER TABLE permissions RENAME COLUMN mod_list_delete TO standard_mod_list_delete'); | ||
$this->addSql('ALTER TABLE permissions RENAME COLUMN mod_list_copy TO standard_mod_list_copy'); | ||
$this->addSql('ALTER TABLE permissions RENAME COLUMN mod_list_approve TO standard_mod_list_approve'); | ||
|
||
$this->addSql('ALTER TABLE permissions ADD external_mod_list_create BOOLEAN'); | ||
$this->addSql('ALTER TABLE permissions ADD external_mod_list_update BOOLEAN'); | ||
$this->addSql('ALTER TABLE permissions ADD external_mod_list_delete BOOLEAN'); | ||
$this->addSql('UPDATE permissions SET external_mod_list_create = false'); | ||
$this->addSql('UPDATE permissions SET external_mod_list_update = false'); | ||
$this->addSql('UPDATE permissions SET external_mod_list_delete = false'); | ||
$this->addSql('ALTER TABLE permissions ALTER external_mod_list_create SET NOT NULL'); | ||
$this->addSql('ALTER TABLE permissions ALTER external_mod_list_update SET NOT NULL'); | ||
$this->addSql('ALTER TABLE permissions ALTER external_mod_list_delete SET NOT NULL'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->addSql("DELETE FROM mod_lists WHERE type = 'external'"); | ||
|
||
$this->addSql('ALTER TABLE mod_lists DROP type'); | ||
$this->addSql('ALTER TABLE mod_lists DROP url'); | ||
$this->addSql('ALTER TABLE mod_lists ALTER approved SET NOT NULL'); | ||
|
||
$this->addSql('ALTER TABLE permissions RENAME COLUMN standard_mod_list_create TO mod_list_create'); | ||
$this->addSql('ALTER TABLE permissions RENAME COLUMN standard_mod_list_update TO mod_list_update'); | ||
$this->addSql('ALTER TABLE permissions RENAME COLUMN standard_mod_list_delete TO mod_list_delete'); | ||
$this->addSql('ALTER TABLE permissions RENAME COLUMN standard_mod_list_copy TO mod_list_copy'); | ||
$this->addSql('ALTER TABLE permissions RENAME COLUMN standard_mod_list_approve TO mod_list_approve'); | ||
|
||
$this->addSql('ALTER TABLE permissions DROP external_mod_list_create'); | ||
$this->addSql('ALTER TABLE permissions DROP external_mod_list_update'); | ||
$this->addSql('ALTER TABLE permissions DROP external_mod_list_delete'); | ||
} | ||
} |
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.