mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
914 lines
16 KiB
TOML
914 lines
16 KiB
TOML
[table.users]
|
|
domain = "identity"
|
|
order = 10
|
|
primary_key = ["id"]
|
|
|
|
[[table.users.columns]]
|
|
name = "id"
|
|
type = "text_id"
|
|
length = 64
|
|
|
|
[[table.users.columns]]
|
|
name = "external_id"
|
|
type = "text"
|
|
length = 255
|
|
nullable = true
|
|
|
|
[[table.users.columns]]
|
|
name = "email"
|
|
type = "text"
|
|
length = 320
|
|
nullable = true
|
|
|
|
[[table.users.columns]]
|
|
name = "username"
|
|
type = "text"
|
|
length = 255
|
|
nullable = true
|
|
|
|
[[table.users.columns]]
|
|
name = "password_hash"
|
|
type = "text"
|
|
length = 255
|
|
nullable = true
|
|
|
|
[[table.users.columns]]
|
|
name = "role"
|
|
type = "text"
|
|
length = 64
|
|
nullable = true
|
|
|
|
[[table.users.columns]]
|
|
name = "auth_source"
|
|
type = "text"
|
|
length = 64
|
|
default = "local"
|
|
|
|
[[table.users.columns]]
|
|
name = "email_verified"
|
|
type = "bool"
|
|
default = false
|
|
|
|
[[table.users.columns]]
|
|
name = "is_active"
|
|
type = "bool"
|
|
default = true
|
|
|
|
[[table.users.columns]]
|
|
name = "is_deleted"
|
|
type = "bool"
|
|
default = false
|
|
|
|
[[table.users.columns]]
|
|
name = "allowed_models"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.users.columns]]
|
|
name = "allowed_models_mode"
|
|
type = "text"
|
|
length = 32
|
|
default = "unrestricted"
|
|
|
|
[[table.users.columns]]
|
|
name = "allowed_providers"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.users.columns]]
|
|
name = "allowed_providers_mode"
|
|
type = "text"
|
|
length = 32
|
|
default = "unrestricted"
|
|
|
|
[[table.users.columns]]
|
|
name = "allowed_api_formats"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.users.columns]]
|
|
name = "allowed_api_formats_mode"
|
|
type = "text"
|
|
length = 32
|
|
default = "unrestricted"
|
|
|
|
[[table.users.columns]]
|
|
name = "model_capability_settings"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.users.columns]]
|
|
name = "feature_settings"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.users.columns]]
|
|
name = "rate_limit"
|
|
type = "int32"
|
|
nullable = true
|
|
|
|
[[table.users.columns]]
|
|
name = "rate_limit_mode"
|
|
type = "text"
|
|
length = 32
|
|
default = "system"
|
|
|
|
[[table.users.columns]]
|
|
name = "metadata"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.users.columns]]
|
|
name = "created_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.users.columns]]
|
|
name = "updated_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.users.columns]]
|
|
name = "last_login_at"
|
|
type = "unix_seconds"
|
|
nullable = true
|
|
|
|
[[table.users.columns]]
|
|
name = "ldap_dn"
|
|
type = "text"
|
|
length = 1024
|
|
nullable = true
|
|
|
|
[[table.users.columns]]
|
|
name = "ldap_username"
|
|
type = "text"
|
|
length = 255
|
|
nullable = true
|
|
|
|
[[table.users.uniques]]
|
|
name = "users_email_key"
|
|
columns = ["email"]
|
|
|
|
[[table.users.uniques]]
|
|
name = "users_username_key"
|
|
columns = ["username"]
|
|
|
|
[table.user_groups]
|
|
domain = "identity"
|
|
order = 15
|
|
primary_key = ["id"]
|
|
|
|
[[table.user_groups.columns]]
|
|
name = "id"
|
|
type = "text_id"
|
|
length = 64
|
|
|
|
[[table.user_groups.columns]]
|
|
name = "name"
|
|
type = "text"
|
|
length = 100
|
|
|
|
[[table.user_groups.columns]]
|
|
name = "normalized_name"
|
|
type = "text"
|
|
length = 100
|
|
|
|
[[table.user_groups.columns]]
|
|
name = "description"
|
|
type = "long_text"
|
|
nullable = true
|
|
|
|
[[table.user_groups.columns]]
|
|
name = "priority"
|
|
type = "int32"
|
|
default = 0
|
|
|
|
[[table.user_groups.columns]]
|
|
name = "allowed_providers"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.user_groups.columns]]
|
|
name = "allowed_providers_mode"
|
|
type = "text"
|
|
length = 32
|
|
default = "inherit"
|
|
|
|
[[table.user_groups.columns]]
|
|
name = "allowed_api_formats"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.user_groups.columns]]
|
|
name = "allowed_api_formats_mode"
|
|
type = "text"
|
|
length = 32
|
|
default = "inherit"
|
|
|
|
[[table.user_groups.columns]]
|
|
name = "allowed_models"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.user_groups.columns]]
|
|
name = "allowed_models_mode"
|
|
type = "text"
|
|
length = 32
|
|
default = "inherit"
|
|
|
|
[[table.user_groups.columns]]
|
|
name = "rate_limit"
|
|
type = "int32"
|
|
nullable = true
|
|
|
|
[[table.user_groups.columns]]
|
|
name = "rate_limit_mode"
|
|
type = "text"
|
|
length = 32
|
|
default = "inherit"
|
|
|
|
[[table.user_groups.columns]]
|
|
name = "created_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.user_groups.columns]]
|
|
name = "updated_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.user_groups.uniques]]
|
|
name = "user_groups_normalized_name_key"
|
|
columns = ["normalized_name"]
|
|
|
|
[[table.user_groups.indexes]]
|
|
name = "user_groups_priority_name_idx"
|
|
columns = ["priority", "name", "id"]
|
|
|
|
[table.user_group_members]
|
|
domain = "identity"
|
|
order = 16
|
|
primary_key = ["group_id", "user_id"]
|
|
|
|
[[table.user_group_members.columns]]
|
|
name = "group_id"
|
|
type = "text_id"
|
|
length = 64
|
|
|
|
[[table.user_group_members.columns]]
|
|
name = "user_id"
|
|
type = "text_id"
|
|
length = 64
|
|
|
|
[[table.user_group_members.columns]]
|
|
name = "created_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.user_group_members.indexes]]
|
|
name = "user_group_members_user_id_idx"
|
|
columns = ["user_id"]
|
|
|
|
[table.api_keys]
|
|
domain = "identity"
|
|
order = 20
|
|
primary_key = ["id"]
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "id"
|
|
type = "text_id"
|
|
length = 64
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "user_id"
|
|
type = "text_id"
|
|
length = 64
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "key_hash"
|
|
type = "text"
|
|
length = 255
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "key_encrypted"
|
|
type = "long_text"
|
|
nullable = true
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "name"
|
|
type = "text"
|
|
length = 255
|
|
nullable = true
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "key_prefix"
|
|
type = "text"
|
|
length = 64
|
|
nullable = true
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "status"
|
|
type = "text"
|
|
length = 64
|
|
default = "active"
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "allowed_models"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "allowed_providers"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "allowed_api_formats"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "rate_limit"
|
|
type = "int32"
|
|
nullable = true
|
|
default = 100
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "concurrent_limit"
|
|
type = "int32"
|
|
nullable = true
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "force_capabilities"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "feature_settings"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "is_active"
|
|
type = "bool"
|
|
default = true
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "is_locked"
|
|
type = "bool"
|
|
default = false
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "is_standalone"
|
|
type = "bool"
|
|
default = false
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "auto_delete_on_expiry"
|
|
type = "bool"
|
|
default = false
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "total_requests"
|
|
type = "int64"
|
|
default = 0
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "total_tokens"
|
|
type = "int64"
|
|
default = 0
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "total_cost_usd"
|
|
type = "float64"
|
|
default = 0
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "metadata"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "expires_at"
|
|
type = "unix_seconds"
|
|
nullable = true
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "last_used_at"
|
|
type = "unix_seconds"
|
|
nullable = true
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "created_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.api_keys.columns]]
|
|
name = "updated_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.api_keys.uniques]]
|
|
name = "api_keys_key_hash_key"
|
|
columns = ["key_hash"]
|
|
|
|
[[table.api_keys.indexes]]
|
|
name = "api_keys_user_id_idx"
|
|
columns = ["user_id"]
|
|
|
|
[table.audit_logs]
|
|
domain = "identity"
|
|
order = 30
|
|
primary_key = ["id"]
|
|
|
|
[[table.audit_logs.columns]]
|
|
name = "id"
|
|
type = "text_id"
|
|
length = 64
|
|
|
|
[[table.audit_logs.columns]]
|
|
name = "event_type"
|
|
type = "text"
|
|
length = 64
|
|
|
|
[[table.audit_logs.columns]]
|
|
name = "user_id"
|
|
type = "text_id"
|
|
length = 64
|
|
nullable = true
|
|
|
|
[[table.audit_logs.columns]]
|
|
name = "api_key_id"
|
|
type = "text_id"
|
|
length = 64
|
|
nullable = true
|
|
|
|
[[table.audit_logs.columns]]
|
|
name = "description"
|
|
type = "long_text"
|
|
|
|
[[table.audit_logs.columns]]
|
|
name = "ip_address"
|
|
type = "text"
|
|
length = 64
|
|
nullable = true
|
|
|
|
[[table.audit_logs.columns]]
|
|
name = "user_agent"
|
|
type = "text"
|
|
length = 512
|
|
nullable = true
|
|
|
|
[[table.audit_logs.columns]]
|
|
name = "request_id"
|
|
type = "text"
|
|
length = 128
|
|
nullable = true
|
|
|
|
[[table.audit_logs.columns]]
|
|
name = "event_metadata"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.audit_logs.columns]]
|
|
name = "status_code"
|
|
type = "int32"
|
|
nullable = true
|
|
|
|
[[table.audit_logs.columns]]
|
|
name = "error_message"
|
|
type = "long_text"
|
|
nullable = true
|
|
|
|
[[table.audit_logs.columns]]
|
|
name = "created_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.audit_logs.indexes]]
|
|
name = "audit_logs_created_at_idx"
|
|
columns = ["created_at"]
|
|
|
|
[[table.audit_logs.indexes]]
|
|
name = "audit_logs_event_type_idx"
|
|
columns = ["event_type"]
|
|
|
|
[[table.audit_logs.indexes]]
|
|
name = "audit_logs_request_id_idx"
|
|
columns = ["request_id"]
|
|
|
|
[[table.audit_logs.indexes]]
|
|
name = "audit_logs_user_id_idx"
|
|
columns = ["user_id"]
|
|
|
|
[table.announcements]
|
|
domain = "identity"
|
|
order = 40
|
|
primary_key = ["id"]
|
|
|
|
[[table.announcements.columns]]
|
|
name = "id"
|
|
type = "text_id"
|
|
length = 64
|
|
|
|
[[table.announcements.columns]]
|
|
name = "title"
|
|
type = "text"
|
|
length = 200
|
|
|
|
[[table.announcements.columns]]
|
|
name = "content"
|
|
type = "long_text"
|
|
|
|
[[table.announcements.columns]]
|
|
name = "type"
|
|
type = "text"
|
|
length = 32
|
|
default = "info"
|
|
|
|
[[table.announcements.columns]]
|
|
name = "priority"
|
|
type = "int32"
|
|
default = 0
|
|
|
|
[[table.announcements.columns]]
|
|
name = "author_id"
|
|
type = "text_id"
|
|
length = 64
|
|
nullable = true
|
|
|
|
[[table.announcements.columns]]
|
|
name = "is_active"
|
|
type = "bool"
|
|
default = true
|
|
|
|
[[table.announcements.columns]]
|
|
name = "is_pinned"
|
|
type = "bool"
|
|
default = false
|
|
|
|
[[table.announcements.columns]]
|
|
name = "start_time"
|
|
type = "unix_seconds"
|
|
nullable = true
|
|
|
|
[[table.announcements.columns]]
|
|
name = "end_time"
|
|
type = "unix_seconds"
|
|
nullable = true
|
|
|
|
[[table.announcements.columns]]
|
|
name = "created_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.announcements.columns]]
|
|
name = "updated_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.announcements.indexes]]
|
|
name = "announcements_author_id_idx"
|
|
columns = ["author_id"]
|
|
|
|
[[table.announcements.indexes]]
|
|
name = "announcements_created_at_idx"
|
|
columns = ["created_at"]
|
|
|
|
[[table.announcements.indexes]]
|
|
name = "announcements_is_active_idx"
|
|
columns = ["is_active"]
|
|
|
|
[table.announcement_reads]
|
|
domain = "identity"
|
|
order = 50
|
|
primary_key = ["id"]
|
|
|
|
[[table.announcement_reads.columns]]
|
|
name = "id"
|
|
type = "text_id"
|
|
length = 64
|
|
|
|
[[table.announcement_reads.columns]]
|
|
name = "user_id"
|
|
type = "text_id"
|
|
length = 64
|
|
|
|
[[table.announcement_reads.columns]]
|
|
name = "announcement_id"
|
|
type = "text_id"
|
|
length = 64
|
|
|
|
[[table.announcement_reads.columns]]
|
|
name = "read_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.announcement_reads.uniques]]
|
|
name = "uq_user_announcement"
|
|
columns = ["user_id", "announcement_id"]
|
|
|
|
[[table.announcement_reads.indexes]]
|
|
name = "announcement_reads_announcement_id_idx"
|
|
columns = ["announcement_id"]
|
|
|
|
[[table.announcement_reads.indexes]]
|
|
name = "announcement_reads_user_id_idx"
|
|
columns = ["user_id"]
|
|
|
|
[table.management_tokens]
|
|
domain = "identity"
|
|
order = 60
|
|
primary_key = ["id"]
|
|
|
|
[[table.management_tokens.columns]]
|
|
name = "id"
|
|
type = "text_id"
|
|
length = 64
|
|
|
|
[[table.management_tokens.columns]]
|
|
name = "user_id"
|
|
type = "text_id"
|
|
length = 64
|
|
|
|
[[table.management_tokens.columns]]
|
|
name = "name"
|
|
type = "text"
|
|
length = 255
|
|
|
|
[[table.management_tokens.columns]]
|
|
name = "description"
|
|
type = "long_text"
|
|
nullable = true
|
|
|
|
[[table.management_tokens.columns]]
|
|
name = "token_hash"
|
|
type = "text"
|
|
length = 255
|
|
|
|
[[table.management_tokens.columns]]
|
|
name = "token_prefix"
|
|
type = "text"
|
|
length = 64
|
|
nullable = true
|
|
|
|
[[table.management_tokens.columns]]
|
|
name = "allowed_ips"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.management_tokens.columns]]
|
|
name = "permissions"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.management_tokens.columns]]
|
|
name = "expires_at"
|
|
type = "unix_seconds"
|
|
nullable = true
|
|
|
|
[[table.management_tokens.columns]]
|
|
name = "last_used_at"
|
|
type = "unix_seconds"
|
|
nullable = true
|
|
|
|
[[table.management_tokens.columns]]
|
|
name = "last_used_ip"
|
|
type = "text"
|
|
length = 255
|
|
nullable = true
|
|
|
|
[[table.management_tokens.columns]]
|
|
name = "usage_count"
|
|
type = "int64"
|
|
default = 0
|
|
|
|
[[table.management_tokens.columns]]
|
|
name = "is_active"
|
|
type = "bool"
|
|
default = true
|
|
|
|
[[table.management_tokens.columns]]
|
|
name = "created_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.management_tokens.columns]]
|
|
name = "updated_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.management_tokens.uniques]]
|
|
name = "management_tokens_token_hash_key"
|
|
columns = ["token_hash"]
|
|
|
|
[[table.management_tokens.uniques]]
|
|
name = "uq_management_tokens_user_name"
|
|
columns = ["user_id", "name"]
|
|
|
|
[[table.management_tokens.indexes]]
|
|
name = "management_tokens_user_id_idx"
|
|
columns = ["user_id"]
|
|
|
|
[table.user_preferences]
|
|
domain = "identity"
|
|
order = 70
|
|
primary_key = ["id"]
|
|
|
|
[[table.user_preferences.columns]]
|
|
name = "id"
|
|
type = "text_id"
|
|
length = 64
|
|
|
|
[[table.user_preferences.columns]]
|
|
name = "user_id"
|
|
type = "text_id"
|
|
length = 64
|
|
|
|
[[table.user_preferences.columns]]
|
|
name = "avatar_url"
|
|
type = "text"
|
|
length = 500
|
|
nullable = true
|
|
|
|
[[table.user_preferences.columns]]
|
|
name = "bio"
|
|
type = "long_text"
|
|
nullable = true
|
|
|
|
[[table.user_preferences.columns]]
|
|
name = "default_provider_id"
|
|
type = "text_id"
|
|
length = 64
|
|
nullable = true
|
|
|
|
[[table.user_preferences.columns]]
|
|
name = "theme"
|
|
type = "text"
|
|
length = 20
|
|
default = "light"
|
|
|
|
[[table.user_preferences.columns]]
|
|
name = "language"
|
|
type = "text"
|
|
length = 10
|
|
default = "zh-CN"
|
|
|
|
[[table.user_preferences.columns]]
|
|
name = "timezone"
|
|
type = "text"
|
|
length = 50
|
|
default = "Asia/Shanghai"
|
|
|
|
[[table.user_preferences.columns]]
|
|
name = "email_notifications"
|
|
type = "bool"
|
|
default = true
|
|
|
|
[[table.user_preferences.columns]]
|
|
name = "usage_alerts"
|
|
type = "bool"
|
|
default = true
|
|
|
|
[[table.user_preferences.columns]]
|
|
name = "announcement_notifications"
|
|
type = "bool"
|
|
default = true
|
|
|
|
[[table.user_preferences.columns]]
|
|
name = "created_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.user_preferences.columns]]
|
|
name = "updated_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.user_preferences.uniques]]
|
|
name = "user_preferences_user_id_key"
|
|
columns = ["user_id"]
|
|
|
|
[[table.user_preferences.indexes]]
|
|
name = "user_preferences_default_provider_id_idx"
|
|
columns = ["default_provider_id"]
|
|
|
|
[[table.user_preferences.indexes]]
|
|
name = "user_preferences_user_id_idx"
|
|
columns = ["user_id"]
|
|
|
|
[table.user_sessions]
|
|
domain = "identity"
|
|
order = 80
|
|
primary_key = ["id"]
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "id"
|
|
type = "text_id"
|
|
length = 64
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "user_id"
|
|
type = "text_id"
|
|
length = 64
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "client_device_id"
|
|
type = "text"
|
|
length = 128
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "device_label"
|
|
type = "text"
|
|
length = 120
|
|
nullable = true
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "device_type"
|
|
type = "text"
|
|
length = 20
|
|
default = "unknown"
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "browser_name"
|
|
type = "text"
|
|
length = 50
|
|
nullable = true
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "browser_version"
|
|
type = "text"
|
|
length = 50
|
|
nullable = true
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "os_name"
|
|
type = "text"
|
|
length = 50
|
|
nullable = true
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "os_version"
|
|
type = "text"
|
|
length = 50
|
|
nullable = true
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "device_model"
|
|
type = "text"
|
|
length = 100
|
|
nullable = true
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "ip_address"
|
|
type = "text"
|
|
length = 45
|
|
nullable = true
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "user_agent"
|
|
type = "text"
|
|
length = 1000
|
|
nullable = true
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "client_hints"
|
|
type = "json"
|
|
nullable = true
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "refresh_token_hash"
|
|
type = "text"
|
|
length = 64
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "prev_refresh_token_hash"
|
|
type = "text"
|
|
length = 64
|
|
nullable = true
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "rotated_at"
|
|
type = "unix_seconds"
|
|
nullable = true
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "last_seen_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "expires_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "revoked_at"
|
|
type = "unix_seconds"
|
|
nullable = true
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "revoke_reason"
|
|
type = "text"
|
|
length = 100
|
|
nullable = true
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "created_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.user_sessions.columns]]
|
|
name = "updated_at"
|
|
type = "unix_seconds"
|
|
|
|
[[table.user_sessions.indexes]]
|
|
name = "user_sessions_user_active_idx"
|
|
columns = ["user_id", "revoked_at", "expires_at"]
|
|
|
|
[[table.user_sessions.indexes]]
|
|
name = "user_sessions_user_device_idx"
|
|
columns = ["user_id", "client_device_id"]
|