|
|
@@ -1,7 +1,7 @@
|
|
|
<?php
|
|
|
+declare(strict_types=1);
|
|
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
-use think\migration\db\Column;
|
|
|
|
|
|
class ExtensionEavAttributeOption extends AbstractMigration
|
|
|
{
|
|
|
@@ -13,12 +13,12 @@ class ExtensionEavAttributeOption extends AbstractMigration
|
|
|
public function change()
|
|
|
{
|
|
|
$table = $this->table('extension_eav_attribute_option', ['engine' => 'InnoDB', 'comment' => '属性选项表']);
|
|
|
- $table->addColumn(Column::unsignedInteger('attribute_id')->setComment('属性ID'))
|
|
|
- ->addColumn(Column::string('label')->setComment('显示文本'))
|
|
|
- ->addColumn(Column::string('value')->setComment('选项值'))
|
|
|
- ->addColumn(Column::unsignedInteger('sort')->setComment('排序'))
|
|
|
- ->addTimestamps()
|
|
|
- ->addSoftDelete()
|
|
|
+ $table->addColumn('attribute_id', 'integer', ['signed' => false, 'comment' => '属性ID'])
|
|
|
+ ->addColumn('label', 'string', ['comment' => '显示文本'])
|
|
|
+ ->addColumn('value', 'string', ['comment' => '选项值'])
|
|
|
+ ->addColumn('sort', 'integer', ['signed' => false, 'comment' => '排序'])
|
|
|
+ ->addTimestamps('create_time', 'update_time')
|
|
|
+ ->addColumn('delete_time', 'timestamp', ['null' => true, 'comment' => '删除时间'])
|
|
|
->addIndex(['attribute_id'])
|
|
|
->create();
|
|
|
}
|