2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/generators/permissify/install/templates/create_products_tables.rb', line 2
def up
create_table :products, :force => true do |t|
t.string :name
t.text :permissions
end
create_table :merchants_products, :id => false, :force => true do |t|
t.integer :merchant_id, :null => false
t.integer :product_id, :null => false
end
create_table :brands_products, :id => false, :force => true do |t|
t.integer :brand_id, :null => false
t.integer :product_id, :null => false
end
create_table :corporations_products, :id => false, :force => true do |t|
t.integer :corporation_id, :null => false
t.integer :product_id, :null => false
end
create_table :dealers_products, :id => false, :force => true do |t|
t.integer :dealer_id, :null => false
t.integer :product_id, :null => false
end
create_table :admins_products, :id => false, :force => true do |t|
t.integer :admin_id, :null => false
t.integer :product_id, :null => false
end
end
|