Skip to content

Instantly share code, notes, and snippets.

@alopatindev
Last active February 27, 2017 04:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alopatindev/75f3f41e182a586bf9d93fdf3c93f6a5 to your computer and use it in GitHub Desktop.
Save alopatindev/75f3f41e182a586bf9d93fdf3c93f6a5 to your computer and use it in GitHub Desktop.
# 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: 20170227040006) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "companies", force: :cascade do |t|
t.string "title"
t.decimal "price"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "category_id"
end
create_table "categories", force: :cascade do |t|
t.string "title"
end
create_table "order_items", force: :cascade do |t|
t.integer "product_id"
t.integer "order_id"
t.integer "company_id"
t.decimal "unit_price"
t.integer "quantity"
t.decimal "total_price"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "orders", force: :cascade do |t|
t.integer "order_status_id"
t.string "comment"
t.decimal "total_price", default: "0.0"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "products", force: :cascade do |t|
t.integer "company_id"
t.string "name"
t.decimal "price"
t.boolean "active"
t.integer "in_stock"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment