added suppliers, weight to item
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
class AddWeigthToItem < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :items, :weight, :decimal, precision: 5, scale: 3
|
||||
end
|
||||
end
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20150313065130) do
|
||||
ActiveRecord::Schema.define(version: 20150314033743) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@@ -87,6 +87,8 @@ ActiveRecord::Schema.define(version: 20150313065130) do
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "tags"
|
||||
t.json "traits"
|
||||
t.integer "supplier_id"
|
||||
t.decimal "weight", precision: 5, scale: 3
|
||||
end
|
||||
|
||||
create_table "media_types", force: :cascade do |t|
|
||||
@@ -118,6 +120,19 @@ ActiveRecord::Schema.define(version: 20150313065130) do
|
||||
t.integer "category_id"
|
||||
end
|
||||
|
||||
create_table "suppliers", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "address"
|
||||
t.string "postal_code"
|
||||
t.string "town"
|
||||
t.string "phone"
|
||||
t.string "contact_person"
|
||||
t.string "email"
|
||||
t.text "note"
|
||||
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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
class User < ActiveRecord::Base
|
||||
has_many :carts
|
||||
has_secure_password
|
||||
validates_presence_of :first_name, :last_name, :password, :email, :password_confirmation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user