diff --git a/app/models/event.rb b/app/models/event.rb index 27a26f7..97793cc 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -4,10 +4,4 @@ class Event < ActiveRecord::Base validates :abstract, presence: true validates :description, presence: true validates :agreement, acceptance: true - - private - - def self.inheritance_column - 'something' - end end diff --git a/app/models/track.rb b/app/models/track.rb index 3e9b598..7f5e7c2 100644 --- a/app/models/track.rb +++ b/app/models/track.rb @@ -1,6 +1,5 @@ class Track < ActiveRecord::Base belongs_to :conference - has_many :events, dependent: :destroy validates :name, presence: true validates :color, presence: true, format: {with: /\A#?[a-f0-9]{6}\z/i} diff --git a/db/migrate/20150417004249_remove_unneeded_columns_from_events.rb b/db/migrate/20150417004249_remove_unneeded_columns_from_events.rb new file mode 100644 index 0000000..49f9415 --- /dev/null +++ b/db/migrate/20150417004249_remove_unneeded_columns_from_events.rb @@ -0,0 +1,12 @@ +class RemoveUnneededColumnsFromEvents < ActiveRecord::Migration + def change + remove_index :events, name: :index_events_on_track_id, column: :track_id + remove_index :events, name: :index_events_on_type, column: :type + remove_index :events, name: :index_events_on_user_id, column: :user_id + + remove_column :events, :type, :string + remove_column :events, :state, :string + remove_column :events, :track_id, :integer + remove_column :events, :user_id, :integer + end +end