Skip to content

Commit

Permalink
limits the length of debates.title to 80 in the db
Browse files Browse the repository at this point in the history
  • Loading branch information
kikito committed Aug 6, 2015
1 parent ca575a6 commit 6b58fd6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions db/migrate/20150806111435_change_debates_title_length.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class ChangeDebatesTitleLength < ActiveRecord::Migration
def change
change_column :debates, :title, :string, limit: 80
end
end
8 changes: 4 additions & 4 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20150731110702) do
ActiveRecord::Schema.define(version: 20150806111435) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand All @@ -34,11 +34,11 @@
add_index "comments", ["user_id"], name: "index_comments_on_user_id", using: :btree

create_table "debates", force: :cascade do |t|
t.string "title"
t.string "title", limit: 80
t.text "description"
t.integer "author_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

create_table "taggings", force: :cascade do |t|
Expand Down

0 comments on commit 6b58fd6

Please sign in to comment.