I have a production website running Drupal 8.0.4 and Multiversion 8.x-1.0-alpha5. I have been trying and failing to update this to the latest versions. After updating the modules (via composer), I've added the replication and workspace modules (which now seem to be dependencies of Multiversion?), run the database updates (without issues). If I then try to interact with the site in any way (browser, console, etc.), I immediately get an error like this:

± ../vendor/drupal/console/bin/drupal user:login:url 1


  [Drupal\Core\Database\DatabaseExceptionWrapper]
  SQLSTATE[42703]: Undefined column: 7 ERROR:  column revision.label does not exist
  LINE 1: SELECT revision.revision_id AS revision_id, revision.label A...
                                                      ^: SELECT revision.revision_id AS revision_id, revision.label AS label, revision.machine_name AS machine_name, revision.uid AS uid, revision.changed AS changed, revision.upstream AS upstream, base.id AS id, base.type AS type, base.uuid AS uuid, base.created AS created, CASE base.revision_id WHEN revision.revision_id THEN 1 ELSE 0 END AS "isDefaultRevision"
  FROM
  {workspace} base
  INNER JOIN {workspace_revision} revision ON revision.revision_id = base.revision_id
  WHERE  (base.id IN  (:db_condition_placeholder_0)); Array
  (
      [:db_condition_placeholder_0] => 1
  )



  [PDOException]
  SQLSTATE[42703]: Undefined column: 7 ERROR:  column revision.label does not exist
  LINE 1: SELECT revision.revision_id AS revision_id, revision.label A...
                                                      ^

I've looked at the named database tables, there is a label field in the workspace table, but not the workspace_revision table. Not sure why yet, but I'll test further.

Comments

mikl created an issue. See original summary.

mikl’s picture

Oh, and if it wasn't clear from the legible SQL errors, I'm using PostgreSQL for this site, although that hopefully shouldn't matter ;)

mikl’s picture

Ah, I see now that the Workspace and Replication modules are not required by Multiversion, and moreover that the workspace and workspace_revision tables actually do not belong to the workspace module, but presumably to Multiversion. Dang, I miss when you could actually open an .install file and see what tables a module created…

mikl’s picture

Ok, after comparing with a fresh install, there are significant differences in the database schema for both workspace and workspace_revision tables. Are these tables referenced by other tables, and can I just overwrite my existing database with the new definition?

Also, are there other such tables that need their schema fixed?

jeqq’s picture

Status: Active » Closed (outdated)
mpastas’s picture

Hey @mikl , what was the fix you did apply?