# 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.0].define(version: 2023_07_12_103042) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" create_table "contributions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "member_id", null: false t.integer "eurocents", null: false t.date "payment_on", null: false t.string "payment_method" t.string "payment_reference" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["member_id"], name: "index_contributions_on_member_id" end create_table "members", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.serial "number", null: false t.string "email" t.string "display_name" t.string "identification_number" t.string "status" t.string "category" t.text "address" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.date "joined_on" t.date "expires_on" t.string "regular_ifthenpay_link" t.string "reduced_ifthenpay_link" t.boolean "excluded", default: false t.boolean "wants_mailing_list", default: false, null: false t.boolean "prefers_postal", default: false, null: false t.string "legal_name" t.string "pronouns" t.index ["email"], name: "index_members_on_email", unique: true t.index ["number"], name: "index_members_on_number", unique: true end create_table "notifications", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "member_id" t.date "to_be_sent_on", null: false t.string "template", null: false t.string "status", null: false t.datetime "sent_at", precision: nil t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["member_id"], name: "index_notifications_on_member_id" end create_table "payments", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "member_id", null: false t.string "status" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["member_id"], name: "index_payments_on_member_id" end create_table "users", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "email", null: false t.string "encrypted_password", limit: 128, null: false t.string "confirmation_token", limit: 128 t.string "remember_token", limit: 128, null: false t.boolean "active", default: true, null: false t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true t.index ["email"], name: "index_users_on_email" t.index ["remember_token"], name: "index_users_on_remember_token", unique: true end create_table "versions", force: :cascade do |t| t.string "item_type", null: false t.string "item_id", null: false t.string "event", null: false t.string "whodunnit" t.datetime "created_at" t.text "object_changes" t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id" end add_foreign_key "contributions", "members" add_foreign_key "notifications", "members" add_foreign_key "payments", "members" end