mirror of
https://github.com/grocy/grocy.git
synced 2025-09-29 19:12:24 +00:00
Add user-field-type "file" (#977)
* Add user-field-type "file" * Add userfield-type "picture" * Also limit image height on userfieldsform * Prevent empty userfields (cause warnings in tables after deleting a file) * Show files in dialogs Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
committed by
GitHub
parent
318db53818
commit
07beee93a9
16
migrations/0112.sql
Normal file
16
migrations/0112.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
DELETE FROM userfield_values
|
||||
WHERE IFNULL(value, '') = '';
|
||||
|
||||
CREATE TRIGGER prevent_empty_userfields_INS AFTER INSERT ON userfield_values
|
||||
BEGIN
|
||||
DELETE FROM userfield_values
|
||||
WHERE id = NEW.id
|
||||
AND IFNULL(value, '') = '';
|
||||
END;
|
||||
|
||||
CREATE TRIGGER prevent_empty_userfields_UPD2 AFTER UPDATE ON userfield_values
|
||||
BEGIN
|
||||
DELETE FROM userfield_values
|
||||
WHERE id = NEW.id
|
||||
AND IFNULL(value, '') = '';
|
||||
END;
|
Reference in New Issue
Block a user