PHPackages                             milesasylum/schnoop-schema - 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. milesasylum/schnoop-schema

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

milesasylum/schnoop-schema
==========================

Schnoop Schema is a collection of PHP classes for describing a MySQL database schema.

v0.3.3(1y ago)3166.0k—8%1[1 PRs](https://github.com/courtney-miles/schnoop-schema/pulls)1MITPHPPHP 7.2 - 8.3

Since Oct 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/courtney-miles/schnoop-schema)[ Packagist](https://packagist.org/packages/milesasylum/schnoop-schema)[ Docs](https://github.com/courtney-miles/schnoop-schema)[ RSS](/packages/milesasylum-schnoop-schema/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (3)Versions (9)Used By (1)

schnoop-schema
==============

[](#schnoop-schema)

[![Tests](https://github.com/courtney-miles/schnoop-schema/actions/workflows/tests.yml/badge.svg)](https://github.com/courtney-miles/schnoop-schema/actions/workflows/tests.yml) [![Coverage Status](https://camo.githubusercontent.com/7039570c185b7fd7e8d63b618c65585be2926c0bcc6090ba9ab64b0224c000a0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f636f7572746e65792d6d696c65732f7363686e6f6f702d736368656d612f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/courtney-miles/schnoop-schema?branch=master) [![Latest Stable Version](https://camo.githubusercontent.com/57c9d41cc7a0166aa2c31f9267fd4f05515474905f1037b1fd4e7f9267582bb4/68747470733a2f2f706f7365722e707567782e6f72672f6d696c65736173796c756d2f7363686e6f6f702d736368656d612f762f737461626c65)](https://packagist.org/packages/milesasylum/schnoop-schema) [![Total Downloads](https://camo.githubusercontent.com/8ff10b39fb744d28a0601664a3c31a00f040dd23adca3aff397d0a9fca127f77/68747470733a2f2f706f7365722e707567782e6f72672f6d696c65736173796c756d2f7363686e6f6f702d736368656d612f646f776e6c6f616473)](https://packagist.org/packages/milesasylum/schnoop-schema) [![License](https://camo.githubusercontent.com/768ee5f5193507b61e49302ddab4c4751fc8c369ffe0f709504d26afc318e6c8/68747470733a2f2f706f7365722e707567782e6f72672f6d696c65736173796c756d2f7363686e6f6f702d736368656d612f6c6963656e7365)](https://packagist.org/packages/milesasylum/schnoop-schema)

Schnoop Schema is a collection of PHP classes for describing a MySQL database schema and providing the DDL statements for that schema.

Its intended purpose is to be a code-generator, by making it easy to use PHP to script to creation of DDL statements for tables, routines, etc.

This package does not interact with a database server, but for an implementation that does, checkout [milesasylum/Schnoop](https://packagist.org/packages/milesasylum/schnoop).

With Schnoop-Scheme you can describe the following database definitions:

- Databases
- Tables
    - Columns
    - Indexes
    - Foreign keys
    - Triggers
- Functions
- Procedures

> **Disclaimer:** It is not advisable to use this package in production environment -- it's is suitable only for development environments to assist with code generation.

Examples
--------

[](#examples)

### Create database

[](#create-database)

```
