sqliteSchema.ts — drizzle-orm Source File
Architecture documentation for sqliteSchema.ts, a typescript file in the drizzle-orm codebase. 2 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 969861cc_29cd_39ee_e40a_c222dd6e0184["sqliteSchema.ts"] 690f7dfc_0aea_9ee8_d6e7_26bbb3689031["drizzle-orm"] 969861cc_29cd_39ee_e40a_c222dd6e0184 --> 690f7dfc_0aea_9ee8_d6e7_26bbb3689031 25248a9d_ba06_2b33_4421_8575da2f9c34["sqlite-core"] 969861cc_29cd_39ee_e40a_c222dd6e0184 --> 25248a9d_ba06_2b33_4421_8575da2f9c34 d4278696_c6a9_ec48_7917_918e11eb7c40["softRelations.test.ts"] d4278696_c6a9_ec48_7917_918e11eb7c40 --> 969861cc_29cd_39ee_e40a_c222dd6e0184 style 969861cc_29cd_39ee_e40a_c222dd6e0184 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { relations } from 'drizzle-orm';
import { integer, numeric, sqliteTable, text } from 'drizzle-orm/sqlite-core';
export const customers = sqliteTable('customer', {
id: text('id').primaryKey(),
companyName: text('company_name').notNull(),
contactName: text('contact_name').notNull(),
contactTitle: text('contact_title').notNull(),
address: text('address').notNull(),
city: text('city').notNull(),
postalCode: text('postal_code'),
region: text('region'),
country: text('country').notNull(),
phone: text('phone').notNull(),
fax: text('fax'),
});
export const employees = sqliteTable(
'employee',
{
id: integer('id').primaryKey(),
lastName: text('last_name').notNull(),
firstName: text('first_name'),
title: text('title').notNull(),
titleOfCourtesy: text('title_of_courtesy').notNull(),
birthDate: integer('birth_date', { mode: 'timestamp' }).notNull(),
hireDate: integer('hire_date', { mode: 'timestamp' }).notNull(),
address: text('address').notNull(),
city: text('city').notNull(),
postalCode: text('postal_code').notNull(),
country: text('country').notNull(),
homePhone: text('home_phone').notNull(),
extension: integer('extension').notNull(),
notes: text('notes').notNull(),
reportsTo: integer('reports_to'),
photoPath: text('photo_path'),
},
);
export const employeesRelations = relations(employees, ({ one }) => ({
employee: one(employees, {
fields: [employees.reportsTo],
references: [employees.id],
}),
}));
export const orders = sqliteTable('order', {
id: integer('id').primaryKey(),
orderDate: integer('order_date', { mode: 'timestamp' }).notNull(),
requiredDate: integer('required_date', { mode: 'timestamp' }).notNull(),
shippedDate: integer('shipped_date', { mode: 'timestamp' }),
shipVia: integer('ship_via').notNull(),
freight: numeric('freight').notNull(),
shipName: text('ship_name').notNull(),
shipCity: text('ship_city').notNull(),
shipRegion: text('ship_region'),
shipPostalCode: text('ship_postal_code'),
shipCountry: text('ship_country').notNull(),
customerId: text('customer_id').notNull(),
// ... (69 more lines)
Domain
Subdomains
Dependencies
- drizzle-orm
- sqlite-core
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 DrizzleORM domain, SQLDialects subdomain.
What functions are defined in sqliteSchema.ts?
sqliteSchema.ts defines 4 function(s): detailsRelations, employeesRelations, ordersRelations, productsRelations.
What does sqliteSchema.ts depend on?
sqliteSchema.ts imports 2 module(s): drizzle-orm, sqlite-core.
What files import sqliteSchema.ts?
sqliteSchema.ts is imported by 1 file(s): softRelations.test.ts.
Where is sqliteSchema.ts in the architecture?
sqliteSchema.ts is located at drizzle-seed/tests/sqlite/softRelationsTest/sqliteSchema.ts (domain: DrizzleORM, subdomain: SQLDialects, directory: drizzle-seed/tests/sqlite/softRelationsTest).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free