mirror of
https://forge.chapril.org/tykayn/caisse-bliss
synced 2025-10-04 17:04:54 +02:00
start add selling
This commit is contained in:
parent
0d672d5447
commit
c1b2c97350
14 changed files with 1798 additions and 92 deletions
31
migrations/Version20250217160209.php
Normal file
31
migrations/Version20250217160209.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 Version20250217160209 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 festival ADD chiffre_affaire DOUBLE PRECISION DEFAULT NULL, ADD clients_count INT DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE festival DROP chiffre_affaire, DROP clients_count');
|
||||
}
|
||||
}
|
41
migrations/Version20250217165029.php
Normal file
41
migrations/Version20250217165029.php
Normal file
|
@ -0,0 +1,41 @@
|
|||
<?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 Version20250217165029 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 group_of_products DROP FOREIGN KEY FK_2A99B370A76ED395');
|
||||
$this->addSql('DROP INDEX IDX_2A99B370A76ED395 ON group_of_products');
|
||||
$this->addSql('ALTER TABLE group_of_products CHANGE user_id owner_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE group_of_products ADD CONSTRAINT FK_2A99B3707E3C61F9 FOREIGN KEY (owner_id) REFERENCES user (id)');
|
||||
$this->addSql('CREATE INDEX IDX_2A99B3707E3C61F9 ON group_of_products (owner_id)');
|
||||
$this->addSql('ALTER TABLE selling DROP date');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE selling ADD date VARCHAR(255) NOT NULL');
|
||||
$this->addSql('ALTER TABLE group_of_products DROP FOREIGN KEY FK_2A99B3707E3C61F9');
|
||||
$this->addSql('DROP INDEX IDX_2A99B3707E3C61F9 ON group_of_products');
|
||||
$this->addSql('ALTER TABLE group_of_products CHANGE owner_id user_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE group_of_products ADD CONSTRAINT FK_2A99B370A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
|
||||
$this->addSql('CREATE INDEX IDX_2A99B370A76ED395 ON group_of_products (user_id)');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue