@wisemen/datewise 0.1.1 → 0.1.2
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.
package/dist/common/index.d.ts
CHANGED
package/dist/common/index.js
CHANGED
package/dist/common/index.js.map
CHANGED
|
@@ -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"}
|
|
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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export function getMigration(schema) {
|
|
2
|
+
const query = `
|
|
3
|
+
DO $$
|
|
4
|
+
BEGIN
|
|
5
|
+
IF NOT EXISTS (
|
|
6
|
+
SELECT 1
|
|
7
|
+
FROM pg_type t
|
|
8
|
+
JOIN pg_namespace n ON n.oid = t.typnamespace
|
|
9
|
+
WHERE t.typname = 'tstzrange3'
|
|
10
|
+
AND n.nspname = $1
|
|
11
|
+
) THEN
|
|
12
|
+
CREATE TYPE tstzrange3 AS RANGE (
|
|
13
|
+
subtype = timestamp (3) with time zone,
|
|
14
|
+
multirange_type_name = tstzmultirange3
|
|
15
|
+
);
|
|
16
|
+
END IF;
|
|
17
|
+
END $$;
|
|
18
|
+
`;
|
|
19
|
+
return { query, params: [schema] };
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=migration.js.map
|
|
@@ -0,0 +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"}
|