Skip to content

Commit 54877a2

Browse files
committed
Fix migrations for MariaDB/MySQL
1 parent c665d31 commit 54877a2

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

db/migrate/20210417204426_create_solidus_configurable_kits_requirements.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
class CreateSolidusConfigurableKitsRequirements < ActiveRecord::Migration[5.2]
22
def change
33
create_table :solidus_configurable_kits_requirements do |t|
4-
t.references :product, null: false, foreign_key: { to_table: :spree_products },
4+
t.references :product, type: :integer, null: false, foreign_key: { to_table: :spree_products },
55
index: { name: :index_solidus_kit_products }
6-
t.references :required_product, null: false, foreign_key: { to_table: :spree_products },
6+
t.references :required_product, type: :integer, null: false, foreign_key: { to_table: :spree_products },
77
index: { name: :index_solidus_kit_requirements }
88
t.string :name
99
t.text :description
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class AddKitItemIdToSpreeLineItems < ActiveRecord::Migration[5.2]
22
def change
3-
add_reference :spree_line_items, :kit_item, foreign_key: { to_table: :spree_line_items },
3+
add_reference :spree_line_items, :kit_item, type: :integer, foreign_key: { to_table: :spree_line_items },
44
index: { name: :index_line_item_kit_items }
55
end
66
end

docker-compose.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
services:
2+
mariadb:
3+
image: mariadb:10.6
4+
environment:
5+
MYSQL_ROOT_PASSWORD: S3cret
6+
MYSQL_DATABASE: mydatabase
7+
MYSQL_USER: user
8+
MYSQL_PASSWORD: S3cret
9+
volumes:
10+
- mariadb-data:/var/lib/mysql
11+
ports:
12+
- "3306:3306"
13+
volumes:
14+
mariadb-data:

0 commit comments

Comments
 (0)