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

server.selections: specified key was too long; max key length is 1000 bytes #81

Closed
yomguy opened this issue Sep 14, 2015 · 9 comments
Closed
Assignees
Labels
Milestone

Comments

@yomguy
Copy link
Owner

yomguy commented Sep 14, 2015

@AnasGhrab reported:
Parisson/Telemeta#78

Running migrations for django_extensions:

  • Nothing to migrate.

    • Loading initial data for django_extensions.
      Installed 0 object(s) from 0 fixture(s)
      Running migrations for telemeta:
  • Nothing to migrate.

    • Loading initial data for telemeta.
      Installed 0 object(s) from 0 fixture(s)
      Running migrations for server:
    • Migrating forwards to 0001_initial.

      server:0001_initial
      FATAL ERROR - The following SQL query failed: CREATE TABLE timeside_selections (id integer AUTO_INCREMENT NOT NULL PRIMARY KEY, date_added datetime NOT NULL, date_modified datetime NULL, uuid varchar(512) NOT NULL UNIQUE, title varchar(512) NOT NULL, description longtext NOT NULL, author_id integer NULL)
      The error was: (1071, 'Specified key was too long; max key length is 1000 bytes')
      ! Error found during real run of migration! Aborting.

    ! Since you have a database that does not support running
    ! schema-altering statements in transactions, we have had
    ! to leave it in an interim state between migrations.

! You might be able to recover with: = DROP TABLE timeside_selections CASCADE; []
= DROP TABLE timeside_selections_items CASCADE; []
= DROP TABLE timeside_selections_selections CASCADE; []
= DROP TABLE timeside_items CASCADE; []
= DROP TABLE timeside_experiences CASCADE; []
= DROP TABLE timeside_experiences_presets CASCADE; []
= DROP TABLE timeside_experiences_experiences CASCADE; []
= DROP TABLE timeside_processors CASCADE; []
= DROP TABLE timeside_presets CASCADE; []
= DROP TABLE timeside_results CASCADE; []
= DROP TABLE timeside_tasks CASCADE; []

! The South developers regret this has happened, and would
! like to gently persuade you to consider a slightly
! easier-to-deal-with DBMS (one that supports DDL transactions)
! NOTE: The error which caused the migration to fail is further up.
Error in migration: server:0001_initial

@yomguy yomguy added the bug label Sep 14, 2015
@yomguy yomguy added this to the 0.8 milestone Sep 14, 2015
@yomguy
Copy link
Owner Author

yomguy commented Sep 14, 2015

We should restrict this to 950 bytes fir MyISAM DBs.

@AnasGhrab
Copy link
Contributor

Is there something that I can do now, or do I have to go back to 1.5.2 ?

@yomguy
Copy link
Owner Author

yomguy commented Sep 14, 2015

just hold on ;)

@yomguy
Copy link
Owner Author

yomguy commented Sep 14, 2015

weird because selection.title is 512 chars, description is a TextField, moreover it passes the CREM DB which is MyISAM :/
For the moment, as far as timeside.server is experimental, you can remove it from INSTALLED_APPS and it should be OK to use Telemeta..

@thomasfillon
Copy link
Contributor

Hi

From what I can see in some discussions on the web, it may be due to the following field in the Selection model:

uuid = models.CharField(_('uuid'), unique=True, blank=True, max_length=255)

The combination between unique=True and max_length=255 may be the source of the problem.
I wil try to propose a fix for that.

Or maybe this field

   title = models.CharField(_('title'), blank=True, max_length=512)

@thomasfillon
Copy link
Contributor

@AnasGhrab : clould you please try to use this branch of TimeSide with a tentative fix : https://github.com/Parisson/TimeSide/tree/hotfix/issue81

@thomasfillon
Copy link
Contributor

@AnasGhrab: oh sorry, wait a minute, I forgot to squash the migration.

@AnasGhrab
Copy link
Contributor

It was Ok after installing the good version of elasticsearch.

@thomasfillon
Copy link
Contributor

OK thank you very much for the feedback.
I get lost in the migration process ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants