Manual:DatabaseUpdater.php/en

DatabaseUpdater is the class for handling database updates (e.g. adding, modifying, and dropping database tables, fields, and indexes). ,, and extend this class, and all five of those files (as well as the  files for the various database types) potentially need to be revised when a core schema change is made. Extensions usually change the schema by means of hook functions. Either way, SQL patch file(s) need to be created.