Empact-trackless_triggers 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/Empact-trackless_triggers.gemspec +1 -1
- data/VERSION +1 -1
- data/lib/trackless_triggers.rb +3 -3
- metadata +3 -3
data/CHANGELOG
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{Empact-trackless_triggers}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Aaron Patterson", "Christian Eager"]
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/trackless_triggers.rb
CHANGED
@@ -40,7 +40,7 @@ module ActiveRecord
|
|
40
40
|
|
41
41
|
module SchemaStatements
|
42
42
|
def update_trigger(name, opts = {})
|
43
|
-
drop_trigger(name)
|
43
|
+
drop_trigger(name, opts)
|
44
44
|
add_trigger(name, opts)
|
45
45
|
end
|
46
46
|
|
@@ -48,8 +48,8 @@ module ActiveRecord
|
|
48
48
|
execute "CREATE TRIGGER #{name} #{opts[:timing]} #{opts[:event]} ON #{opts[:on]} FOR EACH ROW #{opts[:statement]}"
|
49
49
|
end
|
50
50
|
|
51
|
-
def drop_trigger(name)
|
52
|
-
execute("DROP TRIGGER #{name}")
|
51
|
+
def drop_trigger(name, opts = {})
|
52
|
+
execute("DROP TRIGGER #{"IF EXISTS" if opts[:if_exists]} #{name}")
|
53
53
|
end
|
54
54
|
end
|
55
55
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Empact-trackless_triggers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Aaron Patterson
|