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

words.ts — drizzle-orm Source File

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

File typescript DrizzleKit Introspection 1 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  2c14ac3f_5429_5694_b208_fdafbc3b775b["words.ts"]
  9135e6b6_37f7_c980_ee35_90f5531de5a4["common.ts"]
  2c14ac3f_5429_5694_b208_fdafbc3b775b --> 9135e6b6_37f7_c980_ee35_90f5531de5a4
  b14d3855_8cce_38c9_8952_a9d014c2fb1b["migrate.ts"]
  b14d3855_8cce_38c9_8952_a9d014c2fb1b --> 2c14ac3f_5429_5694_b208_fdafbc3b775b
  style 2c14ac3f_5429_5694_b208_fdafbc3b775b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type { Prefix } from '../cli/validations/common';

export const prepareMigrationMetadata = (
	idx: number,
	prefixMode: Prefix,
	name?: string,
) => {
	const prefix = prefixMode === 'index'
		? idx.toFixed(0).padStart(4, '0')
		: prefixMode === 'timestamp' || prefixMode === 'supabase'
		? new Date()
			.toISOString()
			.replace('T', '')
			.replaceAll('-', '')
			.replaceAll(':', '')
			.slice(0, 14)
		: prefixMode === 'unix'
		? Math.floor(Date.now() / 1000)
		: '';

	const suffix = name || `${adjectives.random()}_${heroes.random()}`;
	const tag = `${prefix}_${suffix}`;
	return { prefix, suffix, tag };
};

export const adjectives = [
	'abandoned',
	'aberrant',
	'abnormal',
	'absent',
	'absurd',
	'acoustic',
	'adorable',
	'amazing',
	'ambiguous',
	'ambitious',
	'amused',
	'amusing',
	'ancient',
	'aromatic',
	'aspiring',
	'awesome',
	'bent',
	'big',
	'bitter',
	'bizarre',
	'black',
	'blue',
	'blushing',
	'bored',
	'boring',
	'bouncy',
	'brainy',
	'brave',
	'breezy',
	'brief',
	'bright',
	'broad',
	'broken',
	'brown',
// ... (1274 more lines)

Domain

Subdomains

Dependencies

Frequently Asked Questions

What does words.ts do?
words.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleKit domain, Introspection subdomain.
What functions are defined in words.ts?
words.ts defines 1 function(s): prepareMigrationMetadata.
What does words.ts depend on?
words.ts imports 1 module(s): common.ts.
What files import words.ts?
words.ts is imported by 1 file(s): migrate.ts.
Where is words.ts in the architecture?
words.ts is located at drizzle-kit/src/utils/words.ts (domain: DrizzleKit, subdomain: Introspection, directory: drizzle-kit/src/utils).

Analyze Your Own Codebase

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

Try Supermodel Free