removed redundant ribica name from subfolders
This commit is contained in:
7
front-api/db/migrate/20150114051135_create_categories.rb
Normal file
7
front-api/db/migrate/20150114051135_create_categories.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class CreateCategories < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :categories do |t|
|
||||
t.string :name
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,8 @@
|
||||
class CreateSubCategories < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :sub_categories do |t|
|
||||
t.string :name
|
||||
t.integer :category_id
|
||||
end
|
||||
end
|
||||
end
|
||||
7
front-api/db/migrate/20150117094552_create_sections.rb
Normal file
7
front-api/db/migrate/20150117094552_create_sections.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class CreateSections < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :sections do |t|
|
||||
t.string :name
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
class AddSectionidToCategories < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :categories, :section_id, :integer
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :categories, :section_id
|
||||
end
|
||||
end
|
||||
8
front-api/db/migrate/20150118035004_create_units.rb
Normal file
8
front-api/db/migrate/20150118035004_create_units.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
class CreateUnits < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :units do |t|
|
||||
t.string :name
|
||||
t.string :short_name, limit: 4
|
||||
end
|
||||
end
|
||||
end
|
||||
18
front-api/db/migrate/20150118040134_create_items.rb
Normal file
18
front-api/db/migrate/20150118040134_create_items.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
class CreateItems < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :items do |t|
|
||||
t.string :name
|
||||
t.string :code, limit: 10
|
||||
t.decimal :current_input_price, precision: 5, scale: 2
|
||||
t.decimal :list_price, precision: 5, scale: 2
|
||||
t.integer :unit_id
|
||||
t.decimal :units_in_pack, precision: 5, scale: 3
|
||||
t.text :description
|
||||
t.integer :sub_category_id
|
||||
t.integer :stock
|
||||
t.boolean :on_display
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,7 @@
|
||||
class CreateMediaTypes < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :media_types do |t|
|
||||
t.string :name
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
class CreateMultiMediaDescriptions < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :multi_media_descriptions do |t|
|
||||
t.string :url
|
||||
t.integer :item_id
|
||||
t.integer :media_type_id
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
5
front-api/db/migrate/20150118082022_add_tags_to_item.rb
Normal file
5
front-api/db/migrate/20150118082022_add_tags_to_item.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddTagsToItem < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :items, :tags, :string
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user