migrations/Version20230107153713.php line 1
<?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 Version20230107153713 extends AbstractMigration
{
public function getDescription(): string
{
return 'extended log and company table';
}
public function up(Schema $schema): void
{
$alter = <<<SQL
ALTER TABLE `company` ADD COLUMN `words_max` INT DEFAULT 500;
ALTER TABLE `company` ADD COLUMN `words_used` INT DEFAULT 0;
ALTER TABLE `company` ADD COLUMN `day_of_reset` INT DEFAULT 1;
ALTER TABLE `company` ADD COLUMN `maintenance` INT DEFAULT 0;
ALTER TABLE `company` RENAME COLUMN `openai_api_key` TO `external_api_key`;
ALTER TABLE `log` ADD COLUMN `created` DATE DEFAULT NULL;
ALTER TABLE `template` ADD COLUMN `type` enum('COMPLETE', 'EDIT') DEFAULT 'COMPLETE';
SQL;
$this->addSql($alter);
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
}
}