Skip to content

Commit

Permalink
fixed schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellen-Wittingen committed Jan 10, 2025
1 parent 530929c commit f43579f
Showing 1 changed file with 40 additions and 53 deletions.
93 changes: 40 additions & 53 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

create_table "activities", force: :cascade do |t|
t.string "title", null: false
t.datetime "start_time", null: false
t.datetime "end_time", null: false
t.datetime "deleted_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "start_time", precision: nil, null: false
t.datetime "end_time", precision: nil, null: false
t.datetime "deleted_at", precision: nil
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.bigint "price_list_id"
t.bigint "created_by_id"
t.bigint "locked_by_id"
Expand All @@ -34,34 +34,21 @@
t.bigint "user_id", null: false
t.bigint "activity_id"
t.decimal "amount", precision: 8, scale: 2, null: false
t.datetime "deleted_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "deleted_at", precision: nil
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.bigint "created_by_id"
t.index ["activity_id"], name: "index_credit_mutations_on_activity_id"
t.index ["created_by_id"], name: "index_credit_mutations_on_created_by_id"
t.index ["user_id"], name: "index_credit_mutations_on_user_id"
end

create_table "identities", force: :cascade do |t|
t.string "username", null: false
t.string "password_digest", null: false
t.bigint "user_id", null: false
t.string "otp_secret_key", null: false
t.boolean "otp_enabled", default: false
t.datetime "deleted_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["user_id"], name: "index_identities_on_user_id"
t.index ["username"], name: "index_identities_on_username", unique: true
end

create_table "invoice_rows", force: :cascade do |t|
t.bigint "invoice_id"
t.string "name", null: false
t.integer "amount", null: false
t.decimal "price", precision: 8, scale: 2, null: false
t.datetime "deleted_at"
t.datetime "deleted_at", precision: nil
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["invoice_id"], name: "index_invoice_rows_on_invoice_id"
Expand All @@ -72,9 +59,9 @@
t.bigint "user_id", null: false
t.bigint "activity_id", null: false
t.integer "status", default: 0, null: false
t.datetime "deleted_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "deleted_at", precision: nil
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.string "email_override"
t.string "name_override"
t.string "token"
Expand All @@ -88,18 +75,17 @@
t.bigint "product_id", null: false
t.integer "product_count", null: false
t.decimal "price_per_product", precision: 8, scale: 2, null: false
t.datetime "deleted_at"
t.datetime "deleted_at", precision: nil
t.index ["order_id"], name: "index_order_rows_on_order_id"
t.index ["product_id"], name: "index_order_rows_on_product_id"
end

create_table "orders", force: :cascade do |t|
t.decimal "order_total", precision: 8, scale: 2
t.bigint "activity_id", null: false
t.bigint "user_id"
t.datetime "deleted_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "deleted_at", precision: nil
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.bigint "created_by_id"
t.boolean "paid_with_cash", default: false, null: false
t.boolean "paid_with_pin", default: false, null: false
Expand All @@ -113,9 +99,9 @@
t.decimal "amount", precision: 8, scale: 2
t.integer "status", default: 0, null: false
t.bigint "user_id"
t.datetime "deleted_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "deleted_at", precision: nil
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.bigint "invoice_id"
t.integer "lock_version"
t.index ["invoice_id"], name: "index_payments_on_invoice_id"
Expand All @@ -124,46 +110,46 @@

create_table "price_lists", force: :cascade do |t|
t.string "name", null: false
t.datetime "deleted_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "deleted_at", precision: nil
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.datetime "archived_at"
end

create_table "product_prices", force: :cascade do |t|
t.bigint "product_id"
t.bigint "price_list_id"
t.decimal "price", precision: 8, scale: 2
t.datetime "deleted_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "deleted_at", precision: nil
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.index ["price_list_id"], name: "index_product_prices_on_price_list_id"
t.index ["product_id", "price_list_id", "deleted_at"], name: "index_product_prices_on_product_id_and_price_list_id", unique: true
t.index ["product_id"], name: "index_product_prices_on_product_id"
end

create_table "products", force: :cascade do |t|
t.string "name", null: false
t.datetime "deleted_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "deleted_at", precision: nil
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.integer "category", default: 0, null: false
end

create_table "roles", force: :cascade do |t|
t.integer "group_uid"
t.datetime "deleted_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "deleted_at", precision: nil
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.integer "role_type"
end

create_table "roles_users", force: :cascade do |t|
t.bigint "user_id", null: false
t.bigint "role_id", null: false
t.datetime "deleted_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "deleted_at", precision: nil
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.index ["role_id"], name: "index_roles_users_on_role_id"
t.index ["user_id", "role_id", "created_at"], name: "index_roles_users_on_user_id_and_role_id_and_created_at", unique: true
t.index ["user_id"], name: "index_roles_users_on_user_id"
Expand All @@ -183,10 +169,10 @@
end

create_table "users", force: :cascade do |t|
t.datetime "deleted_at", precision: nil
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.string "name"
t.datetime "deleted_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "provider"
t.string "uid"
t.string "avatar_thumb_url"
Expand All @@ -199,11 +185,12 @@
end

create_table "versions", force: :cascade do |t|
t.string "item_type", null: false
t.string "item_type"
t.string "{:null=>false}"
t.integer "item_id", null: false
t.string "event", null: false
t.string "whodunnit"
t.datetime "created_at"
t.datetime "created_at", precision: nil
t.jsonb "object"
t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
end
Expand Down

0 comments on commit f43579f

Please sign in to comment.