Refactor: Approve test data generator tool use

This commit is contained in:
gpt-engineer-app[bot]
2025-10-10 16:44:08 +00:00
parent c8443e05a3
commit bc36583598
4 changed files with 177 additions and 20 deletions

View File

@@ -181,6 +181,39 @@ export function TestDataGenerator() {
</AlertDescription>
</Alert>
)}
{/* Dependency warnings */}
{entityTypes.rides && stats.parks === 0 && !entityTypes.parks && (
<Alert variant="destructive">
<AlertTriangle className="h-4 w-4" />
<AlertDescription>
<strong>Missing Dependency:</strong> You've selected "rides" but no parks exist.
Rides require parks to be created first. Either enable "parks" or generate parks separately first.
</AlertDescription>
</Alert>
)}
{entityTypes.ride_models && stats.manufacturers === 0 && !entityTypes.manufacturers && (
<Alert variant="destructive">
<AlertTriangle className="h-4 w-4" />
<AlertDescription>
<strong>Missing Dependency:</strong> You've selected "ride models" but no manufacturers exist.
Ride models require manufacturers to be created first. Either enable "manufacturers" or generate manufacturers separately first.
</AlertDescription>
</Alert>
)}
{(entityTypes.parks || entityTypes.rides) &&
stats.operators === 0 && stats.property_owners === 0 &&
!entityTypes.operators && !entityTypes.property_owners && (
<Alert>
<AlertTriangle className="h-4 w-4" />
<AlertDescription>
<strong>Optional Dependencies:</strong> Parks and rides can optionally link to operators and property owners.
Consider enabling "operators" and "property_owners" for more realistic test data with proper dependency chains.
</AlertDescription>
</Alert>
)}
</div>
)}

View File

@@ -2288,6 +2288,7 @@ export type Database = {
entity_type: string
id: string
metadata: Json | null
submission_item_id: string | null
test_session_id: string | null
}
Insert: {
@@ -2297,6 +2298,7 @@ export type Database = {
entity_type: string
id?: string
metadata?: Json | null
submission_item_id?: string | null
test_session_id?: string | null
}
Update: {
@@ -2306,9 +2308,18 @@ export type Database = {
entity_type?: string
id?: string
metadata?: Json | null
submission_item_id?: string | null
test_session_id?: string | null
}
Relationships: []
Relationships: [
{
foreignKeyName: "test_data_registry_submission_item_id_fkey"
columns: ["submission_item_id"]
isOneToOne: false
referencedRelation: "submission_items"
referencedColumns: ["id"]
},
]
}
user_blocks: {
Row: {