#=============================================================================
BEGIN {
- maybe_plan(25,
+ maybe_plan(26,
'SQL::Translator::Producer::PostgreSQL',
'Test::Differences',
)
is($field12_sql, 'time_field timestamp NOT NULL', 'time with precision');
+my $field13 = SQL::Translator::Schema::Field->new( name => 'enum_field_with_type_name',
+ table => $table,
+ data_type => 'enum',
+ extra => { list => [ 'Foo', 'Bar' ],
+ custom_type_name => 'real_enum_type' },
+ is_auto_increment => 0,
+ is_nullable => 0,
+ is_foreign_key => 0,
+ is_unique => 0 );
+
+my $field13_sql = SQL::Translator::Producer::PostgreSQL::create_field($field13,{ postgres_version => 8.3 });
+
+is($field13_sql, 'enum_field_with_type_name real_enum_type NOT NULL', 'Create real enum field works');
+
{
# let's test default values! -- rjbs, 2008-09-30