Subject: | Text fields cannot be indexed without truncation in mysql |
This table cannot be round tripped via the
CREATE TABLE GOOD (
sometext text NOT NULL,
UNIQUE KEY sometext2 ( sometext(150))
)
dbicdump -o dump_directory=./lib -o
components='["InflateColumn::DateTime"]' DFL::Schema::TEST
"dbi:mysql:database=$1:host=dbslave2" UID PWD '{ overwrite_modifications
=> 1, quote_char => "`" }'
Produces :
__PACKAGE__->add_unique_constraint("sometext2", [ "sometext"]);
This produces bad sql when deployed:
my $schema = Test::Schema::TEST->connect("dbi:mysql:dbname=${db}",
$user, $pass);
$schema->create_ddl_dir(['MySQL', 'SQLite', 'PostgreSQL'],
'0.1',
'./sql/'
);
$schema->deploy({ add_drop_table => 1});
############
CREATE TABLE BAD (
sometext text NOT NULL,
UNIQUE KEY sometext2 ( sometext)
)