Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Downgrade migrations to Rails 6.1

Stefan Vermaas39a2b93e890d
diff --git a/api/db/migrate/20221221122100_add_secret_key_to_spree_webhooks_subscribers.rb b/api/db/migrate/20221221122100_add_secret_key_to_spree_webhooks_subscribers.rb
index e41defa10a..f7a4ab01b5 100644
--- a/api/db/migrate/20221221122100_add_secret_key_to_spree_webhooks_subscribers.rb
+++ b/api/db/migrate/20221221122100_add_secret_key_to_spree_webhooks_subscribers.rb
@@ -1,4 +1,4 @@
-class AddSecretKeyToSpreeWebhooksSubscribers < ActiveRecord::Migration[7.0]
+class AddSecretKeyToSpreeWebhooksSubscribers < ActiveRecord::Migration[6.1]
def change
add_column :spree_webhooks_subscribers, :secret_key, :string, null: true
end
diff --git a/api/db/migrate/20230116204600_backfill_secret_key_for_spree_webhooks_subscribers.rb b/api/db/migrate/20230116204600_backfill_secret_key_for_spree_webhooks_subscribers.rb
index cb80ba6c38..4438b94247 100644
--- a/api/db/migrate/20230116204600_backfill_secret_key_for_spree_webhooks_subscribers.rb
+++ b/api/db/migrate/20230116204600_backfill_secret_key_for_spree_webhooks_subscribers.rb
@@ -1,4 +1,4 @@
-class BackfillSecretKeyForSpreeWebhooksSubscribers < ActiveRecord::Migration[7.0]
+class BackfillSecretKeyForSpreeWebhooksSubscribers < ActiveRecord::Migration[6.1]
def change
Spree::Webhooks::Subscriber.where(secret_key: nil).find_each(&:regenerate_secret_key)
end
diff --git a/api/db/migrate/20230116205000_change_secret_key_to_non_null_column.rb b/api/db/migrate/20230116205000_change_secret_key_to_non_null_column.rb
index 3b4d60e007..3aef2cf72d 100644
--- a/api/db/migrate/20230116205000_change_secret_key_to_non_null_column.rb
+++ b/api/db/migrate/20230116205000_change_secret_key_to_non_null_column.rb
@@ -1,4 +1,4 @@
-class ChangeSecretKeyToNonNullColumn < ActiveRecord::Migration[7.0]
+class ChangeSecretKeyToNonNullColumn < ActiveRecord::Migration[6.1]
def change
change_column_null :spree_webhooks_subscribers, :secret_key, false
end