jigsaw_engine 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ef8b377b4e0adf48debf601a0275f21fa887b5411de9d268a2513c27b0bb594
4
- data.tar.gz: b8bfe61bd334c43c63137e4b3fce8afd5bb951fd517bf1e0396ed3f199b8636e
3
+ metadata.gz: e8d01272d6ca20684009e4dbccc9985b8c53fc9f4979bb5e392112846eedc9b7
4
+ data.tar.gz: a350e9dee0a165d19b0262bfbbb1f36800d2018b87e6a715a60349c8a6a3cb26
5
5
  SHA512:
6
- metadata.gz: 9d1da80a238c9097123119a2efdfb21b85b49a16414ff1cb85a3dbf121b8cbb45e9fc6c10117811cd6c4af301d10398720dd4ea476ee9d76537a283e94bf84bd
7
- data.tar.gz: 4969c358733b4ba3f77c08cbb3d3b7c1c629b3675f3fb24af122264fd12dbcbbcec432daf79a4d32ce7a419a9a360340ad6a05de5104bbcb66950258804a26ca
6
+ metadata.gz: f946c33b8944c75db5e4dc88949b20e420b3fb9c696870721990d0f46feb0fb74bba4f88ecf8fb7fd3b09e5a4f38929a83b838c2820c9960058841785889a8f5
7
+ data.tar.gz: 03b2820a821262a966b34c599f9fcd598d565cd0f4c82d315157f1e4c2504b61207ec9727b5ea90b307fcdcf4d859b73d2e2a3c2a652400ecacb1f7aca1f2af5
@@ -82,23 +82,28 @@ class RefactorTemplatesToLayoutAndSlotTemplates < ActiveRecord::Migration[8.0]
82
82
  add_reference :jigsaw_slots, :slot_template, foreign_key: { to_table: :jigsaw_slot_templates }, null: true
83
83
 
84
84
  # --- acts-as-taggable-on tables ---
85
- create_table :tags do |t|
86
- t.string :name
87
- t.timestamps
85
+ # Guard against host apps that already have these tables (e.g. via acts-as-taggable-on)
86
+ unless table_exists?(:tags)
87
+ create_table :tags do |t|
88
+ t.string :name
89
+ t.timestamps
90
+ end
91
+ add_index :tags, :name, unique: true
88
92
  end
89
- add_index :tags, :name, unique: true
90
93
 
91
- create_table :taggings do |t|
92
- t.references :tag, foreign_key: true
93
- t.references :taggable, polymorphic: true
94
- t.references :tagger, polymorphic: true
95
- t.string :context, limit: 128
94
+ unless table_exists?(:taggings)
95
+ create_table :taggings do |t|
96
+ t.references :tag, foreign_key: true
97
+ t.references :taggable, polymorphic: true
98
+ t.references :tagger, polymorphic: true
99
+ t.string :context, limit: 128
96
100
 
97
- t.timestamps
98
- end
101
+ t.timestamps
102
+ end
99
103
 
100
- add_index :taggings, [:taggable_type, :taggable_id, :context], name: "taggings_taggable_context_idx"
101
- add_index :taggings, [:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type],
102
- unique: true, name: "taggings_idx"
104
+ add_index :taggings, [:taggable_type, :taggable_id, :context], name: "taggings_taggable_context_idx"
105
+ add_index :taggings, [:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type],
106
+ unique: true, name: "taggings_idx"
107
+ end
103
108
  end
104
109
  end
@@ -1,3 +1,3 @@
1
1
  module Jigsaw
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.2"
3
3
  end