Making sure created flag gets carried across for external tables.

This commit is contained in:
mike12345567 2023-03-13 18:18:04 +00:00
parent 65ada7f8b2
commit 3d84409a58
2 changed files with 5 additions and 1 deletions

View File

@ -257,9 +257,12 @@ function copyExistingPropsOver(
tableIds: [string]
) {
if (entities && entities[tableName]) {
if (entities[tableName].primaryDisplay) {
if (entities[tableName]?.primaryDisplay) {
table.primaryDisplay = entities[tableName].primaryDisplay
}
if (entities[tableName]?.created) {
table.created = entities[tableName]?.created
}
const existingTableSchema = entities[tableName].schema
for (let key in existingTableSchema) {
if (!existingTableSchema.hasOwnProperty(key)) {

View File

@ -76,6 +76,7 @@ export interface Table extends Document {
sql?: boolean
indexes?: { [key: string]: any }
rows?: { [key: string]: any }
created?: boolean
}
export interface TableRequest extends Table {