mirror of
https://gitee.com/ShopeX/ECShopX
synced 2026-08-04 11:16:23 +08:00
database/migrations/Version20260717202822.php
This commit is contained in:
54
database/migrations/Version20260717202822.php
Normal file
54
database/migrations/Version20260717202822.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Migrations;
|
||||
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema as Schema;
|
||||
|
||||
class Version20260717202822 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("CREATE TABLE `item_multi_lang_mod_lang_zhtw` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`company_id` bigint(20) NOT NULL COMMENT '公司id',
|
||||
`data_id` bigint(20) NOT NULL COMMENT '业务id字段',
|
||||
`table_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '表名',
|
||||
`field` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'field,多语言对应字段',
|
||||
`module_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'module_name,模块名',
|
||||
`lang` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '语言',
|
||||
`attribute_value` longtext COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '多语言值',
|
||||
`created` int(11) NOT NULL,
|
||||
`updated` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `ix_company_id` (`company_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='多语言字典库'");
|
||||
$this->addSql("CREATE TABLE `outside_item_multi_lang_mod_lang_zhtw` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`company_id` bigint(20) NOT NULL COMMENT '公司id',
|
||||
`data_id` bigint(20) NOT NULL COMMENT '业务id字段',
|
||||
`table_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '表名',
|
||||
`field` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'field,多语言对应字段',
|
||||
`module_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'module_name,模块名',
|
||||
`lang` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '语言',
|
||||
`attribute_value` longtext COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '多语言值',
|
||||
`created` int(11) NOT NULL,
|
||||
`updated` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `ix_company_id` (`company_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='多语言字典库'");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user