feat(EsyWeb): Ajoute l'offre, les dates et améliore l'affichage du site.

This commit is contained in:
Serreau Jovann
2025-11-12 14:58:43 +01:00
parent 5361199335
commit 161cb79a89
11 changed files with 329 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?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 Version20251112134128 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('ALTER TABLE website ADD offert VARCHAR(255) DEFAULT NULL');
}
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 DROP offert');
}
}

View File

@@ -0,0 +1,38 @@
<?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 Version20251112134754 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_dates (id SERIAL NOT NULL, website_id INT DEFAULT NULL, create_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, open_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, next_hosting TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_FC1E79D218F45C82 ON website_dates (website_id)');
$this->addSql('COMMENT ON COLUMN website_dates.create_at IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('COMMENT ON COLUMN website_dates.open_at IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('COMMENT ON COLUMN website_dates.next_hosting IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('ALTER TABLE website_dates ADD CONSTRAINT FK_FC1E79D218F45C82 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_dates DROP CONSTRAINT FK_FC1E79D218F45C82');
$this->addSql('DROP TABLE website_dates');
}
}