@sqldoc/db 0.0.5 → 0.0.6
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/package.json +1 -1
- package/src/runner.ts +2 -1
- package/src/types.ts +3 -1
- package/wasm/atlas.wasm +0 -0
package/package.json
CHANGED
package/src/runner.ts
CHANGED
|
@@ -257,7 +257,7 @@ export async function createAtlasRunner(options: AtlasRunnerOptions): Promise<At
|
|
|
257
257
|
async diff(
|
|
258
258
|
from: DiffSource,
|
|
259
259
|
to: DiffSource,
|
|
260
|
-
opts?: { schema?: string; renames?: AtlasRename[] },
|
|
260
|
+
opts?: { schema?: string; defaultSchema?: string; renames?: AtlasRename[] },
|
|
261
261
|
): Promise<AtlasResult> {
|
|
262
262
|
const fromIsDb = !Array.isArray(from)
|
|
263
263
|
const toIsDb = !Array.isArray(to)
|
|
@@ -267,6 +267,7 @@ export async function createAtlasRunner(options: AtlasRunnerOptions): Promise<At
|
|
|
267
267
|
from: fromIsDb ? [] : from,
|
|
268
268
|
to: toIsDb ? [] : to,
|
|
269
269
|
schema: opts?.schema,
|
|
270
|
+
defaultSchema: opts?.defaultSchema,
|
|
270
271
|
renames: opts?.renames,
|
|
271
272
|
fromConnection: fromIsDb ? 'from' : undefined,
|
|
272
273
|
toConnection: toIsDb ? 'to' : undefined,
|
package/src/types.ts
CHANGED
|
@@ -31,6 +31,7 @@ export interface AtlasCommand {
|
|
|
31
31
|
type: 'inspect' | 'diff' | 'apply'
|
|
32
32
|
dialect: 'postgres' | 'mysql' | 'sqlite'
|
|
33
33
|
schema?: string
|
|
34
|
+
defaultSchema?: string
|
|
34
35
|
files?: string[]
|
|
35
36
|
fileNames?: string[]
|
|
36
37
|
from?: string[]
|
|
@@ -118,7 +119,8 @@ export interface AtlasTable {
|
|
|
118
119
|
* Maps to flatColumn in marshal.go.
|
|
119
120
|
*/
|
|
120
121
|
export interface AtlasColumn {
|
|
121
|
-
name
|
|
122
|
+
/** Column name. Omitted for unnamed expressions (e.g. SELECT 1 in a view). */
|
|
123
|
+
name?: string
|
|
122
124
|
type?: AtlasColumnType
|
|
123
125
|
default?: AtlasExpr
|
|
124
126
|
attrs?: AtlasAttr[]
|
package/wasm/atlas.wasm
CHANGED
|
Binary file
|