Ruby on rails 如何查看哪个属性导致此错误:值太长,无法更改类型字符(255)

Ruby on rails 如何查看哪个属性导致此错误:值太长,无法更改类型字符(255),ruby-on-rails,postgresql,rake,varchar,Ruby On Rails,Postgresql,Rake,Varchar,我正在尝试用heroku部署我的rails应用程序。我运行了heroku运行rakedb:migrate,效果很好。然后我试着运行heroku run rake db:seed,我得到了一个错误:值太长,无法改变类型字符(255) 我浏览了我的代码,我非常确定所有的字符串属性都少于255个字符。我如何看到哪个属性给了我错误 ~/collegeanswerz >> heroku run rake db:migrate Running `rake db:migrate` attache

我正在尝试用heroku部署我的rails应用程序。我运行了
heroku运行rakedb:migrate
,效果很好。然后我试着运行
heroku run rake db:seed
,我得到了一个错误:
值太长,无法改变类型字符(255)

我浏览了我的代码,我非常确定所有的字符串属性都少于255个字符。我如何看到哪个属性给了我错误

~/collegeanswerz >>  heroku run rake db:migrate
Running `rake db:migrate` attached to terminal... up, run.6374
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
Connecting to database specified by DATABASE_URL
Migrating to CreateColleges (20130529230046)
Migrating to AddDetailsToCollege (20130529231454)
Migrating to AddMoredetailsToCollege (20130530024157)
Migrating to AddAaaToCollege (20130530140803)
Migrating to AddBbbToCollege (20130530141312)
Migrating to AddCccToCollege (20130530142345)
Migrating to AddDddToCollege (20130530142537)
Migrating to AddNameToCollege (20130530145608)
Migrating to AddUrlToColleges (20130607205230)
Migrating to DeleteActFromColleges (20130608162648)
Migrating to AddActToColleges (20130608162707)
Migrating to RemoveActFromColleges (20130608162808)
Migrating to AddCostToColleges (20130608193301)
Migrating to AddLinksToColleges (20130608232148)
Migrating to AddScholToColleges (20130608232522)
Migrating to AddMapToColleges (20130609222024)
Migrating to AddHousingToColleges (20130609235838)
Migrating to AddFwToColleges (20130610003429)
Migrating to AddDormsToColleges (20130610145106)
Migrating to AddMajorsooToColleges (20130610154704)
Migrating to RemoveMajorsooFromColleges (20130610155336)
Migrating to AddMajorsoooToColleges (20130610155625)
Migrating to AddDormurlsToColleges (20130613023113)
~/collegeanswerz >>  heroku run rake db:seed
Running `rake db:seed` attached to terminal... up, run.6256
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
Connecting to database specified by DATABASE_URL
rake aborted!
PGError: ERROR:  value too long for type character varying(255)
: UPDATE "colleges" SET "url" = 'university-of-pittsburgh', "public" = 'Public', "years" = '4-year', "category" = 'National University', "calendar" = 'Semester', "location" = 'Pittsburgh, PA', "setting" = 'Large City (250-500k)', "retention" = 90, "graduation4" = 57, "graduation6" = 79, "degrees" = 'Certificate, Bachelors, Masters, Doctoral', "rotc" = 'Air Force, Army, Navy', "sat_submit" = 89, "act_submit" = 41, "sat_math_25" = 600, "sat_math_75" = 690, "sat_reading_25" = 570, "sat_reading_75" = 690, "sat_writing_25" = 560, "sat_writing_75" = 660, "sat_composite_25" = 1130, "sat_composite_75" = 1320, "act_math_25" = 25, "act_math_75" = 30, "act_reading_25" = 25, "act_reading_75" = 31, "act_writing_25" = 7, "act_writing_75" = 9, "act_composite_25" = 25, "act_composite_75" = 30, "acceptance_rate" = 58, "enrolled" = 32, "gpa375" = 71, "gpa35" = 15, "gpa325" = 8, "gpa3" = 4, "gpa25" = 2, "high_school_tenth" = 54, "high_school_quarter" = 86, "high_school_half" = 99, "sat_math_700" = 25, "sat_math_600" = 53, "sat_math_500" = 21, "sat_math_400" = 1, "sat_math_300" = 0, "sat_reading_700" = 24, "sat_reading_600" = 42, "sat_reading_500" = 32, "sat_reading_400" = 2, "sat_reading_300" = 0, "sat_writing_700" = 14, "sat_writing_600" = 45, "sat_writing_500" = 37, "sat_writing_400" = 4, "sat_writing_300" = 0, "act_composite_30" = 33, "act_composite_24" = 58, "act_composite_18" = 8, "act_composite_12" = 1, "act_math_30" = 40, "act_math_24" = 46, "act_math_18" = 13, "act_math_12" = 1, "act_reading_30" = 0, "act_reading_24" = 0, "act_reading_18" = 0, "act_reading_12" = 0, "very_important" = 'Academic GPA|Rigor of secondary school record|Standardized Test Scores', "considered" = 'Application Essay|Character/Personal Qualities|Class Rank|Extracurricular Activities|First Generation College Student|Geographical Residence|Level of Applicant''s Interest|Racial/Ethnic Status|Recommendations|State Residency|Talent/Ability|Volunteer Work|Work Experience', "student_faculty" = '14 to 1', "class_20" = 42, "class_49" = 39, "class_50" = 18, "majors" = 'business/marketing: 15%|social sciences: 14%|health professions: 11%|english: 10%|engineering: 9%|psychology: 8%|biology: 7%|history: 5%', "law" = 3, "business" = 1, "medical" = 4, "other_grad" = 28, "us_news_ranking" = 58, "top_25_grad" = 'Physical Therapy (3)|Speech-Language Pathology (8)|Library and Information Studies (10)|Social Work (11)|Medicine (15)|Education (24)', "requirements" = 'http://www.asundergrad.pitt.edu/requirements/gened.html', "majors_offered_link" = 'http://www.pitt.edu/academics/undergraduate', "ap_credit" = 'http://www.oafa.pitt.edu/pdf/CreditAPIBExam.pdf', "enrollment" = 18427, "graduate_enrollment" = 10339, "in_state" = 68, "out_of_state" = 32, "male" = 49, "female" = 51, "ethnicity" = 'white: 77%|hispanic/latino: 2%|asian: 8%|black: 5%|2 or more races: 3%|non-resident aliens: 3%|other: 2%', "frats" = 12, "sororities" = 10, "on_campus" = 45, "freshman_on_campus" = 97, "in_state_tuition" = 16590, "out_of_state_tuition" = 26280, "room_and_board" = 9870, "with_need_got_aid" = 68, "got_need_fully_met" = 7, "percent_need_met" = 59, "scholarships" = 41, "loans" = 59, "cost_30" = 17326, "cost_48" = 19950, "cost_75" = 23636, "cost_110" = 26410, "cost_111" = 26985, "scholarships_link" = 'http://www.oafa.pitt.edu/universityschlrs.aspx', "map" = '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=university+of+pittsburgh&amp;aq=&amp;sll=40.444261,-79.970448&amp;sspn=0.142165,0.251656&amp;ie=UTF8&amp;hq=university+of+pittsburgh&amp;t=m&amp;ll=40.443486,-79.958245&amp;spn=0.010798,0.021038&amp;output=embed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=university+of+pittsburgh&amp;aq=&amp;sll=40.431368,-79.9805&amp;sspn=0.142165,0.251656&amp;ie=UTF8&amp;hq=university+of+pittsburgh&amp;t=m&amp;ll=40.443486,-79.958245&amp;spn=0.010798,0.021038" style="color:#0000FF;text-align:left">View Larger Map</a></small>', "street_view" = '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=University+of+Pittsburgh,+4200+Fifth+Ave,+Pittsburgh,+PA&amp;aq=0&amp;oq=uni&amp;sll=40.444261,-79.970448&amp;sspn=0.142165,0.251656&amp;ie=UTF8&amp;hq=University+of+Pittsburgh,+4200+Fifth+Ave,+Pittsburgh,+PA&amp;ll=40.443486,-79.958245&amp;spn=0.010798,0.021038&amp;t=m&amp;layer=c&amp;cbll=40.441775,-79.956671&amp;panoid=BgWQKMiSI1fpwP7JUF16Vg&amp;cbp=12,45.25,,0,-3.34&amp;output=svembed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=University+of+Pittsburgh,+4200+Fifth+Ave,+Pittsburgh,+PA&amp;aq=0&amp;oq=uni&amp;sll=40.431368,-79.9805&amp;sspn=0.142165,0.251656&amp;ie=UTF8&amp;hq=University+of+Pittsburgh,+4200+Fifth+Ave,+Pittsburgh,+PA&amp;ll=40.443486,-79.958245&amp;spn=0.010798,0.021038&amp;t=m&amp;layer=c&amp;cbll=40.441775,-79.956671&amp;panoid=BgWQKMiSI1fpwP7JUF16Vg&amp;cbp=12,45.25,,0,-3.34" style="color:#0000FF;text-align:left">View Larger Map</a></small>', "housing" = '<iframe src="http://www.tour.pitt.edu/tour-categories/residence-halls" scrolling="no" height="820" width="900"></iframe>', "food" = '<div style="overflow: hidden; max-width: 1000px;"><iframe scrolling="no" src="http://www.pc.pitt.edu/dining/menus.php" style="margin-left: 0; height: 2000px; margin-top: -370px; margin-bottom: -375px; width: 750px;"></iframe></div>', "weather" = '<div style="overflow: hidden; max-width: 500px;"><iframe scrolling="no" src="http://www.weather.com/weather/wxclimatology/monthly/graph/USPA1290" style="margin-left: -40px; height: 1570px; margin-top: -490px; width: 500px;"></iframe></div>', "dorms" = 'Towers (fr.)|Sutherland (fr.)|Lothrop (fr.)|Nordenberg (fr.)|Holland (fr.)|Forbes (fr.; honors)|McCormick|Brackenridge|Amos|Bruce|Panther|Pennsylvania|Ruskin|Bouquet Gardens|Oakwood Apartments|Centre-Plaza Apartments|Forbes-Craig Apartments (honors)', "dorm_urls" = 'towers|sutherland|lothrop|nordenberg|holland|forbes|mccormick|brackenridge|amos|bruce|panther|pennsylvania|ruskin|bouquet-gardens|oakwood-apartments|centre-plaza-apartments|forbes-craig-apartments', "science_majors" = 'Actuarial Mathematics|Applied Mathematics|Bioinformatics|Biological Sciences|Chemistry|Computer Science|Ecology and Evolution|Environmental Geology|Environmental Studies|Geology|History and Philosophy of Science|Linguistics|Mathematics|Mathematics-Economics|Mathematics-Philosophy|Microbiology|Molecular Biology|Natural Sciences Area|Neuroscience|Physics|Physics and Astronomy|Scientific Computing|Statistics', "social_science_majors" = 'Economics|Economics–Statistics|History|Political Science|Politics-Philosophy|Psychology|Sociology|Urban Studies', "humanities_majors" = 'Africana Studies|Africana Studies–English|Anthropology|Chinese|Classics|English Literature|English Writing|Film Studies|French|German|History of Art & Architecture|Humanities Area|Italian|Italian Studies|Japanese|Liberal Studies|Music|Philosophy|Religious Studies|Russian|Slavic Studies|Spanish|Studio Arts|Theatre Arts', "business_majors" = 'Accounting|Finance|General Management|Global Management|Marketing', "engineering_majors" = 'Bioengineering|Chemical Engineering|Civil Engineering|Computer Engineering|Electrical Engineering|Engineering Physics|Industrial Engineering|Materials Science and Engineering|Mechanical Engineering', "professional_majors" = 'Administration of Justice|Applied Developmental Psychology|Architectural Studies|Athletic Training|Clinical Dietetics and Nutrition|Communication: Rhet & Comm|Communication Science|Dental Hygiene|Emergency Medicine|Health Information Management|Health Services|Health and Physical Activity|Information Science|Legal Studies|Media and Professional Communications|Nursing|Pharmacy|Public Service|Rehabilitation Science|Social Work', "updated_at" = '2013-06-22 14:26:19.324611' WHERE "colleges"."id" = 1
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1161:in `async_exec'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1161:in `exec_no_cache'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `block in exec_delete'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:670:in `exec_delete'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:96:in `update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/persistence.rb:359:in `update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/locking/optimistic.rb:68:in `update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/attribute_methods/dirty.rb:74:in `update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/timestamp.rb:71:in `update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/callbacks.rb:272:in `block in update'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:403:in `_run__1124092128366785760__update__948523398122619999__callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `__run_callback'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in `_run_update_callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in `run_callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/callbacks.rb:272:in `update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/persistence.rb:348:in `create_or_update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/callbacks.rb:264:in `block in create_or_update'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:403:in `_run__1124092128366785760__save__948523398122619999__callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `__run_callback'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in `run_callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/callbacks.rb:264:in `create_or_update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/persistence.rb:84:in `save'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/validations.rb:50:in `save'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/attribute_methods/dirty.rb:22:in `save'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:259:in `block (2 levels) in save'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:208:in `transaction'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:259:in `block in save'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:270:in `rollback_active_record_state!'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:258:in `save'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/persistence.rb:217:in `block in update_attributes'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:208:in `transaction'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/persistence.rb:215:in `update_attributes'
/app/db/seeds.rb:11:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `block in load'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:520:in `load_seed'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:347:in `block (2 levels) in <top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
Tasks: TOP => db:seed
(See full trace by running task with --trace)
~/collegeanswerz >>  
更新的架构:

