Description:
[web] forgot migration
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@182 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r95:72b799598587 - - 1 file changed: 15 inserted, 0 deleted
@@ -0,0 +1,15 | |||
|
1 | + class AddTestAllowedToProblems < ActiveRecord::Migration | |
|
2 | + def self.up | |
|
3 | + add_column :problems, :test_allowed, :boolean | |
|
4 | + Problem.reset_column_information | |
|
5 | + | |
|
6 | + Problem.find(:all).each do |problem| | |
|
7 | + problem.test_allowed = true | |
|
8 | + problem.save | |
|
9 | + end | |
|
10 | + end | |
|
11 | + | |
|
12 | + def self.down | |
|
13 | + remove_column :problems, :test_allowed | |
|
14 | + end | |
|
15 | + end |
You need to be logged in to leave comments.
Login now