feat: Implement Auth0 database migration

This commit is contained in:
gpt-engineer-app[bot]
2025-11-01 01:01:37 +00:00
parent cdb1d0f762
commit 858320cd03
2 changed files with 215 additions and 0 deletions

View File

@@ -63,6 +63,7 @@ export type Database = {
Row: {
action: string
admin_user_id: string
auth0_event_type: string | null
created_at: string
details: Json | null
id: string
@@ -71,6 +72,7 @@ export type Database = {
Insert: {
action: string
admin_user_id: string
auth0_event_type?: string | null
created_at?: string
details?: Json | null
id?: string
@@ -79,6 +81,7 @@ export type Database = {
Update: {
action?: string
admin_user_id?: string
auth0_event_type?: string | null
created_at?: string
details?: Json | null
id?: string
@@ -119,6 +122,57 @@ export type Database = {
}
Relationships: []
}
auth0_sync_log: {
Row: {
auth0_sub: string
completed_at: string | null
created_at: string
error_message: string | null
id: string
metadata: Json | null
sync_status: string
sync_type: string
user_id: string | null
}
Insert: {
auth0_sub: string
completed_at?: string | null
created_at?: string
error_message?: string | null
id?: string
metadata?: Json | null
sync_status?: string
sync_type: string
user_id?: string | null
}
Update: {
auth0_sub?: string
completed_at?: string | null
created_at?: string
error_message?: string | null
id?: string
metadata?: Json | null
sync_status?: string
sync_type?: string
user_id?: string | null
}
Relationships: [
{
foreignKeyName: "auth0_sync_log_user_id_fkey"
columns: ["user_id"]
isOneToOne: false
referencedRelation: "filtered_profiles"
referencedColumns: ["user_id"]
},
{
foreignKeyName: "auth0_sync_log_user_id_fkey"
columns: ["user_id"]
isOneToOne: false
referencedRelation: "profiles"
referencedColumns: ["user_id"]
},
]
}
blog_posts: {
Row: {
author_id: string
@@ -1968,6 +2022,7 @@ export type Database = {
}
profiles: {
Row: {
auth0_sub: string | null
avatar_image_id: string | null
avatar_url: string | null
ban_expires_at: string | null
@@ -2001,6 +2056,7 @@ export type Database = {
username: string
}
Insert: {
auth0_sub?: string | null
avatar_image_id?: string | null
avatar_url?: string | null
ban_expires_at?: string | null
@@ -2034,6 +2090,7 @@ export type Database = {
username: string
}
Update: {
auth0_sub?: string | null
avatar_image_id?: string | null
avatar_url?: string | null
ban_expires_at?: string | null
@@ -4602,6 +4659,8 @@ export type Database = {
extract_cf_image_id: { Args: { url: string }; Returns: string }
generate_deletion_confirmation_code: { Args: never; Returns: string }
generate_ticket_number: { Args: never; Returns: string }
get_auth0_sub_from_jwt: { Args: never; Returns: string }
get_current_user_id: { Args: never; Returns: string }
get_email_change_status: { Args: never; Returns: Json }
get_filtered_profile: {
Args: { _profile_user_id: string; _viewer_id?: string }
@@ -4670,6 +4729,7 @@ export type Database = {
Returns: Json
}
has_aal2: { Args: never; Returns: boolean }
has_auth0_mfa: { Args: never; Returns: boolean }
has_mfa_enabled: { Args: { _user_id: string }; Returns: boolean }
has_pending_dependents: { Args: { item_id: string }; Returns: boolean }
has_role: {
@@ -4685,6 +4745,7 @@ export type Database = {
Args: { post_slug: string }
Returns: undefined
}
is_auth0_user: { Args: never; Returns: boolean }
is_moderator: { Args: { _user_id: string }; Returns: boolean }
is_superuser: { Args: { _user_id: string }; Returns: boolean }
is_user_banned: { Args: { _user_id: string }; Returns: boolean }