9 lines
487 B
SQL
9 lines
487 B
SQL
ALTER TABLE animals ADD COLUMN archived_at TEXT;
|
|
ALTER TABLE animals ADD COLUMN deletion_reason TEXT;
|
|
|
|
-- L'ancien bouton « Archiver » utilisait deleted_at : on conserve donc ces fiches
|
|
-- comme archives et on libère la nouvelle corbeille.
|
|
UPDATE animals SET archived_at = deleted_at, deleted_at = NULL WHERE deleted_at IS NOT NULL;
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_animals_archived_at ON animals(archived_at);
|
|
CREATE INDEX IF NOT EXISTS idx_animals_deleted_at ON animals(deleted_at);
|