Please enable JavaScript to use RhodeCode Enterprise
r822:f42556ce3209 -
Sat, 15 Jan 2022 14:03:59 -
77 files changed: 120 inserted, 111 deleted
README.rdoc
¶
+12
-2
@@
-53,9
+53,19
53
53
1. You have to reboot since RVM change a lots of system.
54
54
2. If you are using GUI version of Ubuntu, be sure to have Gnome Terminal (or any other terminal you are using) perform login every time. This can be done by mark the check box "Run command as a login shell" in Gnome terminal or by adding --login to bash.
55
55
56
- === 3. Install necessary package
56
+ === 3. Install necessary package and nodejs
57
+
58
+ First, we install required package via apt.
59
+
60
+ cafe@grader:~$ sudo apt install libmysqlclient-dev default-jdk unzip php-cli apache2 dirmngr gnupg apache2-dev
57
61
58
- cafe@grader:~$ sudo apt install libmysqlclient-dev default-jdk unzip nodejs php-cli apache2 dirmngr gnupg apache2-dev
62
+ Since nodejs that comes with ubuntu 18.04 is very outdated, we need to install it manually. This follow the method outlined in https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-18-04 under *Installing Node.js with Apt Using a NodeSource PPA*
63
+
64
+ cd ~
65
+ curl -sL https://deb.nodesource.com/setup_17.x -o nodesource_setup.sh
66
+ sudo bash nodesource_setup.sh
67
+ sudo apt install nodejs
68
+
59
69
60
70
=== 4. Install cafe-grader
61
71
db/migrate/001_create_users.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateUsers < ActiveRecord :: Migration
1
+ class CreateUsers < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :users do | t |
3
+ create_table :users , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . column :login , :string , :limit => 10
5
5
t . column :full_name , :string
6
6
t . column :hashed_password , :string
db/migrate/002_create_problems.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateProblems < ActiveRecord :: Migration
1
+ class CreateProblems < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :problems do | t |
3
+ create_table :problems , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . column :name , :string , :limit => 30
5
5
t . column :full_name , :string
6
6
t . column :full_score , :integer
db/migrate/003_create_submissions.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateSubmissions < ActiveRecord :: Migration
1
+ class CreateSubmissions < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :submissions do | t |
3
+ create_table :submissions , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . column :user_id , :integer
5
5
t . column :problem_id , :integer
6
6
t . column :language_id , :integer
db/migrate/004_create_languages.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateLanguages < ActiveRecord :: Migration
1
+ class CreateLanguages < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :languages do | t |
3
+ create_table :languages , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . column :name , :string , :limit => 10
5
5
t . column :pretty_name , :string
6
6
end
db/migrate/005_add_index_to_submissions.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddIndexToSubmissions < ActiveRecord :: Migration
1
+ class AddIndexToSubmissions < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_index :submissions , [ :user_id , :problem_id ]
4
4
end
db/migrate/006_create_roles.rb
¶
+3
-3
@@
-1,10
+1,10
1
- class CreateRoles < ActiveRecord :: Migration
1
+ class CreateRoles < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :roles do | t |
3
+ create_table :roles , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . column 'name' , :string
5
5
end
6
6
7
- create_table :roles_users , :id => false do | t |
7
+ create_table :roles_users , :id => false , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
8
8
t . column 'role_id' , :integer
9
9
t . column 'user_id' , :integer
10
10
end
db/migrate/007_create_rights.rb
¶
+3
-3
@@
-1,12
+1,12
1
- class CreateRights < ActiveRecord :: Migration
1
+ class CreateRights < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :rights do | t |
3
+ create_table :rights , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . column 'name' , :string
5
5
t . column 'controller' , :string
6
6
t . column 'action' , :string
7
7
end
8
8
9
- create_table :rights_roles , :id => false do | t |
9
+ create_table :rights_roles , :id => false , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
10
10
t . column 'right_id' , :integer
11
11
t . column 'role_id' , :integer
12
12
end
db/migrate/008_create_tasks.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateTasks < ActiveRecord :: Migration
1
+ class CreateTasks < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :tasks do | t |
3
+ create_table :tasks , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . column 'submission_id' , :integer
5
5
t . column 'created_at' , :datetime
6
6
end
db/migrate/009_add_sessions.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class AddSessions < ActiveRecord :: Migration
1
+ class AddSessions < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :sessions do | t |
3
+ create_table :sessions , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . column :session_id , :string
5
5
t . column :data , :text
6
6
t . column :updated_at , :datetime
db/migrate/011_add_language_ext.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddLanguageExt < ActiveRecord :: Migration
1
+ class AddLanguageExt < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :languages , :ext , :string , :limit => 10
4
4
db/migrate/012_add_email_to_users.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddEmailToUsers < ActiveRecord :: Migration
1
+ class AddEmailToUsers < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :users , :email , :string
4
4
end
db/migrate/013_add_url_to_problem.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddUrlToProblem < ActiveRecord :: Migration
1
+ class AddUrlToProblem < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :problems , :url , :string
4
4
end
db/migrate/014_create_grader_processes.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateGraderProcesses < ActiveRecord :: Migration
1
+ class CreateGraderProcesses < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :grader_processes do | t |
3
+ create_table :grader_processes , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . column :ip , :string , :limit => 20
5
5
t . column :pid , :integer
6
6
t . column :mode , :string
db/migrate/015_add_status_to_tasks.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddStatusToTasks < ActiveRecord :: Migration
1
+ class AddStatusToTasks < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :tasks , :status , :integer
4
4
add_column :tasks , :updated_at , :datetime
db/migrate/016_add_task_to_grader_process.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddTaskToGraderProcess < ActiveRecord :: Migration
1
+ class AddTaskToGraderProcess < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :grader_processes , :task_id , :integer
4
4
end
db/migrate/017_rename_grader_process_column_ip_to_host.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class RenameGraderProcessColumnIpToHost < ActiveRecord :: Migration
1
+ class RenameGraderProcessColumnIpToHost < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
rename_column :grader_processes , :ip , :host
4
4
end
db/migrate/018_add_number_to_submissions.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddNumberToSubmissions < ActiveRecord :: Migration
1
+ class AddNumberToSubmissions < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :submissions , :number , :integer
4
4
db/migrate/019_create_test_requests.rb
¶
+2
-3
@@
-1,6
+1,6
1
- class CreateTestRequests < ActiveRecord :: Migration
1
+ class CreateTestRequests < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :test_requests do | t |
3
+ create_table :test_requests , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . column :user_id , :integer
5
5
t . column :problem_id , :integer
6
6
t . column :submission_id , :integer
@@
-10,7
+10,6
10
10
11
11
# these are similar to tasks
12
12
t . column :status , :integer
13
- t . column :updated_at , :datetime
14
13
15
14
# these are intentionally similar to submissions
16
15
t . column :submitted_at , :datetime
db/migrate/021_change_compiler_message_type_test_request.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class ChangeCompilerMessageTypeTestRequest < ActiveRecord :: Migration
1
+ class ChangeCompilerMessageTypeTestRequest < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
change_column :test_requests , :compiler_message , :text
4
4
end
db/migrate/022_create_configurations.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateConfigurations < ActiveRecord :: Migration
1
+ class CreateConfigurations < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :configurations do | t |
3
+ create_table :configurations , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . column :key , :string
5
5
t . column :value_type , :string
6
6
t . column :value , :string
db/migrate/023_add_runstat_columns_to_test_request.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddRunstatColumnsToTestRequest < ActiveRecord :: Migration
1
+ class AddRunstatColumnsToTestRequest < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :test_requests , :running_time , :float
4
4
add_column :test_requests , :exit_status , :string
db/migrate/024_create_sites.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateSites < ActiveRecord :: Migration
1
+ class CreateSites < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :sites do | t |
3
+ create_table :sites , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . string :name
5
5
t . boolean :started
6
6
t . datetime :start_time
db/migrate/025_add_site_to_user_and_add_default_site.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddSiteToUserAndAddDefaultSite < ActiveRecord :: Migration
1
+ class AddSiteToUserAndAddDefaultSite < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
default_site = Site . new ({ :name => 'default' ,
4
4
:started => false })
db/migrate/026_add_body_to_problems.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddBodyToProblems < ActiveRecord :: Migration
1
+ class AddBodyToProblems < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :problems , :body , :text
4
4
end
db/migrate/027_create_descriptions.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateDescriptions < ActiveRecord :: Migration
1
+ class CreateDescriptions < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :descriptions do | t |
3
+ create_table :descriptions , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . column :body , :text
5
5
t . column :markdowned , :boolean
6
6
t . timestamps
db/migrate/028_refactor_problem_body_to_description.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class RefactorProblemBodyToDescription < ActiveRecord :: Migration
1
+ class RefactorProblemBodyToDescription < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :problems , :description_id , :integer
4
4
Problem . reset_column_information
db/migrate/029_add_test_allowed_to_problems.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddTestAllowedToProblems < ActiveRecord :: Migration
1
+ class AddTestAllowedToProblems < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :problems , :test_allowed , :boolean
4
4
Problem . reset_column_information
db/migrate/030_create_announcements.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateAnnouncements < ActiveRecord :: Migration
1
+ class CreateAnnouncements < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :announcements do | t |
3
+ create_table :announcements , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . string :author
5
5
t . text :body
6
6
t . boolean :published
db/migrate/031_add_supports_for_output_only_problems.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddSupportsForOutputOnlyProblems < ActiveRecord :: Migration
1
+ class AddSupportsForOutputOnlyProblems < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :submissions , :source_filename , :string
4
4
add_column :problems , :output_only , :boolean
db/migrate/032_create_messages.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateMessages < ActiveRecord :: Migration
1
+ class CreateMessages < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :messages do | t |
3
+ create_table :messages , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . column "sender_id" , :integer
5
5
t . column "receiver_id" , :integer
6
6
t . column "replying_message_id" , :integer
db/migrate/033_add_task_type_to_grader_processes.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddTaskTypeToGraderProcesses < ActiveRecord :: Migration
1
+ class AddTaskTypeToGraderProcesses < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column 'grader_processes' , 'task_type' , :string
4
4
end
db/migrate/034_create_countries.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateCountries < ActiveRecord :: Migration
1
+ class CreateCountries < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :countries do | t |
3
+ create_table :countries , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . column :name , :string
5
5
t . timestamps
6
6
end
db/migrate/035_add_country_to_sites_and_users.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddCountryToSitesAndUsers < ActiveRecord :: Migration
1
+ class AddCountryToSitesAndUsers < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column 'sites' , 'country_id' , :integer
4
4
add_column 'sites' , 'password' , :string
db/migrate/20081107145815_add_frontpage_flag_to_announcement.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddFrontpageFlagToAnnouncement < ActiveRecord :: Migration
1
+ class AddFrontpageFlagToAnnouncement < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :announcements , "frontpage" , :boolean , :default => 0
4
4
end
db/migrate/20081204122651_add_activated_to_users.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddActivatedToUsers < ActiveRecord :: Migration
1
+ class AddActivatedToUsers < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :users , :activated , :boolean , :default => 0
4
4
db/migrate/20081210021333_add_timestamps_to_users.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddTimestampsToUsers < ActiveRecord :: Migration
1
+ class AddTimestampsToUsers < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_timestamps :users
4
4
end
db/migrate/20081215012843_change_user_login_string_limit.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class ChangeUserLoginStringLimit < ActiveRecord :: Migration
1
+ class ChangeUserLoginStringLimit < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
execute "ALTER TABLE `users` CHANGE `login` `login` VARCHAR( 50 )"
4
4
end
db/migrate/20090206145016_add_contest_flag_to_announcements.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddContestFlagToAnnouncements < ActiveRecord :: Migration
1
+ class AddContestFlagToAnnouncements < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :announcements , :contest_only , :boolean , :default => false
4
4
end
db/migrate/20090416235658_add_common_ext_to_languages.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddCommonExtToLanguages < ActiveRecord :: Migration
1
+ class AddCommonExtToLanguages < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
# language.common_ext is a comma-separated list of common file
4
4
# extensions.
db/migrate/20090426131044_add_terminated_to_grader_processes.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddTerminatedToGraderProcesses < ActiveRecord :: Migration
1
+ class AddTerminatedToGraderProcesses < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :grader_processes , :terminated , :boolean
4
4
end
db/migrate/20090815171610_add_title_to_announcements.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddTitleToAnnouncements < ActiveRecord :: Migration
1
+ class AddTitleToAnnouncements < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :announcements , :title , :string
4
4
end
db/migrate/20100113094740_create_test_pairs.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateTestPairs < ActiveRecord :: Migration
1
+ class CreateTestPairs < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :test_pairs do | t |
3
+ create_table :test_pairs , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . integer :problem_id
5
5
t . text :input
6
6
t . text :solution
db/migrate/20100124040107_add_description_to_config.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddDescriptionToConfig < ActiveRecord :: Migration
1
+ class AddDescriptionToConfig < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :configurations , :description , :text
4
4
end
db/migrate/20100124054458_create_user_contest_stats.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateUserContestStats < ActiveRecord :: Migration
1
+ class CreateUserContestStats < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :user_contest_stats do | t |
3
+ create_table :user_contest_stats , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . integer :user_id
5
5
t . timestamp :started_at
6
6
db/migrate/20100129041917_change_input_solution_field_limit_in_test_pair.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class ChangeInputSolutionFieldLimitInTestPair < ActiveRecord :: Migration
1
+ class ChangeInputSolutionFieldLimitInTestPair < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
change_column :test_pairs , :input , :text , :limit => 1 . megabytes
4
4
change_column :test_pairs , :solution , :text , :limit => 1 . megabytes
db/migrate/20100216105730_create_contests.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateContests < ActiveRecord :: Migration
1
+ class CreateContests < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :contests do | t |
3
+ create_table :contests , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . string :title
5
5
t . boolean :enabled
6
6
db/migrate/20100216162324_create_contests_users_join_table.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateContestsUsersJoinTable < ActiveRecord :: Migration
1
+ class CreateContestsUsersJoinTable < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :contests_users , :id => false do | t |
3
+ create_table :contests_users , :id => false , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . integer :contest_id
5
5
t . integer :user_id
6
6
end
db/migrate/20100216162940_create_contests_problems_join_table.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateContestsProblemsJoinTable < ActiveRecord :: Migration
1
+ class CreateContestsProblemsJoinTable < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
- create_table :contests_problems , :id => false do | t |
3
+ create_table :contests_problems , :id => false , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . integer :contest_id
5
5
t . integer :problem_id
6
6
end
db/migrate/20100219014840_add_description_filename_to_problems.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddDescriptionFilenameToProblems < ActiveRecord :: Migration
1
+ class AddDescriptionFilenameToProblems < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :problems , :description_filename , :string
4
4
end
db/migrate/20100303095700_add_name_to_contests.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddNameToContests < ActiveRecord :: Migration
1
+ class AddNameToContests < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :contests , :name , :string
4
4
end
db/migrate/20100328123325_add_forced_logout_to_user_contest_stat.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddForcedLogoutToUserContestStat < ActiveRecord :: Migration
1
+ class AddForcedLogoutToUserContestStat < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :user_contest_stats , :forced_logout , :boolean
4
4
end
db/migrate/20100506163112_add_notes_to_announcements.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddNotesToAnnouncements < ActiveRecord :: Migration
1
+ class AddNotesToAnnouncements < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def self . up
3
3
add_column :announcements , :notes , :string
4
4
end
db/migrate/20121001033508_rename_configurations_to_grader_configurations.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class RenameConfigurationsToGraderConfigurations < ActiveRecord :: Migration
1
+ class RenameConfigurationsToGraderConfigurations < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def change
3
3
rename_table 'configurations' , 'grader_configurations'
4
4
end
db/migrate/20140823031747_add_more_detail_to_submission.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddMoreDetailToSubmission < ActiveRecord :: Migration
1
+ class AddMoreDetailToSubmission < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def change
3
3
add_column :submissions , :max_runtime , :float
4
4
add_column :submissions , :peak_memory , :integer
db/migrate/20140826095949_create_logins.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateLogins < ActiveRecord :: Migration
1
+ class CreateLogins < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def change
3
- create_table :logins do | t |
3
+ create_table :logins , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . string :user_id
5
5
t . string :ip_address
6
6
db/migrate/20140913060729_add_section_to_users.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddSectionToUsers < ActiveRecord :: Migration
1
+ class AddSectionToUsers < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def change
3
3
add_column :users , :section , :string
4
4
end
db/migrate/20140917150629_add_ip_to_submissions.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddIpToSubmissions < ActiveRecord :: Migration
1
+ class AddIpToSubmissions < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def change
3
3
add_column :submissions , :ip_address , :string
4
4
end
db/migrate/20150203153534_add_more_to_users.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddMoreToUsers < ActiveRecord :: Migration
1
+ class AddMoreToUsers < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def change
3
3
add_column :users , :enabled , :boolean , default : 1
4
4
add_column :users , :remark , :string
db/migrate/20150503164846_change_userid_on_login.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class ChangeUseridOnLogin < ActiveRecord :: Migration
1
+ class ChangeUseridOnLogin < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def up
3
3
change_column :logins , :user_id , :integer
4
4
end
db/migrate/20150827131927_create_submission_view_logs.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateSubmissionViewLogs < ActiveRecord :: Migration
1
+ class CreateSubmissionViewLogs < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def change
3
- create_table :submission_view_logs do | t |
3
+ create_table :submission_view_logs , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . integer :user_id
5
5
t . integer :submission_id
6
6
db/migrate/20150827133841_add_last_ip_to_user.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddLastIpToUser < ActiveRecord :: Migration
1
+ class AddLastIpToUser < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def change
3
3
add_column :users , :last_ip , :string
4
4
end
db/migrate/20150914090545_create_heart_beats.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateHeartBeats < ActiveRecord :: Migration
1
+ class CreateHeartBeats < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def change
3
- create_table :heart_beats do | t |
3
+ create_table :heart_beats , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . column 'user_id' , :integer
5
5
t . column 'ip_address' , :string
6
6
db/migrate/20150914155101_add_status_to_heart_beat.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddStatusToHeartBeat < ActiveRecord :: Migration
1
+ class AddStatusToHeartBeat < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def change
3
3
add_column :heart_beats , :status , :string
4
4
end
db/migrate/20150914223258_add_more_config.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddMoreConfig < ActiveRecord :: Migration
1
+ class AddMoreConfig < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def up
3
3
GraderConfiguration . create key : 'right.bypass_agreement' , value_type : 'boolean' , value : 'true' , description : 'When false, a check box to accept license agreement appear at login and the user must click accept'
4
4
end
db/migrate/20150916054105_update_heart_beat.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class UpdateHeartBeat < ActiveRecord :: Migration
1
+ class UpdateHeartBeat < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def up
3
3
GraderConfiguration . create key : 'right.heartbeat_response' , value_type : 'string' , value : 'OK' , description : 'Heart beat response text'
4
4
add_index :heart_beats , :updated_at
db/migrate/20161008050135_modify_grader_process.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class ModifyGraderProcess < ActiveRecord :: Migration
1
+ class ModifyGraderProcess < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def up
3
3
change_column :grader_processes , :host , :string
4
4
end
db/migrate/20161014091417_create_testcases.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateTestcases < ActiveRecord :: Migration
1
+ class CreateTestcases < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def change
3
- create_table :testcases do | t |
3
+ create_table :testcases , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . references :problem
5
5
t . integer :num
6
6
t . integer :group
db/migrate/20161031063337_add_config_view_test.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddConfigViewTest < ActiveRecord :: Migration
1
+ class AddConfigViewTest < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def up
3
3
GraderConfiguration . create key : 'right.view_testcase' , value_type : 'boolean' , value : 'true' , description : 'When true, any user can view/download test data'
4
4
#uglily and dirtily and shamelessly check other config and inifialize
db/migrate/20170123162543_change_testcase_size.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class ChangeTestcaseSize < ActiveRecord :: Migration
1
+ class ChangeTestcaseSize < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def change
3
3
change_column :testcases , :input , :text , :limit => 4294967295
4
4
change_column :testcases , :sol , :text , :limit => 4294967295
db/migrate/20170124024527_add_view_testcase_to_problem.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddViewTestcaseToProblem < ActiveRecord :: Migration
1
+ class AddViewTestcaseToProblem < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def change
3
3
add_column :problems , :view_testcase , :bool
4
4
end
db/migrate/20170310110146_add_index_to_task.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddIndexToTask < ActiveRecord :: Migration
1
+ class AddIndexToTask < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def change
3
3
add_index :tasks , :submission_id
4
4
end
db/migrate/20170427070345_add_heart_beat_full.rb
¶
+1
-1
@@
-1,4
+1,4
1
- class AddHeartBeatFull < ActiveRecord :: Migration
1
+ class AddHeartBeatFull < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def up
3
3
GraderConfiguration . create key : 'right.heartbeat_response_full' , value_type : 'string' , value : 'RESTART' , description : 'Heart beat response text when user got full score (set this value to the empty string to disable this feature)'
4
4
end
db/migrate/20170911091143_create_groups.rb
¶
+4
-4
@@
-1,17
+1,17
1
- class CreateGroups < ActiveRecord :: Migration
1
+ class CreateGroups < ActiveRecord :: Migration [ 4 . 2 ]
2
2
3
3
def change
4
- create_table :groups do | t |
4
+ create_table :groups , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
5
5
t . string :name
6
6
t . string :description
7
7
end
8
8
9
- create_join_table :groups , :users do | t |
9
+ create_join_table :groups , :users , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
10
10
# t.index [:group_id, :user_id]
11
11
t . index [ :user_id , :group_id ]
12
12
end
13
13
14
- create_join_table :problems , :groups do | t |
14
+ create_join_table :problems , :groups , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
15
15
# t.index [:problem_id, :group_id]
16
16
t . index [ :group_id , :problem_id ]
17
17
end
db/migrate/20170914150545_create_tags.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateTags < ActiveRecord :: Migration
1
+ class CreateTags < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def change
3
- create_table :tags do | t |
3
+ create_table :tags , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . string :name , null : false
5
5
t . text :description
6
6
t . boolean :public
db/migrate/20170914150742_create_problem_tags.rb
¶
+2
-2
@@
-1,6
+1,6
1
- class CreateProblemTags < ActiveRecord :: Migration
1
+ class CreateProblemTags < ActiveRecord :: Migration [ 4 . 2 ]
2
2
def change
3
- create_table :problems_tags do | t |
3
+ create_table :problems_tags , options : "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do | t |
4
4
t . references :problem , index : true , foreign_key : true
5
5
t . references :tag , index : true , foreign_key : true
6
6
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository permissions settings