CoolFace
Apppublic

AK-21/Graphite-Industrial-Intelligence

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
index.d.ts320 linesDownload Raw Back to drizzle-kit
1import { ConnectionOptions } from 'tls';2 3declare const prefixes: readonly ["index", "timestamp", "supabase", "unix", "none"];4type Prefix = (typeof prefixes)[number];5declare const drivers: readonly ["d1-http", "expo", "aws-data-api", "pglite", "durable-sqlite"];6type Driver = (typeof drivers)[number];7 8declare const dialects: readonly ["postgresql", "mysql", "sqlite", "turso", "singlestore", "gel"];9type Dialect = (typeof dialects)[number];10 11type SslOptions = {12    pfx?: string;13    key?: string;14    passphrase?: string;15    cert?: string;16    ca?: string | string[];17    crl?: string | string[];18    ciphers?: string;19    rejectUnauthorized?: boolean;20};21type Verify<T, U extends T> = U;22/**23 * **You are currently using version 0.21.0+ of drizzle-kit. If you have just upgraded to this version, please make sure to read the changelog to understand what changes have been made and what24 * adjustments may be necessary for you. See https://orm.drizzle.team/kit-docs/upgrade-21#how-to-migrate-to-0210**25 *26 * **Config** usage:27 *28 * `dialect` - mandatory and is responsible for explicitly providing a databse dialect you are using for all the commands29 * *Possible values*: `postgresql`, `mysql`, `sqlite`, `singlestore30 *31 * See https://orm.drizzle.team/kit-docs/config-reference#dialect32 *33 * ---34 * `schema` - param lets you define where your schema file/files live.35 * You can have as many separate schema files as you want and define paths to them using glob or array of globs syntax.36 *37 * See https://orm.drizzle.team/kit-docs/config-reference#schema38 *39 * ---40 * `out` - allows you to define the folder for your migrations and a folder, where drizzle will introspect the schema and relations41 *42 * See https://orm.drizzle.team/kit-docs/config-reference#out43 *44 * ---45 * `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database46 * *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`47 * If you don't use AWS Data API, D1, Turso or Expo - ypu don't need this driver. You can check a driver strategy choice here: https://orm.drizzle.team/kit-docs/upgrade-2148 *49 * See https://orm.drizzle.team/kit-docs/config-reference#driver50 *51 * ---52 *53 * `dbCredentials` - an object to define your connection to the database. For more info please check the docs54 *55 * See https://orm.drizzle.team/kit-docs/config-reference#dbcredentials56 *57 * ---58 *59 * `migrations` - param let’s use specify custom table and schema(PostgreSQL only) for migrations.60 * By default, all information about executed migrations will be stored in the database inside61 * the `__drizzle_migrations` table, and for PostgreSQL, inside the drizzle schema.62 * However, you can configure where to store those records.63 *64 * See https://orm.drizzle.team/kit-docs/config-reference#migrations65 *66 * ---67 *68 * `breakpoints` - param lets you enable/disable SQL statement breakpoints in generated migrations.69 * It’s optional and true by default, it’s necessary to properly apply migrations on databases,70 * that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite, SingleStore) and71 * Drizzle ORM has to apply them sequentially one by one.72 *73 * See https://orm.drizzle.team/kit-docs/config-reference#breakpoints74 *75 * ---76 *77 * `tablesFilters` - param lets you filter tables with glob syntax for db push command.78 * It’s useful when you have only one database avaialable for several separate projects with separate sql schemas.79 *80 * How to define multi-project tables with Drizzle ORM — see https://orm.drizzle.team/docs/goodies#multi-project-schema81 *82 * See https://orm.drizzle.team/kit-docs/config-reference#tablesfilters83 *84 * ---85 *86 * `schemaFilter` - parameter allows you to define which schema in PostgreSQL should be used for either introspect or push commands.87 * This parameter accepts a single schema as a string or an array of schemas as strings.88 * No glob pattern is supported here. By default, drizzle will use the public schema for both commands,89 * but you can add any schema you need.90 *91 * For example, having schemaFilter: ["my_schema"] will only look for tables in both the database and92 * drizzle schema that are a part of the my_schema schema.93 *94 * See https://orm.drizzle.team/kit-docs/config-reference#schemafilter95 *96 * ---97 *98 * `verbose` - command is used for drizzle-kit push commands and prints all statements that will be executed.99 *100 * > Note: This command will only print the statements that should be executed.101 * To approve them before applying, please refer to the `strict` command.102 *103 * See https://orm.drizzle.team/kit-docs/config-reference#verbose104 *105 * ---106 *107 * `strict` - command is used for drizzle-kit push commands and will always ask for your confirmation,108 * either to execute all statements needed to sync your schema with the database or not.109 *110 * See https://orm.drizzle.team/kit-docs/config-reference#strict111 */112type Config = {113    dialect: Dialect;114    out?: string;115    breakpoints?: boolean;116    tablesFilter?: string | string[];117    extensionsFilters?: 'postgis'[];118    schemaFilter?: string | string[];119    schema?: string | string[];120    verbose?: boolean;121    strict?: boolean;122    casing?: 'camelCase' | 'snake_case';123    migrations?: {124        table?: string;125        schema?: string;126        prefix?: Prefix;127    };128    introspect?: {129        casing: 'camel' | 'preserve';130    };131    entities?: {132        roles?: boolean | {133            provider?: 'supabase' | 'neon' | string & {};134            exclude?: string[];135            include?: string[];136        };137    };138} & ({139    dialect: Verify<Dialect, 'turso'>;140    dbCredentials: {141        url: string;142        authToken?: string;143    };144} | {145    dialect: Verify<Dialect, 'sqlite'>;146    dbCredentials: {147        url: string;148    };149} | {150    dialect: Verify<Dialect, 'postgresql'>;151    dbCredentials: ({152        host: string;153        port?: number;154        user?: string;155        password?: string;156        database: string;157        ssl?: boolean | 'require' | 'allow' | 'prefer' | 'verify-full' | ConnectionOptions;158    } & {}) | {159        url: string;160    };161} | {162    dialect: Verify<Dialect, 'postgresql'>;163    driver: Verify<Driver, 'aws-data-api'>;164    dbCredentials: {165        database: string;166        secretArn: string;167        resourceArn: string;168    };169} | {170    dialect: Verify<Dialect, 'postgresql'>;171    driver: Verify<Driver, 'pglite'>;172    dbCredentials: {173        url: string;174    };175} | {176    dialect: Verify<Dialect, 'mysql'>;177    dbCredentials: {178        host: string;179        port?: number;180        user?: string;181        password?: string;182        database: string;183        ssl?: string | SslOptions;184    } | {185        url: string;186    };187} | {188    dialect: Verify<Dialect, 'sqlite'>;189    driver: Verify<Driver, 'd1-http'>;190    dbCredentials: {191        accountId: string;192        databaseId: string;193        token: string;194    };195} | {196    dialect: Verify<Dialect, 'sqlite'>;197    driver: Verify<Driver, 'expo'>;198} | {199    dialect: Verify<Dialect, 'sqlite'>;200    driver: Verify<Driver, 'durable-sqlite'>;201} | {} | {202    dialect: Verify<Dialect, 'singlestore'>;203    dbCredentials: {204        host: string;205        port?: number;206        user?: string;207        password?: string;208        database: string;209        ssl?: string | SslOptions;210    } | {211        url: string;212    };213} | {214    dialect: Verify<Dialect, 'gel'>;215    dbCredentials?: {216        tlsSecurity?: 'insecure' | 'no_host_verification' | 'strict' | 'default';217    } & ({218        url: string;219    } | ({220        host: string;221        port?: number;222        user?: string;223        password?: string;224        database: string;225    }));226});227/**228 * **You are currently using version 0.21.0+ of drizzle-kit. If you have just upgraded to this version, please make sure to read the changelog to understand what changes have been made and what229 * adjustments may be necessary for you. See https://orm.drizzle.team/kit-docs/upgrade-21#how-to-migrate-to-0210**230 *231 * **Config** usage:232 *233 * `dialect` - mandatory and is responsible for explicitly providing a databse dialect you are using for all the commands234 * *Possible values*: `postgresql`, `mysql`, `sqlite`, `singlestore`, `gel`235 *236 * See https://orm.drizzle.team/kit-docs/config-reference#dialect237 *238 * ---239 * `schema` - param lets you define where your schema file/files live.240 * You can have as many separate schema files as you want and define paths to them using glob or array of globs syntax.241 *242 * See https://orm.drizzle.team/kit-docs/config-reference#schema243 *244 * ---245 * `out` - allows you to define the folder for your migrations and a folder, where drizzle will introspect the schema and relations246 *247 * See https://orm.drizzle.team/kit-docs/config-reference#out248 *249 * ---250 * `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database251 * *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`252 * If you don't use AWS Data API, D1, Turso or Expo - ypu don't need this driver. You can check a driver strategy choice here: https://orm.drizzle.team/kit-docs/upgrade-21253 *254 * See https://orm.drizzle.team/kit-docs/config-reference#driver255 *256 * ---257 *258 * `dbCredentials` - an object to define your connection to the database. For more info please check the docs259 *260 * See https://orm.drizzle.team/kit-docs/config-reference#dbcredentials261 *262 * ---263 *264 * `migrations` - param let’s use specify custom table and schema(PostgreSQL only) for migrations.265 * By default, all information about executed migrations will be stored in the database inside266 * the `__drizzle_migrations` table, and for PostgreSQL, inside the drizzle schema.267 * However, you can configure where to store those records.268 *269 * See https://orm.drizzle.team/kit-docs/config-reference#migrations270 *271 * ---272 *273 * `breakpoints` - param lets you enable/disable SQL statement breakpoints in generated migrations.274 * It’s optional and true by default, it’s necessary to properly apply migrations on databases,275 * that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite, SingleStore) and276 * Drizzle ORM has to apply them sequentially one by one.277 *278 * See https://orm.drizzle.team/kit-docs/config-reference#breakpoints279 *280 * ---281 *282 * `tablesFilters` - param lets you filter tables with glob syntax for db push command.283 * It’s useful when you have only one database avaialable for several separate projects with separate sql schemas.284 *285 * How to define multi-project tables with Drizzle ORM — see https://orm.drizzle.team/docs/goodies#multi-project-schema286 *287 * See https://orm.drizzle.team/kit-docs/config-reference#tablesfilters288 *289 * ---290 *291 * `schemaFilter` - parameter allows you to define which schema in PostgreSQL should be used for either introspect or push commands.292 * This parameter accepts a single schema as a string or an array of schemas as strings.293 * No glob pattern is supported here. By default, drizzle will use the public schema for both commands,294 * but you can add any schema you need.295 *296 * For example, having schemaFilter: ["my_schema"] will only look for tables in both the database and297 * drizzle schema that are a part of the my_schema schema.298 *299 * See https://orm.drizzle.team/kit-docs/config-reference#schemafilter300 *301 * ---302 *303 * `verbose` - command is used for drizzle-kit push commands and prints all statements that will be executed.304 *305 * > Note: This command will only print the statements that should be executed.306 * To approve them before applying, please refer to the `strict` command.307 *308 * See https://orm.drizzle.team/kit-docs/config-reference#verbose309 *310 * ---311 *312 * `strict` - command is used for drizzle-kit push commands and will always ask for your confirmation,313 * either to execute all statements needed to sync your schema with the database or not.314 *315 * See https://orm.drizzle.team/kit-docs/config-reference#strict316 */317declare function defineConfig(config: Config): Config;318 319export { type Config, defineConfig };320