```
✨ feat(EsyWeb): Ajoute gestion des licences et clés DMA pour sites web
Ajoute la gestion des licences pour les sites web EsyWeb, incluant
la génération, le renouvellement et la validation. Intègre aussi
la création et l'utilisation de clés DMA.
```
This commit is contained in:
37
migrations/Version20251112130852.php
Normal file
37
migrations/Version20251112130852.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?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 Version20251112130852 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE website_license (id SERIAL NOT NULL, website_id INT DEFAULT NULL, type VARCHAR(255) NOT NULL, license_number VARCHAR(255) NOT NULL, public_key TEXT NOT NULL, private_key TEXT NOT NULL, create_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, expires_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY(id))');
|
||||
$this->addSql('CREATE INDEX IDX_FB4688BD18F45C82 ON website_license (website_id)');
|
||||
$this->addSql('COMMENT ON COLUMN website_license.create_at IS \'(DC2Type:datetime_immutable)\'');
|
||||
$this->addSql('COMMENT ON COLUMN website_license.expires_at IS \'(DC2Type:datetime_immutable)\'');
|
||||
$this->addSql('ALTER TABLE website_license ADD CONSTRAINT FK_FB4688BD18F45C82 FOREIGN KEY (website_id) REFERENCES website (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE SCHEMA public');
|
||||
$this->addSql('ALTER TABLE website_license DROP CONSTRAINT FK_FB4688BD18F45C82');
|
||||
$this->addSql('DROP TABLE website_license');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user