removed redundant ribica name from subfolders

This commit is contained in:
Edin Dazdarevic
2015-01-22 22:20:34 +01:00
parent 13296062f4
commit 335e954bce
150 changed files with 18 additions and 18 deletions

View File

@@ -0,0 +1,7 @@
class CreateCategories < ActiveRecord::Migration
def change
create_table :categories do |t|
t.string :name
end
end
end

View File

@@ -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

View File

@@ -0,0 +1,7 @@
class CreateSections < ActiveRecord::Migration
def change
create_table :sections do |t|
t.string :name
end
end
end

View File

@@ -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

View 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

View 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

View File

@@ -0,0 +1,7 @@
class CreateMediaTypes < ActiveRecord::Migration
def change
create_table :media_types do |t|
t.string :name
end
end
end

View File

@@ -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

View File

@@ -0,0 +1,5 @@
class AddTagsToItem < ActiveRecord::Migration
def change
add_column :items, :tags, :string
end
end

68
front-api/db/schema.rb Normal file
View File

@@ -0,0 +1,68 @@
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150118082022) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "categories", force: :cascade do |t|
t.string "name"
t.integer "section_id"
end
create_table "items", force: :cascade 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.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "tags"
end
create_table "media_types", force: :cascade do |t|
t.string "name"
end
create_table "multi_media_descriptions", force: :cascade do |t|
t.string "url"
t.integer "item_id"
t.integer "media_type_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "sections", force: :cascade do |t|
t.string "name"
end
create_table "sub_categories", force: :cascade do |t|
t.string "name"
t.integer "category_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "units", force: :cascade do |t|
t.string "name"
t.string "short_name", limit: 4
end
end