my $temporary = "";
- if(exists $table->{extra}{temporary}) {
- $temporary = $table->{extra}{temporary} ? "TEMPORARY " : "";
+ if(exists $table->extra->{temporary}) {
+ $temporary = $table->extra->{temporary} ? "TEMPORARY " : "";
}
my $create_statement;
my @constraints;
push @constraints, SQL::Translator::Schema::Constraint->new(
name => "enforce_dims_".$field->name,
- expression => "(ST_NDims($field) = ".$field->{extra}{dimensions}.")",
+ expression => "(ST_NDims($field) = ".$field->extra->{dimensions}.")",
table => $field->table,
type => CHECK_C,
);
push @constraints, SQL::Translator::Schema::Constraint->new(
name => "enforce_srid_".$field->name,
- expression => "(ST_SRID($field) = ".$field->{extra}{srid}.")",
+ expression => "(ST_SRID($field) = ".$field->extra->{srid}.")",
table => $field->table,
type => CHECK_C,
);
push @constraints, SQL::Translator::Schema::Constraint->new(
name => "enforce_geotype_".$field->name,
- expression => "(GeometryType($field) = '".$field->{extra}{geometry_type}."'::text OR $field IS NULL)",
+ expression => "(GeometryType($field) = '".$field->extra->{geometry_type}."'::text OR $field IS NULL)",
table => $field->table,
type => CHECK_C,
);
# Geography
#
if($data_type eq 'geography'){
- $data_type .= '('.$field->{extra}{geography_type}.','. $field->{extra}{srid} .')'
+ $data_type .= '('.$field->extra->{geography_type}.','. $field->extra->{srid} .')'
}
return $data_type;
$field->table->schema->name,
$options->{table} ? $options->{table} : $field->table->name,
$field->name,
- $field->{extra}{dimensions},
- $field->{extra}{srid},
- $field->{extra}{geometry_type});
+ $field->extra->{dimensions},
+ $field->extra->{srid},
+ $field->extra->{geometry_type});
return $out;
}