mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 13:19:39 +02:00
56 lines
2.2 KiB
Ruby
Generated
56 lines
2.2 KiB
Ruby
Generated
# 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.2].define(version: 2024_02_02_230325) do
|
|
# These are extensions that must be enabled in order to support this database
|
|
enable_extension "pgcrypto"
|
|
enable_extension "plpgsql"
|
|
|
|
create_table "accounts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
|
t.string "type"
|
|
t.string "subtype"
|
|
t.uuid "family_id", null: false
|
|
t.string "name"
|
|
t.bigint "balance", default: 0
|
|
t.string "currency", default: "USD"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
t.index ["family_id"], name: "index_accounts_on_family_id"
|
|
t.index ["type"], name: "index_accounts_on_type"
|
|
end
|
|
|
|
create_table "families", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
|
t.string "name"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
end
|
|
|
|
create_table "invite_codes", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
|
t.string "token", null: false
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
end
|
|
|
|
create_table "users", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
|
t.uuid "family_id", null: false
|
|
t.string "first_name"
|
|
t.string "last_name"
|
|
t.string "email"
|
|
t.string "password_digest"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
t.index ["family_id"], name: "index_users_on_family_id"
|
|
end
|
|
|
|
add_foreign_key "accounts", "families"
|
|
add_foreign_key "users", "families"
|
|
end
|