8000 GitHub - czproject/sql-schema: Library for describe of the database schema.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

czproject/sql-schema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CzProject\SqlSchema

Build Status Downloads this Month Latest Stable Version License

Library for describe of the database schema.

Donate

Installation

Download a latest package or use Composer:

composer require czproject/sql-schema

CzProject\SqlSchema requires PHP 5.6.0 or later.

Usage

use CzProject\SqlSchema\Index;
$schema = new CzProject\SqlSchema\Schema;

$table = $schema->addTable('book');
$table->addColumn('id', 'INT', NULL, array('UNSIGNED'));
$table->addColumn('name', 'VARCHAR', array(200));
$table->addColumn('author_id', 'INT', NULL, array('UNSIGNED'));
$table->addIndex(NULL, 'id', Index::TYPE_PRIMARY);
$table->addIndex('name_author_id', array('name', 'author_id'), Index::TYPE_UNIQUE);

$schema->getTables();

License: New BSD License
Author: Jan Pecha, https://www.janpecha.cz/

About

Library for describe of the database schema.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published
0