rails db:schema:dump
This updates the db/schema.rb from a clean development database (mariadb:10.1) using Rails 6.1.
This commit is contained in:
parent
fa29bc75a6
commit
6a9437cad7
1 changed files with 57 additions and 61 deletions
70
db/schema.rb
generated
70
db/schema.rb
generated
|
@ -1,44 +1,42 @@
|
||||||
# encoding: UTF-8
|
|
||||||
# This file is auto-generated from the current state of the database. Instead
|
# 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
|
# of editing this file, please use the migrations feature of Active Record to
|
||||||
# incrementally modify your database, and then regenerate this schema definition.
|
# incrementally modify your database, and then regenerate this schema definition.
|
||||||
#
|
#
|
||||||
# Note that this schema.rb definition is the authoritative source for your
|
# This file is the source Rails uses to define your schema when running `bin/rails
|
||||||
# database schema. If you need to create the application database on another
|
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
||||||
# system, you should be using db:schema:load, not running all the migrations
|
# be faster and is potentially less error prone than running all of your
|
||||||
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
# migrations from scratch. Old migrations may fail to apply correctly if those
|
||||||
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
# migrations use external dependencies or application code.
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20190811115732) do
|
ActiveRecord::Schema.define(version: 2019_08_11_115732) do
|
||||||
|
|
||||||
create_table "articles", :force => true do |t|
|
create_table "articles", charset: "utf8", force: :cascade do |t|
|
||||||
t.string "name", :null => false
|
t.string "name", null: false
|
||||||
t.integer "supplier_id", :null => false
|
t.integer "supplier_id", null: false
|
||||||
t.string "number"
|
t.string "number"
|
||||||
t.string "note"
|
t.string "note"
|
||||||
t.string "manufacturer"
|
t.string "manufacturer"
|
||||||
t.string "origin"
|
t.string "origin"
|
||||||
t.string "unit"
|
t.string "unit"
|
||||||
t.decimal "price", :precision => 8, :scale => 2, :default => 0.0, :null => false
|
t.decimal "price", precision: 8, scale: 2, default: "0.0", null: false
|
||||||
t.decimal "tax", :precision => 3, :scale => 1, :default => 7.0, :null => false
|
t.decimal "tax", precision: 3, scale: 1, default: "7.0", null: false
|
||||||
t.decimal "deposit", :precision => 8, :scale => 2, :default => 0.0, :null => false
|
t.decimal "deposit", precision: 8, scale: 2, default: "0.0", null: false
|
||||||
t.decimal "unit_quantity", :precision => 4, :scale => 1, :default => 1.0, :null => false
|
t.decimal "unit_quantity", precision: 4, scale: 1, default: "1.0", null: false
|
||||||
t.decimal "scale_quantity", :precision => 4, :scale => 2
|
t.decimal "scale_quantity", precision: 4, scale: 2
|
||||||
t.decimal "scale_price", :precision => 8, :scale => 2
|
t.decimal "scale_price", precision: 8, scale: 2
|
||||||
t.datetime "created_on"
|
t.datetime "created_on"
|
||||||
t.datetime "updated_on"
|
t.datetime "updated_on"
|
||||||
t.string "category"
|
t.string "category"
|
||||||
|
t.index ["name"], name: "index_articles_on_name"
|
||||||
|
t.index ["number", "supplier_id"], name: "index_articles_on_number_and_supplier_id", unique: true
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "articles", ["name"], :name => "index_articles_on_name"
|
create_table "suppliers", charset: "utf8", force: :cascade do |t|
|
||||||
add_index "articles", ["number", "supplier_id"], :name => "index_articles_on_number_and_supplier_id", :unique => true
|
t.string "name", null: false
|
||||||
|
t.string "address", null: false
|
||||||
create_table "suppliers", :force => true do |t|
|
t.string "phone", null: false
|
||||||
t.string "name", :null => false
|
|
||||||
t.string "address", :null => false
|
|
||||||
t.string "phone", :null => false
|
|
||||||
t.string "phone2"
|
t.string "phone2"
|
||||||
t.string "fax"
|
t.string "fax"
|
||||||
t.string "email"
|
t.string "email"
|
||||||
|
@ -47,39 +45,37 @@ ActiveRecord::Schema.define(:version => 20190811115732) do
|
||||||
t.string "note"
|
t.string "note"
|
||||||
t.datetime "created_on"
|
t.datetime "created_on"
|
||||||
t.datetime "updated_on"
|
t.datetime "updated_on"
|
||||||
t.boolean "ftp_sync", :default => false
|
t.boolean "ftp_sync", default: false
|
||||||
t.string "ftp_host"
|
t.string "ftp_host"
|
||||||
t.string "ftp_user"
|
t.string "ftp_user"
|
||||||
t.string "ftp_password"
|
t.string "ftp_password"
|
||||||
t.string "ftp_type", :default => "bnn", :null => false
|
t.string "ftp_type", default: "bnn", null: false
|
||||||
t.string "ftp_regexp", :default => "^([.]/)?PL"
|
t.string "ftp_regexp", default: "^([.]/)?PL"
|
||||||
t.boolean "mail_sync"
|
t.boolean "mail_sync"
|
||||||
t.string "mail_from"
|
t.string "mail_from"
|
||||||
t.string "mail_subject"
|
t.string "mail_subject"
|
||||||
t.string "mail_type"
|
t.string "mail_type"
|
||||||
t.string "salt", :null => false
|
t.string "salt", null: false
|
||||||
|
t.index ["name"], name: "index_suppliers_on_name", unique: true
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "suppliers", ["name"], :name => "index_suppliers_on_name", :unique => true
|
create_table "user_accesses", charset: "utf8", force: :cascade do |t|
|
||||||
|
|
||||||
create_table "user_accesses", :force => true do |t|
|
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.integer "supplier_id"
|
t.integer "supplier_id"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
|
t.index ["supplier_id"], name: "index_user_accesses_on_supplier_id"
|
||||||
|
t.index ["user_id", "supplier_id"], name: "index_user_accesses_on_user_id_and_supplier_id"
|
||||||
|
t.index ["user_id"], name: "index_user_accesses_on_user_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "user_accesses", ["supplier_id"], :name => "index_user_accesses_on_supplier_id"
|
create_table "users", charset: "utf8", force: :cascade do |t|
|
||||||
add_index "user_accesses", ["user_id", "supplier_id"], :name => "index_user_accesses_on_user_id_and_supplier_id"
|
|
||||||
add_index "user_accesses", ["user_id"], :name => "index_user_accesses_on_user_id"
|
|
||||||
|
|
||||||
create_table "users", :force => true do |t|
|
|
||||||
t.string "email"
|
t.string "email"
|
||||||
t.string "password_hash"
|
t.string "password_hash"
|
||||||
t.string "password_salt"
|
t.string "password_salt"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
t.boolean "admin", :default => false
|
t.boolean "admin", default: false
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue