Publier Globinours 1.0.0-rc.3
This commit is contained in:
parent
ea8c24d622
commit
9a2b4068da
325 changed files with 38230 additions and 20 deletions
12
migrations/020_animal_history.sql
Normal file
12
migrations/020_animal_history.sql
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
CREATE TABLE IF NOT EXISTS animal_history (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
animal_id INTEGER NOT NULL,
|
||||
action TEXT NOT NULL, -- created, updated, status_changed, note_added...
|
||||
field TEXT, -- name, status, etc (optionnel)
|
||||
old_value TEXT,
|
||||
new_value TEXT,
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
meta TEXT -- JSON léger optionnel (ex: {"route":"..."} )
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_animal_history_animal ON animal_history(animal_id, created_at DESC);
|
||||
Loading…
Add table
Add a link
Reference in a new issue