| 12345678910111213141516171819202122232425262728293031323334353637 | <?phpuse yii\db\Migration;use yii\db\Schema;/** * Handles the creation of table `{{%package}}`. */class m181111_140802_create_package_table extends Migration{    public $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=InnoDB';    /**     * @inheritdoc     */    public function up()    {        $this->createTable('{{%package}}', [            'id' => Schema::TYPE_PK,            'order_id' => Schema::TYPE_INTEGER . "(11) NOT NULL COMMENT '订单ID'",            'order_sku_ids' => Schema::TYPE_INTEGER . "(11) NOT NULL COMMENT '订单商品ID组'",            'no' => Schema::TYPE_STRING . "(32) NOT NULL COMMENT '物流单号'",            'com' => Schema::TYPE_STRING. "(20)  NULL COMMENT '物流公司'",            'created_at' => Schema::TYPE_INTEGER . "(11) NOT NULL",            'updated_at' => Schema::TYPE_INTEGER . "(11) NOT NULL",            'status' => Schema::TYPE_SMALLINT . "(1) NOT NULL DEFAULT '1' COMMENT '状态'",        ]);    }    /**     * @inheritdoc     */    public function down()    {        $this->dropTable('{{%package}}');    }}
 |