Skip to content

Commit

Permalink
List of valid values is now compatible with the SQLT producers
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Melo <melo@simplicidade.org>
  • Loading branch information
melo committed Oct 28, 2008
1 parent 14e18aa commit f63068d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DBICx-CORM/lib/DBICx/CORM/EnumFields.pm
Expand Up @@ -34,7 +34,7 @@ sub add_columns {
croak("Invalid value for extra.valid_values in field '$name', ");
}

$info->{extra}{valid_values_list} = \@values;
$info->{extra}{list} = \@values; # For SQL::Translator

{
no strict 'refs';
Expand Down
2 changes: 2 additions & 0 deletions DBICx-CORM/t/20-enum-fields.t
Expand Up @@ -27,3 +27,5 @@ cmp_deeply($vv, {
canceled => 'Canceled',
});

my $info = $user->result_source->column_info('state');
cmp_deeply($info->{extra}{list}, [ 'active', 'suspended', 'canceled' ]);

0 comments on commit f63068d

Please sign in to comment.