mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
feat: remove avatarMode/dicebearStyle from DB schema and types
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
7781caac53
commit
6a975629a5
@@ -0,0 +1,3 @@
|
|||||||
|
ALTER TABLE "settings" DROP COLUMN "avatar_mode";--> statement-breakpoint
|
||||||
|
ALTER TABLE "settings" DROP COLUMN "dicebear_style";--> statement-breakpoint
|
||||||
|
DROP TYPE "public"."avatar_mode";
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -477,6 +477,13 @@
|
|||||||
"when": 1782134460680,
|
"when": 1782134460680,
|
||||||
"tag": "0068_bitter_revanche",
|
"tag": "0068_bitter_revanche",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 69,
|
||||||
|
"version": "7",
|
||||||
|
"when": 1782377492743,
|
||||||
|
"tag": "0069_elite_madrox",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
import {boolean, pgEnum, pgTable, uuid, varchar} from "drizzle-orm/pg-core";
|
import {boolean, pgTable, uuid, varchar} from "drizzle-orm/pg-core";
|
||||||
|
|
||||||
export const avatarModeEnum = pgEnum('avatar_mode', ['internal', 'gravatar', 'dicebear']);
|
|
||||||
import {createSelectSchema} from "drizzle-zod";
|
import {createSelectSchema} from "drizzle-zod";
|
||||||
import {z} from "zod";
|
import {z} from "zod";
|
||||||
import {timestamps} from "@/db/schema/00_common";
|
import {timestamps} from "@/db/schema/00_common";
|
||||||
@@ -23,12 +21,10 @@ export const setting = pgTable("settings", {
|
|||||||
.references(() => storageChannel.id, {onDelete: "set null"}),
|
.references(() => storageChannel.id, {onDelete: "set null"}),
|
||||||
encryption: boolean("encryption").default(false),
|
encryption: boolean("encryption").default(false),
|
||||||
onboarding: boolean("onboarding").default(false).notNull(),
|
onboarding: boolean("onboarding").default(false).notNull(),
|
||||||
avatarMode: avatarModeEnum('avatar_mode').default('internal').notNull(),
|
|
||||||
dicebearStyle: varchar('dicebear_style', { length: 64 }).default('thumbs').notNull(),
|
|
||||||
...timestamps
|
...timestamps
|
||||||
});
|
});
|
||||||
|
|
||||||
export const settingRelations = relations(setting, ({one, many}) => ({
|
export const settingRelations = relations(setting, ({one}) => ({
|
||||||
storageChannel: one(storageChannel, {fields: [setting.defaultStorageChannelId], references: [storageChannel.id]}),
|
storageChannel: one(storageChannel, {fields: [setting.defaultStorageChannelId], references: [storageChannel.id]}),
|
||||||
notificationChannel: one(notificationChannel, {fields: [setting.defaultNotificationChannelId], references: [notificationChannel.id]}),
|
notificationChannel: one(notificationChannel, {fields: [setting.defaultNotificationChannelId], references: [notificationChannel.id]}),
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -21,10 +21,6 @@ export type OnboardingSecurityData = {
|
|||||||
method: "passkey" | "two-factor" | "skipped";
|
method: "passkey" | "two-factor" | "skipped";
|
||||||
};
|
};
|
||||||
|
|
||||||
export type OnboardingPreferencesData = {
|
|
||||||
theme: "light" | "dark";
|
|
||||||
};
|
|
||||||
|
|
||||||
export type OnboardingOrgData = {
|
export type OnboardingOrgData = {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
@@ -44,13 +40,9 @@ export type OnboardingChannel = {
|
|||||||
organizationId?: string | null;
|
organizationId?: string | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type AvatarMode = 'internal' | 'gravatar' | 'dicebear';
|
|
||||||
|
|
||||||
export type OnboardingDefaultsData = {
|
export type OnboardingDefaultsData = {
|
||||||
notifierId?: string;
|
notifierId?: string;
|
||||||
storageId?: string;
|
storageId?: string;
|
||||||
avatarMode?: AvatarMode;
|
|
||||||
dicebearStyle?: string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export type OnboardingAgent = {
|
export type OnboardingAgent = {
|
||||||
@@ -123,7 +115,6 @@ export type OnboardingFlowData = {
|
|||||||
meta?: OnboardingMeta;
|
meta?: OnboardingMeta;
|
||||||
account?: OnboardingAccountData;
|
account?: OnboardingAccountData;
|
||||||
security?: OnboardingSecurityData;
|
security?: OnboardingSecurityData;
|
||||||
preferences?: OnboardingPreferencesData;
|
|
||||||
org?: OnboardingOrgData;
|
org?: OnboardingOrgData;
|
||||||
members?: OnboardingMember[];
|
members?: OnboardingMember[];
|
||||||
notifiers?: OnboardingChannel[];
|
notifiers?: OnboardingChannel[];
|
||||||
|
|||||||
Reference in New Issue
Block a user