Home / File/ mysqlSchema.ts — drizzle-orm Source File

mysqlSchema.ts — drizzle-orm Source File

Architecture documentation for mysqlSchema.ts, a typescript file in the drizzle-orm codebase. 1 imports, 1 dependents.

File typescript DrizzleORM 1 imports 1 dependents

Entity Profile

Dependency Diagram

graph LR
  344e7e95_8861_e873_85de_b45a690e1dc7["mysqlSchema.ts"]
  93ed9350_daa0_6c21_81a6_ed6b2a48bbdf["mysql-core"]
  344e7e95_8861_e873_85de_b45a690e1dc7 --> 93ed9350_daa0_6c21_81a6_ed6b2a48bbdf
  23393d08_86bb_d392_da82_d43eb3156269["mysql.test.ts"]
  23393d08_86bb_d392_da82_d43eb3156269 --> 344e7e95_8861_e873_85de_b45a690e1dc7
  style 344e7e95_8861_e873_85de_b45a690e1dc7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type { AnyMySqlColumn } from 'drizzle-orm/mysql-core';
import {
	bigint,
	binary,
	boolean,
	char,
	date,
	datetime,
	decimal,
	double,
	float,
	int,
	json,
	mediumint,
	mysqlEnum,
	mysqlTable,
	real,
	serial,
	smallint,
	text,
	time,
	timestamp,
	tinyint,
	varbinary,
	varchar,
	year,
} from 'drizzle-orm/mysql-core';

export const customers = mysqlTable('customer', {
	id: varchar('id', { length: 256 }).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 = mysqlTable(
	'employee',
	{
		id: int('id').primaryKey(),
		lastName: text('last_name').notNull(),
		firstName: text('first_name'),
		title: text('title').notNull(),
		titleOfCourtesy: text('title_of_courtesy').notNull(),
		birthDate: timestamp('birth_date').notNull(),
		hireDate: timestamp('hire_date').notNull(),
		address: text('address').notNull(),
		city: text('city').notNull(),
		postalCode: text('postal_code').notNull(),
		country: text('country').notNull(),
		homePhone: text('home_phone').notNull(),
		extension: int('extension').notNull(),
		notes: text('notes').notNull(),
		reportsTo: int('reports_to').references((): AnyMySqlColumn => employees.id),
// ... (108 more lines)

Domain

Dependencies

  • mysql-core

Frequently Asked Questions

What does mysqlSchema.ts do?
mysqlSchema.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain.
What does mysqlSchema.ts depend on?
mysqlSchema.ts imports 1 module(s): mysql-core.
What files import mysqlSchema.ts?
mysqlSchema.ts is imported by 1 file(s): mysql.test.ts.
Where is mysqlSchema.ts in the architecture?
mysqlSchema.ts is located at integration-tests/tests/seeder/mysqlSchema.ts (domain: DrizzleORM, directory: integration-tests/tests/seeder).

Analyze Your Own Codebase

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

Try Supermodel Free