| 12345678910111213141516171819202122232425 |
- <?php
- declare(strict_types=1);
- use Phinx\Migration\AbstractMigration;
- class ExtensionEavAttributeOption extends AbstractMigration
- {
- /**
- * Change Method.
- *
- * Write your reversible migrations using this method.
- */
- public function change()
- {
- $table = $this->table('extension_eav_attribute_option', ['engine' => 'InnoDB', 'comment' => '属性选项表']);
- $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();
- }
- }
|