Deprecate IDatabase::nextSequenceValue()
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 31 Aug 2017 00:27:51 +0000 (20:27 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Thu, 31 Aug 2017 15:16:26 +0000 (11:16 -0400)
commit0a9c55bfd39e22828f2d152ab71789cef3b0897c
tree5b4a81e46cf4e7eba35e81f0e3ed25e152e52bcb
parent3927a99e8513018ed2240276dae5388a62fa95d3
Deprecate IDatabase::nextSequenceValue()

It's often forgotten because MySQL and Sqlite don't use it, the only
users are PostgreSQL and Oracle. And when used, if inserts to multiple
tables are being done it's easy to get the ordering wrong.

This patch reimplements DatabasePostgres::insertId() in terms of PG's
lastval() function, and adds triggers to the Oracle schema to make it
work the same as the other databases.

Bug: T164900
Change-Id: Ib308190c52673a9266c8495a589ae644f9fbefce
RELEASE-NOTES-1.30
autoload.php
includes/db/DatabaseOracle.php
includes/installer/OracleUpdater.php
includes/libs/rdbms/database/DatabasePostgres.php
includes/libs/rdbms/database/IDatabase.php
includes/libs/rdbms/database/utils/NextSequenceValue.php [new file with mode: 0644]
maintenance/oracle/archives/patch-auto_increment_triggers.sql [new file with mode: 0644]
maintenance/oracle/tables.sql