MySQL table names can be up to 64 characters, and Postgres up to 63. The base_table column in views_view is only 32 characters. The upshot is that, while one can define base tables with longer names, and default views based on those base tables, attempting to create a table based on such a table fails - when saving the view, you get an error that the table does not exist. The attached patch enlarges the column to accomodate longer table names.

CommentFileSizeAuthor
views.install.patch1.15 KBmikeryan
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

merlinofchaos’s picture

Status: Needs review » Fixed

Committed. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

overaph’s picture

If I install module schema (i don't know if really is this module)
in my views I see "updated to 64 in views_schema_6005" comment

      'base_table' => array(
        'type' => 'varchar',
        'length' => '32', // Updated to '64' in views_schema_6005()
        'default' => '',
        'not null' => TRUE,
        'description' => 'What table this view is based on, such as node, user, comment, or term.',
      ),

then I have not to apply the patch in #1, right ?

thank you very much

merlinofchaos’s picture

Yes the patch in #1 was applied to Views a year ago.