@immich/sql-tools 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.ts +10 -1
  2. package/dist/index.js +17708 -15968
  3. package/package.json +3 -2
package/dist/index.d.ts CHANGED
@@ -14,6 +14,10 @@ export declare const AfterDeleteTrigger: (options: Omit<TriggerFunctionOptions,
14
14
 
15
15
  export declare const AfterInsertTrigger: (options: Omit<TriggerFunctionOptions, "timing" | "actions">) => ClassDecorator;
16
16
 
17
+ export declare const asHuman: (item: SchemaDiff) => string;
18
+
19
+ export declare const asSql: (item: SchemaDiff, options: SchemaDiffToSqlOptions) => string[];
20
+
17
21
  declare class BaseContext {
18
22
  databaseName: string;
19
23
  schemaName: string;
@@ -198,7 +202,7 @@ export declare type DatabaseIndex = {
198
202
  synchronize: boolean;
199
203
  };
200
204
 
201
- declare type DatabaseLike = Sql | Kysely<unknown>;
205
+ export declare type DatabaseLike = Sql | Kysely<unknown>;
202
206
 
203
207
  export declare type DatabaseOptions = {
204
208
  name?: string;
@@ -859,6 +863,11 @@ export declare type SchemaDiffOptions = BaseContextOptions & {
859
863
  overrides?: IgnoreOptions;
860
864
  };
861
865
 
866
+ /**
867
+ * Convert schema diff into human readable statements
868
+ */
869
+ export declare const schemaDiffToHuman: (items: SchemaDiff[]) => string[];
870
+
862
871
  /**
863
872
  * Convert schema diffs into SQL statements
864
873
  */