mirror of
https://forge.chapril.org/tykayn/caisse-bliss
synced 2025-06-20 01:44:42 +02:00
up routes and schema
This commit is contained in:
parent
e23013825b
commit
1c700917b3
23 changed files with 1959 additions and 89 deletions
37
migrations/Version20250214095832.php
Normal file
37
migrations/Version20250214095832.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 Version20250214095832 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 festvial (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, date_creation DATE DEFAULT NULL, chiffre_affaire DOUBLE PRECISION DEFAULT NULL, clients_count INT DEFAULT NULL, commentaire VARCHAR(500) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE group_of_products_selling (group_of_products_id INT NOT NULL, selling_id INT NOT NULL, INDEX IDX_22D44E55748B7BD1 (group_of_products_id), INDEX IDX_22D44E55155A4545 (selling_id), PRIMARY KEY(group_of_products_id, selling_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('ALTER TABLE group_of_products_selling ADD CONSTRAINT FK_22D44E55748B7BD1 FOREIGN KEY (group_of_products_id) REFERENCES group_of_products (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE group_of_products_selling ADD CONSTRAINT FK_22D44E55155A4545 FOREIGN KEY (selling_id) REFERENCES selling (id) ON DELETE CASCADE');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE group_of_products_selling DROP FOREIGN KEY FK_22D44E55748B7BD1');
|
||||
$this->addSql('ALTER TABLE group_of_products_selling DROP FOREIGN KEY FK_22D44E55155A4545');
|
||||
$this->addSql('DROP TABLE festvial');
|
||||
$this->addSql('DROP TABLE group_of_products_selling');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue