# 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: 2025_02_17_185300) do create_table "companies", force: :cascade do |t| t.string "name" t.string "id_number" t.string "vat_number" t.string "address_line_one" t.string "address_line_two" t.string "postal_code" t.string "city" t.string "entity" t.string "country" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "customers", force: :cascade do |t| t.string "name" t.string "phone" t.text "notes" t.string "email" t.integer "birthyear" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "company_id" t.index ["name", "company_id"], name: "index_customers_on_name_and_company_id", unique: true end create_table "reservations", force: :cascade do |t| t.integer "company_id", null: false t.integer "customer_id", null: false t.string "title" t.text "description" t.datetime "start_time" t.datetime "end_time" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "team_id", null: false t.index ["company_id"], name: "index_reservations_on_company_id" t.index ["customer_id"], name: "index_reservations_on_customer_id" t.index ["team_id"], name: "index_reservations_on_team_id" end create_table "teams", force: :cascade do |t| t.string "name" t.integer "company_id", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["company_id"], name: "index_teams_on_company_id" end add_foreign_key "reservations", "companies" add_foreign_key "reservations", "customers" add_foreign_key "reservations", "teams" add_foreign_key "teams", "companies" end