pgtrigger 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +72 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/pgtrigger/active_record/migration.rb +42 -0
- data/lib/pgtrigger/active_record/schema_dumper.rb +83 -0
- data/lib/pgtrigger/version.rb +3 -0
- data/lib/pgtrigger.rb +11 -0
- data/pgtrigger.gemspec +27 -0
- metadata +101 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9c03dcc06ecfb7b4b31108b9e980f7fd9b24b1e0
|
4
|
+
data.tar.gz: 675b4af5a537c2d3b2b2722ae54ac41ae69ac441
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5eb59a4784cc1df1ea7e740bbf67884f2165c1ed0ad63703ffda433a024504633bdb0f9e235b12800d566b213ef2a6d65d17a7a7710528992e1dc52e89ae3870
|
7
|
+
data.tar.gz: 8bfac53dd79dbda5c5feda8e265229c08ceb22b6634e9de8a75c6cc7f9bc48110ed43167f0b8959a7cfcd356cadc327bfcf17a204c2b405a70771e85709b5717
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at andreluis88@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 André Alencar
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
# Pgtrigger
|
2
|
+
|
3
|
+
Create trigger for postgres using ActiveRecord migration
|
4
|
+
|
5
|
+
TODO:
|
6
|
+
- Create tests
|
7
|
+
- Create reversible method for create_trigger
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
gem 'pgtrigger'
|
14
|
+
```
|
15
|
+
|
16
|
+
And then execute:
|
17
|
+
|
18
|
+
$ bundle
|
19
|
+
|
20
|
+
Or install it yourself as:
|
21
|
+
|
22
|
+
$ gem install pgtrigger
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
|
26
|
+
Create a migration like this
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
class AddTriggerToSomeTable < ActiveRecord::Migration[5.1]
|
30
|
+
def up
|
31
|
+
create_trigger(:table_name, :increase_order, before: [:insert]) do
|
32
|
+
<<-TRIGGERSQL
|
33
|
+
NEW."order" = (
|
34
|
+
SELECT COALESCE(MAX("order"), 0) +1
|
35
|
+
FROM table_name
|
36
|
+
);
|
37
|
+
|
38
|
+
RETURN NEW;
|
39
|
+
TRIGGERSQL
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def down
|
44
|
+
remove_trigger(:tabloid_section_products, :increase_order)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
```
|
48
|
+
|
49
|
+
The create_trigger method, the first and second parameters are about table and name of trigger respectively.
|
50
|
+
The third params can be hashes ```before:``` or ```after:```, passing string or array to indicate what event this trigger it will be executed.
|
51
|
+
|
52
|
+
Yet is necessary to specify the down method, otherwise the trigger cannot be removed when execute migration rollback.
|
53
|
+
|
54
|
+
## Development
|
55
|
+
|
56
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
57
|
+
|
58
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
59
|
+
|
60
|
+
## Contributing
|
61
|
+
|
62
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/pgtrigger. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
63
|
+
|
64
|
+
I appreciate new collaborators for this project.
|
65
|
+
|
66
|
+
## License
|
67
|
+
|
68
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
69
|
+
|
70
|
+
## Code of Conduct
|
71
|
+
|
72
|
+
Everyone interacting in the Pgtrigger project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/alencarandre/pgtrigger/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "pgtrigger"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
module ActiveRecord
|
2
|
+
class Migration
|
3
|
+
def create_trigger(table_name, trigger_name, after: nil, before: nil)
|
4
|
+
raise "Not defined after or before for create_trigger" unless after || before
|
5
|
+
raise "Define only on after or before" if after && before
|
6
|
+
|
7
|
+
trigger_name = Pgtrigger::Utils.build_trigger_name(table_name, trigger_name)
|
8
|
+
|
9
|
+
execute(<<-TRIGGERSQL
|
10
|
+
CREATE OR REPLACE FUNCTION #{trigger_name}_func()
|
11
|
+
RETURNS trigger
|
12
|
+
LANGUAGE plpgsql
|
13
|
+
AS $function$
|
14
|
+
BEGIN
|
15
|
+
#{yield}
|
16
|
+
END;
|
17
|
+
$function$
|
18
|
+
TRIGGERSQL
|
19
|
+
)
|
20
|
+
|
21
|
+
after = after.join(" OR ") if ["Array"].include?(after.class.to_s)
|
22
|
+
after = "AFTER #{after}" if after
|
23
|
+
|
24
|
+
before = before.join(" OR ") if ["Array"].include?(before.class.to_s)
|
25
|
+
before = "BEFORE #{before}" if before
|
26
|
+
|
27
|
+
execute(<<-TRIGGERSQL
|
28
|
+
CREATE TRIGGER #{trigger_name}_trigger
|
29
|
+
#{after} #{before} ON #{table_name}
|
30
|
+
FOR EACH ROW EXECUTE PROCEDURE #{trigger_name}_func()
|
31
|
+
TRIGGERSQL
|
32
|
+
)
|
33
|
+
end
|
34
|
+
|
35
|
+
def remove_trigger(table_name, trigger_name = nil)
|
36
|
+
trigger_name = Pgtrigger::Utils.build_trigger_name(table_name, trigger_name)
|
37
|
+
|
38
|
+
execute("DROP TRIGGER IF EXISTS #{trigger_name}_trigger ON #{table_name};")
|
39
|
+
execute("DROP FUNCTION IF EXISTS #{trigger_name}_func();")
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
module ActiveRecord
|
2
|
+
module SchemaDumperSupport
|
3
|
+
def trailer(stream)
|
4
|
+
triggers = mount_trigger_schema.join("")
|
5
|
+
|
6
|
+
if triggers.present?
|
7
|
+
if(@dump.respond_to?(:final))
|
8
|
+
@dump.final << triggers
|
9
|
+
else
|
10
|
+
stream.puts triggers
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
super(stream)
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def mount_trigger_schema
|
20
|
+
triggers = []
|
21
|
+
|
22
|
+
discovery_triggers.each do |trigger|
|
23
|
+
table_name = trigger["event_object_table"]
|
24
|
+
trigger_name = trigger["trigger_name"].gsub("_#{table_name}_trigger", '')
|
25
|
+
|
26
|
+
after_or_before = "#{trigger['action_timing'].downcase}: \"#{trigger['event_manipulation']}\""
|
27
|
+
|
28
|
+
triggers << "\n"
|
29
|
+
triggers << "\tcreate_trigger \"#{table_name}\", \"#{trigger_name}\", #{after_or_before} do\n"
|
30
|
+
triggers << "<<-TRIGGERBODY\n"
|
31
|
+
triggers << parse_trigger_body(table_name, trigger_name)
|
32
|
+
triggers << "\nTRIGGERBODY\n"
|
33
|
+
triggers << "\tend # create_trigger"
|
34
|
+
triggers << "\n"
|
35
|
+
end
|
36
|
+
|
37
|
+
triggers
|
38
|
+
end
|
39
|
+
|
40
|
+
def discovery_triggers
|
41
|
+
sql = <<-DETECTTRIGGER
|
42
|
+
SELECT * FROM information_schema.triggers
|
43
|
+
WHERE trigger_schema = current_schema();
|
44
|
+
DETECTTRIGGER
|
45
|
+
result = @connection.execute(sql)
|
46
|
+
end
|
47
|
+
|
48
|
+
def parse_trigger_body(table_name, trigger_name)
|
49
|
+
procedure = discovery_trigger_method(table_name, trigger_name)
|
50
|
+
definition = procedure["definition"]
|
51
|
+
procedure_body = definition[definition.index("BEGIN")+5..definition.size]
|
52
|
+
procedure_body[0..procedure_body.rindex("END") -1].strip
|
53
|
+
end
|
54
|
+
|
55
|
+
def discovery_trigger_method(table_name, trigger_name)
|
56
|
+
sql = <<-DISCOVERYTRIGGERMETHOD
|
57
|
+
SELECT
|
58
|
+
n.nspname AS schema,
|
59
|
+
proname AS fname,
|
60
|
+
proargnames AS args,
|
61
|
+
t.typname AS return_type,
|
62
|
+
d.description,
|
63
|
+
pg_get_functiondef(p.oid) as definition
|
64
|
+
FROM pg_proc p
|
65
|
+
JOIN pg_type t
|
66
|
+
ON p.prorettype = t.oid
|
67
|
+
LEFT OUTER
|
68
|
+
JOIN pg_description d
|
69
|
+
ON p.oid = d.objoid
|
70
|
+
LEFT OUTER
|
71
|
+
JOIN pg_namespace n
|
72
|
+
ON n.oid = p.pronamespace
|
73
|
+
WHERE n.nspname = current_schema()
|
74
|
+
AND proname = '#{Pgtrigger::Utils.build_trigger_name(table_name, trigger_name)}_func'
|
75
|
+
DISCOVERYTRIGGERMETHOD
|
76
|
+
@connection.execute(sql).first
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
class SchemaDumper
|
81
|
+
prepend SchemaDumperSupport
|
82
|
+
end
|
83
|
+
end
|
data/lib/pgtrigger.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require "pgtrigger/version"
|
2
|
+
require "pgtrigger/active_record/migration"
|
3
|
+
require "pgtrigger/active_record/schema_dumper"
|
4
|
+
|
5
|
+
module Pgtrigger
|
6
|
+
class Utils
|
7
|
+
def self.build_trigger_name(table_name, trigger_name)
|
8
|
+
"#{trigger_name}_#{table_name}"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
data/pgtrigger.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "pgtrigger/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "pgtrigger"
|
8
|
+
spec.version = Pgtrigger::VERSION
|
9
|
+
spec.authors = ["André Alencar"]
|
10
|
+
spec.email = ["andreluis88@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = "Create Postgresql trigger with ActiveRecord Migration"
|
13
|
+
spec.description = "Create Postgresql trigger with ActiveRecord Migration"
|
14
|
+
spec.homepage = "https://github.com/alencarandre/pgtrigger"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.15"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: pgtrigger
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- André Alencar
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-12-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.15'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.15'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
description: Create Postgresql trigger with ActiveRecord Migration
|
56
|
+
email:
|
57
|
+
- andreluis88@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- ".rspec"
|
64
|
+
- ".travis.yml"
|
65
|
+
- CODE_OF_CONDUCT.md
|
66
|
+
- Gemfile
|
67
|
+
- LICENSE.txt
|
68
|
+
- README.md
|
69
|
+
- Rakefile
|
70
|
+
- bin/console
|
71
|
+
- bin/setup
|
72
|
+
- lib/pgtrigger.rb
|
73
|
+
- lib/pgtrigger/active_record/migration.rb
|
74
|
+
- lib/pgtrigger/active_record/schema_dumper.rb
|
75
|
+
- lib/pgtrigger/version.rb
|
76
|
+
- pgtrigger.gemspec
|
77
|
+
homepage: https://github.com/alencarandre/pgtrigger
|
78
|
+
licenses:
|
79
|
+
- MIT
|
80
|
+
metadata: {}
|
81
|
+
post_install_message:
|
82
|
+
rdoc_options: []
|
83
|
+
require_paths:
|
84
|
+
- lib
|
85
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
requirements: []
|
96
|
+
rubyforge_project:
|
97
|
+
rubygems_version: 2.6.14
|
98
|
+
signing_key:
|
99
|
+
specification_version: 4
|
100
|
+
summary: Create Postgresql trigger with ActiveRecord Migration
|
101
|
+
test_files: []
|