Home Documentation GitHub Support


Skeleton is a database schema builder, designed to manipulate your database structure and tables.

Creating tables

In order to create a new table, you must first set the table name you want to create with the $db->table() method.



Now, you must create columns for your table. The first method we are going to use is the $db->createColumn(). The parameters for this method are:

The name of the column you want to create.

The SQL data type for the column you are creating. Must be a valid type supported by your current MySQL version.

An optional maximum data length for the column you are creating.

An optional default value for this column in new rows.


    ->createColumn('username', 'VARCHAR', 255)
    ->createColumn('password', 'VARCHAR', 255);

The second method to use while creating columns is the $db->createNullableColumn(). Unlike the previous one, this method creates a column that accepts NULL values. Parameters are the same.


    ->createColumn('username', 'VARCHAR', 255)
    ->createColumn('password', 'VARCHAR', 255)
    ->createNullableColumn('email', 'VARCHAR', 255);

Documentation session under development... Contribute!