ActiveRecord::Schema.define(:version => 20130613023113) do

  create_table "colleges", :force => true do |t|
    t.string   "public"
    t.string   "years"
    t.string   "category"
    t.string   "calendar"
    t.string   "location"
    t.string   "setting"
    t.integer  "retention"
    t.datetime "created_at",            :null => false
    t.datetime "updated_at",            :null => false
    t.integer  "graduation4"
    t.integer  "graduation6"
    t.string   "degrees"
    t.string   "rotc"
    t.integer  "sat_submit"
    t.integer  "act_submit"
    t.integer  "sat_math_25"
    t.integer  "sat_math_75"
    t.integer  "sat_reading_25"
    t.integer  "sat_reading_75"
    t.integer  "sat_writing_25"
    t.integer  "sat_writing_75"
    t.integer  "sat_composite_25"
    t.integer  "sat_composite_75"
    t.integer  "act_math_25"
    t.integer  "act_math_75"
    t.integer  "act_reading_25"
    t.integer  "act_reading_75"
    t.integer  "act_writing_75"
    t.integer  "act_composite_25"
    t.integer  "act_composite_75"
    t.integer  "acceptance_rate"
    t.integer  "enrolled"
    t.integer  "gpa375"
    t.integer  "gpa35"
    t.integer  "gpa325"
    t.integer  "gpa3"
    t.integer  "gpa25"
    t.integer  "high_school_tenth"
    t.integer  "high_school_quarter"
    t.integer  "high_school_half"
    t.integer  "sat_math_700"
    t.integer  "sat_math_600"
    t.integer  "sat_math_500"
    t.integer  "sat_math_400"
    t.integer  "sat_math_300"
    t.integer  "sat_reading_700"
    t.integer  "sat_reading_600"
    t.integer  "sat_reading_500"
    t.integer  "sat_reading_400"
    t.integer  "sat_reading_300"
    t.integer  "sat_writing_700"
    t.integer  "sat_writing_600"
    t.integer  "sat_writing_500"
    t.integer  "sat_writing_400"
    t.integer  "sat_writing_300"
    t.integer  "act_composite_30"
    t.integer  "act_composite_24"
    t.integer  "act_composite_18"
    t.integer  "act_composite_12"
    t.integer  "act_math_30"
    t.integer  "act_math_24"
    t.integer  "act_math_18"
    t.integer  "act_math_12"
    t.integer  "act_reading_30"
    t.integer  "act_reading_24"
    t.integer  "act_reading_18"
    t.integer  "act_reading_12"
    t.text     "very_important"
    t.text     "important"
    t.text     "considered"
    t.string   "student_faculty"
    t.integer  "class_20"
    t.integer  "class_49"
    t.integer  "class_50"
    t.text     "majors"
    t.integer  "law"
    t.integer  "business"
    t.integer  "medical"
    t.integer  "other_grad"
    t.integer  "us_news_ranking"
    t.text     "top_25_grad"
    t.integer  "enrollment"
    t.integer  "graduate_enrollment"
    t.integer  "in_state"
    t.integer  "out_of_state"
    t.integer  "male"
    t.integer  "female"
    t.text     "ethnicity"
    t.integer  "frats"
    t.integer  "sororities"
    t.integer  "on_campus"
    t.integer  "freshman_on_campus"
    t.integer  "in_state_tuition"
    t.integer  "out_of_state_tuition"
    t.integer  "room_and_board"
    t.integer  "with_need_got_aid"
    t.integer  "got_need_fully_met"
    t.integer  "percent_need_met"
    t.integer  "scholarships"
    t.integer  "loans"
    t.string   "name"
    t.string   "url"
    t.integer  "act_writing_25"
    t.integer  "cost_30"
    t.integer  "cost_48"
    t.integer  "cost_75"
    t.integer  "cost_110"
    t.integer  "cost_111"
    t.text     "requirements"
    t.text     "majors_offered"
    t.text     "ap_credit"
    t.text     "scholarships_link"
    t.text     "map"
    t.text     "street_view"
    t.text     "housing"
    t.text     "food"
    t.text     "weather"
    t.text     "dorms"
    t.text     "majors_offered_link"
    t.text     "science_majors"
    t.text     "social_science_majors"
    t.text     "humanities_majors"
    t.text     "business_majors"
    t.text     "engineering_majors"
    t.text     "professional_majors"
    t.text     "dorm_urls"
  end

