# 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. # # Note that this schema.rb definition is the authoritative source for your # database schema. If you need to create the application database on another # system, you should be using db:schema:load, not running all the migrations # from scratch. The latter is a flawed and unsustainable approach (the more migrations # you'll amass, the slower it'll run and the greater likelihood for issues). # # It's strongly recommended that you check this file into your version control system. ActiveRecord::Schema.define(version: 2023_05_10_103647) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" create_table "friendly_id_slugs", force: :cascade do |t| t.string "slug", null: false t.integer "sluggable_id", null: false t.string "sluggable_type", limit: 50 t.string "scope" t.datetime "created_at" t.index ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true t.index ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type" t.index ["sluggable_type", "sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_type_and_sluggable_id" end create_table "games", force: :cascade do |t| t.string "title" t.datetime "created_at" t.datetime "updated_at" t.string "status" t.integer "controlling_player_id" t.integer "play_to_beat_id" t.integer "winner_player_id" t.integer "table_id" t.index ["play_to_beat_id"], name: "index_games_on_play_to_beat_id" end create_table "play_to_beats", force: :cascade do |t| t.integer "game_id" t.integer "play_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "player_cards", force: :cascade do |t| t.integer "player_id" t.integer "card_id" t.datetime "created_at" t.datetime "updated_at" t.integer "value" t.string "rank" t.string "suit" t.integer "play_id" t.index ["card_id"], name: "index_player_cards_on_card_id" t.index ["player_id"], name: "index_player_cards_on_player_id" end create_table "players", force: :cascade do |t| t.integer "game_id" t.integer "user_id" t.datetime "created_at" t.datetime "updated_at" t.string "soft_token" t.boolean "is_bot", default: false t.index ["game_id"], name: "index_players_on_game_id" t.index ["user_id"], name: "index_players_on_user_id" end create_table "plays", force: :cascade do |t| t.integer "game_id" t.integer "player_id" t.datetime "created_at" t.datetime "updated_at" t.index ["game_id"], name: "index_plays_on_game_id" t.index ["player_id"], name: "index_plays_on_player_id" end create_table "seats", force: :cascade do |t| t.integer "table_id" t.integer "user_id" t.datetime "created_at" t.datetime "updated_at" t.integer "position" t.string "user_soft_token" t.integer "game_id" t.integer "player_id" t.index ["table_id"], name: "index_seats_on_table_id" t.index ["user_id"], name: "index_seats_on_user_id" end create_table "tables", force: :cascade do |t| t.string "title" t.datetime "created_at" t.datetime "updated_at" t.integer "current_game_id" t.string "skyspace_url" t.string "slug" t.index ["slug"], name: "index_tables_on_slug", unique: true end create_table "users", force: :cascade do |t| t.string "email", default: "", null: false t.string "encrypted_password", default: "" t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" t.integer "sign_in_count", default: 0, null: false t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" t.inet "current_sign_in_ip" t.inet "last_sign_in_ip" t.datetime "created_at" t.datetime "updated_at" t.string "name" t.string "confirmation_token" t.datetime "confirmed_at" t.datetime "confirmation_sent_at" t.string "unconfirmed_email" t.integer "role" t.string "invitation_token" t.datetime "invitation_created_at" t.datetime "invitation_sent_at" t.datetime "invitation_accepted_at" t.integer "invitation_limit" t.integer "invited_by_id" t.string "invited_by_type" t.integer "invitations_count", default: 0 t.string "soft_token" t.integer "win_count", default: 0 t.index ["email"], name: "index_users_on_email", unique: true t.index ["invitation_token"], name: "index_users_on_invitation_token", unique: true t.index ["invitations_count"], name: "index_users_on_invitations_count" t.index ["invited_by_id"], name: "index_users_on_invited_by_id" t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true end end