generate_schema_proposal

Generate Drizzle ORM schemas from analysis results

Overview

Takes the raw field analysis from your WordPress export and turns it into a clean, typed database schema using Drizzle ORM. Maps WooCommerce fields to proper column types and uses JSONB for flexible custom attributes — giving you a production-ready schema for your modern stack.

How It Works

  1. Takes the analysis result from analyze_ingestion_file as input.
  2. Maps WordPress/WooCommerce fields to appropriate PostgreSQL column types (text, numeric, boolean, timestamp).
  3. Groups custom attributes into a JSONB column for flexibility.
  4. Generates a complete Drizzle ORM schema file ready to use in your project.

Input Parameters

ParameterTypeRequiredDescription
analysis_result object required The output from analyze_ingestion_file
table_name string optional Name for the database table (default: products)

What You Get Back

Example Use Case

After analyzing your WooCommerce export, this tool generates a Drizzle schema with typed columns for price, SKU, stock status, and a JSONB column for all those custom product attributes — ready to paste into your Next.js project.

Tips

Always run analyze_ingestion_file first to get the analysis_result input.
The generated schema uses JSONB for custom attributes, making it easy to query without rigid column structures.
Review the output and adjust column types if your app has specific requirements (e.g., decimal precision for prices).

Related Tools