Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Inspecting the hook_schema() in the file patterns.install in order to have an overview of how patterns are stored in the database can be a good starting point.
Patterns are stored in a serialized array whose field is called "pattern". They have an unique serial identifier (field "pid"), and a set of metadata to indicate the state of the pattern ("status", "public", "updated", etc.), dates when was enabled or last updated, etc.
The purpose of this document is offering a starting point for contributors and developers to understand patterns code. The tour's aim is to provide an outer to inner overview, in a similar way we do while debugging the code.