This relates to a previous question.

What is the proper way to include $wgDBprefix in the sql or hook function so that when tables are created or updated on LoadExtensionSchemaUpdates, the created table names start with the value of $wgDBprefix ?

1 Answer 1


In the SQL code, /*_*/ will be replaced with the prefix. For the table name parameter passed to the hook function, replacement will be handled automatically (but that is only used to determine whether the patchfile needs to be executed).

I've updated the patchfile documentation a bit, you can find further details there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.