F-003 fix: Sanitize SQL dump for safe dev use
This commit is contained in:
@@ -7,7 +7,7 @@ The module also runs one batch worker that updates OpenCart product descriptions
|
||||
|
||||
Current raw source path was `project/new`.
|
||||
Target stable path is `project/web/index/new`.
|
||||
SQL dump target path is `project/sql/db-25052026.sql`.
|
||||
SQL baseline path is `project/sql/db-25052026.sql` and now contains sanitized synthetic development data.
|
||||
|
||||
## Main flows
|
||||
1. User opens product form.
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
# Component: Development data baseline
|
||||
|
||||
## Responsibility
|
||||
Provide one local SQL dump so maintainers can inspect schema and seed dev database.
|
||||
Provide one safe local SQL baseline so maintainers can seed a development database for the legacy PHP module.
|
||||
|
||||
## Interfaces
|
||||
- Input:
|
||||
- SQL import command run by maintainer
|
||||
- Output:
|
||||
- local MariaDB database with OpenCart and custom tables
|
||||
- local MariaDB database with the schema and synthetic seed data needed by the module
|
||||
|
||||
## Dependencies
|
||||
- `project/sql/db-25052026.sql`
|
||||
- `project/sql/README.md`
|
||||
- local MariaDB/MySQL server
|
||||
|
||||
## Limits
|
||||
- Dump may contain production-like data.
|
||||
- Dump is large.
|
||||
- Dump is not safe for public sharing without review.
|
||||
- Baseline is intentionally smaller than the former raw snapshot.
|
||||
- Baseline covers current module needs, not the full production dataset.
|
||||
- Private raw snapshots must stay outside git.
|
||||
|
||||
## Success criteria
|
||||
- [ ] Dump path is stable and explicit
|
||||
- [ ] Design docs call it dev baseline only
|
||||
- [ ] Move does not alter dump content
|
||||
- [ ] Tracked dump contains only safe synthetic or non-sensitive data
|
||||
- [ ] Docs explain private local dump handling
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# ADR-003: Replace raw SQL snapshot with sanitized dev baseline
|
||||
|
||||
## Status
|
||||
Accepted
|
||||
|
||||
## Context
|
||||
The tracked SQL file under `project/sql/db-25052026.sql` looked like a production snapshot.
|
||||
It exposed production-like and sensitive data in the working tree.
|
||||
The legacy PHP module still needs a database baseline for local work.
|
||||
|
||||
## Decision
|
||||
Keep the same tracked SQL path but replace its content with a sanitized development baseline.
|
||||
The new baseline contains only the schema and synthetic seed data needed by the legacy PHP module.
|
||||
Document how to keep any private raw dump outside git.
|
||||
|
||||
## Consequences
|
||||
- Good:
|
||||
- active repo tree stops shipping raw sensitive SQL data
|
||||
- local setup remains possible with a smaller safe dataset
|
||||
- module development gets a focused baseline for current pages and worker
|
||||
- Bad:
|
||||
- baseline no longer mirrors the full production dataset
|
||||
- some future work may need extra synthetic fixtures
|
||||
|
||||
## Alternatives considered
|
||||
1. Keep raw dump and add warning only - rejected because data risk remains in tracked files.
|
||||
2. Remove all SQL baseline files - rejected because local development would become harder.
|
||||
3. Rewrite full git history now - rejected because scope is too large for this feature.
|
||||
|
||||
## Date
|
||||
2026-05-25
|
||||
Reference in New Issue
Block a user