Hi all,

Attempting to install the module results in the following error. Note that I can install other modules just fine (like views_field_view). Once I navigate back to the admin pages, the module shows up as installed, but the table has not, in fact, been created.

Error message
PDOException: SQLSTATE[HY000]: General error: 1005 Can't create table './robotlib/versioncontrol_operations.frm' (errno: 150): CREATE TABLE {versioncontrol_operations} ( `vc_op_id` INT unsigned NOT NULL auto_increment COMMENT 'Unique identifier for each operation in this table. Does not necessarily correspond to chronological order in any way.', `type` TINYINT unsigned NOT NULL DEFAULT 0 COMMENT 'Operation type as specified by the backend: either of VERSIONCONTROL_OPERATION_COMMIT, VERSIONCONTROL_OPERATION_BRANCH or VERSIONCONTROL_OPERATION_TAG. (For version control systems like Subversion that need to emulate branches and tags, this will still...', `repo_id` INT unsigned NOT NULL DEFAULT 0 COMMENT 'Foreign key (referring to versioncontrol_repositories.repo_id) for the repository that was affected by the operation.', `author_date` BIGINT NOT NULL DEFAULT 0 COMMENT 'Date/time when the operation was created, as Unix timestamp.', `committer_date` BIGINT NOT NULL DEFAULT 0 COMMENT 'Date/time when the operation was added to the repository, as Unix timestamp.', `author` VARCHAR(64) NOT NULL DEFAULT '' COMMENT 'VCS specific username of the user who is the original author of this operation. For centralized version control systems this and committer are the same.', `author_uid` INT unsigned NOT NULL DEFAULT 0 COMMENT 'The users.uid for the Drupal user who authored this commit, corresponding to the value in versioncontrol_operations.author. If no such association can be found, then 0.', `committer` VARCHAR(64) NOT NULL DEFAULT '' COMMENT 'VCS specific username of the user who committed this operation. For distributed version control systems, this should be the author, not the committer. For centralized version control systems this and author are the same.', `committer_uid` INT unsigned NOT NULL DEFAULT 0 COMMENT 'The users.uid for the Drupal user who made this commit (but perhaps was not the author), corresponding to the value in versioncontrol_operations.committer. If no such association can be found, then 0.', `revision` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'VCS specific global revision identifier, like \"1234\" for Subversion or some SHA-1 hash for various distributed version control systems. Empty string if the VCS does not support atomic commits / global revisions.', `message` TEXT NULL DEFAULT NULL COMMENT 'Log message. Might be empty for branch and tag operations, depending on the version control system’s capabilities. Should really not be empty for commit messages, except for the super-evil case when the commit author is sloppy enough not to enter one ...', PRIMARY KEY (`vc_op_id`), INDEX `type` (`type`), INDEX `repo_id` (`repo_id`), INDEX `author_date` (`author_date`), INDEX `committer_date` (`committer_date`), INDEX `author` (`author`), INDEX `author_uid` (`author_uid`), INDEX `committer` (`committer`), INDEX `committer_uid` (`committer_uid`), INDEX `revision` (`revision`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'The combined table for commit, branch and tag operations.'; Array ( ) in db_create_table() (line 2685 of /var/www/rusty-drake/includes/database/database.inc).
The website encountered an unexpected error. Please try again later.

Comments

mpearrow’s picture

BTW I do realize that this is a dev module and that porting is in progress so bumps are to be expected, just wasn't sure if this report might be useful.

marvil07’s picture

Actually we hit that error on the initial porting. We could not really understand what was the real problem. AFAIK sdboyer work-around it just removing the table descriptions(completely weird, probably a mysql parse error?), but we would like to know if more if someone can really isolate the problem. We should not discard options like it could be one specific mysql version or something like that.

Sadly it seems like I was not really able to reproduce it, so comments more than welcome.

GStegemann’s picture

I have maybe a similar issue: the updates for this module fail. Already the first update #6102 returns the following error message:

DatabaseSchemaObjectDoesNotExistException: Das Feld <em class="placeholder"></em>.<em class="placeholder">versioncontrol_repositories</em> kann nicht hinzugefügt werden: Die Tabelle ist nicht vorhanden. in DatabaseSchema_mysql->addField() (Zeile 325 von /var/www/html/cm7/includes/database/mysql/schema.inc).

But the table is there!

mysql> show tables like '%versioncontrol%';
+-------------------------------------------------+
| Tables_in_drupal7 (%versioncontrol%)            |
+-------------------------------------------------+
| igs_intra_versioncontrol_account_status_strings |
| igs_intra_versioncontrol_account_status_users   |
| igs_intra_versioncontrol_accounts               |
| igs_intra_versioncontrol_cvs_accounts           |
| igs_intra_versioncontrol_cvs_repositories       |
| igs_intra_versioncontrol_item_revisions         |
| igs_intra_versioncontrol_labels                 |
| igs_intra_versioncontrol_operation_items        |
| igs_intra_versioncontrol_operation_labels       |
| igs_intra_versioncontrol_operations             |
| igs_intra_versioncontrol_repositories           |
| igs_intra_versioncontrol_repository_metadata    |
| igs_intra_versioncontrol_repository_urls        |
| igs_intra_versioncontrol_source_items           |
| igs_intra_versioncontrol_svn_repositories       |
+-------------------------------------------------+

I'm using a database prefix, maybe this causes problems here. And this site was ported from Drupal 6.

That's the first time that such database table updates do fail.

sdboyer’s picture

Status: Active » Postponed

marking this postponed because it should be fixed with our "good enough" solution of removing all the description strings from the install file.

still about the weirdest damn error i've ever seen.

GStegemann’s picture

In the meanwhile I mananged to get update #6102 done. I just inserted the function into the D6 version of the module and run the update on my D6 site. So far so good.

But then the next error shows up:

versioncontrol module
Update #6300

    Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1: SELECT base.repo_id AS repo_id, base.name AS name, base.vcs AS vcs, base.root AS root, base.authorization_method AS authorization_method, base.updated AS updated, base.cron AS cron, base.init AS init, base.locked AS locked, base.data AS data, base.plugins AS plugins FROM {versioncontrol_repositories} base WHERE (base.vcs IN ()) ; Array ( ) in VersioncontrolEntityController->executeQuery() (Zeile 299 von /var/www/html/cm7/sites/all/modules/versioncontrol/includes/controllers.inc).

And here I have no idea to get this fixed. This update even does not run on my D6 site.

Second I am wondering about a comment regarding the 63xx updates:
"Update 6300 (from 6.x-2.0 to 6.x-3.0)"

Was there ever a version 3.0 of the Version Control module?

And what is the recommend migration path to migrate version "6.x-1.0-rc2" to D7? Should I just set the schema_version to 6999?

GStegemann’s picture

Finally I got all update hooks done.

I just updated all hooks from #6300 through #6322 to be D7 compatible. If someone is interested I can upload the 'patched' install file.

nico.knaepen’s picture

Status: Postponed » Needs review
StatusFileSize
new935 bytes

I'm also receiving this error on enable of the module. What I noticed in the error messages was the following text:

...depending on the version control systemÔÇÖs capabilities...

I've added a patch.

michel.settembrino’s picture

Status: Needs review » Reviewed & tested by the community

+1 for patch on #7

  • marvil07 committed f9b3d8b on 7.x-1.x authored by nico.knaepen
    Issue #1572634 by nico.knaepen: Change versioncontrol_operation schema...
marvil07’s picture

Status: Reviewed & tested by the community » Fixed

@nico.knaepen, thanks for the patch.

AFAIK I was no longer able to reproduce the problem, maybe mysql version, but in any case, this change is small enough, so it is now in upstream.

nico.knaepen’s picture

@marvil07 thanks for committing the patch.

Status: Fixed » Closed (fixed)

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