-
Notifications
You must be signed in to change notification settings - Fork 7
Extend WpGet
Daniele Fontani edited this page Jan 30, 2018
·
1 revision
Into Table.php file into /src/db/ folder, edit
public function getFieldDefinition()
{
// add here field definition
}
Example
public function getFieldDefinition()
{
return array(
'reposlug' =>'string',
'name' =>'string',
'description'=>'string',
'major'=>'integer',
'minor'=>'integer',
'build' =>'integer',
'version' =>'string', `
'relativepath' =>'string'
);
}
where each field is based on convention:
fieldname => type
For type enumeration see eloquent type mapping. In fact, wpget use eloquent migration and types are mapped on eloquent column generation function (longText,text,smallInteger). See the full list