In database, the column "grade_entry_items.out_of" should be a float
Updated 5 months ago
| Bryan Shen | Reviewers | ||
| markus_developers | |||
| None | MarkUs Source Code Repository | ||
When Markus is hosted with Postgres, an instructor was not able to open the grade entries view because the the out_of was a string in database.
Manual
Posted 5 months, 1 week ago (February 22nd, 2010, 12:47 p.m.)
-
trunk/db/migrate/20100219213659_turn_out_of_into_float.rb (Diff revision 1) -
Hm. At least for me on Sqlite3, this throws the following error: SQLite3::SQLException: Cannot add a NOT NULL column with default value NULL: ALTER TABLE "grade_entry_items" ADD "out_of" float NOT NULL I think you'll either need to provide a default value (0.0, for example), or let NULL be allowed. I've been bitten a few times by default values written into the database...I'd go with the latter, and let NULLs in - ActiveRecord will ensure that no NULLs are entered with validates_presence_of. I'm open to argument on this.
Review request changed
Updated 5 months ago (February 24th, 2010, 3:07 a.m.)
-
- added Diff r2
