emteknetnz/silverstripe-varchar-polyfill 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

emteknetnz/silverstripe-varchar-polyfill

最新稳定版本:1.0.2

Composer 安装命令:

composer require emteknetnz/silverstripe-varchar-polyfill

包简介

Polyfill for pre CMS 5.4 for DBClassNameVarchar

README 文档

README

This module provides a polyfill for DBClassNameVarchar which is not available before silverstripe/framework 5.4.0 and was added in this pull-request.

This module works on Silverstripe 4 and 5.

This functionality this provides is described here.

When upgrading to CMS 6, and also optionally 5.4, you should uninstall this module and instead use the DBClassNameVarchar class provided in silverstripe/framework.

Installation

composer require emteknetnz/silverstripe-varchar-polyfill

Before installing this module, it it's recommended that you first validate that ALTER TABLE queries are a significant bottleneck when running dev/build. You can use emteknetnz/silverstripe-dev-build-benchark to help with this.

Configuration

Add the following configuration to your project to enable the polyfill:

SilverStripe\ORM\DataObject:
  fixed_fields:
    ClassName: DBClassNameVarcharPolyfill

SilverStripe\ORM\FieldType\DBPolymorphicForeignKey:
  composite_db:
    Class: "DBClassNameVarcharPolyfill('SilverStripe\\ORM\\DataObject', ['index' => false])"

Warning

After updating this config all necessary ALTER TABLE queries to change ClassName columns from enum to varchar will be run on the next dev/build, which can take a long time on large databases. Keep this in mind in particular when deploying to production.

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-11