Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
gregglesUpdating title to better match the issue.
Comment #2
Uncle_Code_Monkey CreditAttribution: Uncle_Code_Monkey commentedComment #3
Uncle_Code_Monkey CreditAttribution: Uncle_Code_Monkey commentedThe 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.
Comment #4
DamienMcKennaDoes this problem still happen with the latest release of the SQL Server driver?
Comment #5
DamienMcKennaSounds like this was a problem in the SQL Driver module.