ReleaseTableCopies
Corex\Config\Releases\ReleaseTableCopies · class · Config layer
A copy of CoreX’s tables as they were, made before a release changes them (spec 107, FR-034, FR-044; plan D10). One copy of each table in the schema registry that exists on the site, named for the table and the minute it was made: wp_corex_activity_cxrel_202610111530. The name is the whole record, so nothing about a copy is kept in a folder a release replaces or a table it migrates. One set is kept: an installation discards the copies of the one before it. This is not a backup of the site. What is kept as posts and options (submissions, forms, settings) is not in it, and on a network it holds the tables of the site the Releases screen is on. A copy is for a person to read from; nothing here puts one back.
Public API
Section titled “Public API”__construct(ReleaseTableCopier $database, SchemaRegistry $schemas, SchemaMigrator $migrator, float $seconds)
Section titled “__construct(ReleaseTableCopier $database, SchemaRegistry $schemas, SchemaMigrator $migrator, float $seconds)”copy(int $cursor, DateTimeImmutable $at): array
Section titled “copy(int $cursor, DateTimeImmutable $at): array”Copy more of the tables, from the one given. At least one table is copied, however little time there is. From the first, the copies an earlier installation left are discarded.
kept(): array
Section titled “kept(): array”The copies there are, with when each was made and when it is removed.
discard(): void
Section titled “discard(): void”Remove every copy.
discardExpired(DateTimeImmutable $now): int
Section titled “discardExpired(DateTimeImmutable $now): int”Remove the copies that have been kept their time.