Closed
Description
Our current SQL database schema is distributed across multiple SQL migration scripts. This structure complicates understanding the entire schema, as it requires examining multiple migration scripts individually.
To simplify this, we should generate a complete database schema as a single SQL file and place it in the docs
directory for easier reference. Additionally, similar to our test vectors, this schema SQL file should be autogenerated and checked for determinism as part of our Continuous Integration (CI) process.
Tasks:
- Use SQLite to dump the database schema from a fully migrated database.
- Save the dumped schema as a SQL file in the
docs
directory. - Integrate the schema generation process into CI:
- Autogenerate the schema during the CI build process.
- Implement checks to ensure the schema dump is deterministic.
Command to use:
sqlite3 <database_file> .schema > docs/database_schema.sql
Note:
- Ensure that the schema reflects the fully migrated state of the database.
- Implement the CI checks to ensure any changes to the schema are intentional and deterministic.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
✅ Done