...
- use meta types, that would internally map to actual MySQL data types (better create meta types from currently used MySQL data types), e.g.:
- date - "INT(10) NULL"
- money - "DECIMAL(20,4) NULL"
- int32 - "INT(10)"
- int64 - "BIGINT(20)"
- and so on
describe index structure in the "DBIndexes" unit config option like so:
Code Block 'DBIndexes' => array( 'IDX_INDEX_NAME' => array( 'columns' => array('DBColumn1', 'DBColumn2'), 'unique' => true, ), ),
- create the "in-portal db:sync" command, that will:
- create missing database tables
- change structure of existing tables to match one from unit config
if table column has association with another database table, then define it via new "foreign_key" field option like so:
Code Block 'Fields' => array( 'ItemResourceId' => array( 'type' => 'int', ..., 'default' => null, 'foreign_key' => 'l:ResourceId' ), ),