pub fn init_schema(
path: &Path,
schema_ddl: &str,
expected_version: u32,
) -> Result<Connection>Expand description
Initialize a SQLite database with WAL mode, foreign keys, and a custom schema.
Creates parent directories if needed. Applies standard PRAGMAs for safety and performance. Runs the provided DDL to create tables, then validates the schema version matches expectations.