Running the database update scripts I get the following error. The site is running on mssql 2008 R2, unfortunately.

Update #7003
Failed: PDOException: SQLSTATE[42000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot define PRIMARY KEY constraint on nullable column in table 'metatag'.: ALTER TABLE [{metatag}] ADD CONSTRAINT {metatag}_pkey_technical PRIMARY KEY CLUSTERED (__pk); Array ( ) in db_drop_primary_key() (line 2901 of C:\Users\Administrator\Documents\GitHub\chowtaifook\includes\database\database.inc).

Comments

greggles’s picture

Title: Error on Update #7003 » Update 7003 - Cannot define PRIMARY KEY constraint on nullable column in table metatag - with MS SQL Server

Updating title to better match the issue.

Uncle_Code_Monkey’s picture

Uncle_Code_Monkey’s picture

The SqlSrv Drupal driver does not create the __pk field correctly and a patch is currently required to correct the issue. Unfortunately, the patch must be in place before "update.php" is run, so rolling back your database is the best solution (you did perform a backup before running update.php, right?). If you do not have the option of restoring from a backup, you can read through the comments of how to manually correct your database after applying the patch.

DamienMcKenna’s picture

Version: 7.x-1.0-beta7 » 7.x-1.x-dev
Status: Active » Postponed (maintainer needs more info)

Does this problem still happen with the latest release of the SQL Server driver?

DamienMcKenna’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Sounds like this was a problem in the SQL Driver module.