about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-02-25 00:17:01 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-02-25 00:17:01 +0100
commit71fe24096c612996cb2a827c919a4c88ae1e3495 (patch)
treefb1deed15866b83f0ed1583c91bc4d6fcb432827 /db
parent42eeecba3f334227c10533a065e238f51f6dee4c (diff)
Adding a Mention model, test stubs
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160224223247_create_mentions.rb12
-rw-r--r--db/schema.rb11
2 files changed, 22 insertions, 1 deletions
diff --git a/db/migrate/20160224223247_create_mentions.rb b/db/migrate/20160224223247_create_mentions.rb
new file mode 100644
index 000000000..095f6b7d2
--- /dev/null
+++ b/db/migrate/20160224223247_create_mentions.rb
@@ -0,0 +1,12 @@
+class CreateMentions < ActiveRecord::Migration
+  def change
+    create_table :mentions do |t|
+      t.integer :account_id
+      t.integer :status_id
+
+      t.timestamps null: false
+    end
+
+    add_index :mentions, [:account_id, :status_id], unique: true
+  end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 28b382906..7eb560d96 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
 #
 # It's strongly recommended that you check this file into your version control system.
 
-ActiveRecord::Schema.define(version: 20160223171800) do
+ActiveRecord::Schema.define(version: 20160224223247) do
 
   # These are extensions that must be enabled in order to support this database
   enable_extension "plpgsql"
@@ -54,6 +54,15 @@ ActiveRecord::Schema.define(version: 20160223171800) do
 
   add_index "follows", ["account_id", "target_account_id"], name: "index_follows_on_account_id_and_target_account_id", unique: true, using: :btree
 
+  create_table "mentions", force: :cascade do |t|
+    t.integer  "account_id"
+    t.integer  "status_id"
+    t.datetime "created_at", null: false
+    t.datetime "updated_at", null: false
+  end
+
+  add_index "mentions", ["account_id", "status_id"], name: "index_mentions_on_account_id_and_status_id", unique: true, using: :btree
+
   create_table "statuses", force: :cascade do |t|
     t.string   "uri"
     t.integer  "account_id",                  null: false