diff options
author | Ariejan de Vroom <ariejan@ariejan.net> | 2011-12-14 20:38:52 +0400 |
---|---|---|
committer | Ariejan de Vroom <ariejan@ariejan.net> | 2011-12-14 20:38:52 +0400 |
commit | edab46e9fa5f568b1423c0021e81d30453d7dc1e (patch) | |
tree | 8efba8b082a534e1a069f4566d55d6117951e6ba /db | |
parent | 56fc53e8d870b70ca66332daeb6da39ab0eb5ce7 (diff) |
Added web hooks functionality
This commit includes:
* Projects can have zero or more WebHooks.
* The PostReceive job will ask a project to execute any web hooks defined for that project.
* WebHook has a URL, we post Github-compatible JSON to that URL.
* Failure to execute a WebHook will be silently ignored.
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20111214091851_create_web_hooks.rb | 9 | ||||
-rw-r--r-- | db/schema.rb | 16 |
2 files changed, 24 insertions, 1 deletions
diff --git a/db/migrate/20111214091851_create_web_hooks.rb b/db/migrate/20111214091851_create_web_hooks.rb new file mode 100644 index 00000000000..c6ba89c10e1 --- /dev/null +++ b/db/migrate/20111214091851_create_web_hooks.rb @@ -0,0 +1,9 @@ +class CreateWebHooks < ActiveRecord::Migration + def change + create_table :web_hooks do |t| + t.string :url + t.integer :project_id + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 613b65cb2ad..1a31cd8f1f8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20111207211728) do +ActiveRecord::Schema.define(:version => 20111214091851) do create_table "issues", :force => true do |t| t.string "title" @@ -132,4 +132,18 @@ ActiveRecord::Schema.define(:version => 20111207211728) do t.integer "project_access", :default => 0, :null => false end + create_table "web_hook_urls", :force => true do |t| + t.string "url" + t.integer "project_id" + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "web_hooks", :force => true do |t| + t.string "url" + t.integer "project_id" + t.datetime "created_at" + t.datetime "updated_at" + end + end |