UNPKG

829 BTypeScriptView Raw
1import { AnyObject, Options } from './common-types';
2import { Connector } from './connectors';
3/**
4 * DataSource denotes a configured connector
5 */
6export interface DataSource {
7 name: string;
8 connector?: Connector;
9 settings: AnyObject;
10 [property: string]: any;
11}
12export interface SchemaMigrationOptions extends Options {
13 /**
14 * When set to 'drop', schema migration will drop existing tables and recreate
15 * them from scratch, removing any existing data along the way.
16 *
17 * When set to 'alter', schema migration will try to preserve current schema
18 * and data, and perform a non-destructive incremental update.
19 */
20 existingSchema?: 'drop' | 'alter';
21 /**
22 * List of model names to migrate.
23 *
24 * By default, all models are migrated.
25 */
26 models?: string[];
27}