drop SisCrossListedSection

it's ancient cruft

test plan: n/a

Change-Id: I20912454e9b35be4a292efff33a5fe2913f0bd09
Reviewed-on: https://gerrit.instructure.com/7169
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
This commit is contained in:
Cody Cutrer 2011-11-28 13:57:17 -07:00
parent 4dd825382f
commit 6caf502bb8
4 changed files with 13 additions and 26 deletions

View File

@ -20,11 +20,10 @@ class CourseSection < ActiveRecord::Base
include Workflow
attr_protected :sis_source_id, :sis_batch_id, :course_id,
:root_account_id, :enrollment_term_id, :sis_cross_listed_section_id, :sis_cross_listed_section_sis_batch_id
:root_account_id, :enrollment_term_id
belongs_to :course
belongs_to :nonxlist_course, :class_name => 'Course'
belongs_to :root_account, :class_name => 'Account'
belongs_to :sis_cross_listed_section
belongs_to :account
has_many :enrollments, :include => :user, :conditions => ['enrollments.workflow_state != ?', 'deleted'], :dependent => :destroy
has_many :students, :through => :student_enrollments, :source => :user, :order => User.sortable_name_order_by_clause

View File

@ -1,24 +0,0 @@
#
# Copyright (C) 2011 Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
class SisCrossListedSection < ActiveRecord::Base
named_scope :account_sections, lambda{|account, *source_ids|
{:conditions => {:root_account_id => account.id, :sis_source_id => source_ids}, :order => :sis_source_id }
}
attr_accessible
end

View File

@ -19,6 +19,7 @@
class ActiveRecord::Base
DROPPED_COLUMNS = {
'attachments' => %w(enrollment_id),
'course_sections' => %w(sis_cross_listed_section_id sis_cross_listed_section_sis_batch_id),
'courses' => %w(section hidden_tabs),
'users' => %w(type),
'role_overrides' => %w(context_code),

View File

@ -0,0 +1,11 @@
class DropSisCrossListedSection < ActiveRecord::Migration
def self.up
remove_column :course_sections, :sis_cross_listed_section_id
remove_column :course_sections, :sis_cross_listed_section_sis_batch_id
drop_table :sis_cross_listed_sections
end
def self.down
raise ActiveRecord::IrreversibleMigration
end
end