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

Taxonomy move_term tests fail for mysql, but not sqlite #229

Closed
mikelietz opened this issue Oct 25, 2011 · 4 comments
Closed

Taxonomy move_term tests fail for mysql, but not sqlite #229

mikelietz opened this issue Oct 25, 2011 · 4 comments

Comments

@mikelietz
Copy link
Member

Test results for move_term vary by database engine. The following two errors appear for mysql, but not sqlite:

Fail: When $before is true the Term should be inserted before $target_term
/var/www/habari/tests/test_taxonomy.php:298
Fail: Without arguments the Term should be moved all the way to the right
/var/www/habari/tests/test_taxonomy.php:304

@ringmaster
Copy link
Member

My schema shows the terms table as UNSIGNED, as does the schema definition. This makes it impossible to place term id's into negative, temporary space as required when moving.

@ringmaster
Copy link
Member

Confirmed, changing the mptt_left and mptt_right fields to be unsigned allows all test_taxonomy tests (including the most recent changes) to pass. Probably need to write a versioned migration, because I doubt that db_update will deal properly with the sign change.

@ringmaster
Copy link
Member

Whaddaya know? db_update will change the sign of the field.

@chrismeller
Copy link
Member

Just for reference, habari/system commit 35735ae is related.

chrismeller added a commit to chrismeller/system that referenced this issue Oct 27, 2011
The changes I made to Vocabulary::move_term() in 55ff990 mean it's no longer necessary to have signed integers for mptt_left and mptt_right.

Related to habari/habari#229.
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

3 participants