✨ feat(Devis.php): Ajoute liaison Options <-> Devis et méthode get/set. ✨ feat(options/add.twig): Ajoute template création/édition des options. ♻️ refactor(.env): Met à jour les URLs ngrok pour la synchro Stripe. 🐛 fix(StripeCommand.php): Corrige et améliore la synchro Stripe. ✨ feat(products.twig): Ajoute gestion et affichage des options. ✨ feat(Client.php): Ajoute gestion des options (CRUD) pour Stripe. ✨ feat(vich_uploader.yaml): Ajoute configuration pour upload images options. ✨ feat(ProductController.php): Gère les options (CRUD) dans le contrôleur. ✨ feat(OptionsType.php): Ajoute formulaire pour la gestion des options. ```
39 lines
1.4 KiB
PHP
39 lines
1.4 KiB
PHP
<?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 Version20260122074529 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 options (id SERIAL NOT NULL, name VARCHAR(255) NOT NULL, price_ht DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))');
|
|
$this->addSql('ALTER TABLE devis ADD options_id INT DEFAULT NULL');
|
|
$this->addSql('ALTER TABLE devis ADD CONSTRAINT FK_8B27C52B3ADB05F1 FOREIGN KEY (options_id) REFERENCES options (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
$this->addSql('CREATE INDEX IDX_8B27C52B3ADB05F1 ON devis (options_id)');
|
|
}
|
|
|
|
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 devis DROP CONSTRAINT FK_8B27C52B3ADB05F1');
|
|
$this->addSql('DROP TABLE options');
|
|
$this->addSql('DROP INDEX IDX_8B27C52B3ADB05F1');
|
|
$this->addSql('ALTER TABLE devis DROP options_id');
|
|
}
|
|
}
|