# 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[8.0].define(version: 2025_05_28_092931) do create_table "active_storage_attachments", force: :cascade do |t| t.string "name", null: false t.string "record_type", null: false t.bigint "record_id", null: false t.bigint "blob_id", null: false t.datetime "created_at", null: false t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true end create_table "active_storage_blobs", force: :cascade do |t| t.string "key", null: false t.string "filename", null: false t.string "content_type" t.text "metadata" t.string "service_name", null: false t.bigint "byte_size", null: false t.string "checksum" t.datetime "created_at", null: false t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true end create_table "active_storage_variant_records", force: :cascade do |t| t.bigint "blob_id", null: false t.string "variation_digest", null: false t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true end create_table "app_catalog_web_apps", force: :cascade do |t| t.string "url" t.string "name" t.text "metadata" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "donations", force: :cascade do |t| t.integer "user_id" t.integer "amount_sats" t.integer "fiat_amount" t.string "public_name" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.datetime "paid_at", precision: nil t.string "fiat_currency", default: "USD" t.string "donation_method" t.string "payment_method" t.string "btcpay_invoice_id" t.string "payment_status" t.index ["payment_status"], name: "index_donations_on_payment_status" t.index ["user_id"], name: "index_donations_on_user_id" end create_table "editable_contents", force: :cascade do |t| t.string "context" t.string "key" t.string "lang", default: "en" t.text "content" t.boolean "rich_text", default: false t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "flipper_features", force: :cascade do |t| t.string "key", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["key"], name: "index_flipper_features_on_key", unique: true end create_table "flipper_gates", force: :cascade do |t| t.string "feature_key", null: false t.string "key", null: false t.text "value" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["feature_key", "key", "value"], name: "index_flipper_gates_on_feature_key_and_key_and_value", unique: true end create_table "invitations", force: :cascade do |t| t.string "token" t.integer "user_id" t.integer "invited_user_id" t.datetime "used_at", precision: nil t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["invited_user_id"], name: "index_invitations_on_invited_user_id" t.index ["user_id"], name: "index_invitations_on_user_id" end create_table "remote_storage_authorizations", force: :cascade do |t| t.integer "user_id", null: false t.string "token" t.text "permissions", default: "--- []\n" t.string "client_id" t.string "redirect_uri" t.string "app_name" t.datetime "expire_at" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "web_app_id" t.index ["permissions"], name: "index_remote_storage_authorizations_on_permissions" t.index ["user_id"], name: "index_remote_storage_authorizations_on_user_id" t.index ["web_app_id"], name: "index_remote_storage_authorizations_on_web_app_id" end create_table "settings", force: :cascade do |t| t.string "var", null: false t.text "value" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["var"], name: "index_settings_on_var", unique: true end create_table "users", force: :cascade do |t| t.string "cn" t.string "ou" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "email", default: "", null: false t.string "reset_password_token" t.datetime "reset_password_sent_at", precision: nil t.string "confirmation_token" t.datetime "confirmed_at", precision: nil t.datetime "confirmation_sent_at", precision: nil t.string "unconfirmed_email" t.datetime "remember_created_at" t.string "remember_token" t.text "preferences" t.string "pgp_fpr" t.string "lndhub_username" t.text "lndhub_password" t.bigint "mastodon_id" t.index ["email"], name: "index_users_on_email", unique: true t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true end create_table "zaps", force: :cascade do |t| t.integer "user_id", null: false t.json "request" t.json "receipt" t.text "payment_request" t.bigint "amount" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.datetime "settled_at" t.index ["user_id"], name: "index_zaps_on_user_id" end add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" add_foreign_key "remote_storage_authorizations", "app_catalog_web_apps", column: "web_app_id" add_foreign_key "remote_storage_authorizations", "users" add_foreign_key "zaps", "users" end