feat: add image models
This commit is contained in:
parent
3568365c6f
commit
c10b9baa95
7 changed files with 95 additions and 2 deletions
1
migrations/2025-01-16-195902_images/down.sql
Normal file
1
migrations/2025-01-16-195902_images/down.sql
Normal file
|
|
@ -0,0 +1 @@
|
|||
drop table images;
|
||||
9
migrations/2025-01-16-195902_images/up.sql
Normal file
9
migrations/2025-01-16-195902_images/up.sql
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
create table images (
|
||||
id integer primary key not null,
|
||||
plant_id integer not null
|
||||
references plants (id)
|
||||
-- Keep entries in the database so the files can be removed later
|
||||
on delete set null,
|
||||
date_taken date not null,
|
||||
note text
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue