PHPackages                             irap/table-creator - 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. irap/table-creator

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

irap/table-creator
==================

Package creating or editing MySQL tables.

2.2.0(1y ago)05.7k1MITPHPPHP &gt;=8.1.0

Since Jul 6Pushed 1y ago2 watchersCompare

[ Source](https://github.com/iRAP-software/package-table-creator)[ Packagist](https://packagist.org/packages/irap/table-creator)[ RSS](/packages/irap-table-creator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (12)Used By (1)

A package to simplify the management of MySQL tables.

Example Usage
-------------

[](#example-usage)

The example below demonstrates how one can use this package to easily create a new MySQL database table:

```
use iRAP\TableCreator\DatabaseField;
use iRAP\TableCreator\TableCreator;
use iRAP\TableCreator\Testing\AbstractTest;

function createTestTable(\mysqli $db)
{
  $tableCreator = new TableCreator($db, "test_table");

  $fields = array(
      DatabaseField::createInt('id', 11, true),
      DatabaseField::createBool('bool_field'),
      DatabaseField::createVarchar('varchar_field', 255),
      DatabaseField::createChar('char_field', 3),
      DatabaseField::createDate('date_field'),
      DatabaseField::createDecimal('decimal_field', 5, 4),
      DatabaseField::createGeometry('geometry_field'),
      DatabaseField::createGeometryCollection('geometry_collection_field'),
      DatabaseField::createLineString('line_string_field'),
      DatabaseField::createLongText('long_text_field'),
      DatabaseField::createMultiLineString('multi_line_string_field'),
      DatabaseField::createMultiPoint('multi_point_field'),
      DatabaseField::createMultiPolygon('multi_polygon_field'),
      DatabaseField::createPoint('point_field'),
      DatabaseField::createPolygon('polygon_field'),
      DatabaseField::createText('text_field'),
      DatabaseField::createTimestamp('timestamp_field')
  );

  $tableCreator->addFields($fields);
  $tableCreator->setPrimaryKey('id');
  $tableCreator->run();
}
```

Testing
-------

[](#testing)

When testing, you may find it easier to just make use of Docker Compose to spin up a temporary database to test against like so:

```
version: "3"

services:
  db:
    image: mariadb:latest
    container_name: db
    ports:
      - "3306:3306"
    volumes:
      - temp-mysql-data:/var/lib/mysql
    environment:
      - MARIADB_ROOT_PASSWORD=thisIsTheTestingPa55w0rd
      - MARIADB_DATABASE=testing

volumes:
  temp-mysql-data:
    driver: local
```

Then simply create the `Settings.php` file from the template with the relevant values, and execute the tests with `php ./testing/main.php`.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance44

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 60.7% of commits — single point of failure

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

Every ~499 days

Recently: every ~845 days

Total

8

Last Release

438d ago

Major Versions

1.1.1 → 2.0.02024-02-28

PHP version history (3 changes)1.0.0PHP &gt;=5.3.0

1.1.1PHP &gt;=5.4.0

2.0.0PHP &gt;=8.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/52783970b96ca5954e3335aacc48870d8db7ee70dad5adaa0170a37e0b028566?d=identicon)[irap\_admin](/maintainers/irap_admin)

---

Top Contributors

[![iRAP-Stu](https://avatars.githubusercontent.com/u/115175332?v=4)](https://github.com/iRAP-Stu "iRAP-Stu (17 commits)")[![programster](https://avatars.githubusercontent.com/u/5709838?v=4)](https://github.com/programster "programster (6 commits)")[![Rockburner](https://avatars.githubusercontent.com/u/29091278?v=4)](https://github.com/Rockburner "Rockburner (4 commits)")[![samrat-rai](https://avatars.githubusercontent.com/u/45970131?v=4)](https://github.com/samrat-rai "samrat-rai (1 commits)")

---

Tags

mysqlmodelsmysqli

### Embed Badge

![Health badge](/badges/irap-table-creator/health.svg)

```
[![Health](https://phpackages.com/badges/irap-table-creator/health.svg)](https://phpackages.com/packages/irap-table-creator)
```

###  Alternatives

[aplus/database

Aplus Framework Database Library

3331.6M7](/packages/aplus-database)[sergeytsalkov/meekrodb

The Simple PHP/MySQL Library

341387.0k10](/packages/sergeytsalkov-meekrodb)[ezsql/ezsql

Advance database access library. Make interacting with a database ridiculously easy. An universal interchangeable CRUD system.

86946.7k](/packages/ezsql-ezsql)[jv2222/ezsql

Advance database access library. Make interacting with a database ridiculously easy. An universal interchangeable CRUD system.

87311.3k2](/packages/jv2222-ezsql)[stefangabos/zebra_session

A drop-in replacement for PHP's default session handler which stores session data in a MySQL database, providing better performance, better security and protection against session fixation and session hijacking

174112.1k2](/packages/stefangabos-zebra-session)[stefangabos/zebra_database

An advanced, compact and lightweight MySQL database wrapper library, built around PHP's MySQLi extension.

11812.0k](/packages/stefangabos-zebra-database)

PHPackages © 2026

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