Realised I should be doing this via /mysite/code/Extensions instead, so tried the following:
Created /mysite/code/Extensions/BlogCategoryExtension.php:
<?php
class BlogCategoryExtension extends DataExtension {
private static $db = array(
'Description' => 'Varchar(255)',
'MetaTitle' => 'Varchar(255)',
'MetaDescription' => 'Varchar(255)',
);
public function updateCMSFields(FieldList $fields) {
$fields->push(new TextField('Description'));
$fields->push(new TextField('MetaTitle'));
$fields->push(new TextField('MetaDescription'));
}
}
I then added the following to /mysite/_config/config.yml:
...
BlogCategory:
extensions:
- BlogCategoryExtension
...
Then ran /dev/build.
No field was added to the database table and when I try and access the blog part of silverstripe's admin I just get a grey screen. If I remove the lines I added to config.yml and run /dev/build again all returns to normal.