DB Schema File


Along with model classes Skipper can generate the CakeSchema object class which defines whole DataBase structure. The output file is defined in the project properties using the Export-file variable.

Choose ecommerce CakePHP project in Skipper project tree and edit export-file property in property editor

Note: To edit the project properties click on the root element in the project tree or anywhere in the white area of your project.

As well as the model object files the DataBase schema file will now be generated during the ORM export.

CakePHP schema definitions export results in Skipper

Here you can see a preview of a simple dbs file:

<?php
class AppSchema extends CakeSchema
{
  public $name = 'App';
  public $Address =
    array (
      'id' =>
        array (
          'type' => 'integer',
          'null' => false,
          'key' => 'primary'
        ),
      'name' =>
        array (
          'type' => 'string'
        ),
      'street' =>
        array (
          'type' => 'string'
        ),
      'city' =>
        array (
          'type' => 'string'
        ),
      'postcode' =>
        array (
          'type' => 'string'
        ),
      'country' =>
        array (
          'type' => 'string',
          'null' => false
        ),
      'contact_id' =>
        array (
          'type' => 'integer',
          'null' => false
        ),
      'indexes' =>
        array (
          'PRIMARY' =>
            array (
              'column' => 'id',
              'unique' => 'true'
            )
        )
    );
    ...