Change comments relation to use text data type for attribute text

This commit is contained in:
Ralf Teusner
2016-05-12 16:23:40 +02:00
parent a2a902796a
commit 7ec3443adf
2 changed files with 12 additions and 7 deletions

View File

@ -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

View File

@ -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"