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.

Add add migrations from spree_digital to Spree core

Matthew Kennedye7848cf057ff
diff --git a/core/db/migrate/20210929091444_create_spree_digital_links.rb b/core/db/migrate/20210929091444_create_spree_digital_links.rb
new file mode 100644
index 0000000000..7462c10e01
--- /dev/null
+++ b/core/db/migrate/20210929091444_create_spree_digital_links.rb
@@ -0,0 +1,13 @@
+class CreateSpreeDigitalLinks < ActiveRecord::Migration[5.2]
+ def change
+ create_table :spree_digital_links, if_not_exists: true do |t|
+ t.belongs_to :digital
+ t.belongs_to :line_item
+ t.string :secret
+ t.integer :access_counter
+
+ t.timestamps
+ end
+ add_index :spree_digital_links, :secret unless index_exists?(:spree_digital_links, :secret)
+ end
+end
diff --git a/core/db/migrate/20210929093238_create_spree_digitals.rb b/core/db/migrate/20210929093238_create_spree_digitals.rb
new file mode 100644
index 0000000000..45d0bf583e
--- /dev/null
+++ b/core/db/migrate/20210929093238_create_spree_digitals.rb
@@ -0,0 +1,12 @@
+class CreateSpreeDigitals < ActiveRecord::Migration[5.2]
+ def change
+ create_table :spree_digitals, if_not_exists: true do |t|
+ t.belongs_to :variant
+ t.string :attachment_file_name
+ t.string :attachment_content_type
+ t.integer :attachment_file_size
+
+ t.timestamps
+ end
+ end
+end