Add trigger to update CURRENT_TIMESTAMP to local time upon insert to Attendance table
This commit is contained in:
parent
6f2a63af4f
commit
2cce2560a6
BIN
GreatHome.db
BIN
GreatHome.db
Binary file not shown.
|
@ -36,3 +36,10 @@ CREATE TABLE "Authorized_Guardians" (
|
|||
FOREIGN KEY("child_id") REFERENCES "Children"("id"),
|
||||
FOREIGN KEY("guardian_id") REFERENCES "Guardians"("id")
|
||||
);
|
||||
|
||||
CREATE TRIGGER trgUpdateTimestampToLocal AFTER INSERT ON Attendence
|
||||
BEGIN
|
||||
UPDATE Attendence
|
||||
SET timestamp = datetime(timestamp, 'localtime')
|
||||
WHERE id = new.id;
|
||||
END;
|
||||
|
|
Loading…
Reference in New Issue