createNorthwindTables() — drizzle-orm Function Reference
Architecture documentation for the createNorthwindTables() function in mysql.test.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 80877ef4_9eee_9e40_c37f_f1161a5e4a90["createNorthwindTables()"] 23393d08_86bb_d392_da82_d43eb3156269["mysql.test.ts"] 80877ef4_9eee_9e40_c37f_f1161a5e4a90 -->|defined in| 23393d08_86bb_d392_da82_d43eb3156269 style 80877ef4_9eee_9e40_c37f_f1161a5e4a90 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
integration-tests/tests/seeder/mysql.test.ts lines 45–192
const createNorthwindTables = async () => {
await db.execute(
sql`
CREATE TABLE \`customer\` (
\`id\` varchar(256) NOT NULL,
\`company_name\` text NOT NULL,
\`contact_name\` text NOT NULL,
\`contact_title\` text NOT NULL,
\`address\` text NOT NULL,
\`city\` text NOT NULL,
\`postal_code\` text,
\`region\` text,
\`country\` text NOT NULL,
\`phone\` text NOT NULL,
\`fax\` text,
CONSTRAINT \`customer_id\` PRIMARY KEY(\`id\`)
);
`,
);
await db.execute(
sql`
CREATE TABLE \`order_detail\` (
\`unit_price\` float NOT NULL,
\`quantity\` int NOT NULL,
\`discount\` float NOT NULL,
\`order_id\` int NOT NULL,
\`product_id\` int NOT NULL
);
`,
);
await db.execute(
sql`
CREATE TABLE \`employee\` (
\`id\` int NOT NULL,
\`last_name\` text NOT NULL,
\`first_name\` text,
\`title\` text NOT NULL,
\`title_of_courtesy\` text NOT NULL,
\`birth_date\` timestamp NOT NULL,
\`hire_date\` timestamp NOT NULL,
\`address\` text NOT NULL,
\`city\` text NOT NULL,
\`postal_code\` text NOT NULL,
\`country\` text NOT NULL,
\`home_phone\` text NOT NULL,
\`extension\` int NOT NULL,
\`notes\` text NOT NULL,
\`reports_to\` int,
\`photo_path\` text,
CONSTRAINT \`employee_id\` PRIMARY KEY(\`id\`)
);
`,
);
await db.execute(
sql`
CREATE TABLE \`order\` (
\`id\` int NOT NULL,
\`order_date\` timestamp NOT NULL,
\`required_date\` timestamp NOT NULL,
\`shipped_date\` timestamp,
\`ship_via\` int NOT NULL,
\`freight\` float NOT NULL,
\`ship_name\` text NOT NULL,
\`ship_city\` text NOT NULL,
\`ship_region\` text,
\`ship_postal_code\` text,
\`ship_country\` text NOT NULL,
\`customer_id\` varchar(256) NOT NULL,
\`employee_id\` int NOT NULL,
CONSTRAINT \`order_id\` PRIMARY KEY(\`id\`)
);
`,
);
await db.execute(
sql`
CREATE TABLE \`product\` (
\`id\` int NOT NULL,
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does createNorthwindTables() do?
createNorthwindTables() is a function in the drizzle-orm codebase, defined in integration-tests/tests/seeder/mysql.test.ts.
Where is createNorthwindTables() defined?
createNorthwindTables() is defined in integration-tests/tests/seeder/mysql.test.ts at line 45.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free