created item groups and link banners and their associations and fixed bugs with join tables

This commit is contained in:
Senad Uka
2015-03-22 06:17:05 +01:00
parent 38548e3e33
commit bbedb4a877
20 changed files with 219 additions and 81 deletions

View File

@@ -0,0 +1,25 @@
class CreateLinkBanners < ActiveRecord::Migration
def change
create_table :link_banners do |t|
t.string :image_url
t.boolean :start_page
t.integer :section_id
t.integer :category_id
t.integer :sub_category_id
t.integer :item_id
t.boolean :thank_you_page
t.boolean :search_result_page
t.boolean :checkout_page
t.date :beginning
t.date :ending
t.boolean :footer
t.boolean :header
t.string :link_url
t.timestamps null: false
end
drop_table :special_offers
end
end

View File

@@ -0,0 +1,13 @@
class CreateItemGroups < ActiveRecord::Migration
def change
create_table :item_groups do |t|
t.string :name
t.text :description
t.boolean :visible
t.timestamps null: false
end
end
create_join_table :item, :item_groups
end