Description:
asset pipelining for controller specific asset
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r576:27e6704d5f53 - - 35 files changed: 39 inserted, 30 deleted
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
new file 100644 |
@@ -0,0 +1,3 | |||||
|
|
1 | + class ActiveRecord::ConnectionAdapters::Mysql2Adapter | ||
|
|
2 | + NATIVE_DATABASE_TYPES[:primary_key] = "int(11) auto_increment PRIMARY KEY" | ||
|
|
3 | + end |
@@ -1,77 +1,79 | |||||
|
1 | /************* |
|
1 | /************* |
|
2 | Metro Dark Theme |
|
2 | Metro Dark Theme |
|
3 | *************/ |
|
3 | *************/ |
|
4 | /* overall */ |
|
4 | /* overall */ |
|
5 | .tablesorter-cafe { |
|
5 | .tablesorter-cafe { |
|
6 |
- / |
|
6 | + /* font: 12px/18px 'Segoe UI Semilight', 'Open Sans', Verdana, Arial, Helvetica, sans-serif; */ |
|
7 | color: #000; |
|
7 | color: #000; |
|
8 | background-color: #777; |
|
8 | background-color: #777; |
|
9 | margin: 10px 0 15px; |
|
9 | margin: 10px 0 15px; |
|
10 | text-align: left; |
|
10 | text-align: left; |
|
11 | border-collapse: collapse; |
|
11 | border-collapse: collapse; |
|
12 | border: #555 1px solid; |
|
12 | border: #555 1px solid; |
|
13 | } |
|
13 | } |
|
14 |
|
14 | ||
|
15 | .tablesorter-cafe tr.dark-row th, .tablesorter-cafe tr.dark-row td { |
|
15 | .tablesorter-cafe tr.dark-row th, .tablesorter-cafe tr.dark-row td { |
|
16 | background-color: #222; |
|
16 | background-color: #222; |
|
17 | color: #fff; |
|
17 | color: #fff; |
|
18 | text-align: left; |
|
18 | text-align: left; |
|
19 | font-size: 14px; |
|
19 | font-size: 14px; |
|
20 | } |
|
20 | } |
|
21 |
|
21 | ||
|
22 | /* header/footer */ |
|
22 | /* header/footer */ |
|
23 | .tablesorter-cafe caption, |
|
23 | .tablesorter-cafe caption, |
|
24 | .tablesorter-cafe th, |
|
24 | .tablesorter-cafe th, |
|
25 | .tablesorter-cafe thead td, |
|
25 | .tablesorter-cafe thead td, |
|
26 | .tablesorter-cafe tfoot th, |
|
26 | .tablesorter-cafe tfoot th, |
|
27 | .tablesorter-cafe tfoot td { |
|
27 | .tablesorter-cafe tfoot td { |
|
|
28 | + /* | ||
|
28 | //font-weight: 300; |
|
29 | //font-weight: 300; |
|
29 | //font-size: 15px; |
|
30 | //font-size: 15px; |
|
|
31 | + */ | ||
|
30 | color: #fff; |
|
32 | color: #fff; |
|
31 | background-color: #777; |
|
33 | background-color: #777; |
|
32 | padding: 2px; |
|
34 | padding: 2px; |
|
33 | border: #555 1px solid; |
|
35 | border: #555 1px solid; |
|
34 | } |
|
36 | } |
|
35 |
|
37 | ||
|
36 | .tablesorter-cafe .header, |
|
38 | .tablesorter-cafe .header, |
|
37 | .tablesorter-cafe .tablesorter-header { |
|
39 | .tablesorter-cafe .tablesorter-header { |
|
38 | background-image: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAGFBMVEUAAADu7u7u7u7u7u7u7u7u7u7u7u7u7u5jNePWAAAACHRSTlMAMxIHKwEgMWD59H4AAABSSURBVAjXY2BgYFJgAAHzYhDJ6igSAKTYBAUTgJSioKAQAwNzoaCguAFDiCAQuDIkgigxBgiA8cJAVCpQt6AgSL+JoKAzA0gjUBsQqBcBCYhFAAE/CV4zeSzxAAAAAElFTkSuQmCC); |
|
40 | background-image: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAGFBMVEUAAADu7u7u7u7u7u7u7u7u7u7u7u7u7u5jNePWAAAACHRSTlMAMxIHKwEgMWD59H4AAABSSURBVAjXY2BgYFJgAAHzYhDJ6igSAKTYBAUTgJSioKAQAwNzoaCguAFDiCAQuDIkgigxBgiA8cJAVCpQt6AgSL+JoKAzA0gjUBsQqBcBCYhFAAE/CV4zeSzxAAAAAElFTkSuQmCC); |
|
39 | background-position: center right; |
|
41 | background-position: center right; |
|
40 | background-repeat: no-repeat; |
|
42 | background-repeat: no-repeat; |
|
41 | cursor: pointer; |
|
43 | cursor: pointer; |
|
42 | white-space: normal; |
|
44 | white-space: normal; |
|
43 | } |
|
45 | } |
|
44 | .tablesorter-cafe .tablesorter-header-inner { |
|
46 | .tablesorter-cafe .tablesorter-header-inner { |
|
45 | padding: 0 18px 0 4px; |
|
47 | padding: 0 18px 0 4px; |
|
46 | } |
|
48 | } |
|
47 | .tablesorter-cafe thead .headerSortUp, |
|
49 | .tablesorter-cafe thead .headerSortUp, |
|
48 | .tablesorter-cafe thead .tablesorter-headerSortUp, |
|
50 | .tablesorter-cafe thead .tablesorter-headerSortUp, |
|
49 | .tablesorter-cafe thead .tablesorter-headerAsc { |
|
51 | .tablesorter-cafe thead .tablesorter-headerAsc { |
|
50 | background-image: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAADu7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u5meJAOAAAACnRSTlMAMwsqXt+gIBUGxGoDMAAAAFlJREFUCNctzC0SQAAUReEzGNQ3AlHRiSRZFCVZYgeswRL8hLdK7834wj3tAlGP6y7fYHpKS6w6WwbVG0I1NZVnZPG8/DYxOYlnhUYkA06R1s9ESsxR4NIdPhkPFDFYuEnMAAAAAElFTkSuQmCC); |
|
52 | background-image: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAADu7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u5meJAOAAAACnRSTlMAMwsqXt+gIBUGxGoDMAAAAFlJREFUCNctzC0SQAAUReEzGNQ3AlHRiSRZFCVZYgeswRL8hLdK7834wj3tAlGP6y7fYHpKS6w6WwbVG0I1NZVnZPG8/DYxOYlnhUYkA06R1s9ESsxR4NIdPhkPFDFYuEnMAAAAAElFTkSuQmCC); |
|
51 | } |
|
53 | } |
|
52 | .tablesorter-cafe thead .headerSortDown, |
|
54 | .tablesorter-cafe thead .headerSortDown, |
|
53 | .tablesorter-cafe thead .tablesorter-headerSortDown, |
|
55 | .tablesorter-cafe thead .tablesorter-headerSortDown, |
|
54 | .tablesorter-cafe thead .tablesorter-headerDesc { |
|
56 | .tablesorter-cafe thead .tablesorter-headerDesc { |
|
55 | background-image: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAALVBMVEUAAADu7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7i0NViAAAADnRSTlMAMiweCQITTvDctZZqaTlM310AAABcSURBVAjXY2BgYEtgAAFHERDJqigUAKSYBQUNgFSioKAYAwOLIBA4MASBKFUGQxAlzAAF+94BwWuGKBC1lIFl3rt3Lx0YGCzevWsGSjK9e6cAUlT3HKyW9wADAwDRrBiDy6bKzwAAAABJRU5ErkJggg==); |
|
57 | background-image: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAALVBMVEUAAADu7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7i0NViAAAADnRSTlMAMiweCQITTvDctZZqaTlM310AAABcSURBVAjXY2BgYEtgAAFHERDJqigUAKSYBQUNgFSioKAYAwOLIBA4MASBKFUGQxAlzAAF+94BwWuGKBC1lIFl3rt3Lx0YGCzevWsGSjK9e6cAUlT3HKyW9wADAwDRrBiDy6bKzwAAAABJRU5ErkJggg==); |
|
56 | } |
|
58 | } |
|
57 | .tablesorter-cafe thead .sorter-false { |
|
59 | .tablesorter-cafe thead .sorter-false { |
|
58 | background-image: none; |
|
60 | background-image: none; |
|
59 | cursor: default; |
|
61 | cursor: default; |
|
60 | padding: 4px; |
|
62 | padding: 4px; |
|
61 | } |
|
63 | } |
|
62 |
|
64 | ||
|
63 | /* tbody */ |
|
65 | /* tbody */ |
|
64 | .tablesorter-cafe td { |
|
66 | .tablesorter-cafe td { |
|
65 | background-color: #fff; |
|
67 | background-color: #fff; |
|
66 | padding: 1px 4px; |
|
68 | padding: 1px 4px; |
|
67 | vertical-align: top; |
|
69 | vertical-align: top; |
|
68 | border-style: solid; |
|
70 | border-style: solid; |
|
69 | border-color: #666; |
|
71 | border-color: #666; |
|
70 | border-collapse: collapse; |
|
72 | border-collapse: collapse; |
|
71 | border-width: 0px 1px; |
|
73 | border-width: 0px 1px; |
|
72 |
|
74 | ||
|
73 | } |
|
75 | } |
|
74 |
|
76 | ||
|
75 | /* hovered row colors */ |
|
77 | /* hovered row colors */ |
|
76 | .tablesorter-cafe tbody > tr:hover > td, |
|
78 | .tablesorter-cafe tbody > tr:hover > td, |
|
77 | .tablesorter-cafe tbody > tr.even:hover > td, |
|
79 | .tablesorter-cafe tbody > tr.even:hover > td, |
@@ -1,11 +1,11 | |||||
|
1 |
|
1 | ||
|
2 | %td= grader.host |
|
2 | %td= grader.host |
|
3 | %td= grader.pid |
|
3 | %td= grader.pid |
|
4 | %td= grader.mode |
|
4 | %td= grader.mode |
|
5 |
- %td= grader.updated_at.strftime("%H:%M:%S") |
|
5 | + %td= grader.updated_at.strftime("%H:%M:%S") unless grader.updated_at.nil? |
|
6 | %td= grader.task_type |
|
6 | %td= grader.task_type |
|
7 | %td |
|
7 | %td |
|
8 |
- - if grader.task_id |
|
8 | + - if grader.task_id.nil? |
|
9 | idle |
|
9 | idle |
|
10 | - else |
|
10 | - else |
|
11 | = link_to "#{grader.task_id}", :action => 'view', :id => grader.task_id, :type => grader.task_type |
|
11 | = link_to "#{grader.task_id}", :action => 'view', :id => grader.task_id, :type => grader.task_type |
@@ -14,52 +14,57 | |||||
|
14 | # Settings in config/environments/* take precedence over those specified here. |
|
14 | # Settings in config/environments/* take precedence over those specified here. |
|
15 | # Application configuration should go into files in config/initializers |
|
15 | # Application configuration should go into files in config/initializers |
|
16 | # -- all .rb files in that directory are automatically loaded. |
|
16 | # -- all .rb files in that directory are automatically loaded. |
|
17 |
|
17 | ||
|
18 | # Custom directories with classes and modules you want to be autoloadable. |
|
18 | # Custom directories with classes and modules you want to be autoloadable. |
|
19 | config.autoload_paths += %W(#{config.root}/lib) |
|
19 | config.autoload_paths += %W(#{config.root}/lib) |
|
20 |
|
20 | ||
|
21 | # Only load the plugins named here, in the order given (default is alphabetical). |
|
21 | # Only load the plugins named here, in the order given (default is alphabetical). |
|
22 | # :all can be used as a placeholder for all plugins not explicitly named. |
|
22 | # :all can be used as a placeholder for all plugins not explicitly named. |
|
23 | # config.plugins = [ :exception_notification, :ssl_requirement, :all ] |
|
23 | # config.plugins = [ :exception_notification, :ssl_requirement, :all ] |
|
24 |
|
24 | ||
|
25 | # Activate observers that should always be running. |
|
25 | # Activate observers that should always be running. |
|
26 | # config.active_record.observers = :cacher, :garbage_collector, :forum_observer |
|
26 | # config.active_record.observers = :cacher, :garbage_collector, :forum_observer |
|
27 |
|
27 | ||
|
28 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. |
|
28 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. |
|
29 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. |
|
29 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. |
|
30 | config.time_zone = 'UTC' |
|
30 | config.time_zone = 'UTC' |
|
31 |
|
31 | ||
|
32 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. |
|
32 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. |
|
33 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] |
|
33 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] |
|
34 | config.i18n.default_locale = :en |
|
34 | config.i18n.default_locale = :en |
|
35 |
|
35 | ||
|
36 | # Configure the default encoding used in templates for Ruby 1.9. |
|
36 | # Configure the default encoding used in templates for Ruby 1.9. |
|
37 | config.encoding = "utf-8" |
|
37 | config.encoding = "utf-8" |
|
38 |
|
38 | ||
|
39 | # Configure sensitive parameters which will be filtered from the log file. |
|
39 | # Configure sensitive parameters which will be filtered from the log file. |
|
40 | config.filter_parameters += [:password] |
|
40 | config.filter_parameters += [:password] |
|
41 |
|
41 | ||
|
42 | # Enable escaping HTML in JSON. |
|
42 | # Enable escaping HTML in JSON. |
|
43 | config.active_support.escape_html_entities_in_json = true |
|
43 | config.active_support.escape_html_entities_in_json = true |
|
44 |
|
44 | ||
|
45 | # Use SQL instead of Active Record's schema dumper when creating the database. |
|
45 | # Use SQL instead of Active Record's schema dumper when creating the database. |
|
46 | # This is necessary if your schema can't be completely dumped by the schema dumper, |
|
46 | # This is necessary if your schema can't be completely dumped by the schema dumper, |
|
47 | # like if you have constraints or database-specific column types |
|
47 | # like if you have constraints or database-specific column types |
|
48 | # config.active_record.schema_format = :sql |
|
48 | # config.active_record.schema_format = :sql |
|
49 |
|
49 | ||
|
50 | # Enforce whitelist mode for mass assignment. |
|
50 | # Enforce whitelist mode for mass assignment. |
|
51 | # This will create an empty whitelist of attributes available for mass-assignment for all models |
|
51 | # This will create an empty whitelist of attributes available for mass-assignment for all models |
|
52 | # in your app. As such, your models will need to explicitly whitelist or blacklist accessible |
|
52 | # in your app. As such, your models will need to explicitly whitelist or blacklist accessible |
|
53 | # parameters by using an attr_accessible or attr_protected declaration. |
|
53 | # parameters by using an attr_accessible or attr_protected declaration. |
|
54 | config.active_record.whitelist_attributes = false |
|
54 | config.active_record.whitelist_attributes = false |
|
55 |
|
55 | ||
|
56 | # Enable the asset pipeline |
|
56 | # Enable the asset pipeline |
|
57 | config.assets.enabled = true |
|
57 | config.assets.enabled = true |
|
58 |
|
58 | ||
|
59 | # Version of your assets, change this if you want to expire all your assets |
|
59 | # Version of your assets, change this if you want to expire all your assets |
|
60 | config.assets.version = '1.0' |
|
60 | config.assets.version = '1.0' |
|
61 |
|
61 | ||
|
62 |
- config.assets.precompile += ['announcement_refresh.js','effects.js','site_update.js' |
|
62 | + config.assets.precompile += ['announcement_refresh.js','effects.js','site_update.js'] |
|
63 | config.assets.precompile += ['local_jquery.js','tablesorter-theme.cafe.css'] |
|
63 | config.assets.precompile += ['local_jquery.js','tablesorter-theme.cafe.css'] |
|
|
64 | + %w( announcements configurations contests contest_management graders heartbeat | ||
|
|
65 | + login main messages problems report site sites sources tasks | ||
|
|
66 | + test user_admin users ).each do |controller| | ||
|
|
67 | + config.assets.precompile += ["#{controller}.js", "#{controller}.css"] | ||
|
|
68 | + end | ||
|
64 | end |
|
69 | end |
|
65 | end |
|
70 | end |
@@ -1,267 +1,266 | |||||
|
1 | # encoding: UTF-8 |
|
1 | # encoding: UTF-8 |
|
2 | # This file is auto-generated from the current state of the database. Instead |
|
2 | # This file is auto-generated from the current state of the database. Instead |
|
3 | # of editing this file, please use the migrations feature of Active Record to |
|
3 | # of editing this file, please use the migrations feature of Active Record to |
|
4 | # incrementally modify your database, and then regenerate this schema definition. |
|
4 | # incrementally modify your database, and then regenerate this schema definition. |
|
5 | # |
|
5 | # |
|
6 | # Note that this schema.rb definition is the authoritative source for your |
|
6 | # Note that this schema.rb definition is the authoritative source for your |
|
7 | # database schema. If you need to create the application database on another |
|
7 | # database schema. If you need to create the application database on another |
|
8 | # system, you should be using db:schema:load, not running all the migrations |
|
8 | # system, you should be using db:schema:load, not running all the migrations |
|
9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations |
|
9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations |
|
10 | # you'll amass, the slower it'll run and the greater likelihood for issues). |
|
10 | # you'll amass, the slower it'll run and the greater likelihood for issues). |
|
11 | # |
|
11 | # |
|
12 | # It's strongly recommended to check this file into your version control system. |
|
12 | # It's strongly recommended to check this file into your version control system. |
|
13 |
|
13 | ||
|
14 | ActiveRecord::Schema.define(:version => 20150916054105) do |
|
14 | ActiveRecord::Schema.define(:version => 20150916054105) do |
|
15 |
|
15 | ||
|
16 | create_table "announcements", :force => true do |t| |
|
16 | create_table "announcements", :force => true do |t| |
|
17 | t.string "author" |
|
17 | t.string "author" |
|
18 |
- t.text "body" |
|
18 | + t.text "body" |
|
19 | t.boolean "published" |
|
19 | t.boolean "published" |
|
20 |
- t.datetime "created_at", |
|
20 | + t.datetime "created_at", :null => false |
|
21 |
- t.datetime "updated_at", |
|
21 | + t.datetime "updated_at", :null => false |
|
22 |
- t.boolean "frontpage", |
|
22 | + t.boolean "frontpage", :default => false |
|
23 |
- t.boolean "contest_only", |
|
23 | + t.boolean "contest_only", :default => false |
|
24 | t.string "title" |
|
24 | t.string "title" |
|
25 | t.string "notes" |
|
25 | t.string "notes" |
|
26 | end |
|
26 | end |
|
27 |
|
27 | ||
|
28 | create_table "contests", :force => true do |t| |
|
28 | create_table "contests", :force => true do |t| |
|
29 | t.string "title" |
|
29 | t.string "title" |
|
30 | t.boolean "enabled" |
|
30 | t.boolean "enabled" |
|
31 | t.datetime "created_at", :null => false |
|
31 | t.datetime "created_at", :null => false |
|
32 | t.datetime "updated_at", :null => false |
|
32 | t.datetime "updated_at", :null => false |
|
33 | t.string "name" |
|
33 | t.string "name" |
|
34 | end |
|
34 | end |
|
35 |
|
35 | ||
|
36 | create_table "contests_problems", :id => false, :force => true do |t| |
|
36 | create_table "contests_problems", :id => false, :force => true do |t| |
|
37 | t.integer "contest_id" |
|
37 | t.integer "contest_id" |
|
38 | t.integer "problem_id" |
|
38 | t.integer "problem_id" |
|
39 | end |
|
39 | end |
|
40 |
|
40 | ||
|
41 | create_table "contests_users", :id => false, :force => true do |t| |
|
41 | create_table "contests_users", :id => false, :force => true do |t| |
|
42 | t.integer "contest_id" |
|
42 | t.integer "contest_id" |
|
43 | t.integer "user_id" |
|
43 | t.integer "user_id" |
|
44 | end |
|
44 | end |
|
45 |
|
45 | ||
|
46 | create_table "countries", :force => true do |t| |
|
46 | create_table "countries", :force => true do |t| |
|
47 | t.string "name" |
|
47 | t.string "name" |
|
48 | t.datetime "created_at", :null => false |
|
48 | t.datetime "created_at", :null => false |
|
49 | t.datetime "updated_at", :null => false |
|
49 | t.datetime "updated_at", :null => false |
|
50 | end |
|
50 | end |
|
51 |
|
51 | ||
|
52 | create_table "descriptions", :force => true do |t| |
|
52 | create_table "descriptions", :force => true do |t| |
|
53 |
- t.text "body" |
|
53 | + t.text "body" |
|
54 | t.boolean "markdowned" |
|
54 | t.boolean "markdowned" |
|
55 |
- t.datetime "created_at", |
|
55 | + t.datetime "created_at", :null => false |
|
56 |
- t.datetime "updated_at", |
|
56 | + t.datetime "updated_at", :null => false |
|
57 | end |
|
57 | end |
|
58 |
|
58 | ||
|
59 | create_table "grader_configurations", :force => true do |t| |
|
59 | create_table "grader_configurations", :force => true do |t| |
|
60 | t.string "key" |
|
60 | t.string "key" |
|
61 | t.string "value_type" |
|
61 | t.string "value_type" |
|
62 | t.string "value" |
|
62 | t.string "value" |
|
63 |
- t.datetime "created_at", |
|
63 | + t.datetime "created_at", :null => false |
|
64 |
- t.datetime "updated_at", |
|
64 | + t.datetime "updated_at", :null => false |
|
65 |
- t.text "description" |
|
65 | + t.text "description" |
|
66 | end |
|
66 | end |
|
67 |
|
67 | ||
|
68 | create_table "grader_processes", :force => true do |t| |
|
68 | create_table "grader_processes", :force => true do |t| |
|
69 | t.string "host", :limit => 20 |
|
69 | t.string "host", :limit => 20 |
|
70 | t.integer "pid" |
|
70 | t.integer "pid" |
|
71 | t.string "mode" |
|
71 | t.string "mode" |
|
72 | t.boolean "active" |
|
72 | t.boolean "active" |
|
73 | t.datetime "created_at", :null => false |
|
73 | t.datetime "created_at", :null => false |
|
74 | t.datetime "updated_at", :null => false |
|
74 | t.datetime "updated_at", :null => false |
|
75 | t.integer "task_id" |
|
75 | t.integer "task_id" |
|
76 | t.string "task_type" |
|
76 | t.string "task_type" |
|
77 | t.boolean "terminated" |
|
77 | t.boolean "terminated" |
|
78 | end |
|
78 | end |
|
79 |
|
79 | ||
|
80 | add_index "grader_processes", ["host", "pid"], :name => "index_grader_processes_on_ip_and_pid" |
|
80 | add_index "grader_processes", ["host", "pid"], :name => "index_grader_processes_on_ip_and_pid" |
|
81 |
|
81 | ||
|
82 | create_table "heart_beats", :force => true do |t| |
|
82 | create_table "heart_beats", :force => true do |t| |
|
83 | t.integer "user_id" |
|
83 | t.integer "user_id" |
|
84 | t.string "ip_address" |
|
84 | t.string "ip_address" |
|
85 | t.datetime "created_at", :null => false |
|
85 | t.datetime "created_at", :null => false |
|
86 | t.datetime "updated_at", :null => false |
|
86 | t.datetime "updated_at", :null => false |
|
87 | t.string "status" |
|
87 | t.string "status" |
|
88 | end |
|
88 | end |
|
89 |
|
89 | ||
|
90 | add_index "heart_beats", ["updated_at"], :name => "index_heart_beats_on_updated_at" |
|
90 | add_index "heart_beats", ["updated_at"], :name => "index_heart_beats_on_updated_at" |
|
91 |
|
91 | ||
|
92 | create_table "languages", :force => true do |t| |
|
92 | create_table "languages", :force => true do |t| |
|
93 | t.string "name", :limit => 10 |
|
93 | t.string "name", :limit => 10 |
|
94 | t.string "pretty_name" |
|
94 | t.string "pretty_name" |
|
95 | t.string "ext", :limit => 10 |
|
95 | t.string "ext", :limit => 10 |
|
96 | t.string "common_ext" |
|
96 | t.string "common_ext" |
|
97 | end |
|
97 | end |
|
98 |
|
98 | ||
|
99 | create_table "logins", :force => true do |t| |
|
99 | create_table "logins", :force => true do |t| |
|
100 | t.integer "user_id" |
|
100 | t.integer "user_id" |
|
101 | t.string "ip_address" |
|
101 | t.string "ip_address" |
|
102 | t.datetime "created_at", :null => false |
|
102 | t.datetime "created_at", :null => false |
|
103 | t.datetime "updated_at", :null => false |
|
103 | t.datetime "updated_at", :null => false |
|
104 | end |
|
104 | end |
|
105 |
|
105 | ||
|
106 | create_table "messages", :force => true do |t| |
|
106 | create_table "messages", :force => true do |t| |
|
107 | t.integer "sender_id" |
|
107 | t.integer "sender_id" |
|
108 | t.integer "receiver_id" |
|
108 | t.integer "receiver_id" |
|
109 | t.integer "replying_message_id" |
|
109 | t.integer "replying_message_id" |
|
110 | - t.text "body", :limit => 16777215 |
|
110 | + t.text "body" |
|
111 | t.boolean "replied" |
|
111 | t.boolean "replied" |
|
112 |
- t.datetime "created_at", |
|
112 | + t.datetime "created_at", :null => false |
|
113 |
- t.datetime "updated_at", |
|
113 | + t.datetime "updated_at", :null => false |
|
114 | end |
|
114 | end |
|
115 |
|
115 | ||
|
116 | create_table "problems", :force => true do |t| |
|
116 | create_table "problems", :force => true do |t| |
|
117 | t.string "name", :limit => 30 |
|
117 | t.string "name", :limit => 30 |
|
118 | t.string "full_name" |
|
118 | t.string "full_name" |
|
119 | t.integer "full_score" |
|
119 | t.integer "full_score" |
|
120 | t.date "date_added" |
|
120 | t.date "date_added" |
|
121 | t.boolean "available" |
|
121 | t.boolean "available" |
|
122 | t.string "url" |
|
122 | t.string "url" |
|
123 | t.integer "description_id" |
|
123 | t.integer "description_id" |
|
124 | t.boolean "test_allowed" |
|
124 | t.boolean "test_allowed" |
|
125 | t.boolean "output_only" |
|
125 | t.boolean "output_only" |
|
126 | t.string "description_filename" |
|
126 | t.string "description_filename" |
|
127 | end |
|
127 | end |
|
128 |
|
128 | ||
|
129 | create_table "rights", :force => true do |t| |
|
129 | create_table "rights", :force => true do |t| |
|
130 | t.string "name" |
|
130 | t.string "name" |
|
131 | t.string "controller" |
|
131 | t.string "controller" |
|
132 | t.string "action" |
|
132 | t.string "action" |
|
133 | end |
|
133 | end |
|
134 |
|
134 | ||
|
135 | create_table "rights_roles", :id => false, :force => true do |t| |
|
135 | create_table "rights_roles", :id => false, :force => true do |t| |
|
136 | t.integer "right_id" |
|
136 | t.integer "right_id" |
|
137 | t.integer "role_id" |
|
137 | t.integer "role_id" |
|
138 | end |
|
138 | end |
|
139 |
|
139 | ||
|
140 | add_index "rights_roles", ["role_id"], :name => "index_rights_roles_on_role_id" |
|
140 | add_index "rights_roles", ["role_id"], :name => "index_rights_roles_on_role_id" |
|
141 |
|
141 | ||
|
142 | create_table "roles", :force => true do |t| |
|
142 | create_table "roles", :force => true do |t| |
|
143 | t.string "name" |
|
143 | t.string "name" |
|
144 | end |
|
144 | end |
|
145 |
|
145 | ||
|
146 | create_table "roles_users", :id => false, :force => true do |t| |
|
146 | create_table "roles_users", :id => false, :force => true do |t| |
|
147 | t.integer "role_id" |
|
147 | t.integer "role_id" |
|
148 | t.integer "user_id" |
|
148 | t.integer "user_id" |
|
149 | end |
|
149 | end |
|
150 |
|
150 | ||
|
151 | add_index "roles_users", ["user_id"], :name => "index_roles_users_on_user_id" |
|
151 | add_index "roles_users", ["user_id"], :name => "index_roles_users_on_user_id" |
|
152 |
|
152 | ||
|
153 | create_table "sessions", :force => true do |t| |
|
153 | create_table "sessions", :force => true do |t| |
|
154 | t.string "session_id" |
|
154 | t.string "session_id" |
|
155 |
- t.text "data" |
|
155 | + t.text "data" |
|
156 | t.datetime "updated_at" |
|
156 | t.datetime "updated_at" |
|
157 | end |
|
157 | end |
|
158 |
|
158 | ||
|
159 | add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id" |
|
159 | add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id" |
|
160 | add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at" |
|
160 | add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at" |
|
161 |
|
161 | ||
|
162 | create_table "sites", :force => true do |t| |
|
162 | create_table "sites", :force => true do |t| |
|
163 | t.string "name" |
|
163 | t.string "name" |
|
164 | t.boolean "started" |
|
164 | t.boolean "started" |
|
165 | t.datetime "start_time" |
|
165 | t.datetime "start_time" |
|
166 | t.datetime "created_at", :null => false |
|
166 | t.datetime "created_at", :null => false |
|
167 | t.datetime "updated_at", :null => false |
|
167 | t.datetime "updated_at", :null => false |
|
168 | t.integer "country_id" |
|
168 | t.integer "country_id" |
|
169 | t.string "password" |
|
169 | t.string "password" |
|
170 | end |
|
170 | end |
|
171 |
|
171 | ||
|
172 | create_table "submission_view_logs", :force => true do |t| |
|
172 | create_table "submission_view_logs", :force => true do |t| |
|
173 | t.integer "user_id" |
|
173 | t.integer "user_id" |
|
174 | t.integer "submission_id" |
|
174 | t.integer "submission_id" |
|
175 | t.datetime "created_at", :null => false |
|
175 | t.datetime "created_at", :null => false |
|
176 | t.datetime "updated_at", :null => false |
|
176 | t.datetime "updated_at", :null => false |
|
177 | end |
|
177 | end |
|
178 |
|
178 | ||
|
179 | create_table "submissions", :force => true do |t| |
|
179 | create_table "submissions", :force => true do |t| |
|
180 | t.integer "user_id" |
|
180 | t.integer "user_id" |
|
181 | t.integer "problem_id" |
|
181 | t.integer "problem_id" |
|
182 | t.integer "language_id" |
|
182 | t.integer "language_id" |
|
183 | - t.text "source", :limit => 16777215 |
|
183 | + t.text "source" |
|
184 | t.binary "binary" |
|
184 | t.binary "binary" |
|
185 | t.datetime "submitted_at" |
|
185 | t.datetime "submitted_at" |
|
186 | t.datetime "compiled_at" |
|
186 | t.datetime "compiled_at" |
|
187 |
- t.text "compiler_message" |
|
187 | + t.text "compiler_message" |
|
188 | t.datetime "graded_at" |
|
188 | t.datetime "graded_at" |
|
189 | t.integer "points" |
|
189 | t.integer "points" |
|
190 |
- t.text "grader_comment" |
|
190 | + t.text "grader_comment" |
|
191 | t.integer "number" |
|
191 | t.integer "number" |
|
192 | t.string "source_filename" |
|
192 | t.string "source_filename" |
|
193 | t.float "max_runtime" |
|
193 | t.float "max_runtime" |
|
194 | t.integer "peak_memory" |
|
194 | t.integer "peak_memory" |
|
195 | t.integer "effective_code_length" |
|
195 | t.integer "effective_code_length" |
|
196 | t.string "ip_address" |
|
196 | t.string "ip_address" |
|
197 | end |
|
197 | end |
|
198 |
|
198 | ||
|
199 | add_index "submissions", ["user_id", "problem_id", "number"], :name => "index_submissions_on_user_id_and_problem_id_and_number", :unique => true |
|
199 | add_index "submissions", ["user_id", "problem_id", "number"], :name => "index_submissions_on_user_id_and_problem_id_and_number", :unique => true |
|
200 | add_index "submissions", ["user_id", "problem_id"], :name => "index_submissions_on_user_id_and_problem_id" |
|
200 | add_index "submissions", ["user_id", "problem_id"], :name => "index_submissions_on_user_id_and_problem_id" |
|
201 |
|
201 | ||
|
202 | create_table "tasks", :force => true do |t| |
|
202 | create_table "tasks", :force => true do |t| |
|
203 | t.integer "submission_id" |
|
203 | t.integer "submission_id" |
|
204 | t.datetime "created_at" |
|
204 | t.datetime "created_at" |
|
205 | t.integer "status" |
|
205 | t.integer "status" |
|
206 | t.datetime "updated_at" |
|
206 | t.datetime "updated_at" |
|
207 | end |
|
207 | end |
|
208 |
|
208 | ||
|
209 | create_table "test_pairs", :force => true do |t| |
|
209 | create_table "test_pairs", :force => true do |t| |
|
210 | t.integer "problem_id" |
|
210 | t.integer "problem_id" |
|
211 |
- t.text "input", :limit => |
|
211 | + t.text "input", :limit => 16777215 |
|
212 |
- t.text "solution", :limit => |
|
212 | + t.text "solution", :limit => 16777215 |
|
213 |
- t.datetime "created_at", |
|
213 | + t.datetime "created_at", :null => false |
|
214 |
- t.datetime "updated_at", |
|
214 | + t.datetime "updated_at", :null => false |
|
215 | end |
|
215 | end |
|
216 |
|
216 | ||
|
217 | create_table "test_requests", :force => true do |t| |
|
217 | create_table "test_requests", :force => true do |t| |
|
218 | t.integer "user_id" |
|
218 | t.integer "user_id" |
|
219 | t.integer "problem_id" |
|
219 | t.integer "problem_id" |
|
220 | t.integer "submission_id" |
|
220 | t.integer "submission_id" |
|
221 | t.string "input_file_name" |
|
221 | t.string "input_file_name" |
|
222 | t.string "output_file_name" |
|
222 | t.string "output_file_name" |
|
223 | t.string "running_stat" |
|
223 | t.string "running_stat" |
|
224 | t.integer "status" |
|
224 | t.integer "status" |
|
225 |
- t.datetime "updated_at", |
|
225 | + t.datetime "updated_at", :null => false |
|
226 | t.datetime "submitted_at" |
|
226 | t.datetime "submitted_at" |
|
227 | t.datetime "compiled_at" |
|
227 | t.datetime "compiled_at" |
|
228 |
- t.text "compiler_message" |
|
228 | + t.text "compiler_message" |
|
229 | t.datetime "graded_at" |
|
229 | t.datetime "graded_at" |
|
230 | t.string "grader_comment" |
|
230 | t.string "grader_comment" |
|
231 |
- t.datetime "created_at", |
|
231 | + t.datetime "created_at", :null => false |
|
232 | t.float "running_time" |
|
232 | t.float "running_time" |
|
233 | t.string "exit_status" |
|
233 | t.string "exit_status" |
|
234 | t.integer "memory_usage" |
|
234 | t.integer "memory_usage" |
|
235 | end |
|
235 | end |
|
236 |
|
236 | ||
|
237 | add_index "test_requests", ["user_id", "problem_id"], :name => "index_test_requests_on_user_id_and_problem_id" |
|
237 | add_index "test_requests", ["user_id", "problem_id"], :name => "index_test_requests_on_user_id_and_problem_id" |
|
238 |
|
238 | ||
|
239 | create_table "user_contest_stats", :force => true do |t| |
|
239 | create_table "user_contest_stats", :force => true do |t| |
|
240 | t.integer "user_id" |
|
240 | t.integer "user_id" |
|
241 | t.datetime "started_at" |
|
241 | t.datetime "started_at" |
|
242 | t.datetime "created_at", :null => false |
|
242 | t.datetime "created_at", :null => false |
|
243 | t.datetime "updated_at", :null => false |
|
243 | t.datetime "updated_at", :null => false |
|
244 | t.boolean "forced_logout" |
|
244 | t.boolean "forced_logout" |
|
245 | end |
|
245 | end |
|
246 |
|
246 | ||
|
247 | create_table "users", :force => true do |t| |
|
247 | create_table "users", :force => true do |t| |
|
248 | t.string "login", :limit => 50 |
|
248 | t.string "login", :limit => 50 |
|
249 | t.string "full_name" |
|
249 | t.string "full_name" |
|
250 | t.string "hashed_password" |
|
250 | t.string "hashed_password" |
|
251 | t.string "salt", :limit => 5 |
|
251 | t.string "salt", :limit => 5 |
|
252 | t.string "alias" |
|
252 | t.string "alias" |
|
253 | t.string "email" |
|
253 | t.string "email" |
|
254 | t.integer "site_id" |
|
254 | t.integer "site_id" |
|
255 | t.integer "country_id" |
|
255 | t.integer "country_id" |
|
256 | t.boolean "activated", :default => false |
|
256 | t.boolean "activated", :default => false |
|
257 | t.datetime "created_at" |
|
257 | t.datetime "created_at" |
|
258 | t.datetime "updated_at" |
|
258 | t.datetime "updated_at" |
|
259 | - t.string "section" |
|
||
|
260 | t.boolean "enabled", :default => true |
|
259 | t.boolean "enabled", :default => true |
|
261 | t.string "remark" |
|
260 | t.string "remark" |
|
262 | t.string "last_ip" |
|
261 | t.string "last_ip" |
|
263 | end |
|
262 | end |
|
264 |
|
263 | ||
|
265 | add_index "users", ["login"], :name => "index_users_on_login", :unique => true |
|
264 | add_index "users", ["login"], :name => "index_users_on_login", :unique => true |
|
266 |
|
265 | ||
|
267 | end |
|
266 | end |
You need to be logged in to leave comments.
Login now