```
✨ 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. ```
This commit is contained in:
38
migrations/Version20260122074529.php
Normal file
38
migrations/Version20260122074529.php
Normal 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 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');
|
||||
}
|
||||
}
|
||||
32
migrations/Version20260122075732.php
Normal file
32
migrations/Version20260122075732.php
Normal 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 Version20260122075732 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 options ADD stripe_id VARCHAR(255) NOT 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 options DROP stripe_id');
|
||||
}
|
||||
}
|
||||
37
migrations/Version20260122081226.php
Normal file
37
migrations/Version20260122081226.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 Version20260122081226 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 options ADD image_name VARCHAR(255) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE options ADD image_size INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE options ADD updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
|
||||
$this->addSql('COMMENT ON COLUMN options.updated_at IS \'(DC2Type:datetime_immutable)\'');
|
||||
}
|
||||
|
||||
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 options DROP image_name');
|
||||
$this->addSql('ALTER TABLE options DROP image_size');
|
||||
$this->addSql('ALTER TABLE options DROP updated_at');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user