end

“申请论文|性格/个人素质|班级排名|课外活动|第一代大学生|地理居住地|申请人兴趣水平|种族/民族地位|建议|国家居住|人才/能力|志愿工作|工作经历”


这个字符串是270个字符

你有PG管理员吗?您可以尝试在SQL提示符中运行它,在那里您可以逐行格式化它,并(希望)查看哪一行出错,或者剪切部分进行尝试

您还可以检查模式中标记为
text
的列是否不限于255个字符


您在迁移中是否将字符串更改为文本?如果是这样的话,限制可能实际上没有改变,除非您在迁移中特别输入了一个新的限制。

它不是一个字符串(我不认为)。将我的模式视为对我的问题的编辑。在我看来,这更像是一个电子表格,而不是一个数据库模式。我希望您的下一次“迁移”将使结构正常化至少达到3NF。我对rails是新手,对我的选项不太熟悉。我的想法是,我的网站为每个学院都有一个页面,我希望通过拥有一个学院视图并基于@college.attribute更改视图来保持代码的干燥。使用电子表格会更容易吗?如果是这样,我该如何使用电子表格?我没有下载PG admin,所以除非它是标准的,否则我没有它。我没有做任何事情来限制标记为text的列。这是否意味着它们不限于255个字符?如果没有,我如何检查?对有些东西以前是字符串,但我把它们改成了文本。我更改了模式本身和迁移。更改迁移之后,我还运行了
heroku运行rakedb:migrate
。这是我的问题吗?我能做些什么呢。您不应该更改模式,模式文件是为您生成的。删除文件,然后:2。您需要执行
rake db:migrate:redo VERSION=xxx
,其中xxx是更改文件的迁移号,这将向下运行
,向上运行
,除非使用
:redo
重新运行迁移,否则更改迁移不会执行任何操作(这也将重新生成模式文件,该文件将更准确地反映数据库).heroku运行rake db:migrate:redo
怎么样?所以我需要对所有版本执行
heroku运行rake db:migrate:redo VERSON=XXX
操作,除了对所有版本执行
rake db:migrate:redo VERSION=XXX
操作外,还需要对所有更改的版本执行
heroku运行rake db:reset,所有操作都正常!
ActiveRecord::Schema.define(:version => 20130613023113) do

  create_table "colleges", :force => true do |t|
    t.string   "public"
    t.string   "years"
    t.string   "category"
    t.string   "calendar"
    t.string   "location"
    t.string   "setting"
    t.integer  "retention"
    t.datetime "created_at",            :null => false
    t.datetime "updated_at",            :null => false
    t.integer  "graduation4"
    t.integer  "graduation6"
    t.string   "degrees"
    t.string   "rotc"
    t.integer  "sat_submit"
    t.integer  "act_submit"
    t.integer  "sat_math_25"
    t.integer  "sat_math_75"
    t.integer  "sat_reading_25"
    t.integer  "sat_reading_75"
    t.integer  "sat_writing_25"
    t.integer  "sat_writing_75"
    t.integer  "sat_composite_25"
    t.integer  "sat_composite_75"
    t.integer  "act_math_25"
    t.integer  "act_math_75"
    t.integer  "act_reading_25"
    t.integer  "act_reading_75"
    t.integer  "act_writing_75"
    t.integer  "act_composite_25"
    t.integer  "act_composite_75"
    t.integer  "acceptance_rate"
    t.integer  "enrolled"
    t.integer  "gpa375"
    t.integer  "gpa35"
    t.integer  "gpa325"
    t.integer  "gpa3"
    t.integer  "gpa25"
    t.integer  "high_school_tenth"
    t.integer  "high_school_quarter"
    t.integer  "high_school_half"
    t.integer  "sat_math_700"
    t.integer  "sat_math_600"
    t.integer  "sat_math_500"
    t.integer  "sat_math_400"
    t.integer  "sat_math_300"
    t.integer  "sat_reading_700"
    t.integer  "sat_reading_600"
    t.integer  "sat_reading_500"
    t.integer  "sat_reading_400"
    t.integer  "sat_reading_300"
    t.integer  "sat_writing_700"
    t.integer  "sat_writing_600"
    t.integer  "sat_writing_500"
    t.integer  "sat_writing_400"
    t.integer  "sat_writing_300"
    t.integer  "act_composite_30"
    t.integer  "act_composite_24"
    t.integer  "act_composite_18"
    t.integer  "act_composite_12"
    t.integer  "act_math_30"
    t.integer  "act_math_24"
    t.integer  "act_math_18"
    t.integer  "act_math_12"
    t.integer  "act_reading_30"
    t.integer  "act_reading_24"
    t.integer  "act_reading_18"
    t.integer  "act_reading_12"
    t.text     "very_important"
    t.text     "important"
    t.text     "considered"
    t.string   "student_faculty"
    t.integer  "class_20"
    t.integer  "class_49"
    t.integer  "class_50"
    t.text     "majors"
    t.integer  "law"
    t.integer  "business"
    t.integer  "medical"
    t.integer  "other_grad"
    t.integer  "us_news_ranking"
    t.text     "top_25_grad"
    t.integer  "enrollment"
    t.integer  "graduate_enrollment"
    t.integer  "in_state"
    t.integer  "out_of_state"
    t.integer  "male"
    t.integer  "female"
    t.text     "ethnicity"
    t.integer  "frats"
    t.integer  "sororities"
    t.integer  "on_campus"
    t.integer  "freshman_on_campus"
    t.integer  "in_state_tuition"
    t.integer  "out_of_state_tuition"
    t.integer  "room_and_board"
    t.integer  "with_need_got_aid"
    t.integer  "got_need_fully_met"
    t.integer  "percent_need_met"
    t.integer  "scholarships"
    t.integer  "loans"
    t.string   "name"
    t.string   "url"
    t.integer  "act_writing_25"
    t.integer  "cost_30"
    t.integer  "cost_48"
    t.integer  "cost_75"
    t.integer  "cost_110"
    t.integer  "cost_111"
    t.text     "requirements"
    t.text     "majors_offered"
    t.text     "ap_credit"
    t.text     "scholarships_link"
    t.text     "map"
    t.text     "street_view"
    t.text     "housing"
    t.text     "food"
    t.text     "weather"
    t.text     "dorms"
    t.text     "majors_offered_link"
    t.text     "science_majors"
    t.text     "social_science_majors"
    t.text     "humanities_majors"
    t.text     "business_majors"
    t.text     "engineering_majors"
    t.text     "professional_majors"
    t.text     "dorm_urls"
  end

end