Fix types
This commit is contained in:
parent
1d66110d01
commit
6bc658c1ff
|
@ -1,4 +1,5 @@
|
|||
import { objectStore, roles, constants } from "@budibase/backend-core"
|
||||
export { FieldType as FieldTypes } from "@budibase/types"
|
||||
|
||||
export enum FilterTypes {
|
||||
STRING = "string",
|
||||
|
@ -22,23 +23,6 @@ export const NoEmptyFilterStrings = [
|
|||
FilterTypes.NOT_CONTAINS,
|
||||
]
|
||||
|
||||
export enum FieldTypes {
|
||||
STRING = "string",
|
||||
BARCODEQR = "barcodeqr",
|
||||
LONGFORM = "longform",
|
||||
OPTIONS = "options",
|
||||
NUMBER = "number",
|
||||
BOOLEAN = "boolean",
|
||||
ARRAY = "array",
|
||||
DATETIME = "datetime",
|
||||
ATTACHMENT = "attachment",
|
||||
LINK = "link",
|
||||
FORMULA = "formula",
|
||||
AUTO = "auto",
|
||||
JSON = "json",
|
||||
INTERNAL = "internal",
|
||||
}
|
||||
|
||||
export const CanSwitchTypes = [
|
||||
[exports.FieldTypes.JSON, exports.FieldTypes.ARRAY],
|
||||
[
|
||||
|
|
|
@ -190,7 +190,7 @@ export const DEFAULT_INVENTORY_TABLE_SCHEMA: Table = {
|
|||
},
|
||||
}
|
||||
|
||||
export const DEFAULT_EMPLOYEE_TABLE_SCHEMA = {
|
||||
export const DEFAULT_EMPLOYEE_TABLE_SCHEMA: Table = {
|
||||
_id: DEFAULT_EMPLOYEE_TABLE_ID,
|
||||
type: "internal",
|
||||
views: {},
|
||||
|
@ -287,7 +287,7 @@ export const DEFAULT_EMPLOYEE_TABLE_SCHEMA = {
|
|||
sortable: false,
|
||||
},
|
||||
"Badge Photo": {
|
||||
type: "attachment",
|
||||
type: FieldTypes.ATTACHMENT,
|
||||
constraints: {
|
||||
type: FieldTypes.ARRAY,
|
||||
presence: false,
|
||||
|
@ -466,7 +466,7 @@ export const DEFAULT_JOBS_TABLE_SCHEMA: Table = {
|
|||
// sortable: true,
|
||||
},
|
||||
"Works End": {
|
||||
type: "datetime",
|
||||
type: FieldTypes.DATETIME,
|
||||
constraints: {
|
||||
type: "string",
|
||||
length: {},
|
||||
|
@ -480,7 +480,7 @@ export const DEFAULT_JOBS_TABLE_SCHEMA: Table = {
|
|||
ignoreTimezones: true,
|
||||
},
|
||||
"Updated Price": {
|
||||
type: "number",
|
||||
type: FieldTypes.NUMBER,
|
||||
constraints: {
|
||||
type: "number",
|
||||
presence: false,
|
||||
|
|
|
@ -247,7 +247,7 @@ class OracleIntegration extends Sql implements DatasourcePlus {
|
|||
)
|
||||
}
|
||||
|
||||
private internalConvertType(column: OracleColumn): { type: string } {
|
||||
private internalConvertType(column: OracleColumn): { type: FieldTypes } {
|
||||
if (this.isBooleanType(column)) {
|
||||
return { type: FieldTypes.BOOLEAN }
|
||||
}
|
||||
|
|
|
@ -373,11 +373,11 @@ class TestConfiguration {
|
|||
// clear any old app
|
||||
this.appId = null
|
||||
// @ts-ignore
|
||||
await context.updateAppId(null)
|
||||
context.updateAppId(null)
|
||||
this.app = await this._req({ name: appName }, null, controllers.app.create)
|
||||
this.appId = this.app.appId
|
||||
// @ts-ignore
|
||||
await context.updateAppId(this.appId)
|
||||
context.updateAppId(this.appId)
|
||||
|
||||
// create production app
|
||||
this.prodApp = await this.publish()
|
||||
|
|
|
@ -14,6 +14,7 @@ export enum FieldType {
|
|||
AUTO = "auto",
|
||||
JSON = "json",
|
||||
INTERNAL = "internal",
|
||||
BARCODEQR = "barcodeqr",
|
||||
}
|
||||
|
||||
export interface RowAttachment {
|
||||
|
|
Loading…
Reference in New Issue