portrino/px_dbsequencer
Composer 安装命令:
composer require portrino/px_dbsequencer
包简介
With this extension you can ensure different unique keys for the configured tables (e.g.: pages, tt_content)
README 文档
README
Database Sequencer for TYPO3
1 Features
The PxDbsequencer extension enables the possibility to define different unique keys for the configured tables (e.g.: pages, pages_language_overlay, tt_content).
That means, you define a global identifier, e.g. per environment, and every identifier/ primary key of the configured table(s) will be sequenced in steps of a defined offset (default: 10).
So, if configure the global identifier "1" for your production system, then every configured table will have identifiers/ primary keys like 1, 11, 21, 31 and so on. For your staging system, you may define the global identifier "2", which than results in table identifiers like 2, 12, 22, 32 and so on.
In addition, every developer of the project can have his own global identifier as well. Therefor the risk of overriding data, that has to be migrated between systems (e.g. pages and content elements for a new feature), will be minimized.
2 Usage
2.1 Installation
Installation using Composer
The recommended way to install the extension is using composer.
Run the following command within your Composer based TYPO3 project:
composer require portrino/px_dbsequencer
Installation as extension from TYPO3 Extension Repository (TER)
Download and install the extension with the extension manager module.
2.2 Setup
After finishing the installation, head over to the extension settings and set the system identifier, the offset and the tables you'd like to sequence.
The extension settings, like the system identifier, can also be configured depending on the current TYPO3_CONTEXT via
config/system/additional.php
SO, a possible configuration in config/system/settings.php could look like:
return [
...
'EXTENSIONS' => [
...
'px_dbsequencer' => [
'offset' => 10,
'system' => 1,
'tables' => 'be_groups,be_users,pages,sys_category,sys_template,tt_content',
],
...
],
...
];
and in config/system/additional.php could be something like:
// contextual environment settings
$applicationContext = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(
'/',
\TYPO3\CMS\Core\Core\Environment::getContext(),
true
);
switch ($applicationContext[0]) {
case 'Development':
switch ($applicationContext[1]) {
case 'Staging':
// TYPO3_CONTEXT: Development/Staging
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['px_dbsequencer']['system'] = 2;
break;
case 'Local':
// TYPO3_CONTEXT: Development/Local
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['px_dbsequencer']['system'] = 3;
break;
}
break;
case 'Production':
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['px_dbsequencer']['system'] = 1;
break;
}
3 Compatibility
| PxDbsequencer | TYPO3 | PHP | Support / Development |
|---|---|---|---|
| 14.x | 14.x | 8.2 - 8.5 | features, bugfixes, security updates |
| 13.x | 13.4 | 8.2 - 8.3 | features, bugfixes, security updates |
| 0.12.x | 12.4 | 8.1 - 8.2 | bugfixes, security updates |
| 0.11.x | 11.5 | 7.4 - 8.1 | none |
| 0.10.x | 10.4 | 7.2 - 7.4 | none |
| 0.9.x | 9.5 | 7.2 - 7.4 | none |
| 0.7.x | 8.7 | 7.0 - 7.4 | none |
| 0.6.x | 7.6 | 5.5 - 7.3 | none |
4 Authors
- See the list of contributors who participated in this project.
portrino/px_dbsequencer 适用场景与选型建议
portrino/px_dbsequencer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7.79k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2016 年 09 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 portrino/px_dbsequencer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 portrino/px_dbsequencer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 7.79k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 25
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2016-09-12