Remove migrations warning
DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration is deprecated. Please specify the Rails release the migration was written for: class MigrationClass < ActiveRecord::Migration[4.2] (called from require at bin/rails:4)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
class CreateDebates < ActiveRecord::Migration
|
||||
class CreateDebates < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :debates do |t|
|
||||
t.string :title
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class RemoveExternalLinkFromDebates < ActiveRecord::Migration
|
||||
class RemoveExternalLinkFromDebates < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
remove_column :debates, :external_link
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class DeviseCreateUsers < ActiveRecord::Migration
|
||||
class DeviseCreateUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table(:users) do |t|
|
||||
## Database authenticatable
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddFirstNameAndLastNameToUsers < ActiveRecord::Migration
|
||||
class AddFirstNameAndLastNameToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :first_name, :string
|
||||
add_column :users, :last_name, :string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class ActsAsVotableMigration < ActiveRecord::Migration
|
||||
class ActsAsVotableMigration < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :votes do |t|
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# This migration comes from acts_as_taggable_on_engine (originally 1)
|
||||
class ActsAsTaggableOnMigration < ActiveRecord::Migration
|
||||
class ActsAsTaggableOnMigration < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :tags do |t|
|
||||
t.string :name
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# This migration comes from acts_as_taggable_on_engine (originally 3)
|
||||
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration
|
||||
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
add_column :tags, :taggings_count, :integer, default: 0
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class ActsAsCommentableWithThreadingMigration < ActiveRecord::Migration
|
||||
class ActsAsCommentableWithThreadingMigration < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :comments, force: true do |t|
|
||||
t.integer :commentable_id
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddConfirmableToDeviseForUsers < ActiveRecord::Migration
|
||||
class AddConfirmableToDeviseForUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
# Confirmable
|
||||
add_column :users, :confirmation_token, :string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateVisits < ActiveRecord::Migration
|
||||
class CreateVisits < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :visits, id: false do |t|
|
||||
t.uuid :id, default: nil, primary_key: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateAhoyEvents < ActiveRecord::Migration
|
||||
class CreateAhoyEvents < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :ahoy_events, id: false do |t|
|
||||
t.uuid :id, default: nil, primary_key: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class ChangeDebatesTitleLength < ActiveRecord::Migration
|
||||
class ChangeDebatesTitleLength < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
change_column :debates, :title, :string, limit: 80
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddNicknameToUser < ActiveRecord::Migration
|
||||
class AddNicknameToUser < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :nickname, :string
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddUseNicknameToUsers < ActiveRecord::Migration
|
||||
class AddUseNicknameToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :use_nickname, :boolean, null: false, default: false
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddPreferencesToUsers < ActiveRecord::Migration
|
||||
class AddPreferencesToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :email_on_debate_comment, :boolean, default: false
|
||||
add_column :users, :email_on_comment_reply, :boolean, default: false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateAdministrators < ActiveRecord::Migration
|
||||
class CreateAdministrators < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :administrators do |t|
|
||||
t.belongs_to :user, index: true, foreign_key: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateModerators < ActiveRecord::Migration
|
||||
class CreateModerators < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :moderators do |t|
|
||||
t.belongs_to :user, index: true, foreign_key: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddIpToAhoyEvent < ActiveRecord::Migration
|
||||
class AddIpToAhoyEvent < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :ahoy_events, :ip, :string
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddVisitIdToDebate < ActiveRecord::Migration
|
||||
class AddVisitIdToDebate < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :debates, :visit_id, :string
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateSimpleCaptchaData < ActiveRecord::Migration
|
||||
class CreateSimpleCaptchaData < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :simple_captcha_data do |t|
|
||||
t.string :key, limit: 40
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddHiddenAtToComments < ActiveRecord::Migration
|
||||
class AddHiddenAtToComments < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :comments, :hidden_at, :datetime
|
||||
add_index :comments, :hidden_at
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddHiddenAtToDebates < ActiveRecord::Migration
|
||||
class AddHiddenAtToDebates < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :debates, :hidden_at, :datetime
|
||||
add_index :debates, :hidden_at
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddChildrenCountToComments < ActiveRecord::Migration
|
||||
class AddChildrenCountToComments < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
add_column :comments, :children_count, :integer, default: 0
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateOrganizations < ActiveRecord::Migration
|
||||
class CreateOrganizations < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :organizations do |t|
|
||||
t.belongs_to :user, index: true, foreign_key: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddPhoneNumberToUsers < ActiveRecord::Migration
|
||||
class AddPhoneNumberToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :phone_number, :string, limit: 30
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddOfficialPositionToUser < ActiveRecord::Migration
|
||||
class AddOfficialPositionToUser < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :official_position, :string
|
||||
add_column :users, :official_level, :integer, default: 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddFeaturedToTags < ActiveRecord::Migration
|
||||
class AddFeaturedToTags < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :tags, :featured, :boolean, default: false
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddSettings < ActiveRecord::Migration
|
||||
class AddSettings < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :settings do |t|
|
||||
t.string :key
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddHiddenAtToUsers < ActiveRecord::Migration
|
||||
class AddHiddenAtToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :hidden_at, :datetime
|
||||
add_index :users, :hidden_at
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddSmsVerificationCodeToUsers < ActiveRecord::Migration
|
||||
class AddSmsVerificationCodeToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :sms_verification_code, :string
|
||||
add_column :users, :sms_verified_at, :datetime
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddPhoneToUsers < ActiveRecord::Migration
|
||||
class AddPhoneToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :phone, :string
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateInappropiateFlags < ActiveRecord::Migration
|
||||
class CreateInappropiateFlags < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :inappropiate_flags do |t|
|
||||
t.belongs_to :user, index: true, foreign_key: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddInappropiateFlagFieldsToComments < ActiveRecord::Migration
|
||||
class AddInappropiateFlagFieldsToComments < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :comments, :flagged_as_inappropiate_at, :datetime
|
||||
add_column :comments, :inappropiate_flags_count, :integer, default: 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddInappropiateFlagFieldsToDebates < ActiveRecord::Migration
|
||||
class AddInappropiateFlagFieldsToDebates < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :debates, :flagged_as_inappropiate_at, :datetime
|
||||
add_column :debates, :inappropiate_flags_count, :integer, default: 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class ChangesUserRegistrationsFields < ActiveRecord::Migration
|
||||
class ChangesUserRegistrationsFields < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :username, :string
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddReviewedAtToComments < ActiveRecord::Migration
|
||||
class AddReviewedAtToComments < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :comments, :reviewed_at, :datetime
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddReviewedAtToDebates < ActiveRecord::Migration
|
||||
class AddReviewedAtToDebates < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :debates, :reviewed_at, :datetime
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateVerifiedUsers < ActiveRecord::Migration
|
||||
class CreateVerifiedUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
unless ActiveRecord::Base.connection.data_source_exists?("verified_users")
|
||||
create_table :verified_users do |t|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddDocumentToUsers < ActiveRecord::Migration
|
||||
class AddDocumentToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :document_number, :string
|
||||
add_column :users, :document_type, :string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddResidenceVerifiedAtToUsers < ActiveRecord::Migration
|
||||
class AddResidenceVerifiedAtToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :residence_verified_at, :datetime
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddLetterToUsers < ActiveRecord::Migration
|
||||
class AddLetterToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :letter_requested, :boolean, default: false
|
||||
add_column :users, :letter_sent_at, :datetime
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddEmailVerifiedAtToUsers < ActiveRecord::Migration
|
||||
class AddEmailVerifiedAtToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :email_verified_at, :datetime
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddEmailVerificationToUsers < ActiveRecord::Migration
|
||||
class AddEmailVerificationToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :email_verification_token, :string
|
||||
add_column :users, :email_for_verification, :string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddVerifiedUserSmsVerifiedAtToUsers < ActiveRecord::Migration
|
||||
class AddVerifiedUserSmsVerifiedAtToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :verified_user_sms_verified_at, :datetime
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddModeratorIdToComment < ActiveRecord::Migration
|
||||
class AddModeratorIdToComment < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :comments, :moderator_id, :integer, default: nil
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddAdministratorIdToComment < ActiveRecord::Migration
|
||||
class AddAdministratorIdToComment < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :comments, :administrator_id, :integer, default: nil
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateIdentities < ActiveRecord::Migration
|
||||
class CreateIdentities < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :identities do |t|
|
||||
t.references :user, index: true, foreign_key: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddsVotableCacheFieldToComments < ActiveRecord::Migration
|
||||
class AddsVotableCacheFieldToComments < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :comments, :cached_votes_total, :integer, default: 0
|
||||
add_column :comments, :cached_votes_up, :integer, default: 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddsVotableCacheFieldToDebates < ActiveRecord::Migration
|
||||
class AddsVotableCacheFieldToDebates < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :debates, :cached_votes_total, :integer, default: 0
|
||||
add_column :debates, :cached_votes_up, :integer, default: 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddSmsTriedToUsers < ActiveRecord::Migration
|
||||
class AddSmsTriedToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :sms_tries, :integer, default: 0
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddResidenceVerificationTriesToUsers < ActiveRecord::Migration
|
||||
class AddResidenceVerificationTriesToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :residence_verification_tries, :integer, default: 0
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateAddresses < ActiveRecord::Migration
|
||||
class CreateAddresses < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :addresses do |t|
|
||||
t.integer :user_id
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class RenameReviewedAtToArchivedAtInCommentsAndDebates < ActiveRecord::Migration
|
||||
class RenameReviewedAtToArchivedAtInCommentsAndDebates < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
rename_column :comments, :reviewed_at, :archived_at
|
||||
rename_column :debates, :reviewed_at, :archived_at
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddCommentsCountToDebate < ActiveRecord::Migration
|
||||
class AddCommentsCountToDebate < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :debates, :comments_count, :integer, default: 0
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class RefactorVerificationColumns < ActiveRecord::Migration
|
||||
class RefactorVerificationColumns < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
rename_column :users, :sms_verification_code, :sms_confirmation_code
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class RenameInappropiateFlagsAsFlags < ActiveRecord::Migration
|
||||
class RenameInappropiateFlagsAsFlags < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
rename_table :inappropiate_flags, :flags
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class RenameArchivedAtToIgnoredFlagAtInCommentsAndDebates < ActiveRecord::Migration
|
||||
class RenameArchivedAtToIgnoredFlagAtInCommentsAndDebates < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
rename_column :comments, :archived_at, :ignored_flag_at
|
||||
rename_column :debates, :archived_at, :ignored_flag_at
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddConfirmedHideAtToCommentsAndDebates < ActiveRecord::Migration
|
||||
class AddConfirmedHideAtToCommentsAndDebates < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :debates, :confirmed_hide_at, :datetime
|
||||
add_column :comments, :confirmed_hide_at, :datetime
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class RenameInappropiateFlagsCountToFlagsCountInDebatesAndComments < ActiveRecord::Migration
|
||||
class RenameInappropiateFlagsCountToFlagsCountInDebatesAndComments < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
rename_column :debates, :inappropiate_flags_count, :flags_count
|
||||
rename_column :comments, :inappropiate_flags_count, :flags_count
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class RemoveFlaggedAsInappropiateAtFromCommentsAndDebates < ActiveRecord::Migration
|
||||
class RemoveFlaggedAsInappropiateAtFromCommentsAndDebates < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
remove_column :debates, :flagged_as_inappropiate_at
|
||||
remove_column :comments, :flagged_as_inappropiate_at
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddConfirmedHideAtToUsers < ActiveRecord::Migration
|
||||
class AddConfirmedHideAtToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :confirmed_hide_at, :datetime
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddCachedAnonymousVotesTotalToDebate < ActiveRecord::Migration
|
||||
class AddCachedAnonymousVotesTotalToDebate < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :debates, :cached_anonymous_votes_total, :integer, default: 0
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddAncestryToComments < ActiveRecord::Migration
|
||||
class AddAncestryToComments < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :comments, :ancestry, :string
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class RemoveParentIdFromComments < ActiveRecord::Migration
|
||||
class RemoveParentIdFromComments < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
Comment.build_ancestry_from_parent_ids! rescue nil
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddLetterVerificationCodeToUsers < ActiveRecord::Migration
|
||||
class AddLetterVerificationCodeToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :letter_verification_code, :string
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class RemoveChildrenCountFromComments < ActiveRecord::Migration
|
||||
class RemoveChildrenCountFromComments < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
remove_column :comments, :children_count, :integer, default: 0
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddCachedVotesScoreToDebate < ActiveRecord::Migration
|
||||
class AddCachedVotesScoreToDebate < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :debates, :cached_votes_score, :integer, default: 0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddHotScoreToDebates < ActiveRecord::Migration
|
||||
class AddHotScoreToDebates < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :debates, :hot_score, :bigint, default: 0
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateDelayedJobs < ActiveRecord::Migration
|
||||
class CreateDelayedJobs < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :delayed_jobs, force: true do |table|
|
||||
table.integer :priority, default: 0, null: false # Allows some jobs to jump to the front of the queue
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddHotScoreIndexToDebates < ActiveRecord::Migration
|
||||
class AddHotScoreIndexToDebates < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_index(:debates, :hot_score)
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddConfidenceScoreToDebates < ActiveRecord::Migration
|
||||
class AddConfidenceScoreToDebates < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :debates, :confidence_score, :integer, default: 0
|
||||
add_index :debates, :confidence_score
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class SetUsernameLimit < ActiveRecord::Migration
|
||||
class SetUsernameLimit < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
execute "ALTER TABLE users ALTER COLUMN username TYPE VARCHAR(60) USING SUBSTR(username, 1, 60)"
|
||||
change_column :users, :username, :string, limit: 60
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class RemoveCommentTitle < ActiveRecord::Migration
|
||||
class RemoveCommentTitle < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
remove_column :comments, :title, :string
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class SetOrganizationNameLimit < ActiveRecord::Migration
|
||||
class SetOrganizationNameLimit < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
execute "ALTER TABLE organizations ALTER COLUMN name TYPE VARCHAR(60) USING SUBSTR(name, 1, 60)"
|
||||
change_column :organizations, :name, :string, limit: 60
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class SetTagNameLimit < ActiveRecord::Migration
|
||||
class SetTagNameLimit < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
execute "ALTER TABLE tags ALTER COLUMN name TYPE VARCHAR(40) USING SUBSTR(name, 1, 40)"
|
||||
change_column :tags, :name, :string, limit: 40
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateFailedCensusCalls < ActiveRecord::Migration
|
||||
class CreateFailedCensusCalls < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :failed_census_calls do |t|
|
||||
t.belongs_to :user, index: true, foreign_key: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddLetterVerificationTriesToUsers < ActiveRecord::Migration
|
||||
class AddLetterVerificationTriesToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :letter_verification_tries, :integer, default: 0
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateLocks < ActiveRecord::Migration
|
||||
class CreateLocks < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :locks do |t|
|
||||
t.references :user, index: true, foreign_key: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class RemoveVerificationTriesFromUsers < ActiveRecord::Migration
|
||||
class RemoveVerificationTriesFromUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
remove_column :users, :sms_confirmation_tries, :integer, default: 0
|
||||
remove_column :users, :residence_verification_tries, :integer, default: 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateProposal < ActiveRecord::Migration
|
||||
class CreateProposal < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :proposals do |t|
|
||||
t.string "title", limit: 80
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddResponsibleNameToOrganizations < ActiveRecord::Migration
|
||||
class AddResponsibleNameToOrganizations < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
add_column :organizations, :responsible_name, :string, limit: 60
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddResponsibleToProposals < ActiveRecord::Migration
|
||||
class AddResponsibleToProposals < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :proposals, :responsible_name, :string, limit: 60
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class ChangeEmailConfigFieldInUser < ActiveRecord::Migration
|
||||
class ChangeEmailConfigFieldInUser < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
rename_column :users, :email_on_debate_comment, :email_on_comment
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddSummaryToProposals < ActiveRecord::Migration
|
||||
class AddSummaryToProposals < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :proposals, :summary, :text, limit: 280
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddMoreIndexesForAhoy < ActiveRecord::Migration
|
||||
class AddMoreIndexesForAhoy < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_index :ahoy_events, [:name, :time]
|
||||
add_index :visits, [:started_at]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddsIndexes < ActiveRecord::Migration
|
||||
class AddsIndexes < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_index :debates, :author_id
|
||||
add_index :debates, [:author_id, :hidden_at]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddIndexesForSearches < ActiveRecord::Migration
|
||||
class AddIndexesForSearches < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_index :debates, :title
|
||||
# add_index :debates, :description
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddVideoUrlToProposal < ActiveRecord::Migration
|
||||
class AddVideoUrlToProposal < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :proposals, :video_url, :string
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddExtraCountersToTags < ActiveRecord::Migration
|
||||
class AddExtraCountersToTags < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :tags, :debates_count, :integer, default: 0
|
||||
add_column :tags, :proposals_count, :integer, default: 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateActivities < ActiveRecord::Migration
|
||||
class CreateActivities < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :activities do |t|
|
||||
t.integer :user_id
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddFailedCensusCallsCounterCacheToUsers < ActiveRecord::Migration
|
||||
class AddFailedCensusCallsCounterCacheToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :failed_census_calls_count, :integer, default: 0
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class DropAddressesTable < ActiveRecord::Migration
|
||||
class DropAddressesTable < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
drop_table :addresses
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddsResilientLockedUntilDefault < ActiveRecord::Migration
|
||||
class AddsResilientLockedUntilDefault < ActiveRecord::Migration[4.2]
|
||||
|
||||
def up
|
||||
change_column_default :locks, :locked_until, Time.new(2000, 1, 1, 1, 1, 1)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateNotifications < ActiveRecord::Migration
|
||||
class CreateNotifications < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :notifications do |t|
|
||||
t.belongs_to :user, index: true, foreign_key: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateManagers < ActiveRecord::Migration
|
||||
class CreateManagers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :managers do |t|
|
||||
t.string :username, null: false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddUnconfirmedDocumentNumberToUser < ActiveRecord::Migration
|
||||
class AddUnconfirmedDocumentNumberToUser < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :unconfirmed_document_number, :string
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class RemoveUnconfirmedDocumentNumberFromUser < ActiveRecord::Migration
|
||||
class RemoveUnconfirmedDocumentNumberFromUser < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
remove_column :users, :unconfirmed_document_number, :string
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddLevelTwoVerifiedAtToUsers < ActiveRecord::Migration
|
||||
class AddLevelTwoVerifiedAtToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :level_two_verified_at, :datetime
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class DestroyManager < ActiveRecord::Migration
|
||||
class DestroyManager < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
drop_table :managers
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddEraseReasonToUsers < ActiveRecord::Migration
|
||||
class AddEraseReasonToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :erase_reason, :string
|
||||
end
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user