0
0
Fork 0

Adding hashtags

This commit is contained in:
Eugen Rochko 2016-11-05 15:20:05 +01:00
parent 62292797ec
commit 48b9619439
33 changed files with 305 additions and 62 deletions

View file

@ -0,0 +1,8 @@
class CreateStatusesTagsJoinTable < ActiveRecord::Migration[5.0]
def change
create_join_table :statuses, :tags do |t|
t.index :tag_id
t.index [:tag_id, :status_id], unique: true
end
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20161104173623) do
ActiveRecord::Schema.define(version: 20161105130633) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -160,6 +160,13 @@ ActiveRecord::Schema.define(version: 20161104173623) do
t.index ["uri"], name: "index_statuses_on_uri", unique: true, using: :btree
end
create_table "statuses_tags", id: false, force: :cascade do |t|
t.integer "status_id", null: false
t.integer "tag_id", null: false
t.index ["tag_id", "status_id"], name: "index_statuses_tags_on_tag_id_and_status_id", unique: true, using: :btree
t.index ["tag_id"], name: "index_statuses_tags_on_tag_id", using: :btree
end
create_table "stream_entries", force: :cascade do |t|
t.integer "account_id"
t.integer "activity_id"