diff --git a/packages/types/src/documents/app/table/constants.ts b/packages/types/src/documents/app/table/constants.ts index 783eae0671..fc831e7e7c 100644 --- a/packages/types/src/documents/app/table/constants.ts +++ b/packages/types/src/documents/app/table/constants.ts @@ -8,7 +8,7 @@ export enum AutoReason { FOREIGN_KEY = "foreign_key", } -export enum AutoFieldSubTypes { +export enum AutoFieldSubType { CREATED_BY = "createdBy", CREATED_AT = "createdAt", UPDATED_BY = "updatedBy", @@ -16,7 +16,7 @@ export enum AutoFieldSubTypes { AUTO_ID = "autoID", } -export enum FormulaTypes { +export enum FormulaType { STATIC = "static", DYNAMIC = "dynamic", } diff --git a/packages/types/src/documents/app/table/schema.ts b/packages/types/src/documents/app/table/schema.ts index e9eb139ebc..47ec303b66 100644 --- a/packages/types/src/documents/app/table/schema.ts +++ b/packages/types/src/documents/app/table/schema.ts @@ -2,9 +2,9 @@ // column size, position and whether it can be viewed import { FieldSubtype, FieldType } from "../row" import { - AutoFieldSubTypes, + AutoFieldSubType, AutoReason, - FormulaTypes, + FormulaType, RelationshipType, } from "./constants" @@ -22,7 +22,7 @@ interface BaseRelationshipFieldMetadata fieldName: string tableId: string tableRev?: string - subtype?: AutoFieldSubTypes.CREATED_BY | AutoFieldSubTypes.UPDATED_BY + subtype?: AutoFieldSubType.CREATED_BY | AutoFieldSubType.UPDATED_BY } // External tables use junction tables, internal tables don't require them @@ -62,7 +62,7 @@ export interface AutoColumnFieldMetadata extends Omit { type: FieldType.AUTO autocolumn: true - subtype?: AutoFieldSubTypes + subtype?: AutoFieldSubType lastID?: number // if the column was turned to an auto-column for SQL, explains why (primary, foreign etc) autoReason?: AutoReason @@ -70,7 +70,7 @@ export interface AutoColumnFieldMetadata export interface NumberFieldMetadata extends Omit { type: FieldType.NUMBER - subtype?: AutoFieldSubTypes.AUTO_ID + subtype?: AutoFieldSubType.AUTO_ID lastID?: number autoReason?: AutoReason.FOREIGN_KEY // used specifically when Budibase generates external tables, this denotes if a number field @@ -85,7 +85,7 @@ export interface DateFieldMetadata extends Omit { type: FieldType.DATETIME ignoreTimezones?: boolean timeOnly?: boolean - subtype?: AutoFieldSubTypes.CREATED_AT | AutoFieldSubTypes.UPDATED_AT + subtype?: AutoFieldSubType.CREATED_AT | AutoFieldSubType.UPDATED_AT } export interface LongFormFieldMetadata extends BaseFieldSchema { @@ -96,7 +96,7 @@ export interface LongFormFieldMetadata extends BaseFieldSchema { export interface FormulaFieldMetadata extends BaseFieldSchema { type: FieldType.FORMULA formula: string - formulaType?: FormulaTypes + formulaType?: FormulaType } export interface BBReferenceFieldMetadata