- Issue created by @nlisgo
- Merge request !4540Issue #3379255: Move hook_schema out of ban.install and create the table lazy β (Open) created by nlisgo
- last update
over 1 year ago 29,936 pass, 1 fail - Issue was unassigned.
- Status changed to Needs review
over 1 year ago 10:43am 4 August 2023 - π¬π§United Kingdom nlisgo
Let's see what CI picks up.
I drew inspiration from this issue patch: #2338747: Move {router} out of system.install and create the table lazy β
- Status changed to Needs work
over 1 year ago 12:06pm 4 August 2023 - π¬π§United Kingdom nlisgo
The ban_ip table is being created when the ban module is installed but it is not being deleted when it is being uninstalled. I can't find a module which uses this approach to know how to hook this up correctly.
- π¬π§United Kingdom nlisgo
Update from @catch on slack:
You can drop the tables on uninstall. In ModuleInstaller, it calls removeBin when a module providing a cache bin is uninstalled, and the database backend drops the table in ::removeBin()
- First commit to issue fork.
- πΊπΈUnited States nicxvan
I rebased this, I also added the uninstall hook to remove the db too.
- πΊπΈUnited States smustgrave
Can the issue summary be complete with full template please.
Seems almost like an API change and since the tests broke and had to be updated possible cold break contrib tests now too.
- πΊπΈUnited States nicxvan
There is a question on the parent issue that I think needs resolving first actually.
For future self when updating IS.
I don't think this is an api change, the test failed cause previously it called install schema, which we no longer need to do because this creates the table on the fly.The issue is the test called db connection directly to check for existence, but since install schema no longer is called the table doesn't exist.
All I did was add a call that would trigger the db table creation which is performs the same function as the schema call used to serve.