mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
migration table
This commit is contained in:
parent
e3dcc01d88
commit
aecff4bdbf
5 changed files with 10147 additions and 14 deletions
3
src/app/db/migrations/0213_tired_victor_mancha.sql
Normal file
3
src/app/db/migrations/0213_tired_victor_mancha.sql
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE "hubspot_project_data" RENAME TO "hubspot_projects_data";--> statement-breakpoint
|
||||
ALTER TABLE "hubspot_projects_data" DROP CONSTRAINT "hubspot_project_data_project_id_unique";--> statement-breakpoint
|
||||
ALTER TABLE "hubspot_projects_data" ADD CONSTRAINT "hubspot_projects_data_project_id_unique" UNIQUE("project_id");
|
||||
10119
src/app/db/migrations/meta/0213_snapshot.json
Normal file
10119
src/app/db/migrations/meta/0213_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1492,6 +1492,13 @@
|
|||
"when": 1779900843875,
|
||||
"tag": "0212_sweet_the_anarchist",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 213,
|
||||
"version": "7",
|
||||
"when": 1779909562600,
|
||||
"tag": "0213_tired_victor_mancha",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { pgTable, text, timestamp, uuid } from "drizzle-orm/pg-core";
|
||||
import { InferModel } from "drizzle-orm";
|
||||
|
||||
export const hubspotProjectData = pgTable("hubspot_project_data", {
|
||||
export const hubspotProjectsData = pgTable("hubspot_projects_data", {
|
||||
id: uuid("id").defaultRandom().primaryKey(),
|
||||
|
||||
projectId: text("project_id").notNull().unique(),
|
||||
|
|
@ -17,5 +17,5 @@ export const hubspotProjectData = pgTable("hubspot_project_data", {
|
|||
.notNull(),
|
||||
});
|
||||
|
||||
export type HubspotProjectData = InferModel<typeof hubspotProjectData, "select">;
|
||||
export type NewHubspotProjectData = InferModel<typeof hubspotProjectData, "insert">;
|
||||
export type HubspotProjectsData = InferModel<typeof hubspotProjectsData, "select">;
|
||||
export type NewHubspotProjectsData = InferModel<typeof hubspotProjectsData, "insert">;
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
"use client";
|
||||
|
||||
import { Fragment } from "react";
|
||||
import { ChevronDown, Layers, Minus } from "lucide-react";
|
||||
import { Check, ChevronDown, Layers, Minus } from "lucide-react";
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuCheckboxItem,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuLabel,
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuTrigger,
|
||||
|
|
@ -165,23 +166,26 @@ function GroupDropdown({
|
|||
return (
|
||||
<Fragment key={`parent-${node.label}`}>
|
||||
{needsSeparator && <DropdownMenuSeparator />}
|
||||
<DropdownMenuCheckboxItem
|
||||
checked={parentState}
|
||||
onCheckedChange={() => toggleParent(childValues)}
|
||||
onSelect={(e) => e.preventDefault()}
|
||||
className="text-sm font-semibold"
|
||||
<DropdownMenuItem
|
||||
onSelect={(e) => {
|
||||
e.preventDefault();
|
||||
toggleParent(childValues);
|
||||
}}
|
||||
className="relative flex items-center py-1.5 pl-8 pr-2 text-sm font-semibold"
|
||||
>
|
||||
{parentState === "indeterminate" && (
|
||||
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
||||
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
||||
{parentState === true ? (
|
||||
<Check className="h-4 w-4" />
|
||||
) : parentState === "indeterminate" ? (
|
||||
<Minus className="h-4 w-4" />
|
||||
</span>
|
||||
)}
|
||||
) : null}
|
||||
</span>
|
||||
{node.muted ? (
|
||||
<span className="italic text-gray-500">{node.label}</span>
|
||||
) : (
|
||||
node.label
|
||||
)}
|
||||
</DropdownMenuCheckboxItem>
|
||||
</DropdownMenuItem>
|
||||
{node.children.map((child) => (
|
||||
<DropdownMenuCheckboxItem
|
||||
key={child.value}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue