File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -27,15 +27,15 @@ CREATE TABLE memorials (
27
27
memorial_number INTEGER ,
28
28
first_name TEXT ,
29
29
last_name TEXT ,
30
- year_of_death INTEGER ,
30
+ year_of_death INTEGER CONSTRAINT valid_year CHECK (year_of_death IS NULL OR (year_of_death > 1500 AND year_of_death <= 2100 AND typeof(year_of_death) = ' integer ' )) ,
31
31
inscription TEXT ,
32
32
file_name TEXT NOT NULL ,
33
33
ai_provider TEXT ,
34
34
model_version TEXT ,
35
+ prompt_template TEXT ,
35
36
prompt_version TEXT ,
36
- processed_date DATETIME DEFAULT CURRENT_TIMESTAMP ,
37
- CONSTRAINT valid_year CHECK (year_of_death > 1500 AND year_of_death < strftime(' %Y' , ' now' , ' +1 year' ))
38
- )
37
+ processed_date DATETIME DEFAULT CURRENT_TIMESTAMP
38
+ );
39
39
40
40
-- Indexes for optimized queries
41
41
CREATE INDEX idx_memorial_number ON memorials(memorial_number);
@@ -45,9 +45,13 @@ CREATE INDEX idx_year ON memorials(year_of_death);
45
45
46
46
### Data Types and Constraints
47
47
- ` memorial_number ` : Integer for consistent numeric handling
48
- - ` year_of_death ` : Integer with validation (must be between 1500 and current year + 1 )
48
+ - ` year_of_death ` : Integer with validation (must be between 1500 and 2100, allows NULL )
49
49
- ` file_name ` : Required field (NOT NULL)
50
+ - ` ai_provider ` : Tracks which AI service was used (e.g., 'openai', 'anthropic')
51
+ - ` model_version ` : Records the specific model version used
52
+ - ` prompt_template ` : Stores the prompt template used for extraction
50
53
- ` prompt_version ` : Tracks the version of the prompt used for extraction
54
+ - ` processed_date ` : Timestamp of when the record was processed
51
55
- Optimized indexes for common search patterns
52
56
53
57
## How It Works
You can’t perform that action at this time.
0 commit comments