Home / File/ config.ts — astro Source File

config.ts — astro Source File

Architecture documentation for config.ts, a typescript file in the astro codebase. 1 imports, 0 dependents.

File typescript 1 imports

Entity Profile

Dependency Diagram

graph LR
  a614397f_b5f8_4616_7944_f0ed4c3bebfc["config.ts"]
  1d9959ed_62dc_f60c_c247_195225f24635["astro:db"]
  a614397f_b5f8_4616_7944_f0ed4c3bebfc --> 1d9959ed_62dc_f60c_c247_195225f24635
  style a614397f_b5f8_4616_7944_f0ed4c3bebfc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { column, defineDb, defineTable } from 'astro:db';

const Recipe = defineTable({
	columns: {
		id: column.number({ primaryKey: true }),
		title: column.text(),
		description: column.text(),
	},
});

const Ingredient = defineTable({
	columns: {
		id: column.number({ primaryKey: true }),
		name: column.text(),
		quantity: column.number(),
		recipeId: column.number(),
	},
	indexes: {
		recipeIdx: { on: 'recipeId' },
	},
	foreignKeys: [{ columns: 'recipeId', references: () => [Recipe.columns.id] }],
});

export default defineDb({
	tables: { Recipe, Ingredient },
});

Dependencies

  • astro:db

Frequently Asked Questions

What does config.ts do?
config.ts is a source file in the astro codebase, written in typescript.
What does config.ts depend on?
config.ts imports 1 module(s): astro:db.
Where is config.ts in the architecture?
config.ts is located at packages/db/test/fixtures/error-handling/db/config.ts (directory: packages/db/test/fixtures/error-handling/db).

Analyze Your Own Codebase

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

Try Supermodel Free