diff --git a/app/views/test/index.html.erb b/app/views/test/index.html.erb
index 17c7089d1..de889b15b 100644
--- a/app/views/test/index.html.erb
+++ b/app/views/test/index.html.erb
@@ -1,12 +1,12 @@
test
-<% users = User.all%>
+<% user = User.find(1)%>
id | name | C | I | S | filecount | issuecount | level | attachconut |
-<% users.each do |user| %>
+
@@ -22,7 +22,7 @@
<%= calculate_attachments(user) %> |
-<% end %>
+
diff --git a/db/migrate/20140505082635_drop_user_scores.rb b/db/migrate/20140505082635_drop_user_scores.rb
new file mode 100644
index 000000000..fc65788f2
--- /dev/null
+++ b/db/migrate/20140505082635_drop_user_scores.rb
@@ -0,0 +1,5 @@
+class DropUserScores < ActiveRecord::Migration
+ def change
+ drop_table :user_scores
+ end
+end
diff --git a/db/migrate/20140505083218_create_user_levels.rb b/db/migrate/20140505083218_create_user_levels.rb
new file mode 100644
index 000000000..f0e201212
--- /dev/null
+++ b/db/migrate/20140505083218_create_user_levels.rb
@@ -0,0 +1,8 @@
+class CreateUserLevels < ActiveRecord::Migration
+ def change
+ create_table :user_levels do |t|
+ t.integer :user_id
+ t.integer :level
+ end
+ end
+end
diff --git a/db/migrate/20140505083430_create_user_scores.rb b/db/migrate/20140505083430_create_user_scores.rb
new file mode 100644
index 000000000..6c63aa327
--- /dev/null
+++ b/db/migrate/20140505083430_create_user_scores.rb
@@ -0,0 +1,11 @@
+class CreateUserScores < ActiveRecord::Migration
+ def change
+ create_table :user_scores do |t|
+ t.integer :user_id
+ t.integer :collaboration
+ t.integer :influence
+ t.integer :skill
+ t.integer :activity
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index fe23a1caa..2dd0f1515 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20140428013546) do
+ActiveRecord::Schema.define(:version => 20140505083430) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -23,6 +23,15 @@ ActiveRecord::Schema.define(:version => 20140428013546) do
add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type"
add_index "activities", ["user_id"], :name => "index_activities_on_user_id"
+ create_table "apply_project_masters", :force => true do |t|
+ t.integer "user_id"
+ t.string "apply_type"
+ t.integer "apply_id"
+ t.integer "status"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
create_table "attachments", :force => true do |t|
t.integer "container_id"
t.string "container_type", :limit => 30
@@ -518,6 +527,14 @@ ActiveRecord::Schema.define(:version => 20140428013546) do
add_index "news", ["created_on"], :name => "index_news_on_created_on"
add_index "news", ["project_id"], :name => "news_project_id"
+ create_table "no_uses", :force => true do |t|
+ t.integer "user_id", :null => false
+ t.string "no_use_type"
+ t.integer "no_use_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
create_table "open_id_authentication_associations", :force => true do |t|
t.integer "issued"
t.integer "lifetime"
@@ -533,6 +550,19 @@ ActiveRecord::Schema.define(:version => 20140428013546) do
t.string "salt", :null => false
end
+ create_table "open_source_projects", :force => true do |t|
+ t.string "name"
+ t.text "description"
+ t.integer "commit_count", :default => 0
+ t.integer "code_line", :default => 0
+ t.integer "users_count", :default => 0
+ t.date "last_commit_time"
+ t.string "url"
+ t.date "date_collected"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
create_table "praise_tread_caches", :force => true do |t|
t.integer "object_id", :null => false
t.string "object_type"
@@ -612,6 +642,24 @@ ActiveRecord::Schema.define(:version => 20140428013546) do
add_index "queries", ["project_id"], :name => "index_queries_on_project_id"
add_index "queries", ["user_id"], :name => "index_queries_on_user_id"
+ create_table "relative_memos", :force => true do |t|
+ t.integer "osp_id", :null => false
+ t.integer "parent_id"
+ t.string "subject", :null => false
+ t.text "content", :null => false
+ t.integer "author_id"
+ t.integer "replies_count", :default => 0
+ t.integer "last_reply_id"
+ t.boolean "lock", :default => false
+ t.boolean "sticky", :default => false
+ t.boolean "is_quote", :default => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.integer "viewed_count_crawl", :default => 0
+ t.integer "viewed_count_local", :default => 0
+ t.string "url"
+ end
+
create_table "repositories", :force => true do |t|
t.integer "project_id", :default => 0, :null => false
t.string "url", :default => "", :null => false
@@ -810,6 +858,11 @@ ActiveRecord::Schema.define(:version => 20140428013546) do
add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id"
add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id"
+ create_table "user_levels", :force => true do |t|
+ t.integer "user_id"
+ t.integer "level"
+ end
+
create_table "user_preferences", :force => true do |t|
t.integer "user_id", :default => 0, :null => false
t.text "others"
@@ -820,16 +873,11 @@ ActiveRecord::Schema.define(:version => 20140428013546) do
add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id"
create_table "user_scores", :force => true do |t|
- t.integer "user_id", :null => false
- t.integer "collaboration"
- t.integer "influence"
- t.integer "skill"
- t.integer "active"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- t.integer "level"
- t.integer "file"
- t.integer "issue"
+ t.integer "user_id"
+ t.integer "collaboration"
+ t.integer "influence"
+ t.integer "skill"
+ t.integer "activity"
end
create_table "user_statuses", :force => true do |t|