sqlite.test.ts — drizzle-orm Source File
Architecture documentation for sqlite.test.ts, a typescript file in the drizzle-orm codebase. 6 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 1589cfe5_6505_4a19_eafc_7d3f050e0d51["sqlite.test.ts"] ccd8f141_31dd_df9e_0535_43efaea4d6db["better-sqlite3"] 1589cfe5_6505_4a19_eafc_7d3f050e0d51 --> ccd8f141_31dd_df9e_0535_43efaea4d6db 0f00c7dd_5eba_f1f8_c559_a99431086500["chalk"] 1589cfe5_6505_4a19_eafc_7d3f050e0d51 --> 0f00c7dd_5eba_f1f8_c559_a99431086500 690f7dfc_0aea_9ee8_d6e7_26bbb3689031["drizzle-orm"] 1589cfe5_6505_4a19_eafc_7d3f050e0d51 --> 690f7dfc_0aea_9ee8_d6e7_26bbb3689031 25248a9d_ba06_2b33_4421_8575da2f9c34["sqlite-core"] 1589cfe5_6505_4a19_eafc_7d3f050e0d51 --> 25248a9d_ba06_2b33_4421_8575da2f9c34 2080849e_169d_739e_1ba9_1396fc229951["schemaDiffer"] 1589cfe5_6505_4a19_eafc_7d3f050e0d51 --> 2080849e_169d_739e_1ba9_1396fc229951 8d35eaf2_a542_cfd4_fa1a_fafca0f02686["vitest"] 1589cfe5_6505_4a19_eafc_7d3f050e0d51 --> 8d35eaf2_a542_cfd4_fa1a_fafca0f02686 style 1589cfe5_6505_4a19_eafc_7d3f050e0d51 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import Database from 'better-sqlite3';
import chalk from 'chalk';
import { sql } from 'drizzle-orm';
import {
blob,
check,
foreignKey,
getTableConfig,
int,
integer,
numeric,
primaryKey,
real,
sqliteTable,
sqliteView,
text,
uniqueIndex,
} from 'drizzle-orm/sqlite-core';
import { diffTestSchemasPushSqlite, introspectSQLiteToFile } from 'tests/schemaDiffer';
import { expect, test } from 'vitest';
test('nothing changed in schema', async (t) => {
const client = new Database(':memory:');
const users = sqliteTable('users', {
id: integer('id').primaryKey().notNull(),
name: text('name').notNull(),
email: text('email'),
textJson: text('text_json', { mode: 'json' }),
blobJon: blob('blob_json', { mode: 'json' }),
blobBigInt: blob('blob_bigint', { mode: 'bigint' }),
numeric: numeric('numeric'),
createdAt: integer('created_at', { mode: 'timestamp' }),
createdAtMs: integer('created_at_ms', { mode: 'timestamp_ms' }),
real: real('real'),
text: text('text', { length: 255 }),
role: text('role', { enum: ['admin', 'user'] }).default('user'),
isConfirmed: integer('is_confirmed', {
mode: 'boolean',
}),
});
const schema1 = {
users,
customers: sqliteTable('customers', {
id: integer('id').primaryKey(),
address: text('address').notNull(),
isConfirmed: integer('is_confirmed', { mode: 'boolean' }),
registrationDate: integer('registration_date', { mode: 'timestamp_ms' })
.notNull()
.$defaultFn(() => new Date()),
userId: integer('user_id')
.references(() => users.id)
.notNull(),
}),
posts: sqliteTable('posts', {
id: integer('id').primaryKey(),
content: text('content'),
// ... (1554 more lines)
Dependencies
- better-sqlite3
- chalk
- drizzle-orm
- schemaDiffer
- sqlite-core
- vitest
Source
Frequently Asked Questions
What does sqlite.test.ts do?
sqlite.test.ts is a source file in the drizzle-orm codebase, written in typescript.
What does sqlite.test.ts depend on?
sqlite.test.ts imports 6 module(s): better-sqlite3, chalk, drizzle-orm, schemaDiffer, sqlite-core, vitest.
Where is sqlite.test.ts in the architecture?
sqlite.test.ts is located at drizzle-kit/tests/push/sqlite.test.ts (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