-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds missing translations from alchemy engine.
- Loading branch information
Thomas von Deyen
committed
Nov 19, 2014
1 parent
299f9f6
commit a2b1c30
Showing
5 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
spec/dummy/db/migrate/20141119205155_add_published_at_to_alchemy_pages.alchemy.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This migration comes from alchemy (originally 20130918201742) | ||
class AddPublishedAtToAlchemyPages < ActiveRecord::Migration | ||
def change | ||
add_column :alchemy_pages, :published_at, :timestamp | ||
end | ||
end |
22 changes: 22 additions & 0 deletions
22
...ummy/db/migrate/20141119205156_add_missing_unique_indices_to_tags_and_taggings.alchemy.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# This migration comes from alchemy (originally 20140107192720) | ||
class AddMissingUniqueIndicesToTagsAndTaggings < ActiveRecord::Migration | ||
|
||
def self.up | ||
add_index :tags, :name, unique: true | ||
|
||
remove_index :taggings, :tag_id | ||
remove_index :taggings, [:taggable_id, :taggable_type, :context] | ||
add_index :taggings, | ||
[:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type], | ||
unique: true, name: 'taggings_idx' | ||
end | ||
|
||
def self.down | ||
remove_index :tags, :name | ||
|
||
remove_index :taggings, name: 'tagging_idx' | ||
add_index :taggings, :tag_id | ||
add_index :taggings, [:taggable_id, :taggable_type, :context] | ||
end | ||
|
||
end |
15 changes: 15 additions & 0 deletions
15
spec/dummy/db/migrate/20141119205157_add_taggings_counter_cache_to_tags.alchemy.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# This migration comes from alchemy (originally 20140701160159) | ||
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration | ||
def self.up | ||
add_column :tags, :taggings_count, :integer, default: 0 | ||
|
||
ActsAsTaggableOn::Tag.reset_column_information | ||
ActsAsTaggableOn::Tag.find_each do |tag| | ||
ActsAsTaggableOn::Tag.reset_counters(tag.id, :taggings) | ||
end | ||
end | ||
|
||
def self.down | ||
remove_column :tags, :taggings_count | ||
end | ||
end |
10 changes: 10 additions & 0 deletions
10
spec/dummy/db/migrate/20141119205158_add_missing_taggable_index.alchemy.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This migration comes from alchemy (originally 20140701160225) | ||
class AddMissingTaggableIndex < ActiveRecord::Migration | ||
def self.up | ||
add_index :taggings, [:taggable_id, :taggable_type, :context] | ||
end | ||
|
||
def self.down | ||
remove_index :taggings, [:taggable_id, :taggable_type, :context] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters