diff --git a/.github/workflows/sylius.yaml b/.github/workflows/sylius.yaml index 768cb51..0e31b8d 100644 --- a/.github/workflows/sylius.yaml +++ b/.github/workflows/sylius.yaml @@ -111,7 +111,7 @@ jobs: if: 'always() && steps.end-of-setup-sylius.outcome == ''success''' services: mariadb: - image: 'mariadb:10.4.11' + image: 'mariadb:10.11' ports: - '3306:3306' env: diff --git a/migrations/Version20240221095851.php b/migrations/Version20240221095851.php new file mode 100644 index 0000000..eda3668 --- /dev/null +++ b/migrations/Version20240221095851.php @@ -0,0 +1,33 @@ +addSql('ALTER TABLE AuthorizedDomain RENAME TO synolia_authorized_domain '); + $this->addSql('ALTER TABLE synolia_authorized_domain RENAME COLUMN isEnabled TO is_enabled'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE synolia_authorized_domain RENAME TO AuthorizedDomain '); + $this->addSql('ALTER TABLE AuthorizedDomain RENAME COLUMN is_enabled TO isEnabled'); + } +} diff --git a/src/Entity/Domain/AuthorizedDomain.php b/src/Entity/Domain/AuthorizedDomain.php index b65fff9..6264342 100644 --- a/src/Entity/Domain/AuthorizedDomain.php +++ b/src/Entity/Domain/AuthorizedDomain.php @@ -8,6 +8,7 @@ use Sylius\Component\Resource\Model\ResourceInterface; use Synolia\SyliusAdminOauthPlugin\Repository\AuthorizedDomainRepository; +#[ORM\Table(name: 'synolia_authorized_domain')] #[ORM\Entity(repositoryClass: AuthorizedDomainRepository::class)] class AuthorizedDomain implements ResourceInterface { @@ -19,7 +20,7 @@ class AuthorizedDomain implements ResourceInterface #[ORM\Column(type: 'string', nullable: false)] private string $name; - #[ORM\Column(type: 'boolean')] + #[ORM\Column(name: 'is_enabled', type: 'boolean')] private bool $isEnabled = false; /**