mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-25 06:51:23 -05:00
Refactor: Split user management migration
This commit is contained in:
@@ -288,6 +288,7 @@ export type Database = {
|
|||||||
Row: {
|
Row: {
|
||||||
avatar_image_id: string | null
|
avatar_image_id: string | null
|
||||||
avatar_url: string | null
|
avatar_url: string | null
|
||||||
|
banned: boolean
|
||||||
bio: string | null
|
bio: string | null
|
||||||
coaster_count: number | null
|
coaster_count: number | null
|
||||||
created_at: string
|
created_at: string
|
||||||
@@ -308,6 +309,7 @@ export type Database = {
|
|||||||
Insert: {
|
Insert: {
|
||||||
avatar_image_id?: string | null
|
avatar_image_id?: string | null
|
||||||
avatar_url?: string | null
|
avatar_url?: string | null
|
||||||
|
banned?: boolean
|
||||||
bio?: string | null
|
bio?: string | null
|
||||||
coaster_count?: number | null
|
coaster_count?: number | null
|
||||||
created_at?: string
|
created_at?: string
|
||||||
@@ -328,6 +330,7 @@ export type Database = {
|
|||||||
Update: {
|
Update: {
|
||||||
avatar_image_id?: string | null
|
avatar_image_id?: string | null
|
||||||
avatar_url?: string | null
|
avatar_url?: string | null
|
||||||
|
banned?: boolean
|
||||||
bio?: string | null
|
bio?: string | null
|
||||||
coaster_count?: number | null
|
coaster_count?: number | null
|
||||||
created_at?: string
|
created_at?: string
|
||||||
@@ -775,7 +778,7 @@ export type Database = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Enums: {
|
Enums: {
|
||||||
app_role: "admin" | "moderator" | "user"
|
app_role: "admin" | "moderator" | "user" | "superuser"
|
||||||
}
|
}
|
||||||
CompositeTypes: {
|
CompositeTypes: {
|
||||||
[_ in never]: never
|
[_ in never]: never
|
||||||
@@ -903,7 +906,7 @@ export type CompositeTypes<
|
|||||||
export const Constants = {
|
export const Constants = {
|
||||||
public: {
|
public: {
|
||||||
Enums: {
|
Enums: {
|
||||||
app_role: ["admin", "moderator", "user"],
|
app_role: ["admin", "moderator", "user", "superuser"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as const
|
} as const
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
-- First migration: Add superuser role and banned column
|
||||||
|
ALTER TYPE public.app_role ADD VALUE IF NOT EXISTS 'superuser';
|
||||||
|
|
||||||
|
-- Add banned column to profiles table
|
||||||
|
ALTER TABLE public.profiles ADD COLUMN IF NOT EXISTS banned boolean NOT NULL DEFAULT false;
|
||||||
Reference in New Issue
Block a user