jailtime | Create and manage chroot/jail environments | Continuous Deployment library
kandi X-RAY | jailtime Summary
kandi X-RAY | jailtime Summary
Create and manage chroot/jail environments
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- parseSpecLine parses a line from a specification line .
- File copies src to dest .
- ImportedLibraries returns a list of all dependencies in the given filename
- parseFromFile parses a file and returns a list of statements .
- ExpandLexical expands all statements in a directory .
- processCommandLine is the main entry point for the command line
- Parse ld config file
- updateChroot recursively updates the changes in chroot dir
- openMachO opens a Mach file for the given binary .
- Runs the spec file .
jailtime Key Features
jailtime Examples and Code Snippets
Community Discussions
Trending Discussions on jailtime
QUESTION
I want to add at row "jailtime" timestamp. That timestamp would be the timestamp of when "pjailed" row was updated.
I tried to do the fallowing:
https://dba.stackexchange.com/questions/45470/get-the-time-of-last-update-of-a-column
But instead of creating table, I wanted to alter existing table, so I went for
...ANSWER
Answered 2018-Sep-19 at 17:44If the value for pJailed
for a row is updated that whole row receives an update. So it would suffice to use ON UPDATE CURRENT_TIMESTAMP
(and DEFAULT CURRENT_TIMESTAMP
) on jailtime
.
You can alter the column jailtime
to reflect this using:
QUESTION
delimiter //
create trigger logsupdate before update on users
for each row
begin
if new.pJailed <> old.pJailed then
set new.jailtime = now();
if new.pVIP <> old.pVIP then
set new.TM2 = now();
if new.pAdminLevel <> old.pAdminLevel then
set new.TM3 = now();
end if;
end;//
delimiter ;
...ANSWER
Answered 2018-Sep-19 at 19:45You missed a couple of end if;
. Also, semicolon is not required in end;//
. I have also added a Drop Trigger If Exists
clause to avoid errors, in case a duplicate trigger with this name already exists.
Here is the corrected trigger (based on OP's comments):
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jailtime
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page