pgTest.ts — drizzle-orm Source File
Architecture documentation for pgTest.ts, a typescript file in the drizzle-orm codebase. 8 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 14367cdd_f407_2537_46e8_5358f6eedc9d["pgTest.ts"] 0fabdd81_61c9_bb7c_7ddf_dde7a6071abc["index.ts"] 14367cdd_f407_2537_46e8_5358f6eedc9d --> 0fabdd81_61c9_bb7c_7ddf_dde7a6071abc ee61d65c_3a91_eebf_195c_778a484baf2b["seed"] 14367cdd_f407_2537_46e8_5358f6eedc9d --> ee61d65c_3a91_eebf_195c_778a484baf2b 409815ce_f25c_e74f_cb87_6d7e622ce2e3["pgSchema.ts"] 14367cdd_f407_2537_46e8_5358f6eedc9d --> 409815ce_f25c_e74f_cb87_6d7e622ce2e3 c440e00a_e318_94ac_100c_9843a182c7a4["config"] 14367cdd_f407_2537_46e8_5358f6eedc9d --> c440e00a_e318_94ac_100c_9843a182c7a4 412eac48_6e13_8b0f_b7b2_5c943c225130["path"] 14367cdd_f407_2537_46e8_5358f6eedc9d --> 412eac48_6e13_8b0f_b7b2_5c943c225130 a59b228c_43d4_1772_d3df_66adbf678284["node-postgres"] 14367cdd_f407_2537_46e8_5358f6eedc9d --> a59b228c_43d4_1772_d3df_66adbf678284 5a4cd68c_6036_b967_0441_ccaa281af1be["migrator"] 14367cdd_f407_2537_46e8_5358f6eedc9d --> 5a4cd68c_6036_b967_0441_ccaa281af1be 0d277acf_0d68_9daf_8724_642232a89719["pg"] 14367cdd_f407_2537_46e8_5358f6eedc9d --> 0d277acf_0d68_9daf_8724_642232a89719 style 14367cdd_f407_2537_46e8_5358f6eedc9d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import 'dotenv/config';
import path from 'path';
import { drizzle } from 'drizzle-orm/node-postgres';
import { migrate } from 'drizzle-orm/node-postgres/migrator';
import { Pool as PgPool } from 'pg';
import { seed } from '../../src/index.ts';
import * as schema from './pgSchema.ts';
const { PG_HOST, PG_PORT, PG_DATABASE, PG_USER, PG_PASSWORD } = process.env;
const pgPool = new PgPool({
host: PG_HOST,
port: Number(PG_PORT) || 5432,
database: PG_DATABASE,
user: PG_USER,
password: PG_PASSWORD,
// ssl: true
});
const db = drizzle(pgPool);
console.log('database connection was established successfully.');
(async () => {
await migrate(db, { migrationsFolder: path.join(__dirname, '../../../pgMigrations') });
console.log('database was migrated.');
// await seed(db, schema, { count: 100000, seed: 1 });
const titlesOfCourtesy = ['Ms.', 'Mrs.', 'Dr.'];
const unitsOnOrders = [0, 10, 20, 30, 50, 60, 70, 80, 100];
const reorderLevels = [0, 5, 10, 15, 20, 25, 30];
const quantityPerUnit = [
'100 - 100 g pieces',
'100 - 250 g bags',
'10 - 200 g glasses',
'10 - 4 oz boxes',
'10 - 500 g pkgs.',
'10 - 500 g pkgs.',
'10 boxes x 12 pieces',
'10 boxes x 20 bags',
'10 boxes x 8 pieces',
'10 kg pkg.',
'10 pkgs.',
'12 - 100 g bars',
'12 - 100 g pkgs',
'12 - 12 oz cans',
'12 - 1 lb pkgs.',
'12 - 200 ml jars',
'12 - 250 g pkgs.',
'12 - 355 ml cans',
'12 - 500 g pkgs.',
'750 cc per bottle',
'5 kg pkg.',
'50 bags x 30 sausgs.',
'500 ml',
'500 g',
'48 pieces',
// ... (116 more lines)
Domain
Dependencies
- config
- index.ts
- migrator
- node-postgres
- path
- pg
- pgSchema.ts
- seed
Source
Frequently Asked Questions
What does pgTest.ts do?
pgTest.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleSeed domain.
What does pgTest.ts depend on?
pgTest.ts imports 8 module(s): config, index.ts, migrator, node-postgres, path, pg, pgSchema.ts, seed.
Where is pgTest.ts in the architecture?
pgTest.ts is located at drizzle-seed/tests/northwind/pgTest.ts (domain: DrizzleSeed, directory: drizzle-seed/tests/northwind).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free