Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text fields cannot be indexed without truncation in mysql [rt.cpan.org #68734] #48

Open
rabbiveesh opened this issue Nov 20, 2022 · 0 comments

Comments

@rabbiveesh
Copy link
Contributor

Migrated from rt.cpan.org#68734 (status was 'open')

Requestors:

From [email protected] on 2011-06-10 10:12:31
:

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)
) 

From [email protected] on 2011-06-10 10:23:23
:

Adding dependency on the sqlt support ticket - without having an sqlt
infrastructure to consume index lengths, there's no point of adding this
to dbic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant