Closed (won't fix)
Project:
Drupal core
Version:
8.0.x-dev
Component:
database system
Priority:
Major
Category:
Task
Assigned:
Reporter:
Created:
29 Dec 2010 at 22:47 UTC
Updated:
29 Jul 2014 at 19:15 UTC
Jump to comment: Most recent file
Comments
Comment #2
Stevel commentedLet's try again, tested locally now...
Comment #4
Stevel commented#2: allow-db-driver-updates-without-undefined-method-calls.patch queued for re-testing.
edit: failing tests pass locally...
Comment #6
Stevel commented#2: allow-db-driver-updates-without-undefined-method-calls.patch queued for re-testing.
Let's try again now that #1006478: Race condition in the update process causes random test bot failures is fixed.
Comment #8
Stevel commentedPatch didn't apply any more. Rerolling
Comment #9
steven jones commentedGuess there's no way to leverage a normal module for this, and the existing update mechanism?
Comment #10
Stevel commentedThat's exactly what we're trying to avoid. Of course it's possible to put some if ($driver == 'pgsql') then do this or that in system_update_N, but that would be like (ab)using system.install for all of core update code and use if module_installed($module) then update it. We want to keep driver-specific updates inside the driver it belongs.
Comment #11
steven jones commentedI've been thinking about this approach and I'm not a fan, basically you're making the database drivers more of a framework in their own right, by adding updates to them. Currently the DB layer is used as pretty much just an abstraction layer between Drupal and the DB, all the logic of which tables have been created are kept in Drupal, not the DB layer. I think it's okay to have normal Drupal updates doing DB updates, and I don't think we need a separate mechanism for this in Drupal just for the DB drivers.
I would encourage you to mark this as 'Closed (won't fix)'
Comment #12
skhot commentedI have a dev site that was planning to go to production soon, when all of the sudden (likely from updating modules and core), we started getting these kinds of errors:
PDOException: SQLSTATE[23000]: [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot insert duplicate key row in object 'dbo.file_managed' with unique index 'uri_unique'. in drupal_write_record() (line 6776 of E:\content\includes\common.inc).PDOException: SQLSTATE[23000]: [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot insert duplicate key row in object 'dbo.block' with unique index 'tmd_unique'. in drupal_write_record() (line 6859 of E:\content\includes\common.inc).PDOException: SQLSTATE[42S02]: [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object name 'shib_auth'.: SELECT * FROM {shib_auth}; Array ( ) in _shib_auth_list_rules() (line 101 of E:\content\sites\all\modules\shib_auth\shib_auth_roles_forms.inc).I suspect that these errors are due to no way to properly update the schema structure between the different versions of the database driver (http://drupal.org/node/1161664#comment-4540872). We are using Microsoft SQL Server 10.50.1600 and Microsoft-IIS/7.5 with Drupal 7 driver for SQL Server and SQL Azure. Any advice on how to overcome this problem?
Comment #13
cweagansYeah, this is definitely a won't fix. The database layer should just be an intermediary between the business logic and the data store.
As for #12, my advice to you is simply "Don't use MSSQL", which may or may not be an option at this point.