How can I identify if a database is D6 or D7? I have been sent site files and a database for a website to review but have had trouble loading it up.  The core and contributed modules are all D7, but when I import the database and run a page on the browser I get a message,


  PDOException: SQLSTATE[42S02]: Base table or view not found: 1146
  Table 'example.semaphore' doesn't exist: SELECT expire, value FROM
  {semaphore} WHERE name = :name; Array ( [:name] => variable_init ) in
  lock_may_be_available() (line 167 of
  example.com/includes/lock.inc).


I suspect this means that the database I have been given is a D6 one, but need to confirm this.  Is the version declared anywhere, or is the absence of the semaphore the evidence I need?
In Drupal 6 the node revisions are in {node_revisions}, and in Drupal 7 the node revisions are in {node_revision}.  So, you can just check which table exists.  There are some structural differences with the tables, too.  For example there is a status column in D7, but not in D6.