common.ts — drizzle-orm Source File
Architecture documentation for common.ts, a typescript file in the drizzle-orm codebase. 1 imports, 3 dependents.
Entity Profile
Dependency Diagram
graph LR 7d7becab_d924_12ff_40f1_e4660e45d17a["common.ts"] 8d35eaf2_a542_cfd4_fa1a_fafca0f02686["vitest"] 7d7becab_d924_12ff_40f1_e4660e45d17a --> 8d35eaf2_a542_cfd4_fa1a_fafca0f02686 e4016db2_352d_b236_2557_d9a74c6066c1["mysql.test.ts"] e4016db2_352d_b236_2557_d9a74c6066c1 --> 7d7becab_d924_12ff_40f1_e4660e45d17a 0408ab8f_6d6f_cdae_29f3_25c8efadbfae["pg.test.ts"] 0408ab8f_6d6f_cdae_29f3_25c8efadbfae --> 7d7becab_d924_12ff_40f1_e4660e45d17a 080335b9_a640_8a6d_81f7_fed0bb4ae5ca["singlestore.test.ts"] 080335b9_a640_8a6d_81f7_fed0bb4ae5ca --> 7d7becab_d924_12ff_40f1_e4660e45d17a style 7d7becab_d924_12ff_40f1_e4660e45d17a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { afterAll, beforeAll, beforeEach, test } from 'vitest';
export interface DialectSuite {
allTypes(context?: any): Promise<void>;
addBasicIndexes(context?: any): Promise<void>;
changeIndexFields(context?: any): Promise<void>;
dropIndex(context?: any): Promise<void>;
indexesToBeNotTriggered(context?: any): Promise<void>;
indexesTestCase1(context?: any): Promise<void>;
addNotNull(context?: any): Promise<void>;
addNotNullWithDataNoRollback(context?: any): Promise<void>;
addBasicSequences(context?: any): Promise<void>;
addGeneratedColumn(context?: any): Promise<void>;
addGeneratedToColumn(context?: any): Promise<void>;
dropGeneratedConstraint(context?: any): Promise<void>;
alterGeneratedConstraint(context?: any): Promise<void>;
createTableWithGeneratedConstraint(context?: any): Promise<void>;
createCompositePrimaryKey(context?: any): Promise<void>;
renameTableWithCompositePrimaryKey(context?: any): Promise<void>;
case1(): Promise<void>;
}
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
Functions
Types
Dependencies
- vitest
Imported By
Source
Frequently Asked Questions
What does common.ts do?
common.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain, RelationalQuery subdomain.
What functions are defined in common.ts?
common.ts defines 1 function(s): run.
What does common.ts depend on?
common.ts imports 1 module(s): vitest.
What files import common.ts?
common.ts is imported by 3 file(s): mysql.test.ts, pg.test.ts, singlestore.test.ts.
Where is common.ts in the architecture?
common.ts is located at drizzle-kit/tests/push/common.ts (domain: DrizzleORM, subdomain: RelationalQuery, directory: drizzle-kit/tests/push).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free