Sets the max length of tags to 40 chars in the db
This commit is contained in:
5
db/migrate/20150909153455_set_tag_name_limit.rb
Normal file
5
db/migrate/20150909153455_set_tag_name_limit.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class SetTagNameLimit < ActiveRecord::Migration
|
||||
def change
|
||||
change_column :tags, :name, :string, limit: 40
|
||||
end
|
||||
end
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20150909142534) do
|
||||
ActiveRecord::Schema.define(version: 20150909153455) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@@ -193,9 +193,9 @@ ActiveRecord::Schema.define(version: 20150909142534) do
|
||||
add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree
|
||||
|
||||
create_table "tags", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.integer "taggings_count", default: 0
|
||||
t.boolean "featured", default: false
|
||||
t.string "name", limit: 40
|
||||
t.integer "taggings_count", default: 0
|
||||
t.boolean "featured", default: false
|
||||
end
|
||||
|
||||
add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree
|
||||
|
||||
Reference in New Issue
Block a user