refactor-db #33

Merged
vivy-agent merged 42 commits from refactor-db into main 2026-05-26 21:33:21 +07:00
7 changed files with 6647 additions and 2401 deletions
Showing only changes of commit 2e81242ca5 - Show all commits

View File

@ -46,6 +46,13 @@ Enum "like_type" {
"dislike" "dislike"
} }
Enum "device_type" {
"mobile"
"tablet"
"desktop"
"unknown"
}
Table "public"."user_rating_preferences" { Table "public"."user_rating_preferences" {
"user_id" uuid [unique, not null, ref: > "public"."user_preferences"."user_id"] "user_id" uuid [unique, not null, ref: > "public"."user_preferences"."user_id"]
"rating_id" uuid [not null, ref: > "public"."media_age_ratings"."id"] "rating_id" uuid [not null, ref: > "public"."media_age_ratings"."id"]
@ -362,6 +369,7 @@ Table "public"."users" {
"auth_provider" varchar(64) "auth_provider" varchar(64)
"provider_token" varchar(255) "provider_token" varchar(255)
"created_at" timestamp [not null, default: `now()`] "created_at" timestamp [not null, default: `now()`]
"verified_at" timestamp
"updated_at" timestamp [not null] "updated_at" timestamp [not null]
"deleted_at" timestamp "deleted_at" timestamp
@ -536,3 +544,17 @@ Table "public"."comment_likes" {
(comment_id, user_id) [unique, name: "index_1_6"] (comment_id, user_id) [unique, name: "index_1_6"]
} }
} }
Table "public"."user_sessions" {
"id" uuid [pk, not null]
"user_id" uuid [not null, ref: > "public"."users"."id"]
"device_type" device_type [not null]
"os_type" varchar(500)
"os_version" varchar(500)
"browser_name" varchar(500)
"browser_version" varchar(500)
"ip_login" inet [not null]
"last_activity_at" timestamp
"login_at" timestamp [not null]
"logout_at" timestamp
}