Description:
MERGE changeset 306:307 from branch ytopc08-2 that fixes migration bug
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@308 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
r161:edaacd4ec8e9 - - 4 files changed: 13 inserted, 1 deleted
@@ -9,6 +9,9 | |||||
|
9 |
|
9 | ||
|
10 | class << root |
|
10 | class << root |
|
11 | public :encrypt_new_password |
|
11 | public :encrypt_new_password |
|
|
12 | + def valid? | ||
|
|
13 | + true | ||
|
|
14 | + end | ||
|
12 | end |
|
15 | end |
|
13 |
|
16 | ||
|
14 | root.encrypt_new_password |
|
17 | root.encrypt_new_password |
@@ -8,6 +8,13 | |||||
|
8 | User.reset_column_information |
|
8 | User.reset_column_information |
|
9 |
|
9 | ||
|
10 | User.find(:all).each do |user| |
|
10 | User.find(:all).each do |user| |
|
|
11 | + | ||
|
|
12 | + class << user | ||
|
|
13 | + def valid? | ||
|
|
14 | + true | ||
|
|
15 | + end | ||
|
|
16 | + end | ||
|
|
17 | + | ||
|
11 | user.site_id = default_site.id |
|
18 | user.site_id = default_site.id |
|
12 | user.save |
|
19 | user.save |
|
13 | end |
|
20 | end |
@@ -6,6 +6,6 | |||||
|
6 |
|
6 | ||
|
7 | def self.down |
|
7 | def self.down |
|
8 | remove_column :submissions, :source_filename |
|
8 | remove_column :submissions, :source_filename |
|
9 |
- |
|
9 | + remove_column :problems, :output_only |
|
10 | end |
|
10 | end |
|
11 | end |
|
11 | end |
@@ -2,6 +2,8 | |||||
|
2 | def self.up |
|
2 | def self.up |
|
3 | add_column :users, :activated, :boolean, :default => 0 |
|
3 | add_column :users, :activated, :boolean, :default => 0 |
|
4 |
|
4 | ||
|
|
5 | + User.reset_column_information | ||
|
|
6 | + | ||
|
5 | User.find(:all).each do |user| |
|
7 | User.find(:all).each do |user| |
|
6 |
|
8 | ||
|
7 | # disable validation |
|
9 | # disable validation |
You need to be logged in to leave comments.
Login now