block_instances

0 rows


Description

This table stores block instances. The type of block this is

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id BIGINT 19 null
block_positions.blockinstanceid blocposi_blo2_fkR
blockname VARCHAR 40
block.name block_instances_erd_block_nameR

The type of block this is. Foreign key, references block.name.

parentcontextid BIGINT 19 null
context.id blocinst_par2_fkR

The context within which this block appears. Foreign key, references context.id.

showinsubcontexts SMALLINT 5 null

If 1, this block appears on all matching pages in subcontexts of parentcontextid, as well in pages belonging to parentcontextid.

requiredbytheme SMALLINT 5 0

If 1, this block was created because it was required by the theme and did not exist.

pagetypepattern VARCHAR 64

The types of page this block appears on. Either an exact page type like mod-quiz-view, or a pattern like mod-quiz-* or course-view-. Note that course-view- will match course-view.

subpagepattern VARCHAR 16 null

Further restrictions on where this block appears. In some places, e.g. during a quiz or lesson attempt, different pages have different subpage ids. If this field is not null, the block only appears on that particular subpage.

defaultregion VARCHAR 16

Which block region this block should appear in on each page, in the absence of a specific position in the block_positions table.

defaultweight BIGINT 19 null

Used to order the blocks within a block region. Again, may be overridden by the block_positions table for a specific page where this block appears.

configdata LONGTEXT 2147483647 null

A serialized blob of configuration data for this block instance.

timecreated BIGINT 19 null

Time at which this block instance was originally created

timemodified BIGINT 19 null

Time at which block instance was last modified.

Indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
blocinst_par2_ix Performance Asc parentcontextid
blocinst_parshopagsub2_ix Performance Asc/Asc/Asc/Asc parentcontextid + showinsubcontexts + pagetypepattern + subpagepattern
blocinst_tim2_ix Performance Asc timemodified
block_instances_erd_block_name Performance Asc blockname

Relationships