Auto-generated from schema-map-postgres.yaml (map@sha1:260cf51de6e2c742030665b35b370cdae36de2c6). Do not edit manually. Targets: PHP 8.3; MySQL 8.x / MariaDB 10.4; Postgres 15+.
✅ No engine drift detected
Schema snapshot Map: schema-map-postgres.yaml · Docs: docs/definitions.md · Drift warnings: 0 Lineage: 2 outbound / 0 inbound · ✅ No engine drift detected · Index coverage: ready · PII flags: 2 · Changelog: fresh
| What | Link | Notes |
|---|---|---|
| Schema map | schema-map-postgres.yaml | Source for table metadata |
| Pkg folder | packages/notifications | Repo location |
| Definitions | docs/definitions.md | Column/index/FK docs |
| Engine differences | docs/definitions.md#engine-differences | Drift section in definitions |
| Changelog | CHANGELOG.md | Recent changes |
| Section | Purpose |
|---|---|
| Quick Links | Jump to definitions/changelog/tooling |
| At a Glance | Key counts (columns/indexes/views) |
| Summary | Compact status matrix for this package |
| Relationship Graph | FK lineage snapshot |
| Engine Matrix | MySQL/Postgres coverage |
| Engine Drift | Cross-engine diffs |
| Constraints Snapshot | Defaults/enums/checks |
| Compliance Notes | PII/secret hints |
| Schema Files | Scripts by engine |
| Views | View definitions |
| Seeds | Fixtures/smoke data |
| Usage | Runnable commands |
| Quality Gates | Readiness checklist |
| Regeneration | Rebuild docs/readme |
| Metric | Count |
|---|---|
| Columns | 22 |
| Indexes | 6 |
| Foreign keys | 4 |
| Unique keys | 0 |
| Outbound links (FK targets) | 2 |
| Inbound links (tables depending on this) | 0 |
| Views | 8 |
| Seeds | 0 |
| Drift warnings | 0 |
| PII flags | 2 |
| Item | Value |
|---|---|
| Table | notifications |
| Schema files | 11 |
| Views | 4 |
| Seeds | 0 |
| Docs | present |
| Changelog | present |
| Changelog freshness | fresh (threshold 45 d) |
| Lineage | outbound 2 / inbound 0 |
| Index coverage | ready |
| Engine targets | PHP 8.3; MySQL/MariaDB/Postgres |
⚡ Neon FK map below is parsed straight from docs/definitions.md for quick orientation.
graph LR
%% Neon lineage view (auto-parsed from docs/definitions.md)
classDef center fill:#0b1021,stroke:#ff6b6b,stroke-width:3px,color:#fefefe;
classDef link fill:#0a1f33,stroke:#64dfdf,stroke-width:2px,color:#e8f7ff;
classDef accent fill:#1d1b4c,stroke:#a855f7,stroke-width:2px,color:#f5e1ff;
classDef inbound fill:#0f172a,stroke:#10b981,stroke-width:2px,color:#e2fcef;
notifications["notifications"]:::center
notifications -->|FK| tenants["tenants"]:::link
notifications -->|FK| users["users"]:::accent
linkStyle 0 stroke:#ff6b6b,stroke-width:3px,opacity:0.92;
linkStyle 1 stroke:#64dfdf,stroke-width:3px,opacity:0.92;
- Outbound (depends on): "tenants", "users"
- Inbound (relies on this): none from defs
- Legend: central node = this table, teal/purple arrows = outbound FK targets, green arrows = inbound FK sources.
| Engine | Support |
|---|---|
| mysql | ✅ schema(5) ✅ views(2) |
| postgres | ✅ schema(5) ✅ views(2) |
No engine differences detected.
channel– enumstatus– default=pending, enumretries– default=0max_retries– default=6priority– default=0created_at– default=CURRENT_TIMESTAMP(6)updated_at– default=CURRENT_TIMESTAMP(6)version– default=0
| File | Engine |
|---|---|
| 001_table.mysql.sql | mysql |
| 001_table.postgres.sql | postgres |
| 020_indexes.mysql.sql | mysql |
| 020_indexes.postgres.sql | postgres |
| 030_foreign_keys.mysql.sql | mysql |
| 030_foreign_keys.postgres.sql | postgres |
| 040_views_joins.mysql.sql | mysql |
| 040_views_joins.postgres.sql | postgres |
| 040_views.mysql.sql | mysql |
| 040_views.postgres.sql | postgres |
| encryption-map.json |
| File | Engine | Source |
|---|---|---|
| 040_views_joins.mysql.sql | mysql | package |
| 040_views_joins.postgres.sql | postgres | package |
| 040_views.mysql.sql | mysql | package |
| 040_views.postgres.sql | postgres | package |
No seed files found.
⚠️ Potential PII/secret fields – review retention/encryption policies:
- channel (email)
- id (key)
# Install/upgrade schema
pwsh -NoLogo -NoProfile -File scripts/schema-tools/Migrate-DryRun.ps1 -Package notifications -Apply
# Split schema to packages
pwsh -NoLogo -NoProfile -File scripts/schema-tools/Split-SchemaToPackages.ps1
# Generate PHP DTO/Repo from schema
pwsh -NoLogo -NoProfile -File scripts/schema-tools/Generate-PhpFromSchema.ps1 -SchemaDir scripts/schema -TemplatesRoot scripts/templates/php -ModulesRoot packages -NameResolution detect -Force
# Validate SQL across packages
pwsh -NoLogo -NoProfile -File scripts/schema-tools/Lint-Sql.ps1 -PackagesDir packages- PHPUnit (full DB matrix):
BC_DB=mysql vendor/bin/phpunit --configuration tests/phpunit.xml.dist --testsuite "DB Integration"
BC_DB=postgres vendor/bin/phpunit --configuration tests/phpunit.xml.dist --testsuite "DB Integration"
BC_DB=mariadb vendor/bin/phpunit --configuration tests/phpunit.xml.dist --testsuite "DB Integration"- Definitions present
- Changelog present
- Changelog fresh
- Index coverage (PK + index)
- Outbound lineage captured
- Inbound lineage mapped
- ERD renderable (mermaid)
- Seeds available – add smoke data seeds
- Update schema map and split: Split-SchemaToPackages.ps1
- Regenerate PHP DTO/Repo: Generate-PhpFromSchema.ps1
- Rebuild definitions + README + docs index
- Ensure seeds/smoke data are present (if applicable)
- Lint SQL + run full PHPUnit DB matrix
# Rebuild definitions (docs/definitions.md)
pwsh -NoLogo -NoProfile -File scripts/schema-tools/Build-Definitions.ps1 -Force
# Regenerate package READMEs
pwsh -NoLogo -NoProfile -File scripts/docs/New-PackageReadmes.ps1 -Force
# Regenerate docs index
pwsh -NoLogo -NoProfile -File scripts/docs/New-DocsIndex.ps1 -Force
# Regenerate package changelogs
pwsh -NoLogo -NoProfile -File scripts/docs/New-PackageChangelogs.ps1 -Force⚖️ License: BlackCat Proprietary – detailed terms in LICENSE.