fixing conflicts [#9]

This commit is contained in:
rgarcia
2015-07-18 18:16:10 +02:00
30 changed files with 394 additions and 16 deletions

View File

@@ -0,0 +1,6 @@
class AddFirstNameAndLastNameToUsers < ActiveRecord::Migration
def change
add_column :users, :first_name, :string
add_column :users, :last_name, :string
end
end

View File

@@ -0,0 +1,25 @@
# This migration comes from acts_as_taggable_on_engine (originally 1)
class ActsAsTaggableOnMigration < ActiveRecord::Migration
def self.up
create_table :tags do |t|
t.string :name
end
create_table :taggings do |t|
t.references :tag
t.references :taggable, polymorphic: true
t.references :tagger, polymorphic: true
t.string :context, limit: 128
t.datetime :created_at
end
add_index :tags, :name, unique: true
add_index :taggings, :tag_id
add_index :taggings, [:taggable_id, :taggable_type, :context]
end
def self.down
drop_table :taggings
drop_table :tags
end
end

View File

@@ -0,0 +1,10 @@
# This migration comes from acts_as_taggable_on_engine (originally 3)
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration
def self.up
add_column :tags, :taggings_count, :integer, default: 0
end
def self.down
remove_column :tags, :taggings_count
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150717180105) do
ActiveRecord::Schema.define(version: 20150718075337) do
create_table "debates", force: :cascade do |t|
t.string "title"
@@ -21,6 +21,26 @@ ActiveRecord::Schema.define(version: 20150717180105) do
t.datetime "updated_at", null: false
end
create_table "taggings", force: :cascade do |t|
t.integer "tag_id"
t.integer "taggable_id"
t.string "taggable_type"
t.integer "tagger_id"
t.string "tagger_type"
t.string "context", limit: 128
t.datetime "created_at"
end
add_index "taggings", ["tag_id"], name: "index_taggings_on_tag_id"
add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
create_table "tags", force: :cascade do |t|
t.string "name"
t.integer "taggings_count", default: 0
end
add_index "tags", ["name"], name: "index_tags_on_name", unique: true
create_table "users", force: :cascade do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
@@ -34,6 +54,8 @@ ActiveRecord::Schema.define(version: 20150717180105) do
t.string "last_sign_in_ip"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "first_name"
t.string "last_name"
end
add_index "users", ["email"], name: "index_users_on_email", unique: true