table('goods_limit_purchase_rule', ['comment' => '商品限购规则关联表']) ->addColumn('goods_id', 'integer', [ 'signed' => false, 'comment' => '商品ID', ]) ->addColumn('rule_id', 'integer', [ 'signed' => false, 'comment' => '限购规则ID', ]) ->addTimestamps('create_time', 'update_time') ->addIndex(['goods_id'], ['unique' => true, 'name' => 'uk_goods_id']) ->addIndex(['rule_id'], ['name' => 'idx_rule_id']) ->create(); } }