Fixes based on re-trying everything with the new type structures (some empty structures being filled out affected things).
This commit is contained in:
parent
1134b01f39
commit
0efa0d375d
|
@ -2,6 +2,7 @@ export { Query, Datasource } from "./datasource"
|
||||||
export { FieldSchema, TableSchema, Table, Document, Row } from "@budibase/types"
|
export { FieldSchema, TableSchema, Table, Document, Row } from "@budibase/types"
|
||||||
|
|
||||||
export interface Application extends Document {
|
export interface Application extends Document {
|
||||||
|
_id: string
|
||||||
appId?: string
|
appId?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { events } from "@budibase/backend-core"
|
import { events } from "@budibase/backend-core"
|
||||||
import { getQueryParams } from "../../../../db/utils"
|
import { getQueryParams } from "../../../../db/utils"
|
||||||
import { Query, Datasource } from "@budibase/types"
|
import { Query, Datasource, SourceNames } from "@budibase/types"
|
||||||
|
|
||||||
const getQueries = async (appDb: any): Promise<Query[]> => {
|
const getQueries = async (appDb: any): Promise<Query[]> => {
|
||||||
const response = await appDb.allDocs(
|
const response = await appDb.allDocs(
|
||||||
|
@ -31,8 +31,9 @@ export const backfill = async (appDb: any, timestamp: string | number) => {
|
||||||
// and the query has not
|
// and the query has not
|
||||||
if (e.status === 404) {
|
if (e.status === 404) {
|
||||||
datasource = {
|
datasource = {
|
||||||
|
type: "unknown",
|
||||||
_id: query.datasourceId,
|
_id: query.datasourceId,
|
||||||
source: "unknown",
|
source: SourceNames.UNKNOWN,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw e
|
throw e
|
||||||
|
|
|
@ -4,13 +4,13 @@ import { Table } from "./table"
|
||||||
|
|
||||||
export interface Datasource extends Document {
|
export interface Datasource extends Document {
|
||||||
type: string
|
type: string
|
||||||
name: string
|
name?: string
|
||||||
source: SourceNames
|
source: SourceNames
|
||||||
// the config is defined by the schema
|
// the config is defined by the schema
|
||||||
config: {
|
config?: {
|
||||||
[key: string]: string | number | boolean
|
[key: string]: string | number | boolean
|
||||||
}
|
}
|
||||||
plus: boolean
|
plus?: boolean
|
||||||
entities?: {
|
entities?: {
|
||||||
[key: string]: Table
|
[key: string]: Table
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,7 @@ export enum SourceNames {
|
||||||
FIRESTORE = "FIRESTORE",
|
FIRESTORE = "FIRESTORE",
|
||||||
REDIS = "REDIS",
|
REDIS = "REDIS",
|
||||||
SNOWFLAKE = "SNOWFLAKE",
|
SNOWFLAKE = "SNOWFLAKE",
|
||||||
|
UNKNOWN = "unknown",
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum IncludeRelationships {
|
export enum IncludeRelationships {
|
||||||
|
|
Loading…
Reference in New Issue