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.
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.
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'
)
)
);
...