Skip to content

vaibs2987/mysql-trigger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

mysql-trigger

This is a bash script for generating update trigger for a table.

This script required the database name and table names as parameter.

Also update the username and password while using it.

For audit purpose I have created a table named audit.

create table audit(id bigint(20) NOT NULL AUTO_INCREMENT, note varchar(10), field varchar(100), orig_value varchar(100), new_value varchar(100), date datetime, PRIMARY KEY (id) ) ENGINE=InnoDB;

So this will have all the incremental changes ie past changes.

If you are adding a new column to a table then drop the previous trigger and create a new trigger.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages