Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293207

[META] Use events in Database Schema operations

$
0
0

Problem/Motivation

We could leverage more on the event system to manage database schema operations.

For example:

1. #3410312-12: Flood database backend ::isAllowed() should call ::ensureTableExists()

@mondrake

[...] I find on-the-fly table creation a rather bad approach. If we had the table created at installation, we wouldn’t have to care about this. On-the-fly table creation breaks transactions for DBs that do not support transactional DDL - not just the transaction where ensureTable is called, also any concurrent transaction from other sessions. [...]

@catch

[...] we've got a few more options now - for example services that need to create tables could subscribe to a module installed event and create the storage then [...]

2. #3410312-14: Flood database backend ::isAllowed() should call ::ensureTableExists()

@mondrake

[...] events would help in #3397622: Adding GIN and GIST indexes to PostgreSQL databases, to allow database drivers to decorate db objects specifications with db specific features [...]

Steps to reproduce

Proposed resolution

Remaining tasks

Discuss

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 293207

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>