@wisemen/datewise 0.1.2 → 0.1.3

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.
@@ -3,4 +3,4 @@ export * from './timezone.js';
3
3
  export * from './date-period.enum.js';
4
4
  export * from './typeorm/index.js';
5
5
  export * from './constants.js';
6
- export { getMigration } from './migration.js';
6
+ export { getMigrationQuery } from './migration.js';
@@ -3,5 +3,5 @@ export * from './timezone.js';
3
3
  export * from './date-period.enum.js';
4
4
  export * from './typeorm/index.js';
5
5
  export * from './constants.js';
6
- export { getMigration } from './migration.js';
6
+ export { getMigrationQuery } from './migration.js';
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA"}
@@ -1,4 +1 @@
1
- export declare function getMigration(schema: string): {
2
- query: string;
3
- params: string[];
4
- };
1
+ export declare function getMigrationQuery(): string;
@@ -1,5 +1,5 @@
1
- export function getMigration(schema) {
2
- const query = `
1
+ export function getMigrationQuery() {
2
+ return `
3
3
  DO $$
4
4
  BEGIN
5
5
  IF NOT EXISTS (
@@ -7,7 +7,7 @@ export function getMigration(schema) {
7
7
  FROM pg_type t
8
8
  JOIN pg_namespace n ON n.oid = t.typnamespace
9
9
  WHERE t.typname = 'tstzrange3'
10
- AND n.nspname = $1
10
+ AND n.nspname = 'public'
11
11
  ) THEN
12
12
  CREATE TYPE tstzrange3 AS RANGE (
13
13
  subtype = timestamp (3) with time zone,
@@ -16,6 +16,5 @@ export function getMigration(schema) {
16
16
  END IF;
17
17
  END $$;
18
18
  `;
19
- return { query, params: [schema] };
20
19
  }
21
20
  //# sourceMappingURL=migration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration.js","sourceRoot":"","sources":["../../lib/common/migration.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY,CAAE,MAAc;IAC1C,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;KAgBX,CAAA;IAEH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,CAAA;AACpC,CAAC"}
1
+ {"version":3,"file":"migration.js","sourceRoot":"","sources":["../../lib/common/migration.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,iBAAiB;IAC/B,OAAO;;;;;;;;;;;;;;;;KAgBJ,CAAA;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wisemen/datewise",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "type": "module",