PHPackages                             raketman/database-partition-processor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. raketman/database-partition-processor

ActiveLibrary[Database &amp; ORM](/categories/database)

raketman/database-partition-processor
=====================================

This package provides a way to auto create|delete partition

1.0.0(5y ago)010MITPHPPHP &gt;=5.6

Since Jul 31Pushed 5y ago1 watchersCompare

[ Source](https://github.com/raketman/database-partition-processor)[ Packagist](https://packagist.org/packages/raketman/database-partition-processor)[ RSS](/packages/raketman-database-partition-processor/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

RaketmanDatabasePartitionProcessor
==================================

[](#raketmandatabasepartitionprocessor)

This library provides a way to auto create|delete partition, which base of date field

!!!Work only for mysql partition!!!

```
/**
 *
 *
 * @RaketmanDatePartition(
 *     table="analyzer_setting",
 *     type="month",
 *     id_field="id",
 *     date_field="created",
 *     safe_period="5",
 *     create_period="4",
 *     manual=true
 * )
 */

if you use doctrine/annotation add @IgnoreAnnotation("RaketmanDatePartition")

```

RaketmanDatePartition options list:

```
table - table name
type - type of partition (day|month|year)
id_field - name of id field
date_field -name of date field, which use in partition definition
safe_period - count of past period, than could,t be delete | safe_period=null - partition not be deleted
create_period - count of future period, than be created
manual - (true|false), if true, to process this need to use --table options in script

```

To process partition you need to run command. This command add|delete partition based options in RaketmanDatePartition. Need to work periodically, for example in cron.

```
php vendor/raketman/database-partition-processor/bin/process.php  --table=* --database-url=* --locate-dirs=* --env-database-url=*

--locate-dirs - dirs to scan RaketmanDatePartition (defaut src) (not required)
--database-url - url to connect, example mysql://db_user:db_password@127.0.0.1:3306/db_name (required one of url)
--env-database-url - env, who contain database-url (required one of url)
--table - table name to manual process (not required)

```

To create partition you need to run command. This command create partition definition based options in RaketmanDatePartition. Run only one time for each table, that you want partitionated.

```
create partition in manual mode, only one table for one run.

 php vendor/raketman/database-partition-processor/bin/create.php --entity-path=/var/www/app/src/Entity/AnalyzerSetting.php --database-url=mysql://root:root@ngynx-analyzer-mariadb:3306/gosuslugi?cha
rset=utf8

--entity-path - file to scan RaketmanDatePartition
--database-url - url to connect, example mysql://db_user:db_password@127.0.0.1:3306/db_name (required one of url)
--env-database-url - env, who contain database-url (required one of url)

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2116d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aa2e4187dc99c83022433e1bb30dbf65cbbd8e14e55aed2402d19af0c8db83bf?d=identicon)[raketman](/maintainers/raketman)

---

Tags

databasePartition

### Embed Badge

![Health badge](/badges/raketman-database-partition-processor/health.svg)

```
[![Health](https://phpackages.com/badges/raketman-database-partition-processor/health.svg)](https://phpackages.com/packages/raketman-database-partition-processor)
```

###  Alternatives

[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k578.4M5.6k](/packages/doctrine-dbal)[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[doctrine/doctrine-bundle

Symfony DoctrineBundle

4.8k241.3M3.3k](/packages/doctrine-doctrine-bundle)[doctrine/migrations

PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and easily deploying changes to it. It is a very easy to use and a powerful tool.

4.8k204.8M440](/packages/doctrine-migrations)[doctrine/data-fixtures

Data Fixtures for all Doctrine Object Managers

2.9k136.1M516](/packages/doctrine-data-fixtures)[robmorgan/phinx

Phinx makes it ridiculously easy to manage the database migrations for your PHP app.

4.5k46.2M405](/packages/robmorgan-phinx)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
