修改一些已知bug

This commit is contained in:
Kris
2026-01-22 12:18:30 +08:00
parent 1695873133
commit 3dfafe0b83
65 changed files with 2109 additions and 265 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace Database\Migrations;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema as Schema;
class Version20250620143808 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE items_category ADD category_id_taobao BIGINT DEFAULT 0 COMMENT \'淘宝分类id\', ADD parent_id_taobao BIGINT DEFAULT 0 COMMENT \'淘宝父级分类ID\', ADD taobao_category_info JSON DEFAULT NULL COMMENT \'淘宝分类信息行(DC2Type:json_array)\'');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
// $this->addSql('ALTER TABLE items_category DROP category_id_taobao, DROP parent_id_taobao, DROP taobao_category_info');
}
}

View File

@@ -0,0 +1,30 @@
<?php
namespace Database\Migrations;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema as Schema;
class Version20250707100134 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE items ADD is_taobao INT DEFAULT 0 COMMENT \'是否淘宝商品\'');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
}
}

View File

@@ -0,0 +1,26 @@
<?php
namespace Database\Migrations;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema as Schema;
class Version20260108161332 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE distribution_distributor ADD payment_subject SMALLINT DEFAULT 0 NOT NULL COMMENT \'收款主体0=平台1=店铺\', CHANGE created created bigint NOT NULL, CHANGE updated updated bigint NOT NULL');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
}
}