Skip to content

Empact/trackless_triggers

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

= Trigger Happy

Add triggers to your active record migrations.

== INSTALL

  script/plugin install svn://rubyforge.org/var/svn/artriggers/trunk/trigger_happy

== EXAMPLE

Add a trigger:

  add_trigger "ai_people",
    :on         => 'people',
    :timing     => 'after',
    :event      => 'insert',
    :statement  => 'INSERT INTO log (id, timestamp) VALUES (NEW.id, NOW())'

Update an existing trigger (drops then adds):

  update_trigger "ai_people",
    :on         => 'people',
    :timing     => 'after',
    :event      => 'insert',
    :statement  => 'INSERT INTO log (id, timestamp) VALUES (NEW.id, NOW())'

Remove a trigger:

  drop_trigger 'ai_people'

== LIMITATIONS

Only works with mysql for now.

About

A fork of Trigger Happy that packages it as a gem

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%