Home / Function/ run() — drizzle-orm Function Reference

run() — drizzle-orm Function Reference

Architecture documentation for the run() function in common.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  82eeb816_3ab3_4268_5f31_89297d2c8b45["run()"]
  7d7becab_d924_12ff_40f1_e4660e45d17a["common.ts"]
  82eeb816_3ab3_4268_5f31_89297d2c8b45 -->|defined in| 7d7becab_d924_12ff_40f1_e4660e45d17a
  style 82eeb816_3ab3_4268_5f31_89297d2c8b45 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-kit/tests/push/common.ts lines 23–58

export const run = (
	suite: DialectSuite,
	beforeAllFn?: (context: any) => Promise<void>,
	afterAllFn?: (context: any) => Promise<void>,
	beforeEachFn?: (context: any) => Promise<void>,
) => {
	let context: any = {};
	beforeAll(beforeAllFn ? () => beforeAllFn(context) : () => {});

	beforeEach(beforeEachFn ? () => beforeEachFn(context) : () => {});

	test('No diffs for all database types', () => suite.allTypes(context));
	test('Adding basic indexes', () => suite.addBasicIndexes(context));
	test('Dropping basic index', () => suite.dropIndex(context));
	test('Altering indexes', () => suite.changeIndexFields(context));
	test('Indexes properties that should not trigger push changes', () => suite.indexesToBeNotTriggered(context));
	test('Indexes test case #1', () => suite.indexesTestCase1(context));
	test('Drop column', () => suite.case1());

	test('Add not null to a column', () => suite.addNotNull());
	test('Add not null to a column with null data. Should rollback', () => suite.addNotNullWithDataNoRollback());

	test('Add basic sequences', () => suite.addBasicSequences());

	test('Add generated column', () => suite.addGeneratedColumn(context));
	test('Add generated constraint to an existing column', () => suite.addGeneratedToColumn(context));
	test('Drop generated constraint from a column', () => suite.dropGeneratedConstraint(context));
	// should ignore on push
	test('Alter generated constraint', () => suite.alterGeneratedConstraint(context));
	test('Create table with generated column', () => suite.createTableWithGeneratedConstraint(context));
	test('Rename table with composite primary key', () => suite.renameTableWithCompositePrimaryKey(context));

	test('Create composite primary key', () => suite.createCompositePrimaryKey(context));

	afterAll(afterAllFn ? () => afterAllFn(context) : () => {});
};

Domain

Subdomains

Frequently Asked Questions

What does run() do?
run() is a function in the drizzle-orm codebase, defined in drizzle-kit/tests/push/common.ts.
Where is run() defined?
run() is defined in drizzle-kit/tests/push/common.ts at line 23.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free