Skip to content

egon-orm-workspace / @egon-orm/cli / EgonConfig

Interface: EgonConfig ​

Defined in: cli/src/config.ts:48

What egon.config.ts exports (as its default export, or as config).

Example ​

ts
import { defineConfig } from "@egon-orm/cli";
import { postgres } from "@egon-orm/postgres";

export default defineConfig({
  adapter: postgres({ connectionString: process.env.DATABASE_URL }),
  migrations: { directory: "migrations" },
  database: {
    name: "blog_dev",
    admin: postgres({ connectionString: process.env.ADMIN_DATABASE_URL }),
  },
});

Properties ​

adapter ​

ts
readonly adapter: Adapter;

Defined in: cli/src/config.ts:50

The database the migrations run against. The CLI closes it when the command ends.


database? ​

ts
readonly database?: object;

Defined in: cli/src/config.ts:57

For egon db create | drop | reset: the database's name, and an adapter connected to another database of the same server (on Postgres, usually postgres) to run CREATE DATABASE and DROP DATABASE through. The CLI closes it too.

admin ​

ts
readonly admin: Adapter;

name ​

ts
readonly name: string;

migrations? ​

ts
readonly migrations?: MigrationsConfig;

Defined in: cli/src/config.ts:51