for my $meth (qw/table reference_table/) {
my $table = $schema->get_table($c->$meth) || next;
# This normalizes the types to ENGINE and returns the value if its there
- next if $extra_to_options->($table, 'mysql_table_type', ['ENGINE', 'TYPE']);
- $table->options({ 'ENGINE' => 'InnoDB' });
+ next if $extra_to_options->($table, 'mysql_table_type', ['ENGINE', 'TYPE']);
+# $table->options( [ { ENGINE => 'InnoDB' } ] );
}
} # foreach constraints
if( my $sql = $view->sql ){
$create .= " AS (\n ${sql}\n )";
}
- # $create .= "";
return $create;
}
method create_table($table, $options) {
-# my ($table, $options) = @_;
-
my $qt = $options->{quote_table_names} || '';
my $qf = $options->{quote_field_names} || '';
my $collate = $table->extra->{'mysql_collate'};
my $union = undef;
- for my $t1_option_ref ($table->_options) {
+ for my $t1_option_ref ($table->options) {
my($key, $value) = %{$t1_option_ref};
$table_type_defined = 1
if uc $key eq 'ENGINE' or uc $key eq 'TYPE';
# Default? XXX Need better quoting!
my $default = $field->default_value;
-=cut
- if ( defined $default ) {
- SQL::Translator::Producer->_apply_default_value(
- \$field_def,
- $default,
- [
- 'NULL' => \'NULL',
- ],
- );
- }
-=cut
+
+# if ( defined $default ) {
+# SQL::Translator::Producer->_apply_default_value(
+# \$field_def,
+# $default,
+# [
+# 'NULL' => \'NULL',
+# ],
+# );
+# }
if ( my $comments = $field->comments ) {
$field_def .= qq[ comment '$comments'];
use constant COLLISION_TAG_LENGTH => 8;
method truncate_id_uniquely(Str $desired_name, Int $max_symbol_length) {
+ use Digest::SHA1 qw(sha1_hex);
return $desired_name
unless defined $desired_name && length $desired_name > $max_symbol_length;