forked from bennibu/sharedlists
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathschema.rb
82 lines (77 loc) · 3.21 KB
/
schema.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# 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.
#
# This file is the source Rails uses to define your schema when running `bin/rails
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.1].define(version: 2023_12_14_145104) do
create_table "articles", force: :cascade do |t|
t.string "name", null: false
t.integer "supplier_id", null: false
t.string "number"
t.string "note"
t.string "manufacturer"
t.string "origin"
t.string "unit"
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 "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 "scale_quantity", precision: 8, scale: 2
t.decimal "scale_price", precision: 8, scale: 2
t.datetime "created_on", precision: nil
t.datetime "updated_on", precision: nil
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
create_table "suppliers", force: :cascade do |t|
t.string "name", null: false
t.string "address", null: false
t.string "phone", null: false
t.string "phone2"
t.string "fax"
t.string "email"
t.string "url"
t.string "delivery_days"
t.string "note"
t.datetime "created_on", precision: nil
t.datetime "updated_on", precision: nil
t.boolean "ftp_sync", default: false
t.string "ftp_host"
t.string "ftp_user"
t.string "ftp_password"
t.string "ftp_type", default: "bnn", null: false
t.string "ftp_regexp", default: "^([.]/)?PL"
t.boolean "mail_sync"
t.string "mail_from"
t.string "mail_subject"
t.string "mail_type"
t.string "salt", null: false
t.string "foodcoop"
t.index ["name"], name: "index_suppliers_on_name", unique: true
end
create_table "user_accesses", force: :cascade do |t|
t.integer "user_id"
t.integer "supplier_id"
t.datetime "created_at", precision: nil
t.datetime "updated_at", precision: nil
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
create_table "users", force: :cascade do |t|
t.string "email"
t.string "password_hash"
t.string "password_salt"
t.datetime "created_at", precision: nil
t.datetime "updated_at", precision: nil
t.boolean "admin", default: false
t.index ["email"], name: "index_users_on_email", unique: true
end
end