Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2016-07-28 03:03:06 +0300
committerPatricio Cano <suprnova32@gmail.com>2016-08-15 21:17:58 +0300
commit95419679f23f0628d1885dd9656cc159e9d55ea9 (patch)
tree4ec924b2f7dfbfd9e0390065d430c9daff8984bb /db
parent640e485c6aa19f8fca1be7fc45e7f65da4469fbd (diff)
Lay the ground works to submit information to Akismet
- New concern `AkismetSubmittable` to allow issues and other `Spammable` models to be submitted to Akismet. - New model `UserAgentDetail` to store information needed for Akismet. - Services needed for their creation and tests.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160727163552_create_user_agent_details.rb12
-rw-r--r--db/schema.rb9
2 files changed, 21 insertions, 0 deletions
diff --git a/db/migrate/20160727163552_create_user_agent_details.rb b/db/migrate/20160727163552_create_user_agent_details.rb
new file mode 100644
index 00000000000..05c21a476fa
--- /dev/null
+++ b/db/migrate/20160727163552_create_user_agent_details.rb
@@ -0,0 +1,12 @@
+class CreateUserAgentDetails < ActiveRecord::Migration
+ def change
+ create_table :user_agent_details do |t|
+ t.string :user_agent, null: false
+ t.string :ip_address, null: false
+ t.integer :subject_id, null: false
+ t.string :subject_type, null: false
+
+ t.timestamps null: false
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index f008a6bd7a7..2e5ffac5935 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -999,6 +999,15 @@ ActiveRecord::Schema.define(version: 20160810142633) do
add_index "u2f_registrations", ["key_handle"], name: "index_u2f_registrations_on_key_handle", using: :btree
add_index "u2f_registrations", ["user_id"], name: "index_u2f_registrations_on_user_id", using: :btree
+ create_table "user_agent_details", force: :cascade do |t|
+ t.string "user_agent", null: false
+ t.string "ip_address", null: false
+ t.integer "subject_id", null: false
+ t.string "subject_type", null: false
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ end
+
create_table "users", force: :cascade do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false