sqliteSchema.ts — drizzle-orm Source File
Architecture documentation for sqliteSchema.ts, a typescript file in the drizzle-orm codebase. 4 imports, 16 dependents.
Entity Profile
Dependency Diagram
graph LR 03c276d3_0efe_66e2_9ba9_e67edbf29418["sqliteSchema.ts"] 8f03c4cf_4fdf_b056_3b24_d493cab0cc81["global.ts"] 03c276d3_0efe_66e2_9ba9_e67edbf29418 --> 8f03c4cf_4fdf_b056_3b24_d493cab0cc81 ab316ba2_8579_926e_3273_a362d69ba305["customMapEntries"] 03c276d3_0efe_66e2_9ba9_e67edbf29418 --> ab316ba2_8579_926e_3273_a362d69ba305 920ff56d_9b78_d6a4_9c81_c1e6a3d1d992["mapValues"] 03c276d3_0efe_66e2_9ba9_e67edbf29418 --> 920ff56d_9b78_d6a4_9c81_c1e6a3d1d992 9d8cc145_835b_8147_2ea5_b7b5383ae775["zod"] 03c276d3_0efe_66e2_9ba9_e67edbf29418 --> 9d8cc145_835b_8147_2ea5_b7b5383ae775 e668bfef_9125_1ef0_2f94_a0f9605584bd["api.ts"] e668bfef_9125_1ef0_2f94_a0f9605584bd --> 03c276d3_0efe_66e2_9ba9_e67edbf29418 c2c22050_0d5c_404e_2b18_5934c728a89c["introspect.ts"] c2c22050_0d5c_404e_2b18_5934c728a89c --> 03c276d3_0efe_66e2_9ba9_e67edbf29418 0232777b_2a7f_2d05_d5d8_ae34939c6599["libSqlPushUtils.ts"] 0232777b_2a7f_2d05_d5d8_ae34939c6599 --> 03c276d3_0efe_66e2_9ba9_e67edbf29418 b14d3855_8cce_38c9_8952_a9d014c2fb1b["migrate.ts"] b14d3855_8cce_38c9_8952_a9d014c2fb1b --> 03c276d3_0efe_66e2_9ba9_e67edbf29418 cea479b5_7704_0339_de4e_3cc844834ec0["sqliteIntrospect.ts"] cea479b5_7704_0339_de4e_3cc844834ec0 --> 03c276d3_0efe_66e2_9ba9_e67edbf29418 934183d7_9412_6b03_702c_de0c2903ced3["sqlitePushUtils.ts"] 934183d7_9412_6b03_702c_de0c2903ced3 --> 03c276d3_0efe_66e2_9ba9_e67edbf29418 c1c349dd_2e31_d056_728c_c034cebb41c0["introspect-sqlite.ts"] c1c349dd_2e31_d056_728c_c034cebb41c0 --> 03c276d3_0efe_66e2_9ba9_e67edbf29418 6139f734_8ada_c641_9fec_9a55cfdf376f["jsonStatements.ts"] 6139f734_8ada_c641_9fec_9a55cfdf376f --> 03c276d3_0efe_66e2_9ba9_e67edbf29418 4078709f_3fc0_5514_7728_8f28a7b0e807["migrationPreparator.ts"] 4078709f_3fc0_5514_7728_8f28a7b0e807 --> 03c276d3_0efe_66e2_9ba9_e67edbf29418 5e835bc2_6860_21e3_492c_babcc3e93529["schemaValidator.ts"] 5e835bc2_6860_21e3_492c_babcc3e93529 --> 03c276d3_0efe_66e2_9ba9_e67edbf29418 style 03c276d3_0efe_66e2_9ba9_e67edbf29418 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { any, boolean, enum as enumType, literal, object, record, string, TypeOf, union } from 'zod';
import { customMapEntries, mapValues, originUUID } from '../global';
// ------- V3 --------
const index = object({
name: string(),
columns: string().array(),
where: string().optional(),
isUnique: boolean(),
}).strict();
const fk = object({
name: string(),
tableFrom: string(),
columnsFrom: string().array(),
tableTo: string(),
columnsTo: string().array(),
onUpdate: string().optional(),
onDelete: string().optional(),
}).strict();
const compositePK = object({
columns: string().array(),
name: string().optional(),
}).strict();
const column = object({
name: string(),
type: string(),
primaryKey: boolean(),
notNull: boolean(),
autoincrement: boolean().optional(),
default: any().optional(),
generated: object({
type: enumType(['stored', 'virtual']),
as: string(),
}).optional(),
}).strict();
const tableV3 = object({
name: string(),
columns: record(string(), column),
indexes: record(string(), index),
foreignKeys: record(string(), fk),
}).strict();
const uniqueConstraint = object({
name: string(),
columns: string().array(),
}).strict();
const checkConstraint = object({
name: string(),
value: string(),
}).strict();
const table = object({
name: string(),
columns: record(string(), column),
indexes: record(string(), index),
// ... (293 more lines)
Domain
Subdomains
Functions
- SQLiteSquasher.squashCheck()
- SQLiteSquasher.squashFK()
- SQLiteSquasher.squashIdx()
- SQLiteSquasher.squashPK()
- SQLiteSquasher.squashPushFK()
- SQLiteSquasher.squashUnique()
- SQLiteSquasher.unsquashCheck()
- SQLiteSquasher.unsquashFK()
- SQLiteSquasher.unsquashIdx()
- SQLiteSquasher.unsquashPK()
- SQLiteSquasher.unsquashPushFK()
- SQLiteSquasher.unsquashUnique()
- squashSqliteScheme()
Types
Dependencies
Imported By
- drizzle-kit/src/api.ts
- drizzle-kit/src/serializer/index.ts
- drizzle-kit/src/introspect-sqlite.ts
- drizzle-kit/src/cli/commands/introspect.ts
- drizzle-kit/src/jsonStatements.ts
- drizzle-kit/src/cli/commands/libSqlPushUtils.ts
- drizzle-kit/src/cli/commands/migrate.ts
- drizzle-kit/src/migrationPreparator.ts
- drizzle-kit/src/schemaValidator.ts
- drizzle-kit/src/snapshotsDiffer.ts
- drizzle-kit/src/sqlgenerator.ts
- drizzle-kit/src/cli/commands/sqliteIntrospect.ts
- drizzle-kit/src/cli/commands/sqlitePushUtils.ts
- drizzle-kit/src/serializer/sqliteSerializer.ts
- drizzle-kit/src/statementCombiner.ts
- drizzle-kit/src/utils.ts
Source
Frequently Asked Questions
What does sqliteSchema.ts do?
sqliteSchema.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleKit domain, SnapshotSerializer subdomain.
What functions are defined in sqliteSchema.ts?
sqliteSchema.ts defines 13 function(s): SQLiteSquasher.squashCheck, SQLiteSquasher.squashFK, SQLiteSquasher.squashIdx, SQLiteSquasher.squashPK, SQLiteSquasher.squashPushFK, SQLiteSquasher.squashUnique, SQLiteSquasher.unsquashCheck, SQLiteSquasher.unsquashFK, SQLiteSquasher.unsquashIdx, SQLiteSquasher.unsquashPK, and 3 more.
What does sqliteSchema.ts depend on?
sqliteSchema.ts imports 4 module(s): customMapEntries, global.ts, mapValues, zod.
What files import sqliteSchema.ts?
sqliteSchema.ts is imported by 16 file(s): api.ts, index.ts, introspect-sqlite.ts, introspect.ts, jsonStatements.ts, libSqlPushUtils.ts, migrate.ts, migrationPreparator.ts, and 8 more.
Where is sqliteSchema.ts in the architecture?
sqliteSchema.ts is located at drizzle-kit/src/serializer/sqliteSchema.ts (domain: DrizzleKit, subdomain: SnapshotSerializer, directory: drizzle-kit/src/serializer).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free