mirror of
https://forge.chapril.org/tykayn/caisse-bliss
synced 2025-10-09 17:02:47 +02:00
up
This commit is contained in:
parent
347e08358c
commit
6df4488b5c
39 changed files with 1462 additions and 6 deletions
31
migrations/Version20250209145710.php
Normal file
31
migrations/Version20250209145710.php
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?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 Version20250209145710 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 selling (id INT AUTO_INCREMENT NOT NULL, note VARCHAR(255) DEFAULT NULL, products LONGTEXT NOT NULL COMMENT \'(DC2Type:object)\', sum DOUBLE PRECISION NOT NULL, reduction DOUBLE PRECISION DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('DROP TABLE selling');
|
||||
}
|
||||
}
|
31
migrations/Version20250209150109.php
Normal file
31
migrations/Version20250209150109.php
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?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 Version20250209150109 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 user ADD is_verified TINYINT(1) NOT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE user DROP is_verified');
|
||||
}
|
||||
}
|
39
migrations/Version20250209150432.php
Normal file
39
migrations/Version20250209150432.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?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 Version20250209150432 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 group_of_products (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE group_of_products_product (group_of_products_id INT NOT NULL, product_id INT NOT NULL, INDEX IDX_ABD75153748B7BD1 (group_of_products_id), INDEX IDX_ABD751534584665A (product_id), PRIMARY KEY(group_of_products_id, product_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('ALTER TABLE group_of_products_product ADD CONSTRAINT FK_ABD75153748B7BD1 FOREIGN KEY (group_of_products_id) REFERENCES group_of_products (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE group_of_products_product ADD CONSTRAINT FK_ABD751534584665A FOREIGN KEY (product_id) REFERENCES product (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE user ADD current_festival LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:object)\'');
|
||||
}
|
||||
|
||||
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_product DROP FOREIGN KEY FK_ABD75153748B7BD1');
|
||||
$this->addSql('ALTER TABLE group_of_products_product DROP FOREIGN KEY FK_ABD751534584665A');
|
||||
$this->addSql('DROP TABLE group_of_products');
|
||||
$this->addSql('DROP TABLE group_of_products_product');
|
||||
$this->addSql('ALTER TABLE user DROP current_festival');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue