feat: done and dusted - new plasma ui

This commit is contained in:
=
2025-07-02 01:16:49 +05:30
parent fb9c580e53
commit fa7318eeb1
75 changed files with 175 additions and 1929 deletions
@@ -1,5 +1,6 @@
import { Knex } from "knex";
import { TableName, ProjectType } from "../schemas";
import { ProjectType, TableName } from "../schemas";
export async function up(knex: Knex): Promise<void> {
const hasTypeColumn = await knex.schema.hasColumn(TableName.Project, "type");
@@ -13,7 +14,19 @@ export async function up(knex: Knex): Promise<void> {
await knex(TableName.Project).update({
// eslint-disable-next-line
// @ts-ignore this is because this field is created later
defaultType: knex.raw("type")
defaultType: knex.raw(`
CASE
WHEN "type" IS NULL OR "type" = '' THEN 'secret-manager'
ELSE "type"
END
`)
});
}
const hasTemplateTypeColumn = await knex.schema.hasColumn(TableName.ProjectTemplates, "type");
if (hasTemplateTypeColumn) {
await knex.schema.alterTable(TableName.ProjectTemplates, (t) => {
t.string("type").nullable().alter();
});
}
}
+1 -1
View File
@@ -16,7 +16,7 @@ export const ProjectTemplatesSchema = z.object({
orgId: z.string().uuid(),
createdAt: z.date(),
updatedAt: z.date(),
type: z.string().default("secret-manager")
type: z.string().nullable().optional()
});
export type TProjectTemplates = z.infer<typeof ProjectTemplatesSchema>;