GAKUEngine/gaku

View on GitHub
core/db/schema.rb

Summary

Maintainability
D
1 day
Test Coverage

File schema.rb has 411 lines of code (exceeds 250 allowed). Consider refactoring.
Open

ActiveRecord::Schema.define(version: 20121013102921) do

  create_table 'gaku_addresses', force: true do |t|
    t.string   'address1'
    t.string   'address2'
Severity: Minor
Found in core/db/schema.rb - About 5 hrs to fix

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      create_table 'gaku_assignments', force: true do |t|
        t.string   'name'
        t.text     'description'
        t.integer  'max_score'
        t.integer  'syllabus_id'
    Severity: Minor
    Found in core/db/schema.rb and 2 other locations - About 35 mins to fix
    core/db/schema.rb on lines 61..69
    core/db/schema.rb on lines 450..458

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 35.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      create_table 'gaku_syllabuses', force: true do |t|
        t.string   'name'
        t.string   'code'
        t.text     'description'
        t.integer  'credits'
    Severity: Minor
    Found in core/db/schema.rb and 2 other locations - About 35 mins to fix
    core/db/schema.rb on lines 39..47
    core/db/schema.rb on lines 61..69

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 35.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      create_table 'gaku_attendances', force: true do |t|
        t.string   'reason'
        t.text     'description'
        t.integer  'attendancable_id'
        t.string   'attendancable_type'
    Severity: Minor
    Found in core/db/schema.rb and 2 other locations - About 35 mins to fix
    core/db/schema.rb on lines 39..47
    core/db/schema.rb on lines 450..458

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 35.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      create_table 'gaku_guardian_addresses', force: true do |t|
        t.integer  'guardian_id'
        t.integer  'address_id'
        t.boolean  'primary',  default: false
        t.datetime 'created_at',                     null: false
    Severity: Minor
    Found in core/db/schema.rb and 1 other location - About 30 mins to fix
    core/db/schema.rb on lines 410..416

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 32.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      create_table 'gaku_courses', force: true do |t|
        t.string   'code'
        t.integer  'faculty_id'
        t.integer  'syllabus_id'
        t.integer  'class_group_id'
    Severity: Minor
    Found in core/db/schema.rb and 2 other locations - About 30 mins to fix
    core/db/schema.rb on lines 122..129
    core/db/schema.rb on lines 343..350

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 32.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      create_table 'gaku_notes', force: true do |t|
        t.string   'title'
        t.text     'content'
        t.integer  'notable_id'
        t.string   'notable_type'
    Severity: Minor
    Found in core/db/schema.rb and 2 other locations - About 30 mins to fix
    core/db/schema.rb on lines 122..129
    core/db/schema.rb on lines 188..195

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 32.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      create_table 'gaku_student_addresses', force: true do |t|
        t.integer  'student_id'
        t.integer  'address_id'
        t.boolean  'primary', default: false
        t.datetime 'created_at',                    null: false
    Severity: Minor
    Found in core/db/schema.rb and 1 other location - About 30 mins to fix
    core/db/schema.rb on lines 278..284

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 32.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      create_table 'gaku_class_groups', force: true do |t|
        t.string   'name'
        t.integer  'grade'
        t.string   'homeroom'
        t.integer  'faculty_id'
    Severity: Minor
    Found in core/db/schema.rb and 2 other locations - About 30 mins to fix
    core/db/schema.rb on lines 188..195
    core/db/schema.rb on lines 343..350

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 32.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

      create_table 'gaku_class_group_enrollments', force: true do |t|
        t.integer  'class_group_id'
        t.integer  'student_id'
        t.integer  'seat_number'
        t.datetime 'created_at',     null: false
    Severity: Major
    Found in core/db/schema.rb and 6 other locations - About 25 mins to fix
    core/db/schema.rb on lines 211..217
    core/db/schema.rb on lines 239..245
    core/db/schema.rb on lines 270..276
    core/db/schema.rb on lines 329..335
    core/db/schema.rb on lines 367..373
    core/db/schema.rb on lines 388..394

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 29.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

      create_table 'gaku_lesson_plans', force: true do |t|
        t.string   'title'
        t.text     'description'
        t.integer  'syllabus_id'
        t.datetime 'created_at',  null: false
    Severity: Major
    Found in core/db/schema.rb and 6 other locations - About 25 mins to fix
    core/db/schema.rb on lines 111..117
    core/db/schema.rb on lines 211..217
    core/db/schema.rb on lines 239..245
    core/db/schema.rb on lines 270..276
    core/db/schema.rb on lines 367..373
    core/db/schema.rb on lines 388..394

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 29.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

      create_table 'gaku_schedules', force: true do |t|
        t.datetime 'starting'
        t.datetime 'ending'
        t.string   'repeat'
        t.datetime 'created_at', null: false
    Severity: Major
    Found in core/db/schema.rb and 6 other locations - About 25 mins to fix
    core/db/schema.rb on lines 111..117
    core/db/schema.rb on lines 211..217
    core/db/schema.rb on lines 239..245
    core/db/schema.rb on lines 270..276
    core/db/schema.rb on lines 329..335
    core/db/schema.rb on lines 388..394

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 29.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

      create_table 'gaku_exam_portion_scores', force: true do |t|
        t.float    'score'
        t.integer  'exam_portion_id'
        t.integer  'student_id'
        t.datetime 'created_at',      null: false
    Severity: Major
    Found in core/db/schema.rb and 6 other locations - About 25 mins to fix
    core/db/schema.rb on lines 111..117
    core/db/schema.rb on lines 239..245
    core/db/schema.rb on lines 270..276
    core/db/schema.rb on lines 329..335
    core/db/schema.rb on lines 367..373
    core/db/schema.rb on lines 388..394

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 29.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

      create_table 'gaku_semesters', force: true do |t|
        t.date     'starting'
        t.date     'ending'
        t.integer  'class_group_id'
        t.datetime 'created_at',     null: false
    Severity: Major
    Found in core/db/schema.rb and 6 other locations - About 25 mins to fix
    core/db/schema.rb on lines 111..117
    core/db/schema.rb on lines 211..217
    core/db/schema.rb on lines 239..245
    core/db/schema.rb on lines 270..276
    core/db/schema.rb on lines 329..335
    core/db/schema.rb on lines 367..373

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 29.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

      create_table 'gaku_exam_scores', force: true do |t|
        t.float    'score'
        t.text     'comment'
        t.integer  'exam_id'
        t.datetime 'created_at', null: false
    Severity: Major
    Found in core/db/schema.rb and 6 other locations - About 25 mins to fix
    core/db/schema.rb on lines 111..117
    core/db/schema.rb on lines 211..217
    core/db/schema.rb on lines 270..276
    core/db/schema.rb on lines 329..335
    core/db/schema.rb on lines 367..373
    core/db/schema.rb on lines 388..394

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 29.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

      create_table 'gaku_grading_methods', force: true do |t|
        t.string   'name'
        t.text     'description'
        t.text     'method'
        t.datetime 'created_at',  null: false
    Severity: Major
    Found in core/db/schema.rb and 6 other locations - About 25 mins to fix
    core/db/schema.rb on lines 111..117
    core/db/schema.rb on lines 211..217
    core/db/schema.rb on lines 239..245
    core/db/schema.rb on lines 329..335
    core/db/schema.rb on lines 367..373
    core/db/schema.rb on lines 388..394

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 29.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

      create_table 'gaku_exam_syllabuses', force: true do |t|
        t.integer  'exam_id'
        t.integer  'syllabus_id'
        t.datetime 'created_at',  null: false
        t.datetime 'updated_at',  null: false
    Severity: Minor
    Found in core/db/schema.rb and 6 other locations - About 15 mins to fix
    core/db/schema.rb on lines 32..37
    core/db/schema.rb on lines 101..106
    core/db/schema.rb on lines 166..171
    core/db/schema.rb on lines 197..202
    core/db/schema.rb on lines 204..209
    core/db/schema.rb on lines 354..359

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 26.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

      create_table 'gaku_course_enrollments', force: true do |t|
        t.integer  'student_id'
        t.integer  'course_id'
        t.datetime 'created_at', null: false
        t.datetime 'updated_at', null: false
    Severity: Minor
    Found in core/db/schema.rb and 6 other locations - About 15 mins to fix
    core/db/schema.rb on lines 32..37
    core/db/schema.rb on lines 101..106
    core/db/schema.rb on lines 197..202
    core/db/schema.rb on lines 204..209
    core/db/schema.rb on lines 247..252
    core/db/schema.rb on lines 354..359

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 26.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

      create_table 'gaku_enrollment_status_types', force: true do |t|
        t.string   'name'
        t.boolean  'active'
        t.datetime 'created_at', null: false
        t.datetime 'updated_at', null: false
    Severity: Minor
    Found in core/db/schema.rb and 6 other locations - About 15 mins to fix
    core/db/schema.rb on lines 32..37
    core/db/schema.rb on lines 101..106
    core/db/schema.rb on lines 166..171
    core/db/schema.rb on lines 204..209
    core/db/schema.rb on lines 247..252
    core/db/schema.rb on lines 354..359

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 26.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

      create_table 'gaku_presets', force: true do |t|
        t.string   'name'
        t.string   'content'
        t.datetime 'created_at', null: false
        t.datetime 'updated_at', null: false
    Severity: Minor
    Found in core/db/schema.rb and 6 other locations - About 15 mins to fix
    core/db/schema.rb on lines 32..37
    core/db/schema.rb on lines 101..106
    core/db/schema.rb on lines 166..171
    core/db/schema.rb on lines 197..202
    core/db/schema.rb on lines 204..209
    core/db/schema.rb on lines 247..252

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 26.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

      create_table 'gaku_assignment_scores', force: true do |t|
        t.integer  'score'
        t.integer  'student_id'
        t.datetime 'created_at', null: false
        t.datetime 'updated_at', null: false
    Severity: Minor
    Found in core/db/schema.rb and 6 other locations - About 15 mins to fix
    core/db/schema.rb on lines 101..106
    core/db/schema.rb on lines 166..171
    core/db/schema.rb on lines 197..202
    core/db/schema.rb on lines 204..209
    core/db/schema.rb on lines 247..252
    core/db/schema.rb on lines 354..359

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 26.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

      create_table 'gaku_enrollment_statuses', force: true do |t|
        t.integer  'enrollment_status_type_id'
        t.integer  'student_id'
        t.datetime 'created_at',                null: false
        t.datetime 'updated_at',                null: false
    Severity: Minor
    Found in core/db/schema.rb and 6 other locations - About 15 mins to fix
    core/db/schema.rb on lines 32..37
    core/db/schema.rb on lines 101..106
    core/db/schema.rb on lines 166..171
    core/db/schema.rb on lines 197..202
    core/db/schema.rb on lines 247..252
    core/db/schema.rb on lines 354..359

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 26.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

      create_table 'gaku_class_group_course_enrollments', force: true do |t|
        t.integer  'class_group_id'
        t.integer  'course_id'
        t.datetime 'created_at',     null: false
        t.datetime 'updated_at',     null: false
    Severity: Minor
    Found in core/db/schema.rb and 6 other locations - About 15 mins to fix
    core/db/schema.rb on lines 32..37
    core/db/schema.rb on lines 166..171
    core/db/schema.rb on lines 197..202
    core/db/schema.rb on lines 204..209
    core/db/schema.rb on lines 247..252
    core/db/schema.rb on lines 354..359

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 26.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status