note
friedo
<p>The problem is that you're using <c>qw</c> in the list that you're passing to <c>add_columns</c>. What you're actually passing is the list <c>( 'id', 'token', 'old_invoice', 'date', '=>', '{data_type', '=>', \'datetime\'}' )</c></p>
<p>
In order to pass a list of column-name => hashref pairs, you'll need to write it like this:</p>
<c>
__PACKAGE__->add_columns(id => { },
token => { },
old_invoice => { },
date => {data_type => 'datetime'}
);
</c>
<p>
Alternatively, you can pass a list of the plain column names (no hashrefs) and specify the date column type later:
</p>
<c>
__PACKAGE__->add_columns(qw/id
token
old_invoice/);
__PACKAGE__->add_columns(date => {data_type => 'datetime'});
</c>
<p>Update: Fixed typos</p>
697061
697061