Description Postal mail reports app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

251 lines
9.6 KiB

# 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: 0) do
create_table "clicks", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.integer "message_id"
t.integer "link_id"
t.string "ip_address"
t.string "country"
t.string "city"
t.string "user_agent"
t.decimal "timestamp", precision: 18, scale: 6
t.index ["link_id"], name: "on_link_id"
t.index ["message_id"], name: "on_message_id"
end
create_table "deliveries", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.integer "message_id"
t.string "status"
t.integer "code"
t.string "output", limit: 512
t.string "details", limit: 512
t.boolean "sent_with_ssl", default: false
t.string "log_id", limit: 100
t.decimal "timestamp", precision: 18, scale: 6
t.decimal "time", precision: 8, scale: 2
t.index ["message_id"], name: "on_message_id"
end
create_table "links", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.integer "message_id"
t.string "token"
t.string "hash"
t.text "url"
t.decimal "timestamp", precision: 18, scale: 6
t.index ["message_id"], name: "on_message_id"
t.index ["token"], name: "on_token", length: 8
end
create_table "live_stats", primary_key: ["minute", "type"], charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.string "type", limit: 20, null: false
t.integer "minute", null: false
t.integer "count"
t.decimal "timestamp", precision: 18, scale: 6
end
create_table "loads", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.integer "message_id"
t.string "ip_address"
t.string "country"
t.string "city"
t.string "user_agent"
t.decimal "timestamp", precision: 18, scale: 6
t.index ["message_id"], name: "on_message_id"
end
create_table "messages", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.string "token"
t.string "scope", limit: 10
t.string "rcpt_to"
t.string "mail_from"
t.string "subject"
t.string "message_id"
t.decimal "timestamp", precision: 18, scale: 6
t.integer "route_id"
t.integer "domain_id"
t.integer "credential_id"
t.string "status"
t.boolean "held", default: false
t.string "size"
t.decimal "last_delivery_attempt", precision: 18, scale: 6
t.string "raw_table"
t.integer "raw_body_id"
t.integer "raw_headers_id"
t.boolean "inspected", default: false
t.boolean "spam", default: false
t.decimal "spam_score", precision: 8, scale: 2, default: "0.0"
t.boolean "threat", default: false
t.string "threat_details"
t.boolean "bounce", default: false
t.integer "bounce_for_id", default: 0
t.string "tag"
t.decimal "loaded", precision: 18, scale: 6
t.decimal "clicked", precision: 18, scale: 6
t.boolean "received_with_ssl"
t.decimal "hold_expiry", precision: 18, scale: 6
t.integer "tracked_links", default: 0
t.integer "tracked_images", default: 0
t.integer "parsed", limit: 1, default: 0
t.integer "endpoint_id"
t.string "endpoint_type"
t.index ["bounce_for_id"], name: "on_bounce_for_id"
t.index ["held"], name: "on_held"
t.index ["mail_from", "timestamp"], name: "on_mail_from", length: { mail_from: 12 }
t.index ["message_id"], name: "on_message_id", length: 8
t.index ["raw_table"], name: "on_raw_table", length: 14
t.index ["rcpt_to", "timestamp"], name: "on_rcpt_to", length: { rcpt_to: 12 }
t.index ["scope", "spam", "status", "timestamp"], name: "on_scope_and_status", length: { scope: 1, status: 6 }
t.index ["scope", "spam", "tag", "timestamp"], name: "on_scope_and_tag", length: { scope: 1, tag: 8 }
t.index ["scope", "spam", "timestamp"], name: "on_scope_and_spam", length: { scope: 1 }
t.index ["scope", "threat", "status", "timestamp"], name: "on_scope_and_thr_status", length: { scope: 1, status: 6 }
t.index ["scope", "threat", "timestamp"], name: "on_scope_and_threat", length: { scope: 1 }
t.index ["status"], name: "on_status", length: 8
t.index ["token"], name: "on_token", length: 6
end
create_table "migrations", primary_key: "version", id: :integer, default: nil, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
end
create_table "raw-2024-04-01", id: :integer, charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
t.binary "data", size: :long
t.integer "next"
end
create_table "raw-2024-04-02", id: :integer, charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
t.binary "data", size: :long
t.integer "next"
end
create_table "raw-2024-04-05", id: :integer, charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
t.binary "data", size: :long
t.integer "next"
end
create_table "raw-2024-06-25", id: :integer, charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
t.binary "data", size: :long
t.integer "next"
end
create_table "raw-2024-06-26", id: :integer, charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
t.binary "data", size: :long
t.integer "next"
end
create_table "raw-2024-07-06", id: :integer, charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
t.binary "data", size: :long
t.integer "next"
end
create_table "raw-2024-07-07", id: :integer, charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
t.binary "data", size: :long
t.integer "next"
end
create_table "raw-2024-07-08", id: :integer, charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
t.binary "data", size: :long
t.integer "next"
end
create_table "raw-2024-07-09", id: :integer, charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
t.binary "data", size: :long
t.integer "next"
end
create_table "raw-2024-07-10", id: :integer, charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
t.binary "data", size: :long
t.integer "next"
end
create_table "raw_message_sizes", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.string "table_name"
t.bigint "size"
t.index ["table_name"], name: "on_table_name", length: 14
end
create_table "spam_checks", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.integer "message_id"
t.decimal "score", precision: 8, scale: 2
t.string "code"
t.string "description"
t.index ["code"], name: "on_code", length: 8
t.index ["message_id"], name: "on_message_id"
end
create_table "stats_daily", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.integer "time"
t.bigint "incoming"
t.bigint "outgoing"
t.bigint "spam"
t.bigint "bounces"
t.bigint "held"
t.index ["time"], name: "on_time", unique: true
end
create_table "stats_hourly", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.integer "time"
t.bigint "incoming"
t.bigint "outgoing"
t.bigint "spam"
t.bigint "bounces"
t.bigint "held"
t.index ["time"], name: "on_time", unique: true
end
create_table "stats_monthly", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.integer "time"
t.bigint "incoming"
t.bigint "outgoing"
t.bigint "spam"
t.bigint "bounces"
t.bigint "held"
t.index ["time"], name: "on_time", unique: true
end
create_table "stats_yearly", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.integer "time"
t.bigint "incoming"
t.bigint "outgoing"
t.bigint "spam"
t.bigint "bounces"
t.bigint "held"
t.index ["time"], name: "on_time", unique: true
end
create_table "suppressions", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.string "type"
t.string "address"
t.string "reason"
t.decimal "timestamp", precision: 18, scale: 6
t.decimal "keep_until", precision: 18, scale: 6
t.index ["address"], name: "on_address", length: 6
t.index ["keep_until"], name: "on_keep_until"
end
create_table "webhook_requests", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.string "uuid"
t.string "event"
t.integer "attempt"
t.decimal "timestamp", precision: 18, scale: 6
t.integer "status_code"
t.text "body"
t.text "payload"
t.integer "will_retry", limit: 1
t.string "url"
t.integer "webhook_id"
t.index ["event"], name: "on_event", length: 8
t.index ["timestamp"], name: "on_timestamp"
t.index ["uuid"], name: "on_uuid", length: 8
t.index ["webhook_id"], name: "on_webhook_id"
end
end