Skip to content

Commit

Permalink
Set Rails version for migration classes
Browse files Browse the repository at this point in the history
  • Loading branch information
cmfcmf committed May 7, 2018
1 parent 2f7e739 commit 4cf569f
Show file tree
Hide file tree
Showing 60 changed files with 60 additions and 60 deletions.
2 changes: 1 addition & 1 deletion db/migrate/20161101110308_devise_create_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class DeviseCreateUsers < ActiveRecord::Migration
class DeviseCreateUsers < Activerecord::Migration[4.2]
def change
create_table :users do |t|
## Database authenticatable
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161102091145_add_name_to_user.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddNameToUser < ActiveRecord::Migration
class AddNameToUser < Activerecord::Migration[4.2]
def change
add_column :users, :name, :string
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161102131604_create_profiles.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateProfiles < ActiveRecord::Migration
class CreateProfiles < Activerecord::Migration[4.2]
def change
create_table :profiles do |t|
t.string :cv
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161103093520_create_workshops.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateWorkshops < ActiveRecord::Migration
class CreateWorkshops < Activerecord::Migration[4.2]
def change
create_table :workshops do |t|
t.string :name
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161103101916_create_applications.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateApplications < ActiveRecord::Migration
class CreateApplications < Activerecord::Migration[4.2]
def change
create_table :applications do |t|
t.string :motivation
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161103103151_create_requests.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateRequests < ActiveRecord::Migration
class CreateRequests < Activerecord::Migration[4.2]
def change
create_table :requests do |t|
t.string :topics
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RenameApplicationsToApplicationLetters < ActiveRecord::Migration
class RenameApplicationsToApplicationLetters < Activerecord::Migration[4.2]
def change
rename_table :applications, :application_letters
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class MakeForeignKeysNotNullable < ActiveRecord::Migration
class MakeForeignKeysNotNullable < Activerecord::Migration[4.2]
def change
change_column_null(:application_letters, :user_id, false)
change_column_null(:application_letters, :workshop_id, false)
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161114195923_add_private_data_to_profile.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddPrivateDataToProfile < ActiveRecord::Migration
class AddPrivateDataToProfile < Activerecord::Migration[4.2]
def change
add_column :profiles, :first_name, :string
add_column :profiles, :last_name, :string
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161116092838_add_role_to_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddRoleToUsers < ActiveRecord::Migration
class AddRoleToUsers < Activerecord::Migration[4.2]
def change
add_column :users, :role, :string
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddStatusToApplicationLetter < ActiveRecord::Migration
class AddStatusToApplicationLetter < Activerecord::Migration[4.2]
def change
add_column :application_letters, :status, :boolean
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161122144126_create_application_notes.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateApplicationNotes < ActiveRecord::Migration
class CreateApplicationNotes < Activerecord::Migration[4.2]
def change
create_table :application_notes do |t|
t.text :note
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddAdditionalInformationToApplicationLetter < ActiveRecord::Migration
class AddAdditionalInformationToApplicationLetter < Activerecord::Migration[4.2]
def change
add_column :application_letters, :grade, :integer
add_column :application_letters, :experience, :string
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161123124500_change_workshop_to_event.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class ChangeWorkshopToEvent < ActiveRecord::Migration
class ChangeWorkshopToEvent < Activerecord::Migration[4.2]
def change
rename_table :workshops, :events
rename_column :application_letters, :workshop_id, :event_id
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161125123712_add_date_ranges_to_event.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddDateRangesToEvent < ActiveRecord::Migration
class AddDateRangesToEvent < Activerecord::Migration[4.2]
def change
create_table :date_ranges do |t|
t.date :start_date
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161125164958_create_agreement_letters.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateAgreementLetters < ActiveRecord::Migration
class CreateAgreementLetters < Activerecord::Migration[4.2]
def change
create_table :agreement_letters do |t|
t.references :user, index: true, foreign_key: true, null:false
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161126113138_add_kind_to_events.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddKindToEvents < ActiveRecord::Migration
class AddKindToEvents < Activerecord::Migration[4.2]
def change
add_column :events, :kind, :integer, default: 0
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161126190339_add_draft_to_events.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddDraftToEvents < ActiveRecord::Migration
class AddDraftToEvents < Activerecord::Migration[4.2]
def change
add_column :events, :draft, :boolean
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161129110700_add_organizer_to_workshops.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddOrganizerToWorkshops < ActiveRecord::Migration
class AddOrganizerToWorkshops < Activerecord::Migration[4.2]
def self.up
add_column :events, :organizer, :string unless column_exists?(:events, :organizer)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddKnowledgeLevelToWorkshops < ActiveRecord::Migration
class AddKnowledgeLevelToWorkshops < Activerecord::Migration[4.2]
def self.up
add_column :events, :knowledge_level, :string unless column_exists?(:events, :knowledge_level)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddDefaultValueToApplicationStatus < ActiveRecord::Migration
class AddDefaultValueToApplicationStatus < Activerecord::Migration[4.2]
def change
change_column :application_letters, :status, 'integer USING CAST(status AS integer)', default: 2
change_column_null :application_letters, :status, false, 2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RemoveCVandEmailFromProfile < ActiveRecord::Migration
class RemoveCVandEmailFromProfile < Activerecord::Migration[4.2]
def change
remove_column :profiles, :cv, :string
remove_column :profiles, :email, :string
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161129131315_rename_tutor_to_coach.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RenameTutorToCoach < ActiveRecord::Migration
class RenameTutorToCoach < Activerecord::Migration[4.2]
def up
execute "UPDATE users SET role = 'coach' WHERE role = 'tutor'"
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddApplicationDeadlineToEvents < ActiveRecord::Migration
class AddApplicationDeadlineToEvents < Activerecord::Migration[4.2]
def change
add_column :events, :application_deadline, :date
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddApplicationStatusLockedToEvents < ActiveRecord::Migration
class AddApplicationStatusLockedToEvents < Activerecord::Migration[4.2]
def change
add_column :events, :application_status_locked, :boolean
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161209180054_remove_active_from_event.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RemoveActiveFromEvent < ActiveRecord::Migration
class RemoveActiveFromEvent < Activerecord::Migration[4.2]
def change
remove_column :events, :active, :boolean
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161222154024_remove_name_from_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RemoveNameFromUsers < ActiveRecord::Migration
class RemoveNameFromUsers < Activerecord::Migration[4.2]
def change
remove_column :users, :name, :string
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170104135212_add_fields_to_requests.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddFieldsToRequests < ActiveRecord::Migration
class AddFieldsToRequests < Activerecord::Migration[4.2]
def change
remove_column :requests, :topics, :string
remove_column :requests, :user_id, :integer
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170107140419_create_email_templates.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateEmailTemplates < ActiveRecord::Migration
class CreateEmailTemplates < Activerecord::Migration[4.2]
def change
create_table :email_templates do |t|
t.integer :status
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170108122417_add_status_to_requests.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddStatusToRequests < ActiveRecord::Migration
class AddStatusToRequests < Activerecord::Migration[4.2]
def change
add_column :requests, :status, :integer, default: 0
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddUnlimitedParticipantsToEvents < ActiveRecord::Migration
class AddUnlimitedParticipantsToEvents < Activerecord::Migration[4.2]
def change
add_column :events, :participants_are_unlimited, :boolean, default: false
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170111135212_rename_draft_to_published.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RenameDraftToPublished < ActiveRecord::Migration
class RenameDraftToPublished < Activerecord::Migration[4.2]
def change
reversible do |dir|
dir.up do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddCustomApplicationFieldsToEvent < ActiveRecord::Migration
class AddCustomApplicationFieldsToEvent < Activerecord::Migration[4.2]
def change
add_column :events, :custom_application_fields, :text
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170114132153_change_address_fields.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class ChangeAddressFields < ActiveRecord::Migration
class ChangeAddressFields < Activerecord::Migration[4.2]
def change
rename_column :requests, :address, :street
add_column :requests, :zip_code_city, :string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddCustomApplicationFieldsToApplicationLetters < ActiveRecord::Migration
class AddCustomApplicationFieldsToApplicationLetters < Activerecord::Migration[4.2]
def change
add_column :application_letters, :custom_application_fields, :text
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RenameVegeterianToVegetarian < ActiveRecord::Migration
class RenameVegeterianToVegetarian < Activerecord::Migration[4.2]
def change
rename_column :application_letters, :vegeterian, :vegetarian
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddContactPersonToRequests < ActiveRecord::Migration
class AddContactPersonToRequests < Activerecord::Migration[4.2]
def change
add_column :requests, :contact_person, :string
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class ChangeRequestDescriptionToTextfield < ActiveRecord::Migration
class ChangeRequestDescriptionToTextfield < Activerecord::Migration[4.2]
def change
change_column :events, :description, :text
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170122191752_create_participant_groups.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateParticipantGroups < ActiveRecord::Migration
class CreateParticipantGroups < Activerecord::Migration[4.2]
def change
create_table :participant_groups do |t|
t.references :user, index: true, foreign_key: true
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170123161527_add_hidden_to_event.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddHiddenToEvent < ActiveRecord::Migration
class AddHiddenToEvent < Activerecord::Migration[4.2]
def change
add_column :events, :hidden, :boolean
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170123205418_add_notes_to_requests.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddNotesToRequests < ActiveRecord::Migration
class AddNotesToRequests < Activerecord::Migration[4.2]
def change
add_column :requests, :notes, :text
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddAnnotationToApplicationLetters < ActiveRecord::Migration
class AddAnnotationToApplicationLetters < Activerecord::Migration[4.2]
def change
add_column :application_letters, :annotation, :text
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170125201341_add_image_to_events.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddImageToEvents < ActiveRecord::Migration
class AddImageToEvents < Activerecord::Migration[4.2]
def change
add_column :events, :image, :string
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddDiscoveryOfSiteToProfiles < ActiveRecord::Migration
class AddDiscoveryOfSiteToProfiles < Activerecord::Migration[4.2]
def change
add_column :profiles, :discovery_of_site, :text
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170201110130_remove_school_from_profile.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RemoveSchoolFromProfile < ActiveRecord::Migration
class RemoveSchoolFromProfile < Activerecord::Migration[4.2]
def change
remove_column :profiles, :school, :string
remove_column :profiles, :graduates_school_in, :string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RemoveExperienceFromApplicationLetters < ActiveRecord::Migration
class RemoveExperienceFromApplicationLetters < Activerecord::Migration[4.2]
def change
remove_column :application_letters, :experience, :string
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddDefaultValueToPublished < ActiveRecord::Migration
class AddDefaultValueToPublished < Activerecord::Migration[4.2]
def up
change_column :events, :published, :boolean, :default => false
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170201132359_add_default_value_to_hidden.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddDefaultValueToHidden < ActiveRecord::Migration
class AddDefaultValueToHidden < Activerecord::Migration[4.2]
def up
change_column :events, :hidden, :boolean, :default => false
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170201141415_remove_kind_from_events.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RemoveKindFromEvents < ActiveRecord::Migration
class RemoveKindFromEvents < Activerecord::Migration[4.2]
def change
remove_column :events, :kind, :string
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RemoveParticipantsAreUnlimitedFromEvents < ActiveRecord::Migration
class RemoveParticipantsAreUnlimitedFromEvents < Activerecord::Migration[4.2]
def change
remove_column :events, :participants_are_unlimited, :boolean
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RemoveAllergicFromApplicationLetter < ActiveRecord::Migration
class RemoveAllergicFromApplicationLetter < Activerecord::Migration[4.2]
def change
remove_column :application_letters, :allergic
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RemoveApplicationStatusLockedFromEvents < ActiveRecord::Migration
class RemoveApplicationStatusLockedFromEvents < Activerecord::Migration[4.2]
def change
remove_column :events, :application_status_locked, :boolean
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddRejectionsHaveBeenSentToEvents < ActiveRecord::Migration
class AddRejectionsHaveBeenSentToEvents < Activerecord::Migration[4.2]
def change
add_column :events, :rejections_have_been_sent, :boolean, default: false
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddAcceptancesHaveBeenSentToEvents < ActiveRecord::Migration
class AddAcceptancesHaveBeenSentToEvents < Activerecord::Migration[4.2]
def change
add_column :events, :acceptances_have_been_sent, :boolean, default: false
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RemoveFieldsFromApplication < ActiveRecord::Migration
class RemoveFieldsFromApplication < Activerecord::Migration[4.2]
def change
remove_column :application_letters, :grade, :integer
remove_column :application_letters, :coding_skills, :string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddStatusNotificationSentToApplicationLetters < ActiveRecord::Migration
class AddStatusNotificationSentToApplicationLetters < Activerecord::Migration[4.2]
def change
add_column :application_letters, :status_notification_sent, :boolean, default: false, null: false
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170207133819_add_custom_image_to_events.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddCustomImageToEvents < ActiveRecord::Migration
class AddCustomImageToEvents < Activerecord::Migration[4.2]
def change
add_column :events, :custom_image, :string
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170605080836_add_omniauth_to_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddOmniauthToUsers < ActiveRecord::Migration
class AddOmniauthToUsers < Activerecord::Migration[4.2]
def change
add_column :users, :provider, :string
add_column :users, :uid, :string
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20180423164856_add_grade_to_requests.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddGradeToRequests < ActiveRecord::Migration
class AddGradeToRequests < Activerecord::Migration[4.2]
def change
add_column :requests, :grade, :string
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20180423170641_rename_address.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RenameAddress < ActiveRecord::Migration
class RenameAddress < Activerecord::Migration[4.2]
def change
rename_column :requests, :street, :school_street
rename_column :requests, :zip_code_city, :school_zip_code_city
Expand Down

0 comments on commit 4cf569f

Please sign in to comment.