Merge branch 'update_migrations' into rails-v5
This commit is contained in:
commit
4bd0a4823f
52 changed files with 52 additions and 52 deletions
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddIndexesForPaymentAndSupporterQueries < ActiveRecord::Migration
|
class AddIndexesForPaymentAndSupporterQueries < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
Qx.transaction do
|
Qx.transaction do
|
||||||
Qx.execute(%(
|
Qx.execute(%(
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class DropAllCruft < ActiveRecord::Migration
|
class DropAllCruft < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
Qx.execute(%(
|
Qx.execute(%(
|
||||||
DROP FUNCTION IF EXISTS update_payment_donations_search_vectors();
|
DROP FUNCTION IF EXISTS update_payment_donations_search_vectors();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class NormalizeStartAndEndDatetimesForEventsAndCampaigns < ActiveRecord::Migration
|
class NormalizeStartAndEndDatetimesForEventsAndCampaigns < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
add_column :events, :start_datetime, :datetime
|
add_column :events, :start_datetime, :datetime
|
||||||
add_column :events, :end_datetime, :datetime
|
add_column :events, :end_datetime, :datetime
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddDonationCampaignIdIndex < ActiveRecord::Migration
|
class AddDonationCampaignIdIndex < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
Qx.execute(%(
|
Qx.execute(%(
|
||||||
CREATE INDEX IF NOT EXISTS donations_campaign_id ON donations (campaign_id);
|
CREATE INDEX IF NOT EXISTS donations_campaign_id ON donations (campaign_id);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddTheTagJoinsBackupTable < ActiveRecord::Migration
|
class AddTheTagJoinsBackupTable < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
create_table :tag_joins_backup do |t|
|
create_table :tag_joins_backup do |t|
|
||||||
t.integer 'tag_master_id'
|
t.integer 'tag_master_id'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddIndexForTagJoinsAndAddConstraint < ActiveRecord::Migration
|
class AddIndexForTagJoinsAndAddConstraint < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
ids = DeleteTagJoins.find_multiple_tag_joins
|
ids = DeleteTagJoins.find_multiple_tag_joins
|
||||||
DeleteTagJoins.copy_and_delete(ids)
|
DeleteTagJoins.copy_and_delete(ids)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddCustomFieldJoinsBackupTable < ActiveRecord::Migration
|
class AddCustomFieldJoinsBackupTable < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
create_table :custom_field_joins_backup do |t|
|
create_table :custom_field_joins_backup do |t|
|
||||||
t.integer 'custom_field_master_id'
|
t.integer 'custom_field_master_id'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddIndexForCustomFieldJoinAndSupporters < ActiveRecord::Migration
|
class AddIndexForCustomFieldJoinAndSupporters < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
ids = DeleteCustomFieldJoins.find_multiple_custom_field_joins
|
ids = DeleteCustomFieldJoins.find_multiple_custom_field_joins
|
||||||
DeleteCustomFieldJoins.copy_and_delete(ids)
|
DeleteCustomFieldJoins.copy_and_delete(ids)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddInactiveToCard < ActiveRecord::Migration
|
class AddInactiveToCard < ActiveRecord::Migration[4.2]
|
||||||
class Card < ActiveRecord::Base
|
class Card < ActiveRecord::Base
|
||||||
attr_accessible :inactive
|
attr_accessible :inactive
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class CreateExports < ActiveRecord::Migration
|
class CreateExports < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
create_table :exports do |t|
|
create_table :exports do |t|
|
||||||
t.integer :user_id
|
t.integer :user_id
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class CreateMiscellaneousNpInfos < ActiveRecord::Migration
|
class CreateMiscellaneousNpInfos < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
create_table :miscellaneous_np_infos do |t|
|
create_table :miscellaneous_np_infos do |t|
|
||||||
t.string :donate_again_url
|
t.string :donate_again_url
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddCurrencyToNonprofit < ActiveRecord::Migration
|
class AddCurrencyToNonprofit < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :nonprofits, :currency, :string, default: Settings.intntl.currencies[0]
|
add_column :nonprofits, :currency, :string, default: Settings.intntl.currencies[0]
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddChangeAmountMessageToMiscellaneousNpInfos < ActiveRecord::Migration
|
class AddChangeAmountMessageToMiscellaneousNpInfos < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :miscellaneous_np_infos, :change_amount_message, :text
|
add_column :miscellaneous_np_infos, :change_amount_message, :text
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddFirstAndLastNameToSupporter < ActiveRecord::Migration
|
class AddFirstAndLastNameToSupporter < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :supporters, :first_name, :string
|
add_column :supporters, :first_name, :string
|
||||||
add_column :supporters, :last_name, :string
|
add_column :supporters, :last_name, :string
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddTracking < ActiveRecord::Migration
|
class AddTracking < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
create_table :trackings do |t|
|
create_table :trackings do |t|
|
||||||
t.column :utm_campaign, :string, unique: true
|
t.column :utm_campaign, :string, unique: true
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddQueuedForImportAtToDonation < ActiveRecord::Migration
|
class AddQueuedForImportAtToDonation < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :donations, :queued_for_import_at, :datetime, default: nil
|
add_column :donations, :queued_for_import_at, :datetime, default: nil
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddDirectDebitDetail < ActiveRecord::Migration
|
class AddDirectDebitDetail < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
create_table :direct_debit_details do |t|
|
create_table :direct_debit_details do |t|
|
||||||
t.string :iban
|
t.string :iban
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddUtmContentToTrackings < ActiveRecord::Migration
|
class AddUtmContentToTrackings < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :trackings, :utm_content, :string, unique: true
|
add_column :trackings, :utm_content, :string, unique: true
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddLocaleToSupporters < ActiveRecord::Migration
|
class AddLocaleToSupporters < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :supporters, :locale, :string
|
add_column :supporters, :locale, :string
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddPaymentProviderToDonations < ActiveRecord::Migration
|
class AddPaymentProviderToDonations < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :donations, :payment_provider, :string
|
add_column :donations, :payment_provider, :string
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddDirectDebitDetailToCharges < ActiveRecord::Migration
|
class AddDirectDebitDetailToCharges < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :charges, :direct_debit_detail_id, :integer
|
add_column :charges, :direct_debit_detail_id, :integer
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddExternalIdentifierToCampaign < ActiveRecord::Migration
|
class AddExternalIdentifierToCampaign < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :campaigns, :external_identifier, :string
|
add_column :campaigns, :external_identifier, :string
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddIndexToCampaignGifts < ActiveRecord::Migration
|
class AddIndexToCampaignGifts < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_index :campaign_gifts, :campaign_gift_option_id
|
add_index :campaign_gifts, :campaign_gift_option_id
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddIndexToActivities < ActiveRecord::Migration
|
class AddIndexToActivities < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_index :activities, :supporter_id
|
add_index :activities, :supporter_id
|
||||||
add_index :activities, :nonprofit_id
|
add_index :activities, :nonprofit_id
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class ModifySupportersNameIndex < ActiveRecord::Migration
|
class ModifySupportersNameIndex < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
rename_index :supporters, :supporters_name, :supporters_lower_name
|
rename_index :supporters, :supporters_name, :supporters_lower_name
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddSupportersNameIndex < ActiveRecord::Migration
|
class AddSupportersNameIndex < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_index :supporters, :name
|
add_index :supporters, :name
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddChargesPaymentIdIndex < ActiveRecord::Migration
|
class AddChargesPaymentIdIndex < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_index :charges, :payment_id
|
add_index :charges, :payment_id
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddIndexesForSupporterDeletedAndImport < ActiveRecord::Migration
|
class AddIndexesForSupporterDeletedAndImport < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_index :supporters, :deleted
|
add_index :supporters, :deleted
|
||||||
add_index :supporters, :import_id
|
add_index :supporters, :import_id
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class CreatePaymentImports < ActiveRecord::Migration
|
class CreatePaymentImports < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
create_table :payment_imports do |t|
|
create_table :payment_imports do |t|
|
||||||
t.references :user
|
t.references :user
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class CreateDonationsPaymentImportsJoinTable < ActiveRecord::Migration
|
class CreateDonationsPaymentImportsJoinTable < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
create_table :donations_payment_imports, id: false do |t|
|
create_table :donations_payment_imports, id: false do |t|
|
||||||
t.references :donation
|
t.references :donation
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class RemoveUnusedMetadata < ActiveRecord::Migration
|
class RemoveUnusedMetadata < ActiveRecord::Migration[4.2]
|
||||||
TABLES = %i[
|
TABLES = %i[
|
||||||
campaign_gift_options
|
campaign_gift_options
|
||||||
campaign_gifts
|
campaign_gifts
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class RemoveRecurringDonationEventId < ActiveRecord::Migration
|
class RemoveRecurringDonationEventId < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
change_table :recurring_donations do |t|
|
change_table :recurring_donations do |t|
|
||||||
t.remove :event_id
|
t.remove :event_id
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class CreateSourceTokens < ActiveRecord::Migration
|
class CreateSourceTokens < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
create_table :source_tokens, id: false do |t|
|
create_table :source_tokens, id: false do |t|
|
||||||
t.column :token, 'uuid', primary_key: true, null: false
|
t.column :token, 'uuid', primary_key: true, null: false
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AddCardTokenToTicket < ActiveRecord::Migration
|
class AddCardTokenToTicket < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
add_column :tickets, :source_token_id, 'uuid'
|
add_column :tickets, :source_token_id, 'uuid'
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AddIndexesToSupporterNotes < ActiveRecord::Migration
|
class AddIndexesToSupporterNotes < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_index :supporter_notes, :supporter_id, order: { supporter_id: :asc }
|
add_index :supporter_notes, :supporter_id, order: { supporter_id: :asc }
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class ChangeDddSupporterToHolder < ActiveRecord::Migration
|
class ChangeDddSupporterToHolder < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
rename_column :direct_debit_details, :supporter_id, :holder_id
|
rename_column :direct_debit_details, :supporter_id, :holder_id
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class RemoveArticles < ActiveRecord::Migration
|
class RemoveArticles < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
drop_table :articles
|
drop_table :articles
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AddIndexToSupporterIdOnTickets < ActiveRecord::Migration
|
class AddIndexToSupporterIdOnTickets < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_index :tickets, :supporter_id
|
add_index :tickets, :supporter_id
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AddIndexToEventIdOnDonationsAndEvents < ActiveRecord::Migration
|
class AddIndexToEventIdOnDonationsAndEvents < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_index :tickets, :event_id
|
add_index :tickets, :event_id
|
||||||
add_index :donations, :event_id
|
add_index :donations, :event_id
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AddParentCampaignIdToCampaigns < ActiveRecord::Migration
|
class AddParentCampaignIdToCampaigns < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :campaigns, :parent_campaign_id, :integer
|
add_column :campaigns, :parent_campaign_id, :integer
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AddReasonForSupportingToCampaigns < ActiveRecord::Migration
|
class AddReasonForSupportingToCampaigns < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :campaigns, :reason_for_supporting, :text
|
add_column :campaigns, :reason_for_supporting, :text
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AddDefaultReasonForSupportingToCampaigns < ActiveRecord::Migration
|
class AddDefaultReasonForSupportingToCampaigns < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :campaigns, :default_reason_for_supporting, :text
|
add_column :campaigns, :default_reason_for_supporting, :text
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AddBannerImageToCampaigns < ActiveRecord::Migration
|
class AddBannerImageToCampaigns < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :campaigns, :banner_image, :string
|
add_column :campaigns, :banner_image, :string
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AddChargeIdIndexes < ActiveRecord::Migration
|
class AddChargeIdIndexes < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_index :refunds, :charge_id
|
add_index :refunds, :charge_id
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AddPaymentIdToTickets < ActiveRecord::Migration
|
class AddPaymentIdToTickets < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_index :tickets, :payment_id
|
add_index :tickets, :payment_id
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AddIndexesToRefunds < ActiveRecord::Migration
|
class AddIndexesToRefunds < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_index :refunds, :payment_id
|
add_index :refunds, :payment_id
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class CorrectDedications < ActiveRecord::Migration
|
class CorrectDedications < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
execute <<~SQL
|
execute <<~SQL
|
||||||
create or replace function is_valid_json(p_json text)
|
create or replace function is_valid_json(p_json text)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class CorrectDedicationContacts < ActiveRecord::Migration
|
class CorrectDedicationContacts < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
json_dedications = Qx.select('id', 'dedication').from(:donations)
|
json_dedications = Qx.select('id', 'dedication').from(:donations)
|
||||||
.where("dedication IS NOT NULL AND dedication != ''")
|
.where("dedication IS NOT NULL AND dedication != ''")
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AddIndexParentCampaignIdToCampaign < ActiveRecord::Migration
|
class AddIndexParentCampaignIdToCampaign < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_index :campaigns, :parent_campaign_id
|
add_index :campaigns, :parent_campaign_id
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AddIndexesToRecurringDonations < ActiveRecord::Migration
|
class AddIndexesToRecurringDonations < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_index :recurring_donations, :donation_id
|
add_index :recurring_donations, :donation_id
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AddDonationIdIndexToCampaignGifts < ActiveRecord::Migration
|
class AddDonationIdIndexToCampaignGifts < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_index :campaign_gifts, :donation_id
|
add_index :campaign_gifts, :donation_id
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AddIndexToPaymentsCreatedAt < ActiveRecord::Migration
|
class AddIndexToPaymentsCreatedAt < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_index :payments, :created_at
|
add_index :payments, :created_at
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue