feat(db): lab_drafts, lab_draws, biomarkers tables

Refs PAI-91.
This commit is contained in:
marcuspaico
2026-08-17 15:17:37 -07:00
parent e3cfc6592e
commit bd4817cb77
5 changed files with 375 additions and 1 deletions

View File

@@ -0,0 +1,279 @@
{
"version": "6",
"dialect": "sqlite",
"id": "8d0cf0e5-668d-4526-a0cb-5a264d813be3",
"prevId": "383d7bd7-3ebf-456e-8c5c-f39cebab14c4",
"tables": {
"biomarkers": {
"name": "biomarkers",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"draw_id": {
"name": "draw_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"panel": {
"name": "panel",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"marker": {
"name": "marker",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"analyte_key": {
"name": "analyte_key",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"value": {
"name": "value",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"value_num": {
"name": "value_num",
"type": "real",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"unit": {
"name": "unit",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"reference_range": {
"name": "reference_range",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"flagged": {
"name": "flagged",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
},
"value_canonical": {
"name": "value_canonical",
"type": "real",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"canonical_unit": {
"name": "canonical_unit",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"lab_drafts": {
"name": "lab_drafts",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"filename": {
"name": "filename",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"file_path": {
"name": "file_path",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"extracted": {
"name": "extracted",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"error": {
"name": "error",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"lab_draws": {
"name": "lab_draws",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"collected_at": {
"name": "collected_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"lab_name": {
"name": "lab_name",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"draft_id": {
"name": "draft_id",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"sessions": {
"name": "sessions",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"expires_at": {
"name": "expires_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"settings": {
"name": "settings",
"columns": {
"key": {
"name": "key",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"value": {
"name": "value",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
}
},
"views": {},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
},
"internal": {
"indexes": {}
}
}