adva-categories 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,31 @@
1
+ class AdvaCategoriesCreateTables < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :categories do |t|
4
+ t.references :section
5
+ t.integer :parent_id
6
+ t.integer :lft, :null => false, :default => 0
7
+ t.integer :rgt, :null => false, :default => 0
8
+ t.string :name
9
+ t.string :slug
10
+ t.string :path
11
+ end
12
+
13
+ create_table :categorizations do |t|
14
+ t.belongs_to :categorizable, :polymorphic => true
15
+ t.references :category
16
+ end
17
+ add_index :categorizations, :category_id
18
+ add_index :categorizations, :categorizable_id
19
+ # TODO: add this index later, when the cnet product_categorization finalizer has been adjusted
20
+ # so that existing categorizations between products and categories get overwritten by setting
21
+ # the source attribute to 'cnet'.
22
+ # add_index :categorizations, [:category_id, :categorizable_id, :categorizable_type],
23
+ # :unique => true, :name => 'index_categorizations_on_cat_and_categorizable'
24
+ end
25
+
26
+ def self.down
27
+ drop_table :categorizations
28
+ drop_table :categories
29
+ end
30
+ end
31
+
@@ -0,0 +1,11 @@
1
+ class AdvaCategoriesAddLevelToCategories < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :categories, :level, :integer, :null => false, :default => 0
4
+ end
5
+
6
+ def self.down
7
+ remove_column :categories, :level
8
+ end
9
+ end
10
+
11
+
@@ -1,3 +1,3 @@
1
1
  module AdvaCategories
2
- VERSION = "0.0.13"
2
+ VERSION = "0.0.14"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adva-categories
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 13
10
- version: 0.0.13
9
+ - 14
10
+ version: 0.0.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ingo Weiss
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-07-29 00:00:00 Z
19
+ date: 2012-02-27 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: adva-core
@@ -56,6 +56,8 @@ files:
56
56
  - config/locales/en.yml
57
57
  - config/redirects.rb
58
58
  - config/routes.rb
59
+ - db/migrate/20101012143413_adva_categories_create_tables.rb
60
+ - db/migrate/20101102111200_adva_categories_add_level_to_categories.rb
59
61
  - lib/adva/active_record/categorizable.rb
60
62
  - lib/adva/categories.rb
61
63
  - lib/adva/routing_filters/categories.rb
@@ -94,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
96
  requirements: []
95
97
 
96
98
  rubyforge_project: "[none]"
97
- rubygems_version: 1.8.6
99
+ rubygems_version: 1.8.10
98
100
  signing_key:
99
101
  specification_version: 3
100
102
  summary: Categories engine for adva-cms2