diff --git a/db/migrate/20160512131539_change_comment_text_attribute_to_text_datatype.rb b/db/migrate/20160512131539_change_comment_text_attribute_to_text_datatype.rb new file mode 100644 index 00000000..cc039c6a --- /dev/null +++ b/db/migrate/20160512131539_change_comment_text_attribute_to_text_datatype.rb @@ -0,0 +1,10 @@ +class ChangeCommentTextAttributeToTextDatatype < ActiveRecord::Migration + def up + change_column :comments, :text, :text + end + def down + # This might cause trouble if you have strings longer + # than 255 characters. + change_column :comments, :text, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index bcf1a675..104a1469 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: 20160510145341) do +ActiveRecord::Schema.define(version: 20160512131539) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -31,7 +31,7 @@ ActiveRecord::Schema.define(version: 20160510145341) do t.string "user_type" t.integer "row" t.integer "column" - t.string "text" + t.text "text" t.datetime "created_at" t.datetime "updated_at" end @@ -92,8 +92,6 @@ ActiveRecord::Schema.define(version: 20160510145341) do t.boolean "allow_file_creation" end - add_index "exercises", ["execution_environment_id"], name: "test3", using: :btree - create_table "external_users", force: true do |t| t.integer "consumer_id" t.string "email" @@ -204,9 +202,6 @@ ActiveRecord::Schema.define(version: 20160510145341) do t.string "user_type" end - add_index "submissions", ["exercise_id"], name: "test1", where: "((user_type)::text = 'ExternalUser'::text)", using: :btree - add_index "submissions", ["exercise_id"], name: "test2", using: :btree - create_table "teams", force: true do |t| t.string "name" t.datetime "created_at"